From 87f5b3d0ac377c573ab40408bdca9bbd559d437d Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 22 Jul 2017 15:39:20 -0700 Subject: Label billboard tile illumination states --- engine/pinball_game/catchem_mode.asm | 6 +++--- .../pinball_game/catchem_mode/catchem_mode_blue_field.asm | 2 +- engine/pinball_game/catchem_mode/catchem_mode_red_field.asm | 2 +- engine/pinball_game/evolution_mode.asm | 2 +- engine/pinball_game/load_stage_data/load_blue_field.asm | 2 +- engine/pinball_game/load_stage_data/load_red_field.asm | 2 +- wram.asm | 13 +++++++++++-- 7 files changed, 19 insertions(+), 10 deletions(-) diff --git a/engine/pinball_game/catchem_mode.asm b/engine/pinball_game/catchem_mode.asm index a541348..b24caab 100644 --- a/engine/pinball_game/catchem_mode.asm +++ b/engine/pinball_game/catchem_mode.asm @@ -64,7 +64,7 @@ StartCatchEmMode: ; 0x1003f ld [wd5c2], a ld a, [hli] ld [wd5c3], a ;load the 3 bytes into ???? - ld hl, wd586 + ld hl, wBillboardTilesIlluminationStates ld a, [wd5b6] ld c, a and a @@ -210,7 +210,7 @@ Func_10184: ; 0x10184 ld a, [hli] ld [$ff91], a ld de, wc000 - ld hl, wd586 + ld hl, wBillboardTilesIlluminationStates ld c, $0 .asm_101bb ld a, [hli] @@ -892,7 +892,7 @@ Func_10648: ; 0x10648 jr nz, .asm_10677 ld a, $14 ld [wd54e], a - ld hl, wd586 + ld hl, wBillboardTilesIlluminationStates ld b, $18 .asm_1065e ld a, [wd54f] diff --git a/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm b/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm index b6b9462..e1fc228 100644 --- a/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm +++ b/engine/pinball_game/catchem_mode/catchem_mode_blue_field.asm @@ -237,7 +237,7 @@ Func_204f1: ; 0x204f1 sla a ld c, a ld b, $0 - ld hl, wd586 + ld hl, wBillboardTilesIlluminationStates add hl, bc ld d, $4 .asm_20503 diff --git a/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm b/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm index e02f160..3e529f2 100644 --- a/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm +++ b/engine/pinball_game/catchem_mode/catchem_mode_red_field.asm @@ -235,7 +235,7 @@ Func_20230: ; 0x20230 sla a ld c, a ld b, $0 - ld hl, wd586 + ld hl, wBillboardTilesIlluminationStates add hl, bc ld d, $4 .asm_20242 diff --git a/engine/pinball_game/evolution_mode.asm b/engine/pinball_game/evolution_mode.asm index d939a9c..9fa08d5 100755 --- a/engine/pinball_game/evolution_mode.asm +++ b/engine/pinball_game/evolution_mode.asm @@ -377,7 +377,7 @@ SelectPokemonToEvolve: ; 0x10cb7 ret InitEvolutionModeForMon: ; 0x10d1d - ld hl, wd586 + ld hl, wBillboardTilesIlluminationStates ld b, $18 .asm_10d22 ld a, $1 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 c305346..9bbdb78 100644 --- a/engine/pinball_game/load_stage_data/load_blue_field.asm +++ b/engine/pinball_game/load_stage_data/load_blue_field.asm @@ -299,7 +299,7 @@ Func_1c3c3: ; 0x1c3c3 ret Func_1c3ca: ; 0x1c3ca - ld hl, wd586 + ld hl, wBillboardTilesIlluminationStates ld b, $18 .asm_1c3cf ld a, [hli] 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 046b2e6..e146a91 100644 --- a/engine/pinball_game/load_stage_data/load_red_field.asm +++ b/engine/pinball_game/load_stage_data/load_red_field.asm @@ -248,7 +248,7 @@ Func_14209: ; 0x14209 ret Func_14210: ; 0x14210 - ld hl, wd586 + ld hl, wBillboardTilesIlluminationStates ld b, $18 .asm_14215 ld a, [hli] diff --git a/wram.asm b/wram.asm index d6c8859..a88b9a5 100644 --- a/wram.asm +++ b/wram.asm @@ -716,8 +716,17 @@ wTimerDigits:: ; 0xd582 ; fourth byte = unused, but still written to ds $4 -wd586:: ; 0xd586 - ds $30 +wBillboardTilesIlluminationStates:: ; 0xd586 +; This array holds the illuminated state for each of the 24 tiles in a pokemon's billboard picture. +; During Catch'Em mode, the billboard picture starts with all tiles being "dark", and they light up +; as the Shellder or Voltorb are hit. +; +; If the tile is lit up, the value is $01, and $00 when dark. +; +; Each entry in this array is 2 bytes. +; Byte 1 = Current illumination state +; Bytes 2 = Previous illumination state. This is used to avoid re-loading the same graphics. + ds $18 * 2 wd5b6:: ; 0xd5b6 a 24 wide block starts here and is filled before catch mode ds $5 -- cgit v1.2.3 From 5d4c2f0304cf5a0784ac691f2355708414243471 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 22 Jul 2017 15:40:18 -0700 Subject: Fix SPECIAL_COLLISION_STARYU_ALLEY_TRIGGER typo --- constants/special_collision_constants.asm | 2 +- engine/pinball_game/evolution_mode/evolution_mode_red_field.asm | 2 +- engine/pinball_game/map_move.asm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/constants/special_collision_constants.asm b/constants/special_collision_constants.asm index 556f6a2..328fadd 100644 --- a/constants/special_collision_constants.asm +++ b/constants/special_collision_constants.asm @@ -1,7 +1,7 @@ SPECIAL_COLLISION_NOTHING EQU 0 SPECIAL_COLLISION_LEFT_TRIGGER EQU 1 SPECIAL_COLLISION_RIGHT_TRIGGER EQU 2 -SPECIAL_COLLISION_STARYU_ALLY_TRIGGER EQU 3 +SPECIAL_COLLISION_STARYU_ALLEY_TRIGGER EQU 3 SPECIAL_COLLISION_VOLTORB EQU 4 SPECIAL_COLLISION_SHELLDER EQU 4 SPECIAL_COLLISION_BELLSPROUT EQU 5 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 219cb38..b42c4f8 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm @@ -2,7 +2,7 @@ HandleRedEvoModeCollision: ; 0x20581 ld a, [wSpecialModeCollisionID] cp SPECIAL_COLLISION_VOLTORB jp z, Func_2080f ;voltorb - cp SPECIAL_COLLISION_STARYU_ALLY_TRIGGER + cp SPECIAL_COLLISION_STARYU_ALLEY_TRIGGER jp z, Func_20839 cp SPECIAL_COLLISION_BELLSPROUT jp z, Func_2085a ;bellsprout diff --git a/engine/pinball_game/map_move.asm b/engine/pinball_game/map_move.asm index 85494ff..27fcf1f 100755 --- a/engine/pinball_game/map_move.asm +++ b/engine/pinball_game/map_move.asm @@ -431,7 +431,7 @@ HandleRedMapModeCollision: ; 0x314ae jr z, .asm_314d0 cp SPECIAL_COLLISION_LEFT_TRIGGER jp z, OpenRedMapMoveSlotFromLeft - cp SPECIAL_COLLISION_STARYU_ALLY_TRIGGER + cp SPECIAL_COLLISION_STARYU_ALLEY_TRIGGER jp z, OpenRedMapMoveSlotFromLeft cp SPECIAL_COLLISION_RIGHT_TRIGGER jp z, OpenRedMapMoveSlotFromRight -- cgit v1.2.3