Resolve hardcoded WRAM labels in engine/printer.asm

This commit is contained in:
pikalaxalt 2016-06-05 16:57:54 -04:00
parent c9a3048c33
commit ea4e4353ca
6 changed files with 453 additions and 374 deletions

View File

@ -164,9 +164,9 @@ SetPal_Overworld: ; 71fa5 (1c:5fa5)
cp BRUNOS_ROOM
jr z, .caveOrBruno
cp TRADE_CENTER
jr z, .asm_71ffd
jr z, .trade_center_colosseum
cp COLOSSEUM
jr z, .asm_71ffd
jr z, .trade_center_colosseum
.normalDungeonOrBuilding
ld a, [wLastMap] ; town or route that current dungeon or building is located
.townOrRoute
@ -181,17 +181,21 @@ SetPal_Overworld: ; 71fa5 (1c:5fa5)
ld a, SET_PAL_OVERWORLD
ld [wDefaultPaletteCommand], a
ret
.PokemonTowerOrAgatha
ld a, PAL_GREYMON - 1
jr .town
.caveOrBruno
ld a, PAL_CAVE - 1
jr .town
.Lorelei
xor a
jr .town
.asm_71ffd
ld a, $18
.trade_center_colosseum
ld a, PAL_GREYMON - 1
jr .town
; used when a Pokemon is the only thing on the screen
@ -313,17 +317,17 @@ DeterminePaletteIDOutOfBattle: ; 72094 (1c:6094)
ld a, [hl]
ret
Func_720ad:: ; 720ad (1c:60ad)
YellowIntroPaletteAction:: ; 720ad (1c:60ad)
ld a, e
and a
jr nz, Func_720bd
jr nz, .asm_720bd
ld hl, PalPacket_Generic
ld a, [hGBC]
and a
jp z, SendSGBPacket
jp InitGBCPalettes
Func_720bd:: ; 720bd (1c:60bd)
.asm_720bd
ld hl, UnknownPalPacket_72811
ld a, [hGBC]
and a
@ -343,12 +347,12 @@ Func_720bd:: ; 720bd (1c:60bd)
call TransferCurBGPData
ret
Func_720e3:: ; 720e3 (1c:60e3)
LoadOverworldPikachuFrontpicPalettes:: ; 720e3 (1c:60e3)
ld hl, PalPacket_Empty
ld de, wPalPacket
ld bc, $10
call CopyData
call Func_7213b
call GetPal_Pikachu
ld hl, wPartyMenuBlkPacket
ld [hl], a
ld hl, wPartyMenuBlkPacket + 2
@ -357,12 +361,13 @@ Func_720e3:: ; 720e3 (1c:60e3)
ld hl, wPalPacket
ld a, [hGBC]
and a
jr nz, .asm_72109
jr nz, .cgb_1
call SendSGBPacket
jr .asm_7210c
.asm_72109
jr .okay_1
.cgb_1
call InitGBCPalettes
.asm_7210c
.okay_1
ld hl, BlkPacket_WholeScreen
ld de, wPalPacket
ld bc, $10
@ -381,15 +386,16 @@ Func_720e3:: ; 720e3 (1c:60e3)
ld hl, wPalPacket
ld a, [hGBC]
and a
jr nz, .asm_72137
jr nz, .cgb_2
call SendSGBPacket
jr .asm_7213a
.asm_72137
jr .okay_2
.cgb_2
call InitGBCPalettes
.asm_7213a
.okay_2
ret
Func_7213b:: ; 7213b (1c:613b)
GetPal_Pikachu:: ; 7213b (1c:613b)
; similar to SetPal_Overworld
ld a, [wCurMapTileset]
cp CEMETERY
@ -420,17 +426,21 @@ Func_7213b:: ; 7213b (1c:613b)
.town
inc a ; a town's pallete ID is its map ID + 1
ret
.PokemonTowerOrAgatha
ld a, PAL_GREYMON - 1
jr .town
.caveOrBruno
ld a, PAL_CAVE - 1
jr .town
.Lorelei
xor a
xor a ; PAL_PALLET - 1
jr .town
.battleOrTradeCenter
ld a, $18
ld a, PAL_GREYMON - 1
jr .town
InitPartyMenuBlkPacket: ; 7217f (1c:617f)

View File

@ -1774,7 +1774,7 @@ StarterPikachuEmotionCommand_5: ; fd9d0 (3f:59d0)
Func_fd9e4:
call Func_fda2c
callab Func_720e3
callab LoadOverworldPikachuFrontpicPalettes
call Func_fd9ff
call LoadCurrentPikaPicAnimScriptPointer
call Func_fda9a

301
engine/printer.asm Executable file → Normal file
View File

@ -13,9 +13,9 @@ Func_e8785:
ld hl, wUnknownSerialFlag_d49a
set 0, [hl]
ld a, [wd498]
ld [$cae3], a
ld [wcae3], a
pop af
ld [$caf4], a
ld [wcaf4], a
ret
; e87a8
@ -65,7 +65,7 @@ Func_e87e4:
Func_e87e9:
xor a
ld [$c971], a
ld [wc971], a
ld hl, wOverworldMap
set 7, [hl]
ret
@ -84,19 +84,19 @@ Func_e87fd:
ld hl, Data_e8a3a
call Func_e8968
xor a
ld [$c976], a
ld [$c977], a
ld a, [$caf4]
ld [$c6e9], a
ld [wc976], a
ld [wc977], a
ld a, [wcaf4]
ld [wc6e9], a
call Func_e87df
call Func_e8949
ld a, $01
ld [$cae0], a
ld [wPrinterStatusIndicator], a
ret
Func_e881f:
call Func_e8981
ld hl, $c6e9
ld hl, wc6e9
ld a, [hl]
and a
jr z, Func_e884b
@ -104,14 +104,14 @@ Func_e881f:
call Func_e8968
call Func_e89e6
ld a, $80
ld [$c976], a
ld [wc976], a
ld a, $02
ld [$c977], a
ld [wc977], a
call Func_e899f
call Func_e87df
call Func_e8949
ld a, $02
ld [$cae0], a
ld [wPrinterStatusIndicator], a
ret
Func_e884b:
@ -120,8 +120,8 @@ Func_e884b:
ld hl, Data_e8a4c
call Func_e8968
xor a
ld [$c976], a
ld [$c977], a
ld [wc976], a
ld [wc977], a
call Func_e87df
call Func_e8949
ret
@ -132,14 +132,14 @@ Func_e8864:
call Func_e8968
call Func_e89cf
ld a, $04
ld [$c976], a
ld [wc976], a
ld a, $00
ld [$c977], a
ld [wc977], a
call Func_e899f
call Func_e87df
call Func_e8949
ld a, $03
ld [$cae0], a
ld [wPrinterStatusIndicator], a
ret
Func_e8889:
@ -147,16 +147,16 @@ Func_e8889:
ld hl, Data_e8a3a
call Func_e8968
xor a
ld [$c976], a
ld [$c977], a
ld a, [$caf4]
ld [$c6e9], a
ld [wc976], a
ld [wc977], a
ld a, [wcaf4]
ld [wc6e9], a
call Func_e87df
call Func_e8949
ret
Func_e88a6:
ld hl, $c973
ld hl, wc973
inc [hl]
ld a, [hl]
cp a, $06
@ -167,14 +167,14 @@ Func_e88a6:
ret
Func_e88b4:
ld hl, $c973
ld hl, wc973
inc [hl]
ld a, [hl]
cp a, $06
ret c
xor a
ld [hl], a
ld hl, $c6e9
ld hl, wc6e9
dec [hl]
call Func_e87e4
call Func_e87e4
@ -184,30 +184,30 @@ Func_e88c9:
ld a, [wUnknownSerialFlag_d49b]
and a
ret nz
ld a, [$c970]
ld a, [wc970]
cp a, $ff
jr nz, .asm_e88dc
ld a, [$c971]
ld a, [wc971]
cp a, $ff
jr z, .asm_e88f8
.asm_e88dc
ld a, [$c970]
ld a, [wc970]
cp a, $81
jr nz, .asm_e88f8
ld a, [$c971]
ld a, [wc971]
cp a, $00
jr nz, .asm_e88f8
ld hl, wUnknownSerialFlag_d49a
set 1, [hl]
ld a, $05
ld [$c972], a
ld [wc972], a
call Func_e87df
ret
.asm_e88f8
ld a, $ff
ld [$c970], a
ld [$c971], a
ld [wc970], a
ld [wc971], a
ld a, $0e
ld [wOverworldMap], a
ret
@ -216,10 +216,10 @@ Func_e8906:
ld a, [wUnknownSerialFlag_d49b]
and a
ret nz
ld a, [$c971]
ld a, [wc971]
and a, $f0
jr nz, .asm_e8921
ld a, [$c971]
ld a, [wc971]
and a, $01
jr nz, .asm_e891d
call Func_e87df
@ -238,7 +238,7 @@ Func_e8927:
ld a, [wUnknownSerialFlag_d49b]
and a
ret nz
ld a, [$c971]
ld a, [wc971]
and a, $f3
ret nz
call Func_e87df
@ -250,7 +250,7 @@ Func_e8939:
ld a, [wUnknownSerialFlag_d49b]
and a
ret nz
ld a, [$c971]
ld a, [wc971]
and a, $f0
ret nz
xor a
@ -263,8 +263,8 @@ Func_e8949:
and a
jr nz, .asm_e8949
xor a
ld [$c974], a
ld [$c975], a
ld [wc974], a
ld [wc975], a
ld a, $01
ld [wUnknownSerialFlag_d49b], a
ld a, $88
@ -277,33 +277,33 @@ Func_e8949:
Func_e8968:
ld a, [hli]
ld [$c6ea], a
ld [wc6ea], a
ld a, [hli]
ld [$c6eb], a
ld [wc6eb], a
ld a, [hli]
ld [$c6ec], a
ld [wc6ec], a
ld a, [hli]
ld [$c6ed], a
ld [wc6ed], a
ld a, [hli]
ld [$c6ee], a
ld [wc6ee], a
ld a, [hl]
ld [$c6ef], a
ld [wc6ef], a
ret
Func_e8981:
xor a
ld hl, $c6ea
ld hl, wc6ea
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
ld hl, $c6ee
ld hl, wc6ee
ld [hli], a
ld [hl], a
xor a
ld [$c976], a
ld [$c977], a
ld hl, $c6f0
ld [wc976], a
ld [wc977], a
ld hl, wc6f0
ld bc, $0280
call Func_e8a2e
ret
@ -311,18 +311,18 @@ Func_e8981:
Func_e899f:
ld hl, $0000
ld bc, $0004
ld de, $c6ea
ld de, wc6ea
call Func_e89c2
ld a, [$c976]
ld a, [wc976]
ld c, a
ld a, [$c977]
ld a, [wc977]
ld b, a
ld de, $c6f0
ld de, wc6f0
call Func_e89c2
ld a, l
ld [$c6ee], a
ld [wc6ee], a
ld a, h
ld [$c6ef], a
ld [wc6ef], a
ret
Func_e89c2:
@ -342,19 +342,19 @@ Func_e89c2:
Func_e89cf:
ld a, $01
ld [$c6f0], a
ld a, [$cae2]
ld [$c6f1], a
ld [wc6f0], a
ld a, [wcae2]
ld [wc6f1], a
ld a, $e4
ld [$c6f2], a
ld a, [$cae3]
ld [$c6f3], a
ld [wc6f2], a
ld a, [wcae3]
ld [wc6f3], a
ret
Func_e89e6:
ld a, [$c6e9]
ld a, [wc6e9]
ld b, a
ld a, [$caf4]
ld a, [wcaf4]
sub b
ld hl, wPrinterTileBuffer
ld de, $0028
@ -368,7 +368,7 @@ Func_e89e6:
.asm_e89fb
ld e, l
ld d, h
ld hl, $c6f0
ld hl, wc6f0
ld c, $28
.asm_e8a02
ld a, [de]
@ -492,31 +492,31 @@ Func_e8ab3:
ret
Func_e8abc:
ld a, [$c6ea]
ld a, [wc6ea]
call Func_e8b5f
call Func_e8aad
ret
Func_e8ac6:
ld a, [$c6eb]
ld a, [wc6eb]
call Func_e8b5f
call Func_e8aad
ret
Func_e8ad0:
ld a, [$c6ec]
ld a, [wc6ec]
call Func_e8b5f
call Func_e8aad
ret
Func_e8ada:
ld a, [$c6ed]
ld a, [wc6ed]
call Func_e8b5f
call Func_e8aad
ret
Func_e8ae4:
ld hl, $c976
ld hl, wc976
ld e, [hl]
inc hl
ld d, [hl]
@ -527,17 +527,17 @@ Func_e8ae4:
ld [hl], d
dec hl
ld [hl], e
ld a, [$c974]
ld a, [wc974]
ld e, a
ld a, [$c975]
ld a, [wc975]
ld d, a
ld hl, $c6f0
ld hl, wc6f0
add hl, de
inc de
ld a, e
ld [$c974], a
ld [wc974], a
ld a, d
ld [$c975], a
ld [wc975], a
ld a, [hl]
call Func_e8b5f
ret
@ -545,13 +545,13 @@ Func_e8ae4:
.asm_e8b0c
call Func_e8aad
Func_e8b0f:
ld a, [$c6ee]
ld a, [wc6ee]
call Func_e8b5f
call Func_e8aad
ret
Func_e8b19:
ld a, [$c6ef]
ld a, [wc6ef]
call Func_e8b5f
call Func_e8aad
ret
@ -564,7 +564,7 @@ Func_e8b23:
Func_e8b2c:
ld a, [rSB]
ld [$c970], a
ld [wc970], a
ld a, $00
call Func_e8b5f
call Func_e8aad
@ -572,7 +572,7 @@ Func_e8b2c:
Func_e8b3a:
ld a, [rSB]
ld [$c971], a
ld [wc971], a
xor a
ld [wUnknownSerialFlag_d49b], a
ret
@ -605,16 +605,16 @@ Func_e8b5f:
Func_e8b6a:
ld a, [rSB]
ld [$c971], a
ld [wc971], a
xor a
ld [wUnknownSerialFlag_d49b], a
ret
Func_e8b74: ; e8b74 (3a:4b74)
ld a, [$cfca]
ld a, [wUpdateSpritesEnabled]
push af
xor a
ld [$cfca], a
ld [wUpdateSpritesEnabled], a
ld [$ffdb], a
call Func_e8f24
ld a, [rIE]
@ -627,7 +627,7 @@ Func_e8b74: ; e8b74 (3a:4b74)
ld [$ffba], a
call Func_e8c30
call Func_e8785
ld a, [$caf9]
ld a, [wcaf9]
and a
jr z, .asm_e8b9e
ld a, $10
@ -636,7 +636,7 @@ Func_e8b74: ; e8b74 (3a:4b74)
.asm_e8b9e
ld a, $13
.asm_e8ba0
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call ClearScreen
callab Func_401c2
@ -645,7 +645,7 @@ Func_e8b74: ; e8b74 (3a:4b74)
ld [$ffba], a
call Func_e8c0c
jr c, .asm_e8bf4
ld a, [$caf9]
ld a, [wcaf9]
and a
jr z, .asm_e8bf4
xor a
@ -660,7 +660,7 @@ Func_e8b74: ; e8b74 (3a:4b74)
ld a, $07
call Func_e8785
ld a, $03
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call LoadScreenTilesFromBuffer1
ld a, $01
@ -677,7 +677,7 @@ Func_e8b74: ; e8b74 (3a:4b74)
call Func_0f3d
call Func_e8f3b
pop af
ld [$cfca], a
ld [wUpdateSpritesEnabled], a
ret
Func_e8c0c:
@ -686,12 +686,12 @@ Func_e8c0c:
call JoypadLowSensitivity
call Func_e8eca
jr c, .asm_e8c2e
ld a, [$c6e8]
ld a, [wc6e8]
bit 7, a
jr nz, .asm_e8c2c
call Func_e87a8
call Func_e8f51
call Func_e8f82
call GBPrinter_CheckForErrors
call GBPrinter_UpdateStatusMessage
call DelayFrame
jr .asm_e8c0f
@ -706,12 +706,12 @@ Func_e8c0c:
Func_e8c30:
callab Func_4039c
ld a, l
ld [$caf5], a
ld [wcaf5], a
ld a, h
ld [$caf6], a
ld [wcaf6], a
ld a, $00
rla
ld [$caf9], a
rla ; copy carry flag state to bit 0
ld [wcaf9], a
and a
jr z, .asm_e8c4d
ld a, $05
@ -740,19 +740,19 @@ Func_e8c5c:
ld [rIE], a
call Func_e8783
ld a, $13
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call Func_e8f16
.asm_e8c7d
call JoypadLowSensitivity
call Func_e8eca
jr c, .asm_e8c9a
ld a, [$c6e8]
ld a, [wc6e8]
bit 7, a
jr nz, .asm_e8c9a
call Func_e87a8
call Func_e8f51
call Func_e8f82
call GBPrinter_CheckForErrors
call GBPrinter_UpdateStatusMessage
call DelayFrame
jr .asm_e8c7d
@ -782,7 +782,7 @@ Func_e8cb1:
ld [rIE], a
call Func_e8783
ld a, $10
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call Func_e8d11
jr c, .asm_e8cfa
@ -797,7 +797,7 @@ Func_e8cb1:
call Func_e9ad3
call Func_e8783
ld a, $03
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call LoadScreenTilesFromBuffer1
call Func_e8d11
@ -820,12 +820,12 @@ Func_e8d11:
call JoypadLowSensitivity
call Func_e8eca
jr c, .asm_e8d33
ld a, [$c6e8]
ld a, [wc6e8]
bit 7, a
jr nz, .asm_e8d31
call Func_e87a8
call Func_e8f51
call Func_e8f82
call GBPrinter_CheckForErrors
call GBPrinter_UpdateStatusMessage
call DelayFrame
jr .asm_e8d14
@ -861,7 +861,7 @@ Func_e8d35:: ; e8d35 (3a:4e79)
call Func_e988a
call Func_e8783
ld a, $10
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call LoadScreenTilesFromBuffer1
call Func_e8dfb
@ -876,7 +876,7 @@ Func_e8d35:: ; e8d35 (3a:4e79)
call Func_e98ec
call Func_e8783
ld a, $00
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call LoadScreenTilesFromBuffer1
call Func_e8dfb
@ -891,7 +891,7 @@ Func_e8d35:: ; e8d35 (3a:4e79)
call Func_e9907
call Func_e8783
ld a, $00
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call LoadScreenTilesFromBuffer1
call Func_e8dfb
@ -906,7 +906,7 @@ Func_e8d35:: ; e8d35 (3a:4e79)
call Func_e9922
call Func_e8783
ld a, $03
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call LoadScreenTilesFromBuffer1
call Func_e8dfb
@ -939,8 +939,8 @@ Func_e8dfb: ; e8dfb
bit 7, a
jr nz, .asm_e8e1b
call Func_e87a8
call Func_e8f51
call Func_e8f82
call GBPrinter_CheckForErrors
call GBPrinter_UpdateStatusMessage
call DelayFrame
jr .asm_e8dfe
@ -969,7 +969,7 @@ Func_e8e24: ; e8e24
ld [rIE], a
call Func_e8783
ld a, $13
ld [$cae2], a
ld [wcae2], a
call Func_e8efc
call Func_e8f16
.asm_e8e45
@ -980,8 +980,8 @@ Func_e8e24: ; e8e24
bit 7, a
jr nz, .asm_e8e62
call Func_e87a8
call Func_e8f51
call Func_e8f82
call GBPrinter_CheckForErrors
call GBPrinter_UpdateStatusMessage
call DelayFrame
jr .asm_e8e45
@ -1012,7 +1012,7 @@ Func_e8e79: ; e8e79 (3a:4e79)
ld [rIE], a
call Func_e8783
ld a, $13
ld [$cae2], a
ld [wcae2], a
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
call Func_e8efc
@ -1127,43 +1127,44 @@ Func_e8f42: ; e8f42 (3a:4f42)
jr nz, .asm_e8f4a
ret
Func_e8f51: ; e8f51 (3a:4f51)
ld a, [$c970]
GBPrinter_CheckForErrors: ; e8f51 (3a:4f51)
ld a, [wc970]
cp $81
jr z, .asm_e8f62
ld a, [$c971]
jr z, .check_other_errors
ld a, [wc971]
cp $ff
jr z, .asm_e8f7c
jr z, .error2
xor a
jr .asm_e8f7e
jr .load_status
.asm_e8f62
ld a, [$c971]
.check_other_errors
ld a, [wc971]
and $e0
ret z
bit 7, a
jr nz, .asm_e8f78
jr nz, .error1
bit 6, a
jr nz, .asm_e8f74
jr nz, .error4
; error 3
ld a, 6
jr .asm_e8f7e
jr .load_status
.asm_e8f74
.error4
ld a, 7
jr .asm_e8f7e
jr .load_status
.asm_e8f78
.error1
ld a, 4
jr .asm_e8f7e
jr .load_status
.asm_e8f7c
.error2
ld a, 5
.asm_e8f7e
ld [wcae0], a
.load_status
ld [wPrinterStatusIndicator], a
ret
Func_e8f82:
ld a, [wcae0]
GBPrinter_UpdateStatusMessage:
ld a, [wPrinterStatusIndicator]
and a
ret z
push af
@ -1189,55 +1190,55 @@ Func_e8f82:
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
xor a
ld [wcae0], a
ld [wPrinterStatusIndicator], a
ret
String_e8fb8:
db "Press B to Cancel@"
Table_e8fca:
dw String_e8fdc
dw String_e8fdd
dw String_e8ff0
dw String_e9003
dw String_e9014
dw String_e9049
dw String_e907e
dw String_e90b3
dw String_e90e8
dw .Blank
dw .CheckingLink
dw .Transmitting
dw .Printing
dw .Error1
dw .Error2
dw .Error3
dw .Error4
dw .WrongDevice
String_e8fdc:
.Blank:
db "@"
String_e8fdd:
.CheckingLink:
db ""
next " CHECKING LINK...@"
String_e8ff0:
.Transmitting:
db ""
next " TRANSMITTING...@"
String_e9003:
.Printing:
db ""
next " PRINTING...@"
String_e9014:
.Error1:
db " Printer Error 1"
next ""
next "Check the Game Boy"
next "Printer Manual.@"
String_e9049:
.Error2:
db " Printer Error 2"
next ""
next "Check the Game Boy"
next "Printer Manual.@"
String_e907e:
.Error3:
db " Printer Error 3"
next ""
next "Check the Game Boy"
next "Printer Manual.@"
String_e90b3:
.Error4:
db " Printer Error 4"
next ""
next "Check the Game Boy"
next "Printer Manual.@"
String_e90e8:
.WrongDevice:
db "This is not the"
next "Game Boy Printer!@"

View File

@ -1697,8 +1697,8 @@ Func_f8b92:
jr nz, .asm_f8bb0
.asm_f8ba6
call WaitForSoundToFinish
ld e, $1b
call Func_f8bcb
ldpikacry e, PikachuCry28
call SurfingMinigame_PlayPikaCryIfSurfingPikaInParty
and a
ret
@ -1708,14 +1708,14 @@ Func_f8b92:
ld a, [wc5dd]
ld [wd496], a
call WaitForSoundToFinish
ld e, $21
call Func_f8bcb
ldpikacry e, PikachuCry34
call SurfingMinigame_PlayPikaCryIfSurfingPikaInParty
ld a, SFX_GET_ITEM2_4_2
call PlaySound
scf
ret
Func_f8bcb: ; f8bcb (3e:4bcb)
SurfingMinigame_PlayPikaCryIfSurfingPikaInParty: ; f8bcb (3e:4bcb)
push de
callab IsSurfingPikachuInThePlayersParty
pop de
@ -2734,6 +2734,7 @@ Func_f9404:
INCLUDE "data/animated_objects_3e_1.asm"
Unkn_f96c5:
; a sine wave with amplitude 2
db 0, 0, 0, 1, 1, 1, 1, 2
db 2, 2, 1, 1, 1, 1, 0, 0
db 0, 0, 0, -1, -1, -1, -1, -2

View File

@ -10,7 +10,7 @@ PlayIntroScene:
call InitYellowIntroGFXAndMusic
call DelayFrame
.loop
ld a, [wc634]
ld a, [wYellowIntroCurrentScene]
bit 7, a
jr nz, .go_to_title_screen
call JoypadLowSensitivity
@ -21,7 +21,7 @@ PlayIntroScene:
ld a, $0
ld [wCurrentAnimatedObjectOAMBufferOffset], a
call RunObjectAnimations
ld a, [wc634]
ld a, [wYellowIntroCurrentScene]
cp $7
call z, Func_f98a2
cp $b
@ -65,7 +65,6 @@ Func_f98a2:
ld a, [wOAMBuffer + 16 * 4 + 3]
or $1
ld [wOAMBuffer + 16 * 4 + 3], a
Func_f98b8:
ld a, [wOAMBuffer + 18 * 4 + 3]
or $1
ld [wOAMBuffer + 18 * 4 + 3], a
@ -96,37 +95,37 @@ Func_f98cb:
ret
Func_f98fc:
ld a, [wc634]
ld a, [wYellowIntroCurrentScene]
ld hl, Jumptable_f9906
call Func_fa06e
jp [hl]
Jumptable_f9906:
dw Func_f992f
dw Func_f995f
dw Func_f996a
dw Func_f9a08
dw Func_f9a1e
dw Func_f9a60
dw Func_f9a6b
dw Func_f9ab1
dw Func_f9ad8
dw Func_f9af9
dw Func_f9b04
dw Func_f9bf6
dw Func_f9cac
dw Func_f9d12
dw Func_f9d22
dw Func_f9d8f
dw Func_f9dbf
dw Func_f9e12
dw YellowIntroScene0 ; running pika 1
dw YellowIntroScene1 ; wait last
dw YellowIntroScene2 ; pikachu kick
dw YellowIntroScene3 ; wait last
dw YellowIntroScene4 ; running pika 2
dw YellowIntroScene5 ; wait last
dw YellowIntroScene6 ; surfing pika
dw YellowIntroScene7 ; wait last
dw YellowIntroScene8 ; running pika 3
dw YellowIntroScene9 ; wait last
dw YellowIntroScene10 ; flying pika
dw YellowIntroScene11 ; wait last
dw YellowIntroScene12 ; pika close up
dw YellowIntroScene13 ; wait last
dw YellowIntroScene14 ; pika thunderbolt
dw YellowIntroScene15 ; wait last
dw YellowIntroScene16 ; fade to white
dw YellowIntroScene17 ; wait and quit
Func_f992a:
ld hl, wc634
YellowIntro_NextScene:
ld hl, wYellowIntroCurrentScene
inc [hl]
ret
Func_f992f:
YellowIntroScene0:
xor a
ld [hLCDCPointer], a
lb de, $58, $58
@ -145,20 +144,20 @@ Func_f992f:
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call UpdateGBCPal_OBP1
ld a, $82
ld [wc635], a
call Func_f992a
ld a, 130
ld [wYellowIntroSceneTimer], a
call YellowIntro_NextScene
ret
Func_f995f:
call Func_f9e41
YellowIntroScene1:
call YellowIntro_CheckFrameTimerDecrement
ret nc
call YellowIntro_MaskCurrentAnimatedObjectStruct
call Func_f992a
call YellowIntro_NextScene
ret
Func_f996a:
call Func_f9e80
YellowIntroScene2:
call YellowIntro_BlankPalsDelay2AndDisableLCD
ld c, $8
call UpdateMusicCTimes
xor a
@ -167,64 +166,66 @@ Func_f996a:
ld bc, $400
xor a
call Bank3E_FillMemory
call Func_f9996
call YellowIntroScene2_PlaceGraphic
lb de, $58, $b8 ; overloaded
ld a, $4 ; overloaded
call Func_f99d2
call LoadYellowIntroFlyingSpeedBars
ld a, $1
call Func_f9e9a
call Func_f9e35
call Func_f992a
call YellowIntro_SetTimerFor128Frames
call YellowIntro_NextScene
ret
Func_f9996:
ld hl, $98d4
YellowIntroScene2_PlaceGraphic:
ld hl, $98d4 ; (20, 6)
ld de, $20
ld b, $6
ld a, $90
.asm_f99a0
.row
ld c, $6
push af
push hl
.asm_f99a4
.col
ld [hli], a
inc a
dec c
jr nz, .asm_f99a4
jr nz, .col
pop hl
add hl, de
pop af
add $10
dec b
jr nz, .asm_f99a0
jr nz, .row
ld a, [hGBC]
and a
jr z, .asm_f99d1
ld hl, $98d4
jr z, .dmg_sgb
; We can actually set palettes!
ld hl, $98d4 ; (20, 6)
ld de, $20
ld b, $6
ld a, $1
ld [rVBK], a
.asm_f99c2
.attr_row
ld c, $6
push hl
.asm_f99c5
.attr_col
ld [hli], a
dec c
jr nz, .asm_f99c5
jr nz, .attr_col
pop hl
add hl, de
dec b
jr nz, .asm_f99c2
jr nz, .attr_row
xor a
ld [rVBK], a
.asm_f99d1
.dmg_sgb
ret
Func_f99d2:
ld hl, Unkn_f99f0
LoadYellowIntroFlyingSpeedBars:
ld hl, YellowIntroFlyingSpeedBarData
ld a, $8
.asm_f99d7
.loop
; Spawn object $8 at indicated coordinates with indicated speeds
push af
ld e, [hl]
inc hl
@ -242,10 +243,11 @@ Func_f99d2:
pop hl
pop af
dec a
jr nz, .asm_f99d7
jr nz, .loop
ret
Unkn_f99f0:
YellowIntroFlyingSpeedBarData:
; y, x, speed
db $d0, $20, $02
db $f0, $30, $04
db $d0, $40, $06
@ -255,9 +257,9 @@ Unkn_f99f0:
db $e0, $80, $04
db $f0, $90, $02
Func_f9a08:
call Func_f9e41
jr c, .asm_f9a17
YellowIntroScene3:
call YellowIntro_CheckFrameTimerDecrement
jr c, .expired
ld a, [hSCX]
cp $68
ret z
@ -265,38 +267,39 @@ Func_f9a08:
ld [hSCX], a
ret
.asm_f9a17
.expired
call MaskAllAnimatedObjectStructs
call Func_f992a
call YellowIntro_NextScene
ret
Func_f9a1e:
call Func_f9e80
YellowIntroScene4:
call YellowIntro_BlankPalsDelay2AndDisableLCD
ld c, $5
call UpdateMusicCTimes
ld a, [hGBC]
and a
jr z, .asm_f9a47
jr z, .dmg_sgb
; We can actually set palettes!
ld hl, $98d4
ld de, $20
ld b, $6
ld a, $1
ld [rVBK], a
xor a
.asm_f9a38
.attr_row
ld c, $6
push hl
.asm_f9a3b
.attr_col
ld [hli], a
dec c
jr nz, .asm_f9a3b
jr nz, .attr_col
pop hl
add hl, de
dec b
jr nz, .asm_f9a38
jr nz, .attr_row
xor a
ld [rVBK], a
.asm_f9a47
.dmg_sgb
xor a
ld [hLCDCPointer], a
call Func_f9e5f
@ -305,24 +308,24 @@ Func_f9a1e:
call YellowIntro_SpawnAnimatedObjectAndSavePointer
xor a
call Func_f9e9a
call Func_f9e35
call Func_f992a
call YellowIntro_SetTimerFor128Frames
call YellowIntro_NextScene
ret
Func_f9a60:
call Func_f9e41
YellowIntroScene5:
call YellowIntro_CheckFrameTimerDecrement
ret nc
call YellowIntro_MaskCurrentAnimatedObjectStruct
call Func_f992a
call YellowIntro_NextScene
ret
Func_f9a6b:
call Func_f9e80
YellowIntroScene6:
call YellowIntro_BlankPalsDelay2AndDisableLCD
ld c, $5
call UpdateMusicCTimes
ld a, $42
ld [hLCDCPointer], a
call Func_f9ec4
call YellowIntro_Copy8BitSineWave
ld hl, vBGMap0
ld bc, $60
xor a
@ -346,18 +349,18 @@ Func_f9a6b:
call YellowIntro_SpawnAnimatedObjectAndSavePointer
ld a, $1
call Func_f9e9a
call Func_f9e3b
call Func_f992a
call YellowIntro_SetTimerFor88Frames
call YellowIntro_NextScene
ret
Func_f9ab1:
call Func_f9e41
jr c, .asm_f9ad1
YellowIntroScene7:
call YellowIntro_CheckFrameTimerDecrement
jr c, .expired
ld hl, hSCX
inc [hl]
inc [hl]
ld hl, wc800
ld de, wc800 + 1
ld hl, wYellowIntroSurfingPikaSineWaveBuffer
ld de, wYellowIntroSurfingPikaSineWaveBuffer + 1
ld a, [hl]
push af
ld c, $ff
@ -369,16 +372,16 @@ Func_f9ab1:
jr nz, .shift_loop
pop af
ld [hl], a
call Prep7TileTransferFromC810ToC710
call Request7TileTransferFromC810ToC710
ret
.asm_f9ad1
.expired
call YellowIntro_MaskCurrentAnimatedObjectStruct
call Func_f992a
call YellowIntro_NextScene
ret
Func_f9ad8:
call Func_f9e80
YellowIntroScene8:
call YellowIntro_BlankPalsDelay2AndDisableLCD
ld c, $5
call UpdateMusicCTimes
xor a
@ -389,19 +392,19 @@ Func_f9ad8:
call YellowIntro_SpawnAnimatedObjectAndSavePointer
xor a
call Func_f9e9a
call Func_f9e35
call Func_f992a
call YellowIntro_SetTimerFor128Frames
call YellowIntro_NextScene
ret
Func_f9af9:
call Func_f9e41
YellowIntroScene9:
call YellowIntro_CheckFrameTimerDecrement
ret nc
call YellowIntro_MaskCurrentAnimatedObjectStruct
call Func_f992a
call YellowIntro_NextScene
ret
Func_f9b04:
call Func_f9e80
YellowIntroScene10:
call YellowIntro_BlankPalsDelay2AndDisableLCD
ld c, $5
call UpdateMusicCTimes
xor a
@ -431,8 +434,8 @@ Func_f9b04:
call YellowIntro_SpawnAnimatedObjectAndSavePointer
ld a, $1
call Func_f9e9a
call Func_f9e35
call Func_f992a
call YellowIntro_SetTimerFor128Frames
call YellowIntro_NextScene
ret
.FillBGMapBox:
@ -457,20 +460,20 @@ Unkn_f9b6e: INCBIN "gfx/unknown_f9b6e.map"
Unkn_f9be6: INCBIN "gfx/unknown_f9be6.map"
Unkn_f9bf2: INCBIN "gfx/unknown_f9bf2.map"
Func_f9bf6:
call Func_f9e41
jr c, .asm_f9c25
ld a, [wc635]
YellowIntroScene11:
call YellowIntro_CheckFrameTimerDecrement
jr c, .expired
ld a, [wYellowIntroSceneTimer]
and $7
ret nz
ld a, [wc635]
ld a, [wYellowIntroSceneTimer]
and $8
sla a
sla a
sla a
ld e, a
ld d, $0
ld hl, GFX_f9c2c
ld hl, YellowIntroCloudGFX1
add hl, de
ld a, l
ld [H_VBCOPYSRC], a
@ -484,16 +487,16 @@ Func_f9bf6:
ld [H_VBCOPYSIZE], a
ret
.asm_f9c25
.expired
call YellowIntro_MaskCurrentAnimatedObjectStruct
call Func_f992a
call YellowIntro_NextScene
ret
GFX_f9c2c: INCBIN "gfx/unknown_f9c2c.2bpp"
GFX_f9c6c: INCBIN "gfx/unknown_f9c6c.2bpp" ; indirectly referenced
YellowIntroCloudGFX1: INCBIN "gfx/unknown_f9c2c.2bpp"
YellowIntroCloudGFX2: INCBIN "gfx/unknown_f9c6c.2bpp" ; indirectly referenced
Func_f9cac:
call Func_f9e80
YellowIntroScene12:
call YellowIntro_BlankPalsDelay2AndDisableLCD
ld c, $5
call UpdateMusicCTimes
xor a
@ -510,51 +513,54 @@ Func_f9cac:
ld bc, $80
ld a, $1
call Bank3E_FillMemory
; paste 8x12 graphic into vBGMap0 at (5, 6) starting at tile 4, skipping 4 vtiles at the end of each row
ld hl, $98c5
ld de, $20
ld a, $4
ld b, $8
.asm_f9ce1
ld c, $c
ld b, 8
.row
ld c, 12
push hl
.asm_f9ce4
.col
ld [hli], a
inc a
dec c
jr nz, .asm_f9ce4
jr nz, .col
pop hl
add hl, de
add $4
dec b
jr nz, .asm_f9ce1
ld hl, $98c4
jr nz, .row
ld hl, $98c4 ; (4, 6)
ld [hl], $3
ld hl, $98e4
ld hl, $98e4 ; (4, 7)
ld [hl], $74
ld hl, $99a5
ld hl, $99a5 ; (5, 5)
ld [hl], $0
lb de, $60, $58
ld a, $9
call YellowIntro_SpawnAnimatedObjectAndSavePointer
xor a
call Func_f9e9a
call Func_f9e35
call Func_f992a
call YellowIntro_SetTimerFor128Frames
call YellowIntro_NextScene
ret
Func_f9d12:
call Func_f9e41
YellowIntroScene13:
call YellowIntro_CheckFrameTimerDecrement
ret nc
lb de, $68, $58
ld a, $a
call SpawnAnimatedObject
call Func_f992a
call YellowIntro_NextScene
ret
Func_f9d22:
ld de, Unkn_f9dd6
call Func_f9e4d
jr c, .asm_f9d3c
YellowIntroScene14:
ld de, YellowIntroPalSequence_f9dd6
call YellowIntro_LoadDMGPalAndIncrementCounter
jr c, .expired
ld [rBGP], a
ld [rOBP0], a
and $f0
@ -564,7 +570,7 @@ Func_f9d22:
call UpdateGBCPal_OBP1
ret
.asm_f9d3c
.expired
call MaskAllAnimatedObjectStructs
call YellowIntro_BlankOAMBuffer
ld hl, wTileMap
@ -594,15 +600,15 @@ Func_f9d22:
lb de, $58, $58
ld a, $7
call YellowIntro_SpawnAnimatedObjectAndSavePointer
call Func_f992a
call YellowIntro_NextScene
ld a, $28
ld [wc635], a
ld [wYellowIntroSceneTimer], a
ret
Func_f9d8f:
call Func_f9e41
jr c, .asm_f9dad
ld a, [wc635]
YellowIntroScene15:
call YellowIntro_CheckFrameTimerDecrement
jr c, .expired
ld a, [wYellowIntroSceneTimer]
and $3
ret nz
ld a, [rOBP0]
@ -615,7 +621,7 @@ Func_f9d8f:
call UpdateGBCPal_OBP0
ret
.asm_f9dad
.expired
xor a
ld [hLCDCPointer], a
ld a, $e4
@ -623,22 +629,22 @@ Func_f9d8f:
ld [rOBP0], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
call Func_f992a
Func_f9dbf:
ld de, Unkn_f9e0a
call Func_f9e4d
jr c, .asm_f9dd2
call YellowIntro_NextScene
YellowIntroScene16:
ld de, YellowIntroPalSequence_f9e0a
call YellowIntro_LoadDMGPalAndIncrementCounter
jr c, .expired
ld [rOBP0], a
ld [rBGP], a
call UpdateGBCPal_BGP
call UpdateGBCPal_OBP0
ret
.asm_f9dd2
call Func_f992a
.expired
call YellowIntro_NextScene
ret
Unkn_f9dd6:
YellowIntroPalSequence_f9dd6:
db $e4, $c0, $c0, $e4
db $e4, $c0, $c0, $e4
db $e4, $c0, $c0, $e4
@ -653,14 +659,14 @@ Unkn_f9dd6:
db $e4, $c0, $c0, $e4
db $e4, $c0, $c0, $ff
Unkn_f9e0a:
YellowIntroPalSequence_f9e0a:
db $e4, $90, $90, $40
db $40, $00, $00, $ff
Func_f9e12:
YellowIntroScene17:
ld c, 64
call DelayFrames
ld hl, wc634
ld hl, wYellowIntroCurrentScene
set 7, [hl]
ret
@ -680,18 +686,18 @@ YellowIntro_MaskCurrentAnimatedObjectStruct:
call MaskCurrentAnimatedObjectStruct
ret
Func_f9e35:
ld a, $80
ld [wc635], a
YellowIntro_SetTimerFor128Frames:
ld a, 128
ld [wYellowIntroSceneTimer], a
ret
Func_f9e3b:
ld a, $58
ld [wc635], a
YellowIntro_SetTimerFor88Frames:
ld a, 88
ld [wYellowIntroSceneTimer], a
ret
Func_f9e41:
ld hl, wc635
YellowIntro_CheckFrameTimerDecrement:
ld hl, wYellowIntroSceneTimer
ld a, [hl]
and a
jr z, .asm_f9e4b
@ -703,8 +709,8 @@ Func_f9e41:
scf
ret
Func_f9e4d:
ld hl, wc635
YellowIntro_LoadDMGPalAndIncrementCounter:
ld hl, wYellowIntroSceneTimer
ld a, [hl]
inc [hl]
ld l, a
@ -735,7 +741,7 @@ Func_f9e5f:
call Bank3E_FillMemory
ret
Func_f9e80:
YellowIntro_BlankPalsDelay2AndDisableLCD:
xor a
ld [rBGP], a
ld [rOBP0], a
@ -750,7 +756,7 @@ Func_f9e80:
Func_f9e9a:
ld e, a
callab Func_720ad
callab YellowIntroPaletteAction
xor a
ld [hSCX], a
ld [hSCY], a
@ -768,26 +774,29 @@ Func_f9e9a:
call UpdateGBCPal_OBP1
ret
Func_f9ec4:
ld de, wc800
YellowIntro_Copy8BitSineWave:
; Copy this sine wave into wYellowIntroSurfingPikaSineWaveBuffer 8 times (end just before wc900)
ld de, wYellowIntroSurfingPikaSineWaveBuffer
ld a, $8
.asm_f9ec9
.loop
push af
ld hl, Unkn_f9ed8
ld bc, $20
ld hl, .SineWave
ld bc, .SineWaveEnd - .SineWave
call Bank3E_CopyData
pop af
dec a
jr nz, .asm_f9ec9
jr nz, .loop
ret
Unkn_f9ed8:
.SineWave:
; a sine wave with amplitude 4
db 0, 0, 1, 2, 2, 3, 3, 3
db 4, 3, 3, 3, 2, 2, 1, 0
db 0, 0, -1, -2, -2, -3, -3, -3
db -4, -3, -3, -3, -2, -2, -1, 0
.SineWaveEnd:
Prep7TileTransferFromC810ToC710:
Request7TileTransferFromC810ToC710:
ld a, wc810 % $100
ld [H_VBCOPYSRC], a
ld a, wc810 / $100
@ -837,7 +846,7 @@ InitYellowIntroGFXAndMusic:
ld b, $8
call RunPaletteCommand
xor a
ld hl, wc634
ld hl, wYellowIntroCurrentScene
ld [hli], a
ld [hli], a
ld [hli], a

120
wram.asm
View File

@ -404,8 +404,11 @@ wc632:: ; c632
ds 1
wc633:: ; c633
ds 1
wYellowIntroCurrentScene:: ; c634
wc634:: ; c634
ds 1
wYellowIntroSceneTimer:: ; c635
wc635:: ; c635
ds 1
wYellowIntroAnimatedObjectStructPointer:: ; c636
@ -420,20 +423,75 @@ wYellowIntroAnimatedObjectStructPointer:: ; c636
wTempPic::
wOverworldMap:: ; c6e8
; ds 1300
ds $18
wc6e8:: ; c6e8
ds 1
wc6e9:: ; c6e9
ds 1
wc6ea:: ; c6ea
ds 1
wc6eb:: ; c6eb
ds 1
wc6ec:: ; c6ec
ds 1
wc6ed:: ; c6ed
ds 1
wc6ee:: ; c6ee
ds 1
wc6ef:: ; c6ef
ds 1
wc6f0:: ; c6f0
ds 1
wc6f1:: ; c6f1
ds 1
wc6f2:: ; c6f2
ds 1
wc6f3:: ; c6f3
ds 13
wc700:: ; c700
ds $10
wc710:: ; c710
ds $f0
wc800:: ; c800
wYellowIntroSurfingPikaSineWaveBuffer:: ; c800
; ds $100
ds $10
wc810:: ; c810
ds $168
ds $f0
; c900
ds $70
wc970:: ; c970
ds 1
wc971:: ; c971
ds 1
wc972:: ; c972
ds 1
wc973:: ; c973
ds 1
wc974:: ; c974
ds 1
wc975:: ; c975
ds 1
wc976:: ; c976
ds 1
wc977:: ; c977
ds 1
wPrinterTileBuffer:: ; c978
ds SCREEN_HEIGHT * SCREEN_WIDTH
wcae0:: ; cae0
ds 284
wPrinterStatusIndicator:: ; cae0
ds 2
wcae2:: ; cae2
ds 1
wcae3:: ; cae3
ds 17
wcaf4:: ; caf4
ds 1
wcaf5:: ; caf5
ds 1
wcaf6:: ; caf6
ds 3
wcaf9:: ; caf9
ds 259
wRedrawRowOrColumnSrcTiles:: ; cbfc
; the tiles of the row or column to be redrawn by RedrawRowOrColumn
@ -1595,22 +1653,22 @@ wMaxItemQuantity:: ; cf97
; LoadMonData copies mon data here
wLoadedMon:: party_struct wLoadedMon ; cf98
wFontLoaded:: ; cfc4
wFontLoaded:: ; cfc3
; bit 0: The space in VRAM that is used to store walk animation tile patterns
; for the player and NPCs is in use for font tile patterns.
; This means that NPC movement must be disabled.
; The other bits are unused.
ds 1
wWalkCounter:: ; cfc5
wWalkCounter:: ; cfc4
; walk animation counter
ds 1
wTileInFrontOfPlayer:: ; cfc6
wTileInFrontOfPlayer:: ; cfc5
; background tile number in front of the player (either 1 or 2 steps ahead)
ds 1
wAudioFadeOutControl:: ; cfc7
wAudioFadeOutControl:: ; cfc6
; The desired fade counter reload value is stored here prior to calling
; PlaySound in order to cause the current music to fade out before the new
; music begins playing. Storing 0 causes no fade out to occur and the new music
@ -1622,13 +1680,13 @@ wAudioFadeOutControl:: ; cfc7
; audio, it zeroes this variable and starts playing the sound ID stored in it.
ds 1
wAudioFadeOutCounterReloadValue:: ; cfc8
wAudioFadeOutCounterReloadValue:: ; cfc7
ds 1
wAudioFadeOutCounter:: ; cfc9
wAudioFadeOutCounter:: ; cfc8
ds 1
wLastMusicSoundID:: ; cfca
wLastMusicSoundID:: ; cfc9
; This is used to determine whether the default music is already playing when
; attempting to play the default music (in order to avoid restarting the same
; music) and whether the music has already been stopped when attempting to
@ -1640,45 +1698,45 @@ wLastMusicSoundID:: ; cfca
; the music).
ds 1
wUpdateSpritesEnabled:: ; cfcb
wUpdateSpritesEnabled:: ; cfca
; $00 = causes sprites to be hidden and the value to change to $ff
; $01 = enabled
; $ff = disabled
; other values aren't used
ds 1
wEnemyMoveNum:: ; cfcc
wEnemyMoveNum:: ; cfcb
ds 1
wEnemyMoveEffect:: ; cfcd
wEnemyMoveEffect:: ; cfcc
ds 1
wEnemyMovePower:: ; cfce
wEnemyMovePower:: ; cfcd
ds 1
wEnemyMoveType:: ; cfcf
wEnemyMoveType:: ; cfce
ds 1
wEnemyMoveAccuracy:: ; cfd0
wEnemyMoveAccuracy:: ; cfcf
ds 1
wEnemyMoveMaxPP:: ; cfd1
wEnemyMoveMaxPP:: ; cfd0
ds 1
wPlayerMoveNum:: ; cfd2
wPlayerMoveNum:: ; cfd1
ds 1
wPlayerMoveEffect:: ; cfd3
wPlayerMoveEffect:: ; cfd2
ds 1
wPlayerMovePower:: ; cfd4
wPlayerMovePower:: ; cfd3
ds 1
wPlayerMoveType:: ; cfd5
wPlayerMoveType:: ; cfd4
ds 1
wPlayerMoveAccuracy:: ; cfd6
wPlayerMoveAccuracy:: ; cfd5
ds 1
wPlayerMoveMaxPP:: ; cfd7
wPlayerMoveMaxPP:: ; cfd6
ds 1
wEnemyMonSpecies2:: ; cfd8
wEnemyMonSpecies2:: ; cfd7
ds 1
wBattleMonSpecies2:: ; cfd9
wBattleMonSpecies2:: ; cfd8
ds 1
wEnemyMonNick:: ds NAME_LENGTH ; cfda
wEnemyMonNick:: ds NAME_LENGTH ; cfd9
wEnemyMon:: ; cfe5
; The wEnemyMon struct reaches past 0xcfff,
@ -1708,9 +1766,9 @@ wEnemyMonAttack:: dw
wEnemyMonDefense:: dw
wEnemyMonSpeed:: dw
wEnemyMonSpecial:: dw
wEnemyMonPP:: ds 3 ; NUM_MOVES - 2
wEnemyMonPP:: ds 3 ; NUM_MOVES - 1
SECTION "WRAM Bank 1", WRAMX, BANK[1]
ds 1 ; NUM_MOVES - 2
ds 1 ; NUM_MOVES - 3
wEnemyMonBaseStats:: ds 5
wEnemyMonCatchRate:: ds 1