[Scummvm-git-logs] scummvm master -> 5099963f3f01725240ee4a5b955fe9f74caae0a3

neuromancer noreply at scummvm.org
Sat Oct 5 08:43:00 UTC 2024


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

Summary:
4a068df9d7 FREESCAPE: more font improvements for castle for dos
e3af52fa68 FREESCAPE: more font improvements for castle for dos
db6ac69465 FREESCAPE: avoid double free in drawFullscreenRiddleAndWait
75d4b92e2c FREESCAPE: state transition fixes for castle zx
852df15bd9 FREESCAPE: endgame fixes for castle zx
5099963f3f FREESCAPE: initial support for hercules video in driller dos


Commit: 4a068df9d741be81d11977431fad96a0b983ac00
    https://github.com/scummvm/scummvm/commit/4a068df9d741be81d11977431fad96a0b983ac00
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-05T10:44:19+02:00

Commit Message:
FREESCAPE: more font improvements for castle for dos

Changed paths:
    engines/freescape/games/castle/dos.cpp
    engines/freescape/games/castle/zx.cpp


diff --git a/engines/freescape/games/castle/dos.cpp b/engines/freescape/games/castle/dos.cpp
index df6ae8c765f..71571435af2 100644
--- a/engines/freescape/games/castle/dos.cpp
+++ b/engines/freescape/games/castle/dos.cpp
@@ -238,12 +238,10 @@ void CastleEngine::loadAssetsDOSFullGame() {
 				charsRiddle[i]->convertToInPlace(_gfx->_texturePixelFormat, (byte *)&kEGARiddleFontPalette, 16);
 			}
 			_font = Font(chars);
-			_font.setCharWidth(8 + 1);
-			//_font.setTransparentColor(_gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00));
+			_font.setCharWidth(9);
 
 			_fontRiddle = Font(charsRiddle);
-			_fontRiddle.setCharWidth(8 + 1);
-			//_fontRiddle.setTransparentColor(_gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00));
+			_fontRiddle.setCharWidth(9);
 			_fontLoaded = true;
 
 			// No header
@@ -271,7 +269,7 @@ void CastleEngine::loadAssetsDOSFullGame() {
 		switch (_language) {
 			case Common::ES_ESP:
 				stream = decryptFile("CMLS");
-				loadRiddles(stream, 0xaae, 20);
+				loadRiddles(stream, 0xaae - 2 - 20 * 2, 20);
 				break;
 			case Common::FR_FRA:
 				stream = decryptFile("CMLF");
@@ -323,7 +321,6 @@ void CastleEngine::loadAssetsDOSDemo() {
 		stream = unpackEXE(file);
 		if (stream) {
 			loadSpeakerFxDOS(stream, 0x636d + 0x200, 0x63ed + 0x200);
-			//loadDOSFonts(stream, 0x293f6);
 
 			stream->seek(0x197c0 - 0x2a0);
 			_endGameBackgroundFrame = loadFrameFromPlanes(stream, 112, 108);
@@ -379,6 +376,27 @@ void CastleEngine::loadAssetsDOSDemo() {
 			// No header
 			_thunderFrame = loadFrameFromPlanes(stream, 16, 128);
 			_thunderFrame->convertToInPlace(_gfx->_texturePixelFormat, (byte *)&kEGADefaultPalette, 16);
+
+			stream->seek(0x293f6); // TODO: check this
+			Common::Array<Graphics::ManagedSurface *> chars;
+			Common::Array<Graphics::ManagedSurface *> charsRiddle;
+			for (int i = 0; i < 90; i++) {
+				Graphics::ManagedSurface *img = loadFrameFromPlanes(stream, 8, 8);
+				Graphics::ManagedSurface *imgRiddle = new Graphics::ManagedSurface();
+				imgRiddle->copyFrom(*img);
+
+				chars.push_back(img);
+				chars[i]->convertToInPlace(_gfx->_texturePixelFormat, (byte *)&kEGADefaultPalette, 16);
+
+				charsRiddle.push_back(imgRiddle);
+				charsRiddle[i]->convertToInPlace(_gfx->_texturePixelFormat, (byte *)&kEGARiddleFontPalette, 16);
+			}
+			_font = Font(chars);
+			_font.setCharWidth(9);
+
+			_fontRiddle = Font(charsRiddle);
+			_fontRiddle.setCharWidth(9);
+			_fontLoaded = true;
 		}
 
 		delete stream;
@@ -401,7 +419,7 @@ void CastleEngine::loadAssetsDOSDemo() {
 
 		stream = decryptFile("CMLD"); // Only english
 		loadMessagesVariableSize(stream, 0x11, 164);
-		loadRiddles(stream, 0xaae, 21);
+		loadRiddles(stream, 0xaae - 2 - 21 * 2, 21);
 		delete stream;
 
 		stream = decryptFile("CDEDF");
diff --git a/engines/freescape/games/castle/zx.cpp b/engines/freescape/games/castle/zx.cpp
index df054decbcb..a2f9fb367fd 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -118,7 +118,6 @@ void CastleEngine::loadAssetsZXFullGame() {
 			loadMessagesVariableSize(&file, 0xf3d, 71);
 			load8bitBinary(&file, 0x6aab - 2, 16);
 			loadSpeakerFxZX(&file, 0xca0, 0xcdc);
-			//loadFonts(&file, 0x1218 + 16);
 
 			file.seek(0x1218 + 16);
 			for (int i = 0; i < 90; i++) {
@@ -127,6 +126,7 @@ void CastleEngine::loadAssetsZXFullGame() {
 				chars.push_back(loadFrame(&file, surface, 1, 8, 1));
 			}
 			_font = Font(chars);
+			_font.setCharWidth(9);
 			_fontLoaded = true;
 
 			break;
@@ -134,7 +134,6 @@ void CastleEngine::loadAssetsZXFullGame() {
 			loadRiddles(&file, 0x145c - 2 - 9 * 2, 9);
 			load8bitBinary(&file, 0x6a3b, 16);
 			loadSpeakerFxZX(&file, 0xc91, 0xccd);
-			//loadFonts(&file, 0x1219);
 
 			file.seek(0x1219);
 			for (int i = 0; i < 90; i++) {
@@ -143,6 +142,7 @@ void CastleEngine::loadAssetsZXFullGame() {
 				chars.push_back(loadFrame(&file, surface, 1, 8, 1));
 			}
 			_font = Font(chars);
+			_font.setCharWidth(9);
 			_fontLoaded = true;
 
 			break;
@@ -190,7 +190,7 @@ void CastleEngine::loadAssetsZXFullGame() {
 
 	_strenghtWeightsFrames = loadFramesWithHeader(&file, _language == Common::ES_ESP ? 0xf92 : 0xf83, 4, yellow, black);
 
-	_flagFrames = loadFramesWithHeader(&file, 0x10e4, 4, green, black);
+	_flagFrames = loadFramesWithHeader(&file, (_language == Common::ES_ESP ? 0x10e4 + 15 : 0x10e4), 4, green, black);
 
 	int thunderWidth = 4;
 	int thunderHeight = 43;


Commit: e3af52fa6831efbad2ad88264d19925f67f774dc
    https://github.com/scummvm/scummvm/commit/e3af52fa6831efbad2ad88264d19925f67f774dc
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-05T10:44:19+02:00

Commit Message:
FREESCAPE: more font improvements for castle for dos

Changed paths:
    engines/freescape/loaders/8bitBinaryLoader.cpp


diff --git a/engines/freescape/loaders/8bitBinaryLoader.cpp b/engines/freescape/loaders/8bitBinaryLoader.cpp
index 825d9cb6bf1..b8d790ec46d 100644
--- a/engines/freescape/loaders/8bitBinaryLoader.cpp
+++ b/engines/freescape/loaders/8bitBinaryLoader.cpp
@@ -951,11 +951,6 @@ void FreescapeEngine::loadFonts(Common::SeekableReadStream *file, int offset) {
 		chars = getChars(file, offset, 85);
 
 	_font = Font(chars);
-	if (isCastle())
-		_font.setKernelingOffset(4);
-	else
-		_font.setKernelingOffset(0);
-
 	_fontLoaded = true;
 }
 


Commit: db6ac69465d384f2a0bfcfb68c8dea0b3e02a7d6
    https://github.com/scummvm/scummvm/commit/db6ac69465d384f2a0bfcfb68c8dea0b3e02a7d6
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-05T10:44:19+02:00

Commit Message:
FREESCAPE: avoid double free in drawFullscreenRiddleAndWait

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


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 5a0497befcc..9f5d13dd731 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -716,6 +716,11 @@ void CastleEngine::loadRiddles(Common::SeekableReadStream *file, int offset, int
 }
 
 void CastleEngine::drawFullscreenRiddleAndWait(uint16 riddle) {
+	if (_savedScreen) {
+		_savedScreen->free();
+		delete _savedScreen;
+	}
+
 	_savedScreen = _gfx->getScreenshot();
 	int frontColor = 6;
 	switch (_renderMode) {
@@ -770,6 +775,7 @@ void CastleEngine::drawFullscreenRiddleAndWait(uint16 riddle) {
 
 	_savedScreen->free();
 	delete _savedScreen;
+	_savedScreen = nullptr;
 	surface->free();
 	delete surface;
 }


Commit: 75d4b92e2c17b7bd23275945984ac70997ca1580
    https://github.com/scummvm/scummvm/commit/75d4b92e2c17b7bd23275945984ac70997ca1580
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-05T10:44:19+02:00

Commit Message:
FREESCAPE: state transition fixes for castle zx

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


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 9f5d13dd731..6a56656c3e5 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -990,6 +990,7 @@ void CastleEngine::drawSensorShoot(Sensor *sensor) {
 void CastleEngine::tryToCollectKey() {
 	if (_gameStateVars[32] > 0) { // Key collected!
 		if (_keysCollected.size() < 10) {
+			_gameStateVars[31]++;
 			setGameBit(_gameStateVars[32]);
 			_keysCollected.push_back(_gameStateVars[32]);
 		}
diff --git a/engines/freescape/language/instruction.cpp b/engines/freescape/language/instruction.cpp
index 0eeb07e891d..6cb4788bd73 100644
--- a/engines/freescape/language/instruction.cpp
+++ b/engines/freescape/language/instruction.cpp
@@ -316,10 +316,10 @@ void FreescapeEngine::executeExecute(FCLInstruction &instruction) {
 			obj = _areaMap[255]->entranceWithID(objId);
 			assert(obj);
 			executeEntranceConditions((Entrance *)obj);
+			return;
 		}
-	} else
-		executeObjectConditions((GeometricObject *)obj, true, false, false);
-
+	}
+	executeObjectConditions((GeometricObject *)obj, true, false, false);
 }
 
 void FreescapeEngine::executeSound(FCLInstruction &instruction) {


Commit: 852df15bd9b806ecb1e7ec65250905bc90f2aee3
    https://github.com/scummvm/scummvm/commit/852df15bd9b806ecb1e7ec65250905bc90f2aee3
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-05T10:44:19+02:00

Commit Message:
FREESCAPE: endgame fixes for castle zx

Changed paths:
    engines/freescape/games/castle/castle.cpp
    engines/freescape/games/castle/zx.cpp


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 6a56656c3e5..92ab375d4d5 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -362,7 +362,11 @@ void CastleEngine::initGameState() {
 }
 
 bool CastleEngine::checkIfGameEnded() {
-	return FreescapeEngine::checkIfGameEnded();
+	if (getGameBit(31)) { // Escaped!
+		_gameStateControl = kFreescapeGameStateEnd;
+		return true;
+	} else
+		return FreescapeEngine::checkIfGameEnded();
 }
 
 void CastleEngine::endGame() {
diff --git a/engines/freescape/games/castle/zx.cpp b/engines/freescape/games/castle/zx.cpp
index a2f9fb367fd..8dd48a0c0c5 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -213,10 +213,12 @@ void CastleEngine::loadAssetsZXFullGame() {
 
 		it._value->addObjectFromArea(164, _areaMap[255]);
 		it._value->addObjectFromArea(174, _areaMap[255]);
+		it._value->addObjectFromArea(175, _areaMap[255]);
 		for (int16 id = 136; id < 140; id++) {
 			it._value->addObjectFromArea(id, _areaMap[255]);
 		}
 
+		it._value->addObjectFromArea(195, _areaMap[255]);
 		for (int16 id = 214; id < 228; id++) {
 			it._value->addObjectFromArea(id, _areaMap[255]);
 		}


Commit: 5099963f3f01725240ee4a5b955fe9f74caae0a3
    https://github.com/scummvm/scummvm/commit/5099963f3f01725240ee4a5b955fe9f74caae0a3
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-05T10:44:19+02:00

Commit Message:
FREESCAPE: initial support for hercules video in driller dos

Changed paths:
    engines/freescape/font.cpp
    engines/freescape/games/driller/dos.cpp
    engines/freescape/games/driller/driller.cpp
    engines/freescape/loaders/8bitBinaryLoader.cpp
    engines/freescape/ui.cpp


diff --git a/engines/freescape/font.cpp b/engines/freescape/font.cpp
index d3ff8a883fe..d60a46abece 100644
--- a/engines/freescape/font.cpp
+++ b/engines/freescape/font.cpp
@@ -92,9 +92,9 @@ void Font::drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 col
 		surface.convertToInPlace(dst->format, (byte *)palette, 3);
 
 	if (_backgroundColor == dst->format.ARGBToColor(0x00, 0x00, 0x00, 0x00))
-		dst->copyRectToSurfaceWithKey(surface, x, y, Common::Rect(0, 0, 8, surface.h), dst->format.ARGBToColor(0xFF, 0x00, 0x00, 0x00));
+		dst->copyRectToSurfaceWithKey(surface, x, y, Common::Rect(0, 0, _charWidth, surface.h), dst->format.ARGBToColor(0xFF, 0x00, 0x00, 0x00));
 	else
-		dst->copyRectToSurface(surface, x, y, Common::Rect(0, 0, 8, surface.h));
+		dst->copyRectToSurface(surface, x, y, Common::Rect(0, 0, _charWidth, surface.h));
 
 	surface.free();
 }
@@ -118,13 +118,17 @@ Common::Array<Graphics::ManagedSurface *> FreescapeEngine::getChars(Common::Seek
 		int position = sizeX * sizeY * c;
 
 		Graphics::ManagedSurface *surface = new Graphics::ManagedSurface();
-		surface->create(sizeX, sizeY, Graphics::PixelFormat::createFormatCLUT8());
+		surface->create(_renderMode == Common::kRenderHercG ? 16 : 8, sizeY, Graphics::PixelFormat::createFormatCLUT8());
 		for (int j = 0; j < sizeY; j++) {
 			for (int i = 0; i < sizeX; i++) {
-				if (font.get(position + additional + j * 8 + i))
-					surface->setPixel(7 - i, j, 1);
-				else
-					surface->setPixel(7 - i, j, 0);
+				if (font.get(position + additional + j * 8 + i)) {
+					if (_renderMode != Common::kRenderHercG) {
+						surface->setPixel(7 - i, j, 1);
+					} else {
+						surface->setPixel(2 * (7 - i), j, 1);
+						surface->setPixel(2 * (7 - i) + 1, j, 1);
+					}
+				}
 			}
 		}
 		chars.push_back(surface);
diff --git a/engines/freescape/games/driller/dos.cpp b/engines/freescape/games/driller/dos.cpp
index ebb4411fc28..6b64a0112aa 100644
--- a/engines/freescape/games/driller/dos.cpp
+++ b/engines/freescape/games/driller/dos.cpp
@@ -438,30 +438,58 @@ void DrillerEngine::drawDOSUI(Graphics::Surface *surface) {
 	uint32 back = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
 
 	int score = _gameStateVars[k8bitVariableScore];
-	drawStringInSurface(_currentArea->_name, 197, 185, front, back, surface);
-	drawStringInSurface(Common::String::format("%04d", int(2 * _position.x())), 151, 145, front, back, surface);
-	drawStringInSurface(Common::String::format("%04d", int(2 * _position.z())), 151, 153, front, back, surface);
-	drawStringInSurface(Common::String::format("%04d", int(2 * _position.y())), 151, 161, front, back, surface);
+	Common::Point currentAreaPos = _renderMode == Common::kRenderHercG ? Common::Point(437, 293) : Common::Point(197, 185);
+	drawStringInSurface(_currentArea->_name, currentAreaPos.x, currentAreaPos.y, front, back, surface);
+
+	Common::Point coordinateXPos = _renderMode == Common::kRenderHercG ? Common::Point(345, 253) : Common::Point(151, 145);
+	Common::Point coordinateYPos = _renderMode == Common::kRenderHercG ? Common::Point(345, 261) : Common::Point(151, 153);
+	Common::Point coordinateZPos = _renderMode == Common::kRenderHercG ? Common::Point(345, 269) : Common::Point(151, 161);
+
+	drawStringInSurface(Common::String::format("%04d", int(2 * _position.x())), coordinateXPos.x, coordinateXPos.y, front, back, surface);
+	drawStringInSurface(Common::String::format("%04d", int(2 * _position.z())), coordinateYPos.x, coordinateYPos.y, front, back, surface);
+	drawStringInSurface(Common::String::format("%04d", int(2 * _position.y())), coordinateZPos.x, coordinateZPos.y, front, back, surface);
+
+	Common::Point playerHeightPos = _renderMode == Common::kRenderHercG ? Common::Point(157, 269) : Common::Point(57, 161);
 	if (_playerHeightNumber >= 0)
-		drawStringInSurface(Common::String::format("%d", _playerHeightNumber), 57, 161, front, back, surface);
+		drawStringInSurface(Common::String::format("%d", _playerHeightNumber), playerHeightPos.x, playerHeightPos.y, front, back, surface);
+	else
+		drawStringInSurface(Common::String::format("%s", "J"), playerHeightPos.x, playerHeightPos.y, front, back, surface);
+
+	Common::Point anglePos = _renderMode == Common::kRenderHercG ? Common::Point(141, 253) : Common::Point(47, 145);
+	drawStringInSurface(Common::String::format("%02d", int(_angleRotations[_angleRotationIndex])), anglePos.x, anglePos.y, front, back, surface);
+
+	Common::Point playerStepsPos;
+
+	if (_renderMode == Common::kRenderHercG)
+		playerStepsPos = Common::Point(130, 261);
+	else if (_renderMode == Common::kRenderCGA)
+		playerStepsPos = Common::Point(44, 153);
 	else
-		drawStringInSurface(Common::String::format("%s", "J"), 57, 161, front, back, surface);
+		playerStepsPos = Common::Point(47, 153);
 
-	drawStringInSurface(Common::String::format("%02d", int(_angleRotations[_angleRotationIndex])), 47, 145, front, back, surface);
-	drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), _renderMode == Common::kRenderCGA ? 44 : 47, 153, front, back, surface);
-	drawStringInSurface(Common::String::format("%07d", score), 239, 129, front, back, surface);
+	drawStringInSurface(Common::String::format("%3d", _playerSteps[_playerStepIndex]), playerStepsPos.x, playerStepsPos.y, front, back, surface);
+
+	Common::Point scorePos = _renderMode == Common::kRenderHercG ? Common::Point(522, 237) : Common::Point(238, 129);
+	drawStringInSurface(Common::String::format("%07d", score), scorePos.x, scorePos.y, front, back, surface);
 
 	int seconds, minutes, hours;
 	getTimeFromCountdown(seconds, minutes, hours);
-	drawStringInSurface(Common::String::format("%02d", hours), 208, 8, front, back, surface);
-	drawStringInSurface(Common::String::format("%02d", minutes), 231, 8, front, back, surface);
-	drawStringInSurface(Common::String::format("%02d", seconds), 255, 8, front, back, surface);
+
+	Common::Point hoursPos = _renderMode == Common::kRenderHercG ? Common::Point(462, 56) : Common::Point(208, 8);
+	drawStringInSurface(Common::String::format("%02d", hours), hoursPos.x, hoursPos.y, front, back, surface);
+
+	Common::Point minutesPos = _renderMode == Common::kRenderHercG ? Common::Point(506, 56) : Common::Point(231, 8);
+	drawStringInSurface(Common::String::format("%02d", minutes), minutesPos.x, minutesPos.y, front, back, surface);
+
+	Common::Point secondsPos = _renderMode == Common::kRenderHercG ? Common::Point(554, 56) : Common::Point(255, 8);
+	drawStringInSurface(Common::String::format("%02d", seconds), secondsPos.x, secondsPos.y, front, back, surface);
 
 	Common::String message;
 	int deadline;
 	getLatestMessages(message, deadline);
+	Common::Point messagePos = _renderMode == Common::kRenderHercG ? Common::Point(424, 285) : Common::Point(191, 177);
 	if (deadline <= _countdown) {
-		drawStringInSurface(message, 191, 177, back, front, surface);
+		drawStringInSurface(message, messagePos.x, messagePos.y, back, front, surface);
 		_temporaryMessages.push_back(message);
 		_temporaryMessageDeadlines.push_back(deadline);
 	} else {
@@ -472,25 +500,27 @@ void DrillerEngine::drawDOSUI(Graphics::Surface *surface) {
 		else
 			message = _messagesList[1];
 
-		drawStringInSurface(message, 191, 177, front, back, surface);
+		drawStringInSurface(message, messagePos.x, messagePos.y, front, back, surface);
 	}
 
 	int energy = _gameStateVars[k8bitVariableEnergy];
 	int shield = _gameStateVars[k8bitVariableShield];
 
-	if (energy >= 0) {
-		Common::Rect backBar(20, 185, 88 - energy, 191);
-		surface->fillRect(backBar, back);
-		Common::Rect energyBar(87 - energy, 185, 88, 191);
-		surface->fillRect(energyBar, front);
-	}
+	if (_renderMode != Common::kRenderHercG) {
+		if (energy >= 0) {
+			Common::Rect backBar(20, 185, 88 - energy, 191);
+			surface->fillRect(backBar, back);
+			Common::Rect energyBar(87 - energy, 185, 88, 191);
+			surface->fillRect(energyBar, front);
+		}
 
-	if (shield >= 0) {
-		Common::Rect backBar(20, 177, 88 - shield, 183);
-		surface->fillRect(backBar, back);
+		if (shield >= 0) {
+			Common::Rect backBar(20, 177, 88 - shield, 183);
+			surface->fillRect(backBar, back);
 
-		Common::Rect shieldBar(87 - shield, 177, 88, 183);
-		surface->fillRect(shieldBar, front);
+			Common::Rect shieldBar(87 - shield, 177, 88, 183);
+			surface->fillRect(shieldBar, front);
+		}
 	}
 
 	if (_indicators.size() >= 2) {
@@ -504,8 +534,10 @@ void DrillerEngine::drawDOSUI(Graphics::Surface *surface) {
 	_gfx->readFromPalette(color, r, g, b);
 	uint32 other = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
 
-	drawCompass(surface, 87, 156, _yaw, 10, other);
-	drawCompass(surface, 230, 156, _pitch - 30, 10, other);
+	Common::Point compassYawPos = _renderMode == Common::kRenderHercG ? Common::Point(214, 264) : Common::Point(87, 156);
+	drawCompass(surface, compassYawPos.x, compassYawPos.y, _yaw, 10, other);
+	Common::Point compassPitchPos = _renderMode == Common::kRenderHercG ? Common::Point(502, 264) : Common::Point(230, 156);
+	drawCompass(surface, compassPitchPos.x, compassPitchPos.y, _pitch - 30, 10, other);
 }
 
 } // End of namespace Freescape
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 1aa255e4036..0ba23e9106d 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -328,6 +328,7 @@ void DrillerEngine::drawInfoMenu() {
 
 	switch (_renderMode) {
 		case Common::kRenderCGA:
+		case Common::kRenderHercG:
 			color = 1;
 			break;
 		case Common::kRenderZX:
diff --git a/engines/freescape/loaders/8bitBinaryLoader.cpp b/engines/freescape/loaders/8bitBinaryLoader.cpp
index b8d790ec46d..d70ba705196 100644
--- a/engines/freescape/loaders/8bitBinaryLoader.cpp
+++ b/engines/freescape/loaders/8bitBinaryLoader.cpp
@@ -951,6 +951,9 @@ void FreescapeEngine::loadFonts(Common::SeekableReadStream *file, int offset) {
 		chars = getChars(file, offset, 85);
 
 	_font = Font(chars);
+	if (_renderMode == Common::kRenderHercG) {
+		_font.setCharWidth(16);
+	}
 	_fontLoaded = true;
 }
 
diff --git a/engines/freescape/ui.cpp b/engines/freescape/ui.cpp
index da5591fabe3..32009c5a4fa 100644
--- a/engines/freescape/ui.cpp
+++ b/engines/freescape/ui.cpp
@@ -78,6 +78,7 @@ Graphics::Surface *FreescapeEngine::drawStringsInSurface(const Common::Array<Com
 
 	switch (_renderMode) {
 		case Common::kRenderCGA:
+		case Common::kRenderHercG:
 			color = 1;
 			break;
 		case Common::kRenderZX:




More information about the Scummvm-git-logs mailing list