diff options
author | chaos-lord <dd4791.mariokarter@hotmail.co.uk> | 2017-07-11 00:36:12 +0100 |
---|---|---|
committer | chaos-lord <dd4791.mariokarter@hotmail.co.uk> | 2017-07-11 00:36:12 +0100 |
commit | 467f8980840250aaed160868f72a5ba3d5e2ce55 (patch) | |
tree | 09d407432bd25df46351cfd123b1bfd38111db5d | |
parent | 22299aa600be051e6a5ad803be6b9d9bf5633e12 (diff) |
Labelling mapmode functions
17 files changed, 70 insertions, 70 deletions
diff --git a/engine/pinball_game/ball_init/ball_init_blue_field.asm b/engine/pinball_game/ball_init/ball_init_blue_field.asm index e2303c8..c2142e2 100644 --- a/engine/pinball_game/ball_init/ball_init_blue_field.asm +++ b/engine/pinball_game/ball_init/ball_init_blue_field.asm @@ -53,8 +53,8 @@ InitBallBlueField: ; 0x1c08d ld [wd613], a
inc a
ld [wCurBonusMultiplier], a
- ld [wd4ef], a
- ld [wd4f1], a
+ ld [wLeftDiglettAnimationController], a
+ ld [wRightDiglettAnimationController], a
ld a, $3
ld [wd610], a
call GetBCDForNextBonusMultiplier_BlueField
diff --git a/engine/pinball_game/ball_init/ball_init_red_field.asm b/engine/pinball_game/ball_init/ball_init_red_field.asm index cb48865..34d94b5 100644 --- a/engine/pinball_game/ball_init/ball_init_red_field.asm +++ b/engine/pinball_game/ball_init/ball_init_red_field.asm @@ -58,8 +58,8 @@ InitBallRedField: ; 0x3007d ld [wd613], a
inc a
ld [wCurBonusMultiplier], a
- ld [wd4ef], a
- ld [wd4f1], a
+ ld [wLeftDiglettAnimationController], a
+ ld [wRightDiglettAnimationController], a
ld a, $3
ld [wd610], a
callba GetBCDForNextBonusMultiplier_RedField
diff --git a/engine/pinball_game/catchem_mode.asm b/engine/pinball_game/catchem_mode.asm index d03bac1..559bf31 100644 --- a/engine/pinball_game/catchem_mode.asm +++ b/engine/pinball_game/catchem_mode.asm @@ -1128,7 +1128,7 @@ Func_107e9: ; 0x107e9 ld [wd7ad], a
ret
-Func_107f8: ; 0x107f8
+PlayLowTimeSfx: ; 0x107f8
ld a, [wTimerFrames]
and a
ret nz
@@ -1136,21 +1136,21 @@ Func_107f8: ; 0x107f8 and a
ret nz
ld a, [wTimerSeconds]
- cp $20
- jr nz, .asm_10810
+ cp 32
+ jr nz, .Not32Seconds
lb de, $07, $49
call PlaySoundEffect
ret
-.asm_10810
- cp $10
- jr nz, .asm_1081b
+.Not32Seconds
+ cp 16
+ jr nz, .Not16Seconds
lb de, $0a, $4a
call PlaySoundEffect
ret
-.asm_1081b
- cp $5
+.Not16Seconds
+ cp 5
ret nz
lb de, $0d, $4b
call PlaySoundEffect
@@ -1236,7 +1236,7 @@ Func_10871: ; 0x10871 ret
.asm_108d3
- callba Func_14135
+ callba ClearAllRedIndicators
callba Func_10184
ld a, [hGameBoyColorFlag]
and a
@@ -1251,7 +1251,7 @@ Func_108f5: ; 0x108f5 ld a, [wCurrentStage]
bit 0, a
ret z
- callba Func_14135
+ callba ClearAllRedIndicators
call Func_10432
callba LoadMapBillboardTileData
ld a, Bank(StageSharedBonusSlotGlowGfx)
diff --git a/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm b/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm index d03094d..8bdd4c3 100644 --- a/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm +++ b/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm @@ -212,7 +212,7 @@ Func_2048f: ; 0x2048f ret
Func_204b3: ; 0x204b3
- callba Func_107f8
+ callba PlayLowTimeSfx
ld a, [wd57e]
and a
ret z
diff --git a/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm b/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm index d6738d8..e6cd614 100644 --- a/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm +++ b/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm @@ -210,7 +210,7 @@ Func_201ce: ; 0x201ce ret
Func_201f2: ; 0x201f2
- callba Func_107f8
+ callba PlayLowTimeSfx
ld a, [wd57e]
and a
ret z
diff --git a/engine/pinball_game/evolution_mode.asm b/engine/pinball_game/evolution_mode.asm index 8cc2523..541c5a4 100755 --- a/engine/pinball_game/evolution_mode.asm +++ b/engine/pinball_game/evolution_mode.asm @@ -651,7 +651,7 @@ StartEvolutionMode_RedField: ; 0x10ebb ld de, vTilesOB tile $20
ld bc, $00e0
call LoadOrCopyVRAMData
- callba Func_14135
+ callba ClearAllRedIndicators
callba Func_10184
ld a, [hGameBoyColorFlag]
and a
@@ -700,7 +700,7 @@ ConcludeEvolutionMode_RedField: ; 0x10fe3 ld a, [wCurrentStage]
bit 0, a
jp z, LoadRedFieldTopGraphics
- callba Func_14135
+ callba ClearAllRedIndicators
callba LoadSlotCaveCoverGraphics_RedField
callba LoadMapBillboardTileData
ld a, BANK(StageSharedBonusSlotGlowGfx)
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 7068b5b..c1e31c1 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm @@ -222,7 +222,7 @@ Func_20da0: ; 0x20da0 jr nz, .asm_20db3
call Func_21079
.asm_20db3
- callba Func_107f8
+ callba PlayLowTimeSfx
ld a, [wd57e]
and a
ret z
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 b132e46..ba3e372 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm @@ -69,7 +69,7 @@ Func_205e0: ; 0x205e0 ld [wIndicatorStates + 10], a
ld a, [wCurrentStage]
bit 0, a
- callba nz, Func_14135
+ callba nz, ClearAllRedIndicators
ld bc, OneMillionPoints
callba AddBigBCD6FromQueue
call FillBottomMessageBufferWithBlackTile
@@ -225,7 +225,7 @@ Func_2077b: ; 0x2077b jr nz, .asm_2078e
call Func_20a55
.asm_2078e
- callba Func_107f8
+ callba PlayLowTimeSfx
ld a, [wd57e]
and a
ret z
@@ -254,7 +254,7 @@ Func_2077b: ; 0x2077b ld a, [wCurrentStage]
bit 0, a
jr z, .asm_207f5
- callba Func_14135
+ callba ClearAllRedIndicators
callba LoadSlotCaveCoverGraphics_RedField
.asm_207f5
callba StopTimer
@@ -492,7 +492,7 @@ Func_20977: ; 0x20977 ld [wIndicatorStates + 10], a
ld a, [wCurrentStage]
bit 0, a
- callba nz, Func_14135
+ callba nz, ClearAllRedIndicators
ld a, [hGameBoyColorFlag]
and a
jr z, .asm_209bf
@@ -540,7 +540,7 @@ Func_209eb: ; 0x209eb ld [wIndicatorStates + 10], a
ld a, [wCurrentStage]
bit 0, a
- callba nz, Func_14135
+ callba nz, ClearAllRedIndicators
ld a, $58
ld [wd556], a
ld a, $2
@@ -615,7 +615,7 @@ asm_20a9f: ld [wIndicatorStates + 10], a
ld a, [wCurrentStage]
bit 0, a
- callba nz, Func_14135
+ callba nz, ClearAllRedIndicators
ld a, [hGameBoyColorFlag]
and a
jr z, .asm_20ada
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 026cea3..51a00c9 100644 --- a/engine/pinball_game/load_stage_data/load_red_field.asm +++ b/engine/pinball_game/load_stage_data/load_red_field.asm @@ -13,7 +13,7 @@ _LoadStageDataRedFieldTop: ; 0x14000 _LoadStageDataRedFieldBottom: ; 0x1401c
call Func_14091
call Func_14377
- call Func_14135
+ call ClearAllRedIndicators
call LoadCAVELightsGraphics_RedField
call Func_14282
call Func_1414b
@@ -110,20 +110,20 @@ Func_140e2: ; 0x140e2 ret
Func_140f9: ; 0x140f9
- ld a, [wd4ef]
+ ld a, [wLeftDiglettAnimationController]
and a
- jr z, .asm_1410c
- xor a
+ jr z, .asm_1410c ;skip ??? if wLeftDiglettAnimationController = 0
+ xor a ;wut
ld a, $66
ld [wStageCollisionMap + $e3], a
ld a, $67
- ld [wStageCollisionMap + $103], a
+ ld [wStageCollisionMap + $103], a ;load into the collision map?
ld a, $2
.asm_1410c
call LoadDiglettGraphics
ld a, [wLeftMapMoveCounter]
call LoadDiglettNumberGraphics
- ld a, [wd4f1]
+ ld a, [wRightDiglettAnimationController]
and a
jr z, .asm_14127
ld a, $6a
@@ -139,20 +139,20 @@ Func_140f9: ; 0x140f9 call LoadDiglettNumberGraphics
ret
-Func_14135: ; 0x14135
+ClearAllRedIndicators: ; 0x14135
ld bc, $0000
-.asm_14138
+.Loop5Times
push bc
- ld hl, wIndicatorStates
+ ld hl, wIndicatorStates ;for each of 5 states
add hl, bc
ld a, [hl]
- res 7, a
+ res 7, a ;clear bit 7
call LoadArrowIndicatorGraphics_RedField
pop bc
inc c
ld a, c
cp $5
- jr nz, .asm_14138
+ jr nz, .Loop5Times
ret
Func_1414b: ; 0x1414b
diff --git a/engine/pinball_game/map_move.asm b/engine/pinball_game/map_move.asm index 68d2f50..5382259 100755 --- a/engine/pinball_game/map_move.asm +++ b/engine/pinball_game/map_move.asm @@ -125,7 +125,7 @@ Func_311b4: ; 0x311b4 ld a, [wCurrentStage]
bit 0, a
ret z
- callba Func_14135
+ callba ClearAllRedIndicators
ret
Func_31234: ; 0x31234
@@ -136,7 +136,7 @@ Func_31234: ; 0x31234 ld a, [wCurrentStage]
bit 0, a
ret z
- callba Func_14135
+ callba ClearAllRedIndicators
callba LoadSlotCaveCoverGraphics_RedField
callba LoadMapBillboardTileData
ret
@@ -446,7 +446,7 @@ Func_314ae: ; 0x314ae ret
.asm_314d6
- call Func_3151f
+ call UpdateMapMove_RedField
ld a, [wd54d]
call CallInFollowingTable
PointerTable_314df: ; 0xd13df
@@ -481,12 +481,12 @@ Func_31505: ; 0x31505 scf
ret
-Func_3151f: ; 0x3151f
+UpdateMapMove_RedField: ; 0x3151f handle map move timer and fail when it expires
ld a, $50
- ld [wd4ef], a
- ld [wd4f1], a
- callba Func_107f8
- ld a, [wd57e]
+ ld [wLeftDiglettAnimationController], a
+ ld [wRightDiglettAnimationController], a
+ callba PlayLowTimeSfx
+ ld a, [wd57e] ;if ??? is 0, quit, else make it zero (this only truns once per something?) and handle a failed map move
and a
ret z
xor a
@@ -494,7 +494,7 @@ Func_3151f: ; 0x3151f ld a, $3
ld [wd54d], a
xor a
- ld [wSlotIsOpen], a
+ ld [wSlotIsOpen], a ;close slot and indicators
ld [wIndicatorStates], a
ld [wIndicatorStates + 1], a
ld [wIndicatorStates + 2], a
@@ -502,12 +502,12 @@ Func_3151f: ; 0x3151f ld [wIndicatorStates + 4], a
ld a, [wCurrentStage]
bit 0, a
- jr z, .asm_31577
- callba Func_14135
+ jr z, .asm_31577 ;if on stage without flippers(the tops), jump
+ callba ClearAllRedIndicators ;clear indicators
callba LoadSlotCaveCoverGraphics_RedField
callba LoadMapBillboardTileData
.asm_31577
- callba StopTimer
+ callba StopTimer ;stop the timer
call FillBottomMessageBufferWithBlackTile
call Func_30db
ld hl, wScrollingText1
@@ -639,7 +639,7 @@ Func_3168c: ; 0x3168c ld [wd645], a
ld a, $1
ld [wd646], a
- callba Func_107f8
+ callba PlayLowTimeSfx
ld a, [wd57e]
and a
ret z
diff --git a/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm b/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm index b991e1f..c1c9f78 100644 --- a/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm @@ -4,7 +4,7 @@ ResolveGengarBonusGameObjectCollisions: ; 0x18377 call Func_187b1
call Func_18d34
call Func_183b7
- callba Func_107f8
+ callba PlayLowTimeSfx
ld a, [wd57e]
and a
ret z
diff --git a/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm b/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm index c61a567..730eeaf 100644 --- a/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm @@ -222,7 +222,7 @@ ResolveMeowthBonusGameObjectCollisions: ; 0x2442a ld a, [wd712]
cp $4
jr z, .asm_244c1
- callba Func_107f8
+ callba PlayLowTimeSfx
.asm_244c1
ld a, [wd57e]
and a
diff --git a/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm b/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm index cce8f6f..2b6229e 100644 --- a/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm @@ -2,7 +2,7 @@ ResolveMewtwoBonusGameObjectCollisions: ; 0x19451 call Func_19531
call Func_19701
call Func_1948b
- callba Func_107f8
+ callba PlayLowTimeSfx
ld a, [wd57e]
and a
ret z
diff --git a/engine/pinball_game/object_collision/red_stage_resolve_collision.asm b/engine/pinball_game/object_collision/red_stage_resolve_collision.asm index cf70cf1..3e534b4 100644 --- a/engine/pinball_game/object_collision/red_stage_resolve_collision.asm +++ b/engine/pinball_game/object_collision/red_stage_resolve_collision.asm @@ -284,11 +284,11 @@ ResolveDiglettCollision: ; 0x147aa ret
.asm_14834
- ld a, [wd4ef]
+ ld a, [wLeftDiglettAnimationController]
and a
jr z, .asm_14857
dec a
- ld [wd4ef], a
+ ld [wLeftDiglettAnimationController], a
jr nz, .asm_14857
ld a, [wLeftMapMoveCounter]
sub $3
@@ -301,11 +301,11 @@ ResolveDiglettCollision: ; 0x147aa ld a, $65
ld [wStageCollisionMap + $103], a
.asm_14857
- ld a, [wd4f1]
+ ld a, [wRightDiglettAnimationController]
and a
jr z, .asm_1487c
dec a
- ld [wd4f1], a
+ ld [wRightDiglettAnimationController], a
jr nz, .asm_1487c
ld a, [wRightMapMoveCounter]
sub $3
@@ -471,7 +471,7 @@ AddScoreForHittingDiglett: ; 0x1496d ret
UpdateDiglettAnimations: ; 0x14990
- ld a, [wd4ef]
+ ld a, [wLeftDiglettAnimationController]
and a
jr nz, .asm_149b6
ld a, [wLeftMapMoveDiglettAnimationCounter]
@@ -491,7 +491,7 @@ UpdateDiglettAnimations: ; 0x14990 ld [wLeftMapMoveDiglettFrame], a
call LoadDiglettGraphics
.asm_149b6
- ld a, [wd4f1]
+ ld a, [wRightDiglettAnimationController]
and a
ret nz
ld a, [wRightMapMoveDiglettAnimationCounter]
@@ -2659,21 +2659,21 @@ UpdateArrowIndicators_RedField: ; 0x169a6 LoadArrowIndicatorGraphics_RedField: ; 0x169cd
push af
- sla c
+ sla c ;double offset
ld hl, TileDataPointers_169ed
ld a, [hGameBoyColorFlag]
and a
jr z, .asm_169db
ld hl, TileDataPointers_16bef
.asm_169db
- add hl, bc
+ add hl, bc ;add offset, load pointer into HL
ld a, [hli]
ld h, [hl]
ld l, a
pop af
sla a
ld c, a
- add hl, bc
+ add hl, bc ;add offset to second pointer
ld a, [hli]
ld h, [hl]
ld l, a
diff --git a/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm b/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm index c4a947f..e169524 100644 --- a/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm @@ -37,7 +37,7 @@ ResolveSeelBonusGameObjectCollisions: ; 0x25c5a ld a, [wd794]
cp $2
jr z, .asm_25cc1
- callba Func_107f8
+ callba PlayLowTimeSfx
.asm_25cc1
ld a, [wd57e]
and a
@@ -1402,7 +1402,7 @@ Func_e5d: ; 0xe5d DrawBottomMessageBox: ; 0xe69 ; Draws the current scrolling bottom message box to VRAM during V-Blank. -; Note, this only applies to the 1-tile high message bar. When it displays, things like Ball Bonus summary, and +; Note, this only applies to the 1-tile high message bar. When it displays, things like Ball Bonus summary, and ; the Save/Cancel menu, this is not used to draw the message buffer. ld a, [rLY] cp $90 @@ -1660,20 +1660,20 @@ Func_10a7: ; 0x10a7 Func_10aa: ; 0x10aa ld c, a ld a, [hli] - ld b, a + ld b, a ;bc = [hl]a .loop push bc ld a, c ld c, [hl] inc hl - ld b, [hl] + ld b, [hl] ;pull pointer from HL, load into BC inc hl push af ld a, [bc] ld e, a inc bc ld a, [bc] - ld d, a + ld d, a ;pull de from bc inc bc pop af push hl @@ -231,7 +231,7 @@ wDrawBottomMessageBox:: ; 0xd4aa wd4ab:: ; 0xd4ab ds $1 -wCurrentStage:: ; 0xd4ac see constants/stage_constants.asm for list. bit 1 is 1 if the stage has flippers +wCurrentStage:: ; 0xd4ac see constants/stage_constants.asm for list. bit 0 is 1 if the stage has flippers ds $1 wd4ad:: ; 0xd4ad @@ -391,13 +391,13 @@ wWhichDiglettId:: ; 0xd4ee wWhichPsyduckPoliwagId:: ds $1 -wd4ef:: ; 0xd4ef +wLeftDiglettAnimationController:: ; 0xd4ef $50 = in and pained look. 0 = normal state ds $1 wLeftMapMoveCounter:: ; 0xd4f0 ds $1 -wd4f1:: ; 0xd4f1 +wRightDiglettAnimationController:: ; 0xd4f1 $50 = in and pained look. 0 = normal state ds $1 wRightMapMoveCounter:: ; 0xd4f2 @@ -672,7 +672,7 @@ wTimerActive:: ; 0xd57d ; Set to 1 when the Timer is displayed and counting down. ds $1 -wd57e:: ; 0xd57e +wd57e:: ; 0xd57e when map mode fails by time, toggled to off from on ds $1 wd57f:: ; 0xd57f |