2015-11-30 16:04:14 +00:00
|
|
|
PrintPage1: ; 1dc1b0
|
|
|
|
hlcoord 0, 0
|
2016-05-11 21:16:03 +00:00
|
|
|
decoord 0, 0, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld bc, 17 * SCREEN_WIDTH
|
|
|
|
call CopyBytes
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 17, 1, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld a, $62
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 17, 2, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld a, $64
|
|
|
|
ld [hli], a
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 1, 9, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld a, " "
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 1, 10, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld a, $61
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 2, 11, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
lb bc, 5, 18
|
|
|
|
call ClearBox
|
|
|
|
ld a, [wd265]
|
|
|
|
dec a
|
|
|
|
call CheckCaughtMon
|
|
|
|
push af
|
|
|
|
ld a, [wd265]
|
|
|
|
ld b, a
|
|
|
|
ld c, 1 ; get page 1
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall GetDexEntryPagePointer
|
2015-11-30 16:04:14 +00:00
|
|
|
pop af
|
|
|
|
ld a, b
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 1, 11, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
call nz, FarString
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 19, 0, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld [hl], $35
|
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
add hl, de
|
|
|
|
ld b, $f
|
|
|
|
.column_loop
|
|
|
|
ld [hl], $37
|
|
|
|
add hl, de
|
|
|
|
dec b
|
|
|
|
jr nz, .column_loop
|
|
|
|
ld [hl], $3a
|
|
|
|
ret
|
|
|
|
; 1dc213
|
|
|
|
|
|
|
|
PrintPage2: ; 1dc213
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 0, 0, wPrinterTileMapBuffer
|
|
|
|
ld bc, 8 * SCREEN_WIDTH
|
2015-11-30 16:04:14 +00:00
|
|
|
ld a, " "
|
|
|
|
call ByteFill
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 0, 0, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld a, $36
|
2016-05-11 21:16:03 +00:00
|
|
|
ld b, 6
|
2015-11-30 16:04:14 +00:00
|
|
|
call .FillColumn
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 19, 0, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld a, $37
|
2016-05-11 21:16:03 +00:00
|
|
|
ld b, 6
|
2015-11-30 16:04:14 +00:00
|
|
|
call .FillColumn
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 0, 6, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld [hl], $38
|
|
|
|
inc hl
|
|
|
|
ld a, $39
|
|
|
|
ld bc, SCREEN_HEIGHT
|
|
|
|
call ByteFill
|
|
|
|
ld [hl], $3a
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 0, 7, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld bc, SCREEN_WIDTH
|
|
|
|
ld a, $32
|
|
|
|
call ByteFill
|
|
|
|
ld a, [wd265]
|
|
|
|
dec a
|
|
|
|
call CheckCaughtMon
|
|
|
|
push af
|
|
|
|
ld a, [wd265]
|
|
|
|
ld b, a
|
|
|
|
ld c, 2 ; get page 2
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall GetDexEntryPagePointer
|
2015-11-30 16:04:14 +00:00
|
|
|
pop af
|
2016-05-11 21:16:03 +00:00
|
|
|
hlcoord 1, 1, wPrinterTileMapBuffer
|
2015-11-30 16:04:14 +00:00
|
|
|
ld a, b
|
|
|
|
call nz, FarString
|
|
|
|
ret
|
|
|
|
; 1dc26a
|
|
|
|
|
|
|
|
.FillColumn: ; 1dc26a
|
|
|
|
push de
|
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
.column_loop
|
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec b
|
|
|
|
jr nz, .column_loop
|
|
|
|
pop de
|
|
|
|
ret
|
|
|
|
; 1dc275
|
|
|
|
|
|
|
|
GBPrinterStrings:
|
2016-05-11 21:16:03 +00:00
|
|
|
GBPrinterString_Null: db "@"
|
|
|
|
GBPrinterString_CheckingLink: next " CHECKING LINK...@"
|
|
|
|
GBPrinterString_Transmitting: next " TRANSMITTING...@"
|
|
|
|
GBPrinterString_Printing: next " PRINTING...@"
|
|
|
|
GBPrinterString_PrinterError1:
|
2015-11-30 16:04:14 +00:00
|
|
|
db " Printer Error 1"
|
|
|
|
next ""
|
|
|
|
next "Check the Game Boy"
|
|
|
|
next "Printer Manual."
|
|
|
|
db "@"
|
2016-05-11 21:16:03 +00:00
|
|
|
GBPrinterString_PrinterError2:
|
2015-11-30 16:04:14 +00:00
|
|
|
db " Printer Error 2"
|
|
|
|
next ""
|
|
|
|
next "Check the Game Boy"
|
|
|
|
next "Printer Manual."
|
|
|
|
db "@"
|
2016-05-11 21:16:03 +00:00
|
|
|
GBPrinterString_PrinterError3:
|
2015-11-30 16:04:14 +00:00
|
|
|
db " Printer Error 3"
|
|
|
|
next ""
|
|
|
|
next "Check the Game Boy"
|
|
|
|
next "Printer Manual."
|
|
|
|
db "@"
|
2016-05-11 21:16:03 +00:00
|
|
|
GBPrinterString_PrinterError4:
|
2015-11-30 16:04:14 +00:00
|
|
|
db " Printer Error 4"
|
|
|
|
next ""
|
|
|
|
next "Check the Game Boy"
|
|
|
|
next "Printer Manual."
|
|
|
|
db "@"
|
|
|
|
; 1dc381
|
|
|
|
|
2016-05-11 21:16:03 +00:00
|
|
|
PrintPartyMonPage1: ; 1dc381
|
2015-11-30 16:04:14 +00:00
|
|
|
call ClearBGPalettes
|
|
|
|
call ClearTileMap
|
|
|
|
call ClearSprites
|
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
call LoadFontsBattleExtra
|
|
|
|
|
2017-12-15 17:53:33 +00:00
|
|
|
ld de, GBPrinterHPIcon
|
2015-11-30 16:04:14 +00:00
|
|
|
ld hl, VTiles2 tile $71
|
2017-12-15 17:53:33 +00:00
|
|
|
lb bc, BANK(GBPrinterHPIcon), 1
|
2015-11-30 16:04:14 +00:00
|
|
|
call Request1bpp
|
|
|
|
|
2017-12-15 17:53:33 +00:00
|
|
|
ld de, GBPrinterLvIcon
|
2015-11-30 16:04:14 +00:00
|
|
|
ld hl, VTiles2 tile $6e
|
2017-12-15 17:53:33 +00:00
|
|
|
lb bc, BANK(GBPrinterLvIcon), 1
|
2015-11-30 16:04:14 +00:00
|
|
|
call Request1bpp
|
|
|
|
|
2017-12-10 04:37:08 +00:00
|
|
|
ld de, ShinyIconGFX
|
2015-11-30 16:04:14 +00:00
|
|
|
ld hl, VTiles2 tile $3f
|
2017-12-10 04:37:08 +00:00
|
|
|
lb bc, BANK(ShinyIconGFX), 1
|
2015-11-30 16:04:14 +00:00
|
|
|
call Get2bpp
|
|
|
|
|
|
|
|
xor a
|
|
|
|
ld [MonType], a
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CopyPkmnToTempMon
|
2015-11-30 16:04:14 +00:00
|
|
|
hlcoord 0, 7
|
|
|
|
ld b, 9
|
|
|
|
ld c, 18
|
|
|
|
call TextBox
|
|
|
|
hlcoord 8, 2
|
|
|
|
ld a, [TempMonLevel]
|
2016-05-10 16:31:49 +00:00
|
|
|
call PrintLevel_Force3Digits
|
2015-11-30 16:04:14 +00:00
|
|
|
hlcoord 12, 2
|
|
|
|
ld [hl], "◀" ; Filled left triangle
|
|
|
|
inc hl
|
|
|
|
ld de, TempMonMaxHP
|
|
|
|
lb bc, 2, 3
|
|
|
|
call PrintNum
|
|
|
|
ld a, [CurPartySpecies]
|
|
|
|
ld [wd265], a
|
|
|
|
ld [CurSpecies], a
|
|
|
|
ld hl, PartyMonNicknames
|
|
|
|
call Function1dc50e
|
|
|
|
hlcoord 8, 4
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 9, 6
|
|
|
|
ld [hl], "/"
|
|
|
|
call GetPokemonName
|
|
|
|
hlcoord 10, 6
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 8, 0
|
|
|
|
ld [hl], "№"
|
|
|
|
inc hl
|
|
|
|
ld [hl], "."
|
|
|
|
inc hl
|
|
|
|
ld de, wd265
|
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
|
|
|
call PrintNum
|
|
|
|
hlcoord 1, 9
|
|
|
|
ld de, String1dc550
|
|
|
|
call PlaceString
|
|
|
|
ld hl, PartyMonOT
|
|
|
|
call Function1dc50e
|
|
|
|
hlcoord 4, 9
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 1, 11
|
|
|
|
ld de, String1dc559
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 4, 11
|
|
|
|
ld de, TempMonID
|
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
|
|
|
call PrintNum
|
|
|
|
hlcoord 1, 14
|
|
|
|
ld de, String1dc554
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 7, 14
|
|
|
|
ld a, [TempMonMoves + 0]
|
|
|
|
call Function1dc51a
|
|
|
|
call Function1dc52c
|
|
|
|
ld hl, TempMonDVs
|
|
|
|
predef GetUnownLetter
|
2015-12-19 19:48:30 +00:00
|
|
|
ld hl, wBoxAlignment
|
2015-11-30 16:04:14 +00:00
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
ld a, [CurPartySpecies]
|
|
|
|
cp UNOWN
|
|
|
|
jr z, .asm_1dc469
|
|
|
|
inc [hl]
|
|
|
|
|
|
|
|
.asm_1dc469
|
|
|
|
hlcoord 0, 0
|
|
|
|
call _PrepMonFrontpic
|
|
|
|
call WaitBGMap
|
2015-12-23 03:19:33 +00:00
|
|
|
ld b, SCGB_STATS_SCREEN_HP_PALS
|
2015-11-30 16:04:14 +00:00
|
|
|
call GetSGBLayout
|
|
|
|
call SetPalettes
|
|
|
|
ret
|
|
|
|
; 1dc47b
|
|
|
|
|
2016-05-11 21:16:03 +00:00
|
|
|
PrintPartyMonPage2: ; 1dc47b
|
2015-11-30 16:04:14 +00:00
|
|
|
call ClearBGPalettes
|
|
|
|
call ClearTileMap
|
|
|
|
call ClearSprites
|
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
call LoadFontsBattleExtra
|
|
|
|
xor a
|
|
|
|
ld [MonType], a
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CopyPkmnToTempMon
|
2015-11-30 16:04:14 +00:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld b, 15
|
|
|
|
ld c, 18
|
|
|
|
call TextBox
|
|
|
|
ld bc, SCREEN_WIDTH
|
|
|
|
decoord 0, 0
|
|
|
|
hlcoord 0, 1
|
|
|
|
call CopyBytes
|
|
|
|
hlcoord 7, 0
|
|
|
|
ld a, [TempMonMoves + 1]
|
|
|
|
call Function1dc51a
|
|
|
|
hlcoord 7, 2
|
|
|
|
ld a, [TempMonMoves + 2]
|
|
|
|
call Function1dc51a
|
|
|
|
hlcoord 7, 4
|
|
|
|
ld a, [TempMonMoves + 3]
|
|
|
|
call Function1dc51a
|
|
|
|
hlcoord 7, 7
|
|
|
|
ld de, String1dc55d
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 16, 7
|
|
|
|
ld de, TempMonAttack
|
|
|
|
call .PrintTempMonStats
|
|
|
|
hlcoord 16, 9
|
|
|
|
ld de, TempMonDefense
|
|
|
|
call .PrintTempMonStats
|
|
|
|
hlcoord 16, 11
|
|
|
|
ld de, TempMonSpclAtk
|
|
|
|
call .PrintTempMonStats
|
|
|
|
hlcoord 16, 13
|
|
|
|
ld de, TempMonSpclDef
|
|
|
|
call .PrintTempMonStats
|
|
|
|
hlcoord 16, 15
|
|
|
|
ld de, TempMonSpeed
|
|
|
|
call .PrintTempMonStats
|
|
|
|
call WaitBGMap
|
2015-12-23 03:19:33 +00:00
|
|
|
ld b, SCGB_STATS_SCREEN_HP_PALS
|
2015-11-30 16:04:14 +00:00
|
|
|
call GetSGBLayout
|
|
|
|
call SetPalettes
|
|
|
|
ret
|
|
|
|
; 1dc507
|
|
|
|
|
|
|
|
.PrintTempMonStats: ; 1dc507
|
|
|
|
lb bc, 2, 3
|
|
|
|
call PrintNum
|
|
|
|
ret
|
|
|
|
; 1dc50e
|
|
|
|
|
|
|
|
Function1dc50e: ; 1dc50e
|
|
|
|
ld bc, NAME_LENGTH
|
|
|
|
ld a, [CurPartyMon]
|
|
|
|
call AddNTimes
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
|
|
|
ret
|
|
|
|
; 1dc51a
|
|
|
|
|
|
|
|
Function1dc51a: ; 1dc51a
|
|
|
|
and a
|
|
|
|
jr z, .no_move
|
|
|
|
|
|
|
|
ld [wd265], a
|
|
|
|
call GetMoveName
|
|
|
|
jr .got_string
|
|
|
|
|
|
|
|
.no_move
|
|
|
|
ld de, String1dc584
|
|
|
|
|
|
|
|
.got_string
|
|
|
|
call PlaceString
|
|
|
|
ret
|
|
|
|
; 1dc52c
|
|
|
|
|
|
|
|
Function1dc52c: ; 1dc52c
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall GetGender
|
2015-11-30 16:04:14 +00:00
|
|
|
ld a, " "
|
|
|
|
jr c, .got_gender
|
|
|
|
ld a, "♂"
|
|
|
|
jr nz, .got_gender
|
|
|
|
ld a, "♀"
|
|
|
|
|
|
|
|
.got_gender
|
|
|
|
hlcoord 17, 2
|
|
|
|
ld [hl], a
|
|
|
|
ld bc, TempMonDVs
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CheckShininess
|
2015-11-30 16:04:14 +00:00
|
|
|
ret nc
|
|
|
|
hlcoord 18, 2
|
|
|
|
ld [hl], "<SHINY>"
|
|
|
|
ret
|
|
|
|
; 1dc550
|
|
|
|
|
|
|
|
String1dc550: ; 1dc550
|
|
|
|
db "OT/@"
|
|
|
|
|
|
|
|
String1dc554: ; 1dc554
|
|
|
|
db "MOVE@"
|
|
|
|
|
|
|
|
String1dc559: ; 1dc559
|
|
|
|
db "<ID>№.@"
|
|
|
|
|
|
|
|
String1dc55d: ; 1dc55d
|
|
|
|
db "ATTACK"
|
|
|
|
next "DEFENSE"
|
|
|
|
next "SPCL.ATK"
|
|
|
|
next "SPCL.DEF"
|
|
|
|
next "SPEED"
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
String1dc584: ; 1dc584
|
|
|
|
db "------------@"
|
|
|
|
; 1dc591
|
2017-12-15 17:53:33 +00:00
|
|
|
|
|
|
|
GBPrinterHPIcon: ; 1dc591
|
|
|
|
INCBIN "gfx/printer/hp.1bpp"
|
|
|
|
|
|
|
|
GBPrinterLvIcon: ; 1dc599
|
|
|
|
INCBIN "gfx/printer/lv.1bpp"
|