From 66e007a3593a843b1b1f8ba6be3cfff9c0c31117 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 9 Jul 2017 11:55:52 -0700 Subject: Label slot cave things, and rumble --- data/queued_tiledata/blue_field/slot_cave.asm | 160 ++++++++++ data/queued_tiledata/red_field/slot_cave.asm | 142 +++++++++ engine/options_screen.asm | 12 +- engine/pinball_game.asm | 4 +- engine/pinball_game/ball_gfx.asm | 5 +- .../ball_loss/ball_loss_blue_field.asm | 8 +- .../pinball_game/ball_loss/ball_loss_red_field.asm | 8 +- engine/pinball_game/catchem_mode.asm | 6 +- .../draw_sprites/draw_blue_field_sprites.asm | 13 +- .../draw_sprites/draw_red_field_sprites.asm | 13 +- .../evolution_mode/evolution_mode_blue_field.asm | 8 +- .../evolution_mode/evolution_mode_red_field.asm | 8 +- .../load_stage_data/load_blue_field.asm | 10 +- .../load_stage_data/load_red_field.asm | 12 +- engine/pinball_game/menu.asm | 4 +- .../blue_stage_resolve_collision.asm | 334 ++++++--------------- .../diglett_bonus_resolve_collision.asm | 4 +- .../gengar_bonus_resolve_collision.asm | 24 +- .../meowth_bonus_resolve_collision.asm | 8 +- .../mewtwo_bonus_object_collision.asm | 6 +- .../red_stage_resolve_collision.asm | 298 ++++++------------ .../seel_bonus_resolve_collision.asm | 4 +- engine/pinball_game/slot.asm | 4 +- engine/pinball_game/vertical_screen_transition.asm | 2 +- home.asm | 24 +- main.asm | 26 +- wram.asm | 40 ++- 27 files changed, 616 insertions(+), 571 deletions(-) create mode 100755 data/queued_tiledata/blue_field/slot_cave.asm create mode 100755 data/queued_tiledata/red_field/slot_cave.asm diff --git a/data/queued_tiledata/blue_field/slot_cave.asm b/data/queued_tiledata/blue_field/slot_cave.asm new file mode 100755 index 0000000..c1af7f6 --- /dev/null +++ b/data/queued_tiledata/blue_field/slot_cave.asm @@ -0,0 +1,160 @@ +TileDataPointers_1e91e: + dw TileData_1e926 + dw TileData_1e929 + dw TileData_1e92c + dw TileData_1e931 + +TileData_1e926: ; 0x1e926 + db $01 + dw TileData_1e936 + +TileData_1e929: ; 0x1e929 + db $01 + dw TileData_1e93f + +TileData_1e92c: ; 0x1e92c + db $02 + dw TileData_1e948 + dw TileData_1e952 + +TileData_1e931: ; 0x1e931 + db $02 + dw TileData_1e95c + dw TileData_1e966 + +TileData_1e936: ; 0x1e936 + dw LoadTileLists + db $02 ; total number of tiles + + db $02 ; number of tiles + dw vBGMap + $229 + db $EE, $EF + + db $00 ; terminator + +TileData_1e93f: ; 0x1e93f + dw LoadTileLists + db $02 ; total number of tiles + + db $02 ; number of tiles + dw vBGMap + $229 + db $F0, $F1 + + db $00 ; terminator + +TileData_1e948: ; 0x1e948 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $1F + dw StageBlueFieldBottomBaseGameBoyGfx + $9F0 + db Bank(StageBlueFieldBottomBaseGameBoyGfx) + db $00 + +TileData_1e952: ; 0x1e952 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $21 + dw StageBlueFieldBottomBaseGameBoyGfx + $A10 + db Bank(StageBlueFieldBottomBaseGameBoyGfx) + db $00 + +TileData_1e95c: ; 0x1e95c + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $1F + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $1BC0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_1e966: ; 0x1e966 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $21 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $1BE0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileDataPointers_1e970: + dw TileData_1e978 + dw TileData_1e97d + dw TileData_1e980 + dw TileData_1e983 + +TileData_1e978: ; 0x1e978 + db $02 + dw TileData_1e986 + dw TileData_1e98F + +TileData_1e97d: ; 0x1e97d + db $01 + dw TileData_1e99b + +TileData_1e980: ; 0x1e980 + db $01 + dw TileData_1e9a4 + +TileData_1e983: ; 0x1e983 + db $01 + dw TileData_1e9b2 + +TileData_1e986: ; 0x1e986 + dw LoadTileLists + db $02 ; total number of tiles + + db $02 ; number of tiles + dw vBGMap + $229 + db $F0, $F1 + + db $00 ; terminator + +TileData_1e98F: ; 0x1e98F + dw LoadTileLists + db $02 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $224 + db $D8 + + db $01 ; number of tiles + dw vBGMap + $22f + db $EC + + db $00 ; terminator + +TileData_1e99b: ; 0x1e99b + dw LoadTileLists + db $02 ; total number of tiles + + db $02 ; number of tiles + dw vBGMap + $229 + db $F2, $F3 + + db $00 ; terminator + +TileData_1e9a4: ; 0x1e9a4 + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $9809 + db $15, $16 + + db $02 ; terminator + dw vBGMap + $29 + db $17, $18 + + db $00 ; terminator + +TileData_1e9b2: ; 0x1e9b2 + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw vBGMap + $9 + db $19, $1A + + db $02 ; terminator + dw vBGMap + $29 + db $1B, $1C + + db $00 ; terminator diff --git a/data/queued_tiledata/red_field/slot_cave.asm b/data/queued_tiledata/red_field/slot_cave.asm new file mode 100755 index 0000000..2a660b0 --- /dev/null +++ b/data/queued_tiledata/red_field/slot_cave.asm @@ -0,0 +1,142 @@ +TileDataPointers_1644d: + dw TileData_16455 + dw TileData_16458 + dw TileData_1645b + dw TileData_16460 + +TileData_16455: ; 0x16455 + db $01 + dw TileData_16465 + +TileData_16458: ; 0x16458 + db $01 + dw TileData_1646f + +TileData_1645b: ; 0x1645b + db $02 + dw TileData_16479 + dw TileData_16483 + +TileData_16460: ; 0x16460 + db $02 + dw TileData_1648D + dw TileData_16497 + +TileData_16465: ; 0x16465 + dw Func_11d2 + db $20, $02 + dw vTilesSH tile $46 + dw StageRedFieldTopBaseGameBoyGfx + $1c0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_1646f: ; 0x1646f + dw Func_11d2 + db $20, $02 + dw vTilesSH tile $46 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $340 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_16479: ; 0x16479 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $48 + dw StageRedFieldBottomBaseGameBoyGfx + $c80 + db Bank(StageRedFieldBottomBaseGameBoyGfx) + db $00 + +TileData_16483: ; 0x16483 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $4A + dw StageRedFieldBottomBaseGameBoyGfx + $CA0 + db Bank(StageRedFieldBottomBaseGameBoyGfx) + db $00 + +TileData_1648D: ; 0x1648D + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $48 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $340 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_16497: ; 0x16497 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $4A + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $360 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileDataPointers_164a1: + dw TileData_164a9 + dw TileData_164ac + dw TileData_164af + dw TileData_164b2 + +TileData_164a9: ; 0x164a9 + db $01 + dw TileData_164b5 + +TileData_164ac: ; 0x164ac + db $01 + dw TileData_164be + +TileData_164af: ; 0x164af + db $01 + dw TileData_164c7 + +TileData_164b2: ; 0x164b2 + db $01 + dw TileData_164d5 + +TileData_164b5: ; 0x164b5 + dw LoadTileLists + db $02 + + db $02 + dw vBGMap + $229 + db $d4, $d5 + + db $00 + +TileData_164be: ; 0x164be + dw LoadTileLists + db $02 + + db $02 + + dw vBGMap + $229 + db $d6, $d7 + + db $00 + +TileData_164c7: ; 0x164c7 + dw LoadTileLists + db $04 + + db $02 + dw vBGMap + $9 + db $38, $39 + + db $02 + dw vBGMap + $29 + db $3a, $3b + + db $00 + +TileData_164d5: ; 0x164d5 + dw LoadTileLists + db $04 + + db $02 + dw vBGMap + $9 + db $3c, $3d + + db $02 + dw vBGMap + $29 + db $3e, $3f + + db $00 diff --git a/engine/options_screen.asm b/engine/options_screen.asm index 6549451..64f0f43 100644 --- a/engine/options_screen.asm +++ b/engine/options_screen.asm @@ -163,8 +163,8 @@ Func_c493: ; 0xc493 lb de, $00, $01 call PlaySoundEffect xor a - ld [wd803], a - ld [wd804], a + ld [wRumblePattern], a + ld [wRumbleDuration], a ld a, $1 ld [wScreenState], a ret @@ -192,8 +192,8 @@ Func_c4b4: ; 0xc4b4 inc a ld [wd917], a xor a - ld [wd803], a - ld [wd804], a + ld [wRumblePattern], a + ld [wRumbleDuration], a lb de, $00, $03 call PlaySoundEffect ret @@ -742,9 +742,9 @@ Func_c869: ; 0xc869 cp $1 ret nz ld a, $55 - ld [wd803], a + ld [wRumblePattern], a ld a, $40 - ld [wd804], a + ld [wRumbleDuration], a ret Func_c88a: ; 0xc88a diff --git a/engine/pinball_game.asm b/engine/pinball_game.asm index 4374670..670457c 100644 --- a/engine/pinball_game.asm +++ b/engine/pinball_game.asm @@ -220,7 +220,7 @@ GameScreenFunction_HandleBallLoss: ; 0xda36 GameScreenFunction_EndBall: ; 0xdab2 xor a - ld [wd803], a + ld [wRumblePattern], a ld a, [wGameOver] and a jp nz, TransitionToHighScoresScreen @@ -261,7 +261,7 @@ GameScreenFunction_EndBall: ; 0xdab2 ld [wd4ad], a ld a, [wStageCollisionState] ld [wd4b0], a - ld a, [wd497] + ld a, [wNextStage] ld [wCurrentStage], a xor a ld [wd496], a diff --git a/engine/pinball_game/ball_gfx.asm b/engine/pinball_game/ball_gfx.asm index 2aff0d3..19e7cc1 100644 --- a/engine/pinball_game/ball_gfx.asm +++ b/engine/pinball_game/ball_gfx.asm @@ -80,11 +80,12 @@ LoadMiniBallGfx: ; 0xdd12 call LoadOrCopyVRAMData ret -Func_dd62: ; 0xdd62 +LoadSuperMiniPinballGfx: ; 0xdd62 +; Loads the mini pinball graphics, which are used when entering the Slot or Ditto caves. ld a, $2 ld [wd4c8], a ld a, $2a - ld hl, PinballBallMiniGfx + ld hl, PinballBallSuperMiniGfx ld de, vTilesOB tile $40 ld bc, $0200 call LoadOrCopyVRAMData diff --git a/engine/pinball_game/ball_loss/ball_loss_blue_field.asm b/engine/pinball_game/ball_loss/ball_loss_blue_field.asm index bdde203..e14a2b7 100644 --- a/engine/pinball_game/ball_loss/ball_loss_blue_field.asm +++ b/engine/pinball_game/ball_loss/ball_loss_blue_field.asm @@ -78,16 +78,16 @@ Func_ded6: ; 0xded6 cp SPECIAL_MODE_CATCHEM jr nz, .asm_df05 ld a, $0 - ld [wd604], a + ld [wSlotIsOpen], a ld a, $1e - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a callba ConcludeEvolutionMode ret .asm_df05 ld a, $0 - ld [wd604], a + ld [wSlotIsOpen], a ld a, $1e - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a callba Func_3022b ret diff --git a/engine/pinball_game/ball_loss/ball_loss_red_field.asm b/engine/pinball_game/ball_loss/ball_loss_red_field.asm index 31f6b4c..fc9895e 100644 --- a/engine/pinball_game/ball_loss/ball_loss_red_field.asm +++ b/engine/pinball_game/ball_loss/ball_loss_red_field.asm @@ -78,17 +78,17 @@ Func_ddfd: ; 0xddfd cp SPECIAL_MODE_CATCHEM jr nz, .asm_de2d xor a - ld [wd604], a + ld [wSlotIsOpen], a ld a, $1e - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a callba ConcludeEvolutionMode jr .asm_de40 .asm_de2d xor a - ld [wd604], a + ld [wSlotIsOpen], a ld a, $1e - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a callba Func_3022b .asm_de40 ld a, [wd7ad] diff --git a/engine/pinball_game/catchem_mode.asm b/engine/pinball_game/catchem_mode.asm index 0268589..d466c4a 100644 --- a/engine/pinball_game/catchem_mode.asm +++ b/engine/pinball_game/catchem_mode.asm @@ -1090,14 +1090,14 @@ ResetIndicatorStates: ; 0x107a5 Func_107b0: ; 0x107b0 xor a - ld [wd604], a + ld [wSlotIsOpen], a ld [wIndicatorStates + 4], a - callba Func_16425 + callba LoadSlotCaveCoverGraphics_RedField ret Func_107c2: ; 0x107c2 ld a, $1e - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a ret Func_107c8: ; 0x107c8 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 5354a51..d3eb504 100644 --- a/engine/pinball_game/draw_sprites/draw_blue_field_sprites.asm +++ b/engine/pinball_game/draw_sprites/draw_blue_field_sprites.asm @@ -20,7 +20,7 @@ DrawSpritesBlueFieldBottom: ; 0x1f35a callba DrawPinball call Func_1f4a3 call Func_1f509 - call Func_1f55e + call DrawSlotGlow_BlueField ret DrawShellderSprites: ; 0x1f395 @@ -351,13 +351,14 @@ OAMOffsetsTable_1f552: ; 0x1f552 db $25, $2C db $73, $2C -Func_1f55e: ; 0x1f55e - ld a, [wd604] +DrawSlotGlow_BlueField: ; 0x1f55e +; Draws the glowing animation surround the slot cave entrance. + ld a, [wSlotIsOpen] and a ret z - ld a, [wd606] + ld a, [wSlotGlowingAnimationCounter] inc a - ld [wd606], a + ld [wSlotGlowingAnimationCounter], a ld a, $40 ld hl, hSCX sub [hl] @@ -366,7 +367,7 @@ Func_1f55e: ; 0x1f55e ld hl, hSCY sub [hl] ld c, a - ld a, [wd606] + ld a, [wSlotGlowingAnimationCounter] srl a srl a srl a 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 2e34743..4f6cd38 100644 --- a/engine/pinball_game/draw_sprites/draw_red_field_sprites.asm +++ b/engine/pinball_game/draw_sprites/draw_red_field_sprites.asm @@ -22,7 +22,7 @@ DrawSpritesRedFieldBottom: ; 0x1757e call DrawPinball call Func_17f0f call Func_17f75 - call Func_17fca + call DrawSlotGlow_RedField ret DrawTimer: ; 0x175a4 @@ -733,13 +733,14 @@ OAMOffsets_17fbe: db $2E, $2C db $6A, $2C -Func_17fca: ; 0x17fca - ld a, [wd604] +DrawSlotGlow_RedField: ; 0x17fca +; Draws the glowing animation surround the slot cave entrance. + ld a, [wSlotIsOpen] and a ret z - ld a, [wd606] + ld a, [wSlotGlowingAnimationCounter] inc a - ld [wd606], a + ld [wSlotGlowingAnimationCounter], a ld a, $40 ld hl, hSCX sub [hl] @@ -748,7 +749,7 @@ Func_17fca: ; 0x17fca ld hl, hSCY sub [hl] ld c, a - ld a, [wd606] + ld a, [wSlotGlowingAnimationCounter] srl a srl a srl 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 efdbe83..7068b5b 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm @@ -135,7 +135,7 @@ Func_20c76: ; 0x20c76 lb de, $07, $45 call PlaySoundEffect ld a, $1 - ld [wd604], a + ld [wSlotIsOpen], a ld a, $80 ld [wIndicatorStates + 4], a xor a @@ -169,7 +169,7 @@ Func_20c76: ; 0x20c76 ld bc, $0008 call Func_7dc .asm_20d25 - callba Func_1e8f6 + callba LoadSlotCaveCoverGraphics_BlueField ret Func_20d30: ; 0x20d30 @@ -231,7 +231,7 @@ Func_20da0: ; 0x20da0 ld a, $2 ld [wd54d], a xor a - ld [wd604], a + ld [wSlotIsOpen], a ld hl, wIndicatorStates ld [wIndicatorStates + 4], a ld [wIndicatorStates + 9], a @@ -252,7 +252,7 @@ Func_20da0: ; 0x20da0 bit 0, a jr z, .asm_20e1a callba Func_1c2cb - callba Func_1e8f6 + callba LoadSlotCaveCoverGraphics_BlueField .asm_20e1a callba StopTimer call FillBottomMessageBufferWithBlackTile 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 384e958..b132e46 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm @@ -138,7 +138,7 @@ Func_20651: ; 0x20651 lb de, $07, $45 call PlaySoundEffect ld a, $1 - ld [wd604], a + ld [wSlotIsOpen], a ld a, $80 ld [wIndicatorStates + 4], a xor a @@ -172,7 +172,7 @@ Func_20651: ; 0x20651 ld bc, $0008 call Func_7dc .asm_20700 - callba Func_16425 + callba LoadSlotCaveCoverGraphics_RedField ret Func_2070b: ; 0x2070b @@ -234,7 +234,7 @@ Func_2077b: ; 0x2077b ld a, $2 ld [wd54d], a xor a - ld [wd604], a + ld [wSlotIsOpen], a ld hl, wIndicatorStates ld [wIndicatorStates + 4], a ld [wIndicatorStates + 9], a @@ -255,7 +255,7 @@ Func_2077b: ; 0x2077b bit 0, a jr z, .asm_207f5 callba Func_14135 - callba Func_16425 + callba LoadSlotCaveCoverGraphics_RedField .asm_207f5 callba StopTimer call FillBottomMessageBufferWithBlackTile 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 cefafcf..3db26f4 100644 --- a/engine/pinball_game/load_stage_data/load_blue_field.asm +++ b/engine/pinball_game/load_stage_data/load_blue_field.asm @@ -2,7 +2,7 @@ _LoadStageDataBlueFieldTop: ; 0x1c165 call LoadPinballUpgradeTriggersGraphics_BlueField call UpdateSpinnerChargeGraphics_BlueField call Func_1c3ee - call Func_1e8f6 + call LoadSlotCaveCoverGraphics_BlueField callba Func_142fc ld a, $1 ld [wBlueStageForceFieldGfxNeedsLoading], a @@ -23,7 +23,7 @@ _LoadStageDataBlueFieldBottom: ; 0x1c191 callba DrawBallSaverIcon call Func_1c235 call Func_1c21e - call Func_1e8f6 + call LoadSlotCaveCoverGraphics_BlueField callba Func_142fc callba Func_1404a call Func_1c203 @@ -432,7 +432,7 @@ Func_1c4b6: ; 0x1c4b6 ld a, [wInSpecialMode] and a jr nz, .asm_1c4f0 - ld a, [wd609] + ld a, [wOpenedSlotByGetting3Pokeballs] and a jr z, .asm_1c4d2 ld a, [wd498] @@ -441,7 +441,7 @@ Func_1c4b6: ; 0x1c4b6 ret .asm_1c4d2 - ld a, [wd608] + ld a, [wOpenedSlotByGetting4CAVELights] and a jr z, .asm_1c4e5 ld a, $1a @@ -463,7 +463,7 @@ Func_1c4b6: ; 0x1c4b6 ret .asm_1c508 - ld a, [wd604] + ld a, [wSlotIsOpen] and a ld a, $14 jr nz, .asm_1c515 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 9b97df8..e55559d 100644 --- a/engine/pinball_game/load_stage_data/load_red_field.asm +++ b/engine/pinball_game/load_stage_data/load_red_field.asm @@ -5,7 +5,7 @@ _LoadStageDataRedFieldTop: ; 0x14000 call Func_16859 call UpdateSpinnerChargeGraphics_RedField call Func_14234 - call Func_16425 + call LoadSlotCaveCoverGraphics_RedField call Func_142fc call Func_1404a ret @@ -23,7 +23,7 @@ _LoadStageDataRedFieldBottom: ; 0x1401c call Func_140f9 call Func_16878 call Func_140e2 - call Func_16425 + call LoadSlotCaveCoverGraphics_RedField call Func_142fc call Func_1404a ret @@ -391,7 +391,7 @@ Func_142fc: ; 0x142fc jr .asm_14328 .asm_1431e - callba Func_dd62 + callba LoadSuperMiniPinballGfx .asm_14328 ld a, [hGameBoyColorFlag] and a @@ -438,7 +438,7 @@ Func_14377: ; 0x14377 ld a, [wInSpecialMode] and a jr nz, .asm_143b1 - ld a, [wd609] + ld a, [wOpenedSlotByGetting3Pokeballs] and a jr z, .asm_14393 ld a, [wd498] @@ -447,7 +447,7 @@ Func_14377: ; 0x14377 ret .asm_14393 - ld a, [wd608] + ld a, [wOpenedSlotByGetting4CAVELights] and a jr z, .asm_143a6 ld a, $1a @@ -469,7 +469,7 @@ Func_14377: ; 0x14377 ret .asm_143c9 - ld a, [wd604] + ld a, [wSlotIsOpen] and a ld a, $14 jr nz, .asm_143d6 diff --git a/engine/pinball_game/menu.asm b/engine/pinball_game/menu.asm index a31ff1f..dcca98c 100644 --- a/engine/pinball_game/menu.asm +++ b/engine/pinball_game/menu.asm @@ -50,8 +50,8 @@ HandleInGameMenu: ; 0x86d7 ld bc, $04c3 call SaveData xor a - ld [wd803], a - ld [wd804], a + ld [wRumblePattern], a + ld [wRumbleDuration], a .pickedCancel ld bc, $003c call AdvanceFrames diff --git a/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm b/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm index fe31309..93736a9 100644 --- a/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm +++ b/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm @@ -8,10 +8,10 @@ ResolveBlueFieldTopGameObjectCollisions: ; 0x1c715 call ResolveBlueStagePikachuCollision call ResolveSlowpokeCollision call ResolveCloysterCollision - call Func_1ea3b + call ApplySlotForceField_BlueFieldTop call ResolvePsyduckPoliwagCollision call ResolveBlueStageForceFieldCollision - call Func_1e9c0 + call OpenSlotCave_BlueField call UpdateForceFieldDirection call Func_1f18a callba UpdateBallSaverState @@ -33,10 +33,10 @@ ResolveBlueFieldBottomGameObjectCollisions: ; 0x1c769 call ResolveBlueStagePinballLaunchCollision call ResolveBlueStagePikachuCollision call Func_1ead4 - call ResolveBlueStageBonusMultiplierCollision - call Func_1e757 - call Func_1e9c0 - call Func_1ea0a + call ResolveBonusMultiplierCollision_BlueField + call ResolveSlotCollision_BlueField + call OpenSlotCave_BlueField + call ApplySlotForceField_BlueFieldBottom call UpdateForceFieldDirection callba Func_14733 callba UpdateBallSaver @@ -357,9 +357,9 @@ ResolveShellderCollision: ; 0x1c9c1 ApplyShellderCollision: ; 0x1ca29 ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $3 - ld [wd804], a + ld [wRumbleDuration], a ld hl, $0200 ld a, l ld [wFlipperYForce], a @@ -579,9 +579,9 @@ asm_1ce7a: ; 0x1ce7a ApplyBumperCollision_BlueField: ; 0x1ce94 ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $3 - ld [wd804], a + ld [wRumbleDuration], a ld hl, $0200 ld a, l ld [wFlipperYForce], a @@ -815,9 +815,9 @@ Func_1d133: ; 0x1d133 ld a, $1 ld [wd85d], a ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $60 - ld [wd804], a + ld [wRumbleDuration], a ld hl, wNumPikachuSaves call Increment_Max100 jr nc, .asm_1d185 @@ -1147,7 +1147,7 @@ CloysterCollisionAnimationData: ; 0x1d41d db $28, $01 db 00 ; terminator -ResolveBlueStageBonusMultiplierCollision: ; 0x1d438 +ResolveBonusMultiplierCollision_BlueField: ; 0x1d438 call Func_1d692 ld a, [wWhichBonusMultiplierRailing] and a @@ -1801,9 +1801,9 @@ AddScorePsyduckOrPoliwag: ; 0x1de22 bit 0, a ret z ld a, $55 - ld [wd803], a + ld [wRumblePattern], a ld a, $4 - ld [wd804], a + ld [wRumbleDuration], a ld a, $2 ld [wd7eb], a ld bc, FiveHundredPoints @@ -2412,9 +2412,9 @@ UpdateCAVELightsBlinking_BlueField: ; 0x1e66a jr nz, .asm_1e687 ld [wCAVELightsBlinking], a ld a, $1 - ld [wd608], a + ld [wOpenedSlotByGetting4CAVELights], a ld a, $3 - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a xor a .asm_1e687 and $7 @@ -2481,18 +2481,18 @@ UpdateCAVELightsBlinking_BlueField: ; 0x1e66a INCLUDE "data/queued_tiledata/blue_field/cave_lights.asm" -Func_1e757: ; 0x1e757 +ResolveSlotCollision_BlueField: ; 0x1e757 ld a, [wSlotCollision] and a - jr z, .asm_1e78c + jr z, .noCollision xor a ld [wSlotCollision], a - ld a, [wd604] + ld a, [wSlotIsOpen] and a ret z - ld a, [wd603] + ld a, [wSlotEnterOrExitCounter] and a - jr nz, .asm_1e78c + jr nz, .noCollision xor a ld hl, wBallXVelocity ld [hli], a @@ -2507,16 +2507,16 @@ Func_1e757: ; 0x1e757 ld a, $16 ld [wBallYPos + 1], a ld a, $13 - ld [wd603], a -.asm_1e78c - ld a, [wd603] + ld [wSlotEnterOrExitCounter], a +.noCollision + ld a, [wSlotEnterOrExitCounter] and a ret z dec a - ld [wd603], a + ld [wSlotEnterOrExitCounter], a ld a, $18 - ld [wd606], a - ld a, [wd603] + ld [wSlotGlowingAnimationCounter], a + ld a, [wSlotEnterOrExitCounter] cp $12 jr nz, .asm_1e7b2 lb de, $00, $21 @@ -2527,7 +2527,7 @@ Func_1e757: ; 0x1e757 .asm_1e7b2 cp $f jr nz, .asm_1e7c1 - callba Func_dd62 + callba LoadSuperMiniPinballGfx ret .asm_1e7c1 @@ -2542,18 +2542,18 @@ Func_1e757: ; 0x1e757 .asm_1e7d0 cp $9 jr nz, .asm_1e7d8 - call Func_1e830 + call DoSlotLogic_BlueField ret .asm_1e7d8 cp $6 jr nz, .asm_1e7f5 xor a - ld [wd604], a + ld [wSlotIsOpen], a ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a callba LoadMiniBallGfx ret @@ -2570,7 +2570,7 @@ Func_1e757: ; 0x1e757 .asm_1e80e and a ret nz - call Func_1e8f6 + call LoadSlotCaveCoverGraphics_BlueField ld a, [wCatchEmOrEvolutionSlotRewardActive] cp CATCHEM_MODE_SLOT_REWARD ret nz @@ -2582,7 +2582,9 @@ Func_1e757: ; 0x1e757 ld [wCatchEmOrEvolutionSlotRewardActive], a ret -Func_1e830: ; 0x1e830 +DoSlotLogic_BlueField: ; 0x1e830 +; Performs the slot logic when pinball entered the slot cave. +; This could be the slot roulette, or evolving a pokemon, for example. xor a ld [wIndicatorStates + 4], a ld a, $d @@ -2597,7 +2599,7 @@ Func_1e830: ; 0x1e830 ld a, [wPreviousNumPokeballs] cp $3 jr nz, .asm_1e891 - ld a, [wd607] + ld a, [wFramesUntilSlotCaveOpens] and a jr nz, .asm_1e891 .asm_1e858 @@ -2617,22 +2619,22 @@ Func_1e830: ; 0x1e830 ld a, [wd498] ld c, a ld b, $0 - ld hl, GoToBonusStageTextIds_BlueField + ld hl, BonusStages_BlueField add hl, bc ld a, [hl] - ld [wd497], a - call Func_1e8c3 + ld [wNextStage], a + call ShowScrollingGoToBonusText_BlueField xor a - ld [wd609], a + ld [wOpenedSlotByGetting3Pokeballs], a ld [wCatchEmOrEvolutionSlotRewardActive], a ld a, $1e - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a ret .asm_1e891 callba Func_ed8e xor a - ld [wd608], a + ld [wOpenedSlotByGetting4CAVELights], a ld a, [wd61d] cp $d jr nc, .asm_1e858 @@ -2647,11 +2649,11 @@ Func_1e830: ; 0x1e830 ld [wCatchEmOrEvolutionSlotRewardActive], a ret -Func_1e8c3: ; 0x1e8c3 +ShowScrollingGoToBonusText_BlueField: ; 0x1e8c3 call FillBottomMessageBufferWithBlackTile call Func_30db ld hl, wScrollingText3 - ld a, [wd497] + ld a, [wNextStage] ld de, GoToMeowthStageText cp STAGE_MEOWTH_BONUS jr z, .loadText @@ -2668,19 +2670,21 @@ Func_1e8c3: ; 0x1e8c3 call PlaySoundEffect ret -GoToBonusStageTextIds_BlueField: +BonusStages_BlueField: db STAGE_GENGAR_BONUS db STAGE_MEWTWO_BONUS db STAGE_MEOWTH_BONUS db STAGE_DIGLETT_BONUS db STAGE_SEEL_BONUS -Func_1e8f6: ; 0x1e8f6 +LoadSlotCaveCoverGraphics_BlueField: ; 0x1e8f6 +; Loads the graphics for the circular slot cave area. +; It looks like a cover that opens and closes. ld a, [wCurrentStage] and $1 sla a ld c, a - ld a, [wd604] + ld a, [wSlotIsOpen] add c sla a ld c, a @@ -2701,178 +2705,19 @@ Func_1e8f6: ; 0x1e8f6 call Func_10aa ret -TileDataPointers_1e91e: - dw TileData_1e926 - dw TileData_1e929 - dw TileData_1e92c - dw TileData_1e931 - -TileData_1e926: ; 0x1e926 - db $01 - dw TileData_1e936 - -TileData_1e929: ; 0x1e929 - db $01 - dw TileData_1e93f - -TileData_1e92c: ; 0x1e92c - db $02 - dw TileData_1e948 - dw TileData_1e952 - -TileData_1e931: ; 0x1e931 - db $02 - dw TileData_1e95c - dw TileData_1e966 - -TileData_1e936: ; 0x1e936 - dw LoadTileLists - db $02 ; total number of tiles - - db $02 ; number of tiles - dw vBGMap + $229 - db $EE, $EF - - db $00 ; terminator - -TileData_1e93f: ; 0x1e93f - dw LoadTileLists - db $02 ; total number of tiles - - db $02 ; number of tiles - dw vBGMap + $229 - db $F0, $F1 - - db $00 ; terminator - -TileData_1e948: ; 0x1e948 - dw Func_11d2 - db $20, $02 - dw vTilesBG tile $1F - dw StageBlueFieldBottomBaseGameBoyGfx + $9F0 - db Bank(StageBlueFieldBottomBaseGameBoyGfx) - db $00 - -TileData_1e952: ; 0x1e952 - dw Func_11d2 - db $20, $02 - dw vTilesBG tile $21 - dw StageBlueFieldBottomBaseGameBoyGfx + $A10 - db Bank(StageBlueFieldBottomBaseGameBoyGfx) - db $00 - -TileData_1e95c: ; 0x1e95c - dw Func_11d2 - db $20, $02 - dw vTilesBG tile $1F - dw StageRedFieldBottomIndicatorsGfx_Gameboy + $1BC0 - db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) - db $00 - -TileData_1e966: ; 0x1e966 - dw Func_11d2 - db $20, $02 - dw vTilesBG tile $21 - dw StageRedFieldBottomIndicatorsGfx_Gameboy + $1BE0 - db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) - db $00 - -TileDataPointers_1e970: - dw TileData_1e978 - dw TileData_1e97d - dw TileData_1e980 - dw TileData_1e983 - -TileData_1e978: ; 0x1e978 - db $02 - dw TileData_1e986 - dw TileData_1e98F - -TileData_1e97d: ; 0x1e97d - db $01 - dw TileData_1e99b - -TileData_1e980: ; 0x1e980 - db $01 - dw TileData_1e9a4 - -TileData_1e983: ; 0x1e983 - db $01 - dw TileData_1e9b2 - -TileData_1e986: ; 0x1e986 - dw LoadTileLists - db $02 ; total number of tiles - - db $02 ; number of tiles - dw vBGMap + $229 - db $F0, $F1 - - db $00 ; terminator - -TileData_1e98F: ; 0x1e98F - dw LoadTileLists - db $02 ; total number of tiles - - db $01 ; number of tiles - dw vBGMap + $224 - db $D8 - - db $01 ; number of tiles - dw vBGMap + $22f - db $EC - - db $00 ; terminator - -TileData_1e99b: ; 0x1e99b - dw LoadTileLists - db $02 ; total number of tiles - - db $02 ; number of tiles - dw vBGMap + $229 - db $F2, $F3 - - db $00 ; terminator - -TileData_1e9a4: ; 0x1e9a4 - dw LoadTileLists - db $04 ; total number of tiles - - db $02 ; number of tiles - dw $9809 - db $15, $16 - - db $02 ; terminator - dw vBGMap + $29 - db $17, $18 - - db $00 ; terminator - -TileData_1e9b2: ; 0x1e9b2 - dw LoadTileLists - db $04 ; total number of tiles - - db $02 ; number of tiles - dw vBGMap + $9 - db $19, $1A - - db $02 ; terminator - dw vBGMap + $29 - db $1B, $1C - - db $00 ; terminator +INCLUDE "data/queued_tiledata/blue_field/slot_cave.asm" -Func_1e9c0: ; 0x1e9c0 - ld a, [wd607] +OpenSlotCave_BlueField: ; 0x1e9c0 + ld a, [wFramesUntilSlotCaveOpens] and a ret z dec a - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a ret nz ld a, [wInSpecialMode] and a ret nz - ld a, [wd609] + ld a, [wOpenedSlotByGetting3Pokeballs] and a jr z, .asm_1e9dc ld a, [wd498] @@ -2880,28 +2725,29 @@ Func_1e9c0: ; 0x1e9c0 jr .asm_1e9e3 .asm_1e9dc - ld a, [wd608] + ld a, [wOpenedSlotByGetting4CAVELights] and a ret z - ld a, $1a + ld a, $1a ; "Slot On" billboard picture id .asm_1e9e3 ld hl, wCurrentStage bit 0, [hl] callba nz, LoadBillboardTileData - ld a, [wd604] + ld a, [wSlotIsOpen] and a ret nz ld a, $1 - ld [wd604], a + ld [wSlotIsOpen], a ld a, $80 ld [wIndicatorStates + 4], a ld a, [wCurrentStage] bit 0, a - call nz, Func_1e8f6 + call nz, LoadSlotCaveCoverGraphics_BlueField ret -Func_1ea0a: ; 0x1ea0a - ld a, [wd604] +ApplySlotForceField_BlueFieldBottom: ; 0x1ea0a +; Applies the force field to the pinball when near the slot cave opening. + ld a, [wSlotIsOpen] and a ret z ld a, [wBallYPos + 1] @@ -2928,10 +2774,13 @@ Func_1ea0a: ; 0x1ea0a sla c sla c add hl, bc - jr asm_1ea6a + jr _ApplySlotForceField_BlueField -Func_1ea3b: ; 0x1ea3b - ld a, [wd604] +ApplySlotForceField_BlueFieldTop: ; 0x1ea3b +; Applies the force field to the pinball when near the slot cave opening. +; Even though the Slot cave is on the bottom half of the board, the force field +; still affects the pinball when it's really close to the bottom of the top-half of the board. + ld a, [wSlotIsOpen] and a ret z ld a, [wBallYPos + 1] @@ -2960,7 +2809,8 @@ Func_1ea3b: ; 0x1ea3b add hl, bc ; fall through -asm_1ea6a: ; 0x1ea6a +_ApplySlotForceField_BlueField: ; 0x1ea6a +; Applies the force field to the pinball when near the slot cave opening. ld bc, BallPhysicsData_f0000 add hl, bc ld de, wBallXVelocity @@ -3024,13 +2874,13 @@ asm_1ea6a: ; 0x1ea6a ld a, h cp $2 ret c - ld a, [wd804] + ld a, [wRumbleDuration] and a ret nz ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a lb de, $00, $04 call PlaySoundEffect ret @@ -4288,13 +4138,13 @@ Func_1eff3: ; 0x1eff3 ld a, h cp $2 ret c - ld a, [wd804] + ld a, [wRumbleDuration] and a ret nz ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a ret Func_1f057: ; 0x1f057 @@ -4363,13 +4213,13 @@ Func_1f057: ; 0x1f057 ld a, h cp $2 ret c - ld a, [wd804] + ld a, [wRumbleDuration] and a ret nz ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a ret Func_1f0be: ; 0x1f0be @@ -4438,13 +4288,13 @@ Func_1f0be: ; 0x1f0be ld a, h cp $2 ret c - ld a, [wd804] + ld a, [wRumbleDuration] and a ret nz ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a ret Func_1f124: ; 0x1f124 @@ -4513,13 +4363,13 @@ Func_1f124: ; 0x1f124 ld a, h cp $2 ret c - ld a, [wd804] + ld a, [wRumbleDuration] and a ret nz ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a ret Func_1f18a: ; 0x1f18a @@ -4585,9 +4435,9 @@ Func_1f27b: ; 0x1f27b cp $3 jr c, .asm_1f2a0 ld a, $1 - ld [wd609], a + ld [wOpenedSlotByGetting3Pokeballs], a ld a, $3 - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a .asm_1f2a0 ld a, [wPreviousNumPokeballs] scf @@ -4652,11 +4502,11 @@ TileData_1f2e2: ; 0x1f2e2 Func_1f2ed: ; 0x1f2ed xor a - ld [wd604], a + ld [wSlotIsOpen], a ld [wIndicatorStates + 4], a ld [hFarCallTempA], a - ld a, Bank(Func_1e8f6) ; this is in the same bank... - ld hl, Func_1e8f6 + ld a, Bank(LoadSlotCaveCoverGraphics_BlueField) ; this is in the same bank... + ld hl, LoadSlotCaveCoverGraphics_BlueField call BankSwitch ret diff --git a/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm b/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm index 05cb568..4bfbba4 100644 --- a/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm @@ -547,9 +547,9 @@ Func_1aad4: ; 0x1aad4 lb de, $00, $36 call PlaySoundEffect ld a, $33 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a ld hl, $0200 ld a, l ld [wFlipperYForce], a 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 6d57675..b991e1f 100644 --- a/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm @@ -210,9 +210,9 @@ Func_18464: ; 0x18464 ld bc, OneHundredThousandPoints callba AddBigBCD6FromQueue ld a, $33 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a ld hl, $0100 ld a, l ld [wFlipperYForce], a @@ -458,9 +458,9 @@ Func_1860b: ; 0x1860b ld bc, FiveHundredThousandPoints callba AddBigBCD6FromQueue ld a, $33 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a ld hl, $0100 ld a, l ld [wFlipperYForce], a @@ -727,9 +727,9 @@ Func_187b1: ; 0x187b1 ld bc, FiveMillionPoints callba AddBigBCD6FromQueue ld a, $33 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a ld hl, $0200 ld a, l ld [wFlipperYForce], a @@ -773,9 +773,9 @@ Func_18876: ; 0x18876 ld a, $1 ld [wd6a4], a ld a, $11 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a .asm_1889b ld a, [wGengarAnimationState] ld hl, wd6a3 @@ -824,9 +824,9 @@ Func_188e1: ; 0x188e1 jr nz, .asm_18901 .asm_188f7 ld a, $1 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a .asm_18901 ld a, [wGengarAnimationState] cp $6 @@ -1429,9 +1429,9 @@ Func_18d34: ; 0x18d34 ld bc, OneHundredPoints callba AddBigBCD6FromQueue ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $3 - ld [wd804], a + ld [wRumbleDuration], a ld hl, $0100 ld a, l ld [wFlipperYForce], a 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 78b01a0..c61a567 100644 --- a/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm @@ -415,9 +415,9 @@ Func_245ab: ; 0x245ab ld [wd6e7], a ld [wd6f3], a ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $3 - ld [wd804], a + ld [wRumbleDuration], a lb de, $00, $33 call PlaySoundEffect ld bc, OneThousandPoints @@ -1661,9 +1661,9 @@ Func_24e7f: ; 0x24e7f ld [hl], a .asm_24e92 ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $3 - ld [wd804], a + ld [wRumbleDuration], a lb de, $00, $32 call PlaySoundEffect ld a, [wMeowthStageBonusCounter] diff --git a/engine/pinball_game/object_collision/mewtwo_bonus_object_collision.asm b/engine/pinball_game/object_collision/mewtwo_bonus_object_collision.asm index e6bbae5..7b15498 100644 --- a/engine/pinball_game/object_collision/mewtwo_bonus_object_collision.asm +++ b/engine/pinball_game/object_collision/mewtwo_bonus_object_collision.asm @@ -137,13 +137,13 @@ Func_1936f: ; 0x1936f ld a, h cp $2 jr c, .asm_19410 - ld a, [wd804] + ld a, [wRumbleDuration] and a jr nz, .asm_19410 ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a .asm_19410 scf ret 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 f8c7a6f..3c784f3 100644 --- a/engine/pinball_game/object_collision/red_stage_resolve_collision.asm +++ b/engine/pinball_game/object_collision/red_stage_resolve_collision.asm @@ -11,8 +11,8 @@ ResolveRedFieldTopGameObjectCollisions: ; 0x1460e call ResolveStaryuCollision call ResolveBellsproutCollision call ResolveDittoSlotCollision - call Func_161e0 - call Func_164e3 + call ApplySlotForceField_RedFieldTop + call OpenSlotCave_RedField call UpdateBallSaverState call Func_174ea call UpdateMapMoveCounters_RedFieldTop @@ -35,9 +35,9 @@ ResolveRedFieldBottomGameObjectCollisions: ; 0x14652 call Func_167ff call Func_169a6 call ResolveRedStageBonusMultiplierCollision - call Func_16279 - call Func_161af - call Func_164e3 + call ResolveSlotCollision_RedField + call ApplySlotForceField_RedFieldBottom + call OpenSlotCave_RedField call Func_14733 call UpdateBallSaver call Func_174d0 @@ -457,9 +457,9 @@ HitLeftDiglett3Times: ; 0x14947 AddScoreForHittingDiglett: ; 0x1496d ld a, $55 - ld [wd803], a + ld [wRumblePattern], a ld a, $4 - ld [wd804], a + ld [wRumbleDuration], a ld a, $2 ld [wd7eb], a ld bc, FiveHundredPoints @@ -582,9 +582,9 @@ ResolveVoltorbCollision: ; 0x14d85 Func_14dc9: ; 0x14dc9 ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $3 - ld [wd804], a + ld [wRumbleDuration], a ld hl, $0200 ld a, l ld [wFlipperYForce], a @@ -848,9 +848,9 @@ UpdateCAVELightsBlinking_RedField: ; 0x15270 jr nz, .asm_1528d ld [wCAVELightsBlinking], a ld a, $1 - ld [wd608], a + ld [wOpenedSlotByGetting4CAVELights], a ld a, $3 - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a xor a .asm_1528d and $7 @@ -2478,9 +2478,9 @@ asm_15fc0 ApplyBumperCollision_RedField: ; 0x15fda ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $3 - ld [wd804], a + ld [wRumbleDuration], a ld hl, $0200 ld a, l ld [wFlipperYForce], a @@ -2530,17 +2530,17 @@ ResolveDittoSlotCollision: ; 0x160f0 ld a, $23 ld [wBallYPos + 1], a ld a, $10 - ld [wd600], a + ld [wDittoEnterOrExitCounter], a ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a .asm_16137 - ld a, [wd600] + ld a, [wDittoEnterOrExitCounter] and a ret z dec a - ld [wd600], a + ld [wDittoEnterOrExitCounter], a cp $f jr nz, .asm_1614f callba LoadMiniBallGfx @@ -2549,7 +2549,7 @@ ResolveDittoSlotCollision: ; 0x160f0 .asm_1614f cp $c jr nz, .asm_1615e - callba Func_dd62 + callba LoadSuperMiniPinballGfx ret .asm_1615e @@ -2569,9 +2569,9 @@ ResolveDittoSlotCollision: ; 0x160f0 ld [wPinballIsVisible], a ld [wEnableBallGravityAndTilt], a ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a ret .asm_1618e @@ -2588,8 +2588,9 @@ ResolveDittoSlotCollision: ; 0x160f0 ld [wBallYVelocity + 1], a ret -Func_161af: ; 0x161af - ld a, [wd604] +ApplySlotForceField_RedFieldBottom: ; 0x161af +; Applies the force field to the pinball when near the slot cave opening. + ld a, [wSlotIsOpen] and a ret z ld a, [wBallYPos + 1] @@ -2616,10 +2617,13 @@ Func_161af: ; 0x161af sla c sla c add hl, bc - jr asm_1620f + jr _ApplySlotForceField_RedField -Func_161e0: ; 0x161e0 - ld a, [wd604] +ApplySlotForceField_RedFieldTop: ; 0x161e0 +; Applies the force field to the pinball when near the slot cave opening. +; Even though the Slot cave is on the bottom half of the board, the force field +; still affects the pinball when it's really close to the bottom of the top-half of the board. + ld a, [wSlotIsOpen] and a ret z ld a, [wBallYPos + 1] @@ -2646,7 +2650,10 @@ Func_161e0: ; 0x161e0 sla c sla c add hl, bc -asm_1620f: ; 0x1620f + ; fall through + +_ApplySlotForceField_RedField: ; 0x1620f +; Applies the force field to the pinball when near the slot cave opening. ld bc, BallPhysicsData_f0000 add hl, bc ld de, wBallXVelocity @@ -2710,29 +2717,29 @@ asm_1620f: ; 0x1620f ld a, h cp $2 ret c - ld a, [wd804] + ld a, [wRumbleDuration] and a ret nz ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a lb de, $00, $04 call PlaySoundEffect ret -Func_16279: ; 0x16279 +ResolveSlotCollision_RedField: ; 0x16279 ld a, [wSlotCollision] and a - jr z, .asm_162ae + jr z, .noCollision xor a ld [wSlotCollision], a - ld a, [wd604] + ld a, [wSlotIsOpen] and a ret z - ld a, [wd603] + ld a, [wSlotEnterOrExitCounter] and a - jr nz, .asm_162ae + jr nz, .noCollision xor a ld hl, wBallXVelocity ld [hli], a @@ -2747,16 +2754,16 @@ Func_16279: ; 0x16279 ld a, $16 ld [wBallYPos + 1], a ld a, $13 - ld [wd603], a -.asm_162ae - ld a, [wd603] + ld [wSlotEnterOrExitCounter], a +.noCollision + ld a, [wSlotEnterOrExitCounter] and a ret z dec a - ld [wd603], a + ld [wSlotEnterOrExitCounter], a ld a, $18 - ld [wd606], a - ld a, [wd603] + ld [wSlotGlowingAnimationCounter], a + ld a, [wSlotEnterOrExitCounter] cp $12 jr nz, .asm_162d4 lb de, $00, $21 @@ -2767,7 +2774,7 @@ Func_16279: ; 0x16279 .asm_162d4 cp $f jr nz, .asm_162e3 - callba Func_dd62 + callba LoadSuperMiniPinballGfx ret .asm_162e3 @@ -2782,18 +2789,18 @@ Func_16279: ; 0x16279 .asm_162f2 cp $9 jr nz, .asm_162fa - call Func_16352 + call DoSlotLogic_RedField ret .asm_162fa cp $6 jr nz, .asm_16317 xor a - ld [wd604], a + ld [wSlotIsOpen], a ld a, $5 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a callba LoadMiniBallGfx ret @@ -2810,7 +2817,7 @@ Func_16279: ; 0x16279 .asm_16330 and a ret nz - call Func_16425 + call LoadSlotCaveCoverGraphics_RedField ld a, [wCatchEmOrEvolutionSlotRewardActive] cp CATCHEM_MODE_SLOT_REWARD ret nz @@ -2822,7 +2829,9 @@ Func_16279: ; 0x16279 ld [wCatchEmOrEvolutionSlotRewardActive], a ret -Func_16352: ; 0x16352 +DoSlotLogic_RedField: ; 0x16352 +; Performs the slot logic when pinball entered the slot cave. +; This could be the slot roulette, or evolving a pokemon, for example. xor a ld [wIndicatorStates + 4], a ld a, $d @@ -2837,7 +2846,7 @@ Func_16352: ; 0x16352 ld a, [wPreviousNumPokeballs] cp $3 jr nz, .asm_163b3 - ld a, [wd607] + ld a, [wFramesUntilSlotCaveOpens] and a jr nz, .asm_163b3 .asm_1637a @@ -2857,22 +2866,22 @@ Func_16352: ; 0x16352 ld a, [wd498] ld c, a ld b, $0 - ld hl, GoToBonusStageTextIds_RedField + ld hl, BonusStages_RedField add hl, bc ld a, [hl] - ld [wd497], a - call Func_163f2 + ld [wNextStage], a + call ShowScrollingGoToBonusText_RedField xor a - ld [wd609], a + ld [wOpenedSlotByGetting3Pokeballs], a ld [wCatchEmOrEvolutionSlotRewardActive], a ld a, $1e - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a ret .asm_163b3 callba Func_ed8e xor a - ld [wd608], a + ld [wOpenedSlotByGetting4CAVELights], a ld a, [wd61d] cp $d jr nc, .asm_1637a @@ -2893,11 +2902,11 @@ Func_16352: ; 0x16352 ld [wCatchEmOrEvolutionSlotRewardActive], a ret -Func_163f2: ; 0x163f2 +ShowScrollingGoToBonusText_RedField: ; 0x163f2 call FillBottomMessageBufferWithBlackTile call Func_30db ld hl, wScrollingText3 - ld a, [wd497] + ld a, [wNextStage] ld de, GoToDiglettStageText cp STAGE_DIGLETT_BONUS jr z, .asm_1640f @@ -2914,19 +2923,21 @@ Func_163f2: ; 0x163f2 call PlaySoundEffect ret -GoToBonusStageTextIds_RedField: +BonusStages_RedField: db STAGE_GENGAR_BONUS db STAGE_MEWTWO_BONUS db STAGE_MEOWTH_BONUS db STAGE_DIGLETT_BONUS db STAGE_SEEL_BONUS -Func_16425: ; 0x16425 +LoadSlotCaveCoverGraphics_RedField: ; 0x16425 +; Loads the graphics for the circular slot cave area. +; It looks like a cover that opens and closes. ld a, [wCurrentStage] and $1 sla a ld c, a - ld a, [wd604] + ld a, [wSlotIsOpen] add c sla a ld c, a @@ -2947,160 +2958,19 @@ Func_16425: ; 0x16425 call Func_10aa ret -TileDataPointers_1644d: - dw TileData_16455 - dw TileData_16458 - dw TileData_1645b - dw TileData_16460 - -TileData_16455: ; 0x16455 - db $01 - dw TileData_16465 - -TileData_16458: ; 0x16458 - db $01 - dw TileData_1646f - -TileData_1645b: ; 0x1645b - db $02 - dw TileData_16479 - dw TileData_16483 - -TileData_16460: ; 0x16460 - db $02 - dw TileData_1648D - dw TileData_16497 - -TileData_16465: ; 0x16465 - dw Func_11d2 - db $20, $02 - dw vTilesSH tile $46 - dw StageRedFieldTopBaseGameBoyGfx + $1c0 - db Bank(StageRedFieldTopBaseGameBoyGfx) - db $00 - -TileData_1646f: ; 0x1646f - dw Func_11d2 - db $20, $02 - dw vTilesSH tile $46 - dw StageRedFieldBottomIndicatorsGfx_Gameboy + $340 - db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) - db $00 - -TileData_16479: ; 0x16479 - dw Func_11d2 - db $20, $02 - dw vTilesBG tile $48 - dw StageRedFieldBottomBaseGameBoyGfx + $c80 - db Bank(StageRedFieldBottomBaseGameBoyGfx) - db $00 - -TileData_16483: ; 0x16483 - dw Func_11d2 - db $20, $02 - dw vTilesBG tile $4A - dw StageRedFieldBottomBaseGameBoyGfx + $CA0 - db Bank(StageRedFieldBottomBaseGameBoyGfx) - db $00 - -TileData_1648D: ; 0x1648D - dw Func_11d2 - db $20, $02 - dw vTilesBG tile $48 - dw StageRedFieldBottomIndicatorsGfx_Gameboy + $340 - db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) - db $00 - -TileData_16497: ; 0x16497 - dw Func_11d2 - db $20, $02 - dw vTilesBG tile $4A - dw StageRedFieldBottomIndicatorsGfx_Gameboy + $360 - db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) - db $00 - -TileDataPointers_164a1: - dw TileData_164a9 - dw TileData_164ac - dw TileData_164af - dw TileData_164b2 - -TileData_164a9: ; 0x164a9 - db $01 - dw TileData_164b5 - -TileData_164ac: ; 0x164ac - db $01 - dw TileData_164be - -TileData_164af: ; 0x164af - db $01 - dw TileData_164c7 - -TileData_164b2: ; 0x164b2 - db $01 - dw TileData_164d5 - -TileData_164b5: ; 0x164b5 - dw LoadTileLists - db $02 - - db $02 - dw vBGMap + $229 - db $d4, $d5 - - db $00 - -TileData_164be: ; 0x164be - dw LoadTileLists - db $02 - - db $02 - - dw vBGMap + $229 - db $d6, $d7 - - db $00 - -TileData_164c7: ; 0x164c7 - dw LoadTileLists - db $04 - - db $02 - dw vBGMap + $9 - db $38, $39 - - db $02 - dw vBGMap + $29 - db $3a, $3b - - db $00 - -TileData_164d5: ; 0x164d5 - dw LoadTileLists - db $04 - - db $02 - dw vBGMap + $9 - db $3c, $3d - - db $02 - dw vBGMap + $29 - db $3e, $3f - - db $00 +INCLUDE "data/queued_tiledata/red_field/slot_cave.asm" -Func_164e3: ; 0x164e3 - ld a, [wd607] +OpenSlotCave_RedField: ; 0x164e3 + ld a, [wFramesUntilSlotCaveOpens] and a ret z dec a - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a ret nz ld a, [wInSpecialMode] and a ret nz - ld a, [wd609] + ld a, [wOpenedSlotByGetting3Pokeballs] and a jr z, .asm_164ff ld a, [wd498] @@ -3108,7 +2978,7 @@ Func_164e3: ; 0x164e3 jr .asm_16506 .asm_164ff - ld a, [wd608] + ld a, [wOpenedSlotByGetting4CAVELights] and a ret z ld a, $1a @@ -3116,16 +2986,16 @@ Func_164e3: ; 0x164e3 ld hl, wCurrentStage bit 0, [hl] callba nz, LoadBillboardTileData - ld a, [wd604] + ld a, [wSlotIsOpen] and a ret nz ld a, $1 - ld [wd604], a + ld [wSlotIsOpen], a ld a, $80 ld [wIndicatorStates + 4], a ld a, [wCurrentStage] bit 0, a - call nz, Func_16425 + call nz, LoadSlotCaveCoverGraphics_RedField ret ResolveRedStagePinballLaunchCollision: ; 0x1652d @@ -3325,9 +3195,9 @@ Func_1669e: ; 0x1669e ld a, $1 ld [wd85d], a ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $60 - ld [wd804], a + ld [wRumbleDuration], a ld hl, wNumPikachuSaves call Increment_Max100 jr nc, .asm_166f0 @@ -5050,9 +4920,9 @@ Func_174ea: ; 0x174ea cp $3 jr c, .asm_1750f ld a, $1 - ld [wd609], a + ld [wOpenedSlotByGetting3Pokeballs], a ld a, $3 - ld [wd607], a + ld [wFramesUntilSlotCaveOpens], a .asm_1750f ld a, [wPreviousNumPokeballs] scf 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 8d68591..c4a947f 100644 --- a/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm @@ -258,9 +258,9 @@ Func_25da3: ; 0x25da3 ld [wd79a], a .asm_25e07 ld a, $33 - ld [wd803], a + ld [wRumblePattern], a ld a, $8 - ld [wd804], a + ld [wRumbleDuration], a lb de, $00, $30 call PlaySoundEffect call Func_25e85 diff --git a/engine/pinball_game/slot.asm b/engine/pinball_game/slot.asm index 268e118..3331fae 100644 --- a/engine/pinball_game/slot.asm +++ b/engine/pinball_game/slot.asm @@ -1,7 +1,7 @@ Func_ed8e: ; 0xed8e xor a - ld [wd803], a - ld [wd804], a + ld [wRumblePattern], a + ld [wRumbleDuration], a ld [wCatchEmOrEvolutionSlotRewardActive], a ld a, [wNumPartyMons] ld [wSlotAnyPokemonCaught], a diff --git a/engine/pinball_game/vertical_screen_transition.asm b/engine/pinball_game/vertical_screen_transition.asm index f27a221..57ae6bb 100644 --- a/engine/pinball_game/vertical_screen_transition.asm +++ b/engine/pinball_game/vertical_screen_transition.asm @@ -4,7 +4,7 @@ FieldVerticalTransition: ; 0xe674 push af xor a ld [wPinballIsVisible], a - ld [wd803], a + ld [wRumblePattern], a callba DrawSpritesForStage call CleanOAMBuffer pop af diff --git a/home.asm b/home.asm index 7f1e91f..449d4f9 100644 --- a/home.asm +++ b/home.asm @@ -356,9 +356,9 @@ VBlank: ; 0x2f2 ld a, [wd917] and a jr nz, .asm_3b5 - ld a, [wd803] + ld a, [wRumblePattern] rrca - ld [wd803], a + ld [wRumblePattern], a and $1 jr z, .asm_3b5 set 3, [hl] @@ -2560,23 +2560,25 @@ Func_1ffc: ; 0x1ffc ld a, SCREEN_ERASE_ALL_DATA ld [wCurrentScreen], a .master_loop - call Func_2034 + call TickRumbleDuration call DoScreenLogic call CleanOAMBuffer call ClearPersistentJoypadStates rst AdvanceFrame jr .master_loop -Func_2034: ; 0x2034 - ld a, [wd804] +TickRumbleDuration: ; 0x2034 +; Decrements the Gameboy rumble duration. +; Turns off rumble when it gets to 0. + ld a, [wRumbleDuration] and a - jr z, .asm_203f + jr z, .rumbleOff dec a - ld [wd804], a + ld [wRumbleDuration], a ret -.asm_203f - ld [wd803], a +.rumbleOff + ld [wRumblePattern], a ret DoScreenLogic: ; 0x2043 @@ -2983,9 +2985,9 @@ ApplyTorque: ; 0x222b cp $3 jr c, .asm_2254 ld a, $ff - ld [wd803], a + ld [wRumblePattern], a ld a, $1 - ld [wd804], a + ld [wRumbleDuration], a ld a, [wFlipperCollision] and a jr nz, .asm_2254 diff --git a/main.asm b/main.asm index 9f32cfe..516a763 100644 --- a/main.asm +++ b/main.asm @@ -915,7 +915,7 @@ ConcludeEvolutionMode_RedField: ; 0x10fe3 bit 0, a jp z, Func_10aff callba Func_14135 - callba Func_16425 + callba LoadSlotCaveCoverGraphics_RedField callba LoadMapBillboardTileData ld a, BANK(StageSharedBonusSlotGlowGfx) ld hl, StageSharedBonusSlotGlowGfx + $60 @@ -1052,7 +1052,7 @@ ConcludeEvolutionMode_BlueField: ; 0x11195 bit 0, a jp z, Func_1120e callba Func_1c2cb - callba Func_1e8f6 + callba LoadSlotCaveCoverGraphics_BlueField callba LoadMapBillboardTileData ld a, Bank(StageSharedBonusSlotGlowGfx) ld hl, StageSharedBonusSlotGlowGfx + $60 @@ -1597,7 +1597,7 @@ Func_31234: ; 0x31234 bit 0, a ret z callba Func_14135 - callba Func_16425 + callba LoadSlotCaveCoverGraphics_RedField callba LoadMapBillboardTileData ret @@ -1775,7 +1775,7 @@ Func_313c3: ; 0x313c3 bit 0, a ret z callba Func_1c2cb - callba Func_1e8f6 + callba LoadSlotCaveCoverGraphics_BlueField callba LoadMapBillboardTileData ret @@ -1954,7 +1954,7 @@ Func_3151f: ; 0x3151f ld a, $3 ld [wd54d], a xor a - ld [wd604], a + ld [wSlotIsOpen], a ld [wIndicatorStates], a ld [wIndicatorStates + 1], a ld [wIndicatorStates + 2], a @@ -1964,7 +1964,7 @@ Func_3151f: ; 0x3151f bit 0, a jr z, .asm_31577 callba Func_14135 - callba Func_16425 + callba LoadSlotCaveCoverGraphics_RedField callba LoadMapBillboardTileData .asm_31577 callba StopTimer @@ -1988,7 +1988,7 @@ Func_31591: ; 0x31591 ld a, $80 ld [wIndicatorStates + 4], a ld a, $1 - ld [wd604], a + ld [wSlotIsOpen], a ld [wd54d], a .asm_315b1 scf @@ -2007,7 +2007,7 @@ Func_315b3: ; 0x315b3 ld a, $80 ld [wIndicatorStates + 4], a ld a, $1 - ld [wd604], a + ld [wSlotIsOpen], a ld [wd54d], a .asm_315d3 scf @@ -2108,7 +2108,7 @@ Func_3168c: ; 0x3168c ld a, $3 ld [wd54d], a xor a - ld [wd604], a + ld [wSlotIsOpen], a ld [wIndicatorStates], a ld [wIndicatorStates + 1], a ld [wIndicatorStates + 2], a @@ -2118,7 +2118,7 @@ Func_3168c: ; 0x3168c bit 0, a jr z, .asm_316ee callba Func_1c2cb - callba Func_1e8f6 + callba LoadSlotCaveCoverGraphics_BlueField callba LoadMapBillboardTileData .asm_316ee callba StopTimer @@ -2142,7 +2142,7 @@ Func_31708: ; 0x31708 ld a, $80 ld [wIndicatorStates + 4], a ld a, $1 - ld [wd604], a + ld [wSlotIsOpen], a ld [wd54d], a .asm_31728 scf @@ -2161,7 +2161,7 @@ Func_3172a: ; 0x3172a ld a, $80 ld [wIndicatorStates + 4], a ld a, $1 - ld [wd604], a + ld [wSlotIsOpen], a ld [wd54d], a .asm_3174a scf @@ -2664,7 +2664,7 @@ PinballUltraballMiniGfx: ; 0xa9400 INCBIN "gfx/stage/ball_ultraball_mini.w32.interleave.2bpp" PinballMasterballMiniGfx: ; 0xa9600 INCBIN "gfx/stage/ball_masterball_mini.w32.interleave.2bpp" -PinballBallMiniGfx: ; 0xa9800 +PinballBallSuperMiniGfx: ; 0xa9800 INCBIN "gfx/stage/ball_mini.w32.interleave.2bpp" HighScoresBaseGameBoyGfx: ; 0xa9a00 diff --git a/wram.asm b/wram.asm index bee8388..2954445 100644 --- a/wram.asm +++ b/wram.asm @@ -165,7 +165,8 @@ wd495:: ; 0xd495 wd496:: ; 0xd496 ds $1 -wd497:: ; 0xd497 +wNextStage:: ; 0xd497 +; Holds the id of the next stage to go to. Used for transitioning between bonus stage and the main red/blue field. ds $1 wd498:: ; 0xd498 @@ -802,29 +803,43 @@ wDittoSlotCollision:: ; 0xd5fe ; Second byte is set by HandleGameObjectCollision, but is unused ds $2 -wd600:: ; 0xd600 +wDittoEnterOrExitCounter:: ; 0xd600 +; Number of frames remaining in the process when the pinball is entering or exiting the Ditto cave. +; This functions the same way as wSlotEnterOrExitCounter. ds $1 wSlotCollision:: ; 0xd601 ; Second byte is set by HandleGameObjectCollision, but is unused ds $2 -wd603:: ; 0xd603 +wSlotEnterOrExitCounter:: ; 0xd603 +; Number of frames remaining in the process when the pinball is entering or exiting the slot cave. +; This functions the same way as wDittoEnterOrExitCounter. ds $1 -wd604:: ; 0xd604 - ds $2 +wSlotIsOpen:: ; 0xd604 +; Whether or not the Slot is open for the pinball to enter. 1 = open; 0 = closed + ds $1 + + ds $1 ; unused -wd606:: ; 0xd606 +wSlotGlowingAnimationCounter:: ; 0xd606 +; When the slot is open, this counter increments once every frame, which controls the glowing +; animation around the slot cave. ds $1 -wd607:: ; 0xd607 +wFramesUntilSlotCaveOpens:: ; 0xd607 +; When set to non-zero value, it decrements once per frame. When it hits 0, the Slot cave will open. ds $1 -wd608:: ; 0xd608 +wOpenedSlotByGetting4CAVELights:: ; 0xd608 +; Set to 1 when the slot bonus was trigered by lighting up all 4 CAVE lights. +; See wCAVELightStates ds $1 -wd609:: ; 0xd609 +wOpenedSlotByGetting3Pokeballs:: ; 0xd609 +; Set to 1 when the slot bonus was triggered by achieving 3 Pokeballs (the pokeballs underneath the billboard). +; See wNumPokeballs. ds $1 wWhichBonusMultiplierRailing:: ; 0xd60a @@ -1827,10 +1842,13 @@ wd801:: ; 0xd801 wOAMBufferSize:: ; 0xd802 ds $1 -wd803:: ; 0xd803 +wRumblePattern:: ; 0xd803 +; Holds the rumble pattern for the upcoming frames. +; This gets rotated to the right once per frame. If bit 0 is set, then it turns on rumble. ds $1 -wd804:: ; 0xd804 +wRumbleDuration:: ; 0xd804 +; Number of frames to rumble the Gameboy. See wRumblePattern. ds $1 wd805:: ; 0xd805 enables unused and odd PlaceString -- cgit v1.2.3