summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/high_scores_screen.asm2
-rw-r--r--engine/pinball_game.asm12
-rw-r--r--engine/pinball_game/ball_init/ball_init.asm4
-rw-r--r--engine/pinball_game/ball_init/ball_init_blue_field.asm2
-rw-r--r--engine/pinball_game/ball_init/ball_init_red_field.asm2
-rw-r--r--engine/pinball_game/ball_loss/ball_loss_blue_field.asm2
-rw-r--r--engine/pinball_game/ball_loss/ball_loss_gengar_bonus.asm4
-rw-r--r--engine/pinball_game/ball_loss/ball_loss_mewtwo_bonus.asm4
-rw-r--r--engine/pinball_game/ball_loss/ball_loss_red_field.asm2
-rw-r--r--engine/pinball_game/ball_saver/ball_saver_catchem_mode.asm8
-rw-r--r--engine/pinball_game/catchem_mode.asm18
-rw-r--r--engine/pinball_game/draw_sprites/draw_red_field_sprites.asm2
-rw-r--r--engine/pinball_game/end_of_ball_bonus.asm2
-rw-r--r--engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm10
-rw-r--r--engine/pinball_game/evolution_mode/evolution_mode_red_field.asm6
-rw-r--r--engine/pinball_game/menu.asm4
-rw-r--r--engine/pinball_game/object_collision/.gitignore1
-rw-r--r--engine/pinball_game/object_collision/blue_stage_resolve_collision.asm38
-rw-r--r--engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm4
-rw-r--r--engine/pinball_game/object_collision/red_stage_resolve_collision.asm94
-rw-r--r--engine/pinball_game/save_game.asm2
-rw-r--r--engine/pinball_game/vertical_screen_transition.asm6
-rw-r--r--engine/pokedex.asm4
-rw-r--r--gfx/stage/apostrophe_color.png (renamed from gfx/unknown/d63d0.png)bin74 -> 74 bytes
-rw-r--r--gfx/stage/apostrophe_mono.png (renamed from gfx/unknown/d61d0.png)bin74 -> 74 bytes
-rw-r--r--gfx/stage/colon_color.png (renamed from gfx/unknown/d63e0.png)bin73 -> 73 bytes
-rw-r--r--gfx/stage/colon_mono.png (renamed from gfx/unknown/d61e0.png)bin73 -> 73 bytes
-rw-r--r--gfx/stage/exclamation_point_color.png (renamed from gfx/unknown/d63a0.png)bin73 -> 73 bytes
-rw-r--r--gfx/stage/exclamation_point_mono.png (renamed from gfx/unknown/d61a0.png)bin74 -> 74 bytes
-rw-r--r--gfx/stage/period_color.png (renamed from gfx/unknown/d63b0.png)bin71 -> 71 bytes
-rw-r--r--gfx/stage/period_mono.png (renamed from gfx/unknown/d61b0.png)bin71 -> 71 bytes
-rw-r--r--home.asm83
-rw-r--r--home/text.asm122
-rw-r--r--main.asm216
-rw-r--r--wram.asm33
35 files changed, 363 insertions, 324 deletions
diff --git a/engine/high_scores_screen.asm b/engine/high_scores_screen.asm
index 920fc9d..9823d67 100644
--- a/engine/high_scores_screen.asm
+++ b/engine/high_scores_screen.asm
@@ -645,7 +645,7 @@ Func_cf58: ; 0xcf58
ret
Func_cf7d: ; 0xcf7d
- ld a, [wd809]
+ ld a, [wNewlyPressedButtonsPersistent]
ld b, a
ld a, [wda85]
bit 6, b
diff --git a/engine/pinball_game.asm b/engine/pinball_game.asm
index 6eb40be..766f900 100644
--- a/engine/pinball_game.asm
+++ b/engine/pinball_game.asm
@@ -15,7 +15,7 @@ GameScreenFunction_LoadGFX: ; 0xd861
call FillBottomMessageBufferWithBlackTile
ld a, $1
ld [wd85d], a
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
ld hl, wScreenState
inc [hl]
ret
@@ -56,7 +56,7 @@ GameScreenFunction_StartBall: ; 0xd87f
and a
call nz, Func_e5d
ld a, $1
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
xor a
ld [wd7c1], a
call Func_b66
@@ -179,8 +179,8 @@ GameScreenFunction_HandleBallLoss: ; 0xda36
ld [wd7eb], a
xor a
ld [wd7e9], a
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
call HandleTilts
ld a, [wCurrentStage]
bit 0, a
@@ -203,7 +203,7 @@ GameScreenFunction_HandleBallLoss: ; 0xda36
jr z, .asm_daa9
ld a, $2
ld [wd49c], a
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
call FillBottomMessageBufferWithBlackTile
call Func_30db
ld hl, wd5dc
@@ -306,7 +306,7 @@ TransitionToHighScoresScreen: ; 0xdb5d
ld hl, rIE
res 1, [hl]
xor a
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
ld a, [wCurrentStage]
ld c, a
ld b, $0
diff --git a/engine/pinball_game/ball_init/ball_init.asm b/engine/pinball_game/ball_init/ball_init.asm
index 29dbf64..e7a13c7 100644
--- a/engine/pinball_game/ball_init/ball_init.asm
+++ b/engine/pinball_game/ball_init/ball_init.asm
@@ -23,8 +23,8 @@ InitBallForStage: ; 0x83ba
ld [wBallSpin], a
ld [wBallRotation], a
inc a
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
ld a, $20
ld [wSCX], a
ld a, [wCurrentStage]
diff --git a/engine/pinball_game/ball_init/ball_init_blue_field.asm b/engine/pinball_game/ball_init/ball_init_blue_field.asm
index 6d33e83..b265880 100644
--- a/engine/pinball_game/ball_init/ball_init_blue_field.asm
+++ b/engine/pinball_game/ball_init/ball_init_blue_field.asm
@@ -11,7 +11,7 @@ InitBallBlueField: ; 0x1c08d
ld a, $98
ld [wBallYPos + 1], a
xor a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
ld [wd580], a
call InitBlueFieldCollisionAttributes
ld a, [wd4c9]
diff --git a/engine/pinball_game/ball_init/ball_init_red_field.asm b/engine/pinball_game/ball_init/ball_init_red_field.asm
index 5411ac8..4ae79bf 100644
--- a/engine/pinball_game/ball_init/ball_init_red_field.asm
+++ b/engine/pinball_game/ball_init/ball_init_red_field.asm
@@ -11,7 +11,7 @@ InitBallRedField: ; 0x3007d
ld a, $98
ld [wBallYPos + 1], a
xor a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
ld [wd580], a
ld a, [wd7ad]
bit 7, a
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 e4d8692..e9a83fb 100644
--- a/engine/pinball_game/ball_loss/ball_loss_blue_field.asm
+++ b/engine/pinball_game/ball_loss/ball_loss_blue_field.asm
@@ -81,7 +81,7 @@ Func_ded6: ; 0xded6
ld [wd604], a
ld a, $1e
ld [wd607], a
- callba Func_10ac8
+ callba ConcludeEvolutionMode
ret
.asm_df05
diff --git a/engine/pinball_game/ball_loss/ball_loss_gengar_bonus.asm b/engine/pinball_game/ball_loss/ball_loss_gengar_bonus.asm
index 6fc76fe..c2cff1f 100644
--- a/engine/pinball_game/ball_loss/ball_loss_gengar_bonus.asm
+++ b/engine/pinball_game/ball_loss/ball_loss_gengar_bonus.asm
@@ -14,8 +14,8 @@ HandleBallLossGengarBonus: ; 0xdf1a
ld a, [wd6a7]
and a
ret nz
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
ld [wBallSpin], a
ld [wBallRotation], a
ld hl, wBallXVelocity
diff --git a/engine/pinball_game/ball_loss/ball_loss_mewtwo_bonus.asm b/engine/pinball_game/ball_loss/ball_loss_mewtwo_bonus.asm
index d4a5fe5..4cafb02 100644
--- a/engine/pinball_game/ball_loss/ball_loss_mewtwo_bonus.asm
+++ b/engine/pinball_game/ball_loss/ball_loss_mewtwo_bonus.asm
@@ -14,8 +14,8 @@ HandleBallLossMewtwoBonus: ; 0xdf7e
ld a, [wd6b2]
and a
ret nz
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
ld [wBallSpin], a
ld [wBallRotation], a
ld hl, wBallXVelocity
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 f76bf6e..e219fbc 100644
--- a/engine/pinball_game/ball_loss/ball_loss_red_field.asm
+++ b/engine/pinball_game/ball_loss/ball_loss_red_field.asm
@@ -81,7 +81,7 @@ Func_ddfd: ; 0xddfd
ld [wd604], a
ld a, $1e
ld [wd607], a
- callba Func_10ac8
+ callba ConcludeEvolutionMode
jr .asm_de40
.asm_de2d
diff --git a/engine/pinball_game/ball_saver/ball_saver_catchem_mode.asm b/engine/pinball_game/ball_saver/ball_saver_catchem_mode.asm
index ac6c163..2d1dbdd 100644
--- a/engine/pinball_game/ball_saver/ball_saver_catchem_mode.asm
+++ b/engine/pinball_game/ball_saver/ball_saver_catchem_mode.asm
@@ -4,7 +4,7 @@ InitBallSaverForCatchEmMode: ; 0xdbd4
ld a, [wBallSaverTimerSeconds]
ld [wBallSaverTimerSecondsBackup], a
ld a, [wNumTimesBallSavedTextWillDisplay]
- ld [wd4a8], a
+ ld [wNumTimesBallSavedTextWillDisplayBackup], a
ld a, $0
ld [wBallSaverIconOn], a
ld a, $ff
@@ -22,13 +22,13 @@ RestoreBallSaverAfterCatchEmMode: ; 0xdc00
ld [wBallSaverTimerFrames], a
ld a, [wBallSaverTimerSecondsBackup]
ld [wBallSaverTimerSeconds], a
- ld a, [wd4a8]
+ ld a, [wNumTimesBallSavedTextWillDisplayBackup]
ld [wNumTimesBallSavedTextWillDisplay], a
ld a, [wBallSaverTimerSeconds]
and a
- jr z, .asm_dc1a
+ jr z, .SetSaverIconOff
ld a, $1
-.asm_dc1a
+.SetSaverIconOff
ld [wBallSaverIconOn], a
ld a, [wBallSaverTimerSeconds]
ld c, $0
diff --git a/engine/pinball_game/catchem_mode.asm b/engine/pinball_game/catchem_mode.asm
index 632e145..7dbe8f9 100644
--- a/engine/pinball_game/catchem_mode.asm
+++ b/engine/pinball_game/catchem_mode.asm
@@ -690,8 +690,8 @@ BallCaptureInit: ; 0x10496
ld [wBallYVelocity], a
ld [wBallYVelocity + 1], a
xor a
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
lb de, $00, $0b
call PlaySoundEffect
ret
@@ -788,8 +788,8 @@ CapturePokemon: ; 0x1052d
ld [wBallYPos], a
ld [wCapturingMon], a
ld a, $1
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
callba RestoreBallSaverAfterCatchEmMode
call ConcludeCatchEmMode
ld de, $0001
@@ -1078,14 +1078,14 @@ SetPokemonOwnedFlag: ; 0x1077c
call SaveData
ret
-Func_107a5: ; 0x107a5
+ResetIndicatorStates: ; 0x107a5
xor a
ld hl, wIndicatorStates
ld b, $13
-.asm_107ab
+.loop
ld [hli], a
dec b
- jr nz, .asm_107ab
+ jr nz, .loop
ret
Func_107b0: ; 0x107b0
@@ -1244,7 +1244,7 @@ Func_10871: ; 0x10871
ret
Func_108f5: ; 0x108f5
- call Func_107a5
+ call ResetIndicatorStates
call Func_107c2
call Func_107c8
call Func_107e9
@@ -1375,7 +1375,7 @@ Func_1098c: ; 0x1098c
ret
Func_109fc: ; 0x109fc
- call Func_107a5
+ call ResetIndicatorStates
call Func_107c2
callba Func_1f2ff
ld a, [wCurrentStage]
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 024527b..2e34743 100644
--- a/engine/pinball_game/draw_sprites/draw_red_field_sprites.asm
+++ b/engine/pinball_game/draw_sprites/draw_red_field_sprites.asm
@@ -512,7 +512,7 @@ Func_17e5e: ; 0x17e5e
jr .asm_17e64
DrawPinball: ; 0x17e81
- ld a, [wd548]
+ ld a, [wPinballIsVisible]
and a
ret z
ld hl, wBallSpin
diff --git a/engine/pinball_game/end_of_ball_bonus.asm b/engine/pinball_game/end_of_ball_bonus.asm
index 6e8ba8a..8afdf54 100644
--- a/engine/pinball_game/end_of_ball_bonus.asm
+++ b/engine/pinball_game/end_of_ball_bonus.asm
@@ -40,7 +40,7 @@ LoadEAcuteCharacterGfx: ; 0xf55c
Func_f57f: ; 0xf57f
xor a
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
ld hl, wBottomMessageText
ld a, $81
ld b, $40
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 a9b0b00..a1af8f5 100644
--- a/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm
+++ b/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm
@@ -174,8 +174,8 @@ Func_20c76: ; 0x20c76
Func_20d30: ; 0x20d30
callba RestoreBallSaverAfterCatchEmMode
- callba Func_10ca5
- callba Func_10ac8
+ callba PlaceEvolutionInParty
+ callba ConcludeEvolutionMode
ld de, $0001
call PlaySong
ld hl, wNumPokemonEvolvedInBallBonus
@@ -186,9 +186,9 @@ Func_20d30: ; 0x20d30
ret z
add $2
cp $3
- jr c, .asm_20d72
+ jr c, .DontClampBalls
ld a, $3
-.asm_20d72
+.DontClampBalls
ld [wNumPokeballs], a
ld a, $80
ld [wPokeballBlinkingCounter], a
@@ -201,7 +201,7 @@ Func_20d7c: ; 0x20d7c
ret nz
call FillBottomMessageBufferWithBlackTile
callba RestoreBallSaverAfterCatchEmMode
- callba Func_10ac8
+ callba ConcludeEvolutionMode
ld de, $0001
call PlaySong
scf
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 ca7faaf..a1149c1 100644
--- a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm
+++ b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm
@@ -177,8 +177,8 @@ Func_20651: ; 0x20651
Func_2070b: ; 0x2070b
callba RestoreBallSaverAfterCatchEmMode
- callba Func_10ca5
- callba Func_10ac8
+ callba PlaceEvolutionInParty
+ callba ConcludeEvolutionMode
ld de, $0001
call PlaySong
ld hl, wNumPokemonEvolvedInBallBonus
@@ -204,7 +204,7 @@ Func_20757: ; 0x20757
ret nz
call FillBottomMessageBufferWithBlackTile
callba RestoreBallSaverAfterCatchEmMode
- callba Func_10ac8
+ callba ConcludeEvolutionMode
ld de, $0001
call PlaySong
scf
diff --git a/engine/pinball_game/menu.asm b/engine/pinball_game/menu.asm
index d97d039..a31ff1f 100644
--- a/engine/pinball_game/menu.asm
+++ b/engine/pinball_game/menu.asm
@@ -6,7 +6,7 @@ HandleInGameMenu: ; 0x86d7
ld [wd917], a
call FillBottomMessageBufferWithBlackTile
xor a
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
ld hl, wBottomMessageText
ld a, $81
ld b, $30
@@ -83,7 +83,7 @@ HandleInGameMenu: ; 0x86d7
pop af
ld [wd917], a
ld a, $1
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
ld a, [wInGameMenuIndex]
and a
ret
diff --git a/engine/pinball_game/object_collision/.gitignore b/engine/pinball_game/object_collision/.gitignore
new file mode 100644
index 0000000..2d96ba3
--- /dev/null
+++ b/engine/pinball_game/object_collision/.gitignore
@@ -0,0 +1 @@
+*.kate-swp
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 01fbbb6..1cabbd8 100644
--- a/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm
@@ -76,7 +76,7 @@ ResolveBlueStagePinballLaunchCollision: ; 0x1c7d7
ld a, $fa
ld [wBallYVelocity + 1], a
ld a, $1
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
lb de, $00, $0a
call PlaySoundEffect
.dontLaunch
@@ -1640,7 +1640,7 @@ ResolveBlueStagePikachuCollision: ; 0x1d0a1
ld [wBallYVelocity + 1], a
ld [wBallSpin], a
ld [wBallRotation], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
call FillBottomMessageBufferWithBlackTile
jr .asm_1d110
@@ -1712,7 +1712,7 @@ Func_1d133: ; 0x1d133
ld a, $fc
ld [wBallYVelocity + 1], a
ld a, $1
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
ld bc, FiveThousandPoints
callba AddBigBCD6FromQueueWithBallMultiplier
xor a
@@ -1805,7 +1805,7 @@ ResolveSlowpokeCollision: ; 0x1d216
ld [wBallXPos], a
ld [wBallYPos], a
xor a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
.asm_1d253
ld hl, SlowpokeCollisionAnimationData ; 0x1d312
ld de, wSlowpokeAnimation
@@ -1827,11 +1827,11 @@ ResolveSlowpokeCollision: ; 0x1d216
cp $1
jr nz, .asm_1d2b6
xor a
- ld [wd548], a
+ ld [wPinballIsVisible], a
ld a, [wLeftAlleyCount]
cp $3
jr nz, .asm_1d299
- callba Func_10ab3
+ callba StartEvolutionMode
ld a, [wd643]
and a
ret z
@@ -1853,7 +1853,7 @@ ResolveSlowpokeCollision: ; 0x1d216
cp $4
jr nz, .asm_1d2c3
ld a, $1
- ld [wd548], a
+ ld [wPinballIsVisible], a
ret
.asm_1d2c3
@@ -1861,7 +1861,7 @@ ResolveSlowpokeCollision: ; 0x1d216
cp $5
ret nz
ld a, $1
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
ld a, $b0
ld [wBallXVelocity], a
ld a, $0
@@ -1927,7 +1927,7 @@ ResolveCloysterCollision: ; 0x1d32d
ld [wBallXPos], a
ld [wBallYPos], a
xor a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
.asm_1d36a
ld hl, CloysterCollisionAnimationData
ld de, wCloysterAnimation
@@ -1949,7 +1949,7 @@ ResolveCloysterCollision: ; 0x1d32d
cp $1
jr nz, .asm_1d3cb
xor a
- ld [wd548], a
+ ld [wPinballIsVisible], a
ld a, [wRightAlleyCount]
cp $2
jr c, .noCatchEmMode
@@ -1975,7 +1975,7 @@ ResolveCloysterCollision: ; 0x1d32d
cp $4
jr nz, .asm_1d3d8
ld a, $1
- ld [wd548], a
+ ld [wPinballIsVisible], a
ret
.asm_1d3d8
@@ -1983,7 +1983,7 @@ ResolveCloysterCollision: ; 0x1d32d
cp $5
ret nz
ld a, $1
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
ld a, $4f
ld [wBallXVelocity], a
ld a, $ff
@@ -5753,7 +5753,7 @@ Func_1e757: ; 0x1e757
ld [hli], a
ld [hli], a
ld [hli], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
ld [wBallXPos], a
ld [wBallYPos], a
ld a, $50
@@ -5788,7 +5788,7 @@ Func_1e757: ; 0x1e757
cp $c
jr nz, .asm_1e7d0
xor a
- ld [wd548], a
+ ld [wPinballIsVisible], a
ld [wBallSpin], a
ld [wBallRotation], a
ret
@@ -5843,8 +5843,8 @@ Func_1e830: ; 0x1e830
callba Func_10000
jr nc, .asm_1e84b
ld a, $1
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
ret
.asm_1e84b
@@ -5891,12 +5891,12 @@ Func_1e830: ; 0x1e830
cp $d
jr nc, .asm_1e858
ld a, $1
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
ld a, [wCatchEmOrEvolutionSlotRewardActive]
cp EVOLUTION_MODE_SLOT_REWARD
ret nz
- callba Func_10ab3
+ callba StartEvolutionMode
xor a
ld [wCatchEmOrEvolutionSlotRewardActive], a
ret
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 3a4d7cc..c73bacf 100644
--- a/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm
@@ -877,8 +877,8 @@ Func_1894c: ; 0x1894c
jr z, .asm_18980
inc a
ld [wd6a5], a
- ld a, [wd548]
- ld hl, wDisableBallGravityAndTilt
+ ld a, [wPinballIsVisible]
+ ld hl, wEnableBallGravityAndTilt
and [hl]
jr z, .asm_18973
ld a, [wBallYPos + 1]
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 b60060b..ac5ead8 100644
--- a/engine/pinball_game/object_collision/red_stage_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/red_stage_resolve_collision.asm
@@ -54,10 +54,10 @@ Func_146a2: ; 0x146a2
Func_146a9: ; 0x146a9
ld a, [wBallSaverTimerFrames]
ld hl, wBallSaverTimerSeconds
- or [hl]
+ or [hl] ;if both the number of frames and number of seconds left is 0, skip
ret z
ld a, [wBallXPos + 1]
- cp $9a
+ cp 154 ;if high? Byte of ball X pos is >= 154, jump ahead
jr nc, .asm_146e8
ld a, [wBallSaverTimerFrames]
dec a
@@ -2429,7 +2429,7 @@ TileDataPointers_15325:
TileData_1532d: ; 0x1532d
db $01 ; total number of tiles
-
+
db $01 ; number of tiles
dw vBGMap + $121
db $27
@@ -2438,7 +2438,7 @@ TileData_1532d: ; 0x1532d
TileData_15333: ; 0x15333
db $01 ; total number of tiles
-
+
db $01 ; number of tiles
dw vBGMap + $123
db $29
@@ -2447,7 +2447,7 @@ TileData_15333: ; 0x15333
TileData_15339: ; 0x15339
db $01 ; total number of tiles
-
+
db $01 ; number of tiles
dw vBGMap + $130
db $7E
@@ -2456,7 +2456,7 @@ TileData_15339: ; 0x15339
TileData_1533f: ; 0x1533f
db $01 ; total number of tiles
-
+
db $01 ; number of tiles
dw vBGMap + $132
db $7F
@@ -2465,7 +2465,7 @@ TileData_1533f: ; 0x1533f
TileData_15345: ; 0x15345
db $01 ; total number of tiles
-
+
db $01 ; number of tiles
dw vBGMap + $121
db $26
@@ -2474,7 +2474,7 @@ TileData_15345: ; 0x15345
TileData_1534b: ; 0x1534b
db $01 ; total number of tiles
-
+
db $01 ; number of tiles
dw vBGMap + $123
db $28
@@ -2483,7 +2483,7 @@ TileData_1534b: ; 0x1534b
TileData_15351: ; 0x15351
db $01 ; total number of tiles
-
+
db $01 ; number of tiles
dw vBGMap + $130
db $7C
@@ -2492,7 +2492,7 @@ TileData_15351: ; 0x15351
TileData_15357: ; 0x15357
db $01 ; total number of tiles
-
+
db $01 ; number of tiles
dw vBGMap + $132
db $7D
@@ -4392,7 +4392,7 @@ TileData_15e21: ; 0x15e21
TileData_15e50: ; 0x15e50
dw LoadTileLists
db $09 ; total number of tiles
-
+
db $03 ; number of tiles
dw vBGMap + $100
db $45, $46, $22
@@ -4414,7 +4414,7 @@ TileData_15e50: ; 0x15e50
TileData_15e69: ; 0x15e69
dw LoadTileLists
db $09 ; total number of tiles
-
+
db $03 ; number of tiles
dw vBGMap + $100
db $43, $44, $22
@@ -4477,7 +4477,7 @@ ResolveBellsproutCollision: ; 0x15e93
ld a, $78
ld [wBallYPos + 1], a
xor a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
.asm_15eda
ld hl, BellsproutAnimationData
ld de, wBellsproutAnimation
@@ -4499,7 +4499,7 @@ ResolveBellsproutCollision: ; 0x15e93
cp $1
jr nz, .asm_15f35
xor a
- ld [wd548], a
+ ld [wPinballIsVisible], a
ld a, [wRightAlleyCount]
cp $2
jr c, .noCatchEmMode
@@ -4523,7 +4523,7 @@ ResolveBellsproutCollision: ; 0x15e93
cp $4
jr nz, .asm_15f42
ld a, $1
- ld [wd548], a
+ ld [wPinballIsVisible], a
ret
.asm_15f42
@@ -4531,7 +4531,7 @@ ResolveBellsproutCollision: ; 0x15e93
cp $5
ret nz
ld a, $1
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
xor a
ld [wBallXVelocity + 1], a
ld a, $2
@@ -4875,7 +4875,7 @@ ResolveDittoSlotCollision: ; 0x160f0
ld [hli], a
ld [hli], a
ld [hli], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
ld [wBallXPos], a
ld [wBallYPos], a
ld a, $11
@@ -4909,7 +4909,7 @@ ResolveDittoSlotCollision: ; 0x160f0
cp $9
jr nz, .asm_1616d
xor a
- ld [wd548], a
+ ld [wPinballIsVisible], a
ld [wBallSpin], a
ld [wBallRotation], a
ret
@@ -4917,10 +4917,10 @@ ResolveDittoSlotCollision: ; 0x160f0
.asm_1616d
cp $6
jr nz, .asm_1618e
- callba Func_10ab3
+ callba StartEvolutionMode
ld a, $1
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
ld a, $5
ld [wd803], a
ld a, $8
@@ -5092,7 +5092,7 @@ Func_16279: ; 0x16279
ld [hli], a
ld [hli], a
ld [hli], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
ld [wBallXPos], a
ld [wBallYPos], a
ld a, $50
@@ -5127,7 +5127,7 @@ Func_16279: ; 0x16279
cp $c
jr nz, .asm_162f2
xor a
- ld [wd548], a
+ ld [wPinballIsVisible], a
ld [wBallSpin], a
ld [wBallRotation], a
ret
@@ -5182,8 +5182,8 @@ Func_16352: ; 0x16352
callba Func_10000
jr nc, .asm_1636d
ld a, $1
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
ret
.asm_1636d
@@ -5230,12 +5230,12 @@ Func_16352: ; 0x16352
cp $d
jr nc, .asm_1637a
ld a, $1
- ld [wd548], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wPinballIsVisible], a
+ ld [wEnableBallGravityAndTilt], a
ld a, [wCatchEmOrEvolutionSlotRewardActive]
cp EVOLUTION_MODE_SLOT_REWARD
ret nz
- callba Func_10ab3
+ callba StartEvolutionMode
ld a, [wd7ad]
ld c, a
ld a, [wStageCollisionState]
@@ -5504,7 +5504,7 @@ ResolveRedStagePinballLaunchCollision: ; 0x1652d
ld a, $fa
ld [wBallYVelocity + 1], a
ld a, $1
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
lb de, $00, $0a
call PlaySoundEffect
.notLaunchedYet
@@ -5627,7 +5627,7 @@ ResolveRedStagePikachuCollision: ; 0x1660c
ld [wBallYVelocity + 1], a
ld [wBallSpin], a
ld [wBallRotation], a
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
call FillBottomMessageBufferWithBlackTile
jr .asm_1667b
@@ -5699,7 +5699,7 @@ Func_1669e: ; 0x1669e
ld a, $fc
ld [wBallYVelocity + 1], a
ld a, $1
- ld [wDisableBallGravityAndTilt], a
+ ld [wEnableBallGravityAndTilt], a
ld bc, FiveThousandPoints
callba AddBigBCD6FromQueueWithBallMultiplier
xor a
@@ -6726,7 +6726,7 @@ TileData_16c46: ; 0x16c46
TileData_16c49: ; 0x16c49
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $23
db $5E
@@ -6752,7 +6752,7 @@ TileData_16c49: ; 0x16c49
TileData_16c63: ; 0x16c63
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $23
db $65
@@ -6778,7 +6778,7 @@ TileData_16c63: ; 0x16c63
TileData_16c7d: ; 0x16c7d
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $23
db $65
@@ -6804,7 +6804,7 @@ TileData_16c7d: ; 0x16c7d
TileData_16c97: ; 0x16c97
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $23
db $65
@@ -6830,7 +6830,7 @@ TileData_16c97: ; 0x16c97
TileData_16cb1: ; 0x16cb1
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $23
db $5E
@@ -6856,7 +6856,7 @@ TileData_16cb1: ; 0x16cb1
TileData_16ccb: ; 0x16ccb
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $30
db $6C
@@ -6882,7 +6882,7 @@ TileData_16ccb: ; 0x16ccb
TileData_16ce5: ; 0x16ce5
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $30
db $73
@@ -6908,7 +6908,7 @@ TileData_16ce5: ; 0x16ce5
TileData_16cff: ; 0x16cff
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $30
db $73
@@ -6934,7 +6934,7 @@ TileData_16cff: ; 0x16cff
TileData_16d19: ; 0x16d19
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $30
db $73
@@ -6960,7 +6960,7 @@ TileData_16d19: ; 0x16d19
TileData_16d33: ; 0x16d33
dw LoadTileLists
db $07
-
+
db $01
dw vBGMap + $30
db $6C
@@ -6986,7 +6986,7 @@ TileData_16d33: ; 0x16d33
TileData_16d4d: ; 0x16d4d
dw LoadTileLists
db $03
-
+
db $01
dw vBGMap + $6
db $48
@@ -7000,7 +7000,7 @@ TileData_16d4d: ; 0x16d4d
TileData_16d5a: ; 0x16d5a
dw LoadTileLists
db $03
-
+
db $01
dw vBGMap + $6
db $4B
@@ -7014,7 +7014,7 @@ TileData_16d5a: ; 0x16d5a
TileData_16d67: ; 0x16d67
dw LoadTileLists
db $03
-
+
db $01
dw vBGMap + $D
db $4E
@@ -7028,7 +7028,7 @@ TileData_16d67: ; 0x16d67
TileData_16d74: ; 0x16d74
dw LoadTileLists
db $03
-
+
db $01
dw vBGMap + $D
db $51
@@ -7042,7 +7042,7 @@ TileData_16d74: ; 0x16d74
TileData_16d81: ; 0x16d81
dw LoadTileLists
db $04
-
+
db $02
dw vBGMap + $49
db $40, $41
@@ -7056,7 +7056,7 @@ TileData_16d81: ; 0x16d81
TileData_16d8f: ; 0x16d8f
dw LoadTileLists
db $04
-
+
db $02
dw vBGMap + $49
db $44, $45
diff --git a/engine/pinball_game/save_game.asm b/engine/pinball_game/save_game.asm
index 644abb3..1d2f539 100644
--- a/engine/pinball_game/save_game.asm
+++ b/engine/pinball_game/save_game.asm
@@ -13,7 +13,7 @@ SaveGame: ; 0xda05
ld hl, rIE
res 1, [hl]
xor a
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
ld a, SCREEN_TITLESCREEN
ld [wCurrentScreen], a
xor a
diff --git a/engine/pinball_game/vertical_screen_transition.asm b/engine/pinball_game/vertical_screen_transition.asm
index 81203d5..94290f2 100644
--- a/engine/pinball_game/vertical_screen_transition.asm
+++ b/engine/pinball_game/vertical_screen_transition.asm
@@ -1,14 +1,14 @@
FieldVerticalTransition: ; 0xe674
push af
- ld a, [wd548]
+ ld a, [wPinballIsVisible]
push af
xor a
- ld [wd548], a
+ ld [wPinballIsVisible], a
ld [wd803], a
callba DrawSpritesForStage
call CleanOAMBuffer
pop af
- ld [wd548], a
+ ld [wPinballIsVisible], a
pop af
ld [wCurrentStage], a
xor a
diff --git a/engine/pokedex.asm b/engine/pokedex.asm
index 7f7eddd..8251d03 100644
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -831,11 +831,11 @@ Func_28513: ; 0x28513
Func_285ca: ; 0x285ca
xor a
- ld [wd80a], a
+ ld [wPressedButtonsPersistent], a
call Func_28972
call Func_28a8a
call Func_28ad1
- ld a, [wd80a]
+ ld a, [wPressedButtonsPersistent]
ret
Func_285db: ; 0x285db
diff --git a/gfx/unknown/d63d0.png b/gfx/stage/apostrophe_color.png
index cc2e370..cc2e370 100644
--- a/gfx/unknown/d63d0.png
+++ b/gfx/stage/apostrophe_color.png
Binary files differ
diff --git a/gfx/unknown/d61d0.png b/gfx/stage/apostrophe_mono.png
index 5fb300d..5fb300d 100644
--- a/gfx/unknown/d61d0.png
+++ b/gfx/stage/apostrophe_mono.png
Binary files differ
diff --git a/gfx/unknown/d63e0.png b/gfx/stage/colon_color.png
index ef72665..ef72665 100644
--- a/gfx/unknown/d63e0.png
+++ b/gfx/stage/colon_color.png
Binary files differ
diff --git a/gfx/unknown/d61e0.png b/gfx/stage/colon_mono.png
index bebd547..bebd547 100644
--- a/gfx/unknown/d61e0.png
+++ b/gfx/stage/colon_mono.png
Binary files differ
diff --git a/gfx/unknown/d63a0.png b/gfx/stage/exclamation_point_color.png
index fdb2920..fdb2920 100644
--- a/gfx/unknown/d63a0.png
+++ b/gfx/stage/exclamation_point_color.png
Binary files differ
diff --git a/gfx/unknown/d61a0.png b/gfx/stage/exclamation_point_mono.png
index 1ae5327..1ae5327 100644
--- a/gfx/unknown/d61a0.png
+++ b/gfx/stage/exclamation_point_mono.png
Binary files differ
diff --git a/gfx/unknown/d63b0.png b/gfx/stage/period_color.png
index 2b18d63..2b18d63 100644
--- a/gfx/unknown/d63b0.png
+++ b/gfx/stage/period_color.png
Binary files differ
diff --git a/gfx/unknown/d61b0.png b/gfx/stage/period_mono.png
index 4a07793..4a07793 100644
--- a/gfx/unknown/d61b0.png
+++ b/gfx/stage/period_mono.png
Binary files differ
diff --git a/home.asm b/home.asm
index 75de979..054eac7 100644
--- a/home.asm
+++ b/home.asm
@@ -367,9 +367,9 @@ VBlank: ; 0x2f2
.asm_3b5
res 3, [hl]
.asm_3b7
- ld a, [wd4aa]
+ ld a, [wDrawBottomMessageBox]
and a
- call nz, Func_e69
+ call nz, DrawBottomMessageBox
pop hl
pop de
pop bc
@@ -1673,7 +1673,7 @@ ReadJoypad: ; 0xab8
.asm_b1a
ld a, [hJoypadState]
ld [hPreviousJoypadState], a
- ld hl, wd808
+ ld hl, wJoypadStatesPersistent
ld a, [hJoypadState]
or [hl]
ld [hli], a
@@ -1685,8 +1685,8 @@ ReadJoypad: ; 0xab8
ld [hli], a
ret
-Func_b2e: ; 0xb2e
- ld hl, wd808
+ClearPersistentJoypadStates: ; 0xb2e
+ ld hl, wJoypadStatesPersistent
xor a
ld [hli], a
ld [hli], a
@@ -2334,10 +2334,13 @@ Func_e5d: ; 0xe5d
jr nz, .asm_e62
ret
-Func_e69: ; 0xe69
+DrawBottomMessageBox: ; 0xe69
+; Draws the current scrolling bottom message box to VRAM during V-Blank.
+; Note, this only applies to the 1-tile high message bar. When it displays, things like Ball Bonus summary, and
+; the Save/Cancel menu, this is not used to draw the message buffer.
ld a, [rLY]
cp $90
- jr nc, Func_e69
+ jr nc, DrawBottomMessageBox ; ensure we're in V-Blank
.asm_e6f
ld a, [rSTAT]
and $3
@@ -2347,60 +2350,60 @@ Func_e69: ; 0xe69
dec a
jr nz, .asm_e77
ld hl, wBottomMessageBuffer + $40
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c00
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c04
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c08
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c0c
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c10
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
ld hl, wBottomMessageBuffer + $c0
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c20
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c24
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c28
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c2c
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
- call Func_eef
+ call Load4BottomMessageBytes
push hl
ld hl, $9c30
- call Func_ef8
+ call Write4BottomMessageBytes
pop hl
ret
-Func_eef: ; 0xeef
+Load4BottomMessageBytes: ; 0xeef
ld a, [hli]
ld b, a
ld a, [hli]
@@ -2411,10 +2414,10 @@ Func_eef: ; 0xeef
ld e, a
ret
-Func_ef8: ; 0xef8
+Write4BottomMessageBytes: ; 0xef8
ld a, [rSTAT]
and $3
- jr nz, Func_ef8
+ jr nz, Write4BottomMessageBytes
ld a, b
ld [hli], a
ld a, c
@@ -3949,7 +3952,7 @@ Func_1ffc: ; 0x1ffc
call Func_2034
call DoScreenLogic
call CleanOAMBuffer
- call Func_b2e
+ call ClearPersistentJoypadStates
rst AdvanceFrame
jr .master_loop
@@ -4218,7 +4221,7 @@ Sine: ; 0x2149
ApplyGravityToBall: ; 0x2168
; Adds a constant to the pinball's y velocity.
- ld a, [wDisableBallGravityAndTilt]
+ ld a, [wEnableBallGravityAndTilt]
and a
ret z
ld de, $000b ; gravity added to y velocity every frame
@@ -5242,8 +5245,8 @@ HandleLeftTilt: ; 0x358c
lb de, $00, $3f
call PlaySoundEffect
.skipSoundEffect
- ld a, [wd548]
- ld hl, wDisableBallGravityAndTilt
+ ld a, [wPinballIsVisible]
+ ld hl, wEnableBallGravityAndTilt
and [hl]
jr z, .skipBallMovement
ld a, [wBallXPos + 1]
@@ -5298,8 +5301,8 @@ HandleRightTilt: ; 0x35f3
lb de, $00, $3f
call PlaySoundEffect
.skipSoundEffect
- ld a, [wd548]
- ld hl, wDisableBallGravityAndTilt
+ ld a, [wPinballIsVisible]
+ ld hl, wEnableBallGravityAndTilt
and [hl]
jr z, .skipBallMovement
ld a, [wBallXPos + 1]
@@ -5354,8 +5357,8 @@ HandleUpperTilt: ; 0x365a
lb de, $00, $3f
call PlaySoundEffect
.skipSoundEffect
- ld a, [wd548]
- ld hl, wDisableBallGravityAndTilt
+ ld a, [wPinballIsVisible]
+ ld hl, wEnableBallGravityAndTilt
and [hl]
jr z, .skipBallMovement
ld a, [wBallYPos + 1]
@@ -5394,8 +5397,8 @@ HandleUpperTilt: ; 0x365a
ret
ApplyTiltForces: ; 0x36c1
- ld a, [wd548]
- ld hl, wDisableBallGravityAndTilt
+ ld a, [wPinballIsVisible]
+ ld hl, wEnableBallGravityAndTilt
and [hl]
ret z
ld c, $0
diff --git a/home/text.asm b/home/text.asm
index 1901676..ae15c57 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -48,20 +48,20 @@ Func_310a: ; 0x310a
jr nz, .asm_311d
ret
-Func_3125: ; 0x3125
+LoadMonNameIntoBottomMessageBufferList: ; 0x3125 enables special loads
ld b, $1
jr asm_312b
-Func_3129: ; 0x3129
+Func_3129: ; 0x3129 disables special loads
ld b, $0
-asm_312b: ; 0x312b
+asm_312b: ; 0x312b loads e chars of text text into de
ld a, [wd805]
and a
- jp nz, Func_3268
+ jp nz, Func_3268 ;if ??? = 0, then continue, else jump
.next_char
ld a, [hli]
and a
- ret z
+ ret z ;if a = 0, jump
ld c, $81
cp " "
jr z, .space
@@ -98,65 +98,65 @@ asm_312b: ; 0x312b
jr .next_char
.space
- ld a, c
+ ld a, c ;$81 = space
jr .load_char
.comma
- inc c
+ inc c ;$82 = , , goes back a space?
dec e
jr .check_special_load
.male
xor a
- call Func_31e1
+ call LoadSpecialTextChar
ld a, $83
jr .load_char
.female
ld a, $1
- call Func_31e1
+ call LoadSpecialTextChar
ld a, $84
jr .load_char
.apostrophe
ld a, $2
- call Func_31e1
+ call LoadSpecialTextChar
ld a, $85
jr .load_char
.e_acute
ld a, $3
- call Func_31e1
+ call LoadSpecialTextChar
ld a, $83
jr .load_char
.asterisk
ld a, $4
- call Func_31e1
+ call LoadSpecialTextChar
ld a, $87
jr .load_char
.exclamation
ld a, $5
- call Func_31e1
+ call LoadSpecialTextChar
ld a, $85
jr .load_char
.little_x
ld a, $6
- call Func_31e1
+ call LoadSpecialTextChar
ld a, $85
jr .load_char
.period
ld a, $7
- call Func_31e1
+ call LoadSpecialTextChar
ld a, $86
jr .load_char
.colon
ld a, $8
- call Func_31e1
+ call LoadSpecialTextChar
ld a, $83
jr .load_char
@@ -167,19 +167,19 @@ asm_312b: ; 0x312b
.alphabet
add $bf
.load_char
- ld [de], a
+ ld [de], a ;load char into de
.check_special_load
bit 0, b
- jr nz, .no_special_load
- set 7, e
+ jr nz, .no_special_load ;only load special if b is 1
+ set 7, e ;tempererally set 7 of e, adding to pointer de or taking it away
ld a, c
ld [de], a
res 7, e
.no_special_load
- inc e
+ inc e ;move to next slot
jp .next_char
-Func_31e1: ; 0x31e1
+LoadSpecialTextChar: ; 0x31e1 copy special font data into VRAM based on the contents of a
push bc
push de
push hl
@@ -196,7 +196,7 @@ Func_31e1: ; 0x31e1
add c
ld c, a
ld b, $0
- ld hl, Data_320e
+ ld hl, SpecialTextCharPointers ;special text pointers
add hl, bc
ld a, [hli]
ld e, a
@@ -207,51 +207,67 @@ Func_31e1: ; 0x31e1
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, b
+ ld a, b ;bytes taken are, in order, in e,d,a,l,h
ld bc, $0010
- call LoadVRAMData
+ call LoadVRAMData ;copy 16 byte image into VRAM
pop hl
pop de
pop bc
ret
-Data_320e:
- dw vTilesSH tile 3
- dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $40
- dw vTilesSH tile 4
+SpecialTextCharPointers:
+ dw vTilesSH tile 3 ;start of special font data for LoadSpecialTextChar if DMG
+ dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $40 ;bank of data, then pointer to source. each block is 5 bytes - male
+ dw vTilesSH tile 4 ; female
dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $30
- dw vTilesSH tile 5
- dbw Bank(GFX_d61d0), GFX_d61d0
- dw vTilesSH tile 3
+
+ dw vTilesSH tile 5 ;apostrophe
+ dbw Bank(Apostrophe_CharacterGfx), Apostrophe_CharacterGfx
+
+ dw vTilesSH tile 3 ;acute e
dbw Bank(E_Acute_CharacterGfx), E_Acute_CharacterGfx
- dw vTilesSH tile 7
+
+ dw vTilesSH tile 7 ;asterisk
dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $80
- dw vTilesSH tile 5
- dbw Bank(GFX_d61a0), GFX_d61a0
- dw vTilesSH tile 5
+
+ dw vTilesSH tile 5 ;exclaiamation point
+ dbw Bank(Exclamation_Point_CharacterGfx), Exclamation_Point_CharacterGfx
+
+ dw vTilesSH tile 5 ;little x
dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $10
- dw vTilesSH tile 6
- dbw Bank(GFX_d61b0), GFX_d61b0
- dw vTilesSH tile 3
- dbw Bank(GFX_d61e0), GFX_d61e0
- dw vTilesSH tile 3
- dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $40
- dw vTilesSH tile 4
+
+ dw vTilesSH tile 6 ;period
+ dbw Bank(Period_CharacterGfx), Period_CharacterGfx
+
+ dw vTilesSH tile 3 ;colon
+ dbw Bank(Colon_CharacterGfx), Colon_CharacterGfx
+
+ dw vTilesSH tile 3 ;start of special font data for LoadSpecialTextChar if DMG
+ dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $40 ;male
+
+ dw vTilesSH tile 4 ;female
dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $30
- dw vTilesSH tile 5
- dbw Bank(GFX_d63d0), GFX_d63d0
- dw vTilesSH tile 3
+
+ dw vTilesSH tile 5 ;apostrophe
+ dbw Bank(Apostrophe_CharacterGfx_GameboyColor), Apostrophe_CharacterGfx_GameboyColor
+
+ dw vTilesSH tile 3 ;acute e
dbw Bank(E_Acute_CharacterGfx_GameboyColor), E_Acute_CharacterGfx_GameboyColor
- dw vTilesSH tile 7
+
+ dw vTilesSH tile 7 ;asterisk
dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $80
- dw vTilesSH tile 5
- dbw Bank(GFX_d63a0), GFX_d63a0
- dw vTilesSH tile 5
+
+ dw vTilesSH tile 5 ;exclaimation point
+ dbw Bank(Exclamation_Point_CharacterGfx_GameboyColor), Exclamation_Point_CharacterGfx_GameboyColor
+
+ dw vTilesSH tile 5 ;little x
dbw Bank(InGameMenuSymbolsGfx), InGameMenuSymbolsGfx + $10
- dw vTilesSH tile 6
- dbw Bank(GFX_d63b0), GFX_d63b0
- dw vTilesSH tile 3
- dbw Bank(GFX_d63e0), GFX_d63e0
+
+ dw vTilesSH tile 6 ;period
+ dbw Bank(Period_CharacterGfx_GameboyColor), Period_CharacterGfx_GameboyColor
+
+ dw vTilesSH tile 3 ;colon
+ dbw Bank(Colon_CharacterGfx_GameboyColor), Colon_CharacterGfx_GameboyColor
Func_3268: ; 0x3268
ld a, [hli]
diff --git a/main.asm b/main.asm
index 125344d..b548dce 100644
--- a/main.asm
+++ b/main.asm
@@ -223,21 +223,21 @@ PointerTable_10a9b: ; 0x10a9b
padded_dab Func_20bae ; STAGE_BLUE_FIELD_TOP
padded_dab Func_20bae ; STAGE_BLUE_FIELD_BOTTOM
-Func_10ab3: ; 0x10ab3
+StartEvolutionMode: ; 0x10ab3
ld a, [wInSpecialMode]
and a
ret nz
ld a, [wCurrentStage]
rst JumpTable ; calls JumpToFuncInTable
-CallTable_10abc: ; 0x10abc
- dw Func_10ebb ; STAGE_RED_FIELD_TOP
- dw Func_10ebb ; STAGE_RED_FIELD_BOTTOM
- dw Func_11054
- dw Func_11054
- dw Func_11061 ; STAGE_BLUE_FIELD_TOP
- dw Func_11061 ; STAGE_BLUE_FIELD_BOTTOM
-
-Func_10ac8: ; 0x10ac8
+StartEvolutionMode_CallTable: ; 0x10abc
+ dw StartEvolutionMode_RedField ; STAGE_RED_FIELD_TOP
+ dw StartEvolutionMode_RedField ; STAGE_RED_FIELD_BOTTOM
+ dw StartEvolutionMode_UnusedField
+ dw StartEvolutionMode_UnusedField
+ dw StartEvolutionMode_BlueField ; STAGE_BLUE_FIELD_TOP
+ dw StartEvolutionMode_BlueField ; STAGE_BLUE_FIELD_BOTTOM
+
+ConcludeEvolutionMode: ; 0x10ac8
xor a
ld [wd5ca], a
call FillBottomMessageBufferWithBlackTile
@@ -252,13 +252,13 @@ Func_10ac8: ; 0x10ac8
callba StopTimer
ld a, [wCurrentStage]
rst JumpTable ; calls JumpToFuncInTable
-CallTable_10af3: ; 0x10af3
- dw Func_10fe3 ; STAGE_RED_FIELD_TOP
- dw Func_10fe3 ; STAGE_RED_FIELD_BOTTOM
- dw Func_11060
- dw Func_11060
- dw Func_11195 ; STAGE_BLUE_FIELD_TOP
- dw Func_11195 ; STAGE_BLUE_FIELD_TOP
+ConcludeEvolutionMode_CallTable: ; 0x10af3
+ dw ConcludeEvolutionMode_RedField ; STAGE_RED_FIELD_TOP
+ dw ConcludeEvolutionMode_RedField ; STAGE_RED_FIELD_BOTTOM
+ dw DoNothing_11060
+ dw DoNothing_11060
+ dw ConcludeEvolutionMode_BlueField ; STAGE_BLUE_FIELD_TOP
+ dw ConcludeEvolutionMode_BlueField ; STAGE_BLUE_FIELD_TOP
Func_10aff: ; 0x10aff
ld a, [wCurrentStage]
@@ -317,21 +317,22 @@ Func_10b3f: ; 0x10b3f
call LoadTextHeader
ret
-Func_10b59: ; 0x10b59
+InitEvolutionSelectionMenu: ; 0x10b59
+; Initializes the list menu, which the player uses to select which pokemon to evolve.
xor a
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
ld hl, wBottomMessageText
ld a, $81
ld b, $30
-.asm_10b64
- ld [hli], a
+.clearLoop
+ ld [hli], a ; load spaces into bottom text. repeat 192 times
ld [hli], a
ld [hli], a
ld [hli], a
dec b
- jr nz, .asm_10b64
+ jr nz, .clearLoop
ld hl, wPartyMons
- call Func_10b8e
+ call LoadMonNamesIntoEvolutionSelectionList
ld a, BANK(InGameMenuSymbolsGfx)
ld hl, InGameMenuSymbolsGfx + $50
ld de, vTilesSH tile $08
@@ -344,33 +345,38 @@ Func_10b59: ; 0x10b59
call LoadVRAMData
ret
-Func_10b8e: ; 0x10b8e
+LoadMonNamesIntoEvolutionSelectionList: ; 0x10b8e
+; Loads 6 pokemon names into the list that allows the player to select which pokemon to evolve.
+; Input: hl = pointer to a list of pokemon ids. (an offset of wPartyMons)
ld a, [wNumPartyMons]
ld c, $0
ld b, a
-.asm_10b94
+.loop
ld a, [hli]
- call Func_10ba2
+ call LoadMonNameIntoEvolutionSelectionList
inc c
ld a, c
cp $6
- jr z, .asm_10ba1
+ jr z, .done
dec b
- jr nz, .asm_10b94
-.asm_10ba1
+ jr nz, .loop
+.done
ret
-Func_10ba2: ; 0x10ba2
+LoadMonNameIntoEvolutionSelectionList: ; 0x10ba2
+; Loads a single pokemon name into the list of pokemon to evolve.
+; Input: c = index of the list
+; a = pokemon id
push bc
push hl
- swap c
+ swap c ;c* 32, does wird things if c starts >15
sla c
ld b, $0
ld hl, wBottomMessageText
- add hl, bc
+ add hl, bc ;goes down text as many times as new c
ld d, h
ld e, l
- ld c, a
+ ld c, a ;c now equals paerty mon, HL stored in de
ld b, $0
sla c
rl b
@@ -379,8 +385,8 @@ Func_10ba2: ; 0x10ba2
sla c
rl b
sla c
- rl b
- ld hl, PokemonNames
+ rl b ;multiplies party mon by 16, then jumps to correct name in the table
+ ld hl, PokemonNames ;names are 16 chars long
add hl, bc
ld a, $81
ld [de], a
@@ -392,69 +398,72 @@ Func_10ba2: ; 0x10ba2
ld [de], a
inc de
ld a, $81
- ld [de], a
+ ld [de], a ; loaded 4 spaces into de
inc de
- call Func_3125
-.asm_10bda
+ call LoadMonNameIntoBottomMessageBufferList
+.loadBlankCharacterLoop
ld a, e
and $1f
cp $14
- jr nc, .asm_10be7
+ jr nc, .done
ld a, $81
ld [de], a
inc de
- jr .asm_10bda
+ jr .loadBlankCharacterLoop
-.asm_10be7
+.done
pop hl
pop bc
ret
-Func_10bea: ; 0x10bea
+SelectPokemonToEvolveMenu: ; 0x10bea
+; Drivers the menu that allows the player to select a pokemon to evolve.
xor a
ld [wCurSelectedPartyMon], a
ld [wCurSelectedPartyMonScrollOffset], a
ld [wPartySelectionCursorCounter], a
-.asm_10bf4
- call Func_10c0c
- call Func_b2e
- call Func_10c38
+.loop
+ call MoveEvolutionSelectionCursor
+ call ClearPersistentJoypadStates
+ call UpdateEvolutionSelectionList
rst AdvanceFrame
- ld a, [wd809]
- bit 0, a
- jr z, .asm_10bf4
+ ld a, [wNewlyPressedButtonsPersistent]
+ bit BIT_A_BUTTON, a
+ jr z, .loop
lb de, $00, $01
call PlaySoundEffect
ret
-Func_10c0c: ; 0x10c0c
- ld a, [wd80a]
+MoveEvolutionSelectionCursor: ; 0x10c0c
+ ld a, [wPressedButtonsPersistent]
ld b, a
ld a, [wNumPartyMons]
ld c, a
ld a, [wCurSelectedPartyMon]
- bit 6, b
- jr z, .asm_10c28
+ bit BIT_D_UP, b
+ jr z, .didntPressUp
and a
ret z
+ ; move the cursor up
dec a
ld [wCurSelectedPartyMon], a
lb de, $00, $03
call PlaySoundEffect
ret
-.asm_10c28
- bit 7, b
+.didntPressUp
+ bit BIT_D_DOWN, b
ret z
inc a
cp c
ret z
+ ; move the cursor down
ld [wCurSelectedPartyMon], a
lb de, $00, $03
call PlaySoundEffect
ret
-Func_10c38: ; 0x10c38
+UpdateEvolutionSelectionList: ; 0x10c38
ld a, [wCurSelectedPartyMon]
ld hl, wCurSelectedPartyMonScrollOffset
sub [hl]
@@ -476,7 +485,7 @@ Func_10c38: ; 0x10c38
ld b, $0
ld hl, wPartyMons
add hl, bc
- call Func_10b8e
+ call LoadMonNamesIntoEvolutionSelectionList
ld a, [hJoypadState]
and a
ld a, [wPartySelectionCursorCounter]
@@ -519,7 +528,7 @@ Func_10c38: ; 0x10c38
call LoadVRAMData
ret
-Func_10ca5: ; 0x10ca5
+PlaceEvolutionInParty: ; 0x10ca5
ld a, [wCurSelectedPartyMon]
ld c, a
ld b, $0
@@ -531,16 +540,16 @@ Func_10ca5: ; 0x10ca5
ld [hl], a
ret
-Func_10cb7: ; 0x10cb7
+SelectPokemonToEvolve: ; 0x10cb7
call FillBottomMessageBufferWithBlackTile
- call Func_10b59
+ call InitEvolutionSelectionMenu
ld a, $60
ld [hWY], a
dec a
ld [hLYC], a
ld a, $fd
ld [hLCDCMask], a
- call Func_10bea
+ call SelectPokemonToEvolveMenu
ld a, $86
ld [hWY], a
ld a, $83
@@ -550,7 +559,7 @@ Func_10cb7: ; 0x10cb7
ld [hLCDCMask], a
ld a, [hGameBoyColorFlag]
and a
- jr nz, .asm_10cee
+ jr nz, .gameboyColor
ld a, BANK(StageRedFieldTopStatusBarSymbolsGfx_GameBoy)
ld hl, StageRedFieldTopStatusBarSymbolsGfx_GameBoy + $80
ld de, vTilesSH tile $08
@@ -558,7 +567,7 @@ Func_10cb7: ; 0x10cb7
call LoadVRAMData
jr .asm_10cfc
-.asm_10cee
+.gameboyColor
ld a, BANK(StageRedFieldTopStatusBarSymbolsGfx_GameBoyColor)
ld hl, StageRedFieldTopStatusBarSymbolsGfx_GameBoyColor + $80
ld de, vTilesSH tile $08
@@ -567,7 +576,7 @@ Func_10cb7: ; 0x10cb7
.asm_10cfc
call FillBottomMessageBufferWithBlackTile
ld a, SPECIAL_MODE_CATCHEM
- ld [wd4aa], a
+ ld [wDrawBottomMessageBox], a
ld [wInSpecialMode], a
ld [wSpecialMode], a
xor a
@@ -581,7 +590,7 @@ Func_10cb7: ; 0x10cb7
ld [wCurrentCatchEmMon], a
ret
-Func_10d1d: ; 0x10d1d
+InitEvolutionModeForMon: ; 0x10d1d
ld hl, wd586
ld b, $18
.asm_10d22
@@ -809,12 +818,12 @@ Func_10e8b: ; 0x10e8b
call LoadTextHeader
ret
-Func_10ebb: ; 0x10ebb
+StartEvolutionMode_RedField: ; 0x10ebb
ld a, [wNumPartyMons]
and a
ret z
- call Func_10cb7
- call Func_10d1d
+ call SelectPokemonToEvolve
+ call InitEvolutionModeForMon
ld a, [wd555]
sub $2
ld c, a
@@ -826,12 +835,12 @@ Func_10ebb: ; 0x10ebb
ld l, a
ld de, wIndicatorStates
ld b, $13
-.asm_10eda
+.loop
ld a, [hli]
ld [de], a
inc de
dec b
- jr nz, .asm_10eda
+ jr nz, .loop
xor a
ld [wLeftAlleyCount], a
call Func_107b0
@@ -897,8 +906,8 @@ IndicatorStates_10fbd: ; 0x10fbd
IndicatorStates_10fd0: ; 0x10fd0
db $00, $00, $80, $80, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
-Func_10fe3: ; 0x10fe3
- call Func_107a5
+ConcludeEvolutionMode_RedField: ; 0x10fe3
+ call ResetIndicatorStates
call Func_107c2
call Func_107c8
call Func_107e9
@@ -932,23 +941,23 @@ Func_10fe3: ; 0x10fe3
call Func_10aa
ret
-Func_11054: ; 0x11054
+StartEvolutionMode_UnusedField: ; 0x11054
ld a, [wNumPartyMons]
and a
ret z
- call Func_10cb7
- call Func_10d1d
+ call SelectPokemonToEvolve
+ call InitEvolutionModeForMon
ret
-Func_11060: ; 0x11060
+DoNothing_11060: ; 0x11060
ret
-Func_11061: ; 0x11061
+StartEvolutionMode_BlueField: ; 0x11061
ld a, [wNumPartyMons]
and a
ret z
- call Func_10cb7
- call Func_10d1d
+ call SelectPokemonToEvolve
+ call InitEvolutionModeForMon
ld a, $1
ld [wd643], a
ld a, [wd555]
@@ -1033,10 +1042,10 @@ IndicatorStates_1116f: ; 0x1116f
IndicatorStates_11182: ; 0x11182
db $80, $00, $80, $80, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
-Func_11195: ; 0x11195
+ConcludeEvolutionMode_BlueField: ; 0x11195
xor a
ld [wd643], a
- call Func_107a5
+ call ResetIndicatorStates
call Func_107c2
callba Func_1f2ff
ld a, [wCurrentStage]
@@ -1127,6 +1136,7 @@ INCLUDE "data/mon_names.asm"
INCLUDE "data/mon_initial_indicator_states.asm"
Data_1298b: ; 0x1298b
+; This has to do with which indicators will need to be hit to evolve the pokemon.
db $01 ; BULBASAUR
db $02 ; IVYSAUR
db $03 ; VENUSAUR
@@ -1579,7 +1589,7 @@ Func_311b4: ; 0x311b4
ret
Func_31234: ; 0x31234
- callba Func_107a5
+ callba ResetIndicatorStates
callba Func_107c2
callba Func_107c8
callba Func_107e9
@@ -1756,7 +1766,7 @@ Func_31326: ; 0x31326
ret
Func_313c3: ; 0x313c3
- callba Func_107a5
+ callba ResetIndicatorStates
callba Func_107c2
callba Func_1f2ff
ld a, $0
@@ -2218,7 +2228,7 @@ Data_3809a:
Data_380a6:
db $59, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
-
+
RGB 31, 31, 31
RGB 31, 31, 31
RGB 31, 31, 31
@@ -2397,7 +2407,7 @@ INCLUDE "data/mon_gfx/mon_billboard_pics_1.asm"
StageRedFieldTopStatusBarSymbolsGfx_GameBoy: ; 0x63000
INCBIN "gfx/stage/red_top/status_bar_symbols_gameboy.2bpp"
-
+
INCBIN "gfx/unused_pocket_monster.2bpp"
SECTION "bank18.2", ROMX
@@ -2418,7 +2428,7 @@ INCLUDE "data/mon_gfx/mon_billboard_pics_3.asm"
StageBlueFieldTopStatusBarSymbolsGfx_GameBoy: ; 0x6b000
INCBIN "gfx/stage/blue_top/status_bar_symbols_gameboy.2bpp"
-
+
INCBIN "gfx/unused_pocket_monster.2bpp"
ds $20 ; free space
@@ -2636,7 +2646,7 @@ PikachuSaverGfx: ; 0xa8720
BallCaptureSmokeGfx:
INCBIN "gfx/stage/ball_capture_smoke.interleave.2bpp"
-
+
SECTION "bank2a.2", ROMX
PinballGreatballGfx: ; 0xa8a00
@@ -2679,7 +2689,7 @@ PokedexInitialGfx:
StageBlueFieldBottomCollisionMasks: ; 0xaf000
INCBIN "data/collision/masks/blue_stage_bottom.masks"
-
+
SECTION "bank2b.2", ROMX
DiglettBonusDugtrio3Gfx: ; 0xaf900
@@ -2847,7 +2857,7 @@ StageRedFieldBottomTilemap2_GameBoyColor: ; 0xbec00
StageBlueFieldTopTilemap_GameBoy: ; 0xbf000
INCBIN "gfx/tilemaps/stage_blue_field_top_gameboy.map"
-
+
SECTION "bank2f.3", ROMX
EraseAllDataTilemap: ; 0xbf800
@@ -2859,7 +2869,7 @@ SECTION "bank30", ROMX
StageBlueFieldBottomTilemap_GameBoy: ; 0xc0000
INCBIN "gfx/tilemaps/stage_blue_field_bottom_gameboy.map"
-
+
SECTION "bank30.2", ROMX
StageBlueFieldTopCollisionMasks: ; 0xc0800
@@ -2884,7 +2894,7 @@ StageBlueFieldTopCollisionAttributes: ; 0xc2800
OptionMenuTilemap2: ; 0xc3000
INCBIN "gfx/tilemaps/option_menu_2.map"
-
+
SECTION "bank30.3", ROMX
OptionMenuTilemap4: ; 0xc3400
@@ -3073,22 +3083,22 @@ SeelBonusTilemap2_GameBoyColor: ; 0xd5c00
Alphabet1Gfx: ; 0xd6000
INCBIN "gfx/stage/alphabet_1.2bpp"
-GFX_d61a0: INCBIN "gfx/unknown/d61a0.2bpp"
-GFX_d61b0: INCBIN "gfx/unknown/d61b0.2bpp"
+Exclamation_Point_CharacterGfx: INCBIN "gfx/stage/exclamation_point_mono.2bpp" ;DMG excalamation point
+Period_CharacterGfx: INCBIN "gfx/stage/period_mono.2bpp" ;DMG period
E_Acute_CharacterGfx: INCBIN "gfx/stage/e_acute_mono.2bpp"
-GFX_d61d0: INCBIN "gfx/unknown/d61d0.2bpp"
-GFX_d61e0: INCBIN "gfx/unknown/d61e0.2bpp"
-
+Apostrophe_CharacterGfx: INCBIN "gfx/stage/apostrophe_mono.2bpp" ;DMG apostrophe
+Colon_CharacterGfx: INCBIN "gfx/stage/colon_mono.2bpp" ;DMG colon
+
SECTION "bank35.5", ROMX
Alphabet2Gfx: ; 0xd6200
INCBIN "gfx/stage/alphabet_2.2bpp"
-GFX_d63a0: INCBIN "gfx/unknown/d63a0.2bpp"
-GFX_d63b0: INCBIN "gfx/unknown/d63b0.2bpp"
+Exclamation_Point_CharacterGfx_GameboyColor: INCBIN "gfx/stage/exclamation_point_color.2bpp";gbc excalamation point
+Period_CharacterGfx_GameboyColor: INCBIN "gfx/stage/period_color.2bpp" ;gbc period
E_Acute_CharacterGfx_GameboyColor: INCBIN "gfx/stage/e_acute_color.2bpp"
-GFX_d63d0: INCBIN "gfx/unknown/d63d0.2bpp"
-GFX_d63e0: INCBIN "gfx/unknown/d63e0.2bpp"
+Apostrophe_CharacterGfx_GameboyColor: INCBIN "gfx/stage/apostrophe_color.2bpp" ;GBC apostrophe
+Colon_CharacterGfx_GameboyColor: INCBIN "gfx/stage/colon_color.2bpp" ;gbc colon
SECTION "bank35.6", ROMX
@@ -3159,7 +3169,7 @@ INCLUDE "data/mon_gfx/mon_billboard_palette_maps_4.asm"
StageSharedBonusSlotGlowGfx: ; 0xdac00
INCBIN "gfx/stage/shared/bonus_slot_glow.2bpp"
-
+
SECTION "bank36.4", ROMX
StageSharedBonusSlotGlow2Gfx: ; 0xdade0
@@ -3191,7 +3201,7 @@ INCLUDE "data/mon_gfx/mon_billboard_palettes_4.asm"
StageRedFieldTopGfx6: ; 0xdbb80
INCBIN "gfx/stage/red_top/red_top_6.2bpp"
-
+
SECTION "bank36.8", ROMX
StageMewtwoBonusCollisionMasks: ; 0xdbc80
@@ -3210,7 +3220,7 @@ SECTION "bank37", ROMX
StageSharedArrowsGfx: ; 0xdc000
INCBIN "gfx/stage/shared/arrows.2bpp"
-
+
SECTION "bank37.2", ROMX
INCLUDE "data/mon_gfx/mon_billboard_palettes_5.asm"
diff --git a/wram.asm b/wram.asm
index 56dd18e..2b33e5d 100644
--- a/wram.asm
+++ b/wram.asm
@@ -40,7 +40,8 @@ wc4c0:: ; 0xc4c0
wc4cc:: ; 0xc4cc
ds $34
-wBottomMessageText:: ; 0xc500
+wBottomMessageText:: ; 0xc500 WARNING: text loading code may break if this is moved
+; This must be aligned with $100, since there is some logic that depends on the lower byte of the address. (See LoadMonNameIntoEvolutionSelectionList)
ds $100
wBottomMessageBuffer:: ; 0xc600
@@ -212,13 +213,15 @@ wBallSaverTimerFramesBackup:: ; 0xd4a6
wBallSaverTimerSecondsBackup:: ; 0xd4a7
ds $1
-wd4a8:: ; 0xd4a8
+wNumTimesBallSavedTextWillDisplayBackup:: ; 0xd4a8
ds $1
wd4a9:: ; 0xd4a9
ds $1
-wd4aa:: ; 0xd4aa
+wDrawBottomMessageBox:: ; 0xd4aa
+; Set to non-zero value if enable drawing the 1-tile high bottom message bar during V-Blank in normal pinball gameplay.
+; Set to 0 to disable.
ds $1
wd4ab:: ; 0xd4ab
@@ -529,12 +532,15 @@ wRightAlleyCount:: ; 0xd545
wSecondaryLeftAlleyTrigger:: ; 0xd546
ds $2
-wd548:: ; 0xd548
+wPinballIsVisible:: ; 0xd548
+; Set to 1 if the pinball is visible in play.
+; Set to 0 when the pinball disappears in things like the Slot, Slowpoke, Cloyster, Bellsprout, etc.
+; When it's set to 0, it disables tilt effects on the pinball.
ds $1
-wDisableBallGravityAndTilt:: ; 0xd549
-; Set to 1 to disable any affect gravity or tilt has on the pinball.
-; Used for things likes the initial pinball launch or to hold the ball stationary.
+wEnableBallGravityAndTilt:: ; 0xd549
+; Set to 1 to enable the effect of gravity and tilt on the pinball.
+; 0 disables these forces. Used for things likes the initial pinball launch or to hold the ball stationary.
ds $1
wCurrentMap:: ; 0xd54a
@@ -1814,14 +1820,17 @@ wd806:: ; 0xd806
wd807:: ; 0xd807
ds $1
-wd808:: ; 0xd808
+; These three bytes track different joypad states cummulatively, until they are manually cleared.
+; They inherit from their similarly-named counterparts found in hram.asm. (See ReadJoyPad)
+wJoypadStatesPersistent:: ; 0xd808
+wJoypadStatePersistent::
ds $1
-
-wd809:: ; 0xd809
+wNewlyPressedButtonsPersistent:: ; 0xd809
+ ds $1
+wPressedButtonsPersistent:: ; 0xd80a
ds $1
-wd80a:: ; 0xd80a
- ds $2
+ ds $1 ; unused byte
wBGP:: ; 0xd80c
ds $1