[Scummvm-git-logs] scummvm branch-2-7 -> 2468c58ea344ea6c86b3d173c1d2f7fa7d462288

neuromancer noreply at scummvm.org
Sun Jan 29 19:54:48 UTC 2023


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

Summary:
6a7683f095 FREESCAPE: implemented skanner in driller
3f7dd38045 FREESCAPE: implemented SETVAR instruction
0a837ed3eb FREESCAPE: stop execution if some instruction is not implemented (except in castle)
5a0ee7b946 FREESCAPE: make sure skanner is invisible at start in driller
7dee4515bd FREESCAPE: fix corner case in 8bit instruction parsing
7bf7531009 FREESCAPE: avoid re-adding skanner objects
2468c58ea3 FREESCAPE: UI fixes for zx and cpc releases of driller


Commit: 6a7683f0950fbcc3f5e5bd3bce52b550f8f1e266
    https://github.com/scummvm/scummvm/commit/6a7683f0950fbcc3f5e5bd3bce52b550f8f1e266
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-01-29T20:54:44+01:00

Commit Message:
FREESCAPE: implemented skanner in driller

Changed paths:
    engines/freescape/freescape.cpp
    engines/freescape/freescape.h
    engines/freescape/games/driller.cpp


diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index bd6bfa77441..d91f73ddc3c 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -142,6 +142,7 @@ FreescapeEngine::FreescapeEngine(OSystem *syst, const ADGameDescription *gd)
 	_countdown = 0;
 	_ticks = 0;
 	_lastTick = -1;
+	_lastMinute = -1;
 	_frameLimiter = nullptr;
 	_vsyncEnabled = false;
 
@@ -497,6 +498,18 @@ void FreescapeEngine::processInput() {
 	}
 }
 
+void FreescapeEngine::updateTimeVariables() {
+	int seconds, minutes, hours;
+	getTimeFromCountdown(seconds, minutes, hours);
+
+	if (_lastMinute != minutes) {
+		_lastMinute = minutes;
+		_gameStateVars[0x1e] += 1;
+		_gameStateVars[0x1f] += 1;
+		executeLocalGlobalConditions(false, true); // Only execute "on collision" room/global conditions
+	}
+}
+
 Common::Error FreescapeEngine::run() {
 	_vsyncEnabled = g_system->getFeatureState(OSystem::kFeatureVSync);
 	_frameLimiter = new Graphics::FrameLimiter(g_system, ConfMan.getInt("engine_speed"));
@@ -550,6 +563,7 @@ Common::Error FreescapeEngine::run() {
 	g_system->updateScreen();
 
 	while (!shouldQuit()) {
+		updateTimeVariables();
 		if (endGame) {
 			initGameState();
 			gotoArea(_startArea, _startEntrance);
@@ -828,6 +842,17 @@ Graphics::Surface *FreescapeEngine::loadAndConvertNeoImage(Common::SeekableReadS
 	return surface;
 }
 
+void FreescapeEngine::getTimeFromCountdown(int &seconds, int &minutes, int &hours) {
+	int countdown = _countdown;
+	int h = countdown <= 0 ? 0 : countdown / 3600;
+	int m = countdown <= 0 ? 0 : (countdown - h * 3600) / 60;
+	int s = countdown <= 0 ? 0 : countdown - h * 3600 - m * 60;
+
+	seconds = s;
+	minutes = m;
+	hours = h;
+}
+
 static void countdownCallback(void *refCon) {
 	FreescapeEngine* self = (FreescapeEngine *)refCon;
 	self->_ticks++;
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 30c5cd555dc..3e108874486 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -352,6 +352,10 @@ public:
 	int _countdown;
 	int _ticks;
 	int _lastTick;
+	int _lastMinute;
+
+	void getTimeFromCountdown(int &seconds, int &minutes, int &hours);
+	void updateTimeVariables();
 
 	// Cheats
 	bool _useExtendedTimer;
@@ -416,6 +420,7 @@ private:
 	void addDrill(const Math::Vector3d position, bool gasFound);
 	bool checkDrill(const Math::Vector3d position);
 	void removeDrill(Area *area);
+	void addSkanner(Area *area);
 
 	void loadAssetsDemo();
 	void loadAssetsFullGame();
diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 292bedeff42..129cf255948 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -219,6 +219,7 @@ void DrillerEngine::gotoArea(uint16 areaID, int entranceID) {
 		_sensors = _currentArea->getSensors();
 	}
 	_lastPosition = _position;
+	_gameStateVars[0x1f] = 0;
 
 	if (areaID == _startArea && entranceID == _startEntrance) {
 		_yaw = 280;
@@ -804,11 +805,10 @@ void DrillerEngine::drawDOSUI(Graphics::Surface *surface) {
 	drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), _renderMode == Common::kRenderCGA ? 44 : 46, 153, front, back, surface);
 	drawStringInSurface(Common::String::format("%07d", score), 238, 129, front, back, surface);
 
-	int hours = _countdown <= 0 ? 0 : _countdown / 3600;
+	int seconds, minutes, hours;
+	getTimeFromCountdown(seconds, minutes, hours);
 	drawStringInSurface(Common::String::format("%02d", hours), 208, 8, front, back, surface);
-	int minutes = _countdown <= 0 ? 0 : (_countdown - hours * 3600) / 60;
 	drawStringInSurface(Common::String::format("%02d", minutes), 230, 8, front, back, surface);
-	int seconds = _countdown <= 0 ? 0 : _countdown - hours * 3600 - minutes * 60;
 	drawStringInSurface(Common::String::format("%02d", seconds), 254, 8, front, back, surface);
 
 	Common::String message;
@@ -877,11 +877,10 @@ void DrillerEngine::drawCPCUI(Graphics::Surface *surface) {
 	drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), 44, 156, front, back, surface);
 	drawStringInSurface(Common::String::format("%07d", score), 239, 132, front, back, surface);
 
-	int hours = _countdown <= 0 ? 0 : _countdown / 3600;
+	int seconds, minutes, hours;
+	getTimeFromCountdown(seconds, minutes, hours);
 	drawStringInSurface(Common::String::format("%02d", hours), 209, 11, front, back, surface);
-	int minutes = _countdown <= 0 ? 0 : (_countdown - hours * 3600) / 60;
 	drawStringInSurface(Common::String::format("%02d", minutes), 232, 11, front, back, surface);
-	int seconds = _countdown <= 0 ? 0 : _countdown - hours * 3600 - minutes * 60;
 	drawStringInSurface(Common::String::format("%02d", seconds), 254, 11, front, back, surface);
 
 	Common::String message;
@@ -950,11 +949,10 @@ void DrillerEngine::drawC64UI(Graphics::Surface *surface) {
 	drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), 44, 156, front, back, surface);
 	drawStringInSurface(Common::String::format("%07d", score), 240, 128, front, back, surface);
 
-	int hours = _countdown <= 0 ? 0 : _countdown / 3600;
+	int seconds, minutes, hours;
+	getTimeFromCountdown(seconds, minutes, hours);
 	drawStringInSurface(Common::String::format("%02d", hours), 209, 11, front, back, surface);
-	int minutes = _countdown <= 0 ? 0 : (_countdown - hours * 3600) / 60;
 	drawStringInSurface(Common::String::format("%02d", minutes), 232, 11, front, back, surface);
-	int seconds = _countdown <= 0 ? 0 : _countdown - hours * 3600 - minutes * 60;
 	drawStringInSurface(Common::String::format("%02d", seconds), 254, 11, front, back, surface);
 
 	Common::String message;
@@ -1024,11 +1022,10 @@ void DrillerEngine::drawZXUI(Graphics::Surface *surface) {
 	drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), 65, 157, front, back, surface);
 	drawStringInSurface(Common::String::format("%07d", score), 217, 133, white, back, surface);
 
-	int hours = _countdown <= 0 ? 0 : _countdown / 3600;
+	int seconds, minutes, hours;
+	getTimeFromCountdown(seconds, minutes, hours);
 	drawStringInSurface(Common::String::format("%02d", hours), 187, 12, front, back, surface);
-	int minutes = _countdown <= 0 ? 0 : (_countdown - hours * 3600) / 60;
 	drawStringInSurface(Common::String::format("%02d", minutes), 209, 12, front, back, surface);
-	int seconds = _countdown <= 0 ? 0 : _countdown - hours * 3600 - minutes * 60;
 	drawStringInSurface(Common::String::format("%02d", seconds), 232, 12, front, back, surface);
 
 	Common::String message;
@@ -1099,11 +1096,10 @@ void DrillerEngine::drawAmigaAtariSTUI(Graphics::Surface *surface) {
 	drawStringInSurface(_currentArea->_name, 188, 185, yellow, black, surface);
 	drawStringInSurface(Common::String::format("%07d", score), 240, 129, yellow, black, surface);
 
-	int hours = _countdown <= 0 ? 0 : _countdown / 3600;
+	int seconds, minutes, hours;
+	getTimeFromCountdown(seconds, minutes, hours);
 	drawStringInSurface(Common::String::format("%02d:", hours), 208, 7, yellow, black, surface);
-	int minutes = _countdown <= 0 ? 0 : (_countdown - hours * 3600) / 60;
 	drawStringInSurface(Common::String::format("%02d:", minutes), 230, 7, yellow, black, surface);
-	int seconds = _countdown <= 0 ? 0 : _countdown - hours * 3600 - minutes * 60;
 	drawStringInSurface(Common::String::format("%02d", seconds), 254, 7, yellow, black, surface);
 
 	Common::String message;
@@ -1492,6 +1488,33 @@ bool DrillerEngine::checkDrill(const Math::Vector3d position) {
 }
 
 
+void DrillerEngine::addSkanner(Area *area) {
+	debug("area: %d", area->getAreaID());
+	GeometricObject *obj = nullptr;
+	int16 id;
+
+	id = 248;
+	debugC(1, kFreescapeDebugParser, "Adding object %d to room structure", id);
+	obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
+	assert(obj);
+	obj = (GeometricObject *)obj->duplicate();
+	area->addObject(obj);
+
+	id = 249;
+	debugC(1, kFreescapeDebugParser, "Adding object %d to room structure", id);
+	obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
+	assert(obj);
+	obj = (GeometricObject *)obj->duplicate();
+	area->addObject(obj);
+
+	id = 250;
+	debugC(1, kFreescapeDebugParser, "Adding object %d to room structure", id);
+	obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
+	assert(obj);
+	obj = (GeometricObject *)obj->duplicate();
+	area->addObject(obj);
+}
+
 void DrillerEngine::addDrill(const Math::Vector3d position, bool gasFound) {
 	// int drillObjectIDs[8] = {255, 254, 253, 252, 251, 250, 248, 247};
 	GeometricObject *obj = nullptr;
@@ -1606,6 +1629,7 @@ void DrillerEngine::initGameState() {
 			removeDrill(it._value);
 		_drillStatusByArea[it._key] = kDrillerNoRig;
 		if (it._key != 255) {
+			addSkanner(it._value);
 			_drillMaxScoreByArea[it._key] = (10 + _rnd->getRandomNumber(89)) * 1000;
 		}
 		_drillSuccessByArea[it._key] = 0;
@@ -1624,7 +1648,7 @@ void DrillerEngine::initGameState() {
 	_playerHeight = _playerHeights[_playerHeightNumber];
 	removeTimers();
 	startCountdown(_initialCountdown);
-
+	_lastMinute = 0;
 	_demoIndex = 0;
 	_demoEvents.clear();
 }


Commit: 3f7dd380450286db5b3aa6b47bb58c9b3cabb5fc
    https://github.com/scummvm/scummvm/commit/3f7dd380450286db5b3aa6b47bb58c9b3cabb5fc
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-01-29T20:54:53+01:00

Commit Message:
FREESCAPE: implemented SETVAR instruction

Changed paths:
    engines/freescape/freescape.h
    engines/freescape/language/8bitDetokeniser.cpp
    engines/freescape/language/instruction.cpp


diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 3e108874486..cca53101991 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -244,6 +244,7 @@ public:
 	// Instructions
 	void executeIncrementVariable(FCLInstruction &instruction);
 	void executeDecrementVariable(FCLInstruction &instruction);
+	void executeSetVariable(FCLInstruction &instruction);
 	void executeGoto(FCLInstruction &instruction);
 	void executeIfThenElse(FCLInstruction &instruction);
 	void executeMakeInvisible(FCLInstruction &instruction);
diff --git a/engines/freescape/language/8bitDetokeniser.cpp b/engines/freescape/language/8bitDetokeniser.cpp
index ba09025bc0e..20eb2d0733a 100644
--- a/engines/freescape/language/8bitDetokeniser.cpp
+++ b/engines/freescape/language/8bitDetokeniser.cpp
@@ -340,7 +340,7 @@ Common::String detokenise8bitCondition(Common::Array<uint8> &tokenisedCondition,
 
 		case 20:
 			detokenisedStream += "SETVAR ";
-			detokenisedStream += Common::String::format("(%d, v%d)", (int)tokenisedCondition[bytePointer], (int)tokenisedCondition[bytePointer + 1]);
+			detokenisedStream += Common::String::format("(v%d, %d)", (int)tokenisedCondition[bytePointer], (int)tokenisedCondition[bytePointer + 1]);
 			bytePointer += 2;
 			numberOfArguments = 0;
 			break;
diff --git a/engines/freescape/language/instruction.cpp b/engines/freescape/language/instruction.cpp
index 204f1bce1a6..473b3748cd3 100644
--- a/engines/freescape/language/instruction.cpp
+++ b/engines/freescape/language/instruction.cpp
@@ -130,6 +130,9 @@ void FreescapeEngine::executeCode(FCLInstructionVector &code, bool shot, bool co
 		case Token::SUBVAR:
 			executeDecrementVariable(instruction);
 			break;
+		case Token::SETVAR:
+			executeSetVariable(instruction);
+			break;
 		case Token::GOTO:
 			executeGoto(instruction);
 			break;
@@ -327,6 +330,16 @@ void FreescapeEngine::executeDecrementVariable(FCLInstruction &instruction) {
 		debugC(1, kFreescapeDebugCode, "Variable %d by %d incremented up to %d!", variable, decrement, _gameStateVars[variable]);
 }
 
+void FreescapeEngine::executeSetVariable(FCLInstruction &instruction) {
+	uint16 variable = instruction._source;
+	uint16 value = instruction._destination;
+	_gameStateVars[variable] = value;
+	if (variable == k8bitVariableEnergy)
+		debugC(1, kFreescapeDebugCode, "Energy set to %d", value);
+	else
+		debugC(1, kFreescapeDebugCode, "Variable %d by set to %d!", variable, value);
+}
+
 void FreescapeEngine::executeDestroy(FCLInstruction &instruction) {
 	uint16 objectID = 0;
 	uint16 areaID = _currentArea->getAreaID();


Commit: 0a837ed3eb305f14e858df08f1e99eec28c26039
    https://github.com/scummvm/scummvm/commit/0a837ed3eb305f14e858df08f1e99eec28c26039
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-01-29T20:55:06+01:00

Commit Message:
FREESCAPE: stop execution if some instruction is not implemented (except in castle)

Changed paths:
    engines/freescape/language/instruction.cpp


diff --git a/engines/freescape/language/instruction.cpp b/engines/freescape/language/instruction.cpp
index 473b3748cd3..f4a61b8245b 100644
--- a/engines/freescape/language/instruction.cpp
+++ b/engines/freescape/language/instruction.cpp
@@ -104,6 +104,8 @@ void FreescapeEngine::executeCode(FCLInstructionVector &code, bool shot, bool co
 		debugC(1, kFreescapeDebugCode, "Executing ip: %d in code with size: %d", ip, codeSize);
 		switch (instruction.getType()) {
 		default:
+			if (!isCastle())
+				error("Instruction %x at ip: %d not implemented!", instruction.getType(), ip);
 			break;
 		case Token::COLLIDEDQ:
 			if (collided)


Commit: 5a0ee7b946737b8318cad7cad96135e13e909d91
    https://github.com/scummvm/scummvm/commit/5a0ee7b946737b8318cad7cad96135e13e909d91
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-01-29T20:55:21+01:00

Commit Message:
FREESCAPE: make sure skanner is invisible at start in driller

Changed paths:
    engines/freescape/games/driller.cpp


diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 129cf255948..1e6c31ea665 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -1498,6 +1498,7 @@ void DrillerEngine::addSkanner(Area *area) {
 	obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
 	assert(obj);
 	obj = (GeometricObject *)obj->duplicate();
+	obj->makeInvisible();
 	area->addObject(obj);
 
 	id = 249;
@@ -1505,6 +1506,7 @@ void DrillerEngine::addSkanner(Area *area) {
 	obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
 	assert(obj);
 	obj = (GeometricObject *)obj->duplicate();
+	obj->makeInvisible();
 	area->addObject(obj);
 
 	id = 250;
@@ -1512,6 +1514,7 @@ void DrillerEngine::addSkanner(Area *area) {
 	obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
 	assert(obj);
 	obj = (GeometricObject *)obj->duplicate();
+	obj->makeInvisible();
 	area->addObject(obj);
 }
 


Commit: 7dee4515bd4d1c9788165a1bca0cd54e2cd935fb
    https://github.com/scummvm/scummvm/commit/7dee4515bd4d1c9788165a1bca0cd54e2cd935fb
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-01-29T20:55:34+01:00

Commit Message:
FREESCAPE: fix corner case in 8bit instruction parsing

Changed paths:
    engines/freescape/language/8bitDetokeniser.cpp
    engines/freescape/language/instruction.cpp
    engines/freescape/language/token.h


diff --git a/engines/freescape/language/8bitDetokeniser.cpp b/engines/freescape/language/8bitDetokeniser.cpp
index 20eb2d0733a..db1e0dc3223 100644
--- a/engines/freescape/language/8bitDetokeniser.cpp
+++ b/engines/freescape/language/8bitDetokeniser.cpp
@@ -111,6 +111,7 @@ Common::String detokenise8bitCondition(Common::Array<uint8> &tokenisedCondition,
 
 		case 0:
 			detokenisedStream += "NOP ";
+			currentInstruction = FCLInstruction(Token::NOP);
 			break; // NOP
 		case 1:    // add three-byte value to score
 		{
@@ -180,6 +181,8 @@ Common::String detokenise8bitCondition(Common::Array<uint8> &tokenisedCondition,
 			currentInstruction.setDestination(1);
 			conditionalInstructions->push_back(currentInstruction);
 			currentInstruction = FCLInstruction(Token::UNKNOWN);
+			bytePointer++;
+			numberOfArguments = 0;
 			break;
 		case 10:
 			detokenisedStream += "SUBVAR (1, v";
@@ -188,7 +191,8 @@ Common::String detokenise8bitCondition(Common::Array<uint8> &tokenisedCondition,
 			currentInstruction.setDestination(1);
 			conditionalInstructions->push_back(currentInstruction);
 			currentInstruction = FCLInstruction(Token::UNKNOWN);
-			break;
+			bytePointer++;
+			numberOfArguments = 0;
 			break;
 
 		case 11: // end condition if a variable doesn't have a particular value
@@ -347,6 +351,7 @@ Common::String detokenise8bitCondition(Common::Array<uint8> &tokenisedCondition,
 
 		case 35:
 			detokenisedStream += "SCREEN (";
+			currentInstruction = FCLInstruction(Token::SCREEN);
 			break;
 
 		case 44:
@@ -394,6 +399,7 @@ Common::String detokenise8bitCondition(Common::Array<uint8> &tokenisedCondition,
 			}
 
 			detokenisedStream += ")";
+			assert(currentInstruction.getType() != Token::UNKNOWN);
 			conditionalInstructions->push_back(currentInstruction);
 			currentInstruction = FCLInstruction(Token::UNKNOWN);
 		}
diff --git a/engines/freescape/language/instruction.cpp b/engines/freescape/language/instruction.cpp
index f4a61b8245b..ef9e656ffa9 100644
--- a/engines/freescape/language/instruction.cpp
+++ b/engines/freescape/language/instruction.cpp
@@ -171,6 +171,9 @@ void FreescapeEngine::executeCode(FCLInstructionVector &code, bool shot, bool co
 		case Token::SPFX:
 			executeSPFX(instruction);
 			break;
+		case Token::SCREEN:
+			// TODO
+			break;
 		case Token::BITNOTEQ:
 			if (executeEndIfBitNotEqual(instruction))
 				ip = codeSize;
diff --git a/engines/freescape/language/token.h b/engines/freescape/language/token.h
index 90149d495e1..77ec65b2dde 100644
--- a/engines/freescape/language/token.h
+++ b/engines/freescape/language/token.h
@@ -54,6 +54,7 @@ public:
 		MOVE,
 		MOVETO,
 		NOTV,
+		NOP,
 		OR,
 		ORV,
 		GETXPOS,
@@ -63,6 +64,7 @@ public:
 		RESTART,
 		REDRAW,
 		REMOVE,
+		SCREEN,
 		SOUND,
 		SETVAR,
 		SHOTQ,


Commit: 7bf753100974820a5a438e0a2fdd13534b3ee567
    https://github.com/scummvm/scummvm/commit/7bf753100974820a5a438e0a2fdd13534b3ee567
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-01-29T20:55:45+01:00

Commit Message:
FREESCAPE: avoid re-adding skanner objects

Changed paths:
    engines/freescape/games/driller.cpp


diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 1e6c31ea665..52d9a51cca1 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -1494,6 +1494,10 @@ void DrillerEngine::addSkanner(Area *area) {
 	int16 id;
 
 	id = 248;
+	// If first object is already added, do not re-add any
+	if (area->objectWithID(id) != nullptr)
+		return;
+
 	debugC(1, kFreescapeDebugParser, "Adding object %d to room structure", id);
 	obj = (GeometricObject *)_areaMap[255]->objectWithID(id);
 	assert(obj);


Commit: 2468c58ea344ea6c86b3d173c1d2f7fa7d462288
    https://github.com/scummvm/scummvm/commit/2468c58ea344ea6c86b3d173c1d2f7fa7d462288
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-01-29T20:55:55+01:00

Commit Message:
FREESCAPE: UI fixes for zx and cpc releases of driller

Changed paths:
    engines/freescape/games/driller.cpp


diff --git a/engines/freescape/games/driller.cpp b/engines/freescape/games/driller.cpp
index 52d9a51cca1..a30e97a8087 100644
--- a/engines/freescape/games/driller.cpp
+++ b/engines/freescape/games/driller.cpp
@@ -1213,11 +1213,11 @@ void DrillerEngine::drawInfoMenu() {
 	drawStringInSurface(Common::String::format("%13s : %d", "total sectors", 18), 84, 73, front, black, surface);
 	drawStringInSurface(Common::String::format("%13s : %d", "safe sectors", _gameStateVars[32]), 84, 81, front, black, surface);
 
-	if (isDOS()) {
+	if (isDOS() || isCPC()) {
 		drawStringInSurface("l-load s-save esc-terminate", 53, 97, front, black, surface);
 		drawStringInSurface("t-toggle sound on/off", 76, 105, front, black, surface);
 	} else if (isSpectrum()) {
-		drawStringInSurface("l-load s-save 1-abort", 53, 97, front, black, surface);
+		drawStringInSurface("l-load s-save 1-abort", 76, 97, front, black, surface);
 		drawStringInSurface("any other key-continue", 76, 105, front, black, surface);
 	}
 
@@ -1247,7 +1247,7 @@ void DrillerEngine::drawInfoMenu() {
 					_gfx->setViewport(_viewArea);
 				} else if (isDOS() && event.kbd.keycode == Common::KEYCODE_t) {
 					// TODO
-				} else if (isDOS() && event.kbd.keycode == Common::KEYCODE_ESCAPE) {
+				} else if ((isDOS() || isCPC()) && event.kbd.keycode == Common::KEYCODE_ESCAPE) {
 					_forceEndGame = true;
 					cont = false;
 				} else if (isSpectrum() && event.kbd.keycode == Common::KEYCODE_1) {




More information about the Scummvm-git-logs mailing list