[Scummvm-git-logs] scummvm master -> 9dee42481875044030c64094798837f0b88194eb

moralrecordings noreply at scummvm.org
Sun Jul 19 13:51:04 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
9dee424818 FOOL: Replace last of the fixed string table offsets


Commit: 9dee42481875044030c64094798837f0b88194eb
    https://github.com/scummvm/scummvm/commit/9dee42481875044030c64094798837f0b88194eb
Author: Scott Percival (code at moral.net.au)
Date: 2026-07-19T21:50:48+08:00

Commit Message:
FOOL: Replace last of the fixed string table offsets

Changed paths:
    engines/fool/fool_game.cpp
    engines/fool/fool_game.h
    engines/fool/fool_hermit.cpp
    engines/fool/fool_prologue.cpp


diff --git a/engines/fool/fool_game.cpp b/engines/fool/fool_game.cpp
index 30afa30aa03..2a41bbdfb88 100644
--- a/engines/fool/fool_game.cpp
+++ b/engines/fool/fool_game.cpp
@@ -46,15 +46,15 @@ namespace Fool {
 // Offset adjustments for the ZBasic string table to align
 // across game versions
 static const int fool11ZStrOffset[] = {
-	128, 59, 81, 170, 186, 188, 192, 194, 202, 239, 258, 280, 315, 324, 13, 21
+	128, 59, 81, 170, 186, 188, 192, 194, 202, 239, 258, 280, 315, 341, 324, 13, 21, 6, 3
 };
 
 static const int fool20ZStrOffset[] = {
-	102, 78, 103, 191, 207, 209, 213, 215, 223, 260, 279, 301, 336, 345, 18, 22
+	102, 78, 103, 191, 207, 209, 213, 215, 223, 260, 279, 301, 336, 362, 345, 18, 22, 6, 3
 };
 
 static const int fool30ZStrOffset[] = {
-	97, 73, 98, 161, 177, 179, 183, 185, 193, 230, 251, 273, 308, 317, 8, 12
+	97, 73, 98, 161, 177, 179, 183, 185, 193, 230, 251, 273, 308, 334, 317, 8, 12, 76, 3
 };
 
 // Fool's Errand v1.1 is missing FOND data, below is taken from 2.0
@@ -385,7 +385,7 @@ void FoolGame::copyScreen(int16 put, BitMap &bmp) {
 
 void FoolGame::openSaveFileDialog(const Common::U32String &title, const Common::U32String &filename) {
 	// 128:011c
-	var_str_384 = _zbasic->str(3);
+	var_str_384.clear(); // was: str(3)
 
 	var_i16_586 = 0;
 
@@ -411,7 +411,7 @@ void FoolGame::openSaveFileDialog(const Common::U32String &title, const Common::
 
 void FoolGame::sub_128_1e4(const Common::String &osType) {
 	// 128:01e4
-	var_str_588 = _zbasic->str(4);
+	var_str_588.clear(); // was: str(4)
 	var_i16_688 = 0;
 
 	copyScreen(0, arr_bmp_138bc);
@@ -427,7 +427,7 @@ void FoolGame::sub_128_1e4(const Common::String &osType) {
 	typeList.types[0] += osType.at(2) << 8;
 	typeList.types[0] += osType.at(3) << 0;
 
-	_toolbox->SFGetFile(_event.where, _zbasic->str(5), 0, 1, typeList, 0, var_sfr_5e);
+	_toolbox->SFGetFile(_event.where, Common::U32String(), 0, 1, typeList, 0, var_sfr_5e); // was: str(5)
 	sub_128_6244();
 	copyScreen(1, arr_bmp_138bc);
 
diff --git a/engines/fool/fool_game.h b/engines/fool/fool_game.h
index 14af5f227ef..118c095d226 100644
--- a/engines/fool/fool_game.h
+++ b/engines/fool/fool_game.h
@@ -88,9 +88,12 @@ enum FoolZStrOffset : uint16 {
 	kOffsetCards,
 	kOffsetThoth,
 	kOffsetHumbug,
+	kOffsetHermit,
 	kOffsetJustice,
 	kOffsetPrologue,
 	kOffsetFinale,
+	kOffsetPrologueMemory,
+	kOffsetPrologueClick,
 };
 
 enum FoolFontID : uint16 {
diff --git a/engines/fool/fool_hermit.cpp b/engines/fool/fool_hermit.cpp
index c20f5647a8a..11a3b27705c 100644
--- a/engines/fool/fool_hermit.cpp
+++ b/engines/fool/fool_hermit.cpp
@@ -35,12 +35,12 @@ namespace Fool {
 void FoolGame::hermitRun() {
 	// 142:12ac
 	if (_puzzleCompletionStatus[0x34] < 5) {
-		_zbasic->menu(8, 3, 1, _zbasic->str(362)); // to find a hidden secret
-		_zbasic->menu(8, 4, 1, _zbasic->str(363)); // follow each line, correct and true
+		_zbasic->menu(8, 3, 1, _zbasic->str(OFF(0))); // to find a hidden secret
+		_zbasic->menu(8, 4, 1, _zbasic->str(OFF(1))); // follow each line, correct and true
 	} else {
 		// 142:12fc
-		_zbasic->menu(8, 3, 1, _zbasic->str(364)); // to find the straight path
-		_zbasic->menu(8, 4, 1, _zbasic->str(365)); // follow each line, correct and true
+		_zbasic->menu(8, 3, 1, _zbasic->str(OFF(2))); // to find the straight path
+		_zbasic->menu(8, 4, 1, _zbasic->str(OFF(3))); // follow each line, correct and true
 	}
 	// 142:132c
 	if (_activePuzzleStatus == 0) {
diff --git a/engines/fool/fool_prologue.cpp b/engines/fool/fool_prologue.cpp
index 3dd09223da0..6c02bfc7e80 100644
--- a/engines/fool/fool_prologue.cpp
+++ b/engines/fool/fool_prologue.cpp
@@ -434,14 +434,14 @@ void FoolPrologue::drawClickMessage() {
 	// 128:0de2
 	_zbasic->text(kPrologueFontSmall, 0x9, Graphics::kMacFontRegular, Graphics::MacToolbox::kSrcXor);
 	// Click Mouse to Continue
-	drawText(_zbasic->str(3), 5, 0x151);
+	drawText(_zbasic->str(_zstrOffset[kOffsetPrologueClick]), 5, 0x151);
 }
 
 void FoolPrologue::drawClickMessageRightAlign() {
 	// 128:0e1c
 	_zbasic->text(kPrologueFontSmall, 0x9, Graphics::kMacFontRegular, Graphics::MacToolbox::kSrcXor);
 	// Click Mouse to Continue
-	drawTextRight(_zbasic->str(4), 0x1fb, 0x154);
+	drawTextRight(_zbasic->str(_zstrOffset[kOffsetPrologueClick]+1), 0x1fb, 0x154);
 }
 
 void FoolPrologue::waitForClick() {
@@ -610,11 +610,12 @@ void FoolPrologue::setupWindow() {
 		fillRect(0x50, 0x6e, 0xd2, 0x192, 2);
 		_zbasic->text(0, 0xc, Graphics::kMacFontRegular, Graphics::MacToolbox::kSrcBic);
 		// "not enough memory" message
-		drawTextCenter(_zbasic->str(6), 0x100, 0x64);
-		drawTextCenter(_zbasic->str(7), 0x100, 0x78);
-		drawTextCenter(_zbasic->str(8), 0x100, 0x96);
-		drawTextCenter(_zbasic->str(9), 0x100, 0xaa);
-		drawTextCenter(_zbasic->str(10), 0x100, 0xcb);
+		int memoryOff = _zstrOffset[kOffsetPrologueMemory];
+		drawTextCenter(_zbasic->str(memoryOff + 0), 0x100, 0x64);
+		drawTextCenter(_zbasic->str(memoryOff + 1), 0x100, 0x78);
+		drawTextCenter(_zbasic->str(memoryOff + 2), 0x100, 0x96);
+		drawTextCenter(_zbasic->str(memoryOff + 3), 0x100, 0xaa);
+		drawTextCenter(_zbasic->str(memoryOff + 4), 0x100, 0xcb);
 		waitForClick();
 		if (_quit)
 			return;
@@ -681,14 +682,15 @@ void FoolPrologue::setupWindow() {
 			fillRect(0x6e, 0x8c, 0xd2, 0x174, 2);
 			// 129:0662
 			_zbasic->text(0, 0xc, Graphics::kMacFontRegular, Graphics::MacToolbox::kSrcBic);
-			// "set your monitor to black and white" message"
-			drawTextCenter(_zbasic->str(13), 0x100, 0x82);
-			drawTextCenter(_zbasic->str(14), 0x100, 0x96);
+			// not present in all versions of the game
+			// was: str(13)
+			drawTextCenter(Common::U32String("Set your monitor to"), 0x100, 0x82);
+			drawTextCenter(Common::U32String("2 color black and white"), 0x100, 0x96);
 
 			// if this is the finale
-			drawTextCenter(_mode == 2 ? _zbasic->str(16): _zbasic->str(15), 0x100, 0xaa);
+			drawTextCenter(_mode == 2 ? Common::U32String("and start the Finale again."): Common::U32String("and start the Prologue again."), 0x100, 0xaa);
 
-			drawTextCenter(_zbasic->str(17), 0x100, 0xcb);
+			drawTextCenter(Common::U32String("(click mouse to quit)"), 0x100, 0xcb);
 			// 129:0730
 			waitForClick();
 			if (_quit)




More information about the Scummvm-git-logs mailing list