summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2017-07-08 17:48:39 -0700
committerMarcus Huderle <huderlem@gmail.com>2017-07-08 17:48:39 -0700
commit7c97dcbc6c8fc8aeeabb9629bc98af05a4d8e8de (patch)
treeba29ae51782379261fc7329fa7c5c8499be90c35 /engine
parent519111415056983f3955bc8847283e675dc61280 (diff)
parent75f8a8fdeb7b85c649d954aee6d0ed6bb3e90232 (diff)
Merge branch 'chaos_requests'
Diffstat (limited to 'engine')
-rw-r--r--engine/pinball_game.asm4
-rw-r--r--engine/pinball_game/ball_loss/ball_loss_diglett_bonus.asm2
-rw-r--r--engine/pinball_game/ball_loss/ball_loss_gengar_bonus.asm2
-rw-r--r--engine/pinball_game/ball_loss/ball_loss_meowth_bonus.asm2
-rw-r--r--engine/pinball_game/ball_loss/ball_loss_mewtwo_bonus.asm2
-rw-r--r--engine/pinball_game/ball_loss/ball_loss_seel_bonus.asm2
-rw-r--r--engine/pinball_game/catchem_mode.asm68
-rw-r--r--engine/pinball_game/end_of_ball_bonus.asm78
-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.asm10
-rw-r--r--engine/pinball_game/extra_ball.asm6
-rw-r--r--engine/pinball_game/object_collision/blue_stage_resolve_collision.asm10
-rw-r--r--engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm2
-rw-r--r--engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm2
-rw-r--r--engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm2
-rw-r--r--engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm2
-rw-r--r--engine/pinball_game/object_collision/red_stage_resolve_collision.asm10
-rw-r--r--engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm2
-rw-r--r--engine/pinball_game/score.asm16
-rw-r--r--engine/pinball_game/slot.asm6
20 files changed, 119 insertions, 119 deletions
diff --git a/engine/pinball_game.asm b/engine/pinball_game.asm
index 766f900..0229035 100644
--- a/engine/pinball_game.asm
+++ b/engine/pinball_game.asm
@@ -150,7 +150,7 @@ GameScreenFunction_HandleBallPhysics: ; 0xd909
and a
jr nz, .asm_d9e9
callba Func_85c7
- callba Func_8650
+ callba HideScoreIfBallLow
callba Func_8645
call Func_dba9
call Func_dc7c
@@ -206,7 +206,7 @@ GameScreenFunction_HandleBallLoss: ; 0xda36
ld [wDrawBottomMessageBox], a
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, ShootAgainText
call LoadTextHeader
ret
diff --git a/engine/pinball_game/ball_loss/ball_loss_diglett_bonus.asm b/engine/pinball_game/ball_loss/ball_loss_diglett_bonus.asm
index 2771d00..e0c1094 100644
--- a/engine/pinball_game/ball_loss/ball_loss_diglett_bonus.asm
+++ b/engine/pinball_game/ball_loss/ball_loss_diglett_bonus.asm
@@ -18,7 +18,7 @@ HandleBallLossDiglettBonus: ; 0xe056
ret nz
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, EndDiglettStageText
call LoadTextHeader
ret
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 c2cff1f..c80e0c5 100644
--- a/engine/pinball_game/ball_loss/ball_loss_gengar_bonus.asm
+++ b/engine/pinball_game/ball_loss/ball_loss_gengar_bonus.asm
@@ -44,7 +44,7 @@ HandleBallLossGengarBonus: ; 0xdf1a
ret nz
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, EndGengarStageText
call LoadTextHeader
ret
diff --git a/engine/pinball_game/ball_loss/ball_loss_meowth_bonus.asm b/engine/pinball_game/ball_loss/ball_loss_meowth_bonus.asm
index ae24dd3..52eb582 100644
--- a/engine/pinball_game/ball_loss/ball_loss_meowth_bonus.asm
+++ b/engine/pinball_game/ball_loss/ball_loss_meowth_bonus.asm
@@ -51,7 +51,7 @@ HandleBallLossMeowthBonus: ; 0xdfe2
ret nz
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, EndMeowthStageText
call LoadTextHeader
ret
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 4cafb02..f8921b1 100644
--- a/engine/pinball_game/ball_loss/ball_loss_mewtwo_bonus.asm
+++ b/engine/pinball_game/ball_loss/ball_loss_mewtwo_bonus.asm
@@ -44,7 +44,7 @@ HandleBallLossMewtwoBonus: ; 0xdf7e
ret nz
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, EndMewtwoStageText
call LoadTextHeader
ret
diff --git a/engine/pinball_game/ball_loss/ball_loss_seel_bonus.asm b/engine/pinball_game/ball_loss/ball_loss_seel_bonus.asm
index a5204d4..a3c829e 100644
--- a/engine/pinball_game/ball_loss/ball_loss_seel_bonus.asm
+++ b/engine/pinball_game/ball_loss/ball_loss_seel_bonus.asm
@@ -50,7 +50,7 @@ HandleBallLossSeelBonus: ; 0xe08b
ret nz
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, EndSeelStageText
call LoadTextHeader
ret
diff --git a/engine/pinball_game/catchem_mode.asm b/engine/pinball_game/catchem_mode.asm
index 62dde4b..879b5b0 100644
--- a/engine/pinball_game/catchem_mode.asm
+++ b/engine/pinball_game/catchem_mode.asm
@@ -6,35 +6,35 @@ StartCatchEmMode: ; 0x1003f
ld [wInSpecialMode], a ; set special mode flag
xor a
ld [wSpecialMode], a
- ld [wd54d], a
+ ld [wd54d], a ;set ??? to 0
ld a, [wCurrentStage]
sla a
- ld c, a
+ ld c, a ;store twice current stage to use a pointer offset
ld b, $0
push bc
ld hl, WildMonOffsetsPointers
add hl, bc
- ld a, [hli]
+ ld a, [hli] ;hl = pointer to wild mon pointer table
ld h, [hl]
ld l, a
ld a, [wCurrentMap]
sla a
ld c, a
- add hl, bc
+ add hl, bc ;go to correct location in table
ld a, [hli]
ld c, a
ld a, [hl]
- ld b, a
- pop de
+ ld b, a ;bc = offset needed to reach correct wild table
+ pop de ;pop current stage offset
ld hl, WildMonPointers
add hl, de
- ld a, [hli]
+ ld a, [hli] ;fetch start od correct wilds table, place in hl
ld h, [hl]
ld l, a
add hl, bc
call GenRandom
and $f
- call CheckForMew
+ call CheckForMew ;a = $10 if mew, else is less
ld c, a
ld b, $0
add hl, bc
@@ -42,20 +42,20 @@ StartCatchEmMode: ; 0x1003f
sla a
ld c, a
add hl, bc
- ld a, [hl] ; a contains mon id
+ ld a, [hl] ; a contains mon id. overshoots by 1 if mew, causing mew to be loaded
dec a
- ld [wCurrentCatchEmMon], a
- ld a, [wCurrentCatchEmMon]
+ ld [wCurrentCatchEmMon], a ;stores 1 less than ID
+ ld a, [wCurrentCatchEmMon] ;wow gamefreak
ld c, a
ld b, $0
- ld hl, EvolutionLineIds
+ ld hl, EvolutionLineIds ;fetch the mon's evolution line
add hl, bc
ld c, [hl]
ld h, b
ld l, c
add hl, bc
- add hl, bc ; multiply the evolution line id by 3
- ld bc, Data_13685
+ add hl, bc ; multiply the evolution line id by 3, add it to pointer to ???
+ ld bc, Data_13685 ;mystery data
add hl, bc
ld a, [hli]
ld [wd5c1], a
@@ -63,25 +63,25 @@ StartCatchEmMode: ; 0x1003f
ld a, [hli]
ld [wd5c2], a
ld a, [hli]
- ld [wd5c3], a
+ ld [wd5c3], a ;load the 3 bytes into ????
ld hl, wd586
ld a, [wd5b6]
ld c, a
and a
ld b, $18
- jr z, .asm_100c7
+ jr z, .asm_100c7 ;if ?? = 0, jump with b = 24 (2 seperate loops?
.asm_100ba
ld a, $1
- ld [hli], a
+ ld [hli], a ;load 1 then 0 into data from wd5b6 C times, where C is the contents of wd5b6
xor a
ld [hli], a
dec b
dec c
jr nz, .asm_100ba
- ld a, b
+ ld a, b ;load 24 - times looped into a, if 0: skip
and a
jr z, .asm_100ce
-.asm_100c7
+.asm_100c7 ;loop 0 then 1 into the rest of the data from wd5b6
xor a
ld [hli], a
inc a
@@ -94,12 +94,12 @@ StartCatchEmMode: ; 0x1003f
ld b, $0
sla c
rl b
- ld hl, CatchEmTimerData
+ ld hl, CatchEmTimerData ;contains how long each mon stays on screen, all are 2 minutes by default
add hl, bc
ld a, [hli]
ld c, a
ld a, [hl]
- ld b, a
+ ld b, a ;bc = timer legnth. b = secons c = minutes
callba StartTimer
callba InitBallSaverForCatchEmMode
call Func_10696
@@ -136,27 +136,27 @@ CheckForMew:
; 3. The right alley has been hit three times
; 4. The Mewtwo Bonus Stage completion counter equals 2.
push af
- cp $f ; random number equals $f
- jr nz, .asm_10155
+ cp $f ; random number equals $f (1 in 16)
+ jr nz, .NotMew
ld a, c
cp (BlueStageIndigoPlateauWildMons - BlueStageWildMons) & $ff ; check if low-byte of map mons offset is Indigo Plateau
- jr nz, .asm_10155
+ jr nz, .NotMew
ld a, b
cp (BlueStageIndigoPlateauWildMons - BlueStageWildMons) >> 8 ; check if high-byte of map mons offset is Indigo Plateau
- jr nz, .asm_10155
+ jr nz, .NotMew
ld a, [wRareMonsFlag]
cp $8
- jr nz, .asm_10155
+ jr nz, .NotMew
ld a, [wNumMewtwoBonusCompletions]
cp NUM_MEWTWO_COMPLETIONS_FOR_MEW
- jr nz, .asm_10155
+ jr nz, .NotMew
pop af
xor a
ld [wNumMewtwoBonusCompletions], a
ld a, $10
ret
-.asm_10155
+.NotMew
pop af
ret
@@ -930,7 +930,7 @@ ShowAnimatedWildMon: ; 0x10678
Func_10696: ; 0x10696
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, LetsGetPokemonText
call LoadTextHeader
ret
@@ -938,7 +938,7 @@ Func_10696: ; 0x10696
Func_106a6: ; 0x106a6
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, PokemonRanAwayText
call LoadTextHeader
ret
@@ -979,10 +979,10 @@ Func_106b6: ; 0x106b6
push de
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
pop de
call LoadTextHeader
- ld hl, wd5d4
+ ld hl, wScrollingTextStruct2
pop de
call LoadTextHeader
pop hl
@@ -1178,10 +1178,10 @@ Func_10848: ; 0x10848
callba AddBigBCD6FromQueue
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5d4
+ ld hl, wScrollingTextStruct2
ld de, OneBillionText
call LoadTextHeader
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, PokemonCaughtSpecialBonusText
call LoadTextHeader
call Func_3475
diff --git a/engine/pinball_game/end_of_ball_bonus.asm b/engine/pinball_game/end_of_ball_bonus.asm
index c2750db..5d312ef 100644
--- a/engine/pinball_game/end_of_ball_bonus.asm
+++ b/engine/pinball_game/end_of_ball_bonus.asm
@@ -61,10 +61,10 @@ Func_f57f: ; 0xf57f
ShowBallBonusSummary: ; 0xf5a0
ld de, wBottomMessageText + $40
ld hl, BonusPointsText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld de, wBottomMessageText + $80
ld hl, SubtotalPointsText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wd489
call ClearBCD6Buffer
ld hl, wd48f
@@ -90,7 +90,7 @@ ShowBallBonusSummary: ; 0xf5a0
call Func_f81b
ld de, wBottomMessageText + $20
ld hl, GameOverText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld bc, $0040
ld de, $0000
call Func_f80d
@@ -121,7 +121,7 @@ CallTable_f60d: ; 0xf60d
HandleNumPokemonCaughtBallBonus: ; 0xf626
ld de, wBottomMessageText + $01
ld hl, NumPokemonCaughtText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $01
ld a, [wNumPokemonCaughtInBallBonus]
call Func_f78e
@@ -137,7 +137,7 @@ HandleNumPokemonCaughtBallBonus: ; 0xf626
HandleNumPokemonEvolvedBallBonus: ; 0xf64e
ld de, wBottomMessageText
ld hl, NumPokemonEvolvedText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText
ld a, [wNumPokemonEvolvedInBallBonus]
call Func_f78e
@@ -176,10 +176,10 @@ Func_f676: ; 0xf676
jr nz, .asm_f678
ld de, wBottomMessageText + $40
ld hl, MultiplierPointsText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld de, wBottomMessageText + $80
ld hl, TotalPointsText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $50
ld a, [wCurBonusMultiplier]
call Func_f78e
@@ -249,7 +249,7 @@ Func_f70d: ; 0xf70d
jr nz, .asm_f70f
ld de, wBottomMessageText + $60
ld hl, ScoreText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wScore + $5
ld de, wBottomMessageText + $66
call Func_f8bd
@@ -308,43 +308,43 @@ Func_f78e: ; 0xf78e
ld c, $0
ret
-PrintTextNoHeader: ; 0xf7b1
- ld a, [wd805]
+PlaceTextAlphanumericOnly: ; 0xf7b1 seems to filter out punctuation and other misc characters
+ ld a, [wd805] ;id unusedTextFlag is set, take olther path
and a
- jr nz, .asm_f7e0
+ jr nz, .UnusedBranch
.loop
ld a, [hli]
and a
- ret z
+ ret z ;if end of text, ret
cp "0"
- jr c, .asm_f7c6
+ jr c, .NotADigit ;if a digit, add $56 and skip letter check
cp "9" + 1
- jr nc, .asm_f7c6
+ jr nc, .NotADigit
add $56
- jr .asm_f7dc
+ jr .IsValidChar
-.asm_f7c6
+.NotADigit
cp "A"
- jr c, .asm_f7d2
+ jr c, .NotALetter ;if a letter, add $56 and skip letter check
cp "Z" + 1
- jr nc, .asm_f7d2
+ jr nc, .NotALetter
add $bf
- jr .asm_f7dc
+ jr .IsValidChar
-.asm_f7d2
- cp "e"
- jr nz, .asm_f7da
+.NotALetter
+ cp "e" ;check if acute e
+ jr nz, .NotAcuteE
ld a, $83
- jr .asm_f7dc
+ jr .IsValidChar
-.asm_f7da
- ld a, $81
-.asm_f7dc
- ld [de], a
+.NotAcuteE
+ ld a, $81 ;if none of the above groups, replace with a space
+.IsValidChar
+ ld [de], a ;load result into de
inc de
jr .loop
-.asm_f7e0
+.UnusedBranch
ld a, [hli]
and a
ret z
@@ -376,7 +376,7 @@ PrintTextNoHeader: ; 0xf7b1
.asm_f809
ld [de], a
inc de
- jr .asm_f7e0
+ jr .UnusedBranch
Func_f80d: ; 0xf80d
hlCoord 0, 0, vBGWin
@@ -590,7 +590,7 @@ HandleBallBonusRedField: ; 0xf945
HandleBellsproutEntriesBallBonus: ; 0xf952
ld de, wBottomMessageText + $03
ld hl, BellsproutCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $03
ld a, [wNumBellsproutEntries]
call Func_f78e
@@ -606,7 +606,7 @@ HandleBellsproutEntriesBallBonus: ; 0xf952
HandleDugtrioTriplesBallBonus: ; 0xf97a
ld de, wBottomMessageText + $04
ld hl, DugtrioCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $04
ld a, [wNumDugtrioTriples]
call Func_f78e
@@ -622,7 +622,7 @@ HandleDugtrioTriplesBallBonus: ; 0xf97a
HandleCAVECompletionsBallBonus_RedField: ; 0xf9a2
ld de, wBottomMessageText + $03
ld hl, CaveShotCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $03
ld a, [wNumCAVECompletions]
call Func_f78e
@@ -638,7 +638,7 @@ HandleCAVECompletionsBallBonus_RedField: ; 0xf9a2
HandleSpinnerTurnsBallBonus_RedField: ; 0xf9ca
ld de, wBottomMessageText + $01
ld hl, SpinnerTurnsCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $01
ld a, [wNumSpinnerTurns]
call Func_f78e
@@ -666,7 +666,7 @@ HandleBallBonusBlueField: ; 0xf9f3
HandleCloysterEntriesBallBonus: ; 0xfa06
ld de, wBottomMessageText + $04
ld hl, CloysterCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $04
ld a, [wNumCloysterEntries]
call Func_f78e
@@ -682,7 +682,7 @@ HandleCloysterEntriesBallBonus: ; 0xfa06
HandleSlowpokeEntriesBallBonus: ; 0xfa2e
ld de, wBottomMessageText + $04
ld hl, SlowpokeCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $04
ld a, [wNumSlowpokeEntries]
call Func_f78e
@@ -698,7 +698,7 @@ HandleSlowpokeEntriesBallBonus: ; 0xfa2e
HandlePoliwagTriplesBallBonus: ; 0xfa56
ld de, wBottomMessageText + $04
ld hl, PoliwagCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $04
ld a, [wNumPoliwagTriples]
call Func_f78e
@@ -714,7 +714,7 @@ HandlePoliwagTriplesBallBonus: ; 0xfa56
HandlePsyduckTriplesBallBonus: ; 0xfa7e
ld de, wBottomMessageText + $04
ld hl, PsyduckCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $04
ld a, [wNumPsyduckTriples]
call Func_f78e
@@ -730,7 +730,7 @@ HandlePsyduckTriplesBallBonus: ; 0xfa7e
HandleCAVECompletionsBallBonus_BlueField: ; 0xfaa6
ld de, wBottomMessageText + $03
ld hl, CaveShotCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $03
ld a, [wNumCAVECompletions]
call Func_f78e
@@ -746,7 +746,7 @@ HandleCAVECompletionsBallBonus_BlueField: ; 0xfaa6
HandleSpinnerTurnsBallBonus_BlueField: ; 0xface :)
ld de, wBottomMessageText + $01
ld hl, SpinnerTurnsCounterText
- call PrintTextNoHeader
+ call PlaceTextAlphanumericOnly
ld hl, wBottomMessageText + $01
ld a, [wNumSpinnerTurns]
call Func_f78e
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 a1af8f5..f0523d8 100644
--- a/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm
+++ b/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm
@@ -72,7 +72,7 @@ Func_20c08: ; 0x20c08
call FillBottomMessageBufferWithBlackTile
call Func_30db
ld de, YeahYouGotItText
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
call LoadTextHeader
ld a, [hGameBoyColorFlag]
and a
@@ -257,7 +257,7 @@ Func_20da0: ; 0x20da0
callba StopTimer
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, EvolutionFailedText
call LoadTextHeader
ret
@@ -494,7 +494,7 @@ Func_20f75: ; 0x20f75
ld e, a
ld a, [hl]
ld d, a
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
call LoadTextHeader
scf
ret
@@ -527,7 +527,7 @@ Func_20fef: ; 0x20fef
callba AddBigBCD6FromQueue
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld a, [wCurrentEvolutionType]
cp EVO_EXPERIENCE
ld de, PokemonIsTiredText
@@ -631,7 +631,7 @@ asm_210c7:
jr z, .asm_21115
ld de, TryNextPlaceText
.asm_21115
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
call LoadTextHeader
scf
ret
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 a1149c1..fed675f 100644
--- a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm
+++ b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm
@@ -75,7 +75,7 @@ Func_205e0: ; 0x205e0
call FillBottomMessageBufferWithBlackTile
call Func_30db
ld de, YeahYouGotItText
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
call LoadTextHeader
ld a, [hGameBoyColorFlag]
and a
@@ -260,7 +260,7 @@ Func_2077b: ; 0x2077b
callba StopTimer
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, EvolutionFailedText
call LoadTextHeader
ret
@@ -517,7 +517,7 @@ Func_20977: ; 0x20977
ld e, a
ld a, [hl]
ld d, a
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
call LoadTextHeader
scf
ret
@@ -549,7 +549,7 @@ Func_209eb: ; 0x209eb
callba AddBigBCD6FromQueue
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld a, [wCurrentEvolutionType]
cp EVO_EXPERIENCE
ld de, PokemonIsTiredText
@@ -633,7 +633,7 @@ asm_20a9f:
jr z, .asm_20aed
ld de, TryNextPlaceText
.asm_20aed
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
call LoadTextHeader
scf
ret
diff --git a/engine/pinball_game/extra_ball.asm b/engine/pinball_game/extra_ball.asm
index babec0a..becdd78 100644
--- a/engine/pinball_game/extra_ball.asm
+++ b/engine/pinball_game/extra_ball.asm
@@ -10,7 +10,7 @@ HandleExtraBall: ; 0x30188
jr nz, .asm_301a7
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, ExtraBallText
call LoadTextHeader
jr .asm_301c9
@@ -22,12 +22,12 @@ HandleExtraBall: ; 0x30188
push de
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5d4
+ ld hl, wScrollingTextStruct2
ld de, DigitsText1to9
call Func_32cc
pop de
pop bc
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, ExtraBallSpecialBonusText
call LoadTextHeader
.asm_301c9
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 7b79312..f33cd7a 100644
--- a/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm
@@ -1340,7 +1340,7 @@ ShowBonusMultiplierMessage_BlueField: ; 0x1d5bf
ld [wd613], a
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, BonusMultiplierText
call LoadTextHeader
ld hl, wBottomMessageText + $12
@@ -2081,7 +2081,7 @@ ResolveBlueStagePinballUpgradeTriggersCollision: ; 0x1e356
call PlaySoundEffect
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, FieldMultiplierText
call LoadTextHeader
ld a, [wBallType]
@@ -2106,12 +2106,12 @@ ResolveBlueStagePinballUpgradeTriggersCollision: ; 0x1e356
push de
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5d4
+ ld hl, wScrollingTextStruct2
ld de, DigitsText1to8
call Func_32cc
pop de
pop bc
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, FieldMultiplierSpecialBonusText
call LoadTextHeader
.asm_1e465
@@ -2896,7 +2896,7 @@ Func_1e830: ; 0x1e830
Func_1e8c3: ; 0x1e8c3
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld a, [wd497]
ld de, GoToMeowthStageText
cp STAGE_MEOWTH_BONUS
diff --git a/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm b/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm
index 303cbe7..3255deb 100644
--- a/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm
@@ -677,7 +677,7 @@ Func_1ab30: ; 0x1ab30
ld [wCompletedBonusStage], a
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, DiglettStageClearedText
call LoadTextHeader
lb de, $4b, $2a
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 c73bacf..daf3c5c 100644
--- a/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm
@@ -1005,7 +1005,7 @@ Func_189af: ; 0x189af
ld [wCompletedBonusStage], a
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, GengarStageClearedText
call LoadTextHeader
lb de, $4b, $2a
diff --git a/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm b/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm
index 9aa3d36..a8284f2 100644
--- a/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm
@@ -202,7 +202,7 @@ ResolveMeowthBonusGameObjectCollisions: ; 0x2442a
ld [wCompletedBonusStage], a
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, MeowthStageClearedText
call LoadTextHeader
lb de, $4b, $2a
diff --git a/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm b/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm
index 1717126..eb47047 100644
--- a/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm
@@ -351,7 +351,7 @@ Func_19638: ; 0x19638
ld [wCompletedBonusStage], a
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
.asm_1966b
ld de, MewtwoStageClearedText
call LoadTextHeader
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 12da6fa..f9726f6 100644
--- a/engine/pinball_game/object_collision/red_stage_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/red_stage_resolve_collision.asm
@@ -1141,7 +1141,7 @@ ResolveRedStagePinballUpgradeTriggersCollision: ; 0x1535d
call FillBottomMessageBufferWithBlackTile
call Func_30db
ld de, FieldMultiplierText
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
call LoadTextHeader
ld a, [wBallType]
ld c, a
@@ -1165,12 +1165,12 @@ ResolveRedStagePinballUpgradeTriggersCollision: ; 0x1535d
push de
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5d4
+ ld hl, wScrollingTextStruct2
ld de, DigitsText1to8
call Func_32cc
pop de
pop bc
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, FieldMultiplierSpecialBonusText
call LoadTextHeader
.asm_15447
@@ -3612,7 +3612,7 @@ Func_16352: ; 0x16352
Func_163f2: ; 0x163f2
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld a, [wd497]
ld de, GoToDiglettStageText
cp STAGE_DIGLETT_BONUS
@@ -5596,7 +5596,7 @@ ShowBonusMultiplierMessage_RedField: ; 0x16ef5
ld [wd613], a
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, BonusMultiplierText
call LoadTextHeader
ld hl, wBottomMessageText + $12
diff --git a/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm b/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm
index 81861a4..48dbde4 100644
--- a/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm
+++ b/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm
@@ -15,7 +15,7 @@ ResolveSeelBonusGameObjectCollisions: ; 0x25c5a
ld [wCompletedBonusStage], a
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5dc
+ ld hl, wScrollingTextStruct3
ld de, SeelStageClearedText
call LoadTextHeader
ld a, $2
diff --git a/engine/pinball_game/score.asm b/engine/pinball_game/score.asm
index 4134833..4cd4695 100644
--- a/engine/pinball_game/score.asm
+++ b/engine/pinball_game/score.asm
@@ -214,10 +214,10 @@ Func_8645: ; 0x8645
call Func_8524
ret
-Func_8650: ; 0x8650
+HideScoreIfBallLow: ; 0x8650
ld a, [wCurrentStage]
bit 0, a
- jr nz, .bottomStage
+ jr nz, .bottomStage ;if on upper stage, score is up
ld a, $86
ld [hWY], a
ret
@@ -225,22 +225,22 @@ Func_8650: ; 0x8650
.bottomStage
ld a, [wBallYPos + 1]
cp $84
- jr nc, .asm_8670
+ jr nc, .BallLow ;if ballY pos less than or equal to 132, raise score, else lower score
ld a, [hWY]
sub $3
cp $86
- jr nc, .asm_866d
+ jr nc, .DontClampHigh ;if result is less than 132, clamp to 132, else just load it in
ld a, $86
-.asm_866d
+.DontClampHigh
ld [hWY], a
ret
-.asm_8670
+.BallLow
ld a, [hWY]
add $3
cp $90
- jr c, .asm_867a
+ jr c, .DontClampLow ;if result is more than 144, clamp to 144, else just load it in
ld a, $90
-.asm_867a
+.DontClampLow
ld [hWY], a
ret
diff --git a/engine/pinball_game/slot.asm b/engine/pinball_game/slot.asm
index e130b7a..ab84c61 100644
--- a/engine/pinball_game/slot.asm
+++ b/engine/pinball_game/slot.asm
@@ -369,7 +369,7 @@ SlotRewardUpgradeBall: ; 0xf040
call FillBottomMessageBufferWithBlackTile
call Func_30db
ld de, FieldMultiplierText
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
call LoadTextHeader
; upgrade ball type
ld a, [wBallType]
@@ -394,12 +394,12 @@ SlotRewardUpgradeBall: ; 0xf040
push de
call FillBottomMessageBufferWithBlackTile
call Func_30db
- ld hl, wd5d4
+ ld hl, wScrollingTextStruct2
ld de, DigitsText1to8
call Func_32cc
pop de
pop bc
- ld hl, wd5cc
+ ld hl, wScrollingTextStruct1
ld de, FieldMultiplierSpecialBonusText
call LoadTextHeader
.asm_f0b0