diff options
author | Marcus Huderle <huderlem@gmail.com> | 2017-09-10 11:02:18 -0700 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2017-09-10 11:02:18 -0700 |
commit | 2122a2925f422ea2c59c54d4021c0001f928ec52 (patch) | |
tree | be1f5515337a357259b2f57dcf9a0a341fac07ea | |
parent | 6f3015b8721b9149e9cc5c536ab66df83bf9f1c7 (diff) |
Label routines and some wram addresses for evolution mode
13 files changed, 316 insertions, 312 deletions
diff --git a/engine/pinball_game/catchem_mode.asm b/engine/pinball_game/catchem_mode.asm index cec2dbe..f67f1d5 100644 --- a/engine/pinball_game/catchem_mode.asm +++ b/engine/pinball_game/catchem_mode.asm @@ -1121,7 +1121,7 @@ Func_107b0: ; 0x107b0 callba LoadSlotCaveCoverGraphics_RedField
ret
-Func_107c2: ; 0x107c2
+OpenSlotCave: ; 0x107c2
ld a, $1e
ld [wFramesUntilSlotCaveOpens], a
ret
@@ -1271,7 +1271,7 @@ Func_10871: ; 0x10871 Func_108f5: ; 0x108f5
call ResetIndicatorStates
- call Func_107c2
+ call OpenSlotCave
call SetLeftAndRightAlleyArrowIndicatorStates_RedField
call Func_107e9
ld a, [wCurrentStage]
@@ -1402,7 +1402,7 @@ Func_1098c: ; 0x1098c Func_109fc: ; 0x109fc
call ResetIndicatorStates
- call Func_107c2
+ call OpenSlotCave
callba SetLeftAndRightAlleyArrowIndicatorStates_BlueField
ld a, [wCurrentStage]
bit 0, a
diff --git a/engine/pinball_game/draw_sprites/draw_blue_field_sprites.asm b/engine/pinball_game/draw_sprites/draw_blue_field_sprites.asm index 72b0eb4..dc9cce7 100644 --- a/engine/pinball_game/draw_sprites/draw_blue_field_sprites.asm +++ b/engine/pinball_game/draw_sprites/draw_blue_field_sprites.asm @@ -189,7 +189,7 @@ PikachuSaverOAMOffsets_BlueStage: dw $7E92
DrawEvolutionIndicatorArrows_BlueFieldTop: ; 0x1f48f
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret nz
ld a, [hNumFramesDropped]
@@ -201,7 +201,7 @@ DrawEvolutionIndicatorArrows_BlueFieldTop: ; 0x1f48f jr DrawEvolutionIndicatorArrows_BlueField
DrawEvolutionIndicatorArrows_BlueFieldBottom: ; 0x1f4a3
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret nz
ld a, [hNumFramesDropped]
@@ -281,7 +281,7 @@ EvolutionIndicatorArrowsOAM_BlueFieldBottom: ; 0x1f4e0 db $37
DrawEvolutionTrinket_BlueFieldTop: ; 0x1f4f8
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret z
ld de, wd566
@@ -291,7 +291,7 @@ DrawEvolutionTrinket_BlueFieldTop: ; 0x1f4f8 jr DrawEvolutionTrinket_BlueField
DrawEvolutionTrinket_BlueFieldBottom: ; 0x1f509
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret z
ld de, wd572
diff --git a/engine/pinball_game/draw_sprites/draw_diglett_bonus_sprites.asm b/engine/pinball_game/draw_sprites/draw_diglett_bonus_sprites.asm index a0dded5..d602d01 100644 --- a/engine/pinball_game/draw_sprites/draw_diglett_bonus_sprites.asm +++ b/engine/pinball_game/draw_sprites/draw_diglett_bonus_sprites.asm @@ -1,10 +1,10 @@ DrawSpritesDiglettBonus: ; 0x1ac98
callba DrawFlippers
callba DrawPinball
- call Func_1acb0
+ call DrawDugtrio
ret
-Func_1acb0: ; 0x1acb0
+DrawDugtrio: ; 0x1acb0
ld a, $40
ld hl, hSCX
sub [hl]
diff --git a/engine/pinball_game/draw_sprites/draw_red_field_sprites.asm b/engine/pinball_game/draw_sprites/draw_red_field_sprites.asm index 2ddf83a..3242a39 100644 --- a/engine/pinball_game/draw_sprites/draw_red_field_sprites.asm +++ b/engine/pinball_game/draw_sprites/draw_red_field_sprites.asm @@ -335,7 +335,7 @@ Func_17e5e: ; 0x17e5e INCLUDE "engine/pinball_game/draw_sprites/draw_pinball.asm"
DrawEvolutionIndicatorArrows_RedFieldTop: ; 0x17efb
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret nz
ld a, [hNumFramesDropped]
@@ -347,7 +347,7 @@ DrawEvolutionIndicatorArrows_RedFieldTop: ; 0x17efb jr DrawEvolutionIndicatorArrows_RedField
DrawEvolutionIndicatorArrows_RedFieldBottom: ; 0x17f0f
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret nz
ld a, [hNumFramesDropped]
@@ -423,7 +423,7 @@ EvolutionIndicatorArrowsOAM_RedFieldBottom: db $37 ; oam id
DrawEvolutionTrinket_RedFieldTop: ; 0x17f64
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret z
ld de, wd566
@@ -433,7 +433,7 @@ DrawEvolutionTrinket_RedFieldTop: ; 0x17f64 jr DrawEvolutionTrinket_RedField
DrawEvolutionTrinket_RedFieldBottom: ; 0x17f75
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret z
ld de, wd572
diff --git a/engine/pinball_game/evolution_mode.asm b/engine/pinball_game/evolution_mode.asm index 705bcd8..89f0e66 100755 --- a/engine/pinball_game/evolution_mode.asm +++ b/engine/pinball_game/evolution_mode.asm @@ -32,7 +32,7 @@ ConcludeEvolutionMode: ; 0x10ac8 ld [wWildMonIsHittable], a
ld [wNumberOfCatchModeTilesFlipped], a
ld [wNumMonHits], a
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
ld [wd554], a
call ClearWildMonCollisionMask
callba StopTimer
@@ -90,16 +90,16 @@ VideoData_10b2a: ; 0x10b2a dw $8900
dw $E0
-Func_10b3f: ; 0x10b3f
+ShowStartEvolutionModeText: ; 0x10b3f
call FillBottomMessageBufferWithBlackTile
call EnableBottomText
ld hl, wScrollingText1
ld a, [wCurrentEvolutionType]
cp EVO_EXPERIENCE
ld de, StartTrainingText
- jr z, .asm_10b55
+ jr z, .showText
ld de, FindItemsText
-.asm_10b55
+.showText
call LoadScrollingText
ret
@@ -455,8 +455,8 @@ InitEvolutionModeForMon: ; 0x10d1d ld [wCurrentEvolutionType], a
xor a
ld [wd554], a
- ld [wd556], a
- ld [wd557], a
+ ld [wEvolutionTrinketCooldownFrames], a
+ ld [wEvolutionTrinketCooldownFrames + 1], a
ld hl, wd55c
ld a, $1
ld b, $3
@@ -493,7 +493,7 @@ InitEvolutionModeForMon: ; 0x10d1d dec b
jr nz, .asm_10dc0
callba InitBallSaverForCatchEmMode
- call Func_10b3f
+ call ShowStartEvolutionModeText
call Func_3579
ld a, [wCurrentStage]
bit 0, a
@@ -511,10 +511,10 @@ InitEvolutionModeForMon: ; 0x10d1d .asm_10e09
ret
-Func_10e0a: ; 0x10e0a
+ShowMonEvolvedText: ; 0x10e0a
ld a, [wCurrentEvolutionMon]
cp $ff
- jp z, Func_10e8b
+ jp z, EvolutionSpecialBonus
ld c, a
ld b, $0
sla c
@@ -558,16 +558,15 @@ Func_10e0a: ; 0x10e0a pop hl
ld de, wBottomMessageText + $20
ld b, $0
-.asm_10e67
+.loadMonNameLoop
ld a, [hli]
and a
- jr z, .asm_10e70
+ jr z, .continue
ld [de], a
inc de
inc b
- jr .asm_10e67
-
-.asm_10e70
+ jr .loadMonNameLoop
+.continue
ld a, $20
ld [de], a
inc de
@@ -585,7 +584,7 @@ Func_10e0a: ; 0x10e0a ld [wScrollingText2StopOffset], a
ret
-Func_10e8b: ; 0x10e8b
+EvolutionSpecialBonus: ; 0x10e8b
ld bc, OneMillionPoints
callba AddBigBCD6FromQueue
ld bc, $0100
@@ -637,7 +636,7 @@ StartEvolutionMode_RedField: ; 0x10ebb call SetPokemonSeenFlag
ld a, [wCurrentStage]
bit 0, a
- jr nz, .asm_10f0b
+ jr nz, .bottom
ld a, BANK(EvolutionTrinketsGfx)
ld hl, EvolutionTrinketsGfx
ld de, vTilesSH tile $10
@@ -645,7 +644,7 @@ StartEvolutionMode_RedField: ; 0x10ebb call LoadOrCopyVRAMData
ret
-.asm_10f0b
+.bottom
ld a, BANK(EvolutionTrinketsGfx)
ld hl, EvolutionTrinketsGfx
ld de, vTilesOB tile $20
@@ -694,7 +693,7 @@ IndicatorStates_10fd0: ; 0x10fd0 ConcludeEvolutionMode_RedField: ; 0x10fe3
call ResetIndicatorStates
- call Func_107c2
+ call OpenSlotCave
call SetLeftAndRightAlleyArrowIndicatorStates_RedField
call Func_107e9
ld a, [wCurrentStage]
@@ -773,7 +772,7 @@ StartEvolutionMode_BlueField: ; 0x11061 call SetPokemonSeenFlag
ld a, [wCurrentStage]
bit 0, a
- jr nz, .asm_110bd
+ jr nz, .bottom
ld a, BANK(EvolutionTrinketsGfx)
ld hl, EvolutionTrinketsGfx
ld de, vTilesOB tile $60
@@ -781,7 +780,7 @@ StartEvolutionMode_BlueField: ; 0x11061 call LoadOrCopyVRAMData
ret
-.asm_110bd
+.bottom
ld a, BANK(EvolutionTrinketsGfx)
ld hl, EvolutionTrinketsGfx
ld de, vTilesOB tile $20
@@ -832,7 +831,7 @@ ConcludeEvolutionMode_BlueField: ; 0x11195 xor a
ld [wd643], a
call ResetIndicatorStates
- call Func_107c2
+ call OpenSlotCave
callba SetLeftAndRightAlleyArrowIndicatorStates_BlueField
ld a, [wCurrentStage]
bit 0, a
diff --git a/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm b/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm index 7c19ff1..4d35601 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm @@ -1,44 +1,44 @@ HandleBlueEvoModeCollision: ; 0x20bae
ld a, [wSpecialModeCollisionID]
cp SPECIAL_COLLISION_SHELLDER
- jp z, Func_20e34
+ jp z, HandleShellderCollision_EvolutionMode
cp SPECIAL_COLLISION_LEFT_TRIGGER
- jp z, Func_21089
+ jp z, HandleLeftTriggerCollision_EvolutionMode_BlueField
cp SPECIAL_COLLISION_CLOYSTER
- jp z, Func_20e5e
+ jp z, HandleCloysterCollision_EvolutionMode
cp SPECIAL_COLLISION_SLOWPOKE
- jp z, Func_20e82
+ jp z, HandleSlowpokeCollision_EvolutionMode
cp SPECIAL_COLLISION_POLIWAG
- jp z, Func_20ea6
+ jp z, HandlePoliwagCollision_EvolutionMode
cp SPECIAL_COLLISION_PSYDUCK
- jp z, Func_20ec7
+ jp z, HandlePsyduckCollision_EvolutionMode
cp SPECIAL_COLLISION_LEFT_BONUS_MULTIPLIER
- jp z, Func_20ee8
+ jp z, HandleLeftBonusMultiplierCollision_EvolutionMode_BlueField
cp SPECIAL_COLLISION_RIGHT_BONUS_MULTIPLIER
- jp z, Func_20f09
+ jp z, HandleRightBonusMultiplierCollision_EvolutionMode_BlueField
cp SPECIAL_COLLISION_BALL_UPGRADE
- jp z, Func_20f2a
+ jp z, HandleBallUpgradeCollision_EvolutionMode_BlueField
cp SPECIAL_COLLISION_SPINNER
- jp z, Func_20f4b
+ jp z, HandleSpinnerCollision_EvolutionMode_BlueField
cp SPECIAL_COLLISION_SLOT_HOLE
- jp z, Func_2112a
+ jp z, HandleSlotCaveCollision_EvolutionMode_BlueField
cp SPECIAL_COLLISION_RIGHT_TRIGGER
- jp z, Func_2105c
+ jp z, HandleRightTriggerCollision_EvolutionMode_BlueField
cp SPECIAL_COLLISION_NOTHING
- jr z, .asm_20bf3
+ jr z, .noCollision
scf
ret
-
-.asm_20bf3
- call Func_20da0
+.noCollision
+ call CheckIfEvolutionModeTimerExpired_BlueField
ld a, [wSpecialModeState]
call CallInFollowingTable
-PointerTable_20bfc: ; 0x20bfc
- padded_dab Func_20c08
- padded_dab Func_20d30
- padded_dab Func_20d7c
+EvolutionModeCallTable_BlueField: ; 0x20bfc
+ padded_dab HandleEvolutionMode_BlueField
+ padded_dab CompleteEvolutionMode_BlueField
+ padded_dab FailEvolutionMode_BlueField
-Func_20c08: ; 0x20c08
+HandleEvolutionMode_BlueField: ; 0x20c08
+; Handles the logic for what happens when an evolution trinket is collected.
ld a, [wCurrentStage]
ld b, a
ld a, [wd578]
@@ -58,8 +58,8 @@ Func_20c08: ; 0x20c08 ret z
xor a
ld [hl], a
- ld [wd551], a
- call Func_20c76
+ ld [wEvolutionObjectsDisabled], a
+ call ProgressEvolution
ld a, [wd558]
ld [wIndicatorStates], a
ld a, [wd559]
@@ -86,10 +86,10 @@ Func_20c08: ; 0x20c08 scf
ret
-Func_20c76: ; 0x20c76
+ProgressEvolution: ; 0x20c76
ld a, [wCurrentStage]
bit 0, a
- jr z, .asm_20ca6
+ jr z, .top
ld a, [wCurrentEvolutionType]
dec a
ld c, a
@@ -112,7 +112,7 @@ Func_20c76: ; 0x20c76 ld bc, $0020
ld a, BANK(EvolutionProgressIconsGfx)
call LoadVRAMData
-.asm_20ca6
+.top
ld a, [wd554]
inc a
ld [wd554], a
@@ -172,7 +172,7 @@ Func_20c76: ; 0x20c76 callba LoadSlotCaveCoverGraphics_BlueField
ret
-Func_20d30: ; 0x20d30
+CompleteEvolutionMode_BlueField: ; 0x20d30
callba RestoreBallSaverAfterCatchEmMode
callba PlaceEvolutionInParty
callba ConcludeEvolutionMode
@@ -195,7 +195,7 @@ Func_20d30: ; 0x20d30 scf
ret
-Func_20d7c: ; 0x20d7c
+FailEvolutionMode_BlueField: ; 0x20d7c
ld a, [wBottomTextEnabled]
and a
ret nz
@@ -207,21 +207,21 @@ Func_20d7c: ; 0x20d7c scf
ret
-Func_20da0: ; 0x20da0
- ld hl, wd556
+CheckIfEvolutionModeTimerExpired_BlueField: ; 0x20da0
+ ld hl, wEvolutionTrinketCooldownFrames
ld a, [hli]
ld c, a
ld b, [hl]
or b
- jr z, .asm_20db3
+ jr z, .cooldownNotEnding
dec bc
ld a, b
ld [hld], a
ld [hl], c
or c
- jr nz, .asm_20db3
- call Func_21079
-.asm_20db3
+ jr nz, .cooldownNotEnding
+ call EndEvolutionTrinketCooldown_BlueField
+.cooldownNotEnding
callba PlayLowTimeSfx
ld a, [wTimeRanOut]
and a
@@ -247,7 +247,7 @@ Func_20da0: ; 0x20da0 ld [wIndicatorStates + 7], a
ld [wd558], a
ld [wd559], a
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
ld a, [wCurrentStage]
bit 0, a
jr z, .asm_20e1a
@@ -262,36 +262,36 @@ Func_20da0: ; 0x20da0 call LoadScrollingText
ret
-Func_20e34: ; 0x20e34
+HandleShellderCollision_EvolutionMode: ; 0x20e34
ld bc, $0001
ld de, $5000
call AddBCDEToJackpot
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20e5c
+ jr nz, .disabled
ld a, [wIndicatorStates + 9]
and a
- jr z, .asm_20e5c
+ jr z, .disabled
xor a
ld [wIndicatorStates + 9], a
ld a, [wd55c]
and a
ld a, $0
ld [wd55c], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
-.asm_20e5c
+.disabled
scf
ret
-Func_20e5e: ; 0x20e5e
- ld a, [wd551]
+HandleCloysterCollision_EvolutionMode: ; 0x20e5e
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20e80
+ jr nz, .disabled
ld a, [wIndicatorStates + 3]
and a
- jr z, .asm_20e80
+ jr z, .disabled
xor a
ld [wIndicatorStates + 3], a
ld [wIndicatorStates + 10], a
@@ -299,20 +299,20 @@ Func_20e5e: ; 0x20e5e and a
ld a, $0
ld [wd562], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
-.asm_20e80
+.disabled
scf
ret
-Func_20e82: ; 0x20e82
- ld a, [wd551]
+HandleSlowpokeCollision_EvolutionMode: ; 0x20e82
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20ea4
+ jr nz, .disabled
ld a, [wIndicatorStates + 8]
and a
- jr z, .asm_20ea4
+ jr z, .disabled
xor a
ld [wIndicatorStates + 8], a
ld [wIndicatorStates + 2], a
@@ -320,143 +320,144 @@ Func_20e82: ; 0x20e82 and a
ld a, $0
ld [wd561], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
-.asm_20ea4
+.disabled
scf
ret
-Func_20ea6: ; 0x20ea6
- ld a, [wd551]
+HandlePoliwagCollision_EvolutionMode: ; 0x20ea6
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20ec5
+ jr nz, .disabled
ld a, [wIndicatorStates + 13]
and a
- jr z, .asm_20ec5
+ jr z, .disabled
xor a
ld [wIndicatorStates + 13], a
ld a, [wd55d]
and a
ld a, $0
ld [wd55d], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
-.asm_20ec5
+.disabled
scf
ret
-Func_20ec7: ; 0x20ec7
- ld a, [wd551]
+HandlePsyduckCollision_EvolutionMode: ; 0x20ec7
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20ee6
+ jr nz, .disabled
ld a, [wIndicatorStates + 14]
and a
- jr z, .asm_20ee6
+ jr z, .disabled
xor a
ld [wIndicatorStates + 14], a
ld a, [wd55e]
and a
ld a, $0
ld [wd55e], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
-.asm_20ee6
+.disabled
scf
ret
-Func_20ee8: ; 0x20ee8
- ld a, [wd551]
+HandleLeftBonusMultiplierCollision_EvolutionMode_BlueField: ; 0x20ee8
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20f07
+ jr nz, .disabled
ld a, [wIndicatorStates + 11]
and a
- jr z, .asm_20f07
+ jr z, .disabled
xor a
ld [wIndicatorStates + 11], a
ld a, [wd55f]
and a
ld a, $0
ld [wd55f], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
-.asm_20f07
+.disabled
scf
ret
-Func_20f09: ; 0x20f09
- ld a, [wd551]
+HandleRightBonusMultiplierCollision_EvolutionMode_BlueField: ; 0x20f09
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20f28
+ jr nz, .disabled
ld a, [wIndicatorStates + 12]
and a
- jr z, .asm_20f28
+ jr z, .disabled
xor a
ld [wIndicatorStates + 12], a
ld a, [wd560]
and a
ld a, $0
ld [wd560], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
-.asm_20f28
+.disabled
scf
ret
-Func_20f2a: ; 0x20f2a
- ld a, [wd551]
+HandleBallUpgradeCollision_EvolutionMode_BlueField: ; 0x20f2a
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20f49
+ jr nz, .disabled
ld a, [wIndicatorStates + 6]
and a
- jr z, .asm_20f49
+ jr z, .disabled
xor a
ld [wIndicatorStates + 6], a
ld a, [wd565]
and a
ld a, $0
ld [wd565], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
-.asm_20f49
+.disabled
scf
ret
-Func_20f4b: ; 0x20f4b
+HandleSpinnerCollision_EvolutionMode_BlueField: ; 0x20f4b
ld bc, $0000
ld de, $1500
call AddBCDEToJackpot
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20f73
+ jr nz, .disabled
ld a, [wIndicatorStates + 7]
and a
- jr z, .asm_20f73
+ jr z, .disabled
xor a
ld [wIndicatorStates + 7], a
ld a, [wd564]
and a
ld a, $0
ld [wd564], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
-.asm_20f73
+.disabled
scf
ret
-Func_20f75: ; 0x20f75
+CreateEvolutionTrinket_BlueField: ; 0x20f75
+; Makes an evolution trinket appear somewhere randomly on the pinball table.
lb de, $07, $46
call PlaySoundEffect
- call Func_2111d
+ call ChooseNextEvolutionTrinketLocation_BlueField
ld a, [wCurrentEvolutionType]
ld [hl], a
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
ld a, [wIndicatorStates]
ld [wd558], a
ld a, [wIndicatorStates + 3]
@@ -499,11 +500,13 @@ Func_20f75: ; 0x20f75 scf
ret
-Func_20fef: ; 0x20fef
+EvolutionTrinketNotFound_BlueField: ; 0x20fef
+; Shows that an evolution trinket isn't available from hitting whichever object that generated this event.
+; Disables the ability to find more evolution trinkets for several seconds.
lb de, $07, $47
call PlaySoundEffect
ld a, $1
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
ld a, [wIndicatorStates]
ld [wd558], a
ld a, $80
@@ -520,9 +523,9 @@ Func_20fef: ; 0x20fef bit 0, a
callba nz, Func_1c2cb
ld a, $58
- ld [wd556], a
+ ld [wEvolutionTrinketCooldownFrames], a
ld a, $2
- ld [wd557], a
+ ld [wEvolutionTrinketCooldownFrames + 1], a
ld bc, ThreeHundredThousandPoints
callba AddBigBCD6FromQueue
call FillBottomMessageBufferWithBlackTile
@@ -538,38 +541,38 @@ Func_20fef: ; 0x20fef scf
ret
-Func_2105c: ; 0x2105c
- ld a, [wd551]
+HandleRightTriggerCollision_EvolutionMode_BlueField: ; 0x2105c
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr z, .asm_21077
+ jr z, .evolutionObjectsEnabled
ld a, [wIndicatorStates + 1]
and a
- jr z, .asm_21077
+ jr z, .evolutionObjectsEnabled
ld bc, TenThousandPoints
callba AddBigBCD6FromQueue
- jr asm_210c7
+ jr RecoverPokemon_BlueField
-.asm_21077
+.evolutionObjectsEnabled
scf
ret
-Func_21079: ; 0x21079
- ld a, [wd551]
+EndEvolutionTrinketCooldown_BlueField: ; 0x21079
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr z, .asm_21087
+ jr z, .evolutionObjectsEnabled
ld a, [wIndicatorStates + 1]
and a
- jr z, .asm_21087
- jr asm_210c7
+ jr z, .evolutionObjectsEnabled
+ jr RecoverPokemon_BlueField
-.asm_21087
+.evolutionObjectsEnabled
scf
ret
-Func_21089: ; 0x21089
- ld a, [wd551]
+HandleLeftTriggerCollision_EvolutionMode_BlueField: ; 0x21089
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_210aa
+ jr nz, .disabled
ld a, [wIndicatorStates]
and a
jr z, .asm_210a8
@@ -579,32 +582,32 @@ Func_21089: ; 0x21089 and a
ld a, $0
ld [wd563], a
- jp nz, Func_20f75
- jp Func_20fef
+ jp nz, CreateEvolutionTrinket_BlueField
+ jp EvolutionTrinketNotFound_BlueField
.asm_210a8
scf
ret
-.asm_210aa
- ld a, [wd551]
+.disabled
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr z, .asm_210c5
+ jr z, .evolutionObjectsEnabled
ld a, [wIndicatorStates]
and a
- jr z, .asm_210c5
+ jr z, .evolutionObjectsEnabled
ld bc, TenThousandPoints
callba AddBigBCD6FromQueue
- jr asm_210c7
+ jr RecoverPokemon_BlueField
-.asm_210c5
+.evolutionObjectsEnabled
scf
ret
-asm_210c7:
+RecoverPokemon_BlueField:
xor a
ld [wIndicatorStates + 1], a
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
ld a, [wd558]
ld [wIndicatorStates], a
ld a, [wd559]
@@ -636,7 +639,7 @@ asm_210c7: scf
ret
-Func_2111d: ; 0x2111d
+ChooseNextEvolutionTrinketLocation_BlueField: ; 0x2111d
ld a, $11
call RandomRange
ld c, a
@@ -645,7 +648,7 @@ Func_2111d: ; 0x2111d add hl, bc
ret
-Func_2112a: ; 0x2112a
+HandleSlotCaveCollision_EvolutionMode_BlueField: ; 0x2112a
ld a, [wCurrentEvolutionMon]
cp $ff
jr nz, .asm_21134
@@ -714,7 +717,7 @@ Func_2112a: ; 0x2112a ld hl, rBGPI
call Func_8e1
.asm_211a8
- callba Func_10e0a
+ callba ShowMonEvolvedText
call MainLoopUntilTextIsClear
ld de, MUSIC_NOTHING
call PlaySong
diff --git a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm index 30794e0..4f0930f 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm @@ -1,46 +1,46 @@ HandleRedEvoModeCollision: ; 0x20581
ld a, [wSpecialModeCollisionID]
cp SPECIAL_COLLISION_VOLTORB
- jp z, Func_2080f ;voltorb
+ jp z, HandleVoltorbCollision_EvolutionMode
cp SPECIAL_COLLISION_STARYU_ALLEY_TRIGGER
- jp z, Func_20839
+ jp z, HandleStaryuAlleyTriggerCollision_EvolutionMode
cp SPECIAL_COLLISION_BELLSPROUT
- jp z, Func_2085a ;bellsprout
+ jp z, HandleBellsproutCollision_EvolutionMode
cp SPECIAL_COLLISION_STARYU
- jp z, Func_20887 ;staryu
+ jp z, HandleStaryuCollision_EvolutionMode
cp SPECIAL_COLLISION_LEFT_DIGLETT
- jp z, Func_208a8 ;diglett
+ jp z, HandleLeftDiglettCollision_EvolutionMode
cp SPECIAL_COLLISION_RIGHT_DIGLETT
- jp z, Func_208c9 ;diglett
+ jp z, HandleRightDiglettCollision_EvolutionMode
cp SPECIAL_COLLISION_LEFT_BONUS_MULTIPLIER
- jp z, Func_208ea ;right rail?
+ jp z, HandleLeftBonusMultiplierCollision_EvolutionMode_RedField
cp SPECIAL_COLLISION_RIGHT_BONUS_MULTIPLIER
- jp z, Func_2090b ;right rail?
+ jp z, HandleRightBonusMultiplierCollision_EvolutionMode_RedField
cp SPECIAL_COLLISION_BALL_UPGRADE
- jp z, Func_2092c
+ jp z, HandleBallUpgradeCollision_EvolutionMode_RedField
cp SPECIAL_COLLISION_SPINNER
- jp z, Func_2094d
+ jp z, HandleSpinnerCollision_EvolutionMode_RedField
cp SPECIAL_COLLISION_SLOT_HOLE
- jp z, Func_20b02
+ jp z, HandleSlotCaveCollision_EvolutionMode_RedField
cp SPECIAL_COLLISION_RIGHT_TRIGGER
- jp z, Func_20a65
+ jp z, HandleRightTriggerCollision_EvolutionMode_RedField
cp SPECIAL_COLLISION_LEFT_TRIGGER
- jp z, Func_20a82
+ jp z, HandleLeftTriggerCollision_EvolutionMode_RedField
cp SPECIAL_COLLISION_NOTHING
- jr z, .asm_205cb
+ jr z, .noCollision
scf
ret
-
-.asm_205cb
- call Func_2077b
+.noCollision
+ call CheckIfEvolutionModeTimerExpired_RedField
ld a, [wSpecialModeState]
call CallInFollowingTable
-PointerTable_205d4: ; 0x205d4
- padded_dab Func_205e0
- padded_dab Func_2070b
- padded_dab Func_20757
+EvolutionModeCallTable_RedField: ; 0x205d4
+ padded_dab HandleEvolutionMode_RedField
+ padded_dab CompleteEvolutionMode_RedField
+ padded_dab FailEvolutionMode_RedField
-Func_205e0: ; 0x205e0 runs on collecting exp in evo mode?
+HandleEvolutionMode_RedField: ; 0x205e0
+; Handles the logic for what happens when an evolution trinket is collected.
ld a, [wCurrentStage]
ld b, a
ld a, [wd578]
@@ -60,7 +60,7 @@ Func_205e0: ; 0x205e0 runs on collecting exp in evo mode? ret z
xor a
ld [hl], a
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
call Func_20651
ld a, [wd558]
ld [wIndicatorStates + 2], a
@@ -175,7 +175,7 @@ Func_20651: ; 0x20651 callba LoadSlotCaveCoverGraphics_RedField
ret
-Func_2070b: ; 0x2070b
+CompleteEvolutionMode_RedField: ; 0x2070b
callba RestoreBallSaverAfterCatchEmMode
callba PlaceEvolutionInParty
callba ConcludeEvolutionMode
@@ -198,7 +198,7 @@ Func_2070b: ; 0x2070b scf
ret
-Func_20757: ; 0x20757
+FailEvolutionMode_RedField: ; 0x20757
ld a, [wBottomTextEnabled]
and a
ret nz
@@ -210,21 +210,21 @@ Func_20757: ; 0x20757 scf
ret
-Func_2077b: ; 0x2077b
- ld hl, wd556
+CheckIfEvolutionModeTimerExpired_RedField: ; 0x2077b
+ ld hl, wEvolutionTrinketCooldownFrames
ld a, [hli]
ld c, a
ld b, [hl]
or b
- jr z, .asm_2078e
+ jr z, .cooldownNotEnding
dec bc
ld a, b
ld [hld], a
ld [hl], c
or c
- jr nz, .asm_2078e
- call Func_20a55
-.asm_2078e
+ jr nz, .cooldownNotEnding
+ call EndEvolutionTrinketCooldown_RedField
+.cooldownNotEnding
callba PlayLowTimeSfx
ld a, [wTimeRanOut]
and a
@@ -250,7 +250,7 @@ Func_2077b: ; 0x2077b ld [wIndicatorStates + 7], a
ld [wd558], a
ld [wd559], a
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
ld a, [wCurrentStage]
bit 0, a
jr z, .asm_207f5
@@ -265,59 +265,59 @@ Func_2077b: ; 0x2077b call LoadScrollingText
ret
-Func_2080f: ; 0x2080f
+HandleVoltorbCollision_EvolutionMode: ; 0x2080f
ld bc, $0001
ld de, $5000
call AddBCDEToJackpot
- ld a, [wd551] ;if ??? is not zero, ret c
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .RetC
- ld a, [wIndicatorStates + 9] ;if indicator is z, ret
+ jr nz, .disabled
+ ld a, [wIndicatorStates + 9]
and a
- jr z, .RetC
+ jr z, .disabled
xor a
ld [wIndicatorStates + 9], a
ld a, [wd55c]
and a
ld a, $0
ld [wd55c], a
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.RetC
+.disabled
scf
ret
-Func_20839: ; 0x20839
- ld a, [wd551]
+HandleStaryuAlleyTriggerCollision_EvolutionMode: ; 0x20839
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20858
+ jr nz, .disabled
ld a, [wIndicatorStates + 2]
and a
- jr z, .asm_20858
+ jr z, .disabled
xor a
ld [wIndicatorStates + 2], a
ld a, [wd563]
and a
ld a, $0
ld [wd563], a
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.asm_20858
+.disabled
scf
ret
-Func_2085a: ; 0x2085a
+HandleBellsproutCollision_EvolutionMode: ; 0x2085a
ld bc, $0007
ld de, $5000
call AddBCDEToJackpot
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20885
+ jr nz, .disabled
ld a, [wIndicatorStates + 3]
and a
- jr z, .asm_20885
+ jr z, .disabled
xor a
ld [wIndicatorStates + 3], a
ld [wIndicatorStates + 10], a
@@ -325,163 +325,163 @@ Func_2085a: ; 0x2085a and a
ld a, $0
ld [wd562], a
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.asm_20885
+.disabled
scf
ret
-Func_20887: ; 0x20887
- ld a, [wd551]
+HandleStaryuCollision_EvolutionMode: ; 0x20887
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_208a6
+ jr nz, .disabled
ld a, [wIndicatorStates + 8]
and a
- jr z, .asm_208a6
+ jr z, .disabled
xor a
ld [wIndicatorStates + 8], a
ld a, [wd561]
and a
ld a, $0
ld [wd561], a
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.asm_208a6
+.disabled
scf
ret
-Func_208a8: ; 0x208a8
- ld a, [wd551]
+HandleLeftDiglettCollision_EvolutionMode: ; 0x208a8
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_208c7 ;if ??? is NZ, skip
+ jr nz, .disabled
ld a, [wIndicatorStates + 13]
and a
- jr z, .asm_208c7 ;if indicator is off, skip
+ jr z, .disabled
xor a
ld [wIndicatorStates + 13], a ;flick off indicator
ld a, [wd55d]
and a
ld a, $0
ld [wd55d], a ;make ??? 0
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.asm_208c7
+.disabled
scf
ret
-Func_208c9: ; 0x208c9
- ld a, [wd551]
+HandleRightDiglettCollision_EvolutionMode: ; 0x208c9
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_208e8
+ jr nz, .disabled
ld a, [wIndicatorStates + 14]
and a
- jr z, .asm_208e8
+ jr z, .disabled
xor a
ld [wIndicatorStates + 14], a
ld a, [wd55e]
and a
ld a, $0
ld [wd55e], a
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.asm_208e8
+.disabled
scf
ret
-Func_208ea: ; 0x208ea
- ld a, [wd551]
+HandleLeftBonusMultiplierCollision_EvolutionMode_RedField: ; 0x208ea
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20909
+ jr nz, .disabled
ld a, [wIndicatorStates + 11]
and a
- jr z, .asm_20909
+ jr z, .disabled
xor a
ld [wIndicatorStates + 11], a
ld a, [wd55f]
and a
ld a, $0
ld [wd55f], a
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.asm_20909
+.disabled
scf
ret
-Func_2090b: ; 0x2090b
- ld a, [wd551]
+HandleRightBonusMultiplierCollision_EvolutionMode_RedField: ; 0x2090b
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_2092a
+ jr nz, .disabled
ld a, [wIndicatorStates + 12]
and a
- jr z, .asm_2092a
+ jr z, .disabled
xor a
ld [wIndicatorStates + 12], a
ld a, [wd560]
and a
ld a, $0
ld [wd560], a
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.asm_2092a
+.disabled
scf
ret
-Func_2092c: ; 0x2092c
- ld a, [wd551]
+HandleBallUpgradeCollision_EvolutionMode_RedField: ; 0x2092c
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_2094b
+ jr nz, .disabled
ld a, [wIndicatorStates + 6]
and a
- jr z, .asm_2094b
+ jr z, .disabled
xor a
ld [wIndicatorStates + 6], a
ld a, [wd565]
and a
ld a, $0
ld [wd565], a
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.asm_2094b
+.disabled
scf
ret
-Func_2094d: ; 0x2094d
+HandleSpinnerCollision_EvolutionMode_RedField: ; 0x2094d
ld bc, $0000
ld de, $1500
call AddBCDEToJackpot
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr nz, .asm_20975
+ jr nz, .disabled
ld a, [wIndicatorStates + 7]
and a
- jr z, .asm_20975
+ jr z, .disabled
xor a
ld [wIndicatorStates + 7], a
ld a, [wd564]
and a
ld a, $0
ld [wd564], a
- jp nz, Func_20977
- jp Func_209eb
+ jp nz, CreateEvolutionTrinket_RedField
+ jp EvolutionTrinketNotFound_RedField
-.asm_20975
+.disabled
scf
ret
-Func_20977: ; 0x20977
+CreateEvolutionTrinket_RedField: ; 0x20977
lb de, $07, $46
call PlaySoundEffect
- call Func_20af5
+ call ChooseNextEvolutionTrinketLocation_RedField
ld a, [wCurrentEvolutionType]
ld [hl], a
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
ld a, [wIndicatorStates + 2]
ld [wd558], a
ld a, [wIndicatorStates + 3]
@@ -522,11 +522,11 @@ Func_20977: ; 0x20977 scf
ret
-Func_209eb: ; 0x209eb
+EvolutionTrinketNotFound_RedField: ; 0x209eb
lb de, $07, $47
call PlaySoundEffect
ld a, $1
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
ld a, $80
ld [wIndicatorStates], a
ld [wIndicatorStates + 1], a
@@ -542,9 +542,9 @@ Func_209eb: ; 0x209eb bit 0, a
callba nz, ClearAllRedIndicators
ld a, $58
- ld [wd556], a
+ ld [wEvolutionTrinketCooldownFrames], a
ld a, $2
- ld [wd557], a
+ ld [wEvolutionTrinketCooldownFrames + 1], a
ld bc, ThreeHundredThousandPoints
callba AddBigBCD6FromQueue
call FillBottomMessageBufferWithBlackTile
@@ -560,54 +560,54 @@ Func_209eb: ; 0x209eb scf
ret
-Func_20a55: ; 0x20a55
- ld a, [wd551]
+EndEvolutionTrinketCooldown_RedField: ; 0x20a55
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr z, .asm_20a63
+ jr z, .evolutionObjectsEnabled
ld a, [wIndicatorStates + 1]
and a
- jr z, .asm_20a63
- jr asm_20a9f
+ jr z, .evolutionObjectsEnabled
+ jr RecoverPokemon_RedField
-.asm_20a63
+.evolutionObjectsEnabled
scf
ret
-Func_20a65: ; 0x20a65
- ld a, [wd551]
+HandleRightTriggerCollision_EvolutionMode_RedField: ; 0x20a65
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr z, .asm_20a80
+ jr z, .evolutionObjectsEnabled
ld a, [wIndicatorStates + 1]
and a
- jr z, .asm_20a80
+ jr z, .evolutionObjectsEnabled
ld bc, TenThousandPoints
callba AddBigBCD6FromQueue
- jr asm_20a9f
+ jr RecoverPokemon_RedField
-.asm_20a80
+.evolutionObjectsEnabled
scf
ret
-Func_20a82: ; 0x20a82
- ld a, [wd551]
+HandleLeftTriggerCollision_EvolutionMode_RedField: ; 0x20a82
+ ld a, [wEvolutionObjectsDisabled]
and a
- jr z, .asm_20a9d
+ jr z, .evolutionObjectsEnabled
ld a, [wIndicatorStates]
and a
- jr z, .asm_20a9d
+ jr z, .evolutionObjectsEnabled
ld bc, TenThousandPoints
callba AddBigBCD6FromQueue
- jr asm_20a9f
+ jr RecoverPokemon_RedField
-.asm_20a9d
+.evolutionObjectsEnabled
scf
ret
-asm_20a9f:
+RecoverPokemon_RedField:
xor a
ld [wIndicatorStates], a
ld [wIndicatorStates + 1], a
- ld [wd551], a
+ ld [wEvolutionObjectsDisabled], a
ld a, [wd558]
ld [wIndicatorStates + 2], a
ld a, [wd559]
@@ -638,7 +638,7 @@ asm_20a9f: scf
ret
-Func_20af5: ; 0x20af5
+ChooseNextEvolutionTrinketLocation_RedField: ; 0x20af5
ld a, $11
call RandomRange
ld c, a
@@ -647,7 +647,7 @@ Func_20af5: ; 0x20af5 add hl, bc
ret
-Func_20b02: ; 0x20b02
+HandleSlotCaveCollision_EvolutionMode_RedField: ; 0x20b02
ld a, [wCurrentEvolutionMon]
cp $ff
jr nz, .asm_20b0c
@@ -716,7 +716,7 @@ Func_20b02: ; 0x20b02 ld hl, rBGPI
call Func_8e1
.asm_20b80
- callba Func_10e0a
+ callba ShowMonEvolvedText
call MainLoopUntilTextIsClear
ld de, MUSIC_NOTHING
call PlaySong
diff --git a/engine/pinball_game/load_stage_data/load_blue_field.asm b/engine/pinball_game/load_stage_data/load_blue_field.asm index 8109d6a..901cbaf 100644 --- a/engine/pinball_game/load_stage_data/load_blue_field.asm +++ b/engine/pinball_game/load_stage_data/load_blue_field.asm @@ -340,7 +340,7 @@ Func_1c3ee: ; 0x1c3ee ld bc, $00e0
call FarCopyData
.asm_1c424
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret z
ld a, [hGameBoyColorFlag]
diff --git a/engine/pinball_game/load_stage_data/load_red_field.asm b/engine/pinball_game/load_stage_data/load_red_field.asm index a7c606e..89d1ed2 100644 --- a/engine/pinball_game/load_stage_data/load_red_field.asm +++ b/engine/pinball_game/load_stage_data/load_red_field.asm @@ -289,7 +289,7 @@ Func_14234: ; 0x14234 ld bc, $00e0
call FarCopyData
.asm_1426a
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret z
ld a, [hGameBoyColorFlag]
diff --git a/engine/pinball_game/map_move.asm b/engine/pinball_game/map_move.asm index 8e08960..6a2eead 100755 --- a/engine/pinball_game/map_move.asm +++ b/engine/pinball_game/map_move.asm @@ -130,7 +130,7 @@ Func_311b4: ; 0x311b4 Func_31234: ; 0x31234
callba ResetIndicatorStates
- callba Func_107c2
+ callba OpenSlotCave
callba SetLeftAndRightAlleyArrowIndicatorStates_RedField
callba Func_107e9
ld a, [wCurrentStage]
@@ -307,7 +307,7 @@ Func_31326: ; 0x31326 Func_313c3: ; 0x313c3
callba ResetIndicatorStates
- callba Func_107c2
+ callba OpenSlotCave
callba SetLeftAndRightAlleyArrowIndicatorStates_BlueField
ld a, $0
ld [wd644], a
diff --git a/engine/pinball_game/object_collision/blue_stage_object_collision.asm b/engine/pinball_game/object_collision/blue_stage_object_collision.asm index 8252802..d5a5fc6 100644 --- a/engine/pinball_game/object_collision/blue_stage_object_collision.asm +++ b/engine/pinball_game/object_collision/blue_stage_object_collision.asm @@ -112,7 +112,7 @@ CheckBlueStageWildPokemonCollision: ; 0x1c5de CheckBlueStageEvolutionTrinketCollision: ; 0x1c5eb
xor a
ld [wd578], a
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret z
ld a, [wCurrentStage]
diff --git a/engine/pinball_game/object_collision/red_stage_object_collision.asm b/engine/pinball_game/object_collision/red_stage_object_collision.asm index 2d07286..846c7a5 100644 --- a/engine/pinball_game/object_collision/red_stage_object_collision.asm +++ b/engine/pinball_game/object_collision/red_stage_object_collision.asm @@ -28,7 +28,7 @@ CheckRedStageBottomGameObjectCollisions: ; 0x143f9 CheckRedStageEvolutionTrinketCollision: ; 0x1441e
xor a
ld [wd578], a
- ld a, [wd551]
+ ld a, [wEvolutionObjectsDisabled]
and a
ret z
ld a, [wCurrentStage]
@@ -604,7 +604,9 @@ wSpecialMode:: ; 0xd550 ; See SPECIAL_MODE constants. ds $1 -wd551:: ; 0xd551 if non zero, voltobs skip applying experiance gain in evo mode. set to 0 onm collect experiance. set to 1 is pokemon is tired, 0 on recovered. 7 when exp is active for collecting. set to 0 on conclude evo mode. Tracks evo mode state? +wEvolutionObjectsDisabled:: ; 0xd551 +; 0 = Hitting an evolution game object will either create an evolution trinket or show the "item not found" message. +; non-0 = The volution game objects are disabled, meaning the player needs to wait a few seconds before they can be hit again. ds $1 wCurrentEvolutionMon:: ; 0xd552 @@ -619,11 +621,11 @@ wd554:: ; 0xd554 wd555:: ; 0xd555 ds $1 -wd556:: ; 0xd556 - ds $1 - -wd557:: ; 0xd557 - ds $1 +wEvolutionTrinketCooldownFrames:: ; 0xd556 +; Holds the number of remaining frames until the player can hit more objects to discover evolution trinkets in evolution mode. +; When the pinball hits an object in evolution mode, sometimes that object doesn't contain a trinket. When this happens, this +; cooldown is created so the player has to wait a few seconds until the objects becomes activated again. + ds $2 wd558:: ; 0xd558 ds $1 |