From 2f7383f03d9e7368d744690be93e811a052d0d42 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 8 Jul 2017 18:34:44 -0700 Subject: Cleanup scrolling text labels. Use macro for the wram locations. Move text.asm -> text/scrolling_text.asm --- engine/pinball_game.asm | 4 +- .../ball_loss/ball_loss_diglett_bonus.asm | 4 +- .../ball_loss/ball_loss_gengar_bonus.asm | 4 +- .../ball_loss/ball_loss_meowth_bonus.asm | 4 +- .../ball_loss/ball_loss_mewtwo_bonus.asm | 4 +- .../ball_loss/ball_loss_seel_bonus.asm | 4 +- engine/pinball_game/catchem_mode.asm | 32 +- .../evolution_mode/evolution_mode_blue_field.asm | 20 +- .../evolution_mode/evolution_mode_red_field.asm | 20 +- engine/pinball_game/extra_ball.asm | 10 +- .../blue_stage_resolve_collision.asm | 18 +- .../diglett_bonus_resolve_collision.asm | 4 +- .../gengar_bonus_resolve_collision.asm | 4 +- .../meowth_bonus_resolve_collision.asm | 4 +- .../mewtwo_bonus_resolve_collision.asm | 4 +- .../red_stage_resolve_collision.asm | 18 +- .../seel_bonus_resolve_collision.asm | 4 +- engine/pinball_game/slot.asm | 10 +- home.asm | 1 - home/text.asm | 30 +- main.asm | 46 +-- text.asm | 399 --------------------- text/scrolling_text.asm | 399 +++++++++++++++++++++ wram.asm | 38 +- 24 files changed, 540 insertions(+), 545 deletions(-) delete mode 100644 text.asm create mode 100644 text/scrolling_text.asm diff --git a/engine/pinball_game.asm b/engine/pinball_game.asm index 0229035..c0da4a9 100644 --- a/engine/pinball_game.asm +++ b/engine/pinball_game.asm @@ -206,9 +206,9 @@ GameScreenFunction_HandleBallLoss: ; 0xda36 ld [wDrawBottomMessageBox], a call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, ShootAgainText - call LoadTextHeader + call LoadScrollingText ret .asm_daa9 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 e0c1094..2dd8117 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, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, EndDiglettStageText - call LoadTextHeader + call LoadScrollingText 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 c80e0c5..59a40da 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, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, EndGengarStageText - call LoadTextHeader + call LoadScrollingText 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 52eb582..f80e758 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, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, EndMeowthStageText - call LoadTextHeader + call LoadScrollingText 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 f8921b1..2cd165e 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, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, EndMewtwoStageText - call LoadTextHeader + call LoadScrollingText 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 a3c829e..0c86084 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, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, EndSeelStageText - call LoadTextHeader + call LoadScrollingText ret diff --git a/engine/pinball_game/catchem_mode.asm b/engine/pinball_game/catchem_mode.asm index 879b5b0..095a877 100644 --- a/engine/pinball_game/catchem_mode.asm +++ b/engine/pinball_game/catchem_mode.asm @@ -930,17 +930,17 @@ ShowAnimatedWildMon: ; 0x10678 Func_10696: ; 0x10696 call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, LetsGetPokemonText - call LoadTextHeader + call LoadScrollingText ret Func_106a6: ; 0x106a6 call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, PokemonRanAwayText - call LoadTextHeader + call LoadScrollingText ret Func_106b6: ; 0x106b6 @@ -979,12 +979,12 @@ Func_106b6: ; 0x106b6 push de call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 pop de - call LoadTextHeader - ld hl, wScrollingTextStruct2 + call LoadScrollingText + ld hl, wScrollingText2 pop de - call LoadTextHeader + call LoadScrollingText pop hl ld de, wBottomMessageText + $20 ld b, $0 ; count the number of letters in mon's name in register b @@ -1003,16 +1003,16 @@ Func_106b6: ; 0x106b6 inc de xor a ld [de], a - ld a, [wd5db] + ld a, [wScrollingText2ScrollStepsRemaining] add b - ld [wd5db], a + ld [wScrollingText2ScrollStepsRemaining], a ld a, $14 sub b srl a ld b, a - ld a, [wd5d8] + ld a, [wScrollingText2StopOffset] add b - ld [wd5d8], a + ld [wScrollingText2StopOffset], a ret Func_10732: ; 0x10732 @@ -1178,12 +1178,12 @@ Func_10848: ; 0x10848 callba AddBigBCD6FromQueue call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct2 + ld hl, wScrollingText2 ld de, OneBillionText - call LoadTextHeader - ld hl, wScrollingTextStruct1 + call LoadScrollingText + ld hl, wScrollingText1 ld de, PokemonCaughtSpecialBonusText - call LoadTextHeader + call LoadScrollingText call Func_3475 ret 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 f0523d8..efdbe83 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_blue_field.asm @@ -72,8 +72,8 @@ Func_20c08: ; 0x20c08 call FillBottomMessageBufferWithBlackTile call Func_30db ld de, YeahYouGotItText - ld hl, wScrollingTextStruct1 - call LoadTextHeader + ld hl, wScrollingText1 + call LoadScrollingText ld a, [hGameBoyColorFlag] and a jr z, .asm_20c74 @@ -257,9 +257,9 @@ Func_20da0: ; 0x20da0 callba StopTimer call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, EvolutionFailedText - call LoadTextHeader + call LoadScrollingText ret Func_20e34: ; 0x20e34 @@ -494,8 +494,8 @@ Func_20f75: ; 0x20f75 ld e, a ld a, [hl] ld d, a - ld hl, wScrollingTextStruct1 - call LoadTextHeader + ld hl, wScrollingText1 + call LoadScrollingText scf ret @@ -527,14 +527,14 @@ Func_20fef: ; 0x20fef callba AddBigBCD6FromQueue call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld a, [wCurrentEvolutionType] cp EVO_EXPERIENCE ld de, PokemonIsTiredText jr z, .asm_21057 ld de, ItemNotFoundText .asm_21057 - call LoadTextHeader + call LoadScrollingText scf ret @@ -631,8 +631,8 @@ asm_210c7: jr z, .asm_21115 ld de, TryNextPlaceText .asm_21115 - ld hl, wScrollingTextStruct1 - call LoadTextHeader + ld hl, wScrollingText1 + call LoadScrollingText 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 fed675f..384e958 100644 --- a/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm +++ b/engine/pinball_game/evolution_mode/evolution_mode_red_field.asm @@ -75,8 +75,8 @@ Func_205e0: ; 0x205e0 call FillBottomMessageBufferWithBlackTile call Func_30db ld de, YeahYouGotItText - ld hl, wScrollingTextStruct1 - call LoadTextHeader + ld hl, wScrollingText1 + call LoadScrollingText ld a, [hGameBoyColorFlag] and a jr z, .asm_2064f @@ -260,9 +260,9 @@ Func_2077b: ; 0x2077b callba StopTimer call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, EvolutionFailedText - call LoadTextHeader + call LoadScrollingText ret Func_2080f: ; 0x2080f @@ -517,8 +517,8 @@ Func_20977: ; 0x20977 ld e, a ld a, [hl] ld d, a - ld hl, wScrollingTextStruct1 - call LoadTextHeader + ld hl, wScrollingText1 + call LoadScrollingText scf ret @@ -549,14 +549,14 @@ Func_209eb: ; 0x209eb callba AddBigBCD6FromQueue call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld a, [wCurrentEvolutionType] cp EVO_EXPERIENCE ld de, PokemonIsTiredText jr z, .asm_20a50 ld de, ItemNotFoundText .asm_20a50 - call LoadTextHeader + call LoadScrollingText scf ret @@ -633,8 +633,8 @@ asm_20a9f: jr z, .asm_20aed ld de, TryNextPlaceText .asm_20aed - ld hl, wScrollingTextStruct1 - call LoadTextHeader + ld hl, wScrollingText1 + call LoadScrollingText scf ret diff --git a/engine/pinball_game/extra_ball.asm b/engine/pinball_game/extra_ball.asm index becdd78..2436763 100644 --- a/engine/pinball_game/extra_ball.asm +++ b/engine/pinball_game/extra_ball.asm @@ -10,9 +10,9 @@ HandleExtraBall: ; 0x30188 jr nz, .asm_301a7 call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, ExtraBallText - call LoadTextHeader + call LoadScrollingText jr .asm_301c9 .asm_301a7 @@ -22,14 +22,14 @@ HandleExtraBall: ; 0x30188 push de call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct2 + ld hl, wScrollingText2 ld de, DigitsText1to9 call Func_32cc pop de pop bc - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, ExtraBallSpecialBonusText - call LoadTextHeader + call LoadScrollingText .asm_301c9 xor a ld [wd4ca], a 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 f33cd7a..9941acb 100644 --- a/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm +++ b/engine/pinball_game/object_collision/blue_stage_resolve_collision.asm @@ -1340,9 +1340,9 @@ ShowBonusMultiplierMessage_BlueField: ; 0x1d5bf ld [wd613], a call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, BonusMultiplierText - call LoadTextHeader + call LoadScrollingText ld hl, wBottomMessageText + $12 ld a, [wd614] and $7f @@ -2081,9 +2081,9 @@ ResolveBlueStagePinballUpgradeTriggersCollision: ; 0x1e356 call PlaySoundEffect call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, FieldMultiplierText - call LoadTextHeader + call LoadScrollingText ld a, [wBallType] ld c, a ld b, $0 @@ -2106,14 +2106,14 @@ ResolveBlueStagePinballUpgradeTriggersCollision: ; 0x1e356 push de call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct2 + ld hl, wScrollingText2 ld de, DigitsText1to8 call Func_32cc pop de pop bc - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, FieldMultiplierSpecialBonusText - call LoadTextHeader + call LoadScrollingText .asm_1e465 callba TransitionPinballUpgrade jr asm_1e475 @@ -2896,7 +2896,7 @@ Func_1e830: ; 0x1e830 Func_1e8c3: ; 0x1e8c3 call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 ld a, [wd497] ld de, GoToMeowthStageText cp STAGE_MEOWTH_BONUS @@ -2906,7 +2906,7 @@ Func_1e8c3: ; 0x1e8c3 jr z, .loadText ld de, GoToMewtwoStageText .loadText - call LoadTextHeader + call LoadScrollingText ld de, $0000 call PlaySong rst AdvanceFrame 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 3255deb..05cb568 100644 --- a/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/diglett_bonus_resolve_collision.asm @@ -677,9 +677,9 @@ Func_1ab30: ; 0x1ab30 ld [wCompletedBonusStage], a call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, DiglettStageClearedText - call LoadTextHeader + call LoadScrollingText lb de, $4b, $2a call PlaySoundEffect ld a, $1 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 daf3c5c..dca326b 100644 --- a/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/gengar_bonus_resolve_collision.asm @@ -1005,9 +1005,9 @@ Func_189af: ; 0x189af ld [wCompletedBonusStage], a call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, GengarStageClearedText - call LoadTextHeader + call LoadScrollingText lb de, $4b, $2a call PlaySoundEffect ret 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 a8284f2..78b01a0 100644 --- a/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/meowth_bonus_resolve_collision.asm @@ -202,9 +202,9 @@ ResolveMeowthBonusGameObjectCollisions: ; 0x2442a ld [wCompletedBonusStage], a call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, MeowthStageClearedText - call LoadTextHeader + call LoadScrollingText lb de, $4b, $2a call PlaySoundEffect .asm_24498 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 eb47047..cce8f6f 100644 --- a/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/mewtwo_bonus_resolve_collision.asm @@ -351,10 +351,10 @@ Func_19638: ; 0x19638 ld [wCompletedBonusStage], a call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 .asm_1966b ld de, MewtwoStageClearedText - call LoadTextHeader + call LoadScrollingText lb de, $4b, $2a call PlaySoundEffect ret diff --git a/engine/pinball_game/object_collision/red_stage_resolve_collision.asm b/engine/pinball_game/object_collision/red_stage_resolve_collision.asm index f9726f6..80dd824 100644 --- a/engine/pinball_game/object_collision/red_stage_resolve_collision.asm +++ b/engine/pinball_game/object_collision/red_stage_resolve_collision.asm @@ -1141,8 +1141,8 @@ ResolveRedStagePinballUpgradeTriggersCollision: ; 0x1535d call FillBottomMessageBufferWithBlackTile call Func_30db ld de, FieldMultiplierText - ld hl, wScrollingTextStruct1 - call LoadTextHeader + ld hl, wScrollingText1 + call LoadScrollingText ld a, [wBallType] ld c, a ld b, $0 @@ -1165,14 +1165,14 @@ ResolveRedStagePinballUpgradeTriggersCollision: ; 0x1535d push de call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct2 + ld hl, wScrollingText2 ld de, DigitsText1to8 call Func_32cc pop de pop bc - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, FieldMultiplierSpecialBonusText - call LoadTextHeader + call LoadScrollingText .asm_15447 call TransitionPinballUpgrade jr Func_15450 @@ -3612,7 +3612,7 @@ Func_16352: ; 0x16352 Func_163f2: ; 0x163f2 call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 ld a, [wd497] ld de, GoToDiglettStageText cp STAGE_DIGLETT_BONUS @@ -3622,7 +3622,7 @@ Func_163f2: ; 0x163f2 jr z, .asm_1640f ld de, GoToMewtwoStageText .asm_1640f - call LoadTextHeader + call LoadScrollingText ld de, $0000 call PlaySong rst AdvanceFrame @@ -5596,9 +5596,9 @@ ShowBonusMultiplierMessage_RedField: ; 0x16ef5 ld [wd613], a call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, BonusMultiplierText - call LoadTextHeader + call LoadScrollingText ld hl, wBottomMessageText + $12 ld a, [wd614] and $7f 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 48dbde4..8d68591 100644 --- a/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm +++ b/engine/pinball_game/object_collision/seel_bonus_resolve_collision.asm @@ -15,9 +15,9 @@ ResolveSeelBonusGameObjectCollisions: ; 0x25c5a ld [wCompletedBonusStage], a call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 ld de, SeelStageClearedText - call LoadTextHeader + call LoadScrollingText ld a, $2 ld [wd794], a lb de, $4b, $2a diff --git a/engine/pinball_game/slot.asm b/engine/pinball_game/slot.asm index ab84c61..5acb4b1 100644 --- a/engine/pinball_game/slot.asm +++ b/engine/pinball_game/slot.asm @@ -369,8 +369,8 @@ SlotRewardUpgradeBall: ; 0xf040 call FillBottomMessageBufferWithBlackTile call Func_30db ld de, FieldMultiplierText - ld hl, wScrollingTextStruct1 - call LoadTextHeader + ld hl, wScrollingText1 + call LoadScrollingText ; upgrade ball type ld a, [wBallType] ld c, a @@ -394,14 +394,14 @@ SlotRewardUpgradeBall: ; 0xf040 push de call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct2 + ld hl, wScrollingText2 ld de, DigitsText1to8 call Func_32cc pop de pop bc - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, FieldMultiplierSpecialBonusText - call LoadTextHeader + call LoadScrollingText .asm_f0b0 callba Func_155bb ret diff --git a/home.asm b/home.asm index d98bf5e..fb199a5 100644 --- a/home.asm +++ b/home.asm @@ -5111,7 +5111,6 @@ UpdateAnimation: ; 0x28a9 pop de ret -INCLUDE "text.asm" INCLUDE "home/text.asm" Func_3500: diff --git a/home/text.asm b/home/text.asm index 7c67278..a78e2a1 100644 --- a/home/text.asm +++ b/home/text.asm @@ -1,3 +1,5 @@ +INCLUDE "text/scrolling_text.asm" + Func_30db: ; 0x30db ld a, $86 ld [hWY], a ;force text bar up @@ -18,9 +20,9 @@ FillBottomMessageBufferWithBlackTile: ; 0x30e8 dec b jr nz, .loop xor a - ld [wScrollingTextStruct1], a - ld [wScrollingTextStruct2], a - ld [wScrollingTextStruct3], a + ld [wScrollingText1Enabled], a + ld [wScrollingText2Enabled], a + ld [wScrollingText3Enabled], a ld [wd5e4], a ld [wd5e9], a ld [wd5ee], a @@ -324,18 +326,18 @@ UnusedPlaceString: ; 0x3268 seems to place text based on different, confusing lo inc e jr UnusedPlaceString -LoadTextHeader: ; 0x32aa +LoadScrollingText: ; 0x32aa ; Loads scrolling text into the specified buffer. ; Scrolling text appears in a black bar at the bottom of the screen during pinball gameplay. -; Input: de = pointer to scrolling text -; hl = pointer to text header buffer -; Text Header Format: +; Input: de = pointer to scrolling text data +; hl = pointer to scrolling text header (See wScrollingText1) +; Scrolling text Header Format: ; Byte 1: Step delay (in frames) ; Byte 2: Starting wBottomMessageBuffer offset (wBottomMessageBuffer + $40 = left-most tile) ; Byte 3: Stopping wBottomMessageBuffer offset (stops scrolling in the middle of the screen) ; Byte 4: Number of steps to pause ; Byte 5: Text offset in wBottomMessageText -; Byte 6: Total number of steps in the entire scolling animation +; Byte 6: Total number of steps in the entire scrolling animation ; Remaining Bytes: Raw text to load ld a, $1 ld [hli], a @@ -619,29 +621,29 @@ Func_33e3: ; 0x33e3 .asm_33ed ld c, $0 - ld a, [wScrollingTextStruct1] + ld a, [wScrollingText1Enabled] and a jr z, .asm_33fe ;if ?? is 0 push bc ;store b and 0 - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 call HandleScrolling pop bc inc c .asm_33fe - ld a, [wScrollingTextStruct2] + ld a, [wScrollingText2Enabled] and a jr z, .asm_340d push bc - ld hl, wScrollingTextStruct2 + ld hl, wScrollingText2 call HandleScrolling pop bc inc c .asm_340d - ld a, [wScrollingTextStruct3] + ld a, [wScrollingText3Enabled] and a jr z, .asm_341c push bc - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 call HandleScrolling pop bc inc c diff --git a/main.asm b/main.asm index 31a39eb..a2d5c61 100644 --- a/main.asm +++ b/main.asm @@ -118,9 +118,9 @@ Func_dc6d: ; 0xdc6d push de call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct3 + ld hl, wScrollingText3 pop de - call LoadTextHeader + call LoadScrollingText ret Func_dc7c: ; 0xdc7c @@ -307,14 +307,14 @@ VideoData_10b2a: ; 0x10b2a Func_10b3f: ; 0x10b3f call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld a, [wCurrentEvolutionType] cp EVO_EXPERIENCE ld de, StartTrainingText jr z, .asm_10b55 ld de, FindItemsText .asm_10b55 - call LoadTextHeader + call LoadScrollingText ret InitEvolutionSelectionMenu: ; 0x10b59 @@ -763,12 +763,12 @@ Func_10e0a: ; 0x10e0a push de call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 pop de - call LoadTextHeader - ld hl, wScrollingTextStruct2 + call LoadScrollingText + ld hl, wScrollingText2 pop de - call LoadTextHeader + call LoadScrollingText pop hl ld de, wBottomMessageText + $20 ld b, $0 @@ -787,16 +787,16 @@ Func_10e0a: ; 0x10e0a inc de xor a ld [de], a - ld a, [wd5db] + ld a, [wScrollingText2ScrollStepsRemaining] add b - ld [wd5db], a + ld [wScrollingText2ScrollStepsRemaining], a ld a, $14 sub b srl a ld b, a - ld a, [wd5d8] + ld a, [wScrollingText2StopOffset] add b - ld [wd5d8], a + ld [wScrollingText2StopOffset], a ret Func_10e8b: ; 0x10e8b @@ -808,14 +808,14 @@ Func_10e8b: ; 0x10e8b push de call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct2 + ld hl, wScrollingText2 ld de, Data_2b6b call Func_32cc pop de pop bc - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, EvolutionSpecialBonusText - call LoadTextHeader + call LoadScrollingText ret StartEvolutionMode_RedField: ; 0x10ebb @@ -1534,11 +1534,11 @@ LoadScrollingMapNameText: ; 0x3118f ld e, a ld a, [hli] ld d, a - ld hl, wScrollingTextStruct2 - call LoadTextHeader + ld hl, wScrollingText2 + call LoadScrollingText pop de - ld hl, wScrollingTextStruct1 - call LoadTextHeader + ld hl, wScrollingText1 + call LoadScrollingText ret Func_311b4: ; 0x311b4 @@ -1970,9 +1970,9 @@ Func_3151f: ; 0x3151f callba StopTimer call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, MapMoveFailedText - call LoadTextHeader + call LoadScrollingText ret Func_31591: ; 0x31591 @@ -2124,9 +2124,9 @@ Func_3168c: ; 0x3168c callba StopTimer call FillBottomMessageBufferWithBlackTile call Func_30db - ld hl, wScrollingTextStruct1 + ld hl, wScrollingText1 ld de, MapMoveFailedText - call LoadTextHeader + call LoadScrollingText ret Func_31708: ; 0x31708 diff --git a/text.asm b/text.asm deleted file mode 100644 index beb7903..0000000 --- a/text.asm +++ /dev/null @@ -1,399 +0,0 @@ -; 6-byte header for scrolling text. See LoadTextHeader for documentation. - -BallSavedText: - db $05, $54, $45, $14, $00, $33 - db "BALL SAVED @" - -ShootAgainText: - db $05, $54, $44, $14, $00, $34 - db "SHOOT AGAIN @" - -EndOfBallBonusText: - db $05, $54, $41, $14, $00, $3a - db "END OF BALL BONUS @" - -FieldMultiplierText: - db $05, $54, $40, $14, $00, $3c - db "FIELD MULTIPLIER x0 @" - -FieldMultiplierSpecialBonusText: - db $07, $54, $00, $00, $00, $33 - db "FIELD MULTIPLIER SPECIAL BONUS @" - -DigitsText1to8: - db $07, $73, $46, $14, $20, $50 - db "12345678 @" - -BonusMultiplierText: - db $05, $54, $40, $14, $00, $3d - db "BONUS MULTIPLIER x0 @" - -ExtraBallText: - db $05, $54, $45, $14, $00, $33 - db "EXTRA BALL @" - -ExtraBallSpecialBonusText: - db $07, $54, $00, $00, $00, $2d - db "EXTRA BALL SPECIAL BONUS @" - -DigitsText1to9: - db $07, $6d, $45, $14, $20, $4b - db "123456789 @" - -LetsGetPokemonText: - db $05, $54, $41, $14, $00, $3a - db "LET`S GET POKeMON @" - -PokemonRanAwayText: - db $05, $54, $42, $14, $00, $39 - db "POKeMON RAN AWAY @" - -PokemonCaughtSpecialBonusText: - db $07, $54, $00, $00, $00, $31 - db "POKeMON CAUGHT SPECIAL BONUS @" - -OneBillionText: - db $07, $6e, $45, $14, $20, $50 - db "1,000,000,000 @" - -HitText: - db $44, $00, $40, $00 - db "HIT @" - -Data_2a2a: - db $48, $10, $40, $00, $00, $00 - -FlippedText: - db $42, $00, $40, $00 - db "FLIPPED @" - -Data_2a3d: - db $4a, $10, $40, $00, $00, $00 - -JackpotText: - db $42, $00, $b4, $00 - db "JACKPOT @" - -Data_2a50: - db $4a, $10, $b4, $00, $00, $00 - -YouGotAText: - db $05, $54, $00, $00, $00, $1e - db "YOU GOT A @" - -YouGotAnText: - db $05, $54, $00, $00, $00, $1f - db "YOU GOT AN @" - -Data_2a79: - db $05, $5e, $40, $14, $20, $43 - db " @" - -Data_2a91: - db $05, $5f, $40, $14, $20, $44 - db " @" - -StartTrainingText: - db $05, $54, $43, $14, $00, $37 - db "START TRAINING @" - -FindItemsText: - db $05, $54, $45, $14, $00, $33 - db "FIND ITEMS @" - -EvolutionFailedText: - db $05, $54, $42, $14, $00, $39 - db "EVOLUTION FAILED @" - -ItEvolvedIntoAText: - db $05, $54, $00, $00, $00, $26 - db "IT EVOLVED INTO A @" - -ItEvolvedIntoAnText: - db $05, $54, $00, $00, $00, $27 - db "IT EVOLVED INTO AN @" - -Data_2b1c: - db $05, $66, $40, $14, $20, $4b - db " @" - -Data_2b34: - db $05, $67, $40, $14, $20, $4c - db " @" - -EvolutionSpecialBonusText: - db $07, $54, $00, $00, $00, $2c - db "EVOLUTION SPECIAL BONUS @" - -Data_2b6b: - db $07, $6c, $46, $14, $20, $49 - db "12345678 @" - -PokemonIsTiredText: - db $05, $54, $42, $14, $00, $39 - db "POKeMON IS TIRED @" - -ItemNotFoundText: - db $05, $54, $43, $14, $00, $37 - db "ITEM NOT FOUND @" - -PokemonRecoveredText: - db $05, $54, $41, $14, $00, $3a - db "POKeMON RECOVERED @" - -TryNextPlaceText: - db $05, $54, $43, $14, $00, $37 - db "TRY NEXT PLACE @" - -YeahYouGotItText: - db $05, $54, $42, $14, $00, $39 - db "YEAH! YOU GOT IT @" - -EvolutionTypeGetTextPointers: - dw GetThunderStoneText - dw GetMoonStoneText - dw GetFireStoneText - dw GetLeafStoneText - dw GetWaterStoneText - dw GetLinkCableText - dw GetExperienceText - -GetExperienceText: - db $05, $54, $43, $14, $00, $37 - db "GET EXPERIENCE @" - -GetFireStoneText: - db $05, $54, $42, $14, $00, $39 - db "GET A FIRE STONE @" - -GetWaterStoneText: - db $05, $54, $41, $14, $00, $3a - db "GET A WATER STONE @" - -GetThunderStoneText: - db $05, $54, $40, $14, $00, $3c - db "GET A THUNDER STONE @" - -GetLeafStoneText: - db $05, $54, $42, $14, $00, $39 - db "GET A LEAF STONE @" - -GetMoonStoneText: - db $05, $54, $42, $14, $00, $39 - db "GET A MOON STONE @" - -GetLinkCableText: - db $05, $54, $42, $14, $00, $39 - db "GET A LINK CABLE @" - -MapMoveFailedText: - db $05, $54, $42, $14, $00, $38 - db "MAP MOVE FAILED @" - -ArrivedAtMapText: - db $05, $54, $00, $00, $00, $1f - db "ARRIVED AT @" - -StartFromMapText: - db $05, $54, $00, $00, $00, $1f - db "START FROM @" - -MapNames: - dw PalletTownText - dw ViridianCityText - dw ViridianForestText - dw PewterCityText - dw MtMoonText - dw CeruleanCityText - dw VermilionSeasideText - dw VermilionStreetsText - dw RockMountainText - dw LavenderTownText - dw CeladonCityText - dw CyclingRoadText - dw FuchiaCityText ; mispelling -- should be fuchsia - dw SafariZoneText - dw SaffronCityText - dw SeafoamIslandsText - dw CinnabarIslandText - dw IndigoPlateauText - -PalletTownText: - db $05, $5f, $44, $14, $20, $3f - db "PALLET TOWN @" - -ViridianCityText: - db $05, $5f, $43, $14, $20, $41 - db "VIRIDIAN CITY @" - -ViridianForestText: - db $05, $5f, $42, $14, $20, $43 - db "VIRIDIAN FOREST @" - -PewterCityText: - db $05, $5f, $44, $14, $20, $3f - db "PEWTER CITY @" - -MtMoonText: - db $05, $5f, $46, $14, $20, $3b - db "MT.MOON @" - -CeruleanCityText: - db $05, $5f, $43, $14, $20, $41 - db "CERULEAN CITY @" - -VermilionSeasideText: - db $05, $5f, $40, $14, $20, $47 - db "VERMILION : SEASIDE @" - -VermilionStreetsText: - db $05, $5f, $40, $14, $20, $47 - db "VERMILION : STREETS @" - -RockMountainText: - db $05, $5f, $43, $14, $20, $41 - db "ROCK MOUNTAIN @" - -LavenderTownText: - db $05, $5f, $43, $14, $20, $41 - db "LAVENDER TOWN @" - -CeladonCityText: - db $05, $5f, $44, $14, $20, $40 - db "CELADON CITY @" - -CyclingRoadText: - db $05, $5f, $44, $14, $20, $40 - db "CYCLING ROAD @" - -FuchiaCityText: - db $05, $5f, $44, $14, $20, $3f - db "FUCHIA CITY @" ; mispelling -- should be fuchsia - -SafariZoneText: - db $05, $5f, $44, $14, $20, $3f - db "SAFARI ZONE @" - -SaffronCityText: - db $05, $5f, $44, $14, $20, $40 - db "SAFFRON CITY @" - -SeafoamIslandsText: - db $05, $5f, $42, $14, $20, $43 - db "SEAFOAM ISLANDS @" - -CinnabarIslandText: - db $05, $5f, $42, $14, $20, $43 - db "CINNABAR ISLAND @" - -IndigoPlateauText: - db $05, $5f, $43, $14, $20, $42 - db "INDIGO PLATEAU @" - -GoToDiglettStageText: - db $05, $54, $40, $14, $00, $3c - db "GO TO DIGLETT STAGE @" - -GoToGengarStageText: - db $05, $54, $41, $14, $00, $3b - db "GO TO GENGAR STAGE @" - -GoToMewtwoStageText: - db $05, $54, $41, $14, $00, $3b - db "GO TO MEWTWO STAGE @" - -GoToMeowthStageText: - db $05, $54, $41, $14, $00, $3b - db "GO TO MEOWTH STAGE @" - -GoToSeelStageText: - db $05, $54, $42, $14, $00, $39 - db "GO TO SEEL STAGE @" - -EndGengarStageText: - db $05, $54, $42, $14, $00, $39 - db "END GENGAR STAGE @" - -EndMewtwoStageText: - db $05, $54, $42, $14, $00, $39 - db "END MEWTWO STAGE @" - -EndDiglettStageText: - db $05, $54, $41, $14, $00, $3a - db "END DIGLETT STAGE @" - -EndMeowthStageText: - db $05, $54, $42, $14, $00, $39 - db "END MEOWTH STAGE @" - -EndSeelStageText: - db $05, $54, $43, $14, $00, $37 - db "END SEEL STAGE @" - -GengarStageClearedText: - db $05, $54, $40, $14, $00, $3d - db "GENGAR STAGE CLEARED @" - -MewtwoStageClearedText: - db $05, $54, $40, $14, $00, $3d - db "MEWTWO STAGE CLEARED @" - -DiglettStageClearedText: - db $05, $54, $3f, $14, $00, $3e - db "DIGLETT STAGE CLEARED @" - -MeowthStageClearedText: - db $05, $54, $40, $14, $00, $3d - db "MEOWTH STAGE CLEARED @" - -SeelStageClearedText: - db $05, $54, $41, $14, $00, $3b - db "SEEL STAGE CLEARED @" - -NumPokemonCaughtText: - db " 0 POKeMON CAUGHT@" - -NumPokemonEvolvedText: - db " 0 POKeMON EVOLVED@" - -BellsproutCounterText: - db " 0 BELLSPROUT@" - -DugtrioCounterText: - db " 0 DUGTRIO@" - -CaveShotCounterText: - db " 0 CAVE SHOTS@" - -SpinnerTurnsCounterText: - db " 0 SPINNER TURNS@" - -BonusPointsText: - db " BONUS@" - -SubtotalPointsText: - db " SUBTOTAL@" - -MultiplierPointsText: - db " MULTIPLIER@" - -TotalPointsText: - db " TOTAL@" - -ScoreText: - db " SCORE@" - -GameOverText: - db " GAME OVER @" - -PsyduckCounterText: - db " 0 PSYDUCK@" - -PoliwagCounterText: - db " 0 POLIWAG@" - -CloysterCounterText: - db " 0 CLOYSTER@" - -SlowpokeCounterText: - db " 0 SLOWPOKE@" diff --git a/text/scrolling_text.asm b/text/scrolling_text.asm new file mode 100644 index 0000000..c749343 --- /dev/null +++ b/text/scrolling_text.asm @@ -0,0 +1,399 @@ +; 6-byte header for scrolling text in the bottom message box. See LoadScrollingText, and wScrollingText1 for documentation. + +BallSavedText: + db $05, $54, $45, $14, $00, $33 + db "BALL SAVED @" + +ShootAgainText: + db $05, $54, $44, $14, $00, $34 + db "SHOOT AGAIN @" + +EndOfBallBonusText: + db $05, $54, $41, $14, $00, $3a + db "END OF BALL BONUS @" + +FieldMultiplierText: + db $05, $54, $40, $14, $00, $3c + db "FIELD MULTIPLIER x0 @" + +FieldMultiplierSpecialBonusText: + db $07, $54, $00, $00, $00, $33 + db "FIELD MULTIPLIER SPECIAL BONUS @" + +DigitsText1to8: + db $07, $73, $46, $14, $20, $50 + db "12345678 @" + +BonusMultiplierText: + db $05, $54, $40, $14, $00, $3d + db "BONUS MULTIPLIER x0 @" + +ExtraBallText: + db $05, $54, $45, $14, $00, $33 + db "EXTRA BALL @" + +ExtraBallSpecialBonusText: + db $07, $54, $00, $00, $00, $2d + db "EXTRA BALL SPECIAL BONUS @" + +DigitsText1to9: + db $07, $6d, $45, $14, $20, $4b + db "123456789 @" + +LetsGetPokemonText: + db $05, $54, $41, $14, $00, $3a + db "LET`S GET POKeMON @" + +PokemonRanAwayText: + db $05, $54, $42, $14, $00, $39 + db "POKeMON RAN AWAY @" + +PokemonCaughtSpecialBonusText: + db $07, $54, $00, $00, $00, $31 + db "POKeMON CAUGHT SPECIAL BONUS @" + +OneBillionText: + db $07, $6e, $45, $14, $20, $50 + db "1,000,000,000 @" + +HitText: + db $44, $00, $40, $00 + db "HIT @" + +Data_2a2a: + db $48, $10, $40, $00, $00, $00 + +FlippedText: + db $42, $00, $40, $00 + db "FLIPPED @" + +Data_2a3d: + db $4a, $10, $40, $00, $00, $00 + +JackpotText: + db $42, $00, $b4, $00 + db "JACKPOT @" + +Data_2a50: + db $4a, $10, $b4, $00, $00, $00 + +YouGotAText: + db $05, $54, $00, $00, $00, $1e + db "YOU GOT A @" + +YouGotAnText: + db $05, $54, $00, $00, $00, $1f + db "YOU GOT AN @" + +Data_2a79: + db $05, $5e, $40, $14, $20, $43 + db " @" + +Data_2a91: + db $05, $5f, $40, $14, $20, $44 + db " @" + +StartTrainingText: + db $05, $54, $43, $14, $00, $37 + db "START TRAINING @" + +FindItemsText: + db $05, $54, $45, $14, $00, $33 + db "FIND ITEMS @" + +EvolutionFailedText: + db $05, $54, $42, $14, $00, $39 + db "EVOLUTION FAILED @" + +ItEvolvedIntoAText: + db $05, $54, $00, $00, $00, $26 + db "IT EVOLVED INTO A @" + +ItEvolvedIntoAnText: + db $05, $54, $00, $00, $00, $27 + db "IT EVOLVED INTO AN @" + +Data_2b1c: + db $05, $66, $40, $14, $20, $4b + db " @" + +Data_2b34: + db $05, $67, $40, $14, $20, $4c + db " @" + +EvolutionSpecialBonusText: + db $07, $54, $00, $00, $00, $2c + db "EVOLUTION SPECIAL BONUS @" + +Data_2b6b: + db $07, $6c, $46, $14, $20, $49 + db "12345678 @" + +PokemonIsTiredText: + db $05, $54, $42, $14, $00, $39 + db "POKeMON IS TIRED @" + +ItemNotFoundText: + db $05, $54, $43, $14, $00, $37 + db "ITEM NOT FOUND @" + +PokemonRecoveredText: + db $05, $54, $41, $14, $00, $3a + db "POKeMON RECOVERED @" + +TryNextPlaceText: + db $05, $54, $43, $14, $00, $37 + db "TRY NEXT PLACE @" + +YeahYouGotItText: + db $05, $54, $42, $14, $00, $39 + db "YEAH! YOU GOT IT @" + +EvolutionTypeGetTextPointers: + dw GetThunderStoneText + dw GetMoonStoneText + dw GetFireStoneText + dw GetLeafStoneText + dw GetWaterStoneText + dw GetLinkCableText + dw GetExperienceText + +GetExperienceText: + db $05, $54, $43, $14, $00, $37 + db "GET EXPERIENCE @" + +GetFireStoneText: + db $05, $54, $42, $14, $00, $39 + db "GET A FIRE STONE @" + +GetWaterStoneText: + db $05, $54, $41, $14, $00, $3a + db "GET A WATER STONE @" + +GetThunderStoneText: + db $05, $54, $40, $14, $00, $3c + db "GET A THUNDER STONE @" + +GetLeafStoneText: + db $05, $54, $42, $14, $00, $39 + db "GET A LEAF STONE @" + +GetMoonStoneText: + db $05, $54, $42, $14, $00, $39 + db "GET A MOON STONE @" + +GetLinkCableText: + db $05, $54, $42, $14, $00, $39 + db "GET A LINK CABLE @" + +MapMoveFailedText: + db $05, $54, $42, $14, $00, $38 + db "MAP MOVE FAILED @" + +ArrivedAtMapText: + db $05, $54, $00, $00, $00, $1f + db "ARRIVED AT @" + +StartFromMapText: + db $05, $54, $00, $00, $00, $1f + db "START FROM @" + +MapNames: + dw PalletTownText + dw ViridianCityText + dw ViridianForestText + dw PewterCityText + dw MtMoonText + dw CeruleanCityText + dw VermilionSeasideText + dw VermilionStreetsText + dw RockMountainText + dw LavenderTownText + dw CeladonCityText + dw CyclingRoadText + dw FuchiaCityText ; mispelling -- should be fuchsia + dw SafariZoneText + dw SaffronCityText + dw SeafoamIslandsText + dw CinnabarIslandText + dw IndigoPlateauText + +PalletTownText: + db $05, $5f, $44, $14, $20, $3f + db "PALLET TOWN @" + +ViridianCityText: + db $05, $5f, $43, $14, $20, $41 + db "VIRIDIAN CITY @" + +ViridianForestText: + db $05, $5f, $42, $14, $20, $43 + db "VIRIDIAN FOREST @" + +PewterCityText: + db $05, $5f, $44, $14, $20, $3f + db "PEWTER CITY @" + +MtMoonText: + db $05, $5f, $46, $14, $20, $3b + db "MT.MOON @" + +CeruleanCityText: + db $05, $5f, $43, $14, $20, $41 + db "CERULEAN CITY @" + +VermilionSeasideText: + db $05, $5f, $40, $14, $20, $47 + db "VERMILION : SEASIDE @" + +VermilionStreetsText: + db $05, $5f, $40, $14, $20, $47 + db "VERMILION : STREETS @" + +RockMountainText: + db $05, $5f, $43, $14, $20, $41 + db "ROCK MOUNTAIN @" + +LavenderTownText: + db $05, $5f, $43, $14, $20, $41 + db "LAVENDER TOWN @" + +CeladonCityText: + db $05, $5f, $44, $14, $20, $40 + db "CELADON CITY @" + +CyclingRoadText: + db $05, $5f, $44, $14, $20, $40 + db "CYCLING ROAD @" + +FuchiaCityText: + db $05, $5f, $44, $14, $20, $3f + db "FUCHIA CITY @" ; mispelling -- should be fuchsia + +SafariZoneText: + db $05, $5f, $44, $14, $20, $3f + db "SAFARI ZONE @" + +SaffronCityText: + db $05, $5f, $44, $14, $20, $40 + db "SAFFRON CITY @" + +SeafoamIslandsText: + db $05, $5f, $42, $14, $20, $43 + db "SEAFOAM ISLANDS @" + +CinnabarIslandText: + db $05, $5f, $42, $14, $20, $43 + db "CINNABAR ISLAND @" + +IndigoPlateauText: + db $05, $5f, $43, $14, $20, $42 + db "INDIGO PLATEAU @" + +GoToDiglettStageText: + db $05, $54, $40, $14, $00, $3c + db "GO TO DIGLETT STAGE @" + +GoToGengarStageText: + db $05, $54, $41, $14, $00, $3b + db "GO TO GENGAR STAGE @" + +GoToMewtwoStageText: + db $05, $54, $41, $14, $00, $3b + db "GO TO MEWTWO STAGE @" + +GoToMeowthStageText: + db $05, $54, $41, $14, $00, $3b + db "GO TO MEOWTH STAGE @" + +GoToSeelStageText: + db $05, $54, $42, $14, $00, $39 + db "GO TO SEEL STAGE @" + +EndGengarStageText: + db $05, $54, $42, $14, $00, $39 + db "END GENGAR STAGE @" + +EndMewtwoStageText: + db $05, $54, $42, $14, $00, $39 + db "END MEWTWO STAGE @" + +EndDiglettStageText: + db $05, $54, $41, $14, $00, $3a + db "END DIGLETT STAGE @" + +EndMeowthStageText: + db $05, $54, $42, $14, $00, $39 + db "END MEOWTH STAGE @" + +EndSeelStageText: + db $05, $54, $43, $14, $00, $37 + db "END SEEL STAGE @" + +GengarStageClearedText: + db $05, $54, $40, $14, $00, $3d + db "GENGAR STAGE CLEARED @" + +MewtwoStageClearedText: + db $05, $54, $40, $14, $00, $3d + db "MEWTWO STAGE CLEARED @" + +DiglettStageClearedText: + db $05, $54, $3f, $14, $00, $3e + db "DIGLETT STAGE CLEARED @" + +MeowthStageClearedText: + db $05, $54, $40, $14, $00, $3d + db "MEOWTH STAGE CLEARED @" + +SeelStageClearedText: + db $05, $54, $41, $14, $00, $3b + db "SEEL STAGE CLEARED @" + +NumPokemonCaughtText: + db " 0 POKeMON CAUGHT@" + +NumPokemonEvolvedText: + db " 0 POKeMON EVOLVED@" + +BellsproutCounterText: + db " 0 BELLSPROUT@" + +DugtrioCounterText: + db " 0 DUGTRIO@" + +CaveShotCounterText: + db " 0 CAVE SHOTS@" + +SpinnerTurnsCounterText: + db " 0 SPINNER TURNS@" + +BonusPointsText: + db " BONUS@" + +SubtotalPointsText: + db " SUBTOTAL@" + +MultiplierPointsText: + db " MULTIPLIER@" + +TotalPointsText: + db " TOTAL@" + +ScoreText: + db " SCORE@" + +GameOverText: + db " GAME OVER @" + +PsyduckCounterText: + db " 0 PSYDUCK@" + +PoliwagCounterText: + db " 0 POLIWAG@" + +CloysterCounterText: + db " 0 CLOYSTER@" + +SlowpokeCounterText: + db " 0 SLOWPOKE@" diff --git a/wram.asm b/wram.asm index 845a24b..6dce20d 100644 --- a/wram.asm +++ b/wram.asm @@ -734,29 +734,23 @@ wd5ca:: ; 0xd5ca set to 1 by a commonly called text function that is called at t wd5cb:: ; 0xd5cb set to 0 if the above is 0 during Func_33e3 ds $1 -wScrollingTextStruct1:: ; 0xd5cc Start of a scrolling message struct that contains 8 1-byte vars. -; Byte 1: Toggles if enabled. 0 is off, non-0 is on -; Byte 2: is how many frames until the next scroll -; Byte 3: holds how long, in frames, it should take for the scroll to move 1 tile -; Byte 4: is the current position to place the start of the text -; Byte 5: is where in the scroll the message should stop for an extended period -; Byte 6: is how many frames the extended stop from Byte 5 has left -; Byte 7: is a pointer to the source text's position in the buffer -; Byte 8: is decremented each scroll and scroll denied by the stop -; Scrolling text relies on byte allignment for the text buffer and display area - ds $8 - -wScrollingTextStruct2:: ; 0xd5d4 Start of a scrolling struct2 - ds $4 - -wd5d8:: ; 0xd5d8 - ds $3 - -wd5db:: ; 0xd5db - ds $1 +scrolling_text: MACRO +\1Enabled:: ds 1 ; Toggles if enabled. 0 is off, non-0 is on +\1ScrollDelayCounter:: ds 1 ; Number of frames remaining until the next scroll step +\1ScrollDelay:: ds 1 ; Number of frames between each scroll step +\1MessageBoxOffset:: ds 1 ; Offset in wBottomMessageBuffer to place first character of text +\1StopOffset:: ds 1 ; Offset in wBottomMessageBuffer where the scrolling text will briefly stop +\1StopDuration:: ds 1 ; Number of frames the message will remained stopped, before resuming scroll +\1SourceTextOffset:: ds 1 ; Offset in wBottomMessageText for the text to be displayed +\1ScrollStepsRemaining:: ds 1 ; Number of scroll steps remaining. Isn't decremented during the stop. +ENDM -wScrollingTextStruct3:: ; 0xd5dc Start of a scrolling struct3 - ds $8 +wScrollingText1:: ; 0xd5cc + scrolling_text wScrollingText1 +wScrollingText2:: ; 0xd5d4 + scrolling_text wScrollingText2 +wScrollingText3:: ; 0xd5dc + scrolling_text wScrollingText3 wd5e4:: ; 0xd5e4 ds $5 -- cgit v1.2.3