mirror of
https://github.com/pret/pokepinball.git
synced 2024-11-23 13:49:42 +00:00
More wram.asm labeling and cleanup
This commit is contained in:
parent
da545c3609
commit
f8b61dfb14
@ -554,7 +554,7 @@ SendHighScores: ; 0xced1
|
||||
; Sends high scores, and plays the animation for sending the high scores.
|
||||
ld hl, SendHighScoresAnimationData
|
||||
ld de, wSendHighScoresAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
ld bc, $4800
|
||||
ld a, [wSendHighScoresAnimationFrame]
|
||||
call LoadOAMData
|
||||
@ -587,7 +587,7 @@ SendHighScores: ; 0xced1
|
||||
|
||||
.asm_cf0e
|
||||
ld hl, SendHighScoresAnimationData
|
||||
ld de, wSendHighScoresAnimationFrameCounter
|
||||
ld de, wSendHighScoresAnimation
|
||||
call UpdateAnimation
|
||||
jr nc, .continueAttempts
|
||||
ld bc, $4800
|
||||
@ -598,12 +598,12 @@ SendHighScores: ; 0xced1
|
||||
call LoadOAMData
|
||||
call CleanOAMBuffer
|
||||
call Func_1ca1
|
||||
ld a, [wSendHighScoresAnimationFrameIndex]
|
||||
ld a, [wSendHighScoresAnimationIndex]
|
||||
cp $6
|
||||
jr nz, .continueAttempts
|
||||
ld hl, SendHighScoresAnimationData
|
||||
ld de, wSendHighScoresAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
.continueAttempts
|
||||
pop bc
|
||||
ld a, [wd8ea]
|
||||
|
@ -49,7 +49,7 @@ InitBallBlueField: ; 0x1c08d
|
||||
ld [wNumPoliwagTriples], a
|
||||
ld [wNumPsyduckTriples], a
|
||||
ld [wNumSpinnerTurns], a
|
||||
ld [wd62e], a
|
||||
ld [wNumPikachuSaves], a
|
||||
ld [wd613], a
|
||||
inc a
|
||||
ld [wd482], a
|
||||
|
@ -38,7 +38,7 @@ InitBallMeowthBonusStage: ; 0x24059
|
||||
xor a
|
||||
ld [wMeowthAnimationFrame], a
|
||||
ld [wd6ec], a
|
||||
ld [wMeowthAnimationFrameIndex], a
|
||||
ld [wMeowthAnimationIndex], a
|
||||
ld [wd70b], a
|
||||
ld [wd70c], a
|
||||
ld a, $c8
|
||||
|
@ -54,7 +54,7 @@ InitBallRedField: ; 0x3007d
|
||||
ld [wNumDugtrioTriples], a
|
||||
ld [wNumCAVECompletions], a
|
||||
ld [wNumSpinnerTurns], a
|
||||
ld [wd62e], a
|
||||
ld [wNumPikachuSaves], a
|
||||
ld [wd613], a
|
||||
inc a
|
||||
ld [wd482], a
|
||||
|
@ -688,8 +688,8 @@ BallCaptureInit: ; 0x10496
|
||||
call LoadVRAMData
|
||||
call LoadShakeBallGfx
|
||||
ld hl, BallCaptureAnimationData
|
||||
ld de, wBallCaptureAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wBallCaptureAnimation
|
||||
call InitAnimation
|
||||
ld a, $1
|
||||
ld [wCapturingMon], a
|
||||
xor a
|
||||
@ -755,9 +755,9 @@ CapturePokemon: ; 0x1052d
|
||||
call PlaySoundEffect
|
||||
.asm_10541
|
||||
ld hl, BallCaptureAnimationData
|
||||
ld de, wBallCaptureAnimationFrameCounter
|
||||
ld de, wBallCaptureAnimation
|
||||
call UpdateAnimation
|
||||
ld a, [wBallCaptureAnimationFrameIndex]
|
||||
ld a, [wBallCaptureAnimationIndex]
|
||||
cp $1
|
||||
jr nz, .asm_1055d
|
||||
ld a, [wBallCaptureAnimationFrameCounter]
|
||||
@ -768,7 +768,7 @@ CapturePokemon: ; 0x1052d
|
||||
ret
|
||||
|
||||
.asm_1055d
|
||||
ld a, [wBallCaptureAnimationFrameIndex]
|
||||
ld a, [wBallCaptureAnimationIndex]
|
||||
cp $15
|
||||
ret nz
|
||||
ld a, [wBallCaptureAnimationFrameCounter]
|
||||
@ -810,13 +810,13 @@ CapturePokemon: ; 0x1052d
|
||||
callba z, IncrementBonusMultiplier ; increments bonus multiplier every 10 pokemon caught
|
||||
.notMaxed
|
||||
call SetPokemonOwnedFlag
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
cp $3
|
||||
ret z
|
||||
inc a
|
||||
ld [wd625], a
|
||||
ld [wNumPokeballs], a
|
||||
ld a, $80
|
||||
ld [wd626], a
|
||||
ld [wPokeballBlinkingCounter], a
|
||||
ret
|
||||
|
||||
BallCaptureAnimationData: ; 0x105e4
|
||||
@ -1275,7 +1275,7 @@ Func_108f5: ; 0x108f5
|
||||
ld hl, BlankSaverSpaceTileDataRedField
|
||||
ld a, BANK(BlankSaverSpaceTileDataRedField)
|
||||
call Func_10aa
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
callba Func_174d4
|
||||
ld hl, CaughtPokeballTileDataPointers
|
||||
ld a, BANK(CaughtPokeballTileDataPointers)
|
||||
@ -1405,7 +1405,7 @@ Func_109fc: ; 0x109fc
|
||||
ld hl, BlankSaverSpaceTileDataBlueField
|
||||
ld a, BANK(BlankSaverSpaceTileDataBlueField)
|
||||
call Func_10aa
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
callba Func_174d4
|
||||
ld hl, Data_10a88
|
||||
ld a, BANK(Data_10a88)
|
||||
|
@ -109,7 +109,7 @@ Func_1f408: ; 0x1f408
|
||||
ld hl, hSCY
|
||||
sub [hl]
|
||||
ld c, a
|
||||
ld a, [wd633]
|
||||
ld a, [wSlowpokeAnimationFrame]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, OAMIds_1f425
|
||||
@ -130,7 +130,7 @@ Func_1f428: ; 0x1f428
|
||||
ld hl, hSCY
|
||||
sub [hl]
|
||||
ld c, a
|
||||
ld a, [wd638]
|
||||
ld a, [wCloysterAnimationFrame]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, OAMIds_1f445
|
||||
|
@ -5,7 +5,7 @@ _LoadStageDataBlueFieldTop: ; 0x1c165
|
||||
call Func_1e8f6
|
||||
callba Func_142fc
|
||||
ld a, $1
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
call Func_1f18a
|
||||
callba Func_1404a
|
||||
call Func_1c203
|
||||
@ -30,13 +30,13 @@ _LoadStageDataBlueFieldBottom: ; 0x1c191
|
||||
ret
|
||||
|
||||
Func_1c1db: ; 0x1c1db
|
||||
ld a, [wd641]
|
||||
ld a, [wBlueStageForceFieldFlippedDown]
|
||||
cp $0
|
||||
ret z
|
||||
ld a, $1
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
ld a, $0
|
||||
ld [wd641], a
|
||||
ld [wBlueStageForceFieldFlippedDown], a
|
||||
ld a, [wBlueStageForceFieldDirection]
|
||||
cp $2 ; down direction
|
||||
ret nz
|
||||
@ -372,7 +372,7 @@ Func_1c43c: ; 0x1c43c
|
||||
ret
|
||||
|
||||
.asm_1c458
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
call Func_1f265
|
||||
ld a, BANK(CaughtPokeballGfx)
|
||||
ld hl, CaughtPokeballGfx
|
||||
|
@ -321,7 +321,7 @@ Func_14282: ; 0x14282
|
||||
ret
|
||||
|
||||
.asm_1429e
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
call Func_174d4
|
||||
ld a, BANK(CaughtPokeballGfx)
|
||||
ld hl, CaughtPokeballGfx
|
||||
|
@ -234,7 +234,7 @@ Func_1c8b6: ; 0x1c8b6
|
||||
ld a, $1 ; right direction
|
||||
ld [wBlueStageForceFieldDirection], a
|
||||
ld [wd64b], a
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
jr .asm_1c99e
|
||||
|
||||
.asm_1c947
|
||||
@ -262,17 +262,17 @@ Func_1c8b6: ; 0x1c8b6
|
||||
ld [wBlueStageForceFieldDirection], a
|
||||
ld [wd64b], a
|
||||
ld a, $1
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
jr .asm_1c99e
|
||||
|
||||
.asm_1c97f
|
||||
ld a, [wd641]
|
||||
ld a, [wBlueStageForceFieldFlippedDown]
|
||||
and a
|
||||
jr nz, .asm_1c993
|
||||
xor a
|
||||
ld [wBlueStageForceFieldDirection], a
|
||||
ld a, $1
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
ld [wd64a], a
|
||||
jr .asm_1c99e
|
||||
|
||||
@ -280,7 +280,7 @@ Func_1c8b6: ; 0x1c8b6
|
||||
ld a, $2 ; down direction
|
||||
ld [wBlueStageForceFieldDirection], a
|
||||
ld a, $1
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
ret
|
||||
|
||||
.asm_1c99e
|
||||
@ -313,18 +313,18 @@ ResolveShellderCollision: ; 0x1c9c1
|
||||
xor a
|
||||
ld [wWhichShellder], a
|
||||
call Func_1ca29
|
||||
ld a, [wd641]
|
||||
ld a, [wBlueStageForceFieldFlippedDown]
|
||||
and a
|
||||
jr nz, .asm_1c9f2
|
||||
ld a, $1
|
||||
ld [wd641], a
|
||||
ld [wBlueStageForceFieldFlippedDown], a
|
||||
ld a, [wBlueStageForceFieldDirection]
|
||||
cp $0 ; up direction
|
||||
jr nz, .asm_1c9f2
|
||||
ld a, $2 ; down direction
|
||||
ld [wBlueStageForceFieldDirection], a
|
||||
ld a, $1
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
ld a, $3
|
||||
ld [wd64c], a
|
||||
ld [wd64d], a
|
||||
@ -1616,8 +1616,8 @@ ResolveBlueStagePikachuCollision: ; 0x1d0a1
|
||||
jr nz, .asm_1d0fc
|
||||
.asm_1d0c9
|
||||
ld hl, PikachuSaverAnimationDataRedStage
|
||||
ld de, wPikachuSaverAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wPikachuSaverAnimation
|
||||
call InitAnimation
|
||||
ld a, [wPikachuSaverSlotRewardActive]
|
||||
and a
|
||||
jr nz, .asm_1d0dc
|
||||
@ -1639,8 +1639,8 @@ ResolveBlueStagePikachuCollision: ; 0x1d0a1
|
||||
|
||||
.asm_1d0fc
|
||||
ld hl, PikachuSaverAnimation2DataRedStage
|
||||
ld de, wPikachuSaverAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wPikachuSaverAnimation
|
||||
call InitAnimation
|
||||
ld a, $2
|
||||
ld [wd51c], a
|
||||
lb de, $00, $3b
|
||||
@ -1669,10 +1669,10 @@ Func_1d133: ; 0x1d133
|
||||
cp $1
|
||||
jr nz, .asm_1d1ae
|
||||
ld hl, PikachuSaverAnimationDataRedStage
|
||||
ld de, wPikachuSaverAnimationFrameCounter
|
||||
ld de, wPikachuSaverAnimation
|
||||
call UpdateAnimation
|
||||
ret nc
|
||||
ld a, [wPikachuSaverAnimationFrameIndex]
|
||||
ld a, [wPikachuSaverAnimationIndex]
|
||||
cp $1
|
||||
jr nz, .asm_1d18c
|
||||
xor a
|
||||
@ -1687,7 +1687,7 @@ Func_1d133: ; 0x1d133
|
||||
ld [wd803], a
|
||||
ld a, $60
|
||||
ld [wd804], a
|
||||
ld hl, wd62e
|
||||
ld hl, wNumPikachuSaves
|
||||
call Increment_Max100
|
||||
jr nc, .asm_1d185
|
||||
ld c, $a
|
||||
@ -1699,7 +1699,7 @@ Func_1d133: ; 0x1d133
|
||||
ret
|
||||
|
||||
.asm_1d18c
|
||||
ld a, [wPikachuSaverAnimationFrameIndex]
|
||||
ld a, [wPikachuSaverAnimationIndex]
|
||||
cp $11
|
||||
ret nz
|
||||
ld a, $fc
|
||||
@ -1716,10 +1716,10 @@ Func_1d133: ; 0x1d133
|
||||
cp $2
|
||||
jr nz, .asm_1d1c7
|
||||
ld hl, PikachuSaverAnimation2DataRedStage
|
||||
ld de, wPikachuSaverAnimationFrameCounter
|
||||
ld de, wPikachuSaverAnimation
|
||||
call UpdateAnimation
|
||||
ret nc
|
||||
ld a, [wPikachuSaverAnimationFrameIndex]
|
||||
ld a, [wPikachuSaverAnimationIndex]
|
||||
cp $1
|
||||
ret nz
|
||||
xor a
|
||||
@ -1788,8 +1788,8 @@ ResolveSlowpokeCollision: ; 0x1d216
|
||||
lb de, $00, $05
|
||||
call PlaySoundEffect
|
||||
ld hl, SlowpokeCollisionAnimationData ; 0x1d312
|
||||
ld de, wd632
|
||||
call CopyHLToDE
|
||||
ld de, wSlowpokeAnimation
|
||||
call InitAnimation
|
||||
xor a
|
||||
ld [wBallXVelocity], a
|
||||
ld [wBallXVelocity + 1], a
|
||||
@ -1801,22 +1801,22 @@ ResolveSlowpokeCollision: ; 0x1d216
|
||||
ld [wd549], a
|
||||
.asm_1d253
|
||||
ld hl, SlowpokeCollisionAnimationData ; 0x1d312
|
||||
ld de, wd632
|
||||
ld de, wSlowpokeAnimation
|
||||
call UpdateAnimation
|
||||
push af
|
||||
ld a, [wd632]
|
||||
ld a, [wSlowpokeAnimation]
|
||||
and a
|
||||
jr nz, .asm_1d271
|
||||
ld a, $19
|
||||
ld [wd632], a
|
||||
ld [wSlowpokeAnimationFrameCounter], a
|
||||
xor a
|
||||
ld [wd633], a
|
||||
ld [wSlowpokeAnimationFrame], a
|
||||
ld a, $6
|
||||
ld [wd634], a
|
||||
ld [wSlowpokeAnimationIndex], a
|
||||
.asm_1d271
|
||||
pop af
|
||||
ret nc
|
||||
ld a, [wd634]
|
||||
ld a, [wSlowpokeAnimationIndex]
|
||||
cp $1
|
||||
jr nz, .asm_1d2b6
|
||||
xor a
|
||||
@ -1842,7 +1842,7 @@ ResolveSlowpokeCollision: ; 0x1d216
|
||||
ret
|
||||
|
||||
.asm_1d2b6
|
||||
ld a, [wd634]
|
||||
ld a, [wSlowpokeAnimationIndex]
|
||||
cp $4
|
||||
jr nz, .asm_1d2c3
|
||||
ld a, $1
|
||||
@ -1850,7 +1850,7 @@ ResolveSlowpokeCollision: ; 0x1d216
|
||||
ret
|
||||
|
||||
.asm_1d2c3
|
||||
ld a, [wd634]
|
||||
ld a, [wSlowpokeAnimationIndex]
|
||||
cp $5
|
||||
ret nz
|
||||
ld a, $1
|
||||
@ -1875,11 +1875,11 @@ ResolveSlowpokeCollision: ; 0x1d216
|
||||
ld [wd64c], a
|
||||
ld [wd64d], a
|
||||
ld a, $1
|
||||
ld [wd641], a
|
||||
ld [wBlueStageForceFieldFlippedDown], a
|
||||
ld a, $2 ; down direction
|
||||
ld [wBlueStageForceFieldDirection], a
|
||||
ld a, $1
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
ret
|
||||
|
||||
SlowpokeCollisionAnimationData: ; 0x1d312
|
||||
@ -1910,8 +1910,8 @@ ResolveCloysterCollision: ; 0x1d32d
|
||||
lb de, $00, $05
|
||||
call PlaySoundEffect
|
||||
ld hl, CloysterCollisionAnimationData
|
||||
ld de, wd637
|
||||
call CopyHLToDE
|
||||
ld de, wCloysterAnimation
|
||||
call InitAnimation
|
||||
xor a
|
||||
ld [wBallXVelocity], a
|
||||
ld [wBallXVelocity + 1], a
|
||||
@ -1923,22 +1923,22 @@ ResolveCloysterCollision: ; 0x1d32d
|
||||
ld [wd549], a
|
||||
.asm_1d36a
|
||||
ld hl, CloysterCollisionAnimationData
|
||||
ld de, wd637
|
||||
ld de, wCloysterAnimation
|
||||
call UpdateAnimation
|
||||
push af
|
||||
ld a, [wd637]
|
||||
ld a, [wCloysterAnimationFrameCounter]
|
||||
and a
|
||||
jr nz, .asm_1d388
|
||||
ld a, $19
|
||||
ld [wd637], a
|
||||
ld [wCloysterAnimationFrameCounter], a
|
||||
xor a
|
||||
ld [wd638], a
|
||||
ld [wCloysterAnimationFrame], a
|
||||
ld a, $6
|
||||
ld [wd639], a
|
||||
ld [wCloysterAnimationIndex], a
|
||||
.asm_1d388
|
||||
pop af
|
||||
ret nc
|
||||
ld a, [wd639]
|
||||
ld a, [wCloysterAnimationIndex]
|
||||
cp $1
|
||||
jr nz, .asm_1d3cb
|
||||
xor a
|
||||
@ -1964,7 +1964,7 @@ ResolveCloysterCollision: ; 0x1d32d
|
||||
ret
|
||||
|
||||
.asm_1d3cb
|
||||
ld a, [wd639]
|
||||
ld a, [wCloysterAnimationIndex]
|
||||
cp $4
|
||||
jr nz, .asm_1d3d8
|
||||
ld a, $1
|
||||
@ -1972,7 +1972,7 @@ ResolveCloysterCollision: ; 0x1d32d
|
||||
ret
|
||||
|
||||
.asm_1d3d8
|
||||
ld a, [wd639]
|
||||
ld a, [wCloysterAnimationIndex]
|
||||
cp $5
|
||||
ret nz
|
||||
ld a, $1
|
||||
@ -1992,11 +1992,11 @@ ResolveCloysterCollision: ; 0x1d32d
|
||||
ld [wd64c], a
|
||||
ld [wd64d], a
|
||||
ld a, $1
|
||||
ld [wd641], a
|
||||
ld [wBlueStageForceFieldFlippedDown], a
|
||||
ld a, $2 ; down direction
|
||||
ld [wBlueStageForceFieldDirection], a
|
||||
ld a, $1
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
ret
|
||||
|
||||
CloysterCollisionAnimationData: ; 0x1d41d
|
||||
@ -5841,7 +5841,7 @@ Func_1e830: ; 0x1e830
|
||||
ret
|
||||
|
||||
.asm_1e84b
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
cp $3
|
||||
jr nz, .asm_1e891
|
||||
ld a, [wd607]
|
||||
@ -5852,9 +5852,9 @@ Func_1e830: ; 0x1e830
|
||||
and a
|
||||
jr nz, .asm_1e867
|
||||
xor a
|
||||
ld [wd625], a
|
||||
ld [wNumPokeballs], a
|
||||
ld a, $40
|
||||
ld [wd626], a
|
||||
ld [wPokeballBlinkingCounter], a
|
||||
.asm_1e867
|
||||
xor a
|
||||
ld [wBonusStageSlotRewardActive], a
|
||||
@ -7770,7 +7770,7 @@ Func_1f124: ; 0x1f124
|
||||
ret
|
||||
|
||||
Func_1f18a: ; 0x1f18a
|
||||
ld a, [wd640]
|
||||
ld a, [wBlueStageForceFieldGfxNeedsLoading]
|
||||
cp $0
|
||||
jr z, .asm_1f1b4
|
||||
ld a, [wBlueStageForceFieldDirection]
|
||||
@ -7792,7 +7792,7 @@ Func_1f18a: ; 0x1f18a
|
||||
ld a, Bank(TileDataPointers_1f1b5)
|
||||
call Func_10aa
|
||||
ld a, $0
|
||||
ld [wd640], a
|
||||
ld [wBlueStageForceFieldGfxNeedsLoading], a
|
||||
.asm_1f1b4
|
||||
ret
|
||||
|
||||
@ -7989,16 +7989,16 @@ Func_1f265: ; 0x1f265
|
||||
ret
|
||||
|
||||
Func_1f27b: ; 0x1f27b
|
||||
ld a, [wd624]
|
||||
ld hl, wd625
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
ld hl, wNumPokeballs
|
||||
cp [hl]
|
||||
ret z
|
||||
ld a, [wd626]
|
||||
ld a, [wPokeballBlinkingCounter]
|
||||
dec a
|
||||
ld [wd626], a
|
||||
ld [wPokeballBlinkingCounter], a
|
||||
jr nz, .asm_1f2a5
|
||||
ld a, [wd625]
|
||||
ld [wd624], a
|
||||
ld a, [wNumPokeballs]
|
||||
ld [wPreviousNumPokeballs], a
|
||||
cp $3
|
||||
jr c, .asm_1f2a0
|
||||
ld a, $1
|
||||
@ -8006,22 +8006,22 @@ Func_1f27b: ; 0x1f27b
|
||||
ld a, $3
|
||||
ld [wd607], a
|
||||
.asm_1f2a0
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_1f2a5
|
||||
and $7
|
||||
ret nz
|
||||
ld a, [wd626]
|
||||
ld a, [wPokeballBlinkingCounter]
|
||||
bit 3, a
|
||||
jr nz, .asm_1f2b4
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_1f2b4
|
||||
ld a, [wd625]
|
||||
ld a, [wNumPokeballs]
|
||||
scf
|
||||
ret
|
||||
|
||||
|
@ -180,8 +180,8 @@ Func_19c52: ; 0x19c52
|
||||
cp NUM_DIGLETTS
|
||||
jr nz, .asm_19cc8
|
||||
ld hl, AnimationData_1ac75
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wDugtrioAnimation
|
||||
call InitAnimation
|
||||
ld a, $1
|
||||
ld [wDugrioState], a
|
||||
call Func_1ac2c
|
||||
@ -540,8 +540,8 @@ Func_1aad4: ; 0x1aad4
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wDugtrioAnimation
|
||||
call InitAnimation
|
||||
ld bc, FiveMillionPoints
|
||||
callba AddBigBCD6FromQueue
|
||||
lb de, $00, $36
|
||||
@ -571,7 +571,7 @@ Func_1ab30: ; 0x1ab30
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
ld de, wDugtrioAnimation
|
||||
call UpdateAnimation
|
||||
ret nc
|
||||
ld a, [wDugrioState]
|
||||
@ -579,12 +579,12 @@ Func_1ab30: ; 0x1ab30
|
||||
ret z
|
||||
cp $1
|
||||
jr nz, .asm_1ab64
|
||||
ld a, [wDugtrioAnimationFrameIndex]
|
||||
ld a, [wDugtrioAnimationIndex]
|
||||
cp $3
|
||||
ret nz
|
||||
ld hl, AnimationData_1ac75
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wDugtrioAnimation
|
||||
call InitAnimation
|
||||
ld a, $1
|
||||
ld [wDugrioState], a
|
||||
ret
|
||||
@ -592,12 +592,12 @@ Func_1ab30: ; 0x1ab30
|
||||
.asm_1ab64
|
||||
cp $2
|
||||
jr nz, .asm_1ab7d
|
||||
ld a, [wDugtrioAnimationFrameIndex]
|
||||
ld a, [wDugtrioAnimationIndex]
|
||||
cp $1
|
||||
ret nz
|
||||
ld hl, AnimationData_1ac7f
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wDugtrioAnimation
|
||||
call InitAnimation
|
||||
ld a, $3
|
||||
ld [wDugrioState], a
|
||||
ret
|
||||
@ -605,12 +605,12 @@ Func_1ab30: ; 0x1ab30
|
||||
.asm_1ab7d
|
||||
cp $3
|
||||
jr nz, .asm_1ab96
|
||||
ld a, [wDugtrioAnimationFrameIndex]
|
||||
ld a, [wDugtrioAnimationIndex]
|
||||
cp $3
|
||||
ret nz
|
||||
ld hl, AnimationData_1ac7f
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wDugtrioAnimation
|
||||
call InitAnimation
|
||||
ld a, $3
|
||||
ld [wDugrioState], a
|
||||
ret
|
||||
@ -618,12 +618,12 @@ Func_1ab30: ; 0x1ab30
|
||||
.asm_1ab96
|
||||
cp $4
|
||||
jr nz, .asm_1abaf
|
||||
ld a, [wDugtrioAnimationFrameIndex]
|
||||
ld a, [wDugtrioAnimationIndex]
|
||||
cp $1
|
||||
ret nz
|
||||
ld hl, AnimationData_1ac89
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wDugtrioAnimation
|
||||
call InitAnimation
|
||||
ld a, $5
|
||||
ld [wDugrioState], a
|
||||
ret
|
||||
@ -631,12 +631,12 @@ Func_1ab30: ; 0x1ab30
|
||||
.asm_1abaf
|
||||
cp $5
|
||||
jr nz, .asm_1abc8
|
||||
ld a, [wDugtrioAnimationFrameIndex]
|
||||
ld a, [wDugtrioAnimationIndex]
|
||||
cp $3
|
||||
ret nz
|
||||
ld hl, AnimationData_1ac89
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wDugtrioAnimation
|
||||
call InitAnimation
|
||||
ld a, $5
|
||||
ld [wDugrioState], a
|
||||
ret
|
||||
@ -644,12 +644,12 @@ Func_1ab30: ; 0x1ab30
|
||||
.asm_1abc8
|
||||
cp $6
|
||||
jr nz, .asm_1abe1
|
||||
ld a, [wDugtrioAnimationFrameIndex]
|
||||
ld a, [wDugtrioAnimationIndex]
|
||||
cp $1
|
||||
ret nz
|
||||
ld hl, AnimationData_1ac93
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wDugtrioAnimation
|
||||
call InitAnimation
|
||||
ld a, $7
|
||||
ld [wDugrioState], a
|
||||
ret
|
||||
@ -657,7 +657,7 @@ Func_1ab30: ; 0x1ab30
|
||||
.asm_1abe1
|
||||
cp $7
|
||||
ret nz
|
||||
ld a, [wDugtrioAnimationFrameIndex]
|
||||
ld a, [wDugtrioAnimationIndex]
|
||||
cp $1
|
||||
jr nz, .asm_1abf2
|
||||
ld de, $0000
|
||||
@ -668,8 +668,8 @@ Func_1ab30: ; 0x1ab30
|
||||
cp $2
|
||||
ret nz
|
||||
ld hl, AnimationData_1ac72
|
||||
ld de, wDugtrioAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wDugtrioAnimation
|
||||
call InitAnimation
|
||||
xor a
|
||||
ld [wDugrioState], a
|
||||
ld [wd498], a
|
||||
|
@ -200,7 +200,7 @@ Func_18464: ; 0x18464
|
||||
dec de
|
||||
dec de
|
||||
ld hl, AnimationData_185e6
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
ld a, $1
|
||||
ld [de], a
|
||||
@ -327,7 +327,7 @@ Func_18562: ; 0x18562
|
||||
ld hl, AnimationData_185dd
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
.asm_1858a
|
||||
@ -374,7 +374,7 @@ Func_18562: ; 0x18562
|
||||
push de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
inc de
|
||||
xor a
|
||||
@ -448,7 +448,7 @@ Func_1860b: ; 0x1860b
|
||||
dec de
|
||||
dec de
|
||||
ld hl, AnimationData_1878a
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
ld a, $1
|
||||
ld [de], a
|
||||
@ -569,7 +569,7 @@ Func_186f7: ; 0x186f7
|
||||
ld hl, AnimationData_18781
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
.asm_1871f
|
||||
@ -608,7 +608,7 @@ Func_186f7: ; 0x186f7
|
||||
push de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
inc de
|
||||
xor a
|
||||
@ -703,7 +703,7 @@ Func_187b1: ; 0x187b1
|
||||
cp $5
|
||||
jr nc, .asm_18804
|
||||
ld hl, AnimationData_18b2b
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
ld a, $2
|
||||
ld [de], a
|
||||
@ -713,7 +713,7 @@ Func_187b1: ; 0x187b1
|
||||
|
||||
.asm_18804
|
||||
ld hl, AnimationData_18b32
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
ld a, $3
|
||||
ld [de], a
|
||||
@ -947,7 +947,7 @@ Func_189af: ; 0x189af
|
||||
ld hl, AnimationData_18a61
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
.asm_189d7
|
||||
@ -960,7 +960,7 @@ Func_189af: ; 0x189af
|
||||
push de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
inc de
|
||||
xor a
|
||||
@ -977,7 +977,7 @@ Func_189af: ; 0x189af
|
||||
push de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
inc de
|
||||
ld a, $1
|
||||
@ -1022,7 +1022,7 @@ Func_189af: ; 0x189af
|
||||
push de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
inc de
|
||||
xor a
|
||||
|
@ -78,8 +78,8 @@ ResolveMeowthBonusGameObjectCollisions: ; 0x2442a
|
||||
ld a, $1
|
||||
ld [wd712], a
|
||||
ld hl, MeowthAnimationData5
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ld a, $4
|
||||
ld [wd6ec], a
|
||||
ret
|
||||
@ -270,16 +270,16 @@ Func_245ab: ; 0x245ab
|
||||
and a
|
||||
jr nz, .asm_24611
|
||||
ld hl, MeowthAnimationData3
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ld a, $2
|
||||
ld [wd6ec], a
|
||||
jr .asm_24651
|
||||
|
||||
.asm_24611
|
||||
ld hl, MeowthAnimationData4
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ld a, $3
|
||||
ld [wd6ec], a
|
||||
jr .asm_24651
|
||||
@ -303,8 +303,8 @@ Func_245ab: ; 0x245ab
|
||||
cp $3
|
||||
jr nz, .asm_24651
|
||||
ld hl, MeowthAnimationData5
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ld a, $4
|
||||
ld [wd6ec], a
|
||||
.asm_24651
|
||||
@ -324,40 +324,40 @@ Func_2465d: ; 0x2465d
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
ld de, wMeowthAnimation
|
||||
call UpdateAnimation
|
||||
ret nc
|
||||
ld a, [wd6ec]
|
||||
and a
|
||||
jr nz, .asm_24689
|
||||
ld a, [wMeowthAnimationFrameIndex]
|
||||
ld a, [wMeowthAnimationIndex]
|
||||
cp $4
|
||||
ret nz
|
||||
ld hl, MeowthAnimationData1
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
.asm_24689
|
||||
cp $1
|
||||
jr nz, .asm_2469d
|
||||
ld a, [wMeowthAnimationFrameIndex]
|
||||
ld a, [wMeowthAnimationIndex]
|
||||
cp $4
|
||||
ret nz
|
||||
ld hl, MeowthAnimationData2
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
.asm_2469d
|
||||
cp $2
|
||||
jr nz, .asm_246b5
|
||||
ld a, [wMeowthAnimationFrameIndex]
|
||||
ld a, [wMeowthAnimationIndex]
|
||||
cp $1
|
||||
ret nz
|
||||
ld hl, MeowthAnimationData1
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
xor a
|
||||
ld [wd6ec], a
|
||||
ret
|
||||
@ -365,12 +365,12 @@ Func_2465d: ; 0x2465d
|
||||
.asm_246b5
|
||||
cp $3
|
||||
jr nz, .asm_246ce
|
||||
ld a, [wMeowthAnimationFrameIndex]
|
||||
ld a, [wMeowthAnimationIndex]
|
||||
cp $1
|
||||
ret nz
|
||||
ld hl, MeowthAnimationData2
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ld a, $1
|
||||
ld [wd6ec], a
|
||||
ret
|
||||
@ -378,12 +378,12 @@ Func_2465d: ; 0x2465d
|
||||
.asm_246ce
|
||||
cp $4
|
||||
jr nz, .asm_24689
|
||||
ld a, [wMeowthAnimationFrameIndex]
|
||||
ld a, [wMeowthAnimationIndex]
|
||||
cp $2
|
||||
ret nz
|
||||
ld hl, MeowthAnimationData5
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
MewothAnimationDataTable: ; 0x246e2
|
||||
@ -847,16 +847,16 @@ Func_248ac: ; 0x248ac
|
||||
cp $ff
|
||||
jr z, .asm_24a21
|
||||
ld hl, MeowthAnimationData2
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ld a, $1
|
||||
ld [wd6ec], a
|
||||
ret
|
||||
|
||||
.asm_24a21
|
||||
ld hl, MeowthAnimationData1
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ld a, $0
|
||||
ld [wd6ec], a
|
||||
ret
|
||||
@ -1473,16 +1473,16 @@ Func_24d07: ; 0x24d07
|
||||
cp $ff
|
||||
jr z, .asm_24e70
|
||||
ld hl, MeowthAnimationData2
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ld a, $1
|
||||
ld [wd6ec], a
|
||||
ret
|
||||
|
||||
.asm_24e70
|
||||
ld hl, MeowthAnimationData1
|
||||
ld de, wMeowthAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wMeowthAnimation
|
||||
call InitAnimation
|
||||
ld a, $0
|
||||
ld [wd6ec], a
|
||||
ret
|
||||
@ -1558,7 +1558,7 @@ Func_24ee7: ; 0x24ee7
|
||||
dec de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
Func_24f00: ; 0x24f00
|
||||
|
@ -372,7 +372,7 @@ Func_19679: ; 0x19679
|
||||
push de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
inc de
|
||||
pop af
|
||||
@ -632,7 +632,7 @@ Func_19876: ; 0x19876
|
||||
push de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
inc de
|
||||
pop af
|
||||
|
@ -4453,8 +4453,8 @@ ResolveBellsproutCollision: ; 0x15e93
|
||||
lb de, $00, $05
|
||||
call PlaySoundEffect
|
||||
ld hl, BellsproutAnimationData
|
||||
ld de, wBellsproutAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wBellsproutAnimation
|
||||
call InitAnimation
|
||||
xor a
|
||||
ld [wBallXVelocity], a
|
||||
ld [wBallXVelocity + 1], a
|
||||
@ -4470,7 +4470,7 @@ ResolveBellsproutCollision: ; 0x15e93
|
||||
ld [wd549], a
|
||||
.asm_15eda
|
||||
ld hl, BellsproutAnimationData
|
||||
ld de, wBellsproutAnimationFrameCounter
|
||||
ld de, wBellsproutAnimation
|
||||
call UpdateAnimation
|
||||
push af
|
||||
ld a, [wBellsproutAnimationFrameCounter]
|
||||
@ -4481,11 +4481,11 @@ ResolveBellsproutCollision: ; 0x15e93
|
||||
xor a
|
||||
ld [wBellsproutAnimationFrame], a
|
||||
ld a, $6
|
||||
ld [wBellsproutAnimationFrameIndex], a
|
||||
ld [wBellsproutAnimationIndex], a
|
||||
.asm_15ef8
|
||||
pop af
|
||||
ret nc
|
||||
ld a, [wBellsproutAnimationFrameIndex]
|
||||
ld a, [wBellsproutAnimationIndex]
|
||||
cp $1
|
||||
jr nz, .asm_15f35
|
||||
xor a
|
||||
@ -4509,7 +4509,7 @@ ResolveBellsproutCollision: ; 0x15e93
|
||||
ret
|
||||
|
||||
.asm_15f35
|
||||
ld a, [wBellsproutAnimationFrameIndex]
|
||||
ld a, [wBellsproutAnimationIndex]
|
||||
cp $4
|
||||
jr nz, .asm_15f42
|
||||
ld a, $1
|
||||
@ -4517,7 +4517,7 @@ ResolveBellsproutCollision: ; 0x15e93
|
||||
ret
|
||||
|
||||
.asm_15f42
|
||||
ld a, [wBellsproutAnimationFrameIndex]
|
||||
ld a, [wBellsproutAnimationIndex]
|
||||
cp $5
|
||||
ret nz
|
||||
ld a, $1
|
||||
@ -5177,7 +5177,7 @@ Func_16352: ; 0x16352
|
||||
ret
|
||||
|
||||
.asm_1636d
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
cp $3
|
||||
jr nz, .asm_163b3
|
||||
ld a, [wd607]
|
||||
@ -5188,9 +5188,9 @@ Func_16352: ; 0x16352
|
||||
and a
|
||||
jr nz, .asm_16389
|
||||
xor a
|
||||
ld [wd625], a
|
||||
ld [wNumPokeballs], a
|
||||
ld a, $40
|
||||
ld [wd626], a
|
||||
ld [wPokeballBlinkingCounter], a
|
||||
.asm_16389
|
||||
xor a
|
||||
ld [wBonusStageSlotRewardActive], a
|
||||
@ -5598,8 +5598,8 @@ ResolveRedStagePikachuCollision: ; 0x1660c
|
||||
jr nz, .asm_16667
|
||||
.asm_16634
|
||||
ld hl, PikachuSaverAnimationDataBlueStage
|
||||
ld de, wPikachuSaverAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wPikachuSaverAnimation
|
||||
call InitAnimation
|
||||
ld a, [wPikachuSaverSlotRewardActive]
|
||||
and a
|
||||
jr nz, .asm_16647
|
||||
@ -5621,8 +5621,8 @@ ResolveRedStagePikachuCollision: ; 0x1660c
|
||||
|
||||
.asm_16667
|
||||
ld hl, PikachuSaverAnimation2DataBlueStage
|
||||
ld de, wPikachuSaverAnimationFrameCounter
|
||||
call CopyHLToDE
|
||||
ld de, wPikachuSaverAnimation
|
||||
call InitAnimation
|
||||
ld a, $2
|
||||
ld [wd51c], a
|
||||
lb de, $00, $3b
|
||||
@ -5651,10 +5651,10 @@ Func_1669e: ; 0x1669e
|
||||
cp $1
|
||||
jr nz, .asm_16719
|
||||
ld hl, PikachuSaverAnimationDataBlueStage
|
||||
ld de, wPikachuSaverAnimationFrameCounter
|
||||
ld de, wPikachuSaverAnimation
|
||||
call UpdateAnimation
|
||||
ret nc
|
||||
ld a, [wPikachuSaverAnimationFrameIndex]
|
||||
ld a, [wPikachuSaverAnimationIndex]
|
||||
cp $1
|
||||
jr nz, .asm_166f7
|
||||
xor a
|
||||
@ -5669,7 +5669,7 @@ Func_1669e: ; 0x1669e
|
||||
ld [wd803], a
|
||||
ld a, $60
|
||||
ld [wd804], a
|
||||
ld hl, wd62e
|
||||
ld hl, wNumPikachuSaves
|
||||
call Increment_Max100
|
||||
jr nc, .asm_166f0
|
||||
ld c, $a
|
||||
@ -5681,7 +5681,7 @@ Func_1669e: ; 0x1669e
|
||||
ret
|
||||
|
||||
.asm_166f7
|
||||
ld a, [wPikachuSaverAnimationFrameIndex]
|
||||
ld a, [wPikachuSaverAnimationIndex]
|
||||
cp $11
|
||||
ret nz
|
||||
ld a, $fc
|
||||
@ -5698,10 +5698,10 @@ Func_1669e: ; 0x1669e
|
||||
cp $2
|
||||
jr nz, .asm_16732
|
||||
ld hl, PikachuSaverAnimation2DataBlueStage
|
||||
ld de, wPikachuSaverAnimationFrameCounter
|
||||
ld de, wPikachuSaverAnimation
|
||||
call UpdateAnimation
|
||||
ret nc
|
||||
ld a, [wPikachuSaverAnimationFrameIndex]
|
||||
ld a, [wPikachuSaverAnimationIndex]
|
||||
cp $1
|
||||
ret nz
|
||||
xor a
|
||||
@ -8655,16 +8655,16 @@ Func_174d4: ; 0x174d4
|
||||
ret
|
||||
|
||||
Func_174ea: ; 0x174ea
|
||||
ld a, [wd624]
|
||||
ld hl, wd625
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
ld hl, wNumPokeballs
|
||||
cp [hl]
|
||||
ret z
|
||||
ld a, [wd626]
|
||||
ld a, [wPokeballBlinkingCounter]
|
||||
dec a
|
||||
ld [wd626], a
|
||||
ld [wPokeballBlinkingCounter], a
|
||||
jr nz, .asm_17514
|
||||
ld a, [wd625]
|
||||
ld [wd624], a
|
||||
ld a, [wNumPokeballs]
|
||||
ld [wPreviousNumPokeballs], a
|
||||
cp $3
|
||||
jr c, .asm_1750f
|
||||
ld a, $1
|
||||
@ -8672,22 +8672,22 @@ Func_174ea: ; 0x174ea
|
||||
ld a, $3
|
||||
ld [wd607], a
|
||||
.asm_1750f
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_17514
|
||||
and $7
|
||||
ret nz
|
||||
ld a, [wd626]
|
||||
ld a, [wPokeballBlinkingCounter]
|
||||
bit 3, a
|
||||
jr nz, .asm_17523
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_17523
|
||||
ld a, [wd625]
|
||||
ld a, [wNumPokeballs]
|
||||
scf
|
||||
ret
|
||||
|
||||
|
@ -227,7 +227,7 @@ Func_25da3: ; 0x25da3
|
||||
dec de
|
||||
push bc
|
||||
ld hl, SeelAnimationData10
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop bc
|
||||
ld hl, wd76e
|
||||
add hl, bc
|
||||
@ -399,7 +399,7 @@ Func_25ec5: ; 0x25ec5
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, SeelAnimationData8
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
.asm_25f05
|
||||
@ -429,7 +429,7 @@ Func_25ec5: ; 0x25ec5
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, SeelAnimationData9
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
SeelSwimmingYOffsets:
|
||||
@ -820,7 +820,7 @@ Func_26137: ; 0x26137
|
||||
push de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
pop de
|
||||
inc de
|
||||
pop af
|
||||
@ -959,7 +959,7 @@ Func_261f9: ; 0x261f9
|
||||
dec de
|
||||
dec de
|
||||
dec de
|
||||
call CopyHLToDE
|
||||
call InitAnimation
|
||||
ret
|
||||
|
||||
Func_26212: ; 0x26212
|
||||
|
@ -4,7 +4,7 @@ Func_ed8e: ; 0xed8e
|
||||
ld [wd804], a
|
||||
ld [wCatchEmOrEvolutionSlotRewardActive], a
|
||||
ld a, [wNumPartyMons]
|
||||
ld [wd620], a
|
||||
ld [wSlotAnyPokemonCaught], a
|
||||
ld a, [wBallType]
|
||||
ld c, a
|
||||
ld b, $0
|
||||
@ -195,7 +195,7 @@ Func_eeee: ; 0xeeee
|
||||
Func_eef9: ; 0xeef9
|
||||
cp $8
|
||||
jr nz, .asm_ef09
|
||||
ld a, [wd620]
|
||||
ld a, [wSlotAnyPokemonCaught]
|
||||
and a
|
||||
jr nz, .asm_ef06
|
||||
ld a, $7
|
||||
|
@ -15,10 +15,10 @@ InitBlueField: ; 0x1c000
|
||||
ld [wd4c9], a
|
||||
ld [wBallType], a
|
||||
ld [wd4c8], a
|
||||
ld hl, wd624
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld hl, wPreviousNumPokeballs
|
||||
ld [hli], a
|
||||
ld [hli], a ; wNumPokeballs
|
||||
ld [hli], a ; wPokeballBlinkingCounter
|
||||
ld [wd7ac], a
|
||||
ld [wd7be], a
|
||||
ld [wCurrentMap], a ; PALLET_TOWN
|
||||
|
@ -25,7 +25,7 @@ InitDiglettBonusStage: ; 0x199f2
|
||||
ld a, $c
|
||||
ld [wDugtrioAnimationFrame], a
|
||||
xor a
|
||||
ld [wDugtrioAnimationFrameIndex], a
|
||||
ld [wDugtrioAnimationIndex], a
|
||||
ld [wDugrioState], a
|
||||
ld a, $11
|
||||
call SetSongBank
|
||||
|
@ -15,10 +15,10 @@ InitRedField: ; 0x30000
|
||||
ld [wd4c9], a
|
||||
ld [wBallType], a
|
||||
ld [wd4c8], a
|
||||
ld hl, wd624
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld hl, wPreviousNumPokeballs
|
||||
ld [hli], a
|
||||
ld [hli], a ; wNumPokeballs
|
||||
ld [hli], a ; wPokeballBlinkingCounter
|
||||
ld [wd7ac], a
|
||||
ld [wd7be], a
|
||||
ld [wCurrentMap], a ; PALLET_TOWN
|
||||
|
27
home.asm
27
home.asm
@ -148,7 +148,7 @@ Start: ; 0x150
|
||||
ld [wd810], a
|
||||
call Func_97a
|
||||
xor a
|
||||
ld [wdaa3], a
|
||||
ld [wBootCheck], a
|
||||
ld a, BANK(Func_1ffc)
|
||||
ld hl, Func_1ffc
|
||||
call BankSwitchSimple
|
||||
@ -239,7 +239,7 @@ SoftReset:
|
||||
ld a, [hGameBoyColorFlag]
|
||||
ld [$fffd], a
|
||||
xor a
|
||||
ld [wdaa3], a
|
||||
ld [wBootCheck], a
|
||||
ld a, $0
|
||||
ld hl, Func_1ffc
|
||||
call BankSwitchSimple
|
||||
@ -298,22 +298,22 @@ VBlank: ; 0x2f2
|
||||
ld a, [hNextFrameHBlankSCY]
|
||||
ld [hHBlankSCY], a
|
||||
call ReadJoypad
|
||||
ld a, [wdaa3]
|
||||
ld a, [wBootCheck]
|
||||
and a
|
||||
jr nz, .asm_359
|
||||
jr nz, .skipBootCheck
|
||||
ld a, [hJoypadState]
|
||||
cp $f
|
||||
jr nz, .asm_359
|
||||
jr nz, .skipBootCheck
|
||||
ld a, [hNewlyPressedButtons]
|
||||
and $f
|
||||
jr z, .asm_359
|
||||
jr z, .skipBootCheck
|
||||
ld hl, [sp+$8]
|
||||
ld [hl], $c3
|
||||
ld [hl], Func_3c3 & $ff
|
||||
inc hl
|
||||
ld [hl], $3
|
||||
ld [hl], Func_3c3 >> 8
|
||||
ld a, $1
|
||||
ld [wdaa3], a
|
||||
.asm_359
|
||||
ld [wBootCheck], a
|
||||
.skipBootCheck
|
||||
ld hl, hNumFramesSinceLastVBlank
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
@ -5057,9 +5057,10 @@ CatchBarTiles:
|
||||
db $80, $AE, $AF, $B0, $B1, $B2, $B3, $80
|
||||
CatchBarTilesEnd:
|
||||
|
||||
CopyHLToDE: ; 0x28a0
|
||||
; Places [hl] into [de]
|
||||
; Also places $0 into [de + 2]
|
||||
InitAnimation: ; 0x28a0
|
||||
; Initializes an OAM animation.
|
||||
; hl = pointer to first frame of animation
|
||||
; de = pointer to destination animation struct
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
inc de
|
||||
|
22
main.asm
22
main.asm
@ -941,7 +941,7 @@ Func_10fe3: ; 0x10fe3
|
||||
ld hl, BlankSaverSpaceTileDataRedField
|
||||
ld a, BANK(BlankSaverSpaceTileDataRedField)
|
||||
call Func_10aa
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
callba Func_174d4
|
||||
ld hl, CaughtPokeballTileDataPointers
|
||||
ld a, BANK(CaughtPokeballTileDataPointers)
|
||||
@ -1078,7 +1078,7 @@ Func_11195: ; 0x11195
|
||||
ld hl, BlankSaverSpaceTileDataBlueField
|
||||
ld a, BANK(BlankSaverSpaceTileDataBlueField)
|
||||
call Func_10aa
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
callba Func_174d4
|
||||
ld hl, Data_10a88
|
||||
ld a, BANK(Data_10a88)
|
||||
@ -2705,7 +2705,7 @@ Func_2070b: ; 0x2070b
|
||||
ld hl, wNumPokemonEvolvedInBallBonus
|
||||
call Increment_Max100
|
||||
callba SetPokemonOwnedFlag
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
cp $3
|
||||
ret z
|
||||
add $2
|
||||
@ -2713,9 +2713,9 @@ Func_2070b: ; 0x2070b
|
||||
jr c, .asm_2074d
|
||||
ld a, $3
|
||||
.asm_2074d
|
||||
ld [wd625], a
|
||||
ld [wNumPokeballs], a
|
||||
ld a, $80
|
||||
ld [wd626], a
|
||||
ld [wPokeballBlinkingCounter], a
|
||||
scf
|
||||
ret
|
||||
|
||||
@ -3434,7 +3434,7 @@ Func_20d30: ; 0x20d30
|
||||
ld hl, wNumPokemonEvolvedInBallBonus
|
||||
call Increment_Max100
|
||||
callba SetPokemonOwnedFlag
|
||||
ld a, [wd624]
|
||||
ld a, [wPreviousNumPokeballs]
|
||||
cp $3
|
||||
ret z
|
||||
add $2
|
||||
@ -3442,9 +3442,9 @@ Func_20d30: ; 0x20d30
|
||||
jr c, .asm_20d72
|
||||
ld a, $3
|
||||
.asm_20d72
|
||||
ld [wd625], a
|
||||
ld [wNumPokeballs], a
|
||||
ld a, $80
|
||||
ld [wd626], a
|
||||
ld [wPokeballBlinkingCounter], a
|
||||
scf
|
||||
ret
|
||||
|
||||
@ -3715,7 +3715,7 @@ Func_20f75: ; 0x20f75
|
||||
ld a, [wIndicatorStates + 3]
|
||||
ld [wd559], a
|
||||
ld a, [wIndicatorStates + 2]
|
||||
ld [wd63f], a
|
||||
ld [wIndicatorState2Backup], a
|
||||
xor a
|
||||
ld [wIndicatorStates], a
|
||||
ld [wIndicatorStates + 2], a
|
||||
@ -3765,7 +3765,7 @@ Func_20fef: ; 0x20fef
|
||||
ld a, [wIndicatorStates + 3]
|
||||
ld [wd559], a
|
||||
ld a, [wIndicatorStates + 2]
|
||||
ld [wd63f], a
|
||||
ld [wIndicatorState2Backup], a
|
||||
xor a
|
||||
ld [wIndicatorStates + 2], a
|
||||
ld [wIndicatorStates + 3], a
|
||||
@ -3862,7 +3862,7 @@ asm_210c7:
|
||||
ld [wIndicatorStates], a
|
||||
ld a, [wd559]
|
||||
ld [wIndicatorStates + 3], a
|
||||
ld a, [wd63f]
|
||||
ld a, [wIndicatorState2Backup]
|
||||
ld [wIndicatorStates + 2], a
|
||||
ld a, [wCurrentStage]
|
||||
bit 0, a
|
||||
|
131
wram.asm
131
wram.asm
@ -1,3 +1,9 @@
|
||||
; OAM Animations use this 3-byte struct.
|
||||
animation: MACRO
|
||||
\1FrameCounter:: ds 1
|
||||
\1Frame:: ds 1
|
||||
\1Index:: ds 1
|
||||
endm
|
||||
|
||||
SECTION "WRAM Bank 0", WRAM0
|
||||
|
||||
@ -412,14 +418,8 @@ wBellsproutCollision:: ; 0xd4fb
|
||||
; Second byte is set by HandleGameObjectCollision, but is unused
|
||||
ds $2
|
||||
|
||||
wBellsproutAnimationFrameCounter:: ; 0xd4fd
|
||||
ds $1
|
||||
|
||||
wBellsproutAnimationFrame:: ; 0xd4fe
|
||||
ds $1
|
||||
|
||||
wBellsproutAnimationFrameIndex:: ; 0xd4ff
|
||||
ds $1
|
||||
wBellsproutAnimation:: ; 0xd4fd
|
||||
animation wBellsproutAnimation
|
||||
|
||||
wStaryuCollision:: ; 0xd500
|
||||
; Second byte is set by HandleGameObjectCollision, but is unused
|
||||
@ -486,14 +486,8 @@ wPikachuSaverCharge:: ; 0xd517
|
||||
wd518:: ; 0xd518
|
||||
ds $1
|
||||
|
||||
wPikachuSaverAnimationFrameCounter:: ; 0xd519
|
||||
ds $1
|
||||
|
||||
wPikachuSaverAnimationFrame:: ; 0xd51a
|
||||
ds $1
|
||||
|
||||
wPikachuSaverAnimationFrameIndex:: ; 0xd51b
|
||||
ds $1
|
||||
wPikachuSaverAnimation:: ; 0xd519
|
||||
animation wPikachuSaverAnimation
|
||||
|
||||
wd51c:: ; 0xd51c
|
||||
ds $1
|
||||
@ -773,14 +767,8 @@ wCapturingMon:: ; 0xd5f3
|
||||
; Set to 1 when the capturing animation starts.
|
||||
ds $1
|
||||
|
||||
wBallCaptureAnimationFrameCounter:: ; 0xd5f4
|
||||
ds $1
|
||||
|
||||
wBallCaptureAnimationFrame:: ; 0xd5f5
|
||||
ds $1
|
||||
|
||||
wBallCaptureAnimationFrameIndex:: ; 0xd5f6
|
||||
ds $1
|
||||
wBallCaptureAnimation:: ; 0xd5f4
|
||||
animation wBallCaptureAnimation
|
||||
|
||||
wWhichPinballUpgradeTrigger:: ; 0xd5f7
|
||||
ds $1
|
||||
@ -884,7 +872,8 @@ wd61e:: ; 0xd61e
|
||||
wCurSlotBonus:: ; 0xd61f
|
||||
ds $1
|
||||
|
||||
wd620:: ; 0xd620
|
||||
wSlotAnyPokemonCaught:: ; 0xd620
|
||||
; Used by the slot logic to store whether or not any pokemon are caught.
|
||||
ds $1
|
||||
|
||||
wd621:: ; 0xd621
|
||||
@ -899,14 +888,24 @@ wBonusStageSlotRewardActive:: ; 0xd623
|
||||
; Set to 1 when the "Go To Bonus" Slot Reward is received.
|
||||
ds $1
|
||||
|
||||
wd624:: ; 0xd624
|
||||
wPreviousNumPokeballs:: ; 0xd624
|
||||
; See wNumPokeballs. This holds the previous number of them to handle the blinking
|
||||
; animation, so that it only blinks the newly-acquired pokeballs.
|
||||
ds $1
|
||||
|
||||
wd625:: ; 0xd625
|
||||
wNumPokeballs:: ; 0xd625
|
||||
; The number of Pokeballs that appear directly underneath the billboard area.
|
||||
; When you get 3 of these, the bonus stage opens up. This number is increased
|
||||
; when doing things like catching of evolving a pokemon.
|
||||
ds $1
|
||||
|
||||
wd626:: ; 0xd626
|
||||
ds $2
|
||||
wPokeballBlinkingCounter:: ; 0xd626
|
||||
; Counts the number of frames left in the blinking pokeballs animation.
|
||||
; These Pokeballs are located underneath the billboard area, and blink after
|
||||
; doing things such as catching or evolving a pokemon.
|
||||
ds $1
|
||||
|
||||
ds $1 ; unused byte
|
||||
|
||||
wNumPokemonCaughtInBallBonus:: ; 0xd628
|
||||
; Counts the number of pokemon caught in a single ball bonus.
|
||||
@ -932,7 +931,9 @@ wNumSpinnerTurns:: ; 0xd62d
|
||||
; Counts the number of spinner turns in a single ball bonus.
|
||||
ds $1
|
||||
|
||||
wd62e:: ; 0xd62e
|
||||
wNumPikachuSaves:: ; 0xd62e
|
||||
; Counts the number of times the ball was saved by a charged Pikachu.
|
||||
; This is unused, but was probably intended to be used in the Ball Bonus.
|
||||
ds $1
|
||||
|
||||
wNumMewtwoBonusCompletions:: ; 0xd62f
|
||||
@ -942,27 +943,15 @@ wSlowpokeCollision:: ; 0xd630
|
||||
; Second byte is set by HandleGameObjectCollision, but is unused
|
||||
ds $2
|
||||
|
||||
wd632:: ; 0xd632
|
||||
ds $1
|
||||
|
||||
wd633:: ; 0xd633
|
||||
ds $1
|
||||
|
||||
wd634:: ; 0xd634
|
||||
ds $1
|
||||
wSlowpokeAnimation:: ; 0xd632
|
||||
animation wSlowpokeAnimation
|
||||
|
||||
wCloysterCollision:: ; 0xd635
|
||||
; Second byte is set by HandleGameObjectCollision, but is unused
|
||||
ds $2
|
||||
|
||||
wd637:: ; 0xd637
|
||||
ds $1
|
||||
|
||||
wd638:: ; 0xd638
|
||||
ds $1
|
||||
|
||||
wd639:: ; 0xd639
|
||||
ds $1
|
||||
wCloysterAnimation:: ; 0xd637
|
||||
animation wCloysterAnimation
|
||||
|
||||
wNumSlowpokeEntries:: ; 0xd63a
|
||||
; Counts the number of times Slowpoke was entered without triggering Evolution mode.
|
||||
@ -983,13 +972,15 @@ wNumPoliwagTriples:: ; 0xd63d
|
||||
wBlueStageForceFieldDirection:: ; 0xd63e
|
||||
ds $1
|
||||
|
||||
wd63f:: ; 0xd63f
|
||||
wIndicatorState2Backup:: ; 0xd63f
|
||||
ds $1
|
||||
|
||||
wd640:: ; 0xd640
|
||||
wBlueStageForceFieldGfxNeedsLoading:: ; 0xd640
|
||||
; A flag to signal that the force field arrow graphics need to be updated because
|
||||
; it recently changed direction.
|
||||
ds $1
|
||||
|
||||
wd641:: ; 0xd641
|
||||
wBlueStageForceFieldFlippedDown:: ; 0xd641
|
||||
ds $1
|
||||
|
||||
wd642:: ; 0xd642
|
||||
@ -1295,14 +1286,8 @@ wd6e6:: ; 0xd6e6
|
||||
wd6e7:: ; 0xd6e7
|
||||
ds $2
|
||||
|
||||
wMeowthAnimationFrameCounter:: ; 0xd6e9
|
||||
ds $1
|
||||
|
||||
wMeowthAnimationFrame:: ; 0xd6ea
|
||||
ds $1
|
||||
|
||||
wMeowthAnimationFrameIndex:: ; 0xd6eb
|
||||
ds $1
|
||||
wMeowthAnimation:: ; 0xd6e9
|
||||
animation wMeowthAnimation
|
||||
|
||||
wd6ec:: ; 0xd6ec
|
||||
ds $1
|
||||
@ -1517,14 +1502,8 @@ wDiglettInitDelayCounter:: ; 0xd75e
|
||||
wd75f:: ; 0xd75f
|
||||
ds $2
|
||||
|
||||
wDugtrioAnimationFrameCounter:: ; 0xd761
|
||||
ds $1
|
||||
|
||||
wDugtrioAnimationFrame:: ; 0xd762
|
||||
ds $1
|
||||
|
||||
wDugtrioAnimationFrameIndex:: ; 0xd763
|
||||
ds $1
|
||||
wDugtrioAnimation:: ; 0xd761
|
||||
animation wDugtrioAnimation
|
||||
|
||||
wDugrioState:: ; 0xd764
|
||||
ds $1
|
||||
@ -2181,7 +2160,9 @@ wCurrentScreen:: ; 0xd8f1
|
||||
ds $1
|
||||
|
||||
wScreenState:: ; 0xd8f2
|
||||
ds $4
|
||||
ds $1
|
||||
|
||||
ds $3
|
||||
|
||||
wd8f6:: ; 0xd8f6
|
||||
ds $12
|
||||
@ -2390,14 +2371,8 @@ wda85:: ; 0xda85
|
||||
wda86:: ; 0xda86
|
||||
ds $1
|
||||
|
||||
wSendHighScoresAnimationFrameCounter:: ; 0xda87
|
||||
ds $1
|
||||
|
||||
wSendHighScoresAnimationFrame:: ; 0xda88
|
||||
ds $1
|
||||
|
||||
wSendHighScoresAnimationFrameIndex:: ; 0xda89
|
||||
ds $1
|
||||
wSendHighScoresAnimation:: ; 0xda87
|
||||
animation wSendHighScoresAnimation
|
||||
|
||||
wda8a:: ; 0xda8a
|
||||
ds $2
|
||||
@ -2429,11 +2404,11 @@ wdaa1:: ; 0xdaa1
|
||||
wdaa2:: ; 0xdaa2
|
||||
ds $1
|
||||
|
||||
wdaa3:: ; 0xdaa3
|
||||
ds $20a
|
||||
wBootCheck:: ; 0xdaa3
|
||||
; Used to do a single check during first VBLANK.
|
||||
ds $1
|
||||
|
||||
wdcad:: ; 0xdcad
|
||||
ds $53
|
||||
; $25c bytes of free space
|
||||
|
||||
SECTION "Audio RAM", WRAMX [$dd00], BANK [1]
|
||||
wdd00:: ; 0xdd00
|
||||
|
Loading…
Reference in New Issue
Block a user