Use uppercase for the file names because that works better with Total Replay. Fix a problem where HISCR is left on after switching to mixed mode. Fix bugs with formatting of the text when saving the game, prompting for the next level and notifying that the end of the game has been reached in mixed text mode.

This commit is contained in:
Jeremy Rand 2020-01-29 00:31:19 -05:00
parent 74e22c1854
commit 879030f4ff
4 changed files with 19 additions and 23 deletions

View File

@ -91,22 +91,8 @@ gemmask := $88
.proc _mixedTextMode
; Set the text window top to line 20
lda #20
sta WNDTOP
; Move the Y position of the cursor to line 20
sta CV
bit $C082
jsr $FC24 ; Generate text base address
bit $C080
; And the X position of the cursor to column 0
lda #0
sta CH
lda MIXSET
sta LOWSCR
sta HISCR
ldx #40
lda #$a0
@L1:
@ -118,7 +104,7 @@ gemmask := $88
cpx #0
bne @L1
sta HISCR
sta LOWSCR
ldx #40
@L2:
dex
@ -131,10 +117,18 @@ gemmask := $88
lda #0
sta WNDLFT
sta CH
lda #80
sta WNDWDTH
lda #20
sta WNDTOP
sta CV
bit $C082
jsr $FC24 ; Generate text base address
bit $C080
lda #24
sta WNDBTM

View File

@ -33,7 +33,7 @@
#define GEM_TYPE_AT_SQUARE(square) gGameState.squareStates[square].gemType
#define GEM_STARRED_AT_SQUARE(square) gGameState.squareStates[square].isStarred
#define SAVE_GAME_FILE "a2bejwld.game"
#define SAVE_GAME_FILE "A2BEJWLD.GAME"
// Typedefs

View File

@ -25,8 +25,8 @@
// Defines
#define SAVE_OPTIONS_FILE "a2bejwld.opts"
#define BASE_VERSION "v2.1"
#define SAVE_OPTIONS_FILE "A2BEJWLD.OPTS"
#define BASE_VERSION "v2.2a1"
#ifdef TOTAL_REPLAY_BUILD
#define VERSION BASE_VERSION ".tr"
@ -635,6 +635,7 @@ static void endGame(void)
case 'y':
case 'Y':
replaceCursor(ch);
printString("\n");
return;
case 'n':
@ -672,10 +673,11 @@ static void refreshLevel(tLevel level)
mixedTextMode();
speakLevelComplete();
printString(" Completed level ");
printString("\n"
" Completed level ");
printInteger(level);
printString("!!\n"
" Press space to continue to the next level...");
" Press space to continue to the next level...");
while (waiting) {
switch (cgetc()) {
@ -689,6 +691,7 @@ static void refreshLevel(tLevel level)
}
}
printString("\n");
showAndClearDblLoRes();
speakGetReady();
}
@ -904,8 +907,7 @@ static bool pollKeyboard(void)
if (gShouldSave) {
videomode(0x12);
mixedTextMode();
gotoxy(0, 0);
printString("Saving your game so you can continue\n later...");
printString("\nSaving your game so you can continue\n later...");
saveGame();
}
quitGame();