mirror of
https://github.com/pret/pokeyellow.git
synced 2024-11-27 04:10:21 +00:00
Printer labels
This commit is contained in:
parent
48fce68a82
commit
9346a39a8a
@ -3,49 +3,49 @@ INCLUDE "engine/battle/link_battle_versus_text.asm"
|
||||
INCLUDE "engine/battle/unused_stats_functions.asm"
|
||||
INCLUDE "engine/battle/scroll_draw_trainer_pic.asm"
|
||||
|
||||
Func_f429f:: ; f429f (3d:429f)
|
||||
StarterPikachuBattleEntranceAnimation: ; f429f (3d:429f)
|
||||
coord hl, 0, 5
|
||||
ld c, $0
|
||||
.asm_f42a4
|
||||
ld c, 0
|
||||
.loop1
|
||||
inc c
|
||||
ld a, c
|
||||
cp $9
|
||||
cp 9
|
||||
ret z
|
||||
ld d, $5b
|
||||
ld d, 7 * 13
|
||||
push bc
|
||||
push hl
|
||||
.asm_f42ad
|
||||
call Func_f42c2
|
||||
.loop2
|
||||
call .PlaceColumn
|
||||
dec hl
|
||||
ld a, d
|
||||
sub $7
|
||||
sub 7
|
||||
ld d, a
|
||||
dec c
|
||||
jr nz, .asm_f42ad
|
||||
ld c, $2
|
||||
jr nz, .loop2
|
||||
ld c, 2
|
||||
call DelayFrames
|
||||
pop hl
|
||||
pop bc
|
||||
inc hl
|
||||
jr .asm_f42a4
|
||||
jr .loop1
|
||||
|
||||
Func_f42c2:: ; f42c2 (3d:f42c2)
|
||||
.PlaceColumn: ; f42c2 (3d:f42c2)
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
ld e, $7
|
||||
.loop
|
||||
ld e, 7
|
||||
.loop3
|
||||
ld a, d
|
||||
cp $31
|
||||
jr nc, .asm_f42ce
|
||||
cp 7 * 7
|
||||
jr nc, .okay
|
||||
ld a, $7f
|
||||
.asm_f42ce
|
||||
.okay
|
||||
ld [hl], a
|
||||
ld bc, $14
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
inc d
|
||||
dec e
|
||||
jr nz, .loop
|
||||
jr nz, .loop3
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
@ -172,56 +172,56 @@ PikachuMoods: ; f43a6 (3d:43a6)
|
||||
db $6c ; Unknown (d = 10)
|
||||
db $00 ; Unknown (d = 11)
|
||||
|
||||
RedPicBack:: INCBIN "pic/trainer/redb.pic"
|
||||
OldManPic:: INCBIN "pic/trainer/oldman.pic"
|
||||
ProfOakPicBack:: INCBIN "pic/ytrainer/prof.oakb.pic"
|
||||
RedPicBack: INCBIN "pic/trainer/redb.pic"
|
||||
OldManPic: INCBIN "pic/trainer/oldman.pic"
|
||||
ProfOakPicBack: INCBIN "pic/ytrainer/prof.oakb.pic"
|
||||
|
||||
Func_f453f:: ; f453f (3d:453f)
|
||||
LoadYellowTitleScreenGFX: ; f453f (3d:453f)
|
||||
ld hl, PokemonLogoGraphics
|
||||
ld de, vChars2
|
||||
ld bc, $730
|
||||
ld bc, 115 * $10
|
||||
ld a, BANK(PokemonLogoGraphics) ; redundant because this function is in bank3d
|
||||
call FarCopyData
|
||||
ld hl, YellowLogoGraphics+$230
|
||||
ld de, vChars0+$fd0
|
||||
ld bc, $30
|
||||
ld hl, YellowLogoGraphics + 35 * $10
|
||||
ld de, vChars0 + 253 * $10
|
||||
ld bc, 3 * $10
|
||||
ld a, BANK(YellowLogoGraphics)
|
||||
call FarCopyData
|
||||
ld hl, YellowLogoGraphics+$260
|
||||
ld hl, YellowLogoGraphics + 38 * $10
|
||||
ld de, vChars1
|
||||
ld bc, $400
|
||||
ld bc, 64 * $10
|
||||
ld a, BANK(YellowLogoGraphics)
|
||||
call FarCopyData
|
||||
ld hl, YellowLogoGraphics+$660
|
||||
ld de, vChars0+$f00
|
||||
ld bc, $c0
|
||||
ld hl, YellowLogoGraphics + 102 * $10
|
||||
ld de, vChars0 + 240 * $10
|
||||
ld bc, 12 * $10
|
||||
ld a, BANK(YellowLogoGraphics)
|
||||
call FarCopyData
|
||||
ret
|
||||
|
||||
Func_f4578:: ; f4578 (3d:4578)
|
||||
TitleScreen_PlacePokemonLogo: ; f4578 (3d:4578)
|
||||
coord hl, 2, 1
|
||||
ld de, Pointer_f45f9
|
||||
ld bc, 7 << 8 | 16 ; 16x7 (xy)
|
||||
call CopyScreenArea
|
||||
ld de, TitleScreenPokemonLogoTilemap
|
||||
lb bc, 7, 16
|
||||
call Bank3D_CopyBox
|
||||
ret
|
||||
|
||||
Func_f4585:: ; f4585 (3d:4585)
|
||||
TitleScreen_PlacePikaSpeechBubble: ; f4585 (3d:4585)
|
||||
coord hl, 6, 4
|
||||
ld de, Pointer_f4673
|
||||
ld bc, 4 << 8 | 7 ; 7x4 (xy)
|
||||
call CopyScreenArea
|
||||
ld de, TitleScreenPikaBubbleTilemap
|
||||
lb bc, 4, 7
|
||||
call Bank3D_CopyBox
|
||||
coord hl, 9, 8
|
||||
ld [hl], $64
|
||||
inc hl
|
||||
ld [hl], $65
|
||||
ret
|
||||
|
||||
Func_f459a:: ; f459a (3d:459a)
|
||||
TitleScreen_PlacePikachu: ; f459a (3d:459a)
|
||||
coord hl, 4, 8
|
||||
ld de, Pointer_f468f
|
||||
ld bc, 9 << 8 | 12 ; 12x9 (xy)
|
||||
call CopyScreenArea
|
||||
ld de, TitleScreenPikachuTilemap
|
||||
lb bc, 9, 12
|
||||
call Bank3D_CopyBox
|
||||
coord hl, 16, 10
|
||||
ld [hl], $96
|
||||
coord hl, 16, 11
|
||||
@ -230,13 +230,13 @@ Func_f459a:: ; f459a (3d:459a)
|
||||
ld [hl], $a7
|
||||
coord hl, 16, 13
|
||||
ld [hl], $b1
|
||||
ld hl, Pointer_f45c7
|
||||
ld hl, TitleScreenPikachuEyesOAMData
|
||||
ld de, wOAMBuffer
|
||||
ld bc, $20
|
||||
call CopyData
|
||||
ret
|
||||
|
||||
Pointer_f45c7: ; f45c7 (3d:45c7)
|
||||
TitleScreenPikachuEyesOAMData: ; f45c7 (3d:45c7)
|
||||
db $60, $40, $f1, $22
|
||||
db $60, $48, $f0, $22
|
||||
db $68, $40, $f3, $22
|
||||
@ -246,25 +246,26 @@ Pointer_f45c7: ; f45c7 (3d:45c7)
|
||||
db $68, $60, $f2, $02
|
||||
db $68, $68, $f3, $02
|
||||
|
||||
CopyScreenArea:: ; f45e7 (3d:45e7)
|
||||
Bank3D_CopyBox: ; f45e7 (3d:45e7)
|
||||
; copy cxb (xy) screen area from de to hl
|
||||
.row
|
||||
push bc
|
||||
push hl
|
||||
.loop
|
||||
.col
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .loop
|
||||
jr nz, .col
|
||||
pop hl
|
||||
ld bc, $14
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, CopyScreenArea
|
||||
jr nz, .row
|
||||
ret
|
||||
|
||||
Pointer_f45f9: ; f45f9 (3d:45f9)
|
||||
TitleScreenPokemonLogoTilemap: ; f45f9 (3d:45f9)
|
||||
; 16x7 (xy)
|
||||
db $f4, $f4, $f4, $f4, $f4, $f4, $49, $f4, $72, $30, $f4, $f4, $f4, $f4, $f4, $f4
|
||||
db $fd, $01, $02, $03, $04, $05, $06, $07, $08, $09, $0a, $0b, $f4, $0d, $0e, $0f
|
||||
@ -274,17 +275,18 @@ Pointer_f45f9: ; f45f9 (3d:45f9)
|
||||
db $f4, $41, $42, $43, $44, $45, $46, $47, $48, $f4, $4a, $4b, $4c, $4d, $4e, $4f
|
||||
db $f4, $6a, $6b, $6c, $6d, $f4, $f4, $f4, $f4, $f4, $f4, $6e, $6f, $70, $71, $f4
|
||||
|
||||
Pointer_f4669:: ; f4669 (3d:4669)
|
||||
Pointer_f4669: ; f4669 (3d:4669)
|
||||
; Unreferenced
|
||||
db $47, $48, $49, $4a, $4b, $4c, $4d, $4e, $4f, $5f
|
||||
|
||||
Pointer_f4673:: ; f4673 (3d:4673)
|
||||
TitleScreenPikaBubbleTilemap: ; f4673 (3d:4673)
|
||||
; 7x4 (xy)
|
||||
db $24, $25, $66, $67, $68, $69, $2a
|
||||
db $50, $51, $52, $53, $54, $55, $56
|
||||
db $57, $58, $59, $5a, $5b, $5c, $5d
|
||||
db $6d, $5e, $5f, $60, $61, $62, $63
|
||||
|
||||
Pointer_f468f:: ; f468f (3d:468f)
|
||||
TitleScreenPikachuTilemap: ; f468f (3d:468f)
|
||||
; 12x9 (xy)
|
||||
db $80, $81, $82, $83, $00, $00, $00, $00, $84, $85, $86, $87
|
||||
db $88, $89, $8a, $8b, $8c, $8d, $8d, $8e, $8f, $8a, $90, $91
|
||||
@ -298,15 +300,17 @@ Pointer_f468f:: ; f468f (3d:468f)
|
||||
|
||||
; f46f9 (3d:46f9)
|
||||
PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.2bpp"
|
||||
PokemonLogoGraphicsEnd:
|
||||
YellowLogoGraphics: INCBIN "gfx/yellow_titlescreen.2bpp"
|
||||
YellowLogoGraphicsEnd:
|
||||
|
||||
INCLUDE "engine/menu/link_menu.asm"
|
||||
|
||||
HandleMenuInputDouble:: ; f5a40 (3d:5a40)
|
||||
HandleMenuInputDouble: ; f5a40 (3d:5a40)
|
||||
xor a
|
||||
ld [wPartyMenuAnimMonEnabled], a
|
||||
|
||||
HandleMenuInputPokemonSelectionDouble:: ; f5a44 (3d:5a44)
|
||||
HandleMenuInputPokemonSelectionDouble: ; f5a44 (3d:5a44)
|
||||
ld a, [H_DOWNARROWBLINKCNT1]
|
||||
push af
|
||||
ld a, [H_DOWNARROWBLINKCNT2]
|
||||
@ -318,7 +322,7 @@ HandleMenuInputPokemonSelectionDouble:: ; f5a44 (3d:5a44)
|
||||
.loop1
|
||||
xor a
|
||||
ld [wAnimCounter], a ; counter for pokemon shaking animation
|
||||
call Func_f5ab0
|
||||
call .UpdateCursorTile
|
||||
call JoypadLowSensitivity
|
||||
ld a, [hJoy5]
|
||||
and a ; was a key pressed?
|
||||
@ -376,7 +380,7 @@ HandleMenuInputPokemonSelectionDouble:: ; f5a44 (3d:5a44)
|
||||
ld a, [hJoy5]
|
||||
ret
|
||||
|
||||
Func_f5ab0:: ; f5ab0 (3d:5ab0)
|
||||
.UpdateCursorTile: ; f5ab0 (3d:5ab0)
|
||||
ld a, [wTopMenuItemY]
|
||||
and a
|
||||
jr z, .asm_f5ac0
|
||||
@ -427,12 +431,12 @@ Func_f5ab0:: ; f5ab0 (3d:5ab0)
|
||||
ld a, l
|
||||
ld [wMenuCursorLocation], a
|
||||
ld a, h
|
||||
ld [wMenuCursorLocation+1], a
|
||||
ld [wMenuCursorLocation + 1], a
|
||||
ld a, [wCurrentMenuItem]
|
||||
ld [wLastMenuItem], a
|
||||
ret
|
||||
|
||||
PrintStrengthTxt:: ; f5b06 (3d:5b06)
|
||||
PrintStrengthTxt: ; f5b06 (3d:5b06)
|
||||
ld hl, wd728
|
||||
set 0, [hl]
|
||||
ld hl, Text_f5b17
|
||||
@ -440,7 +444,7 @@ PrintStrengthTxt:: ; f5b06 (3d:5b06)
|
||||
ld hl, Text_f5b28
|
||||
jp PrintText
|
||||
|
||||
Text_f5b17:: ; f5b17 (3d:5b17)
|
||||
Text_f5b17: ; f5b17 (3d:5b17)
|
||||
TX_FAR _UsedStrengthText ; 2d:417e
|
||||
TX_ASM
|
||||
ld a, [wcf91]
|
||||
@ -448,11 +452,11 @@ Text_f5b17:: ; f5b17 (3d:5b17)
|
||||
call Delay3
|
||||
jp TextScriptEnd
|
||||
|
||||
Text_f5b28:: ; f5b28 (3d:5b28)
|
||||
Text_f5b28: ; f5b28 (3d:5b28)
|
||||
TX_FAR _CanMoveBouldersText ; 2d:4193
|
||||
db "@"
|
||||
|
||||
CheckForForcedBikeSurf:: ; f5b2d (3d:5b2d)
|
||||
CheckForForcedBikeSurf: ; f5b2d (3d:5b2d)
|
||||
ld hl, wd728
|
||||
set 1, [hl]
|
||||
ld a, [wd732]
|
||||
@ -476,19 +480,19 @@ CheckForForcedBikeSurf:: ; f5b2d (3d:5b2d)
|
||||
ld hl, CyclingIsFunText
|
||||
jp PrintText
|
||||
|
||||
CoordsData_f5b64:: ; f5b64 (3d:5b64)
|
||||
CoordsData_f5b64: ; f5b64 (3d:5b64)
|
||||
db 11, 07
|
||||
db $ff
|
||||
|
||||
CurrentTooFastText:: ; f5b67 (3d:5b67)
|
||||
CurrentTooFastText: ; f5b67 (3d:5b67)
|
||||
TX_FAR _CurrentTooFastText ; 2d:41ab
|
||||
db "@"
|
||||
|
||||
CyclingIsFunText:: ; f5b6c (3d:5b6c)
|
||||
CyclingIsFunText: ; f5b6c (3d:5b6c)
|
||||
TX_FAR _CyclingIsFunText ; 2d:41ca
|
||||
db "@"
|
||||
|
||||
AddItemToInventory_:: ; f5b70 (3d:5b70)
|
||||
AddItemToInventory_: ; f5b70 (3d:5b70)
|
||||
ld a, [wItemQuantity] ; a = item quantity
|
||||
push af
|
||||
push bc
|
||||
@ -640,7 +644,7 @@ BlankLeaderNames: INCBIN "gfx/blank_leader_names.2bpp"
|
||||
CircleTile: INCBIN "gfx/circle_tile.2bpp"
|
||||
BadgeNumbersTileGraphics: INCBIN "gfx/badge_numbers.2bpp"
|
||||
|
||||
ReadSuperRodData:: ; f5ea4 (3d:5ea4)
|
||||
ReadSuperRodData: ; f5ea4 (3d:5ea4)
|
||||
ld a, [wCurMap]
|
||||
ld c, a
|
||||
ld hl, FishingSlots
|
||||
|
@ -1898,7 +1898,7 @@ SendOutMon: ; 3ccfb (f:4cfb)
|
||||
ld [H_WHOSETURN], a
|
||||
ld a, $1
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
callab Func_f429f
|
||||
callab StarterPikachuBattleEntranceAnimation
|
||||
callab IsPlayerPikachuAsleepInParty
|
||||
ld e, $24
|
||||
jr c, .asm_3cd81
|
||||
|
@ -82,11 +82,11 @@ Func_e9ad3:
|
||||
ld de, Tilemap_e9b3e
|
||||
coord hl, 6, 2
|
||||
lb bc, 10, 12
|
||||
call Func_e925d
|
||||
call Diploma_Surfing_CopyBox
|
||||
ld de, Tilemap_e9bb6
|
||||
coord hl, 5, 13
|
||||
lb bc, 1, 11
|
||||
call Func_e925d
|
||||
call Diploma_Surfing_CopyBox
|
||||
ld de, String_e9bd5
|
||||
coord hl, 2, 15
|
||||
call PlaceString
|
||||
@ -105,7 +105,7 @@ Func_e9ad3:
|
||||
ld de, TileMap_e9bc1
|
||||
coord hl, 2, 0
|
||||
lb bc, 4, 5
|
||||
call Func_e925d
|
||||
call Diploma_Surfing_CopyBox
|
||||
ret
|
||||
|
||||
Tilemap_e9b3e:
|
||||
|
@ -204,7 +204,7 @@ ExitBillsPC: ; 2153e (8:553e)
|
||||
ret
|
||||
|
||||
BillsPCPrintBox: ; 21562 (8:5562)
|
||||
callab Func_e8d35
|
||||
callab PrintPCBox
|
||||
jp BillsPCMenu
|
||||
|
||||
BillsPCDeposit: ; 2156d (8:556d)
|
||||
|
@ -13,7 +13,7 @@ ShowPokedexMenu: ; 40000 (10:4000)
|
||||
ld [hJoy7], a
|
||||
.setUpGraphics
|
||||
callab LoadPokedexTilePatterns
|
||||
.asm_40025
|
||||
.loop
|
||||
ld b, SET_PAL_GENERIC
|
||||
call RunPaletteCommand
|
||||
.doPokemonListMenu
|
||||
@ -44,6 +44,7 @@ ShowPokedexMenu: ; 40000 (10:4000)
|
||||
call GBPalWhiteOutWithDelay3
|
||||
call RunDefaultPaletteCommand
|
||||
jp ReloadMapData
|
||||
|
||||
.goToSideMenu
|
||||
call HandlePokedexSideMenu
|
||||
dec b
|
||||
@ -51,7 +52,7 @@ ShowPokedexMenu: ; 40000 (10:4000)
|
||||
dec b
|
||||
jr z, .doPokemonListMenu ; if pokemon not seen or player pressed B button
|
||||
dec b
|
||||
jr z, .asm_40025
|
||||
jr z, .loop
|
||||
jp .setUpGraphics ; if pokemon data or area was shown
|
||||
|
||||
; handles the menu on the lower right in the pokedex screen
|
||||
@ -133,6 +134,7 @@ HandlePokedexSideMenu: ; 40070 (10:4070)
|
||||
call DrawTileLine ; cover up the menu cursor in the pokemon list
|
||||
pop bc
|
||||
ret
|
||||
|
||||
.buttonBPressed
|
||||
push bc
|
||||
coord hl, 15, 8
|
||||
@ -141,20 +143,24 @@ HandlePokedexSideMenu: ; 40070 (10:4070)
|
||||
call DrawTileLine ; cover up the menu cursor in the side menu
|
||||
pop bc
|
||||
jr .exitSideMenu
|
||||
|
||||
.choseData
|
||||
call ShowPokedexDataInternal
|
||||
ld b, 0
|
||||
jr .exitSideMenu
|
||||
|
||||
; play pokemon cry
|
||||
.choseCry
|
||||
ld a, [wd11e]
|
||||
call GetCryData
|
||||
call PlaySound
|
||||
jr .handleMenuInput
|
||||
|
||||
.choseArea
|
||||
predef LoadTownMap_Nest ; display pokemon areas
|
||||
ld b, 0
|
||||
jr .exitSideMenu
|
||||
|
||||
.chosePrint
|
||||
ld a, [hTilesetType]
|
||||
push af
|
||||
@ -162,7 +168,7 @@ HandlePokedexSideMenu: ; 40070 (10:4070)
|
||||
ld [hTilesetType], a
|
||||
ld a, [wd11e]
|
||||
ld [wcf91], a
|
||||
callab Func_e8b74
|
||||
callab PrintPokedexEntry
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call ClearScreen
|
||||
@ -174,17 +180,17 @@ HandlePokedexSideMenu: ; 40070 (10:4070)
|
||||
; handles the list of pokemon on the left of the pokedex screen
|
||||
; sets carry flag if player presses A, unsets carry flag if player presses B
|
||||
HandlePokedexListMenu: ; 40140 (10:4140)
|
||||
call Func_401c2
|
||||
call Pokedex_DrawInterface
|
||||
.loop
|
||||
call Func_4027c
|
||||
call Pokedex_PlacePokemonList
|
||||
call GBPalNormal
|
||||
call HandleMenuInput
|
||||
bit 1, a ; was the B button pressed?
|
||||
bit BIT_B_BUTTON, a ; was the B button pressed?
|
||||
jp nz, .buttonBPressed
|
||||
bit 0, a ; was the A button pressed?
|
||||
bit BIT_A_BUTTON, a ; was the A button pressed?
|
||||
jp nz, .buttonAPressed
|
||||
.checkIfUpPressed
|
||||
bit 6, a ; was Up pressed?
|
||||
bit BIT_D_UP, a ; was Up pressed?
|
||||
jr z, .checkIfDownPressed
|
||||
.upPressed ; scroll up one row
|
||||
ld a, [wListScrollOffset]
|
||||
@ -193,8 +199,9 @@ HandlePokedexListMenu: ; 40140 (10:4140)
|
||||
dec a
|
||||
ld [wListScrollOffset], a
|
||||
jp .loop
|
||||
|
||||
.checkIfDownPressed
|
||||
bit 7, a ; was Down pressed?
|
||||
bit BIT_D_DOWN, a ; was Down pressed?
|
||||
jr z, .checkIfRightPressed
|
||||
.downPressed ; scroll down one row
|
||||
ld a, [wDexMaxSeenMon]
|
||||
@ -208,8 +215,9 @@ HandlePokedexListMenu: ; 40140 (10:4140)
|
||||
inc a
|
||||
ld [wListScrollOffset], a
|
||||
jp .loop
|
||||
|
||||
.checkIfRightPressed
|
||||
bit 4, a ; was Right pressed?
|
||||
bit BIT_D_RIGHT, a ; was Right pressed?
|
||||
jr z, .checkIfLeftPressed
|
||||
.rightPressed ; scroll down 7 rows
|
||||
ld a, [wDexMaxSeenMon]
|
||||
@ -226,8 +234,9 @@ HandlePokedexListMenu: ; 40140 (10:4140)
|
||||
ld a, b
|
||||
ld [wListScrollOffset], a
|
||||
jp .loop
|
||||
|
||||
.checkIfLeftPressed ; scroll up 7 rows
|
||||
bit 5, a ; was Left pressed?
|
||||
bit BIT_D_LEFT, a ; was Left pressed?
|
||||
jr z, .buttonAPressed
|
||||
.leftPressed
|
||||
ld a, [wListScrollOffset]
|
||||
@ -237,14 +246,16 @@ HandlePokedexListMenu: ; 40140 (10:4140)
|
||||
xor a
|
||||
ld [wListScrollOffset], a
|
||||
jp .loop
|
||||
|
||||
.buttonAPressed
|
||||
scf
|
||||
ret
|
||||
|
||||
.buttonBPressed
|
||||
and a
|
||||
ret
|
||||
|
||||
Func_401c2: ; 401c2 (10:41c2)
|
||||
Pokedex_DrawInterface: ; 401c2 (10:41c2)
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
; draw the horizontal line separating the seen and owned amounts from the menu
|
||||
@ -300,6 +311,7 @@ Func_401c2: ; 401c2 (10:41c2)
|
||||
dec c
|
||||
jr nz, .maxSeenPokemonInnerLoop
|
||||
jr .maxSeenPokemonLoop
|
||||
|
||||
.storeMaxSeenPokemon
|
||||
ld a, b
|
||||
ld [wDexMaxSeenMon], a
|
||||
@ -333,7 +345,7 @@ PokedexMenuItemsText: ; 40264 (10:4264)
|
||||
next "PRNT"
|
||||
next "QUIT@"
|
||||
|
||||
Func_4027c: ; 4027c (10:427c)
|
||||
Pokedex_PlacePokemonList: ; 4027c (10:427c)
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
coord hl, 4, 2
|
||||
@ -381,6 +393,7 @@ Func_4027c: ; 4027c (10:427c)
|
||||
jr nz, .getPokemonName ; if the player has seen the pokemon
|
||||
ld de, .dashedLine ; print a dashed line in place of the name if the player hasn't seen the pokemon
|
||||
jr .skipGettingName
|
||||
|
||||
.dashedLine ; for unseen pokemon in the list
|
||||
db "----------@"
|
||||
.getPokemonName
|
||||
@ -442,8 +455,8 @@ ShowPokedexDataInternal: ; 40323 (10:4323)
|
||||
call RunPaletteCommand
|
||||
pop af
|
||||
ld [wd11e], a
|
||||
call Func_4039c
|
||||
call c, Func_404ae
|
||||
call DrawDexEntryOnScreen
|
||||
call c, Pokedex_PrintFlavorTextAtRow11
|
||||
.waitForButtonPress
|
||||
call JoypadLowSensitivity
|
||||
ld a, [hJoy5]
|
||||
@ -461,6 +474,7 @@ ShowPokedexDataInternal: ; 40323 (10:4323)
|
||||
ld a, $77 ; max volume
|
||||
ld [rNR50], a
|
||||
ret
|
||||
|
||||
|
||||
HeightWeightText: ; 40370 (10:4370)
|
||||
db "HT ?", $60, "??", $61
|
||||
@ -478,22 +492,27 @@ PokedexDataDividerLine: ; 40387 (10:4387)
|
||||
db $6B, $69, $6B, $69, $6A
|
||||
db "@"
|
||||
|
||||
Func_4039c: ; 4039c (10:439c)
|
||||
DrawDexEntryOnScreen: ; 4039c (10:439c)
|
||||
call ClearScreen
|
||||
|
||||
coord hl, 0, 0
|
||||
ld de, 1
|
||||
lb bc, $64, SCREEN_WIDTH
|
||||
call DrawTileLine ; draw top border
|
||||
|
||||
coord hl, 0, 17
|
||||
ld b, $6f
|
||||
call DrawTileLine ; draw bottom border
|
||||
|
||||
coord hl, 0, 1
|
||||
ld de, 20
|
||||
lb bc, $66, $10
|
||||
call DrawTileLine ; draw left border
|
||||
|
||||
coord hl, 19, 1
|
||||
ld b, $67
|
||||
call DrawTileLine ; draw right border
|
||||
|
||||
ld a, $63 ; upper left corner tile
|
||||
Coorda 0, 0
|
||||
ld a, $65 ; upper right corner tile
|
||||
@ -501,16 +520,21 @@ Func_4039c: ; 4039c (10:439c)
|
||||
ld a, $6c ; lower left corner tile
|
||||
Coorda 0, 17
|
||||
ld a, $6e ; lower right corner tile
|
||||
|
||||
Coorda 19, 17
|
||||
coord hl, 0, 9
|
||||
|
||||
ld de, PokedexDataDividerLine
|
||||
call PlaceString ; draw horizontal divider line
|
||||
|
||||
coord hl, 9, 6
|
||||
ld de, HeightWeightText
|
||||
call PlaceString
|
||||
|
||||
call GetMonName
|
||||
coord hl, 9, 2
|
||||
call PlaceString
|
||||
|
||||
ld hl, PokedexEntryPointers
|
||||
ld a, [wd11e]
|
||||
dec a
|
||||
@ -521,14 +545,17 @@ Func_4039c: ; 4039c (10:439c)
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld d, [hl] ; de = address of pokedex entry
|
||||
|
||||
coord hl, 9, 4
|
||||
call PlaceString ; print species name
|
||||
|
||||
ld h, b
|
||||
ld l, c
|
||||
push de
|
||||
ld a, [wd11e]
|
||||
push af
|
||||
call IndexToPokedex
|
||||
|
||||
coord hl, 2, 8
|
||||
ld a, "№"
|
||||
ld [hli], a
|
||||
@ -537,6 +564,7 @@ Func_4039c: ; 4039c (10:439c)
|
||||
ld de, wd11e
|
||||
lb bc, LEADING_ZEROES | 1, 3
|
||||
call PrintNumber ; print pokedex number
|
||||
|
||||
ld hl, wPokedexOwned
|
||||
call IsPokemonBitSet
|
||||
pop af
|
||||
@ -544,10 +572,12 @@ Func_4039c: ; 4039c (10:439c)
|
||||
ld a, [wcf91]
|
||||
ld [wd0b5], a
|
||||
pop de
|
||||
|
||||
push af
|
||||
push bc
|
||||
push de
|
||||
push hl
|
||||
|
||||
call Delay3
|
||||
call GBPalNormal
|
||||
call GetMonHeader ; load pokemon picture location
|
||||
@ -555,13 +585,16 @@ Func_4039c: ; 4039c (10:439c)
|
||||
call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture
|
||||
ld a, [wcf91]
|
||||
call PlayCry ; play pokemon cry
|
||||
|
||||
pop hl
|
||||
pop de
|
||||
pop bc
|
||||
pop af
|
||||
|
||||
ld a, c
|
||||
and a
|
||||
ret z ; if the pokemon has not been owned, don't print the height, weight, or description
|
||||
|
||||
inc de ; de = address of feet (height)
|
||||
ld a, [de] ; reads feet, but a is overwritten without being used
|
||||
coord hl, 12, 6
|
||||
@ -617,9 +650,9 @@ Func_4039c: ; 4039c (10:439c)
|
||||
scf
|
||||
ret
|
||||
|
||||
Func_404ae: ; 404ae (10:44ae)
|
||||
Pokedex_PrintFlavorTextAtRow11: ; 404ae (10:44ae)
|
||||
coord bc, 1, 11
|
||||
Func_404b1: ; 404b1 (10:44b1)
|
||||
Pokedex_PrintFlavorTextAtBC: ; 404b1 (10:44b1)
|
||||
ld a, 2
|
||||
ld [$fff9], a
|
||||
call TextCommandProcessor ; print pokedex description text
|
||||
@ -627,7 +660,7 @@ Func_404b1: ; 404b1 (10:44b1)
|
||||
ld [$fff9], a
|
||||
ret
|
||||
|
||||
Func_404bc: ; 404bc (10:44bc)
|
||||
Pokedex_PrepareDexEntryForPrinting: ; 404bc (10:44bc)
|
||||
coord hl, 0, 0
|
||||
ld de, SCREEN_WIDTH
|
||||
lb bc, $66, $d
|
||||
@ -643,19 +676,20 @@ Func_404bc: ; 404bc (10:44bc)
|
||||
Coorda 0, 13
|
||||
ld a, $6e
|
||||
Coorda 19, 13
|
||||
ld a, [wOverworldMap+$40d]
|
||||
ld a, [wPrinterPokedexEntryTextPointer]
|
||||
ld l, a
|
||||
ld a, [wOverworldMap+$40e]
|
||||
ld a, [wPrinterPokedexEntryTextPointer + 1]
|
||||
ld h, a
|
||||
coord bc, 1, 1
|
||||
ld a, [hFlags_0xFFFA]
|
||||
set 3, a
|
||||
ld [hFlags_0xFFFA], a
|
||||
call Func_404b1
|
||||
call Pokedex_PrintFlavorTextAtBC
|
||||
ld a, [hFlags_0xFFFA]
|
||||
res 3, a
|
||||
ld [hFlags_0xFFFA], a
|
||||
ret
|
||||
|
||||
|
||||
; draws a line of tiles
|
||||
; INPUT:
|
||||
@ -714,4 +748,4 @@ IndexToPokedex: ; 4109d (10:509d)
|
||||
pop bc
|
||||
ret
|
||||
|
||||
INCLUDE "data/pokedex_order.asm"
|
||||
INCLUDE "data/pokedex_order.asm"
|
||||
|
@ -16,9 +16,9 @@ SetDefaultNames: ; 5e27 (1:5e27)
|
||||
xor a
|
||||
call FillMemory
|
||||
xor a
|
||||
ld [wd495], a
|
||||
ld [wd496], a
|
||||
ld [wd497], a
|
||||
ld [wSurfingMinigameHiScore], a
|
||||
ld [wSurfingMinigameHiScore + 1], a
|
||||
ld [wSurfingMinigameHiScore + 2], a
|
||||
pop af
|
||||
ld [wPrinterSettings], a
|
||||
pop af
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
INCLUDE "engine/printer/serial.asm"
|
||||
|
||||
Func_e8b74: ; e8b74 (3a:4b74)
|
||||
PrintPokedexEntry: ; e8b74 (3a:4b74)
|
||||
ld a, [wUpdateSpritesEnabled]
|
||||
push af
|
||||
xor a
|
||||
@ -26,29 +26,29 @@ Func_e8b74: ; e8b74 (3a:4b74)
|
||||
ld [rIE], a
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Func_e8c30
|
||||
call Func_e8785
|
||||
ld a, [wcaf9]
|
||||
call Printer_GetDexEntryRegisters
|
||||
call Printer_StartTransmission
|
||||
ld a, [wPrinterPokedexMonIsOwned]
|
||||
and a
|
||||
jr z, .asm_e8b9e
|
||||
ld a, $10
|
||||
jr .asm_e8ba0
|
||||
jr z, .not_caught
|
||||
ld a, 16
|
||||
jr .got_size
|
||||
|
||||
.asm_e8b9e
|
||||
ld a, $13
|
||||
.asm_e8ba0
|
||||
.not_caught
|
||||
ld a, 19
|
||||
.got_size
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
call ClearScreen
|
||||
callab Func_401c2
|
||||
callab Func_4027c
|
||||
callab Pokedex_DrawInterface
|
||||
callab Pokedex_PlacePokemonList
|
||||
ld a, $1
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Func_e8c0c
|
||||
jr c, .asm_e8bf4
|
||||
ld a, [wcaf9]
|
||||
call .TryPrintPage
|
||||
jr c, .finish_printing
|
||||
ld a, [wPrinterPokedexMonIsOwned]
|
||||
and a
|
||||
jr z, .asm_e8bf4
|
||||
jr z, .finish_printing
|
||||
xor a
|
||||
ld [wPrinterConnectionOpen], a
|
||||
ld [wPrinterOpcode], a
|
||||
@ -57,17 +57,17 @@ Func_e8b74: ; e8b74 (3a:4b74)
|
||||
call SaveScreenTilesToBuffer1
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Func_e8c50
|
||||
call Printer_PrepareDexEntryForPrinting
|
||||
ld a, $7
|
||||
call Func_e8785
|
||||
call Printer_StartTransmission
|
||||
ld a, $3
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
call LoadScreenTilesFromBuffer1
|
||||
ld a, $1
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Func_e8c0c
|
||||
.asm_e8bf4
|
||||
call .TryPrintPage
|
||||
.finish_printing
|
||||
xor a
|
||||
ld [wPrinterConnectionOpen], a
|
||||
ld [wPrinterOpcode], a
|
||||
@ -81,83 +81,83 @@ Func_e8b74: ; e8b74 (3a:4b74)
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
ret
|
||||
|
||||
Func_e8c0c:
|
||||
.TryPrintPage:
|
||||
call Printer_ResetJoypadHRAM
|
||||
.asm_e8c0f
|
||||
.print_loop
|
||||
call JoypadLowSensitivity
|
||||
call Printer_CheckPressingB
|
||||
jr c, .asm_e8c2e
|
||||
jr c, .pressed_b
|
||||
ld a, [wPrinterSendState]
|
||||
bit 7, a
|
||||
jr nz, .asm_e8c2c
|
||||
call Func_e87a8
|
||||
jr nz, .completed
|
||||
call PrinterTransmissionJumptable
|
||||
call GBPrinter_CheckForErrors
|
||||
call GBPrinter_UpdateStatusMessage
|
||||
call DelayFrame
|
||||
jr .asm_e8c0f
|
||||
jr .print_loop
|
||||
|
||||
.asm_e8c2c
|
||||
.completed
|
||||
and a
|
||||
ret
|
||||
|
||||
.asm_e8c2e
|
||||
.pressed_b
|
||||
scf
|
||||
ret
|
||||
|
||||
Func_e8c30:
|
||||
callab Func_4039c
|
||||
Printer_GetDexEntryRegisters:
|
||||
callab DrawDexEntryOnScreen
|
||||
ld a, l
|
||||
ld [wcaf5], a
|
||||
ld [wPrinterPokedexEntryTextPointer], a
|
||||
ld a, h
|
||||
ld [wcaf6], a
|
||||
ld [wPrinterPokedexEntryTextPointer + 1], a
|
||||
ld a, $0
|
||||
rla ; copy carry flag state to bit 0
|
||||
ld [wcaf9], a
|
||||
ld [wPrinterPokedexMonIsOwned], a
|
||||
and a
|
||||
jr z, .asm_e8c4d
|
||||
jr z, .not_caught
|
||||
ld a, $5
|
||||
jr .asm_e8c4f
|
||||
jr .got_num_rows
|
||||
|
||||
.asm_e8c4d
|
||||
.not_caught
|
||||
ld a, $9
|
||||
.asm_e8c4f
|
||||
.got_num_rows
|
||||
ret
|
||||
|
||||
Func_e8c50:
|
||||
Printer_PrepareDexEntryForPrinting:
|
||||
call ClearScreen
|
||||
callab Func_404bc
|
||||
callab Pokedex_PrepareDexEntryForPrinting
|
||||
ret
|
||||
|
||||
Func_e8c5c:
|
||||
PrintSurfingMinigameHighScore:
|
||||
xor a
|
||||
ld [hCanceledPrinting], a
|
||||
call Printer_PlayPrinterMusic
|
||||
call Func_e910a
|
||||
call Printer_PrepareSurfingMinigameHighScoreTileMap
|
||||
ld a, [rIE]
|
||||
push af
|
||||
xor a
|
||||
ld [rIF], a
|
||||
ld a, $9
|
||||
ld [rIE], a
|
||||
call Func_e8783
|
||||
call StartTransmission_Send9Rows
|
||||
ld a, $13
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
call Printer_ResetJoypadHRAM
|
||||
.asm_e8c7d
|
||||
.loop
|
||||
call JoypadLowSensitivity
|
||||
call Printer_CheckPressingB
|
||||
jr c, .asm_e8c9a
|
||||
jr c, .quit
|
||||
ld a, [wPrinterSendState]
|
||||
bit 7, a
|
||||
jr nz, .asm_e8c9a
|
||||
call Func_e87a8
|
||||
jr nz, .quit
|
||||
call PrinterTransmissionJumptable
|
||||
call GBPrinter_CheckForErrors
|
||||
call GBPrinter_UpdateStatusMessage
|
||||
call DelayFrame
|
||||
jr .asm_e8c7d
|
||||
jr .loop
|
||||
|
||||
.asm_e8c9a
|
||||
.quit
|
||||
xor a
|
||||
ld [wPrinterConnectionOpen], a
|
||||
ld [wPrinterOpcode], a
|
||||
@ -170,7 +170,7 @@ Func_e8c5c:
|
||||
call Printer_PlayMapMusic
|
||||
ret
|
||||
|
||||
Func_e8cb1:
|
||||
PrintDiploma:
|
||||
xor a
|
||||
ld [hCanceledPrinting], a
|
||||
call Printer_PlayPrinterMusic
|
||||
@ -181,7 +181,7 @@ Func_e8cb1:
|
||||
ld [rIF], a
|
||||
ld a, $9
|
||||
ld [rIE], a
|
||||
call Func_e8783
|
||||
call StartTransmission_Send9Rows
|
||||
ld a, $10
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
@ -196,7 +196,7 @@ Func_e8cb1:
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Func_e9ad3
|
||||
call Func_e8783
|
||||
call StartTransmission_Send9Rows
|
||||
ld a, $3
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
@ -224,7 +224,7 @@ Func_e8d11:
|
||||
ld a, [wPrinterSendState]
|
||||
bit 7, a
|
||||
jr nz, .asm_e8d31
|
||||
call Func_e87a8
|
||||
call PrinterTransmissionJumptable
|
||||
call GBPrinter_CheckForErrors
|
||||
call GBPrinter_UpdateStatusMessage
|
||||
call DelayFrame
|
||||
@ -238,9 +238,7 @@ Func_e8d11:
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
|
||||
Func_e8d35:: ; e8d35 (3a:4e79)
|
||||
PrintPCBox:: ; e8d35 (3a:4e79)
|
||||
ld a, [wBoxDataStart]
|
||||
and a
|
||||
jp z, Func_e8df4
|
||||
@ -260,7 +258,7 @@ Func_e8d35:: ; e8d35 (3a:4e79)
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Func_e988a
|
||||
call Func_e8783
|
||||
call StartTransmission_Send9Rows
|
||||
ld a, $10
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
@ -275,7 +273,7 @@ Func_e8d35:: ; e8d35 (3a:4e79)
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Func_e98ec
|
||||
call Func_e8783
|
||||
call StartTransmission_Send9Rows
|
||||
ld a, $0
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
@ -290,7 +288,7 @@ Func_e8d35:: ; e8d35 (3a:4e79)
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Func_e9907
|
||||
call Func_e8783
|
||||
call StartTransmission_Send9Rows
|
||||
ld a, $0
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
@ -305,7 +303,7 @@ Func_e8d35:: ; e8d35 (3a:4e79)
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Func_e9922
|
||||
call Func_e8783
|
||||
call StartTransmission_Send9Rows
|
||||
ld a, $3
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
@ -339,7 +337,7 @@ Func_e8dfb: ; e8dfb
|
||||
ld a, [wPrinterSendState]
|
||||
bit 7, a
|
||||
jr nz, .asm_e8e1b
|
||||
call Func_e87a8
|
||||
call PrinterTransmissionJumptable
|
||||
call GBPrinter_CheckForErrors
|
||||
call GBPrinter_UpdateStatusMessage
|
||||
call DelayFrame
|
||||
@ -357,7 +355,7 @@ String_e8e1f: ; e8e1f
|
||||
TX_FAR _NoPokemonText
|
||||
db "@"
|
||||
|
||||
Func_e8e24: ; e8e24
|
||||
PrintFanClubPortrait: ; e8e24
|
||||
xor a
|
||||
ld [hCanceledPrinting], a
|
||||
call Printer_PlayPrinterMusic
|
||||
@ -368,7 +366,7 @@ Func_e8e24: ; e8e24
|
||||
ld [rIF], a
|
||||
ld a, $9
|
||||
ld [rIE], a
|
||||
call Func_e8783
|
||||
call StartTransmission_Send9Rows
|
||||
ld a, $13
|
||||
ld [wcae2], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
@ -380,7 +378,7 @@ Func_e8e24: ; e8e24
|
||||
ld a, [wPrinterSendState]
|
||||
bit 7, a
|
||||
jr nz, .asm_e8e62
|
||||
call Func_e87a8
|
||||
call PrinterTransmissionJumptable
|
||||
call GBPrinter_CheckForErrors
|
||||
call GBPrinter_UpdateStatusMessage
|
||||
call DelayFrame
|
||||
@ -411,23 +409,23 @@ Func_e8e79: ; e8e79 (3a:4e79)
|
||||
ld [rIF], a
|
||||
ld a, $9
|
||||
ld [rIE], a
|
||||
call Func_e8783
|
||||
call StartTransmission_Send9Rows
|
||||
ld a, $13
|
||||
ld [wcae2], a
|
||||
ld a, $1
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Printer_CopyTileMapToPrinterTileBuffer
|
||||
call Func_ea573
|
||||
.asm_e8e9c
|
||||
.loop
|
||||
ld a, [wPrinterSendState]
|
||||
bit 7, a
|
||||
jr nz, .asm_e8eae
|
||||
jr nz, .quit
|
||||
call Func_ea5d1
|
||||
call Func_ea5b7
|
||||
call DelayFrame
|
||||
jr .asm_e8e9c
|
||||
jr .loop
|
||||
|
||||
.asm_e8eae
|
||||
.quit
|
||||
xor a
|
||||
ld [wPrinterConnectionOpen], a
|
||||
ld [wPrinterOpcode], a
|
||||
@ -529,17 +527,17 @@ Printer_FadeOutMusicAndWait: ; e8f42 (3a:4f42)
|
||||
ret
|
||||
|
||||
GBPrinter_CheckForErrors: ; e8f51 (3a:4f51)
|
||||
ld a, [wc970]
|
||||
ld a, [wPrinterHandshake]
|
||||
cp $81
|
||||
jr z, .check_other_errors
|
||||
ld a, [wc971]
|
||||
ld a, [wPrinterStatusFlags]
|
||||
cp $ff
|
||||
jr z, .error2
|
||||
xor a
|
||||
jr .load_status
|
||||
|
||||
.check_other_errors
|
||||
ld a, [wc971]
|
||||
ld a, [wPrinterStatusFlags]
|
||||
and %11100000
|
||||
ret z
|
||||
bit 7, a
|
||||
@ -643,7 +641,7 @@ GBPrinter_UpdateStatusMessage:
|
||||
db "This is not the"
|
||||
next "Game Boy Printer!@"
|
||||
|
||||
Func_e910a:
|
||||
Printer_PrepareSurfingMinigameHighScoreTileMap:
|
||||
call GBPalWhiteOutWithDelay3
|
||||
call ClearScreen
|
||||
ld de, SurfingPikachu2Graphics
|
||||
@ -651,13 +649,13 @@ Func_e910a:
|
||||
lb bc, BANK(SurfingPikachu2Graphics), (SurfingPikachu2GraphicsEnd - SurfingPikachu2Graphics) / $10
|
||||
call CopyVideoData
|
||||
coord hl, 0, 0
|
||||
call Func_e91a9
|
||||
call .PlaceRowAlternatingTiles
|
||||
coord hl, 0, 17
|
||||
call Func_e91a9
|
||||
call .PlaceRowAlternatingTiles
|
||||
coord hl, 0, 0
|
||||
call Func_e91b5
|
||||
call .PlaceColumnAlternatingTiles
|
||||
coord hl, 19, 0
|
||||
call Func_e91b5
|
||||
call .PlaceColumnAlternatingTiles
|
||||
ld a, $4
|
||||
coord hl, 0, 0
|
||||
ld [hl], a
|
||||
@ -667,41 +665,41 @@ Func_e910a:
|
||||
ld [hl], a
|
||||
coord hl, 19, 17
|
||||
ld [hl], a
|
||||
ld de, Data_e91c4
|
||||
ld de, .Tilemap1
|
||||
coord hl, 10, 8
|
||||
lb bc, 3, 8
|
||||
call Func_e925d
|
||||
ld de, Data_e91dc
|
||||
call Diploma_Surfing_CopyBox
|
||||
ld de, .Tilemap2
|
||||
coord hl, 2, 11
|
||||
lb bc, 6, 16
|
||||
call Func_e925d
|
||||
ld de, String_e923c
|
||||
call Diploma_Surfing_CopyBox
|
||||
ld de, .PikachusBeachString
|
||||
coord hl, 3, 2
|
||||
call PlaceString
|
||||
ld de, String_e924b
|
||||
ld de, .HiScoreString
|
||||
coord hl, 9, 4
|
||||
call PlaceString
|
||||
ld de, String_e9256
|
||||
ld de, .PointsString
|
||||
coord hl, 12, 6
|
||||
call PlaceString
|
||||
ld de, wPlayerName
|
||||
ld hl, wPlayerName
|
||||
ld bc, 0
|
||||
.asm_e9182
|
||||
.find_end_of_name
|
||||
ld a, [hli]
|
||||
inc c
|
||||
cp "@"
|
||||
jr nz, .asm_e9182
|
||||
jr nz, .find_end_of_name
|
||||
ld a, 8
|
||||
sub c
|
||||
jr nc, .asm_e918e
|
||||
jr nc, .got_name_length
|
||||
xor a
|
||||
.asm_e918e
|
||||
.got_name_length
|
||||
ld c, a
|
||||
coord hl, 2, 4
|
||||
add hl, bc
|
||||
call PlaceString
|
||||
call Func_e926f
|
||||
call CopySurfingMinigameScore
|
||||
ld b, 8
|
||||
call RunPaletteCommand
|
||||
ld a, $1
|
||||
@ -710,35 +708,35 @@ Func_e910a:
|
||||
call GBPalNormal
|
||||
ret
|
||||
|
||||
Func_e91a9:
|
||||
.PlaceRowAlternatingTiles:
|
||||
ld c, SCREEN_WIDTH / 2
|
||||
.asm_e91ab
|
||||
.row_loop
|
||||
ld [hl], $0
|
||||
inc hl
|
||||
ld [hl], $1
|
||||
inc hl
|
||||
dec c
|
||||
jr nz, .asm_e91ab
|
||||
jr nz, .row_loop
|
||||
ret
|
||||
|
||||
Func_e91b5:
|
||||
.PlaceColumnAlternatingTiles:
|
||||
ld c, SCREEN_HEIGHT / 2
|
||||
ld de, SCREEN_WIDTH
|
||||
.asm_e91ba
|
||||
.col_loop
|
||||
ld [hl], $2
|
||||
add hl, de
|
||||
ld [hl], $3
|
||||
add hl, de
|
||||
dec c
|
||||
jr nz, .asm_e91ba
|
||||
jr nz, .col_loop
|
||||
ret
|
||||
Data_e91c4:
|
||||
|
||||
.Tilemap1:
|
||||
db $7f, $7f, $10, $11, $12, $13, $14, $15
|
||||
db $0f, $3c, $3d, $3e, $20, $21, $30, $31
|
||||
db $4c, $4d, $4e, $50, $34, $1a, $51, $2d
|
||||
|
||||
|
||||
Data_e91dc:
|
||||
.Tilemap2:
|
||||
db $7f, $7f, $7f, $7f, $7f, $7f, $16, $17, $18, $19, $7f, $1b, $1c, $1d, $1e, $1f
|
||||
db $7f, $7f, $22, $23, $24, $25, $26, $27, $28, $29, $2a, $2b, $2c, $7f, $2e, $2f
|
||||
db $7f, $7f, $32, $33, $33, $35, $36, $37, $38, $39, $3a, $3b, $7f, $7f, $7f, $3f
|
||||
@ -746,39 +744,38 @@ Data_e91dc:
|
||||
db $52, $52, $52, $53, $54, $55, $56, $57, $58, $59, $5a, $5b, $5c, $5d, $5d, $5e
|
||||
db $7f, $7f, $7f, $05, $06, $07, $08, $09, $0a, $0b, $0c, $0d, $0e, $7f, $7f, $7f
|
||||
|
||||
|
||||
String_e923c:
|
||||
.PikachusBeachString:
|
||||
db "Pikachu's Beach@"
|
||||
String_e924b:
|
||||
.HiScoreString:
|
||||
db "'s Hi-Score@"
|
||||
String_e9256:
|
||||
.PointsString:
|
||||
db "Points@"
|
||||
|
||||
Func_e925d:
|
||||
.asm_e925d
|
||||
Diploma_Surfing_CopyBox:
|
||||
.y
|
||||
push bc
|
||||
push hl
|
||||
.asm_e925f
|
||||
.x
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .asm_e925f
|
||||
jr nz, .x
|
||||
pop hl
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .asm_e925d
|
||||
jr nz, .y
|
||||
ret
|
||||
|
||||
Func_e926f:
|
||||
ld de, wd496
|
||||
CopySurfingMinigameScore:
|
||||
ld de, wSurfingMinigameHiScore + 1
|
||||
coord hl, 7, 6
|
||||
ld a, [de]
|
||||
call Func_e927a
|
||||
call .BCDConvertScore
|
||||
ld a, [de]
|
||||
Func_e927a:
|
||||
.BCDConvertScore:
|
||||
ld c, a
|
||||
swap a
|
||||
and $f
|
||||
@ -832,7 +829,6 @@ Func_e988a:
|
||||
call Func_e994e
|
||||
ret
|
||||
|
||||
|
||||
String_e98db: db "POKéMON LIST@"
|
||||
String_e98e8: db "BOX@"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Func_e8783: ; e8783 (3a:4783)
|
||||
StartTransmission_Send9Rows: ; e8783 (3a:4783)
|
||||
ld a, 9
|
||||
Func_e8785:
|
||||
Printer_StartTransmission:
|
||||
push af
|
||||
ld hl, wPrinterData
|
||||
ld bc, wPrinterDataEnd - wPrinterData
|
||||
@ -15,11 +15,11 @@ Func_e8785:
|
||||
ld a, [wPrinterSettings]
|
||||
ld [wPrinterSettingsTempCopy], a
|
||||
pop af
|
||||
ld [wcaf4], a
|
||||
ld [wPrinterQueueLength], a
|
||||
ret
|
||||
|
||||
; e87a8
|
||||
Func_e87a8: ; e87a8 (3a:47a8)
|
||||
PrinterTransmissionJumptable: ; e87a8 (3a:47a8)
|
||||
ld a, [wPrinterSendState]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
@ -33,25 +33,27 @@ Func_e87a8: ; e87a8 (3a:47a8)
|
||||
|
||||
.Jumptable:
|
||||
dw Printer_InitSerial ; 00
|
||||
dw Func_e88c9 ; 01
|
||||
dw Func_e88a6 ; 02
|
||||
dw Func_e881f ; 03
|
||||
dw Func_e8906 ; 04
|
||||
dw Func_e88b4 ; 05
|
||||
dw Func_e884b ; 06
|
||||
dw Func_e8906 ; 07
|
||||
dw Func_e88a6 ; 08
|
||||
dw Func_e8864 ; 09
|
||||
dw Func_e8906 ; 0a
|
||||
dw Func_e88a6 ; 0b
|
||||
dw Func_e8927 ; 0c
|
||||
dw Printer_CheckConnectionStatus ; 01
|
||||
dw Printer_WaitSerial ; 02
|
||||
dw Printer_StartTransmittingTilemap ; 03
|
||||
dw Printer_TransmissionLoop ; 04
|
||||
dw Printer_WaitSerialAndLoopBack2 ; 05
|
||||
dw Printer_EndTilemapTransmission ; 06
|
||||
dw Printer_TransmissionLoop ; 07
|
||||
dw Printer_WaitSerial ; 08
|
||||
|
||||
dw Printer_SignalSendHeader ; 09
|
||||
dw Printer_TransmissionLoop ; 0a
|
||||
dw Printer_WaitSerial ; 0b
|
||||
dw Printer_WaitUntilFinished ; 0c
|
||||
dw Printer_Quit ; 0d
|
||||
|
||||
dw Printer_Next_ ; 0e
|
||||
dw Func_e88a6 ; 10
|
||||
dw Func_e8889 ; 11
|
||||
dw Printer_LoopBack ; 12
|
||||
dw Func_e8936 ; 13
|
||||
dw Func_e8939 ; 14
|
||||
dw Printer_WaitSerial ; 0f
|
||||
dw Printer_SignalLoopBack ; 10
|
||||
dw Printer_LoopBack ; 11
|
||||
dw Printer_WaitLoopBack ; 12
|
||||
dw Printer_WaitLoopBack_ ; 13
|
||||
|
||||
Printer_Next:
|
||||
ld hl, wPrinterSendState
|
||||
@ -65,7 +67,7 @@ Printer_Back:
|
||||
|
||||
Printer_Quit:
|
||||
xor a
|
||||
ld [wc971], a
|
||||
ld [wPrinterStatusFlags], a
|
||||
ld hl, wPrinterSendState
|
||||
set 7, [hl]
|
||||
ret
|
||||
@ -86,23 +88,23 @@ Printer_InitSerial:
|
||||
xor a
|
||||
ld [wPrinterDataSize], a
|
||||
ld [wPrinterDataSize + 1], a
|
||||
ld a, [wcaf4]
|
||||
ld [wc6e9], a
|
||||
ld a, [wPrinterQueueLength]
|
||||
ld [wPrinterRowIndex], a
|
||||
call Printer_Next
|
||||
call Printer_PrepareToSend
|
||||
ld a, PRINTER_STATUS_CHECKING_LINK
|
||||
ld [wPrinterStatusIndicator], a
|
||||
ret
|
||||
|
||||
Func_e881f:
|
||||
Printer_StartTransmittingTilemap:
|
||||
call ResetPrinterData
|
||||
ld hl, wc6e9
|
||||
ld hl, wPrinterRowIndex
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, Func_e884b
|
||||
jr z, Printer_EndTilemapTransmission
|
||||
ld hl, PrinterDataPacket3
|
||||
call CopyPrinterDataHeader
|
||||
call Func_e89e6
|
||||
call Printer_Convert2RowsTo2bpp
|
||||
ld a, (wPrinterSendDataSourceEnd - wPrinterSendDataSource) % $100
|
||||
ld [wPrinterDataSize], a
|
||||
ld a, (wPrinterSendDataSourceEnd - wPrinterSendDataSource) / $100
|
||||
@ -114,7 +116,7 @@ Func_e881f:
|
||||
ld [wPrinterStatusIndicator], a
|
||||
ret
|
||||
|
||||
Func_e884b:
|
||||
Printer_EndTilemapTransmission:
|
||||
ld a, $6
|
||||
ld [wPrinterSendState], a
|
||||
ld hl, PrinterDataPacket4
|
||||
@ -126,11 +128,11 @@ Func_e884b:
|
||||
call Printer_PrepareToSend
|
||||
ret
|
||||
|
||||
Func_e8864:
|
||||
Printer_SignalSendHeader:
|
||||
call ResetPrinterData
|
||||
ld hl, PrinterDataPacket2
|
||||
call CopyPrinterDataHeader
|
||||
call Func_e89cf
|
||||
call Printer_StageHeaderForSend
|
||||
ld a, $4
|
||||
ld [wPrinterDataSize], a
|
||||
ld a, $0
|
||||
@ -142,85 +144,85 @@ Func_e8864:
|
||||
ld [wPrinterStatusIndicator], a
|
||||
ret
|
||||
|
||||
Func_e8889:
|
||||
Printer_SignalLoopBack:
|
||||
call ResetPrinterData
|
||||
ld hl, PrinterDataPacket1
|
||||
call CopyPrinterDataHeader
|
||||
xor a
|
||||
ld [wPrinterDataSize], a
|
||||
ld [wPrinterDataSize + 1], a
|
||||
ld a, [wcaf4]
|
||||
ld [wc6e9], a
|
||||
ld a, [wPrinterQueueLength]
|
||||
ld [wPrinterRowIndex], a
|
||||
call Printer_Next
|
||||
call Printer_PrepareToSend
|
||||
ret
|
||||
|
||||
Func_e88a6:
|
||||
ld hl, wc973
|
||||
Printer_WaitSerial:
|
||||
ld hl, wPrinterSerialFrameDelay
|
||||
inc [hl]
|
||||
ld a, [hl]
|
||||
cp a, $6
|
||||
cp $6
|
||||
ret c
|
||||
xor a
|
||||
ld [hl], a
|
||||
call Printer_Next
|
||||
ret
|
||||
|
||||
Func_e88b4:
|
||||
ld hl, wc973
|
||||
Printer_WaitSerialAndLoopBack2:
|
||||
ld hl, wPrinterSerialFrameDelay
|
||||
inc [hl]
|
||||
ld a, [hl]
|
||||
cp a, $6
|
||||
cp $6
|
||||
ret c
|
||||
xor a
|
||||
ld [hl], a
|
||||
ld hl, wc6e9
|
||||
ld hl, wPrinterRowIndex
|
||||
dec [hl]
|
||||
call Printer_Back
|
||||
call Printer_Back
|
||||
ret
|
||||
|
||||
Func_e88c9:
|
||||
Printer_CheckConnectionStatus:
|
||||
ld a, [wPrinterOpcode]
|
||||
and a
|
||||
ret nz
|
||||
ld a, [wc970]
|
||||
cp a, $ff
|
||||
ld a, [wPrinterHandshake]
|
||||
cp $ff
|
||||
jr nz, .asm_e88dc
|
||||
ld a, [wc971]
|
||||
cp a, $ff
|
||||
ld a, [wPrinterStatusFlags]
|
||||
cp $ff
|
||||
jr z, .asm_e88f8
|
||||
.asm_e88dc
|
||||
ld a, [wc970]
|
||||
cp a, $81
|
||||
ld a, [wPrinterHandshake]
|
||||
cp $81
|
||||
jr nz, .asm_e88f8
|
||||
ld a, [wc971]
|
||||
cp a, $0
|
||||
ld a, [wPrinterStatusFlags]
|
||||
cp $0
|
||||
jr nz, .asm_e88f8
|
||||
ld hl, wPrinterConnectionOpen
|
||||
set 1, [hl]
|
||||
ld a, $5
|
||||
ld [wc972], a
|
||||
ld [wHandshakeFrameDelay], a
|
||||
call Printer_Next
|
||||
ret
|
||||
|
||||
.asm_e88f8
|
||||
ld a, $ff
|
||||
ld [wc970], a
|
||||
ld [wc971], a
|
||||
ld [wPrinterHandshake], a
|
||||
ld [wPrinterStatusFlags], a
|
||||
ld a, $e
|
||||
ld [wPrinterSendState], a
|
||||
ret
|
||||
|
||||
Func_e8906:
|
||||
Printer_TransmissionLoop:
|
||||
ld a, [wPrinterOpcode]
|
||||
and a
|
||||
ret nz
|
||||
ld a, [wc971]
|
||||
and a, $f0
|
||||
ld a, [wPrinterStatusFlags]
|
||||
and $f0
|
||||
jr nz, .asm_e8921
|
||||
ld a, [wc971]
|
||||
and a, $1
|
||||
ld a, [wPrinterStatusFlags]
|
||||
and $1
|
||||
jr nz, .asm_e891d
|
||||
call Printer_Next
|
||||
ret
|
||||
@ -234,24 +236,24 @@ Func_e8906:
|
||||
ld [wPrinterSendState], a
|
||||
ret
|
||||
|
||||
Func_e8927:
|
||||
Printer_WaitUntilFinished:
|
||||
ld a, [wPrinterOpcode]
|
||||
and a
|
||||
ret nz
|
||||
ld a, [wc971]
|
||||
and a, $f3
|
||||
ld a, [wPrinterStatusFlags]
|
||||
and $f3
|
||||
ret nz
|
||||
call Printer_Next
|
||||
ret
|
||||
|
||||
Func_e8936:
|
||||
Printer_WaitLoopBack:
|
||||
call Printer_Next
|
||||
Func_e8939:
|
||||
Printer_WaitLoopBack_:
|
||||
ld a, [wPrinterOpcode]
|
||||
and a
|
||||
ret nz
|
||||
ld a, [wc971]
|
||||
and a, $f0
|
||||
ld a, [wPrinterStatusFlags]
|
||||
and $f0
|
||||
ret nz
|
||||
xor a
|
||||
ld [wPrinterSendState], a
|
||||
@ -263,8 +265,8 @@ Printer_PrepareToSend:
|
||||
and a
|
||||
jr nz, .wait_printer_operation
|
||||
xor a
|
||||
ld [wc974], a
|
||||
ld [wc975], a
|
||||
ld [wPrinterSendByteOffset], a
|
||||
ld [wPrinterSendByteOffset + 1], a
|
||||
ld a, $1
|
||||
ld [wPrinterOpcode], a
|
||||
ld a, $88
|
||||
@ -340,21 +342,21 @@ ComputePrinterChecksum:
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
Func_e89cf:
|
||||
Printer_StageHeaderForSend:
|
||||
ld a, $1
|
||||
ld [wPrinterSerialReceived], a
|
||||
ld [wPrinterSendDataSource], a
|
||||
ld a, [wcae2]
|
||||
ld [wPrinterStatusReceived], a
|
||||
ld a, $e4
|
||||
ld [wc6f2], a
|
||||
ld [wPrinterSendDataSource + 1], a
|
||||
ld a, %11100100
|
||||
ld [wPrinterSendDataSource + 2], a
|
||||
ld a, [wPrinterSettingsTempCopy]
|
||||
ld [wc6f3], a
|
||||
ld [wPrinterSendDataSource + 3], a
|
||||
ret
|
||||
|
||||
Func_e89e6:
|
||||
ld a, [wc6e9]
|
||||
Printer_Convert2RowsTo2bpp:
|
||||
ld a, [wPrinterRowIndex]
|
||||
ld b, a
|
||||
ld a, [wcaf4]
|
||||
ld a, [wPrinterQueueLength]
|
||||
sub b
|
||||
ld hl, wPrinterTileBuffer
|
||||
ld de, 2 * SCREEN_WIDTH
|
||||
@ -378,22 +380,22 @@ Func_e89e6:
|
||||
push hl
|
||||
swap a
|
||||
ld d, a
|
||||
and a, $f0
|
||||
and $f0
|
||||
ld e, a
|
||||
ld a, d
|
||||
and a, $f
|
||||
and $f
|
||||
ld d, a
|
||||
and a, $8
|
||||
and $8
|
||||
ld a, d
|
||||
jr nz, .vchars1
|
||||
or a, $90
|
||||
or $90
|
||||
jr .got_addr
|
||||
|
||||
.vchars1
|
||||
or a, $80
|
||||
or $80
|
||||
.got_addr
|
||||
ld d, a
|
||||
lb bc, BANK(Func_e89e6), 1
|
||||
lb bc, BANK(Printer_Convert2RowsTo2bpp), 1
|
||||
call CopyVideoData
|
||||
pop hl
|
||||
ld de, $10
|
||||
@ -536,17 +538,17 @@ PrinterSerial_: ; e8a5e (3a:4a5e)
|
||||
ld [hl], d
|
||||
dec hl
|
||||
ld [hl], e
|
||||
ld a, [wc974]
|
||||
ld a, [wPrinterSendByteOffset]
|
||||
ld e, a
|
||||
ld a, [wc975]
|
||||
ld a, [wPrinterSendByteOffset + 1]
|
||||
ld d, a
|
||||
ld hl, wPrinterSendDataSource
|
||||
add hl, de
|
||||
inc de
|
||||
ld a, e
|
||||
ld [wc974], a
|
||||
ld [wPrinterSendByteOffset], a
|
||||
ld a, d
|
||||
ld [wc975], a
|
||||
ld [wPrinterSendByteOffset + 1], a
|
||||
ld a, [hl]
|
||||
call .SendByte
|
||||
ret
|
||||
@ -573,7 +575,7 @@ PrinterSerial_: ; e8a5e (3a:4a5e)
|
||||
|
||||
.Receive1:
|
||||
ld a, [rSB]
|
||||
ld [wc970], a
|
||||
ld [wPrinterHandshake], a
|
||||
ld a, $0
|
||||
call .SendByte
|
||||
call .NextInstruction
|
||||
@ -581,7 +583,7 @@ PrinterSerial_: ; e8a5e (3a:4a5e)
|
||||
|
||||
.Receive2:
|
||||
ld a, [rSB]
|
||||
ld [wc971], a
|
||||
ld [wPrinterStatusFlags], a
|
||||
xor a
|
||||
ld [wPrinterOpcode], a
|
||||
ret
|
||||
@ -614,7 +616,7 @@ PrinterSerial_: ; e8a5e (3a:4a5e)
|
||||
|
||||
.Receive2_:
|
||||
ld a, [rSB]
|
||||
ld [wc971], a
|
||||
ld [wPrinterStatusFlags], a
|
||||
xor a
|
||||
ld [wPrinterOpcode], a
|
||||
ret
|
||||
|
@ -1685,7 +1685,7 @@ Tilemap_f8b8d:
|
||||
db $2b,$2c,$25,$28,$2d
|
||||
|
||||
Func_f8b92:
|
||||
ld hl, wd496
|
||||
ld hl, wSurfingMinigameHiScore + 1
|
||||
ld a, [wc5dd]
|
||||
cp [hl]
|
||||
jr c, .asm_f8ba6
|
||||
@ -1704,9 +1704,9 @@ Func_f8b92:
|
||||
|
||||
.asm_f8bb0
|
||||
ld a, [wc5dc]
|
||||
ld [wd495], a
|
||||
ld [wSurfingMinigameHiScore], a
|
||||
ld a, [wc5dd]
|
||||
ld [wd496], a
|
||||
ld [wSurfingMinigameHiScore + 1], a
|
||||
call WaitForSoundToFinish
|
||||
ldpikacry e, PikachuCry34
|
||||
call SurfingMinigame_PlayPikaCryIfSurfingPikaInParty
|
||||
|
@ -42,22 +42,22 @@ DisplayTitleScreen: ; 4171 (1:4171)
|
||||
ld a, BANK(NineTile)
|
||||
call FarCopyData
|
||||
ld hl, GamefreakLogoGraphics ; 4:4d78
|
||||
ld de, vTitleLogo + $650
|
||||
ld bc, $90
|
||||
ld de, vTitleLogo + 101 * $10
|
||||
ld bc, 9 * $10
|
||||
ld a, BANK(GamefreakLogoGraphics)
|
||||
call FarCopyData
|
||||
callab Func_f453f
|
||||
callab LoadYellowTitleScreenGFX
|
||||
ld hl, vBGMap0
|
||||
ld bc, (vBGMap1 + $400) - vBGMap0
|
||||
ld a, " "
|
||||
call FillMemory
|
||||
callab Func_f4578
|
||||
call Func_4418
|
||||
callab TitleScreen_PlacePokemonLogo
|
||||
call FillSpriteBuffer0WithAA
|
||||
call .WriteCopyrightTiles
|
||||
call SaveScreenTilesToBuffer2
|
||||
call LoadScreenTilesFromBuffer2
|
||||
call EnableLCD
|
||||
callab Func_f459a
|
||||
callab TitleScreen_PlacePikachu
|
||||
ld a, $9b
|
||||
call TitleScreenCopyTileMapToVRAM
|
||||
call SaveScreenTilesToBuffer1
|
||||
@ -136,7 +136,7 @@ DisplayTitleScreen: ; 4171 (1:4171)
|
||||
call PlaySound
|
||||
|
||||
; scroll game version in from the right
|
||||
callab Func_f4585
|
||||
callab TitleScreen_PlacePikaSpeechBubble
|
||||
ld a, SCREEN_HEIGHT_PIXELS
|
||||
ld [hWY], a
|
||||
call Delay3
|
||||
@ -147,15 +147,15 @@ DisplayTitleScreen: ; 4171 (1:4171)
|
||||
ld a, MUSIC_TITLE_SCREEN
|
||||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
.asm_428f
|
||||
.loop
|
||||
xor a
|
||||
ld [wUnusedCC5B], a
|
||||
ld [wTitleMonSpecies], a
|
||||
ld [wTitleMonSpecies+1], a
|
||||
ld [wTitleMonSpecies+2], a
|
||||
ld [wTitleMonSpecies+3], a
|
||||
ld [wTitleScreenScene], a
|
||||
ld [wTitleScreenScene + 1], a
|
||||
ld [wTitleScreenScene + 2], a
|
||||
ld [wTitleScreenScene + 3], a
|
||||
ld a, $f
|
||||
ld [wTitleMonSpecies+4], a
|
||||
ld [wTitleScreenScene + 4], a
|
||||
.titleScreenLoop
|
||||
call IncrementResetCounter
|
||||
jp c, .doTitlescreenReset
|
||||
@ -163,12 +163,13 @@ DisplayTitleScreen: ; 4171 (1:4171)
|
||||
call JoypadLowSensitivity
|
||||
ld a, [hJoyHeld]
|
||||
cp D_UP | SELECT | B_BUTTON
|
||||
jr z, .asm_42bf
|
||||
jr z, .go_to_main_menu
|
||||
and A_BUTTON | START
|
||||
jr nz, .asm_42bf
|
||||
call Func_4390
|
||||
jr nz, .go_to_main_menu
|
||||
call DoTitleScreenFunction
|
||||
jr .titleScreenLoop
|
||||
.asm_42bf
|
||||
|
||||
.go_to_main_menu
|
||||
ld e, $a
|
||||
call TitleScreen_PlayPikachuPCM
|
||||
call GBPalWhiteOutWithDelay3
|
||||
@ -190,24 +191,28 @@ DisplayTitleScreen: ; 4171 (1:4171)
|
||||
cp D_UP | SELECT | B_BUTTON
|
||||
jp z, .doClearSaveDialogue
|
||||
jp MainMenu
|
||||
|
||||
.asm_42f0 ; 42f0 (1:42f0)
|
||||
; unreferenced
|
||||
callab Func_e8e79
|
||||
jp .asm_428f
|
||||
jp .loop
|
||||
|
||||
.asm_42fb ; 42fb (1:42fb)
|
||||
ld a, [wTitleMonSpecies+4]
|
||||
; unreferenced
|
||||
ld a, [wTitleScreenScene + 4]
|
||||
inc a
|
||||
cp $2a
|
||||
jr c, .asm_4305
|
||||
ld a, $f
|
||||
.asm_4305
|
||||
ld [wTitleMonSpecies+4], a
|
||||
ld [wTitleScreenScene + 4], a
|
||||
ld e, a
|
||||
callab PlayPikachuSoundClip
|
||||
xor a
|
||||
ld [wTitleMonSpecies+2], a
|
||||
ld [wTitleMonSpecies+3], a
|
||||
ld [wTitleScreenScene + 2], a
|
||||
ld [wTitleScreenScene + 3], a
|
||||
jp .titleScreenLoop
|
||||
|
||||
.doTitlescreenReset ; 431b (1:431b)
|
||||
ld [wAudioFadeOutControl], a
|
||||
call StopAllMusic
|
||||
@ -216,6 +221,7 @@ DisplayTitleScreen: ; 4171 (1:4171)
|
||||
and a
|
||||
jr nz, .audioFadeLoop
|
||||
jp Init
|
||||
|
||||
|
||||
.doClearSaveDialogue ; 432a (1:432a)
|
||||
jpba DoClearSaveDialogue
|
||||
@ -249,49 +255,54 @@ CopyrightTextString: ; 4355 (1:4355)
|
||||
TitleScreen_PlayPikachuPCM: ; 4387 (1:4387)
|
||||
callab PlayPikachuSoundClip
|
||||
ret
|
||||
|
||||
|
||||
Func_4390: ; 4390 (1:4390)
|
||||
call Func_43de
|
||||
ld a, [wTitleMonSpecies]
|
||||
DoTitleScreenFunction: ; 4390 (1:4390)
|
||||
call .CheckTimer
|
||||
ld a, [wTitleScreenScene]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, PointerTable_43a2
|
||||
ld hl, .Jumptable
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
jp [hl]
|
||||
|
||||
|
||||
PointerTable_43a2: ; 43a2 (1:43a2)
|
||||
dw Func_43be
|
||||
dw Func_43c3
|
||||
dw Func_43d9
|
||||
dw Func_43d9
|
||||
dw Func_43c7
|
||||
dw Func_43d9
|
||||
dw Func_43d9
|
||||
dw Func_43c3
|
||||
dw Func_43d9
|
||||
dw Func_43d9
|
||||
dw Func_43bf
|
||||
dw Func_43ba
|
||||
.Jumptable: ; 43a2 (1:43a2)
|
||||
dw .Nop
|
||||
dw .BlinkHalf
|
||||
dw .BlinkWait
|
||||
dw .BlinkWait
|
||||
dw .BlinkClosed
|
||||
dw .BlinkWait
|
||||
dw .BlinkWait
|
||||
dw .BlinkHalf
|
||||
dw .BlinkWait
|
||||
dw .BlinkWait
|
||||
dw .BlinkOpen
|
||||
dw .GoBackToStart
|
||||
|
||||
Func_43ba: ; 43ba (1:43ba)
|
||||
.GoBackToStart: ; 43ba (1:43ba)
|
||||
xor a
|
||||
ld [wTitleMonSpecies], a
|
||||
Func_43be
|
||||
ld [wTitleScreenScene], a
|
||||
.Nop
|
||||
ret
|
||||
|
||||
|
||||
Func_43bf: ; 43bf (1:43bf)
|
||||
.BlinkOpen: ; 43bf (1:43bf)
|
||||
ld e, 0
|
||||
jr asm_43c9
|
||||
Func_43c3: ; 43c3 (1:43c3)
|
||||
jr .LoadBlinkFrame
|
||||
|
||||
.BlinkHalf: ; 43c3 (1:43c3)
|
||||
ld e, 4
|
||||
jr asm_43c9
|
||||
Func_43c7: ; 43c7 (1:43c7)
|
||||
jr .LoadBlinkFrame
|
||||
|
||||
.BlinkClosed: ; 43c7 (1:43c7)
|
||||
ld e, 8
|
||||
asm_43c9: ; 43c9 (1:43c9)
|
||||
.LoadBlinkFrame: ; 43c9 (1:43c9)
|
||||
ld hl, wOAMBuffer + 2
|
||||
ld c, 8
|
||||
.loop
|
||||
@ -304,36 +315,38 @@ asm_43c9: ; 43c9 (1:43c9)
|
||||
inc hl
|
||||
dec c
|
||||
jr nz, .loop
|
||||
Func_43d9: ; 43d9 (1:43d9)
|
||||
ld hl, wTitleMonSpecies
|
||||
.BlinkWait: ; 43d9 (1:43d9)
|
||||
ld hl, wTitleScreenScene
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
|
||||
Func_43de: ; 43de (1:43de)
|
||||
ld hl, wTitleMonSpecies + 1
|
||||
.CheckTimer: ; 43de (1:43de)
|
||||
ld hl, wTitleScreenTimer
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
and a
|
||||
jr z, .asm_43ed
|
||||
jr z, .restart
|
||||
cp $80
|
||||
jr z, .asm_43ed
|
||||
jr z, .restart
|
||||
cp $90
|
||||
ret nz
|
||||
.asm_43ed
|
||||
.restart
|
||||
ld a, $1
|
||||
ld [wTitleMonSpecies], a
|
||||
ld [wTitleScreenScene], a
|
||||
ret
|
||||
|
||||
; copy text of fixed length NAME_LENGTH (like player name, rival name, mon names, ...)
|
||||
CopyFixedLengthText: ; 43f3 (1:43f3)
|
||||
ld bc, NAME_LENGTH
|
||||
jp CopyData
|
||||
|
||||
|
||||
NintenText: db "NINTEN@"
|
||||
SonyText: db "SONY@"
|
||||
|
||||
IncrementResetCounter: ; 4405 (1:4405)
|
||||
ld hl, wTitleMonSpecies + 2
|
||||
ld hl, wTitleScreenScene + 2
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
@ -346,16 +359,18 @@ IncrementResetCounter: ; 4405 (1:4405)
|
||||
ld [hl], e
|
||||
and a
|
||||
ret
|
||||
|
||||
.doReset
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
Func_4418: ; 4418 (1:4418)
|
||||
FillSpriteBuffer0WithAA: ; 4418 (1:4418)
|
||||
xor a
|
||||
call SwitchSRAMBankAndLatchClockData
|
||||
ld hl, $a000
|
||||
ld hl, S_SPRITEBUFFER0
|
||||
ld bc, $20
|
||||
ld a, $aa
|
||||
call FillMemory
|
||||
call PrepareRTCDataAndDisableSRAM
|
||||
ret
|
||||
ret
|
||||
|
@ -91,7 +91,7 @@ TitleBallYTable: ; 374fa (d:74fa)
|
||||
|
||||
TitleScreenAnimateBallIfStarterOut: ; 37506 (d:7506)
|
||||
; Animate the TitleBall if a starter just got scrolled out.
|
||||
ld a, [wTitleMonSpecies]
|
||||
ld a, [wTitleScreenScene]
|
||||
cp STARTER1
|
||||
jr z, .ok
|
||||
cp STARTER2
|
||||
|
@ -158,7 +158,7 @@ BeachHouseSign4Text:
|
||||
set 6, [hl]
|
||||
xor a
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
callab Func_e910a
|
||||
callab Printer_PrepareSurfingMinigameHighScoreTileMap
|
||||
call WaitForTextScrollButtonPress
|
||||
ld hl, wd730
|
||||
res 6, [hl]
|
||||
|
@ -4,7 +4,7 @@ Func_f23d0: ; f23d0
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
ld hl, wd730
|
||||
set 6, [hl]
|
||||
callab Func_e8c5c
|
||||
callab PrintSurfingMinigameHighScore
|
||||
ld hl, wd730
|
||||
res 6, [hl]
|
||||
call GBPalWhiteOutWithDelay3
|
||||
|
@ -58,7 +58,7 @@ GraphicArtistText: ; 487a8 (12:47a8)
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
ld hl, wd730
|
||||
set 6, [hl]
|
||||
callab Func_e8cb1
|
||||
callab PrintDiploma
|
||||
ld hl, wd730
|
||||
res 6, [hl]
|
||||
call GBPalWhiteOutWithDelay3
|
||||
|
@ -244,7 +244,7 @@ FanClubText5:
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
ld hl, wd730
|
||||
set 6, [hl]
|
||||
callab Func_e8e24
|
||||
callab PrintFanClubPortrait
|
||||
ld hl, wd730
|
||||
res 6, [hl]
|
||||
call GBPalWhiteOutWithDelay3
|
||||
|
36
wram.asm
36
wram.asm
@ -491,7 +491,7 @@ wOverworldMap:: ; c6e8
|
||||
; ds 1300
|
||||
wPrinterSendState:: ; c6e8
|
||||
ds 1
|
||||
wc6e9:: ; c6e9
|
||||
wPrinterRowIndex:: ; c6e9
|
||||
ds 1
|
||||
|
||||
; Printer data header
|
||||
@ -537,18 +537,16 @@ wc810:: ; c810
|
||||
ds $70
|
||||
wPrinterSendDataSourceEnd:: ; c970
|
||||
|
||||
wc970:: ; c970
|
||||
wPrinterHandshake:: ; c970
|
||||
ds 1
|
||||
wc971:: ; c971
|
||||
wPrinterStatusFlags:: ; c971
|
||||
ds 1
|
||||
wc972:: ; c972
|
||||
wHandshakeFrameDelay:: ; c972
|
||||
ds 1
|
||||
wc973:: ; c973
|
||||
ds 1
|
||||
wc974:: ; c974
|
||||
ds 1
|
||||
wc975:: ; c975
|
||||
wPrinterSerialFrameDelay:: ; c973
|
||||
ds 1
|
||||
wPrinterSendByteOffset:: ; c974
|
||||
dw
|
||||
wPrinterDataSize:: ; c976
|
||||
dw
|
||||
wPrinterTileBuffer:: ; c978
|
||||
@ -559,15 +557,14 @@ wcae2:: ; cae2
|
||||
ds 1
|
||||
wPrinterSettingsTempCopy:: ; cae3
|
||||
ds 17
|
||||
wcaf4:: ; caf4
|
||||
wPrinterQueueLength:: ; caf4
|
||||
ds 1
|
||||
wPrinterDataEnd:: ; caf5
|
||||
|
||||
wcaf5:: ; caf5
|
||||
ds 1
|
||||
wcaf6:: ; caf6
|
||||
ds 3
|
||||
wcaf9:: ; caf9
|
||||
wPrinterPokedexEntryTextPointer:: ; caf5
|
||||
dw
|
||||
ds 2
|
||||
wPrinterPokedexMonIsOwned:: ; caf9
|
||||
ds 259
|
||||
|
||||
wRedrawRowOrColumnSrcTiles:: ; cbfc
|
||||
@ -1133,7 +1130,7 @@ wWhichBadge:: ; cd3d
|
||||
wPriceTemp:: ; cd3d
|
||||
; 3-byte BCD number
|
||||
|
||||
wTitleMonSpecies:: ; cd3d
|
||||
wTitleScreenScene:: ; cd3d
|
||||
|
||||
wPlayerCharacterOAMTile:: ; cd3d
|
||||
|
||||
@ -1196,6 +1193,8 @@ wTrainerSpriteOffset:: ; cd3d
|
||||
wUnusedCD3D:: ; cd3d
|
||||
ds 1
|
||||
|
||||
wTitleScreenTimer:: ; cd3e
|
||||
|
||||
wHUDPokeballGfxOffsetX:: ; cd3e
|
||||
; difference in X between the next ball and the current one
|
||||
|
||||
@ -2864,9 +2863,8 @@ wd492:: ds 1 ; d492
|
||||
|
||||
ds 1
|
||||
|
||||
wd495:: ds 1
|
||||
wd496:: ds 1
|
||||
wd497:: ds 1
|
||||
wSurfingMinigameHiScore:: ds 2 ; 4-digit BCD little-endian
|
||||
ds 1
|
||||
wPrinterSettings:: ds 1
|
||||
|
||||
wUnknownSerialFlag_d499:: ds 1 ; d498
|
||||
|
Loading…
Reference in New Issue
Block a user