2022-06-06 14:25:42 -07:00
|
|
|
DEF PRINTPARTY_HP EQU "◀" ; $71
|
2018-01-11 19:16:17 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
PrintPage1:
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 0, 0
|
2020-02-13 09:30:13 -08:00
|
|
|
decoord 0, 0, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld bc, 17 * SCREEN_WIDTH
|
|
|
|
call CopyBytes
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 17, 1, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld a, $62
|
|
|
|
ld [hli], a
|
2020-10-04 19:34:50 -07:00
|
|
|
inc a ; $63
|
2015-11-30 08:04:14 -08:00
|
|
|
ld [hl], a
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 17, 2, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld a, $64
|
|
|
|
ld [hli], a
|
2020-10-04 19:34:50 -07:00
|
|
|
inc a ; $65
|
2015-11-30 08:04:14 -08:00
|
|
|
ld [hl], a
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 1, 9, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld a, " "
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 1, 10, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld a, $61
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 2, 11, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
lb bc, 5, 18
|
|
|
|
call ClearBox
|
2018-07-28 16:27:34 -07:00
|
|
|
ld a, [wTempSpecies]
|
2015-11-30 08:04:14 -08:00
|
|
|
dec a
|
|
|
|
call CheckCaughtMon
|
|
|
|
push af
|
2018-07-28 16:27:34 -07:00
|
|
|
ld a, [wTempSpecies]
|
2015-11-30 08:04:14 -08:00
|
|
|
ld b, a
|
|
|
|
ld c, 1 ; get page 1
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall GetDexEntryPagePointer
|
2015-11-30 08:04:14 -08:00
|
|
|
pop af
|
|
|
|
ld a, b
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 1, 11, wPrinterTilemapBuffer
|
2020-12-07 10:32:08 -08:00
|
|
|
call nz, PlaceFarString
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 19, 0, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08: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
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
PrintPage2:
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 0, 0, wPrinterTilemapBuffer
|
2016-05-11 14:16:03 -07:00
|
|
|
ld bc, 8 * SCREEN_WIDTH
|
2015-11-30 08:04:14 -08:00
|
|
|
ld a, " "
|
|
|
|
call ByteFill
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 0, 0, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld a, $36
|
2016-05-11 14:16:03 -07:00
|
|
|
ld b, 6
|
2015-11-30 08:04:14 -08:00
|
|
|
call .FillColumn
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 19, 0, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld a, $37
|
2016-05-11 14:16:03 -07:00
|
|
|
ld b, 6
|
2015-11-30 08:04:14 -08:00
|
|
|
call .FillColumn
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 0, 6, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld [hl], $38
|
|
|
|
inc hl
|
|
|
|
ld a, $39
|
|
|
|
ld bc, SCREEN_HEIGHT
|
|
|
|
call ByteFill
|
|
|
|
ld [hl], $3a
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 0, 7, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld bc, SCREEN_WIDTH
|
|
|
|
ld a, $32
|
|
|
|
call ByteFill
|
2018-07-28 16:27:34 -07:00
|
|
|
ld a, [wTempSpecies]
|
2015-11-30 08:04:14 -08:00
|
|
|
dec a
|
|
|
|
call CheckCaughtMon
|
|
|
|
push af
|
2018-07-28 16:27:34 -07:00
|
|
|
ld a, [wTempSpecies]
|
2015-11-30 08:04:14 -08:00
|
|
|
ld b, a
|
|
|
|
ld c, 2 ; get page 2
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall GetDexEntryPagePointer
|
2015-11-30 08:04:14 -08:00
|
|
|
pop af
|
2020-02-13 09:30:13 -08:00
|
|
|
hlcoord 1, 1, wPrinterTilemapBuffer
|
2015-11-30 08:04:14 -08:00
|
|
|
ld a, b
|
2020-12-07 10:32:08 -08:00
|
|
|
call nz, PlaceFarString
|
2015-11-30 08:04:14 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.FillColumn:
|
2015-11-30 08:04:14 -08:00
|
|
|
push de
|
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
.column_loop
|
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec b
|
|
|
|
jr nz, .column_loop
|
|
|
|
pop de
|
|
|
|
ret
|
|
|
|
|
2018-06-12 20:29:15 -07:00
|
|
|
GBPrinterStrings: ; used only for BANK(GBPrinterStrings)
|
2016-05-11 14:16:03 -07:00
|
|
|
GBPrinterString_Null: db "@"
|
|
|
|
GBPrinterString_CheckingLink: next " CHECKING LINK...@"
|
|
|
|
GBPrinterString_Transmitting: next " TRANSMITTING...@"
|
|
|
|
GBPrinterString_Printing: next " PRINTING...@"
|
|
|
|
GBPrinterString_PrinterError1:
|
2015-11-30 08:04:14 -08:00
|
|
|
db " Printer Error 1"
|
|
|
|
next ""
|
|
|
|
next "Check the Game Boy"
|
|
|
|
next "Printer Manual."
|
|
|
|
db "@"
|
2016-05-11 14:16:03 -07:00
|
|
|
GBPrinterString_PrinterError2:
|
2015-11-30 08:04:14 -08:00
|
|
|
db " Printer Error 2"
|
|
|
|
next ""
|
|
|
|
next "Check the Game Boy"
|
|
|
|
next "Printer Manual."
|
|
|
|
db "@"
|
2016-05-11 14:16:03 -07:00
|
|
|
GBPrinterString_PrinterError3:
|
2015-11-30 08:04:14 -08:00
|
|
|
db " Printer Error 3"
|
|
|
|
next ""
|
|
|
|
next "Check the Game Boy"
|
|
|
|
next "Printer Manual."
|
|
|
|
db "@"
|
2016-05-11 14:16:03 -07:00
|
|
|
GBPrinterString_PrinterError4:
|
2015-11-30 08:04:14 -08:00
|
|
|
db " Printer Error 4"
|
|
|
|
next ""
|
|
|
|
next "Check the Game Boy"
|
|
|
|
next "Printer Manual."
|
|
|
|
db "@"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
PrintPartyMonPage1:
|
2015-11-30 08:04:14 -08:00
|
|
|
call ClearBGPalettes
|
2020-02-13 09:30:13 -08:00
|
|
|
call ClearTilemap
|
2015-11-30 08:04:14 -08:00
|
|
|
call ClearSprites
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapMode], a
|
2015-11-30 08:04:14 -08:00
|
|
|
call LoadFontsBattleExtra
|
|
|
|
|
2017-12-15 09:53:33 -08:00
|
|
|
ld de, GBPrinterHPIcon
|
2018-01-11 19:16:17 -08:00
|
|
|
ld hl, vTiles2 tile PRINTPARTY_HP
|
2017-12-15 09:53:33 -08:00
|
|
|
lb bc, BANK(GBPrinterHPIcon), 1
|
2015-11-30 08:04:14 -08:00
|
|
|
call Request1bpp
|
|
|
|
|
2017-12-15 09:53:33 -08:00
|
|
|
ld de, GBPrinterLvIcon
|
2018-01-11 19:16:17 -08:00
|
|
|
ld hl, vTiles2 tile "<LV>"
|
2017-12-15 09:53:33 -08:00
|
|
|
lb bc, BANK(GBPrinterLvIcon), 1
|
2015-11-30 08:04:14 -08:00
|
|
|
call Request1bpp
|
|
|
|
|
2018-01-13 12:22:16 -08:00
|
|
|
ld de, StatsScreenPageTilesGFX + 14 tiles ; shiny icon
|
2018-01-18 23:30:19 -08:00
|
|
|
ld hl, vTiles2 tile "⁂"
|
2018-01-13 12:22:16 -08:00
|
|
|
lb bc, BANK(StatsScreenPageTilesGFX), 1
|
2015-11-30 08:04:14 -08:00
|
|
|
call Get2bpp
|
|
|
|
|
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMonType], a
|
2018-02-22 08:13:29 -08:00
|
|
|
farcall CopyMonToTempMon
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 0, 7
|
|
|
|
ld b, 9
|
|
|
|
ld c, 18
|
2023-08-11 03:28:14 -07:00
|
|
|
call Textbox1bpp
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 8, 2
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wTempMonLevel]
|
2016-05-10 09:31:49 -07:00
|
|
|
call PrintLevel_Force3Digits
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 12, 2
|
2018-01-11 19:16:17 -08:00
|
|
|
ld [hl], PRINTPARTY_HP
|
2015-11-30 08:04:14 -08:00
|
|
|
inc hl
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wTempMonMaxHP
|
2015-11-30 08:04:14 -08:00
|
|
|
lb bc, 2, 3
|
|
|
|
call PrintNum
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartySpecies]
|
2020-12-23 13:29:30 -08:00
|
|
|
ld [wNamedObjectIndex], a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wCurSpecies], a
|
|
|
|
ld hl, wPartyMonNicknames
|
2020-10-04 19:34:50 -07:00
|
|
|
call GetCurPartyMonName
|
2015-11-30 08:04:14 -08:00
|
|
|
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
|
2020-12-23 13:29:30 -08:00
|
|
|
ld de, wNamedObjectIndex
|
2015-11-30 08:04:14 -08:00
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
|
|
|
call PrintNum
|
|
|
|
hlcoord 1, 9
|
2020-10-04 19:34:50 -07:00
|
|
|
ld de, PrintParty_OTString
|
2015-11-30 08:04:14 -08:00
|
|
|
call PlaceString
|
2021-03-17 13:16:02 -07:00
|
|
|
ld hl, wPartyMonOTs
|
2020-10-04 19:34:50 -07:00
|
|
|
call GetCurPartyMonName
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 4, 9
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 1, 11
|
2020-10-04 19:34:50 -07:00
|
|
|
ld de, PrintParty_IDNoString
|
2015-11-30 08:04:14 -08:00
|
|
|
call PlaceString
|
|
|
|
hlcoord 4, 11
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wTempMonID
|
2015-11-30 08:04:14 -08:00
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
|
|
|
call PrintNum
|
|
|
|
hlcoord 1, 14
|
2020-10-04 19:34:50 -07:00
|
|
|
ld de, PrintParty_MoveString
|
2015-11-30 08:04:14 -08:00
|
|
|
call PlaceString
|
|
|
|
hlcoord 7, 14
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wTempMonMoves + 0]
|
2020-10-04 19:34:50 -07:00
|
|
|
call PlaceMoveNameString
|
|
|
|
call PlaceGenderAndShininess
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wTempMonDVs
|
2018-01-16 11:30:10 -08:00
|
|
|
predef GetUnownLetter
|
2015-12-19 11:48:30 -08:00
|
|
|
ld hl, wBoxAlignment
|
2015-11-30 08:04:14 -08:00
|
|
|
xor a
|
|
|
|
ld [hl], a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartySpecies]
|
2015-11-30 08:04:14 -08:00
|
|
|
cp UNOWN
|
2021-02-05 09:44:21 -08:00
|
|
|
jr z, .got_alignment
|
2015-11-30 08:04:14 -08:00
|
|
|
inc [hl]
|
2021-02-05 09:44:21 -08:00
|
|
|
.got_alignment
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 0, 0
|
|
|
|
call _PrepMonFrontpic
|
|
|
|
call WaitBGMap
|
2023-07-26 08:01:20 -07:00
|
|
|
ld b, CGB_STATS_SCREEN_HP_PALS
|
|
|
|
call GetCGBLayout
|
2024-02-10 15:16:00 -08:00
|
|
|
call SetDefaultBGPAndOBP
|
2015-11-30 08:04:14 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
PrintPartyMonPage2:
|
2015-11-30 08:04:14 -08:00
|
|
|
call ClearBGPalettes
|
2020-02-13 09:30:13 -08:00
|
|
|
call ClearTilemap
|
2015-11-30 08:04:14 -08:00
|
|
|
call ClearSprites
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapMode], a
|
2015-11-30 08:04:14 -08:00
|
|
|
call LoadFontsBattleExtra
|
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wMonType], a
|
2018-02-22 08:13:29 -08:00
|
|
|
farcall CopyMonToTempMon
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 0, 0
|
|
|
|
ld b, 15
|
|
|
|
ld c, 18
|
2023-08-11 03:28:14 -07:00
|
|
|
call Textbox1bpp
|
2015-11-30 08:04:14 -08:00
|
|
|
ld bc, SCREEN_WIDTH
|
|
|
|
decoord 0, 0
|
|
|
|
hlcoord 0, 1
|
|
|
|
call CopyBytes
|
|
|
|
hlcoord 7, 0
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wTempMonMoves + 1]
|
2020-10-04 19:34:50 -07:00
|
|
|
call PlaceMoveNameString
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 7, 2
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wTempMonMoves + 2]
|
2020-10-04 19:34:50 -07:00
|
|
|
call PlaceMoveNameString
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 7, 4
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wTempMonMoves + 3]
|
2020-10-04 19:34:50 -07:00
|
|
|
call PlaceMoveNameString
|
2015-11-30 08:04:14 -08:00
|
|
|
hlcoord 7, 7
|
2020-10-04 19:34:50 -07:00
|
|
|
ld de, PrintParty_StatsString
|
2015-11-30 08:04:14 -08:00
|
|
|
call PlaceString
|
|
|
|
hlcoord 16, 7
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wTempMonAttack
|
2015-11-30 08:04:14 -08:00
|
|
|
call .PrintTempMonStats
|
|
|
|
hlcoord 16, 9
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wTempMonDefense
|
2015-11-30 08:04:14 -08:00
|
|
|
call .PrintTempMonStats
|
|
|
|
hlcoord 16, 11
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wTempMonSpclAtk
|
2015-11-30 08:04:14 -08:00
|
|
|
call .PrintTempMonStats
|
|
|
|
hlcoord 16, 13
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wTempMonSpclDef
|
2015-11-30 08:04:14 -08:00
|
|
|
call .PrintTempMonStats
|
|
|
|
hlcoord 16, 15
|
2018-01-23 14:39:09 -08:00
|
|
|
ld de, wTempMonSpeed
|
2015-11-30 08:04:14 -08:00
|
|
|
call .PrintTempMonStats
|
|
|
|
call WaitBGMap
|
2023-07-26 08:01:20 -07:00
|
|
|
ld b, CGB_STATS_SCREEN_HP_PALS
|
|
|
|
call GetCGBLayout
|
2024-02-10 15:16:00 -08:00
|
|
|
call SetDefaultBGPAndOBP
|
2015-11-30 08:04:14 -08:00
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
.PrintTempMonStats:
|
2015-11-30 08:04:14 -08:00
|
|
|
lb bc, 2, 3
|
|
|
|
call PrintNum
|
|
|
|
ret
|
|
|
|
|
2020-10-04 19:34:50 -07:00
|
|
|
GetCurPartyMonName:
|
2015-11-30 08:04:14 -08:00
|
|
|
ld bc, NAME_LENGTH
|
2018-01-23 14:39:09 -08:00
|
|
|
ld a, [wCurPartyMon]
|
2015-11-30 08:04:14 -08:00
|
|
|
call AddNTimes
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
|
|
|
ret
|
|
|
|
|
2020-10-04 19:34:50 -07:00
|
|
|
PlaceMoveNameString:
|
2015-11-30 08:04:14 -08:00
|
|
|
and a
|
|
|
|
jr z, .no_move
|
|
|
|
|
2020-12-23 13:29:30 -08:00
|
|
|
ld [wNamedObjectIndex], a
|
2015-11-30 08:04:14 -08:00
|
|
|
call GetMoveName
|
|
|
|
jr .got_string
|
|
|
|
|
|
|
|
.no_move
|
2020-10-04 19:34:50 -07:00
|
|
|
ld de, PrintParty_NoMoveString
|
2015-11-30 08:04:14 -08:00
|
|
|
|
|
|
|
.got_string
|
|
|
|
call PlaceString
|
|
|
|
ret
|
|
|
|
|
2020-10-04 19:34:50 -07:00
|
|
|
PlaceGenderAndShininess:
|
2018-01-16 11:30:10 -08:00
|
|
|
farcall GetGender
|
2015-11-30 08:04:14 -08:00
|
|
|
ld a, " "
|
|
|
|
jr c, .got_gender
|
|
|
|
ld a, "♂"
|
|
|
|
jr nz, .got_gender
|
|
|
|
ld a, "♀"
|
|
|
|
|
|
|
|
.got_gender
|
|
|
|
hlcoord 17, 2
|
|
|
|
ld [hl], a
|
2018-01-23 14:39:09 -08:00
|
|
|
ld bc, wTempMonDVs
|
2017-12-24 09:47:30 -08:00
|
|
|
farcall CheckShininess
|
2015-11-30 08:04:14 -08:00
|
|
|
ret nc
|
|
|
|
hlcoord 18, 2
|
2018-01-18 23:30:19 -08:00
|
|
|
ld [hl], "⁂"
|
2015-11-30 08:04:14 -08:00
|
|
|
ret
|
|
|
|
|
2020-10-04 19:34:50 -07:00
|
|
|
PrintParty_OTString:
|
2015-11-30 08:04:14 -08:00
|
|
|
db "OT/@"
|
|
|
|
|
2020-10-04 19:34:50 -07:00
|
|
|
PrintParty_MoveString:
|
2015-11-30 08:04:14 -08:00
|
|
|
db "MOVE@"
|
|
|
|
|
2020-10-04 19:34:50 -07:00
|
|
|
PrintParty_IDNoString:
|
2015-11-30 08:04:14 -08:00
|
|
|
db "<ID>№.@"
|
|
|
|
|
2020-10-04 19:34:50 -07:00
|
|
|
PrintParty_StatsString:
|
2015-11-30 08:04:14 -08:00
|
|
|
db "ATTACK"
|
|
|
|
next "DEFENSE"
|
|
|
|
next "SPCL.ATK"
|
|
|
|
next "SPCL.DEF"
|
|
|
|
next "SPEED"
|
|
|
|
db "@"
|
|
|
|
|
2020-10-04 19:34:50 -07:00
|
|
|
PrintParty_NoMoveString:
|
2015-11-30 08:04:14 -08:00
|
|
|
db "------------@"
|
2017-12-15 09:53:33 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
GBPrinterHPIcon:
|
2017-12-15 09:53:33 -08:00
|
|
|
INCBIN "gfx/printer/hp.1bpp"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
GBPrinterLvIcon:
|
2017-12-15 09:53:33 -08:00
|
|
|
INCBIN "gfx/printer/lv.1bpp"
|