From c564d08eb29cc88a86888b6942b50953cec15116 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 14 May 2017 11:23:22 -0700 Subject: More tile data INCBINs --- main.asm | 3907 ++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 2816 insertions(+), 1091 deletions(-) diff --git a/main.asm b/main.asm index f8405e5..bbd70fa 100755 --- a/main.asm +++ b/main.asm @@ -14437,7 +14437,7 @@ Func_14ea7: ; 0x14ea7 ld a, [wd517] ld c, a ld b, $0 - ld hl, Data_14ebe + ld hl, SoundEffects_14ebe add hl, bc ld a, [hl] ld e, a @@ -14445,1248 +14445,2973 @@ Func_14ea7: ; 0x14ea7 call PlaySoundEffect ret -Data_14ebe: - dr $14ebe, $14ece +SoundEffects_14ebe: + db $12, $13, $14, $15, $16, $17, $18, $19, $1A, $1B, $1C, $1D, $1E, $1F, $20, $11 Func_14ece: ; 0x14ece ld a, [wd517] ld c, a sla c ld b, $0 - ld hl, Data_14eeb + ld hl, TileDataPointers_14eeb ld a, [hGameBoyColorFlag] and a jr z, .asm_14ee1 - ld hl, Data_1509b + ld hl, TileDataPointers_1509b .asm_14ee1 add hl, bc ld a, [hli] ld h, [hl] ld l, a - ld a, BANK(Data_14eeb) + ld a, BANK(TileDataPointers_14eeb) call Func_10aa ret -Data_14eeb: - dr $14eeb, $1509b +TileDataPointers_14eeb: + dw TileData_14f0b + dw TileData_14f10 + dw TileData_14f15 + dw TileData_14f1a + dw TileData_14f1f + dw TileData_14f24 + dw TileData_14f29 + dw TileData_14f2e + dw TileData_14f33 + dw TileData_14f38 + dw TileData_14f3d + dw TileData_14f42 + dw TileData_14f47 + dw TileData_14f4c + dw TileData_14f51 + dw TileData_14f56 + +TileData_14f0b: ; 0x14f0b + db $02 + dw TileData_14f5b + dw TileData_14f65 -Data_1509b: - dr $1509b, $151cb +TileData_14f10: ; 0x14f10 + db $02 + dw TileData_14f6f + dw TileData_14f79 -Func_151cb: ; 0x151cb - ld a, [wWhichCAVELight] - and a - jr z, .asm_15229 - xor a - ld [wWhichCAVELight], a - ld a, [wd513] - and a - jr nz, .asm_15229 - ld a, [wWhichCAVELightId] - sub $a - ld c, a - ld b, $0 - ld hl, wd50f - add hl, bc - ld a, [hl] - ld [hl], $1 - and a - ret nz - ld bc, OneHundredPoints - callba AddBigBCD6FromQueueWithBallMultiplier - ld hl, wd50f - ld a, [hli] - and [hl] - inc hl - and [hl] - inc hl - and [hl] - jr z, Func_asm_1522d - ld a, $1 - ld [wd513], a - ld a, $80 - ld [wd514], a - ld bc, FourHundredPoints - callba AddBigBCD6FromQueueWithBallMultiplier - lb de, $00, $09 - call PlaySoundEffect - ld hl, wd62c - call Func_e4a - jr Func_asm_1522d +TileData_14f15: ; 0x14f15 + db $02 + dw TileData_14f83 + dw TileData_14f8d -.asm_15229 - call Func_15270 - ret z - ; fall through +TileData_14f1a: ; 0x14f1a + db $02 + dw TileData_14f97 + dw TileData_14fa1 -Func_asm_1522d: ; 0x1522d - ld hl, wd512 - ld b, $4 -.asm_15232 - ld a, [hld] - push hl - call Func_1523c - pop hl - dec b - jr nz, .asm_15232 - ret +TileData_14f1f: ; 0x14f1f + db $02 + dw TileData_14fab + dw TileData_14fb5 -Func_1523c: ; 0x1523c - and a - jr z, .asm_1524e - ld a, [hGameBoyColorFlag] - and a - jr nz, .asm_15249 - ld hl, Data_152dd - jr .asm_1525b +TileData_14f24: ; 0x14f24 + db $02 + dw TileData_14fbf + dw TileData_14fc9 -.asm_15249 - ld hl, Data_1531d - jr .asm_1525b +TileData_14f29: ; 0x14f29 + db $02 + dw TileData_14fd3 + dw TileData_14fdd -.asm_1524e - ld a, [hGameBoyColorFlag] - and a - jr nz, .asm_15258 - ld hl, Data_152e5 - jr .asm_1525b +TileData_14f2e: ; 0x14f2e + db $02 + dw TileData_14fe7 + dw TileData_14ff1 -.asm_15258 - ld hl, Data_15325 -.asm_1525b - push bc - dec b - sla b - ld e, b - ld d, $0 - add hl, de - ld c, [hl] - inc hl - ld b, [hl] - ld a, $5 - ld de, LoadTileLists - call Func_10c5 - pop bc - ret +TileData_14f33: ; 0x14f33 + db $02 + dw TileData_14ffb + dw TileData_15005 -Func_15270: ; 0x15270 - ld a, [wd513] - and a - jr z, .asm_152a6 - ld a, [wd514] - dec a - ld [wd514], a - jr nz, .asm_1528d - ld [wd513], a - ld a, $1 - ld [wd608], a - ld a, $3 - ld [wd607], a - xor a -.asm_1528d - and $7 - ret nz - ld a, [wd514] - srl a - srl a - srl a - and $1 - ld hl, wd50f - ld [hli], a - ld [hli], a - ld [hli], a - ld [hl], a - ld a, $1 - and a - ret +TileData_14f38: ; 0x14f38 + db $02 + dw TileData_1500f + dw TileData_15019 -.asm_152a6 - ld hl, wKeyConfigLeftFlipper - call IsKeyPressed - jr z, .asm_152c2 - ld hl, wd50f - ld a, [hli] - ld c, a - ld a, [hli] - ld b, a - ld a, [hli] - ld e, a - ld a, [hl] - ld d, a - ld a, c - ld [hld], a - ld a, d - ld [hld], a - ld a, e - ld [hld], a - ld a, b - ld [hl], a - ret +TileData_14f3d: ; 0x14f3d + db $02 + dw TileData_15023 + dw TileData_1502d -.asm_152c2 - ld hl, wKeyConfigRightFlipper - call IsKeyPressed - ret z - ld hl, wd50f - ld a, [hli] - ld c, a - ld a, [hli] - ld b, a - ld a, [hli] - ld e, a - ld a, [hl] - ld d, a - ld a, e - ld [hld], a - ld a, b - ld [hld], a - ld a, c - ld [hld], a - ld a, d - ld [hl], a - ret +TileData_14f42: ; 0x14f42 + db $02 + dw TileData_15037 + dw TileData_15041 -Data_152dd: - dr $152dd, $152e5 +TileData_14f47: ; 0x14f47 + db $02 + dw TileData_1504b + dw TileData_15055 -Data_152e5: - dr $152e5, $1531d +TileData_14f4c: ; 0x14f4c + db $02 + dw TileData_1505f + dw TileData_15069 -Data_1531d: - dr $1531d, $15325 +TileData_14f51: ; 0x14f51 + db $02 + dw TileData_15073 + dw TileData_1507d -Data_15325: - dr $15325, $1535d +TileData_14f56: ; 0x14f56 + db $02 + dw TileData_15087 + dw TileData_15091 -ResolveRedStagePinballUpgradeTriggersCollision: ; 0x1535d - ld a, [wWhichPinballUpgradeTrigger] - and a - jp z, .asm_1544c - xor a - ld [wWhichPinballUpgradeTrigger], a - ld a, [wStageCollisionState] - bit 0, a - jp z, .asm_1544c - ld a, [wd5fc] - and a - jp nz, .asm_1544c - xor a - ld [wRightAlleyTrigger], a - ld [wLeftAlleyTrigger], a - ld [wSecondaryLeftAlleyTrigger], a - call Func_159c9 - ld a, $b - callba Func_10000 - ld a, [wWhichPinballUpgradeTriggerId] - sub $e - ld c, a - ld b, $0 - ld hl, wd5f9 - add hl, bc - ld a, [hl] - ld [hl], $1 - and a - ret nz - ld bc, OneHundredPoints - callba AddBigBCD6FromQueueWithBallMultiplier - ld hl, wd5f9 - ld a, [hli] - and [hl] - inc hl - and [hl] - jr nz, .asm_153c0 - lb de, $00, $09 - call PlaySoundEffect - jp Func_15450 +TileData_14f5b: ; 0x14f5b + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldTopBaseGameBoyGfx + $cb0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 ; terminator -.asm_153c0 - ld a, $1 - ld [wd5fc], a - ld a, $80 - ld [wd5fd], a - ; load approximately 1 minute of frames into wBallTypeCounter - ld a, $10 - ld [wBallTypeCounter], a - ld a, $e - ld [wBallTypeCounter + 1], a - ld bc, FourHundredPoints - callba AddBigBCD6FromQueueWithBallMultiplier - ld a, [wBallType] - cp MASTER_BALL - jr z, .masterBall - lb de, $06, $3a - call PlaySoundEffect - call FillBottomMessageBufferWithBlackTile - call Func_30db - ld de, FieldMultiplierText - ld hl, wd5cc - call LoadTextHeader - ld a, [wBallType] - ld c, a - ld b, $0 - ld hl, BallTypeProgressionRedField - add hl, bc - ld a, [hl] - ld [wBallType], a - add $30 - ld [wBottomMessageText + $12], a - jr .asm_15447 +TileData_14f65: ; 0x14f65 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldTopBaseGameBoyGfx + $cd0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 ; terminator -.masterBall - lb de, $0f, $4d - call PlaySoundEffect - ld bc, OneMillionPoints - callba AddBigBCD6FromQueue - ld bc, $0100 - ld de, $0000 - push bc - push de - call FillBottomMessageBufferWithBlackTile - call Func_30db - ld hl, wd5d4 - ld de, DigitsText1to8 - call Func_32cc - pop de - pop bc - ld hl, wd5cc - ld de, FieldMultiplierSpecialBonusText - call LoadTextHeader -.asm_15447 - call TransitionPinballUpgrade - jr Func_15450 +TileData_14f6f: ; 0x14f6f + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $AE0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -.asm_1544c - call Func_154a9 - ret z +TileData_14f79: ; 0x14f79 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $B00 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -Func_15450 - ld a, [wStageCollisionState] - bit 0, a - ret z - ld hl, wd5fb - ld b, $3 -.asm_1545b - ld a, [hld] - push hl - call Func_15465 - pop hl - dec b - jr nz, .asm_1545b - ret +TileData_14f83: ; 0x14f83 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $B20 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -Func_15465: ; 0x15465 - and a - jr z, .asm_15477 - ld a, [hGameBoyColorFlag] - and a - jr nz, .asm_15472 - ld hl, Data_15511 - jr .asm_15484 +TileData_14f8d: ; 0x14f8d + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $B40 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -.asm_15472 - ld hl, Data_15543 - jr .asm_15484 +TileData_14f97: ; 0x14f97 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $B60 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -.asm_15477 - ld a, [hGameBoyColorFlag] - and a - jr nz, .asm_15481 - ld hl, Data_15517 - jr .asm_15484 +TileData_14fa1: ; 0x14fa1 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $B80 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -.asm_15481 - ld hl, Data_15549 -.asm_15484 - push bc - dec b - sla b - ld e, b - ld d, $0 - add hl, de - ld c, [hl] - inc hl - ld b, [hl] - ld a, $5 - ld de, LoadTileLists - call Func_10c5 - pop bc - ret +TileData_14fab: ; 0x14fab + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $BA0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -Func_15499: ; 0x15499 - ld a, [hGameBoyColorFlag] - and a - ret nz - ld b, $3 -.asm_1549f - push hl - xor a - call Func_15465 - pop hl - dec b - jr nz, .asm_1549f - ret +TileData_14fb5: ; 0x14fb5 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $BC0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -Func_154a9: ; 0x154a9 - ld a, [wd5fc] - and a - jr z, .asm_154d6 - ld a, [wd5fd] - dec a - ld [wd5fd], a - jr nz, .asm_154bb - ld [wd5fc], a -.asm_154bb - and $7 - jr nz, .asm_154d4 - ld a, [wd5fd] - srl a - srl a - srl a - and $1 - ld hl, wd5f9 - ld [hli], a - ld [hli], a - ld [hl], a - ld a, $1 - and a - ret +TileData_14fbf: ; 0x14fbf + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $BE0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -.asm_154d4 - xor a - ret +TileData_14fc9: ; 0x14fc9 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $C00 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -.asm_154d6 - ld hl, wKeyConfigLeftFlipper - call IsKeyPressed - jr z, .asm_154ee - ld hl, wd5f9 - ld a, [hli] - ld c, a - ld a, [hli] - ld b, a - ld a, [hl] - ld e, a - ld a, c - ld [hld], a - ld a, e - ld [hld], a - ld a, b - ld [hl], a - ret +TileData_14fd3: ; 0x14fd3 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $C20 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -.asm_154ee - ld hl, wKeyConfigRightFlipper - call IsKeyPressed - ret z - ld hl, wd5f9 - ld a, [hli] - ld c, a - ld a, [hli] - ld b, a - ld a, [hl] - ld e, a - ld a, b - ld [hld], a - ld a, c - ld [hld], a - ld a, e - ld [hl], a - ret +TileData_14fdd: ; 0x14fdd + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $C40 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -BallTypeProgressionRedField: ; 0x15505 -; Determines the next upgrade for the Ball. - db GREAT_BALL ; POKE_BALL -> GREAT_BALL - db GREAT_BALL ; unused - db ULTRA_BALL ; GREAT_BALL -> ULTRA_BALL - db MASTER_BALL ; ULTRA_BALL -> MASTER_BALL - db MASTER_BALL ; unused - db MASTER_BALL ; MASTER_BALL -> MASTER_BALL +TileData_14fe7: ; 0x14fe7 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $C60 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -BallTypeDegradationRedField: ; 0x1550b -; Determines the previous upgrade for the Ball. - db POKE_BALL ; POKE_BALL -> POKE_BALL - db POKE_BALL ; unused - db POKE_BALL ; GREAT_BALL -> POKE_BALL - db GREAT_BALL ; ULTRA_BALL -> GREAT_BALL - db ULTRA_BALL ; unused - db ULTRA_BALL ; MASTER_BALL -> GREAT_BALL +TileData_14ff1: ; 0x14ff1 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $C80 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -Data_15511: - dr $15511, $15517 +TileData_14ffb: ; 0x14ffb + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $CA0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -Data_15517: - dr $15517, $15543 +TileData_15005: ; 0x15005 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $CC0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -Data_15543: - dr $15543, $15549 +TileData_1500f: ; 0x1500f + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $CE0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -Data_15549: - dr $15549, $15575 +TileData_15019: ; 0x15019 + dw Func_11d2 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $D00 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -HandleRedStageBallTypeUpgradeCounter: ; 0x15575 - ld a, [wCapturingMon] - and a - ret nz - ld hl, wBallTypeCounter - ld a, [hli] - ld c, a - ld b, [hl] - or b - ret z - dec bc - ld a, b - ld [hld], a - ld [hl], c - or c - ret nz - ; counter is now 0! Degrade the ball upgrade. - ld a, [wBallType] - ld c, a - ld b, $0 - ld hl, BallTypeDegradationRedField - add hl, bc - ld a, [hl] - ld [wBallType], a - and a - jr z, .pokeball - ; load approximately 1 minute of frames into wBallTypeCounter - ld a, $10 - ld [wBallTypeCounter], a - ld a, $e - ld [wBallTypeCounter + 1], a -.pokeball - call TransitionPinballUpgrade - ret - -TransitionPinballUpgrade: ; 0x155a7 - ld a, [wBallType] - ld c, a - sla c - ld b, $0 - ld hl, PinballUpgradeTransitionPointers - add hl, bc - ld a, [hli] - ld h, [hl] - ld l, a - ld a, Bank(PinballUpgradeTransitionPointers) - call Func_10aa - ; fall through - -Func_155bb: ; 0x155bb - ld a, [hGameBoyColorFlag] - and a - ret z - ; gameboy color - ld a, [wBallType] - sla a - ld c, a - ld b, $0 - ld hl, Data_157f7 - add hl, bc - ld c, [hl] - inc hl - ld b, [hl] - ld a, BANK(Data_157f7) - ld de, Func_1266 - call Func_10c5 - ret - -PinballUpgradeTransitionPointers: - dw TransitionToPokeBallPointers ; POKE_BALL - dw TransitionToPokeBallPointers ; POKE_BALL - dw TransitionToGreatBallPointers ; GREAT_BALL - dw TransitionToUltraBallPointers ; ULTRA_BALL - dw TransitionToUltraBallPointers ; ULTRA_BALL - dw TransitionToMasterBallPointers ; MASTER_BALL - -TransitionToPokeBallPointers: - db 11 - dw TransitionToPokeBall_TileData_1 - dw TransitionToPokeBall_TileData_2 - dw TransitionToPokeBall_TileData_3 - dw TransitionToPokeBall_TileData_4 - dw TransitionToPokeBall_TileData_5 - dw TransitionToPokeBall_TileData_6 - dw TransitionToPokeBall_TileData_7 - dw TransitionToPokeBall_TileData_8 - dw TransitionToPokeBall_TileData_9 - dw TransitionToPokeBall_TileData_10 - dw TransitionToPokeBall_TileData_11 - -TransitionToGreatBallPointers: - db 11 - dw TransitionToGreatBall_TileData_1 - dw TransitionToGreatBall_TileData_2 - dw TransitionToGreatBall_TileData_3 - dw TransitionToGreatBall_TileData_4 - dw TransitionToGreatBall_TileData_5 - dw TransitionToGreatBall_TileData_6 - dw TransitionToGreatBall_TileData_7 - dw TransitionToGreatBall_TileData_8 - dw TransitionToGreatBall_TileData_9 - dw TransitionToGreatBall_TileData_10 - dw TransitionToGreatBall_TileData_11 - -TransitionToUltraBallPointers: - db 11 - dw TransitionToUltraBall_TileData_1 - dw TransitionToUltraBall_TileData_2 - dw TransitionToUltraBall_TileData_3 - dw TransitionToUltraBall_TileData_4 - dw TransitionToUltraBall_TileData_5 - dw TransitionToUltraBall_TileData_6 - dw TransitionToUltraBall_TileData_7 - dw TransitionToUltraBall_TileData_8 - dw TransitionToUltraBall_TileData_9 - dw TransitionToUltraBall_TileData_10 - dw TransitionToUltraBall_TileData_11 - -TransitionToMasterBallPointers: - db 11 - dw TransitionToMasterBall_TileData_1 - dw TransitionToMasterBall_TileData_2 - dw TransitionToMasterBall_TileData_3 - dw TransitionToMasterBall_TileData_4 - dw TransitionToMasterBall_TileData_5 - dw TransitionToMasterBall_TileData_6 - dw TransitionToMasterBall_TileData_7 - dw TransitionToMasterBall_TileData_8 - dw TransitionToMasterBall_TileData_9 - dw TransitionToMasterBall_TileData_10 - dw TransitionToMasterBall_TileData_11 - -TransitionToPokeBall_TileData_1: +TileData_15023: ; 0x15023 dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $40) - dw PinballPokeballGfx + $0 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $D20 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_2: +TileData_1502d: ; 0x1502d dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $43) - dw PinballPokeballGfx + $30 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $D40 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_3: +TileData_15037: ; 0x15037 dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $46) - dw PinballPokeballGfx + $60 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $D60 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_4: +TileData_15041: ; 0x15041 dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $49) - dw PinballPokeballGfx + $90 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $D80 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_5: +TileData_1504b: ; 0x1504b dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $4c) - dw PinballPokeballGfx + $c0 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $DA0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_6: +TileData_15055: ; 0x15055 dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $4f) - dw PinballPokeballGfx + $f0 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $DC0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_7: +TileData_1505f: ; 0x1505f dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $52) - dw PinballPokeballGfx + $120 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $DE0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_8: +TileData_15069: ; 0x15069 dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $55) - dw PinballPokeballGfx + $150 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $E00 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_9: +TileData_15073: ; 0x15073 dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $58) - dw PinballPokeballGfx + $180 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $E20 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_10: +TileData_1507d: ; 0x1507d dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $5b) - dw PinballPokeballGfx + $1b0 - db Bank(PinballPokeballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $E40 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToPokeBall_TileData_11: +TileData_15087: ; 0x15087 dw Func_11d2 db $20, $02 - dw (vTilesOB tile $5e) - dw PinballPokeballGfx + $1e0 - db Bank(PinballPokeballGfx) - db $00 + dw vTilesBG tile $75 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $E60 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToGreatBall_TileData_1: +TileData_15091: ; 0x15091 dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $40) - dw PinballGreatballGfx + $0 - db Bank(PinballGreatballGfx) - db $00 + db $20, $02 + dw vTilesBG tile $77 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $E80 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 ; terminator -TransitionToGreatBall_TileData_2: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $43) - dw PinballGreatballGfx + $30 - db Bank(PinballGreatballGfx) - db $00 +TileDataPointers_1509b: + dw TileData_150bb + dw TileData_150be + dw TileData_150c1 + dw TileData_150c4 + dw TileData_150c7 + dw TileData_150ca + dw TileData_150cd + dw TileData_150d0 + dw TileData_150d3 + dw TileData_150d6 + dw TileData_150d9 + dw TileData_150dc + dw TileData_150df + dw TileData_150e2 + dw TileData_150e5 + dw TileData_150e8 + +TileData_150bb: ; 0x150bb + db $01 + dw TileData_150eb -TransitionToGreatBall_TileData_3: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $46) - dw PinballGreatballGfx + $60 - db Bank(PinballGreatballGfx) - db $00 +TileData_150be: ; 0x150be + db $01 + dw TileData_150f9 -TransitionToGreatBall_TileData_4: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $49) - dw PinballGreatballGfx + $90 - db Bank(PinballGreatballGfx) - db $00 +TileData_150c1: ; 0x150c1 + db $01 + dw TileData_15107 -TransitionToGreatBall_TileData_5: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $4c) - dw PinballGreatballGfx + $c0 - db Bank(PinballGreatballGfx) - db $00 +TileData_150c4: ; 0x150c4 + db $01 + dw TileData_15115 -TransitionToGreatBall_TileData_6: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $4f) - dw PinballGreatballGfx + $f0 - db Bank(PinballGreatballGfx) - db $00 +TileData_150c7: ; 0x150c7 + db $01 + dw TileData_15123 -TransitionToGreatBall_TileData_7: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $52) - dw PinballGreatballGfx + $120 - db Bank(PinballGreatballGfx) - db $00 +TileData_150ca: ; 0x150ca + db $01 + dw TileData_15131 -TransitionToGreatBall_TileData_8: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $55) - dw PinballGreatballGfx + $150 - db Bank(PinballGreatballGfx) - db $00 +TileData_150cd: ; 0x150cd + db $01 + dw TileData_1513f -TransitionToGreatBall_TileData_9: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $58) - dw PinballGreatballGfx + $180 - db Bank(PinballGreatballGfx) - db $00 +TileData_150d0: ; 0x150d0 + db $01 + dw TileData_1514d -TransitionToGreatBall_TileData_10: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $5b) - dw PinballGreatballGfx + $1b0 - db Bank(PinballGreatballGfx) - db $00 +TileData_150d3: ; 0x150d3 + db $01 + dw TileData_1515b -TransitionToGreatBall_TileData_11: - dw Func_11d2 - db $20, $02 - dw (vTilesOB tile $5e) - dw PinballGreatballGfx + $1e0 - db Bank(PinballGreatballGfx) - db $00 +TileData_150d6: ; 0x150d6 + db $01 + dw TileData_15169 -TransitionToUltraBall_TileData_1: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $40) - dw PinballUltraballGfx + $0 - db Bank(PinballUltraballGfx) - db $00 +TileData_150d9: ; 0x150d9 + db $01 + dw TileData_15177 -TransitionToUltraBall_TileData_2: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $43) - dw PinballUltraballGfx + $30 - db Bank(PinballUltraballGfx) - db $00 +TileData_150dc: ; 0x150dc + db $01 + dw TileData_15185 -TransitionToUltraBall_TileData_3: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $46) - dw PinballUltraballGfx + $60 - db Bank(PinballUltraballGfx) - db $00 +TileData_150df: ; 0x150df + db $01 + dw TileData_15193 -TransitionToUltraBall_TileData_4: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $49) - dw PinballUltraballGfx + $90 - db Bank(PinballUltraballGfx) - db $00 +TileData_150e2: ; 0x150e2 + db $01 + dw TileData_151a1 -TransitionToUltraBall_TileData_5: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $4c) - dw PinballUltraballGfx + $c0 - db Bank(PinballUltraballGfx) - db $00 +TileData_150e5: ; 0x150e5 + db $01 + dw TileData_151af -TransitionToUltraBall_TileData_6: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $4f) - dw PinballUltraballGfx + $f0 - db Bank(PinballUltraballGfx) - db $00 +TileData_150e8: ; 0x150e8 + db $01 + dw TileData_151bd -TransitionToUltraBall_TileData_7: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $52) - dw PinballUltraballGfx + $120 - db Bank(PinballUltraballGfx) - db $00 +TileData_150eb: ; 0x150eb + dw LoadTileLists + db $04 ; total number of tiles -TransitionToUltraBall_TileData_8: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $55) - dw PinballUltraballGfx + $150 - db Bank(PinballUltraballGfx) - db $00 + db $02 ; number of tiles + dw $990E + db $5C, $5D -TransitionToUltraBall_TileData_9: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $58) - dw PinballUltraballGfx + $180 - db Bank(PinballUltraballGfx) - db $00 + db $02 ; number of tiles + dw $992E + db $5E, $5F -TransitionToUltraBall_TileData_10: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $5b) - dw PinballUltraballGfx + $1b0 - db Bank(PinballUltraballGfx) - db $00 + db $00 ; terminator -TransitionToUltraBall_TileData_11: - dw Func_11d2 - db $20, $02 - dw (vTilesOB tile $5e) - dw PinballUltraballGfx + $1e0 - db Bank(PinballUltraballGfx) - db $00 +TileData_150f9: ; 0x150f9 + dw LoadTileLists + db $04 ; total number of tiles -TransitionToMasterBall_TileData_1: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $40) - dw PinballMasterballGfx + $0 - db Bank(PinballMasterballGfx) - db $00 + db $02 ; number of tiles + dw $990E + db $5C, $5D -TransitionToMasterBall_TileData_2: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $43) - dw PinballMasterballGfx + $30 - db Bank(PinballMasterballGfx) - db $00 + db $02 ; number of tiles + dw $992E + db $60, $61 -TransitionToMasterBall_TileData_3: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $46) - dw PinballMasterballGfx + $60 - db Bank(PinballMasterballGfx) - db $00 + db $00 ; terminator -TransitionToMasterBall_TileData_4: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $49) - dw PinballMasterballGfx + $90 - db Bank(PinballMasterballGfx) - db $00 +TileData_15107: ; 0x15107 + dw LoadTileLists + db $04 ; total number of tiles -TransitionToMasterBall_TileData_5: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $4c) - dw PinballMasterballGfx + $c0 - db Bank(PinballMasterballGfx) - db $00 + db $02 ; number of tiles + dw $990E + db $5C, $5D -TransitionToMasterBall_TileData_6: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $4f) - dw PinballMasterballGfx + $f0 - db Bank(PinballMasterballGfx) - db $00 + db $02 ; number of tiles + dw $992E + db $62, $63 -TransitionToMasterBall_TileData_7: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $52) - dw PinballMasterballGfx + $120 - db Bank(PinballMasterballGfx) - db $00 + db $00 ; terminator -TransitionToMasterBall_TileData_8: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $55) - dw PinballMasterballGfx + $150 - db Bank(PinballMasterballGfx) - db $00 +TileData_15115: ; 0x15115 + dw LoadTileLists + db $04 ; total number of tiles -TransitionToMasterBall_TileData_9: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $58) - dw PinballMasterballGfx + $180 - db Bank(PinballMasterballGfx) - db $00 + db $02 ; number of tiles + dw $990E + db $5C, $5D -TransitionToMasterBall_TileData_10: - dw Func_11d2 - db $30, $03 - dw (vTilesOB tile $5b) - dw PinballMasterballGfx + $1b0 - db Bank(PinballMasterballGfx) - db $00 + db $02 ; number of tiles + dw $992E + db $64, $65 -TransitionToMasterBall_TileData_11: - dw Func_11d2 - db $20, $02 - dw (vTilesOB tile $5e) - dw PinballMasterballGfx + $1e0 - db Bank(PinballMasterballGfx) - db $00 + db $00 ; terminator -Data_157f7: - dw Data_15803 - dw Data_15803 - dw Data_1580a - dw Data_15811 - dw Data_15811 - dw Data_15818 +TileData_15123: ; 0x15123 + dw LoadTileLists + db $04 ; total number of tiles -Data_15803: - db $08, $04, $40, $68, $51, $37, $00 -Data_1580a: - db $08, $04, $40, $70, $51, $37, $00 -Data_15811: - db $08, $04, $40, $78, $51, $37, $00 -Data_15818: - db $08, $04, $40, $80, $51, $37, $00 + db $02 ; number of tiles + dw $990E + db $5C, $5D -ResolveRedStageBoardTriggerCollision: ; 0x1581f - ld a, [wWhichBoardTrigger] - and a - ret z - xor a - ld [wWhichBoardTrigger], a - ld bc, FivePoints - callba AddBigBCD6FromQueueWithBallMultiplier - ld a, [wWhichBoardTriggerId] - sub $11 - ld c, a - ld b, $0 - ld hl, wd521 - add hl, bc - ld [hl], $1 - ld a, [wd521] - and a - call nz, Func_1587c - ld a, [wd522] - and a - call nz, Func_158c0 - ld a, [wd523] + db $02 ; number of tiles + dw $992E + db $66, $67 + + db $00 ; terminator + +TileData_15131: ; 0x15131 + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $5C, $5D + + db $02 ; number of tiles + dw $992E + db $68, $69 + + db $00 ; terminator + +TileData_1513f: ; 0x1513f + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $5C, $5D + + db $02 ; number of tiles + dw $992E + db $6A, $6B + + db $00 ; terminator + +TileData_1514d: ; 0x1514d + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $5C, $5D + + db $02 ; number of tiles + dw $992E + db $6C, $6D + + db $00 ; terminator + +TileData_1515b: ; 0x1515b + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $5C, $5D + + db $02 ; number of tiles + dw $992E + db $6E, $6F + + db $00 ; terminator + +TileData_15169: ; 0x15169 + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $70, $71 + + db $02 ; number of tiles + dw $992E + db $6E, $6F + + db $00 ; terminator + +TileData_15177: ; 0x15177 + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $72, $73 + + db $02 ; number of tiles + dw $992E + db $6E, $6F + + db $00 ; terminator + +TileData_15185: ; 0x15185 + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $74, $75 + + db $02 ; number of tiles + dw $992E + db $6E, $6F + + db $00 ; terminator + +TileData_15193: ; 0x15193 + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $76, $77 + + db $02 ; number of tiles + dw $992E + db $6E, $6F + + db $00 ; terminator + +TileData_151a1: ; 0x151a1 + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $78, $79 + + db $02 ; number of tiles + dw $992E + db $6E, $6F + + db $00 ; terminator + +TileData_151af: ; 0x151af + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $7A, $7B + + db $02 ; number of tiles + dw $992E + db $6E, $6F + + db $00 ; terminator + +TileData_151bd: ; 0x151bd + dw LoadTileLists + db $04 ; total number of tiles + + db $02 ; number of tiles + dw $990E + db $7C, $7D + + db $02 ; number of tiles + dw $992E + db $7E, $7F + + db $00 ; terminator + +Func_151cb: ; 0x151cb + ld a, [wWhichCAVELight] and a - call nz, Func_15904 - ld a, [wd524] + jr z, .asm_15229 + xor a + ld [wWhichCAVELight], a + ld a, [wd513] and a - call nz, HandleLeftAlleyTriggerRedField - ld a, [wd525] + jr nz, .asm_15229 + ld a, [wWhichCAVELightId] + sub $a + ld c, a + ld b, $0 + ld hl, wd50f + add hl, bc + ld a, [hl] + ld [hl], $1 and a - call nz, Func_15931 - ld a, [wd526] + ret nz + ld bc, OneHundredPoints + callba AddBigBCD6FromQueueWithBallMultiplier + ld hl, wd50f + ld a, [hli] + and [hl] + inc hl + and [hl] + inc hl + and [hl] + jr z, Func_asm_1522d + ld a, $1 + ld [wd513], a + ld a, $80 + ld [wd514], a + ld bc, FourHundredPoints + callba AddBigBCD6FromQueueWithBallMultiplier + lb de, $00, $09 + call PlaySoundEffect + ld hl, wd62c + call Func_e4a + jr Func_asm_1522d + +.asm_15229 + call Func_15270 + ret z + ; fall through + +Func_asm_1522d: ; 0x1522d + ld hl, wd512 + ld b, $4 +.asm_15232 + ld a, [hld] + push hl + call Func_1523c + pop hl + dec b + jr nz, .asm_15232 + ret + +Func_1523c: ; 0x1523c and a - call nz, Func_15944 - ld a, [wd527] + jr z, .asm_1524e + ld a, [hGameBoyColorFlag] and a - call nz, HandleRightAlleyTriggerRedField - ld a, [wd528] + jr nz, .asm_15249 + ld hl, TileDataPointers_152dd + jr .asm_1525b + +.asm_15249 + ld hl, TileDataPointers_1531d + jr .asm_1525b + +.asm_1524e + ld a, [hGameBoyColorFlag] and a - call nz, Func_15990 + jr nz, .asm_15258 + ld hl, TileDataPointers_152e5 + jr .asm_1525b + +.asm_15258 + ld hl, TileDataPointers_15325 +.asm_1525b + push bc + dec b + sla b + ld e, b + ld d, $0 + add hl, de + ld c, [hl] + inc hl + ld b, [hl] + ld a, $5 + ld de, LoadTileLists + call Func_10c5 + pop bc ret -Func_1587c: ; 0x1587c - xor a - ld [wd521], a - ld a, [wLeftAlleyTrigger] +Func_15270: ; 0x15270 + ld a, [wd513] and a - ret z - xor a - ld [wLeftAlleyTrigger], a + jr z, .asm_152a6 + ld a, [wd514] + dec a + ld [wd514], a + jr nz, .asm_1528d + ld [wd513], a ld a, $1 - callba Func_10000 - ret c - ld a, [wLeftAlleyCount] - cp $3 - ret z - inc a - ld [wLeftAlleyCount], a - set 7, a - ld [wIndicatorStates], a - cp $83 + ld [wd608], a + ld a, $3 + ld [wd607], a + xor a +.asm_1528d + and $7 ret nz - ld a, [wStageCollisionState] + ld a, [wd514] + srl a + srl a + srl a and $1 - or $6 - ld [wStageCollisionState], a - callba LoadStageCollisionAttributes - call Func_159f4 + ld hl, wd50f + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld a, $1 + and a ret -Func_158c0: ; 0x158c0 - xor a - ld [wd522], a - ld a, [wLeftAlleyTrigger] - and a - ret z - xor a - ld [wLeftAlleyTrigger], a - ld a, $1 - callba Func_10000 - ret c - ld a, [wLeftAlleyCount] - cp $3 - ret z - inc a - ld [wLeftAlleyCount], a - set 7, a - ld [wIndicatorStates], a - cp $83 - ret nz - ld a, [wStageCollisionState] - and $1 - or $6 - ld [wStageCollisionState], a - callba LoadStageCollisionAttributes - call Func_159f4 +.asm_152a6 + ld hl, wKeyConfigLeftFlipper + call IsKeyPressed + jr z, .asm_152c2 + ld hl, wd50f + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + ld a, c + ld [hld], a + ld a, d + ld [hld], a + ld a, e + ld [hld], a + ld a, b + ld [hl], a ret -Func_15904: ; 0x15904 - xor a - ld [wd523], a - ld a, [wSecondaryLeftAlleyTrigger] - and a +.asm_152c2 + ld hl, wKeyConfigRightFlipper + call IsKeyPressed ret z - xor a - ld [wSecondaryLeftAlleyTrigger], a - ld a, $3 - callba Func_10000 + ld hl, wd50f + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + ld a, e + ld [hld], a + ld a, b + ld [hld], a + ld a, c + ld [hld], a + ld a, d + ld [hl], a ret -HandleLeftAlleyTriggerRedField: ; 0x1591e -; Ball passed over the left alley trigger point in the Red Field. - xor a - ld [wd524], a - ld [wRightAlleyTrigger], a - ld [wSecondaryLeftAlleyTrigger], a - ld a, $1 - ld [wLeftAlleyTrigger], a - call Func_159c9 - ret +TileDataPointers_152dd: + dw TileData_152ed + dw TileData_152f3 + dw TileData_152f9 + dw TileData_152ff -Func_15931: ; 0x15931 - xor a - ld [wd525], a - ld [wRightAlleyTrigger], a - ld [wLeftAlleyTrigger], a - ld a, $1 - ld [wSecondaryLeftAlleyTrigger], a - call Func_159c9 - ret +TileDataPointers_152e5: + dw TileData_15305 + dw TileData_1530b + dw TileData_15311 + dw TileData_15317 -Func_15944: ; 0x15944 +TileData_152ed: ; 0x152ed + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $121 + db $7d + + db $00 ; terminator + +TileData_152f3: ; 0x152f3 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $123 + db $7d + + db $00 ; terminator + +TileData_152f9: ; 0x152f9 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $130 + db $7f + + db $00 ; terminator + +TileData_152ff: ; 0x152ff + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $132 + db $7f + + db $00 ; terminator + +TileData_15305: ; 0x15305 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $121 + db $7c + + db $00 ; terminator + +TileData_1530b: ; 0x1530b + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $123 + db $7c + + db $00 ; terminator + +TileData_15311: ; 0x15311 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $130 + db $7e + + db $00 ; terminator + +TileData_15317: ; 0x15317 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $132 + db $7e + + db $00 ; terminator + +TileDataPointers_1531d: + dw TileData_1532d + dw TileData_15333 + dw TileData_15339 + dw TileData_1533f + +TileDataPointers_15325: + dw TileData_15345 + dw TileData_1534b + dw TileData_15351 + dw TileData_15357 + +TileData_1532d: ; 0x1532d + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $121 + db $27 + + db $00 ; terminator + +TileData_15333: ; 0x15333 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $123 + db $29 + + db $00 ; terminator + +TileData_15339: ; 0x15339 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $130 + db $7E + + db $00 ; terminator + +TileData_1533f: ; 0x1533f + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $132 + db $7F + + db $00 ; terminator + +TileData_15345: ; 0x15345 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $121 + db $26 + + db $00 ; terminator + +TileData_1534b: ; 0x1534b + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $123 + db $28 + + db $00 ; terminator + +TileData_15351: ; 0x15351 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $130 + db $7C + + db $00 ; terminator + +TileData_15357: ; 0x15357 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $132 + db $7D + + db $00 ; terminator + +ResolveRedStagePinballUpgradeTriggersCollision: ; 0x1535d + ld a, [wWhichPinballUpgradeTrigger] + and a + jp z, .asm_1544c xor a - ld [wd526], a - ld a, [wRightAlleyTrigger] + ld [wWhichPinballUpgradeTrigger], a + ld a, [wStageCollisionState] + bit 0, a + jp z, .asm_1544c + ld a, [wd5fc] and a - ret z + jp nz, .asm_1544c xor a ld [wRightAlleyTrigger], a - ld a, $2 - callba Func_10000 - ret c - ld a, [wRightAlleyCount] - cp $3 - ret z - inc a - ld [wRightAlleyCount], a - cp $3 - jr z, .asm_1596e - set 7, a -.asm_1596e - ld [wIndicatorStates + 1], a - ld a, [wRightAlleyCount] - cp $2 - ret c - ld a, $80 - ld [wIndicatorStates + 3], a - ret - -HandleRightAlleyTriggerRedField: ; 0x1597d -; Ball passed over the right alley trigger point in the Red Field. - xor a - ld [wd527], a ld [wLeftAlleyTrigger], a ld [wSecondaryLeftAlleyTrigger], a - ld a, $1 - ld [wRightAlleyTrigger], a call Func_159c9 - ret - -Func_15990: ; 0x15990 - xor a - ld [wd528], a - ld a, [wRightAlleyTrigger] - and a - ret z - xor a - ld [wRightAlleyTrigger], a - ld a, $2 + ld a, $b callba Func_10000 - ret c - ld a, [wRightAlleyCount] - cp $3 - ret z - inc a - ld [wRightAlleyCount], a - cp $3 - jr z, .asm_159ba - set 7, a -.asm_159ba - ld [wIndicatorStates + 1], a - ld a, [wRightAlleyCount] - cp $2 - ret c - ld a, $80 - ld [wIndicatorStates + 3], a - ret - -Func_159c9: ; 0x159c9 - ld a, [wd7ad] - bit 7, a - ret nz + ld a, [wWhichPinballUpgradeTriggerId] + sub $e ld c, a - ld a, [wStageCollisionState] - and $1 - or c - ld [wStageCollisionState], a - ld a, $ff - ld [wd7ad], a - callba LoadStageCollisionAttributes - call Func_159f4 - ld a, $1 - ld [wd580], a - call Func_1404a - ret - -Func_159f4: ; 0x159f4 - ld a, [hLCDC] - bit 7, a - jr z, .asm_15a13 - ld a, [wd7f2] - and $fe - ld c, a - ld a, [wStageCollisionState] - and $fe - cp c - jr z, .asm_15a13 - add c - cp $2 - jr z, .asm_15a13 - lb de, $00, $00 + ld b, $0 + ld hl, wd5f9 + add hl, bc + ld a, [hl] + ld [hl], $1 + and a + ret nz + ld bc, OneHundredPoints + callba AddBigBCD6FromQueueWithBallMultiplier + ld hl, wd5f9 + ld a, [hli] + and [hl] + inc hl + and [hl] + jr nz, .asm_153c0 + lb de, $00, $09 call PlaySoundEffect -.asm_15a13 - ld a, [wd7f2] - swap a - ld c, a - ld a, [wStageCollisionState] - sla a - or c + jp Func_15450 + +.asm_153c0 + ld a, $1 + ld [wd5fc], a + ld a, $80 + ld [wd5fd], a + ; load approximately 1 minute of frames into wBallTypeCounter + ld a, $10 + ld [wBallTypeCounter], a + ld a, $e + ld [wBallTypeCounter + 1], a + ld bc, FourHundredPoints + callba AddBigBCD6FromQueueWithBallMultiplier + ld a, [wBallType] + cp MASTER_BALL + jr z, .masterBall + lb de, $06, $3a + call PlaySoundEffect + call FillBottomMessageBufferWithBlackTile + call Func_30db + ld de, FieldMultiplierText + ld hl, wd5cc + call LoadTextHeader + ld a, [wBallType] ld c, a ld b, $0 - ld hl, Data_15a3f + ld hl, BallTypeProgressionRedField + add hl, bc + ld a, [hl] + ld [wBallType], a + add $30 + ld [wBottomMessageText + $12], a + jr .asm_15447 + +.masterBall + lb de, $0f, $4d + call PlaySoundEffect + ld bc, OneMillionPoints + callba AddBigBCD6FromQueue + ld bc, $0100 + ld de, $0000 + push bc + push de + call FillBottomMessageBufferWithBlackTile + call Func_30db + ld hl, wd5d4 + ld de, DigitsText1to8 + call Func_32cc + pop de + pop bc + ld hl, wd5cc + ld de, FieldMultiplierSpecialBonusText + call LoadTextHeader +.asm_15447 + call TransitionPinballUpgrade + jr Func_15450 + +.asm_1544c + call Func_154a9 + ret z + +Func_15450 + ld a, [wStageCollisionState] + bit 0, a + ret z + ld hl, wd5fb + ld b, $3 +.asm_1545b + ld a, [hld] + push hl + call Func_15465 + pop hl + dec b + jr nz, .asm_1545b + ret + +Func_15465: ; 0x15465 + and a + jr z, .asm_15477 ld a, [hGameBoyColorFlag] and a - jr z, .asm_15a2d - ld hl, Data_15d05 -.asm_15a2d - add hl, bc + jr nz, .asm_15472 + ld hl, TileDataPointers_15511 + jr .asm_15484 + +.asm_15472 + ld hl, TileDataPointers_15543 + jr .asm_15484 + +.asm_15477 + ld a, [hGameBoyColorFlag] + and a + jr nz, .asm_15481 + ld hl, TileDataPointers_15517 + jr .asm_15484 + +.asm_15481 + ld hl, TileDataPointers_15549 +.asm_15484 + push bc + dec b + sla b + ld e, b + ld d, $0 + add hl, de + ld c, [hl] + inc hl + ld b, [hl] + ld a, $5 + ld de, LoadTileLists + call Func_10c5 + pop bc + ret + +Func_15499: ; 0x15499 + ld a, [hGameBoyColorFlag] + and a + ret nz + ld b, $3 +.asm_1549f + push hl + xor a + call Func_15465 + pop hl + dec b + jr nz, .asm_1549f + ret + +Func_154a9: ; 0x154a9 + ld a, [wd5fc] + and a + jr z, .asm_154d6 + ld a, [wd5fd] + dec a + ld [wd5fd], a + jr nz, .asm_154bb + ld [wd5fc], a +.asm_154bb + and $7 + jr nz, .asm_154d4 + ld a, [wd5fd] + srl a + srl a + srl a + and $1 + ld hl, wd5f9 + ld [hli], a + ld [hli], a + ld [hl], a + ld a, $1 + and a + ret + +.asm_154d4 + xor a + ret + +.asm_154d6 + ld hl, wKeyConfigLeftFlipper + call IsKeyPressed + jr z, .asm_154ee + ld hl, wd5f9 ld a, [hli] - ld h, [hl] - ld l, a - or h + ld c, a + ld a, [hli] + ld b, a + ld a, [hl] + ld e, a + ld a, c + ld [hld], a + ld a, e + ld [hld], a + ld a, b + ld [hl], a + ret + +.asm_154ee + ld hl, wKeyConfigRightFlipper + call IsKeyPressed ret z - ld a, Bank(Data_15a3f) - call Func_10aa - ld a, [wStageCollisionState] - ld [wd7f2], a + ld hl, wd5f9 + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hl] + ld e, a + ld a, b + ld [hld], a + ld a, c + ld [hld], a + ld a, e + ld [hl], a ret -Data_15a3f: - dr $15a3f, $15d05 +BallTypeProgressionRedField: ; 0x15505 +; Determines the next upgrade for the Ball. + db GREAT_BALL ; POKE_BALL -> GREAT_BALL + db GREAT_BALL ; unused + db ULTRA_BALL ; GREAT_BALL -> ULTRA_BALL + db MASTER_BALL ; ULTRA_BALL -> MASTER_BALL + db MASTER_BALL ; unused + db MASTER_BALL ; MASTER_BALL -> MASTER_BALL + +BallTypeDegradationRedField: ; 0x1550b +; Determines the previous upgrade for the Ball. + db POKE_BALL ; POKE_BALL -> POKE_BALL + db POKE_BALL ; unused + db POKE_BALL ; GREAT_BALL -> POKE_BALL + db GREAT_BALL ; ULTRA_BALL -> GREAT_BALL + db ULTRA_BALL ; unused + db ULTRA_BALL ; MASTER_BALL -> GREAT_BALL + +TileDataPointers_15511: + dw TileData_1551d + dw TileData_15523 + dw TileData_1552a + +TileDataPointers_15517: + dw TileData_15530 + dw TileData_15536 + dw TileData_1553d + +TileData_1551d: ; 0x1551d + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $E7 + db $ac + + db $00 ; terminator + +TileData_15523: ; 0x15523 + db $02 ; total number of tiles -Data_15d05: - dr $15d05, $15e93 + db $02 ; number of tiles + dw vBGMap + $C9 + db $ad, $ae + + db $00 ; terminator + +TileData_1552a: ; 0x1552a + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $CC + db $af + + db $00 ; terminator + +TileData_15530: ; 0x15530 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $E7 + db $66 + + db $00 ; terminator + +TileData_15536: ; 0x15536 + db $02 ; total number of tiles + + db $02 ; number of tiles + dw vBGMap + $C9 + db $68, $69 + + db $00 ; terminator + +TileData_1553d: ; 0x1553d + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $CC + db $6a + + db $00 ; terminator + +TileDataPointers_15543: + dw TileData_1554f + dw TileData_15555 + dw TileData_1555c + +TileDataPointers_15549: + dw TileData_15562 + dw TileData_15568 + dw TileData_1556F + +TileData_1554f: ; 0x1554f + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $e7 + db $3D + + db $00 ; terminator + +TileData_15555: ; 0x15555 + db $02 ; total number of tiles + + db $02 ; number of tiles + dw vBGMap + $c9 + db $3F, $40 + + db $00 ; terminator + +TileData_1555c: ; 0x1555c + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $cc + db $41 + + db $00 ; terminator + +TileData_15562: ; 0x15562 + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $e7 + db $37 + + db $00 ; terminator + +TileData_15568: ; 0x15568 + db $02 ; total number of tiles + + db $02 ; number of tiles + dw vBGMap + $c9 + db $39, $3a + + db $00 ; terminator + +TileData_1556F: ; 0x1556F + db $01 ; total number of tiles + + db $01 ; number of tiles + dw vBGMap + $cc + db $3B + + db $00 ; terminator + +HandleRedStageBallTypeUpgradeCounter: ; 0x15575 + ld a, [wCapturingMon] + and a + ret nz + ld hl, wBallTypeCounter + ld a, [hli] + ld c, a + ld b, [hl] + or b + ret z + dec bc + ld a, b + ld [hld], a + ld [hl], c + or c + ret nz + ; counter is now 0! Degrade the ball upgrade. + ld a, [wBallType] + ld c, a + ld b, $0 + ld hl, BallTypeDegradationRedField + add hl, bc + ld a, [hl] + ld [wBallType], a + and a + jr z, .pokeball + ; load approximately 1 minute of frames into wBallTypeCounter + ld a, $10 + ld [wBallTypeCounter], a + ld a, $e + ld [wBallTypeCounter + 1], a +.pokeball + call TransitionPinballUpgrade + ret + +TransitionPinballUpgrade: ; 0x155a7 + ld a, [wBallType] + ld c, a + sla c + ld b, $0 + ld hl, PinballUpgradeTransitionPointers + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld a, Bank(PinballUpgradeTransitionPointers) + call Func_10aa + ; fall through + +Func_155bb: ; 0x155bb + ld a, [hGameBoyColorFlag] + and a + ret z + ; gameboy color + ld a, [wBallType] + sla a + ld c, a + ld b, $0 + ld hl, Data_157f7 + add hl, bc + ld c, [hl] + inc hl + ld b, [hl] + ld a, BANK(Data_157f7) + ld de, Func_1266 + call Func_10c5 + ret + +PinballUpgradeTransitionPointers: + dw TransitionToPokeBallPointers ; POKE_BALL + dw TransitionToPokeBallPointers ; POKE_BALL + dw TransitionToGreatBallPointers ; GREAT_BALL + dw TransitionToUltraBallPointers ; ULTRA_BALL + dw TransitionToUltraBallPointers ; ULTRA_BALL + dw TransitionToMasterBallPointers ; MASTER_BALL + +TransitionToPokeBallPointers: + db 11 + dw TransitionToPokeBall_TileData_1 + dw TransitionToPokeBall_TileData_2 + dw TransitionToPokeBall_TileData_3 + dw TransitionToPokeBall_TileData_4 + dw TransitionToPokeBall_TileData_5 + dw TransitionToPokeBall_TileData_6 + dw TransitionToPokeBall_TileData_7 + dw TransitionToPokeBall_TileData_8 + dw TransitionToPokeBall_TileData_9 + dw TransitionToPokeBall_TileData_10 + dw TransitionToPokeBall_TileData_11 + +TransitionToGreatBallPointers: + db 11 + dw TransitionToGreatBall_TileData_1 + dw TransitionToGreatBall_TileData_2 + dw TransitionToGreatBall_TileData_3 + dw TransitionToGreatBall_TileData_4 + dw TransitionToGreatBall_TileData_5 + dw TransitionToGreatBall_TileData_6 + dw TransitionToGreatBall_TileData_7 + dw TransitionToGreatBall_TileData_8 + dw TransitionToGreatBall_TileData_9 + dw TransitionToGreatBall_TileData_10 + dw TransitionToGreatBall_TileData_11 + +TransitionToUltraBallPointers: + db 11 + dw TransitionToUltraBall_TileData_1 + dw TransitionToUltraBall_TileData_2 + dw TransitionToUltraBall_TileData_3 + dw TransitionToUltraBall_TileData_4 + dw TransitionToUltraBall_TileData_5 + dw TransitionToUltraBall_TileData_6 + dw TransitionToUltraBall_TileData_7 + dw TransitionToUltraBall_TileData_8 + dw TransitionToUltraBall_TileData_9 + dw TransitionToUltraBall_TileData_10 + dw TransitionToUltraBall_TileData_11 + +TransitionToMasterBallPointers: + db 11 + dw TransitionToMasterBall_TileData_1 + dw TransitionToMasterBall_TileData_2 + dw TransitionToMasterBall_TileData_3 + dw TransitionToMasterBall_TileData_4 + dw TransitionToMasterBall_TileData_5 + dw TransitionToMasterBall_TileData_6 + dw TransitionToMasterBall_TileData_7 + dw TransitionToMasterBall_TileData_8 + dw TransitionToMasterBall_TileData_9 + dw TransitionToMasterBall_TileData_10 + dw TransitionToMasterBall_TileData_11 + +TransitionToPokeBall_TileData_1: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $40) + dw PinballPokeballGfx + $0 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_2: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $43) + dw PinballPokeballGfx + $30 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_3: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $46) + dw PinballPokeballGfx + $60 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_4: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $49) + dw PinballPokeballGfx + $90 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_5: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $4c) + dw PinballPokeballGfx + $c0 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_6: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $4f) + dw PinballPokeballGfx + $f0 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_7: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $52) + dw PinballPokeballGfx + $120 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_8: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $55) + dw PinballPokeballGfx + $150 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_9: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $58) + dw PinballPokeballGfx + $180 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_10: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $5b) + dw PinballPokeballGfx + $1b0 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToPokeBall_TileData_11: + dw Func_11d2 + db $20, $02 + dw (vTilesOB tile $5e) + dw PinballPokeballGfx + $1e0 + db Bank(PinballPokeballGfx) + db $00 + +TransitionToGreatBall_TileData_1: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $40) + dw PinballGreatballGfx + $0 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_2: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $43) + dw PinballGreatballGfx + $30 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_3: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $46) + dw PinballGreatballGfx + $60 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_4: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $49) + dw PinballGreatballGfx + $90 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_5: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $4c) + dw PinballGreatballGfx + $c0 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_6: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $4f) + dw PinballGreatballGfx + $f0 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_7: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $52) + dw PinballGreatballGfx + $120 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_8: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $55) + dw PinballGreatballGfx + $150 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_9: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $58) + dw PinballGreatballGfx + $180 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_10: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $5b) + dw PinballGreatballGfx + $1b0 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToGreatBall_TileData_11: + dw Func_11d2 + db $20, $02 + dw (vTilesOB tile $5e) + dw PinballGreatballGfx + $1e0 + db Bank(PinballGreatballGfx) + db $00 + +TransitionToUltraBall_TileData_1: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $40) + dw PinballUltraballGfx + $0 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_2: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $43) + dw PinballUltraballGfx + $30 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_3: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $46) + dw PinballUltraballGfx + $60 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_4: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $49) + dw PinballUltraballGfx + $90 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_5: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $4c) + dw PinballUltraballGfx + $c0 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_6: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $4f) + dw PinballUltraballGfx + $f0 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_7: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $52) + dw PinballUltraballGfx + $120 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_8: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $55) + dw PinballUltraballGfx + $150 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_9: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $58) + dw PinballUltraballGfx + $180 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_10: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $5b) + dw PinballUltraballGfx + $1b0 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToUltraBall_TileData_11: + dw Func_11d2 + db $20, $02 + dw (vTilesOB tile $5e) + dw PinballUltraballGfx + $1e0 + db Bank(PinballUltraballGfx) + db $00 + +TransitionToMasterBall_TileData_1: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $40) + dw PinballMasterballGfx + $0 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_2: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $43) + dw PinballMasterballGfx + $30 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_3: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $46) + dw PinballMasterballGfx + $60 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_4: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $49) + dw PinballMasterballGfx + $90 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_5: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $4c) + dw PinballMasterballGfx + $c0 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_6: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $4f) + dw PinballMasterballGfx + $f0 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_7: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $52) + dw PinballMasterballGfx + $120 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_8: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $55) + dw PinballMasterballGfx + $150 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_9: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $58) + dw PinballMasterballGfx + $180 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_10: + dw Func_11d2 + db $30, $03 + dw (vTilesOB tile $5b) + dw PinballMasterballGfx + $1b0 + db Bank(PinballMasterballGfx) + db $00 + +TransitionToMasterBall_TileData_11: + dw Func_11d2 + db $20, $02 + dw (vTilesOB tile $5e) + dw PinballMasterballGfx + $1e0 + db Bank(PinballMasterballGfx) + db $00 + +Data_157f7: + dw Data_15803 + dw Data_15803 + dw Data_1580a + dw Data_15811 + dw Data_15811 + dw Data_15818 + +Data_15803: + db $08, $04, $40, $68, $51, $37, $00 +Data_1580a: + db $08, $04, $40, $70, $51, $37, $00 +Data_15811: + db $08, $04, $40, $78, $51, $37, $00 +Data_15818: + db $08, $04, $40, $80, $51, $37, $00 + +ResolveRedStageBoardTriggerCollision: ; 0x1581f + ld a, [wWhichBoardTrigger] + and a + ret z + xor a + ld [wWhichBoardTrigger], a + ld bc, FivePoints + callba AddBigBCD6FromQueueWithBallMultiplier + ld a, [wWhichBoardTriggerId] + sub $11 + ld c, a + ld b, $0 + ld hl, wd521 + add hl, bc + ld [hl], $1 + ld a, [wd521] + and a + call nz, Func_1587c + ld a, [wd522] + and a + call nz, Func_158c0 + ld a, [wd523] + and a + call nz, Func_15904 + ld a, [wd524] + and a + call nz, HandleLeftAlleyTriggerRedField + ld a, [wd525] + and a + call nz, Func_15931 + ld a, [wd526] + and a + call nz, Func_15944 + ld a, [wd527] + and a + call nz, HandleRightAlleyTriggerRedField + ld a, [wd528] + and a + call nz, Func_15990 + ret + +Func_1587c: ; 0x1587c + xor a + ld [wd521], a + ld a, [wLeftAlleyTrigger] + and a + ret z + xor a + ld [wLeftAlleyTrigger], a + ld a, $1 + callba Func_10000 + ret c + ld a, [wLeftAlleyCount] + cp $3 + ret z + inc a + ld [wLeftAlleyCount], a + set 7, a + ld [wIndicatorStates], a + cp $83 + ret nz + ld a, [wStageCollisionState] + and $1 + or $6 + ld [wStageCollisionState], a + callba LoadStageCollisionAttributes + call Func_159f4 + ret + +Func_158c0: ; 0x158c0 + xor a + ld [wd522], a + ld a, [wLeftAlleyTrigger] + and a + ret z + xor a + ld [wLeftAlleyTrigger], a + ld a, $1 + callba Func_10000 + ret c + ld a, [wLeftAlleyCount] + cp $3 + ret z + inc a + ld [wLeftAlleyCount], a + set 7, a + ld [wIndicatorStates], a + cp $83 + ret nz + ld a, [wStageCollisionState] + and $1 + or $6 + ld [wStageCollisionState], a + callba LoadStageCollisionAttributes + call Func_159f4 + ret + +Func_15904: ; 0x15904 + xor a + ld [wd523], a + ld a, [wSecondaryLeftAlleyTrigger] + and a + ret z + xor a + ld [wSecondaryLeftAlleyTrigger], a + ld a, $3 + callba Func_10000 + ret + +HandleLeftAlleyTriggerRedField: ; 0x1591e +; Ball passed over the left alley trigger point in the Red Field. + xor a + ld [wd524], a + ld [wRightAlleyTrigger], a + ld [wSecondaryLeftAlleyTrigger], a + ld a, $1 + ld [wLeftAlleyTrigger], a + call Func_159c9 + ret + +Func_15931: ; 0x15931 + xor a + ld [wd525], a + ld [wRightAlleyTrigger], a + ld [wLeftAlleyTrigger], a + ld a, $1 + ld [wSecondaryLeftAlleyTrigger], a + call Func_159c9 + ret + +Func_15944: ; 0x15944 + xor a + ld [wd526], a + ld a, [wRightAlleyTrigger] + and a + ret z + xor a + ld [wRightAlleyTrigger], a + ld a, $2 + callba Func_10000 + ret c + ld a, [wRightAlleyCount] + cp $3 + ret z + inc a + ld [wRightAlleyCount], a + cp $3 + jr z, .asm_1596e + set 7, a +.asm_1596e + ld [wIndicatorStates + 1], a + ld a, [wRightAlleyCount] + cp $2 + ret c + ld a, $80 + ld [wIndicatorStates + 3], a + ret + +HandleRightAlleyTriggerRedField: ; 0x1597d +; Ball passed over the right alley trigger point in the Red Field. + xor a + ld [wd527], a + ld [wLeftAlleyTrigger], a + ld [wSecondaryLeftAlleyTrigger], a + ld a, $1 + ld [wRightAlleyTrigger], a + call Func_159c9 + ret + +Func_15990: ; 0x15990 + xor a + ld [wd528], a + ld a, [wRightAlleyTrigger] + and a + ret z + xor a + ld [wRightAlleyTrigger], a + ld a, $2 + callba Func_10000 + ret c + ld a, [wRightAlleyCount] + cp $3 + ret z + inc a + ld [wRightAlleyCount], a + cp $3 + jr z, .asm_159ba + set 7, a +.asm_159ba + ld [wIndicatorStates + 1], a + ld a, [wRightAlleyCount] + cp $2 + ret c + ld a, $80 + ld [wIndicatorStates + 3], a + ret + +Func_159c9: ; 0x159c9 + ld a, [wd7ad] + bit 7, a + ret nz + ld c, a + ld a, [wStageCollisionState] + and $1 + or c + ld [wStageCollisionState], a + ld a, $ff + ld [wd7ad], a + callba LoadStageCollisionAttributes + call Func_159f4 + ld a, $1 + ld [wd580], a + call Func_1404a + ret + +Func_159f4: ; 0x159f4 + ld a, [hLCDC] + bit 7, a + jr z, .asm_15a13 + ld a, [wd7f2] + and $fe + ld c, a + ld a, [wStageCollisionState] + and $fe + cp c + jr z, .asm_15a13 + add c + cp $2 + jr z, .asm_15a13 + lb de, $00, $00 + call PlaySoundEffect +.asm_15a13 + ld a, [wd7f2] + swap a + ld c, a + ld a, [wStageCollisionState] + sla a + or c + ld c, a + ld b, $0 + ld hl, TileDataPointers_15a3f + ld a, [hGameBoyColorFlag] + and a + jr z, .asm_15a2d + ld hl, TileDataPointers_15d05 +.asm_15a2d + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + or h + ret z + ld a, Bank(TileDataPointers_15a3f) + call Func_10aa + ld a, [wStageCollisionState] + ld [wd7f2], a + ret + +TileDataPointers_15a3f: + dw $0000 + dw TileData_15b71 + dw TileData_15b16 + dw TileData_15abf + dw TileData_15b23 + dw TileData_15adc + dw TileData_15b2a + dw TileData_15af3 + dw $0000 + dw $0000 + dw $0000 + dw TileData_15b16 + dw $0000 + dw TileData_15b23 + dw $0000 + dw TileData_15b2a + dw $0000 + dw $0000 + dw $0000 + dw TileData_15b71 + dw TileData_15b3d + dw $0000 + dw TileData_15b50 + dw $0000 + dw $0000 + dw $0000 + dw TileData_15b82 + dw $0000 + dw $0000 + dw TileData_15b3d + dw $0000 + dw TileData_15b50 + dw $0000 + dw $0000 + dw TileData_15b57 + dw $0000 + dw $0000 + dw TileData_15b71 + dw TileData_15b2a + dw $0000 + dw $0000 + dw $0000 + dw $0000 + dw TileData_15b57 + dw TileData_15b82 + dw $0000 + dw $0000 + dw TileData_15b2a + dw $0000 + dw $0000 + dw TileData_15b6a + dw $0000 + dw TileData_15b3d + dw $0000 + dw $0000 + dw TileData_15b71 + dw $0000 + dw $0000 + dw $0000 + dw TileData_15b6a + dw $0000 + dw TileData_15b3d + dw TileData_15b82 + dw $0000 + +TileData_15abf: ; 0x15abf + db $e + dw TileData_15b93 + dw TileData_15b9d + dw TileData_15ba7 + dw TileData_15bb1 + dw TileData_15bbb + dw TileData_15bc5 + dw TileData_15c0b + dw TileData_15c15 + dw TileData_15c1f + dw TileData_15c29 + dw TileData_15c33 + dw TileData_15c3d + dw TileData_15c47 + dw TileData_15c51 + +TileData_15adc: ; 0x15adc + db $0b + dw TileData_15c0b + dw TileData_15c15 + dw TileData_15c1f + dw TileData_15c29 + dw TileData_15c33 + dw TileData_15c3d + dw TileData_15c47 + dw TileData_15c51 + dw TileData_15ce7 + dw TileData_15cf1 + dw TileData_15cfb + +TileData_15af3: ; 0x15af3 + db $11 + dw TileData_15b93 + dw TileData_15b9d + dw TileData_15ba7 + dw TileData_15bb1 + dw TileData_15bbb + dw TileData_15bc5 + dw TileData_15c0b + dw TileData_15c15 + dw TileData_15c1f + dw TileData_15c29 + dw TileData_15c33 + dw TileData_15c3d + dw TileData_15c47 + dw TileData_15c51 + dw TileData_15cab + dw TileData_15cb5 + dw TileData_15cbf + +TileData_15b16: ; 0x15b16 + db $06 + dw TileData_15b93 + dw TileData_15b9d + dw TileData_15ba7 + dw TileData_15bb1 + dw TileData_15bbb + dw TileData_15bc5 + +TileData_15b23: ; 0x15b23 + db $03 + dw TileData_15ce7 + dw TileData_15cf1 + dw TileData_15cfb + +TileData_15b2a: ; 0x15b2a + db $09 + dw TileData_15b93 + dw TileData_15b9d + dw TileData_15ba7 + dw TileData_15bb1 + dw TileData_15bbb + dw TileData_15bc5 + dw TileData_15cab + dw TileData_15cb5 + dw TileData_15cbf + +TileData_15b3d: ; 0x15b3d + db $09 + dw TileData_15bcf + dw TileData_15bd9 + dw TileData_15be3 + dw TileData_15bed + dw TileData_15bf7 + dw TileData_15c01 + dw TileData_15ce7 + dw TileData_15cf1 + dw TileData_15cfb + +TileData_15b50: ; 0x15b50 + db $03 + dw TileData_15cab + dw TileData_15cb5 + dw TileData_15cbf + +TileData_15b57: ; 0x15b57 + db $09 + dw TileData_15b93 + dw TileData_15b9d + dw TileData_15ba7 + dw TileData_15bb1 + dw TileData_15bbb + dw TileData_15bc5 + dw TileData_15cc9 + dw TileData_15cd3 + dw TileData_15cdd + +TileData_15b6a: ; 0x15b6a + db $03 + dw TileData_15cc9 + dw TileData_15cd3 + dw TileData_15cdd + +TileData_15b71: ; 0x15b71 + db $08 + dw TileData_15c0b + dw TileData_15c15 + dw TileData_15c1f + dw TileData_15c29 + dw TileData_15c33 + dw TileData_15c3d + dw TileData_15c47 + dw TileData_15c51 + +TileData_15b82: ; 0x15b82 + db $08 + dw TileData_15c5b + dw TileData_15c65 + dw TileData_15c6f + dw TileData_15c79 + dw TileData_15c83 + dw TileData_15c8d + dw TileData_15c97 + dw TileData_15ca1 + +TileData_15b93: ; 0x15b93 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $44 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15b9d: ; 0x15b9d + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $47 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $30 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15ba7: ; 0x15ba7 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $4A + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $60 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15bb1: ; 0x15bb1 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $4D + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $90 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15bbb: ; 0x15bbb + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $50 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $C0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15bc5: ; 0x15bc5 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $53 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $F0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15bcf: ; 0x15bcf + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $44 + dw StageRedFieldTopBaseGameBoyGfx + $9a0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15bd9: ; 0x15bd9 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $47 + dw StageRedFieldTopBaseGameBoyGfx + $9d0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15be3: ; 0x15be3 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $4A + dw StageRedFieldTopBaseGameBoyGfx + $a00 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15bed: ; 0x15bed + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $4D + dw StageRedFieldTopBaseGameBoyGfx + $a30 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15bf7: ; 0x15bf7 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $50 + dw StageRedFieldTopBaseGameBoyGfx + $a60 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15c01: ; 0x15c01 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $53 + dw StageRedFieldTopBaseGameBoyGfx + $a90 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15c0b: ; 0x15c0b + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $56 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $120 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15c15: ; 0x15c15 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $59 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $150 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15c1f: ; 0x15c1f + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $5C + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $180 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15c29: ; 0x15c29 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $5F + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $1B0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15c33: ; 0x15c33 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $62 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $1E0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15c3d: ; 0x15c3d + dw Func_11d2 + db $10, $01 + dw vTilesBG tile $65 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $210 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15c47: ; 0x15c47 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $66 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $620 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15c51: ; 0x15c51 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $69 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $650 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15c5b: ; 0x15c5b + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $56 + dw StageRedFieldTopBaseGameBoyGfx + $ac0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15c65: ; 0x15c65 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $59 + dw StageRedFieldTopBaseGameBoyGfx + $af0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15c6f: ; 0x15c6f + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $5C + dw StageRedFieldTopBaseGameBoyGfx + $b20 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15c79: ; 0x15c79 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $5F + dw StageRedFieldTopBaseGameBoyGfx + $b50 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15c83: ; 0x15c83 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $62 + dw StageRedFieldTopBaseGameBoyGfx + $b80 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15c8d: ; 0x15c8d + dw Func_11d2 + db $10, $01 + dw vTilesBG tile $65 + dw StageRedFieldTopBaseGameBoyGfx + $bb0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15c97: ; 0x15c97 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $66 + dw StageRedFieldTopBaseGameBoyGfx + $bc0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15ca1: ; 0x15ca1 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $69 + dw StageRedFieldTopBaseGameBoyGfx + $bf0 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15cab: ; 0x15cab + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $6C + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $2B0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15cb5: ; 0x15cb5 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $6F + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $2E0 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15cbf: ; 0x15cbf + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $72 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $310 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15cc9: ; 0x15cc9 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $6C + dw StageRedFieldTopBaseGameBoyGfx + $c20 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15cd3: ; 0x15cd3 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $6F + dw StageRedFieldTopBaseGameBoyGfx + $c50 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15cdd: ; 0x15cdd + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $72 + dw StageRedFieldTopBaseGameBoyGfx + $c80 + db Bank(StageRedFieldTopBaseGameBoyGfx) + db $00 + +TileData_15ce7: ; 0x15ce7 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $6C + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $220 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15cf1: ; 0x15cf1 + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $6F + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $250 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileData_15cfb: ; 0x15cfb + dw Func_11d2 + db $30, $03 + dw vTilesBG tile $72 + dw StageRedFieldBottomIndicatorsGfx_Gameboy + $280 + db Bank(StageRedFieldBottomIndicatorsGfx_Gameboy) + db $00 + +TileDataPointers_15d05: + dw $0000 + dw TileData_15db1 + dw TileData_15d96 + dw TileData_15d85 + dw TileData_15d99 + dw TileData_15d8a + dw TileData_15d9c + dw TileData_15d8f + dw $0000 + dw $0000 + dw $0000 + dw TileData_15d96 + dw $0000 + dw TileData_15d99 + dw $0000 + dw TileData_15d9c + dw $0000 + dw $0000 + dw $0000 + dw TileData_15db1 + dw TileData_15da1 + dw $0000 + dw TileData_15da6 + dw $0000 + dw $0000 + dw $0000 + dw TileData_15db4 + dw $0000 + dw $0000 + dw TileData_15da1 + dw $0000 + dw TileData_15da6 + dw $0000 + dw $0000 + dw TileData_15da9 + dw $0000 + dw $0000 + dw TileData_15db1 + dw TileData_15d9c + dw $0000 + dw $0000 + dw $0000 + dw $0000 + dw TileData_15da9 + dw TileData_15db4 + dw $0000 + dw $0000 + dw TileData_15d9c + dw $0000 + dw $0000 + dw TileData_15dae + dw $0000 + dw TileData_15da1 + dw $0000 + dw $0000 + dw TileData_15db1 + dw $0000 + dw $0000 + dw $0000 + dw TileData_15dae + dw $0000 + dw TileData_15da1 + dw TileData_15db4 + dw $0000 + +TileData_15d85: ; 0x15d85 + db $02 + dw TileData_15db7 + dw TileData_15df2 + +TileData_15d8a: ; 0x15d8a + db $02 + dw TileData_15df2 + dw TileData_15e82 + +TileData_15d8f: ; 0x15d8f + db $03 + dw TileData_15db7 + dw TileData_15df2 + dw TileData_15e50 + +TileData_15d96: ; 0x15d96 + db $01 + dw TileData_15db7 + +TileData_15d99: ; 0x15d99 + db $01 + dw TileData_15e82 + +TileData_15d9c: ; 0x15d9c + db $02 + dw TileData_15db7 + dw TileData_15e50 + +TileData_15da1: ; 0x15da1 + db $02 + dw TileData_15dd5 + dw TileData_15e82 + +TileData_15da6: ; 0x15da6 + db $01 + dw TileData_15e50 + +TileData_15da9: ; 0x15da9 + db $02 + dw TileData_15db7 + dw TileData_15e69 + +TileData_15dae: ; 0x15dae + db $01 + dw TileData_15e69 + +TileData_15db1: ; 0x15dab1 + db $01 + dw TileData_15df2 + +TileData_15db4: ; 0x15db4 + db $01 + dw TileData_15e21 + +TileData_15db7: ; 0x15db7 + dw Func_1198 + + db ($a << 1) + db $03 + dw vBGMap + $4c + + db ($40 << 1) + db $09 + dw vBGMap + $6c + + db (($32 << 1) | 1) + db $08 + dw vBGMap + $8d + + db (4 << 1) + dw vBGMap + $ae + + db (2 << 1) + dw vBGMap + $d0 + + db (2 << 1) + dw vBGMap + $f1 + + db (2 << 1) + dw vBGMap + $111 + + db (1 << 1) + dw vBGMap + $132 + + db $00 ; terminator + +TileData_15dd5: ; 0x15dd5 + dw Func_1198 + + db ($a << 1) + db $03 + dw vBGMap + $4c + + db (($28 << 1) | 1) + db $08 + dw vBGMap + $6c + + db ($4 << 1) + dw vBGMap + $8d + + db ($04 << 1) + dw vBGMap + $ae + + db ($02 << 1) + dw vBGMap + $d0 + + db ($02 << 1) + dw vBGMap + $f1 + + db ($02 << 1) + dw vBGMap + $111 + + db (1 << 1) + dw vBGMap + $132 + + db $00 ; terminator + +TileData_15df2: ; 0x15df2 + dw LoadTileLists + db $19 ; total number of tiles + + db $05 ; number of tiles + dw vBGMap + $a9 + db $1e, $1f, $20, $21, $22 + + db $07 + dw vBGMap + $c7 + db $23, $24, $39, $3a, $25, $3b, $26 + + db $08 ; number of tiles + dw vBGMap + $e6 + db $27, $37, $28, $29, $2a, $2b, $3c, $2c + + db $03 ; number of tiles + dw vBGMap + $106 + db $2d, $38, $2e + + db $01 ; number of tiles + dw vBGMap + $10d + db $2f + + db $01 ; number of tiles + dw vBGMap + $126 + db $30 + + db 00 ; terminator + +TileData_15e21: ; 0x15e21 + dw LoadTileLists + db $19 ; total number of tiles + + db $05 ; number of tiles + dw vBGMap + $a9 + db $0b, $0c, $0d, $0e, $0f + + db $07 + dw vBGMap + $c7 + db $10, $11, $33, $34, $12, $35, $13 + + db $08 ; number of tiles + dw vBGMap + $e6 + db $14, $31, $15, $16, $17, $18, $36, $19 + + db $03 ; number of tiles + dw vBGMap + $106 + db $1a, $32, $1b + + db $01 ; number of tiles + dw vBGMap + $10d + db $1c + + db $01 ; number of tiles + dw vBGMap + $126 + db $1d + + db 00 ; terminator + +TileData_15e50: ; 0x15e50 + dw LoadTileLists + db $09 ; total number of tiles + + db $03 ; number of tiles + dw vBGMap + $100 + db $45, $46, $22 + + db $02 ; number of tiles + dw vBGMap + $120 + db $45, $46 + + db $02 ; number of tiles + dw vBGMap + $140 + db $45, $46 + + db $02 ; number of tiles + dw vBGMap + $160 + db $45, $46 + + db $00 ; terminator + +TileData_15e69: ; 0x15e69 + dw LoadTileLists + db $09 ; total number of tiles + + db $03 ; number of tiles + dw vBGMap + $100 + db $43, $44, $22 + + db $02 ; number of tiles + dw vBGMap + $120 + db $45, $46 + + db $02 ; number of tiles + dw vBGMap + $140 + db $45, $46 + + db $02 ; number of tiles + dw vBGMap + $160 + db $45, $46 + + db $00 ; terminator + +TileData_15e82: ; 0x15e82 + dw Func_1198 + + db ((4 << 1) | 1) + db $07 + dw vBGMap + $100 + + db (($23 << 1) | 1) + db $04 + dw vBGMap + $120 + + db (2 << 1) + dw vBGMap + $140 + + db (2 << 1) + dw vBGMap + $160 + + db $00 ; terminator ResolveBellsproutCollision: ; 0x15e93 ld a, [wBellsproutCollision] -- cgit v1.2.3