named animation functions/variables

This commit is contained in:
YamaArashi 2015-07-24 14:39:45 -07:00
parent e6d02b4b7b
commit 82512e4491
41 changed files with 781 additions and 642 deletions

View file

@ -6,7 +6,7 @@ const_value = $D8
const SE_WAVY_SCREEN ; $D8 used in Psywave/Night Shade/Psychic etc. const SE_WAVY_SCREEN ; $D8 used in Psywave/Night Shade/Psychic etc.
const SE_SUBSTITUTE_MON ; $D9 used in Substitute (turns the pokemon into a mini sprite) const SE_SUBSTITUTE_MON ; $D9 used in Substitute (turns the pokemon into a mini sprite)
const SE_SHAKE_BACK_AND_FORTH ; $DA used in Double Team const SE_SHAKE_BACK_AND_FORTH ; $DA used in Double Team
const SE_SLIDE_ENEMY_MON_OUT ; $DB used in Whirlwind const SE_SLIDE_ENEMY_MON_OFF ; $DB used in Whirlwind
const SE_SHOW_ENEMY_MON_PIC ; $DC used in Seismic Toss const SE_SHOW_ENEMY_MON_PIC ; $DC used in Seismic Toss
const SE_SHOW_MON_PIC ; $DD used in Low Kick/Quick Attack/Seismic Toss etc. const SE_SHOW_MON_PIC ; $DD used in Low Kick/Quick Attack/Seismic Toss etc.
const SE_BLINK_ENEMY_MON ; $DE used in Seismic Toss const SE_BLINK_ENEMY_MON ; $DE used in Seismic Toss
@ -16,7 +16,7 @@ const_value = $D8
const SE_SPIRAL_BALLS_INWARD ; $E2 used in Growth/Focus Energy/Hyper Beam etc. const SE_SPIRAL_BALLS_INWARD ; $E2 used in Growth/Focus Energy/Hyper Beam etc.
const SE_SHAKE_ENEMY_HUD_2 ; $E3 unused const SE_SHAKE_ENEMY_HUD_2 ; $E3 unused
const SE_SHAKE_ENEMY_HUD ; $E4 const SE_SHAKE_ENEMY_HUD ; $E4
const SE_SLIDE_MON_HALF_LEFT ; $E5 used in Softboiled const SE_SLIDE_MON_HALF_OFF ; $E5 used in Softboiled
const SE_PETALS_FALLING ; $E6 used in Petal Dance const SE_PETALS_FALLING ; $E6 used in Petal Dance
const SE_LEAVES_FALLING ; $E7 used in Razor Leaf const SE_LEAVES_FALLING ; $E7 used in Razor Leaf
const SE_TRANSFORM_MON ; $E8 used in Transform const SE_TRANSFORM_MON ; $E8 used in Transform
@ -31,7 +31,7 @@ const_value = $D8
const SE_RESET_MON_POSITION ; $F1 used in Tackle/Body Slam/etc. const SE_RESET_MON_POSITION ; $F1 used in Tackle/Body Slam/etc.
const SE_MOVE_MON_HORIZONTALLY ; $F2 used in Tackle/Body Slam/etc. const SE_MOVE_MON_HORIZONTALLY ; $F2 used in Tackle/Body Slam/etc.
const SE_BLINK_MON ; $F3 used in Recover const SE_BLINK_MON ; $F3 used in Recover
const SE_SLIDE_MON_OUT ; $F4 used in Seismic Toss/Low Kick/etc. const SE_SLIDE_MON_OFF ; $F4 used in Seismic Toss/Low Kick/etc.
const SE_FLASH_MON_PIC ; $F5 const SE_FLASH_MON_PIC ; $F5
const SE_SLIDE_MON_DOWN ; $F6 used in Withdraw/Waterfall/fainting const SE_SLIDE_MON_DOWN ; $F6 used in Withdraw/Waterfall/fainting
const SE_SLIDE_MON_UP ; $F7 used in Dig/Waterfall/etc. const SE_SLIDE_MON_UP ; $F7 used in Dig/Waterfall/etc.

View file

@ -296,7 +296,7 @@ WingAttackAnim: ; 7a277 (1e:6277)
WhirlwindAnim: ; 7a27b (1e:627b) WhirlwindAnim: ; 7a27b (1e:627b)
db $46,$11,$10 db $46,$11,$10
db SE_SLIDE_ENEMY_MON_OUT, $FF db SE_SLIDE_ENEMY_MON_OFF, $FF
db $FF db $FF
FlyAnim: ; 7a281 (1e:6281) FlyAnim: ; 7a281 (1e:6281)
@ -550,19 +550,19 @@ DrillPeckAnim: ; 7a3c8 (1e:63c8)
db $FF db $FF
SubmissionAnim: ; 7a3cc (1e:63cc) SubmissionAnim: ; 7a3cc (1e:63cc)
db SE_SLIDE_MON_OUT, $41 db SE_SLIDE_MON_OFF, $41
db $06,$FF,$01 db $06,$FF,$01
db SE_SHOW_MON_PIC, $FF db SE_SHOW_MON_PIC, $FF
db $FF db $FF
LowKickAnim: ; 7a3d4 (1e:63d4) LowKickAnim: ; 7a3d4 (1e:63d4)
db SE_SLIDE_MON_OUT, $42 db SE_SLIDE_MON_OFF, $42
db $46,$FF,$04 db $46,$FF,$04
db SE_SHOW_MON_PIC, $FF db SE_SHOW_MON_PIC, $FF
db $FF db $FF
CounterAnim: ; 7a3dc (1e:63dc) CounterAnim: ; 7a3dc (1e:63dc)
db SE_SLIDE_MON_OUT, $43 db SE_SLIDE_MON_OFF, $43
db $46,$FF,$04 db $46,$FF,$04
db SE_SHOW_MON_PIC, $FF db SE_SHOW_MON_PIC, $FF
db $FF db $FF
@ -571,7 +571,7 @@ SeismicTossAnim: ; 7a3e4 (1e:63e4)
db SE_BLINK_ENEMY_MON, $FF db SE_BLINK_ENEMY_MON, $FF
db $41,$8B,$4E db $41,$8B,$4E
db SE_HIDE_ENEMY_MON_PIC, $FF db SE_HIDE_ENEMY_MON_PIC, $FF
db SE_SLIDE_MON_OUT, $FF db SE_SLIDE_MON_OFF, $FF
db $42,$44,$4F db $42,$44,$4F
db SE_DELAY_ANIMATION_10, $FF db SE_DELAY_ANIMATION_10, $FF
db SE_DELAY_ANIMATION_10, $FF db SE_DELAY_ANIMATION_10, $FF
@ -736,7 +736,7 @@ AgilityAnim: ; 7a4c3 (1e:64c3)
db $FF db $FF
QuickAttackAnim: ; 7a4c8 (1e:64c8) QuickAttackAnim: ; 7a4c8 (1e:64c8)
db SE_SLIDE_MON_OUT, $61 db SE_SLIDE_MON_OFF, $61
db $46,$FF,$04 db $46,$FF,$04
db SE_SHOW_MON_PIC, $FF db SE_SHOW_MON_PIC, $FF
db $FF db $FF
@ -960,7 +960,7 @@ KinesisAnim: ; 7a5fa (1e:65fa)
db $FF db $FF
SoftboiledAnim: ; 7a5fe (1e:65fe) SoftboiledAnim: ; 7a5fe (1e:65fe)
db SE_SLIDE_MON_HALF_LEFT, $48 db SE_SLIDE_MON_HALF_OFF, $48
db $08,$86,$4C db $08,$86,$4C
db SE_LIGHT_SCREEN_PALETTE, $FF db SE_LIGHT_SCREEN_PALETTE, $FF
db SE_SPIRAL_BALLS_INWARD, $FF db SE_SPIRAL_BALLS_INWARD, $FF
@ -1119,7 +1119,7 @@ SlashAnim: ; 7a6cd (1e:66cd)
db $FF db $FF
SubstituteAnim: ; 7a6d1 (1e:66d1) SubstituteAnim: ; 7a6d1 (1e:66d1)
db SE_SLIDE_MON_OUT, $A3 db SE_SLIDE_MON_OFF, $A3
db $08,$FF,$47 db $08,$FF,$47
db SE_SUBSTITUTE_MON, $FF db SE_SUBSTITUTE_MON, $FF
db $FF db $FF

View file

@ -65,16 +65,16 @@ DisplayCreditsMon: ; 740cb (1d:40cb)
call GetMonHeader call GetMonHeader
call LoadFrontSpriteByMonIndex call LoadFrontSpriteByMonIndex
ld hl,vBGMap0 + $c ld hl,vBGMap0 + $c
call CopyTileMapToVRAM call CreditsCopyTileMapToVRAM
xor a xor a
ld [H_AUTOBGTRANSFERENABLED],a ld [H_AUTOBGTRANSFERENABLED],a
call LoadScreenTilesFromBuffer1 call LoadScreenTilesFromBuffer1
ld hl,vBGMap0 ld hl,vBGMap0
call CopyTileMapToVRAM call CreditsCopyTileMapToVRAM
ld a,$A7 ld a,$A7
ld [rWX],a ld [rWX],a
ld hl,vBGMap1 ld hl,vBGMap1
call CopyTileMapToVRAM call CreditsCopyTileMapToVRAM
call FillMiddleOfScreenWithWhite call FillMiddleOfScreenWithWhite
ld a,%11111100 ; make the mon a black silhouette ld a,%11111100 ; make the mon a black silhouette
ld [rBGP],a ld [rBGP],a
@ -136,12 +136,12 @@ HoFGBPalettes: ; 74160 (1d:4160)
db %11100000 db %11100000
db %11110000 db %11110000
CopyTileMapToVRAM: ; 74164 (1d:4164) CreditsCopyTileMapToVRAM: ; 74164 (1d:4164)
ld a, l ld a, l
ld [H_AUTOBGTRANSFERDEST], a ld [H_AUTOBGTRANSFERDEST], a
ld a, h ld a, h
ld [H_AUTOBGTRANSFERDEST + 1], a ld [H_AUTOBGTRANSFERDEST + 1], a
ld a, $1 ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3 jp Delay3

File diff suppressed because it is too large Load diff

View file

@ -210,28 +210,28 @@ BattleTransition_Spiral: ; 70a72 (1c:4a72)
.outwardSpiral .outwardSpiral
coord hl, 10, 10 coord hl, 10, 10
ld a, $3 ld a, $3
ld [wd09f], a ld [wOutwardSpiralCurrentDirection], a
ld a, l ld a, l
ld [wd09b], a ld [wOutwardSpiralTileMapPointer + 1], a
ld a, h ld a, h
ld [wd09a], a ld [wOutwardSpiralTileMapPointer], a
ld b, $78 ld b, 120
.loop1 .loop
ld c, $3 ld c, 3
.loop2 .innerLoop
push bc push bc
call BattleTransition_OutwardSpiral_ call BattleTransition_OutwardSpiral_
pop bc pop bc
dec c dec c
jr nz, .loop2 jr nz, .innerLoop
call DelayFrame call DelayFrame
dec b dec b
jr nz, .loop1 jr nz, .loop
.done .done
call BattleTransition_BlackScreen call BattleTransition_BlackScreen
xor a xor a
ld [wd09b], a ld [wOutwardSpiralTileMapPointer + 1], a
ld [wd09a], a ld [wOutwardSpiralTileMapPointer], a
ret ret
BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa) BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
@ -286,69 +286,69 @@ BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9) BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
ld bc, -SCREEN_WIDTH ld bc, -SCREEN_WIDTH
ld de, SCREEN_WIDTH ld de, SCREEN_WIDTH
ld a, [wd09b] ld a, [wOutwardSpiralTileMapPointer + 1]
ld l, a ld l, a
ld a, [wd09a] ld a, [wOutwardSpiralTileMapPointer]
ld h, a ld h, a
ld a, [wd09f] ld a, [wOutwardSpiralCurrentDirection]
cp $0 cp $0
jr z, .zero jr z, .up
cp $1 cp $1
jr z, .one jr z, .left
cp $2 cp $2
jr z, .two jr z, .down
cp $3 cp $3
jr z, .three jr z, .right
.done1 .keepSameDirection
ld [hl], $ff ld [hl], $ff
.done2_ .done
ld a, l ld a, l
ld [wd09b], a ld [wOutwardSpiralTileMapPointer + 1], a
ld a, h ld a, h
ld [wd09a], a ld [wOutwardSpiralTileMapPointer], a
ret ret
.zero .up
dec hl dec hl
ld a, [hl] ld a, [hl]
cp $ff cp $ff
jr nz, .done2 jr nz, .changeDirection
inc hl inc hl
add hl, bc add hl, bc
jr .done1 jr .keepSameDirection
.one .left
add hl, de add hl, de
ld a, [hl] ld a, [hl]
cp $ff cp $ff
jr nz, .done2 jr nz, .changeDirection
add hl, bc add hl, bc
dec hl dec hl
jr .done1 jr .keepSameDirection
.two .down
inc hl inc hl
ld a, [hl] ld a, [hl]
cp $ff cp $ff
jr nz, .done2 jr nz, .changeDirection
dec hl dec hl
add hl, de add hl, de
jr .done1 jr .keepSameDirection
.three .right
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $ff cp $ff
jr nz, .done2 jr nz, .changeDirection
add hl, de add hl, de
inc hl inc hl
jr .done1 jr .keepSameDirection
.done2 .changeDirection
ld [hl], $ff ld [hl], $ff
ld a, [wd09f] ld a, [wOutwardSpiralCurrentDirection]
inc a inc a
cp $4 cp $4
jr nz, .skip jr nz, .skip
xor a xor a
.skip .skip
ld [wd09f], a ld [wOutwardSpiralCurrentDirection], a
jr .done2_ jr .done
FlashScreen: FlashScreen:
BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d) BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)

View file

@ -357,7 +357,7 @@ EnemyRan: ; 3c202 (f:4202)
call PlaySoundWaitForCurrent call PlaySoundWaitForCurrent
xor a xor a
ld [H_WHOSETURN], a ld [H_WHOSETURN], a
jpab AnimationSlideEnemyMonOut jpab AnimationSlideEnemyMonOff
WildRanText: ; 3c229 (f:4229) WildRanText: ; 3c229 (f:4229)
TX_FAR _WildRanText TX_FAR _WildRanText

View file

@ -12,10 +12,10 @@ MarowakAnim: ; 708ca (1c:48ca)
ld [H_AUTOBGTRANSFERENABLED], a ; disable BG transfer so we don't see the Marowak too soon ld [H_AUTOBGTRANSFERENABLED], a ; disable BG transfer so we don't see the Marowak too soon
; replace ghost pic with Marowak in BG ; replace ghost pic with Marowak in BG
ld a, MAROWAK ld a, MAROWAK
ld [wHPBarMaxHP], a ld [wChangeMonPicEnemyTurnSpecies], a
ld a, $1 ld a, $1
ld [H_WHOSETURN], a ld [H_WHOSETURN], a
callab Func_79793 callab ChangeMonPic
; alternate between black and light grey 8 times. ; alternate between black and light grey 8 times.
; this makes the ghost's body appear to flash ; this makes the ghost's body appear to flash
ld d, $80 ld d, $80

View file

@ -293,7 +293,7 @@ UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
ld a, $e ld a, $e
.next .next
pop bc pop bc
ld [wd09f], a ld [wNewTileBlockID], a
predef ReplaceTileBlock predef ReplaceTileBlock
ld hl, $ffdb ld hl, $ffdb
dec [hl] dec [hl]

View file

@ -38,7 +38,7 @@ PlayIntroScene: ; 4169d (10:569d)
ld a, SFX_INTRO_HIP ld a, SFX_INTRO_HIP
call PlaySound call PlaySound
xor a xor a
ld [wd09f], a ld [wIntroNidorinoBaseTile], a
ld de, IntroNidorinoAnimation1 ld de, IntroNidorinoAnimation1
call AnimateIntroNidorino call AnimateIntroNidorino
; hop ; hop
@ -86,7 +86,7 @@ PlayIntroScene: ; 4169d (10:569d)
ld a, SFX_INTRO_HIP ld a, SFX_INTRO_HIP
call PlaySound call PlaySound
ld a, $24 ld a, $24
ld [wd09f], a ld [wIntroNidorinoBaseTile], a
ld de, IntroNidorinoAnimation3 ld de, IntroNidorinoAnimation3
call AnimateIntroNidorino call AnimateIntroNidorino
ld c, $1e ld c, $1e
@ -105,7 +105,7 @@ PlayIntroScene: ; 4169d (10:569d)
ld a, SFX_INTRO_HIP ld a, SFX_INTRO_HIP
call PlaySound call PlaySound
xor a xor a
ld [wd09f], a ld [wIntroNidorinoBaseTile], a
ld de, IntroNidorinoAnimation4 ld de, IntroNidorinoAnimation4
call AnimateIntroNidorino call AnimateIntroNidorino
; hop ; hop
@ -118,7 +118,7 @@ PlayIntroScene: ; 4169d (10:569d)
ret c ret c
ld a, $24 ld a, $24
ld [wd09f], a ld [wIntroNidorinoBaseTile], a
ld de, IntroNidorinoAnimation6 ld de, IntroNidorinoAnimation6
call AnimateIntroNidorino call AnimateIntroNidorino
ld c, $1e ld c, $1e
@ -129,7 +129,7 @@ PlayIntroScene: ; 4169d (10:569d)
ld a, SFX_INTRO_LUNGE ld a, SFX_INTRO_LUNGE
call PlaySound call PlaySound
ld a, $48 ld a, $48
ld [wd09f], a ld [wIntroNidorinoBaseTile], a
ld de, IntroNidorinoAnimation7 ld de, IntroNidorinoAnimation7
jp AnimateIntroNidorino jp AnimateIntroNidorino
@ -152,17 +152,17 @@ AnimateIntroNidorino: ; 41793 (10:5793)
UpdateIntroNidorinoOAM: ; 417ae (10:57ae) UpdateIntroNidorinoOAM: ; 417ae (10:57ae)
ld hl, wOAMBuffer ld hl, wOAMBuffer
ld a, [wd09f] ld a, [wIntroNidorinoBaseTile]
ld d, a ld d, a
.loop .loop
ld a, [W_BASECOORDY] ld a, [W_BASECOORDY]
add [hl] add [hl]
ld [hli], a ld [hli], a ; Y
ld a, [W_BASECOORDX] ld a, [W_BASECOORDX]
add [hl] add [hl]
ld [hli], a ld [hli], a ; X
ld a, d ld a, d
ld [hli], a ld [hli], a ; tile
inc hl inc hl
inc d inc d
dec c dec c

View file

@ -319,7 +319,7 @@ ItemUseBall: ; d687 (3:5687)
ld a,TOSS_ANIM ld a,TOSS_ANIM
ld [W_ANIMATIONID],a ld [W_ANIMATIONID],a
xor a xor a
ld [$fff3],a ld [H_WHOSETURN],a
ld [wAnimationType],a ld [wAnimationType],a
ld [wDamageMultipliers],a ld [wDamageMultipliers],a
ld a,[wWhichPokemon] ld a,[wWhichPokemon]

View file

@ -47,7 +47,7 @@ PrintCardKeyText: ; 52673 (14:6673)
.notSilphCo11F .notSilphCo11F
ld a, $e ld a, $e
.replaceCardKeyDoorTileBlock .replaceCardKeyDoorTileBlock
ld [wd09f], a ld [wNewTileBlockID], a
predef ReplaceTileBlock predef ReplaceTileBlock
ld hl, wd126 ld hl, wd126
set 5, [hl] set 5, [hl]

View file

@ -3,21 +3,21 @@ UsedCut: ; ef54 (3:6f54)
ld [wActionResultOrTookBattleTurn], a ; initialise to failure value ld [wActionResultOrTookBattleTurn], a ; initialise to failure value
ld a, [W_CURMAPTILESET] ld a, [W_CURMAPTILESET]
and a ; OVERWORLD and a ; OVERWORLD
jr z, .asm_ef6b jr z, .overworld
cp GYM cp GYM
jr nz, .asm_ef77 jr nz, .nothingToCut
ld a, [wTileInFrontOfPlayer] ld a, [wTileInFrontOfPlayer]
cp $50 ; gym cut tree cp $50 ; gym cut tree
jr nz, .asm_ef77 jr nz, .nothingToCut
jr .asm_ef82 jr .canCut
.asm_ef6b .overworld
dec a dec a
ld a, [wTileInFrontOfPlayer] ld a, [wTileInFrontOfPlayer]
cp $3d ; cut tree cp $3d ; cut tree
jr z, .asm_ef82 jr z, .canCut
cp $52 ; grass cp $52 ; grass
jr z, .asm_ef82 jr z, .canCut
.asm_ef77 .nothingToCut
ld hl, .NothingToCutText ld hl, .NothingToCutText
jp PrintText jp PrintText
@ -25,9 +25,9 @@ UsedCut: ; ef54 (3:6f54)
TX_FAR _NothingToCutText TX_FAR _NothingToCutText
db "@" db "@"
.asm_ef82 .canCut
ld [wCutTile], a ld [wCutTile], a
ld a, $1 ld a, 1
ld [wActionResultOrTookBattleTurn], a ; used cut ld [wActionResultOrTookBattleTurn], a ; used cut
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
ld hl, wPartyMonNicks ld hl, wPartyMonNicks
@ -37,7 +37,7 @@ UsedCut: ; ef54 (3:6f54)
call GBPalWhiteOutWithDelay3 call GBPalWhiteOutWithDelay3
call ClearSprites call ClearSprites
call RestoreScreenTilesAndReloadTilePatterns call RestoreScreenTilesAndReloadTilePatterns
ld a, $90 ld a, SCREEN_HEIGHT_PIXELS
ld [hWY], a ld [hWY], a
call Delay3 call Delay3
call LoadGBPal call LoadGBPal
@ -53,11 +53,11 @@ UsedCut: ; ef54 (3:6f54)
res 6, [hl] res 6, [hl]
ld a, $ff ld a, $ff
ld [wUpdateSpritesEnabled], a ld [wUpdateSpritesEnabled], a
call AnimateCutTree call InitCutAnimOAM
ld de, CutTreeBlockSwaps ld de, CutTreeBlockSwaps
call Func_f09f call ReplaceTreeTileBlock
call RedrawMapView call RedrawMapView
callba Func_79e96 callba AnimCut
ld a, $1 ld a, $1
ld [wUpdateSpritesEnabled], a ld [wUpdateSpritesEnabled], a
ld a, SFX_CUT ld a, SFX_CUT
@ -71,14 +71,15 @@ UsedCutText: ; eff2 (3:6ff2)
TX_FAR _UsedCutText TX_FAR _UsedCutText
db "@" db "@"
AnimateCutTree: ; eff7 (3:6ff7) InitCutAnimOAM: ; eff7 (3:6ff7)
xor a xor a
ld [wWhichAnimationOffsets], a ld [wWhichAnimationOffsets], a
ld a, $e4 ld a, $e4
ld [rOBP1], a ld [rOBP1], a
ld a, [wCutTile] ld a, [wCutTile]
cp $52 cp $52
jr z, .asm_f020 jr z, .grass
; tree
ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row
ld hl, vChars1 + $7c0 ld hl, vChars1 + $7c0
ld bc, (BANK(Overworld_GFX) << 8) + $02 ld bc, (BANK(Overworld_GFX) << 8) + $02
@ -87,45 +88,45 @@ AnimateCutTree: ; eff7 (3:6ff7)
ld hl, vChars1 + $7e0 ld hl, vChars1 + $7e0
ld bc, (BANK(Overworld_GFX) << 8) + $02 ld bc, (BANK(Overworld_GFX) << 8) + $02
call CopyVideoData call CopyVideoData
jr WriteCutTreeBoulderDustAnimationOAMBlock jr WriteCutOrBoulderDustAnimationOAMBlock
.asm_f020 .grass
ld hl, vChars1 + $7c0 ld hl, vChars1 + $7c0
call LoadCutTreeAnimationTilePattern call LoadCutGrassAnimationTilePattern
ld hl, vChars1 + $7d0 ld hl, vChars1 + $7d0
call LoadCutTreeAnimationTilePattern call LoadCutGrassAnimationTilePattern
ld hl, vChars1 + $7e0 ld hl, vChars1 + $7e0
call LoadCutTreeAnimationTilePattern call LoadCutGrassAnimationTilePattern
ld hl, vChars1 + $7f0 ld hl, vChars1 + $7f0
call LoadCutTreeAnimationTilePattern call LoadCutGrassAnimationTilePattern
call WriteCutTreeBoulderDustAnimationOAMBlock call WriteCutOrBoulderDustAnimationOAMBlock
ld hl, wOAMBuffer + $93 ld hl, wOAMBuffer + $93
ld de, $4 ld de, 4
ld a, $30 ld a, $30
ld c, e ld c, e
.asm_f044 .loop
ld [hl], a ld [hl], a
add hl, de add hl, de
xor $60 xor $60
dec c dec c
jr nz, .asm_f044 jr nz, .loop
ret ret
LoadCutTreeAnimationTilePattern: ; f04c (3:704c) LoadCutGrassAnimationTilePattern: ; f04c (3:704c)
ld de, AnimationTileset2 + $60 ; tile depicting a leaf ld de, AnimationTileset2 + $60 ; tile depicting a leaf
ld bc, (BANK(AnimationTileset2) << 8) + $01 ld bc, (BANK(AnimationTileset2) << 8) + $01
jp CopyVideoData jp CopyVideoData
WriteCutTreeBoulderDustAnimationOAMBlock: ; f055 (3:7055) WriteCutOrBoulderDustAnimationOAMBlock: ; f055 (3:7055)
call GetCutTreeBoulderDustAnimationOffsets call GetCutOrBoulderDustAnimationOffsets
ld a, $9 ld a, $9
ld de, CutTreeBoulderDustAnimationTilesAndAttributes ld de, CutOrBoulderDustAnimationTilesAndAttributes
jp WriteOAMBlock jp WriteOAMBlock
CutTreeBoulderDustAnimationTilesAndAttributes: ; f060 (3:7060) CutOrBoulderDustAnimationTilesAndAttributes: ; f060 (3:7060)
db $FC,$10,$FD,$10 db $FC,$10,$FD,$10
db $FE,$10,$FF,$10 db $FE,$10,$FF,$10
GetCutTreeBoulderDustAnimationOffsets: ; f068 (3:7068) GetCutOrBoulderDustAnimationOffsets: ; f068 (3:7068)
ld hl, wSpriteStateData1 + 4 ld hl, wSpriteStateData1 + 4
ld a, [hli] ; player's sprite screen Y position ld a, [hli] ; player's sprite screen Y position
ld b, a ld b, a
@ -140,10 +141,10 @@ GetCutTreeBoulderDustAnimationOffsets: ; f068 (3:7068)
ld d, $0 ; de holds direction (00: down, 02: up, 04: left, 06: right) ld d, $0 ; de holds direction (00: down, 02: up, 04: left, 06: right)
ld a, [wWhichAnimationOffsets] ld a, [wWhichAnimationOffsets]
and a and a
ld hl, CutTreeAnimationOffsets ld hl, CutAnimationOffsets
jr z, .asm_f084 jr z, .next
ld hl, BoulderDustAnimationOffsets ld hl, BoulderDustAnimationOffsets
.asm_f084 .next
add hl, de add hl, de
ld e, [hl] ld e, [hl]
inc hl inc hl
@ -156,7 +157,7 @@ GetCutTreeBoulderDustAnimationOffsets: ; f068 (3:7068)
ld c, a ld c, a
ret ret
CutTreeAnimationOffsets: ; f08f (3:708f) CutAnimationOffsets: ; f08f (3:708f)
; Each pair represents the x and y pixels offsets from the player of where the cut tree animation should be drawn ; Each pair represents the x and y pixels offsets from the player of where the cut tree animation should be drawn
db 8, 36 ; player is facing down db 8, 36 ; player is facing down
db 8, 4 ; player is facing up db 8, 4 ; player is facing up
@ -171,75 +172,79 @@ BoulderDustAnimationOffsets: ; f097 (3:7097)
db -24, 20 ; player is facing left db -24, 20 ; player is facing left
db 40, 20 ; player is facing right db 40, 20 ; player is facing right
Func_f09f: ; f09f (3:709f) ReplaceTreeTileBlock: ; f09f (3:709f)
; Determine the address of the tile block that contains the tile in front of the
; player (i.e. where the tree is) and replace it with the corresponding tile
; block that doesn't have the tree.
push de push de
ld a, [W_CURMAPWIDTH] ld a, [W_CURMAPWIDTH]
add $6 add 6
ld c, a ld c, a
ld b, $0 ld b, 0
ld d, $0 ld d, 0
ld hl, wCurrentTileBlockMapViewPointer ld hl, wCurrentTileBlockMapViewPointer
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
add hl, bc add hl, bc
ld a, [wSpriteStateData1 + 9] ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction
and a and a
jr z, .down jr z, .down
cp SPRITE_FACING_UP cp SPRITE_FACING_UP
jr z, .up jr z, .up
cp SPRITE_FACING_LEFT cp SPRITE_FACING_LEFT
jr z, .left jr z, .left
; right
ld a, [W_XBLOCKCOORD] ld a, [W_XBLOCKCOORD]
and a and a
jr z, .asm_f0e0 jr z, .centerTileBlock
jr .asm_f0ec jr .rightOfCenter
.down .down
ld a, [W_YBLOCKCOORD] ld a, [W_YBLOCKCOORD]
and a and a
jr z, .asm_f0e0 jr z, .centerTileBlock
jr .asm_f0df jr .belowCenter
.up .up
ld a, [W_YBLOCKCOORD] ld a, [W_YBLOCKCOORD]
and a and a
jr z, .asm_f0e1 jr z, .aboveCenter
jr .asm_f0e0 jr .centerTileBlock
.left .left
ld a, [W_XBLOCKCOORD] ld a, [W_XBLOCKCOORD]
and a and a
jr z, .asm_f0e6 jr z, .leftOfCenter
jr .asm_f0e0 jr .centerTileBlock
.asm_f0df .belowCenter
add hl, bc add hl, bc
.asm_f0e0 .centerTileBlock
add hl, bc add hl, bc
.asm_f0e1 .aboveCenter
ld e, $2 ld e, $2
add hl, de add hl, de
jr .asm_f0f0 jr .next
.asm_f0e6 .leftOfCenter
ld e, $1 ld e, $1
add hl, bc add hl, bc
add hl, de add hl, de
jr .asm_f0f0 jr .next
.asm_f0ec .rightOfCenter
ld e, $3 ld e, $3
add hl, bc add hl, bc
add hl, de add hl, de
.asm_f0f0 .next
pop de pop de
ld a, [hl] ld a, [hl]
ld c, a ld c, a
.asm_f0f3 .loop ; find the matching tile block in the array
ld a, [de] ld a, [de]
inc de inc de
inc de inc de
cp $ff cp $ff
ret z ret z
cp c cp c
jr nz, .asm_f0f3 jr nz, .loop
dec de dec de
ld a, [de] ld a, [de] ; replacement tile block from matching array entry
ld [hl], a ld [hl], a
ret ret

View file

@ -1,19 +1,19 @@
Func_79e96: ; 79e96 (1e:5e96) AnimCut: ; 79e96 (1e:5e96)
ld a, [wCutTile] ld a, [wCutTile]
cp $52 cp $52
jr z, .asm_79ec8 jr z, .grass
ld c, $8 ld c, $8
.asm_79e9f .cutTreeLoop
push bc push bc
ld hl, wOAMBuffer + $91 ld hl, wOAMBuffer + $91
ld a, $1 ld a, 1
ld [wd08a], a ld [wCoordAdjustmentAmount], a
ld c, $2 ld c, 2
call AdjustOAMBlockXPos2 call AdjustOAMBlockXPos2
ld hl, wOAMBuffer + $99 ld hl, wOAMBuffer + $99
ld a, $ff ld a, -1
ld [wd08a], a ld [wCoordAdjustmentAmount], a
ld c, $2 ld c, 2
call AdjustOAMBlockXPos2 call AdjustOAMBlockXPos2
ld a, [rOBP1] ld a, [rOBP1]
xor $64 xor $64
@ -21,49 +21,49 @@ Func_79e96: ; 79e96 (1e:5e96)
call DelayFrame call DelayFrame
pop bc pop bc
dec c dec c
jr nz, .asm_79e9f jr nz, .cutTreeLoop
ret ret
.asm_79ec8 .grass
ld c, $2 ld c, 2
.asm_79eca .cutGrassLoop
push bc push bc
ld c, $8 ld c, $8
call Func_79eed call AnimCutGrass_UpdateOAMEntries
call Func_79f30 call AnimCutGrass_SwapOAMEntries
ld c, $8 ld c, $8
call Func_79eed call AnimCutGrass_UpdateOAMEntries
call Func_79f30 call AnimCutGrass_SwapOAMEntries
ld hl, wOAMBuffer + $90 ld hl, wOAMBuffer + $90
ld a, $2 ld a, 2
ld [wd08a], a ld [wCoordAdjustmentAmount], a
ld c, $4 ld c, 4
call AdjustOAMBlockYPos2 call AdjustOAMBlockYPos2
pop bc pop bc
dec c dec c
jr nz, .asm_79eca jr nz, .cutGrassLoop
ret ret
Func_79eed: ; 79eed (1e:5eed) AnimCutGrass_UpdateOAMEntries: ; 79eed (1e:5eed)
push bc push bc
ld hl, wOAMBuffer + $91 ld hl, wOAMBuffer + $91
ld a, $1 ld a, 1
ld [wd08a], a ld [wCoordAdjustmentAmount], a
ld c, $1 ld c, 1
call AdjustOAMBlockXPos2 call AdjustOAMBlockXPos2
ld hl, wOAMBuffer + $95 ld hl, wOAMBuffer + $95
ld a, $2 ld a, 2
ld [wd08a], a ld [wCoordAdjustmentAmount], a
ld c, $1 ld c, 1
call AdjustOAMBlockXPos2 call AdjustOAMBlockXPos2
ld hl, wOAMBuffer + $99 ld hl, wOAMBuffer + $99
ld a, $fe ld a, -2
ld [wd08a], a ld [wCoordAdjustmentAmount], a
ld c, $1 ld c, 1
call AdjustOAMBlockXPos2 call AdjustOAMBlockXPos2
ld hl, wOAMBuffer + $9d ld hl, wOAMBuffer + $9d
ld a, $ff ld a, -1
ld [wd08a], a ld [wCoordAdjustmentAmount], a
ld c, $1 ld c, 1
call AdjustOAMBlockXPos2 call AdjustOAMBlockXPos2
ld a, [rOBP1] ld a, [rOBP1]
xor $64 xor $64
@ -71,19 +71,19 @@ Func_79eed: ; 79eed (1e:5eed)
call DelayFrame call DelayFrame
pop bc pop bc
dec c dec c
jr nz, Func_79eed jr nz, AnimCutGrass_UpdateOAMEntries
ret ret
Func_79f30: ; 79f30 (1e:5f30) AnimCutGrass_SwapOAMEntries: ; 79f30 (1e:5f30)
ld hl, wOAMBuffer + $90 ld hl, wOAMBuffer + $90
ld de, wHPBarMaxHP ld de, wBuffer
ld bc, $8 ld bc, $8
call CopyData call CopyData
ld hl, wOAMBuffer + $98 ld hl, wOAMBuffer + $98
ld de, wOAMBuffer + $90 ld de, wOAMBuffer + $90
ld bc, $8 ld bc, $8
call CopyData call CopyData
ld hl, wHPBarMaxHP ld hl, wBuffer
ld de, wOAMBuffer + $98 ld de, wOAMBuffer + $98
ld bc, $8 ld bc, $8
jp CopyData jp CopyData

View file

@ -8,14 +8,14 @@ AnimateBoulderDust: ; 79f54 (1e:5f54)
ld a, %11100100 ld a, %11100100
ld [rOBP1], a ld [rOBP1], a
call LoadSmokeTileFourTimes call LoadSmokeTileFourTimes
callba WriteCutTreeBoulderDustAnimationOAMBlock callba WriteCutOrBoulderDustAnimationOAMBlock
ld c, 8 ; number of steps in animation ld c, 8 ; number of steps in animation
.loop .loop
push bc push bc
call GetMoveBoulderDustFunctionPointer call GetMoveBoulderDustFunctionPointer
ld bc, .returnAddress ld bc, .returnAddress
push bc push bc
ld c, $4 ld c, 4
jp [hl] jp [hl]
.returnAddress .returnAddress
ld a, [rOBP1] ld a, [rOBP1]
@ -36,7 +36,7 @@ GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92)
ld b, $0 ld b, $0
add hl, bc add hl, bc
ld a, [hli] ld a, [hli]
ld [wd08a], a ld [wCoordAdjustmentAmount], a
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hli] ld a, [hli]

View file

@ -711,12 +711,12 @@ SlotMachine_PayCoinsToPlayer: ; 3776b (d:776b)
SlotMachine_PutOutLitBalls: ; 377ce (d:77ce) SlotMachine_PutOutLitBalls: ; 377ce (d:77ce)
ld a, $23 ld a, $23
ld [wd08a], a ld [wNewSlotMachineBallTile], a
jr SlotMachine_UpdateThreeCoinBallTiles jr SlotMachine_UpdateThreeCoinBallTiles
SlotMachine_LightBalls: ; 377d5 (d:77d5) SlotMachine_LightBalls: ; 377d5 (d:77d5)
ld a, $14 ld a, $14
ld [wd08a], a ld [wNewSlotMachineBallTile], a
ld a, [wSlotMachineBet] ld a, [wSlotMachineBet]
dec a dec a
jr z, SlotMachine_UpdateOneCoinBallTiles jr z, SlotMachine_UpdateOneCoinBallTiles
@ -739,7 +739,7 @@ SlotMachine_UpdateOneCoinBallTiles: ; 377fb (d:77fb)
coord hl, 3, 6 coord hl, 3, 6
SlotMachine_UpdateBallTiles: ; 377fe (d:77fe) SlotMachine_UpdateBallTiles: ; 377fe (d:77fe)
ld a, [wd08a] ld a, [wNewSlotMachineBallTile]
ld [hl], a ld [hl], a
ld bc, 13 ld bc, 13
add hl, bc add hl, bc

View file

@ -304,25 +304,25 @@ Trade_AnimateBallEnteringLinkCable: ; 412d2 (10:52d2)
ld a, %11100100 ld a, %11100100
ld [rOBP0], a ld [rOBP0], a
xor a xor a
ld [wd09f], a ld [wLinkCableAnimBulgeToggle], a
ld bc, $2060 ld bc, $2060
.moveBallInsideLinkCableLoop .moveBallInsideLinkCableLoop
push bc push bc
xor a xor a
ld de, Trade_BallInsideLinkCableOAM ld de, Trade_BallInsideLinkCableOAM
call WriteOAMBlock call WriteOAMBlock
ld a, [wd09f] ld a, [wLinkCableAnimBulgeToggle]
xor $1 xor $1
ld [wd09f], a ld [wLinkCableAnimBulgeToggle], a
add $7e add $7e
ld hl, wOAMBuffer + $02 ld hl, wOAMBuffer + $02
ld de, $4 ld de, 4
ld c, e ld c, e
.cycleSpriteFramesLoop .cycleLinkCableBulgeTile
ld [hl], a ld [hl], a
add hl, de add hl, de
dec c dec c
jr nz, .cycleSpriteFramesLoop jr nz, .cycleLinkCableBulgeTile
call Delay3 call Delay3
pop bc pop bc
ld a, c ld a, c

View file

@ -411,12 +411,12 @@ HandlePartyMenuInput:: ; 145a (0:145a)
ld a,1 ld a,1
ld [wMenuWrappingEnabled],a ld [wMenuWrappingEnabled],a
ld a,$40 ld a,$40
ld [wd09b],a ld [wPartyMenuAnimMonEnabled],a
call HandleMenuInputPokemonSelection call HandleMenuInput_
call PlaceUnfilledArrowMenuCursor call PlaceUnfilledArrowMenuCursor
ld b,a ld b,a
xor a xor a
ld [wd09b],a ld [wPartyMenuAnimMonEnabled],a
ld a,[wCurrentMenuItem] ld a,[wCurrentMenuItem]
ld [wPartyAndBillsPCSavedMenuItem],a ld [wPartyAndBillsPCSavedMenuItem],a
ld hl,wd730 ld hl,wd730
@ -3897,9 +3897,9 @@ WriteOAMBlock:: ; 3a97 (0:3a97)
HandleMenuInput:: ; 3abe (0:3abe) HandleMenuInput:: ; 3abe (0:3abe)
xor a xor a
ld [wd09b],a ld [wPartyMenuAnimMonEnabled],a
HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) HandleMenuInput_:: ; 3ac2 (0:3ac2)
ld a,[H_DOWNARROWBLINKCNT1] ld a,[H_DOWNARROWBLINKCNT1]
push af push af
ld a,[H_DOWNARROWBLINKCNT2] ld a,[H_DOWNARROWBLINKCNT2]
@ -3915,7 +3915,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2)
call Delay3 call Delay3
.loop2 .loop2
push hl push hl
ld a,[wd09b] ld a,[wPartyMenuAnimMonEnabled]
and a ; is it a pokemon selection menu? and a ; is it a pokemon selection menu?
jr z,.getJoypadState jr z,.getJoypadState
callba AnimatePartyMon ; shake mini sprite of selected pokemon callba AnimatePartyMon ; shake mini sprite of selected pokemon

View file

@ -21,7 +21,7 @@ AgathaScript_76443: ; 76443 (1d:6443)
ld a, $3b ld a, $3b
AgathaScript_76459: ; 76459 (1d:6459) AgathaScript_76459: ; 76459 (1d:6459)
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $2 ld bc, $2
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -21,7 +21,7 @@ BrunoScript_762ec: ; 762ec (1d:62ec)
ld a, $24 ld a, $24
BrunoScript_76302: ; 76302 (1d:6302) BrunoScript_76302: ; 76302 (1d:6302)
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $2 ld bc, $2
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -31,7 +31,7 @@ CeladonGameCornerScript_48bec: ; 48bec (12:4bec)
CheckEvent EVENT_FOUND_ROCKET_HIDEOUT CheckEvent EVENT_FOUND_ROCKET_HIDEOUT
ret nz ret nz
ld a, $2a ld a, $2a
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0208 ld bc, $0208
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
@ -451,7 +451,7 @@ CeladonGameCornerText12: ; 48edd (12:4edd)
call WaitForSoundToFinish call WaitForSoundToFinish
SetEvent EVENT_FOUND_ROCKET_HIDEOUT SetEvent EVENT_FOUND_ROCKET_HIDEOUT
ld a, $43 ld a, $43
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0208 ld bc, $0208
predef ReplaceTileBlock predef ReplaceTileBlock
jp TextScriptEnd jp TextScriptEnd

View file

@ -24,12 +24,12 @@ LanceScript_5a2c4: ; 5a2c4 (16:62c4)
LanceScript_5a2de: ; 5a2de (16:62de) LanceScript_5a2de: ; 5a2de (16:62de)
push bc push bc
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $602 ld bc, $602
call LanceScript_5a2f0 call LanceScript_5a2f0
pop bc pop bc
ld a, b ld a, b
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $603 ld bc, $603
LanceScript_5a2f0: ; 5a2f0 (16:62f0) LanceScript_5a2f0: ; 5a2f0 (16:62f0)

View file

@ -22,7 +22,7 @@ LoreleiScript_76191: ; 76191 (1d:6191)
.asm_761a9 .asm_761a9
ld a, $24 ld a, $24
.asm_761ab .asm_761ab
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $2 ld bc, $2
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -35,12 +35,12 @@ Mansion1Subscript1: ; 442c5 (11:42c5)
Mansion1Script_44304: ; 44304 (11:4304) Mansion1Script_44304: ; 44304 (11:4304)
ld a, $2d ld a, $2d
ld [wd09f], a ld [wNewTileBlockID], a
jr Mansion1ReplaceBlock jr Mansion1ReplaceBlock
Mansion1Script_4430b: ; 4430b (11:430b) Mansion1Script_4430b: ; 4430b (11:430b)
ld a, $e ld a, $e
ld [wd09f], a ld [wNewTileBlockID], a
Mansion1ReplaceBlock: ; 44310 (11:4310) Mansion1ReplaceBlock: ; 44310 (11:4310)
predef ReplaceTileBlock predef ReplaceTileBlock
ret ret

View file

@ -38,7 +38,7 @@ Mansion2Script_51fee: ; 51fee (14:5fee)
ret ret
Mansion2Script_5202f: ; 5202f (14:602f) Mansion2Script_5202f: ; 5202f (14:602f)
ld [wd09f], a ld [wNewTileBlockID], a
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
Mansion2Script_Switches: ; 52037 (14:6037) Mansion2Script_Switches: ; 52037 (14:6037)

View file

@ -26,7 +26,7 @@ RocketHideout1Script_44be0: ; 44be0 (11:4be0)
.asm_44c01 .asm_44c01
ld a, $e ld a, $e
.asm_44c03 .asm_44c03
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $080c ld bc, $080c
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -26,7 +26,7 @@ RocketHideout4Script_45473: ; 45473 (11:5473)
.asm_45496 .asm_45496
ld a, $e ld a, $e
.asm_45498 .asm_45498
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $050c ld bc, $050c
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -19,7 +19,7 @@ SilphCo10Script_5a14f: ; 5a14f (16:614f)
CheckEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR CheckEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR
ret nz ret nz
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $405 ld bc, $405
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -19,7 +19,7 @@ SilphCo11Script_62110: ; 62110 (18:6110)
CheckEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR CheckEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR
ret nz ret nz
ld a, $20 ld a, $20
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $603 ld bc, $603
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -20,7 +20,7 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07)
jr nz, .asm_59d2e jr nz, .asm_59d2e
push af push af
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0202 ld bc, $0202
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -28,7 +28,7 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07)
CheckEventAfterBranchReuseA EVENT_SILPH_CO_2_UNLOCKED_DOOR2, EVENT_SILPH_CO_2_UNLOCKED_DOOR1 CheckEventAfterBranchReuseA EVENT_SILPH_CO_2_UNLOCKED_DOOR2, EVENT_SILPH_CO_2_UNLOCKED_DOOR1
ret nz ret nz
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0502 ld bc, $0502
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -20,7 +20,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71)
jr nz, .asm_59f98 jr nz, .asm_59f98
push af push af
ld a, $5f ld a, $5f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $404 ld bc, $404
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -28,7 +28,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71)
CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
ret nz ret nz
ld a, $5f ld a, $5f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $408 ld bc, $408
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -20,7 +20,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21)
jr nz, .asm_19d48 jr nz, .asm_19d48
push af push af
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0602 ld bc, $0602
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -28,7 +28,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21)
CheckEventAfterBranchReuseA EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 CheckEventAfterBranchReuseA EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1
ret nz ret nz
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0406 ld bc, $0406
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -20,7 +20,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
jr nz, .asm_19f74 jr nz, .asm_19f74
push af push af
ld a, $5f ld a, $5f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0203 ld bc, $0203
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -29,7 +29,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
jr nz, .asm_19f87 jr nz, .asm_19f87
push af push af
ld a, $5f ld a, $5f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0603 ld bc, $0603
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -37,7 +37,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR2 CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR2
ret nz ret nz
ld a, $5f ld a, $5f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0507 ld bc, $0507
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -19,7 +19,7 @@ SilphCo6Script_1a1bf: ; 1a1bf (6:61bf)
CheckEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR CheckEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR
ret nz ret nz
ld a, $5f ld a, $5f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $0602 ld bc, $0602
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -20,7 +20,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77)
jr nz, .asm_51b9e jr nz, .asm_51b9e
push af push af
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $305 ld bc, $305
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -29,7 +29,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77)
jr nz, .asm_51bb1 jr nz, .asm_51bb1
push af push af
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $20a ld bc, $20a
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -37,7 +37,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77)
CheckEventAfterBranchReuseA EVENT_SILPH_CO_7_UNLOCKED_DOOR3, EVENT_SILPH_CO_7_UNLOCKED_DOOR2 CheckEventAfterBranchReuseA EVENT_SILPH_CO_7_UNLOCKED_DOOR3, EVENT_SILPH_CO_7_UNLOCKED_DOOR2
ret nz ret nz
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $60a ld bc, $60a
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -19,7 +19,7 @@ SilphCo8Script_5651a: ; 5651a (15:651a)
CheckEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR CheckEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR
ret nz ret nz
ld a, $5f ld a, $5f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $403 ld bc, $403
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -20,7 +20,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
jr nz, .asm_5d7f8 jr nz, .asm_5d7f8
push af push af
ld a, $5f ld a, $5f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $401 ld bc, $401
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -29,7 +29,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
jr nz, .asm_5d80b jr nz, .asm_5d80b
push af push af
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $209 ld bc, $209
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -38,7 +38,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
jr nz, .asm_5d81e jr nz, .asm_5d81e
push af push af
ld a, $54 ld a, $54
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $509 ld bc, $509
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
@ -46,7 +46,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR4, EVENT_SILPH_CO_9_UNLOCKED_DOOR3 CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR4, EVENT_SILPH_CO_9_UNLOCKED_DOOR3
ret nz ret nz
ld a, $5f ld a, $5f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $605 ld bc, $605
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -37,7 +37,7 @@ VermilionGymScript_5ca6d: ; 5ca6d (17:4a6d)
call PlaySound call PlaySound
ld a, $5 ld a, $5
.asm_5ca7f .asm_5ca7f
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $202 ld bc, $202
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -14,7 +14,7 @@ VictoryRoad1Script: ; 5da0a (17:5a0a)
CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
ret z ret z
ld a, $1d ld a, $1d
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $604 ld bc, $604
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -33,7 +33,7 @@ VictoryRoad2Script_517c9: ; 517c9 (14:57c9)
ld bc, $70b ld bc, $70b
VictoryRoad2Script_517e2: ; 517e2 (14:57e2) VictoryRoad2Script_517e2: ; 517e2 (14:57e2)
ld [wd09f], a ld [wNewTileBlockID], a
predef ReplaceTileBlock predef ReplaceTileBlock
ret ret

View file

@ -16,7 +16,7 @@ VictoryRoad3Script_44996: ; 44996 (11:4996)
CheckEventHL EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1 CheckEventHL EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
ret z ret z
ld a, $1d ld a, $1d
ld [wd09f], a ld [wNewTileBlockID], a
ld bc, $503 ld bc, $503
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -409,7 +409,11 @@ wSlotMachineSavedROMBank:: ; cc5e
ds 12 ds 12
wcc6b:: ds 14 ; doesn't seem to be used for anything, probably just more storage wcc6b:: ds 14 ; doesn't seem to be used for anything, probably just more storage
wcc79:: ds 30 ; used in battle animations
wAnimPalette:: ; cc79
ds 1
ds 29
wNPCMovementDirections2:: ; cc97 wNPCMovementDirections2:: ; cc97
@ -647,6 +651,13 @@ wOverrideSimulatedJoypadStatesMask:: ; cd3b
ds 1 ds 1
wFallingObjectsMovementData:: ; cd3d
; up to 20 bytes (one byte for each falling object)
wSavedY:: ; cd3d
wTempSCX:: ; cd3d
wBattleTransitionCircleScreenQuadrantY:: ; cd3d wBattleTransitionCircleScreenQuadrantY:: ; cd3d
; 0 = upper half (Y < 9) ; 0 = upper half (Y < 9)
; 1 = lower half (Y >= 9) ; 1 = lower half (Y >= 9)
@ -1050,9 +1061,13 @@ wLearningMovesFromDayCare:: ; cee9
; whether WriteMonMoves is being used to make a mon learn moves from day care ; whether WriteMonMoves is being used to make a mon learn moves from day care
; non-zero if so ; non-zero if so
wChangeMonPicEnemyTurnSpecies:: ; cee9
wHPBarMaxHP:: ; cee9 wHPBarMaxHP:: ; cee9
ds 1 ds 1
wChangeMonPicPlayerTurnSpecies:: ; ceea
wEvoNewSpecies:: ; ceea wEvoNewSpecies:: ; ceea
ds 1 ds 1
@ -1554,12 +1569,34 @@ W_NUMFBTILES:: ; d089
; number of tiles in current battle animation frame block ; number of tiles in current battle animation frame block
ds 1 ds 1
wFlashScreenLongCounter:: ; d08a
wSpiralBallsBaseY:: ; d08a
wFallingObjectMovementByte:: ; d08a
; bits 0-6: index into FallingObjects_DeltaXs array (0 - 8)
; bit 7: direction; 0 = right, 1 = left
wNumShootingBalls:: ; d08a
wTradedMonMovingRight:: ; d08a wTradedMonMovingRight:: ; d08a
; $01 if mon is moving from left gameboy to right gameboy; $00 if vice versa ; $01 if mon is moving from left gameboy to right gameboy; $00 if vice versa
wOptionsInitialized:: ; d08a wOptionsInitialized:: ; d08a
wd08a:: ds 1 ; used with sprites and displaying the option menu on the main menu screen? wNewSlotMachineBallTile:: ; d08a
wCoordAdjustmentAmount:: ; d08a
; how much to add to the X/Y coord
wUnusedD08A:: ; d08a
ds 1
wSpiralBallsBaseX:: ; d08b
wNumFallingObjects:: ; d08b
wSlideMonDelay:: ; d08b
wAnimCounter:: ; d08b wAnimCounter:: ; d08b
; generic counter variable for various animations ; generic counter variable for various animations
@ -1601,13 +1638,17 @@ W_SUBANIMSUBENTRYADDR:: ; d096
ds 2 ds 2
wd09a:: ds 1 ; used with the battle transition screen when entering a battle (screen slowly draws into black) wOutwardSpiralTileMapPointer:: ; d09a
ds 1
wPartyMenuAnimMonEnabled:: ; d09b
wTownMapSpriteBlinkingEnabled:: ; d09b wTownMapSpriteBlinkingEnabled:: ; d09b
; non-zero when enabled. causes nest locations to blink on and off. ; non-zero when enabled. causes nest locations to blink on and off.
; the town selection cursor will blink regardless of what this value is ; the town selection cursor will blink regardless of what this value is
wd09b:: ds 1 ; also used with battle transition screen and move animations wUnusedD09B:: ; d09b
ds 1
W_FBDESTADDR:: ; d09c W_FBDESTADDR:: ; d09c
; current destination address in OAM for frame blocks (big endian) ; current destination address in OAM for frame blocks (big endian)
@ -1625,9 +1666,28 @@ W_FBMODE:: ; d09e
; contain the upper and lower bit of each of the 8 pixels, respectively ; contain the upper and lower bit of each of the 8 pixels, respectively
ds 1 ds 1
wLinkCableAnimBulgeToggle:: ; d09f
; 0 = small
; 1 = big
wIntroNidorinoBaseTile:: ; d09f
wOutwardSpiralCurrentDirection:: ; d09f
wDropletTile:: ; d09f
wNewTileBlockID:: ; d09f wNewTileBlockID:: ; d09f
wd09f:: ds 1 ; used with predef ReplaceTileBlock wWhichBattleAnimTileset:: ; d09f
wSquishMonCurrentDirection:: ; d09f
; 0 = left
; 1 = right
wSlideMonUpBottomRowLeftTile:: ; d09f
; the tile ID of the leftmost tile in the bottom row in AnimationSlideMonUp_
ds 1
wDisableVBlankWYUpdate:: ds 1 ; if non-zero, don't update WY during V-blank wDisableVBlankWYUpdate:: ds 1 ; if non-zero, don't update WY during V-blank
W_SPRITECURPOSX:: ; d0a1 W_SPRITECURPOSX:: ; d0a1