From 5302a80a7e8226d13fc46aa04fe5c0261227de1b Mon Sep 17 00:00:00 2001 From: andwhyisit Date: Tue, 15 Aug 2023 00:38:51 +1000 Subject: [PATCH] Dialogue text pointers now read from high banks, plus fixes have been applied to InitiateMainScript. --- game/src/text/main_script.asm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/game/src/text/main_script.asm b/game/src/text/main_script.asm index af5f54f..142545c 100644 --- a/game/src/text/main_script.asm +++ b/game/src/text/main_script.asm @@ -40,9 +40,9 @@ InitiateMainScript:: ld [W_MainScriptPauseTimer], a ld [W_MainScriptCCSubState], a ld [W_MainScriptPauseAutoAdvanceTimer], a - ld a, 0 ld [W_MainScriptSpeed], a - ld a, $FF + dec a + ld [W_VWFIsInit], a ld [W_MainScriptPortraitCharacter], a ld [W_MainScriptPortraitPriorPlacement], a ld [W_MainScriptPortraitPlacement], a @@ -143,9 +143,7 @@ MainScriptProcessor:: ret .doNotPause - add hl, bc - add hl, bc - add hl, bc + call VWFGetTextPointerAddress ld a, [hli] ld [W_VWFTextBank], a push af @@ -183,8 +181,16 @@ MainScriptProcessorPutCharLoop:: call VWFLowBankswitch jp VWFDrawCharLoop +VWFGetTextPointerAddress:: + add hl, bc + add hl, bc + add hl, bc + jr VWFHighBankswitch.extEntry + VWFHighBankswitch:: rst $10 + +.extEntry ld a, 1 ld [W_CurrentHighBank], a ld [X_MBC5ROMBankHigh], a