diff options
| author | Idain <luiscarlosholguinperez@outlook.com> | 2021-05-25 01:14:19 -0400 |
|---|---|---|
| committer | Idain <luiscarlosholguinperez@outlook.com> | 2021-05-25 01:14:19 -0400 |
| commit | 9c0c801cc64bc25085e8297273ff21b7c52d9602 (patch) | |
| tree | b99897dd0bb84a4e8867eef22d56378ab5f2e603 /Remove-the-artificial-save-delay.md | |
| parent | 3b39ef2ab300b0f8e6ff3eb8fc6f74548c2dbce6 (diff) | |
Small update to tutorial
Diffstat (limited to 'Remove-the-artificial-save-delay.md')
| -rw-r--r-- | Remove-the-artificial-save-delay.md | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Remove-the-artificial-save-delay.md b/Remove-the-artificial-save-delay.md index 045ca37..5add01c 100644 --- a/Remove-the-artificial-save-delay.md +++ b/Remove-the-artificial-save-delay.md @@ -69,16 +69,15 @@ Much of the slowness in the process comes from the function that prints the `SAV The deleted function also references a text element, which in turn makes a far jump to the actual text in [data/text/common_3.asm](../blob/master/data/text/common_3.asm). Both of these elements may be deleted: ```diff --Text_SavingDontTurnOffThePower: -- ; SAVING… DON'T TURN OFF THE POWER. -- text_far UnknownText_0x1c456d +-SavingDontTurnOffThePowerText: +- text_far _SavingDontTurnOffThePowerText - text_end ``` And in [data/text/common_3.asm](../blob/master/data/text/common_3.asm): ```diff --UnknownText_0x1c456d:: +-_SavingDontTurnOffThePowerText:: - text "SAVING… DON'T TURN" - line "OFF THE POWER." - done @@ -164,18 +163,20 @@ Of course, the informing part is done with plenty of delays (namely, steps 7, 8 - ; wait 32 frames - ld c, 32 - call DelayFrames -- ; copy the original text speed setting to the stack -- ld a, [wOptions] -- push af + ; copy the original text speed setting to the stack + ld a, [wOptions] + push af - ; set text speed to medium - ld a, TEXT_DELAY_MED -- ld [wOptions], a ++ ; set text speed to fast ++ ld a, TEXT_DELAY_FAST + ld [wOptions], a ; <PLAYER> saved the game! ld hl, Text_PlayerSavedTheGame call PrintText -- ; restore the original text speed setting -- pop af -- ld [wOptions], a + ; restore the original text speed setting + pop af + ld [wOptions], a ld de, SFX_SAVE call WaitPlaySFX - call WaitSFX @@ -202,13 +203,13 @@ Fortunately, since the game already contains separate texts for each situation, call CompareLoadedAndSavedPlayerID - jr z, .yoursavefile + ret z ; pretend the player answered "Yes", but without asking - ld hl, Text_AnotherSaveFile - call SaveTheGame_yesorno - jr nz, .refused + ld hl, AnotherSaveFileText + call SaveTheGame_yesorno + jr nz, .refused - jr .erase -.yoursavefile -- ld hl, Text_AlreadyASaveFile +- ld hl, AlreadyASaveFileText - call SaveTheGame_yesorno - jr nz, .refused - jr .ok @@ -226,16 +227,15 @@ Fortunately, since the game already contains separate texts for each situation, ; ... --Text_AlreadyASaveFile: -- ; There is already a save file. Is it OK to overwrite? -- text_far UnknownText_0x1c45a3 +-AlreadyASaveFileText: +- text_far _AlreadyASaveFileText - text_end ``` The corresponding text from [data/text/common_3.asm](../blob/master/data/text/common_3.asm) can be removed as well: ```diff --UnknownText_0x1c45a3:: +-_AlreadyASaveFileTex:: - text "There is already a" - line "save file. Is it" - cont "OK to overwrite?" @@ -344,7 +344,7 @@ Making a final edit to `SavedTheGame` achieves this goal: jp WaitSFX +.saving_text -+ text "Saving…" ++ text "SAVING…" + done ``` |
