[Scummvm-git-logs] scummvm master -> e8550f040cb690158c827520c8c1a1501f2c6a60

neuromancer noreply at scummvm.org
Thu Mar 21 08:18:13 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:
80d4e71d7f FREESCAPE: fixes for end game in dark and eclipse
d88e762063 FREESCAPE: improved zx sound emulation using pc speaker
64627cb38e FREESCAPE: added full release of eclipse for zx
03cb4e1789 FREESCAPE: initial support for eclipse 2 in zx
bbb35a5ed7 FREESCAPE: play the intro in eclipse 2 for zx
e8550f040c FREESCAPE: initial eclipse support for cpc


Commit: 80d4e71d7f82edadeb64c5f4df5aafef63d27ff7
    https://github.com/scummvm/scummvm/commit/80d4e71d7f82edadeb64c5f4df5aafef63d27ff7
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-03-21T09:18:49+01:00

Commit Message:
FREESCAPE: fixes for end game in dark and eclipse

Changed paths:
    engines/freescape/games/dark/dark.cpp
    engines/freescape/games/eclipse/eclipse.cpp


diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 87ecc81da18..4229ce125ef 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -399,6 +399,11 @@ bool DarkEngine::checkIfGameEnded() {
 				playSound(19, true);
 		}
 		_gameStateVars[kVariableDarkECD] = 0;
+
+		if (_gameStateVars[kVariableActiveECDs] == 0) {
+			_gameStateControl = kFreescapeGameStateEnd;
+			_gameStateVars[kVariableDarkEnding] = kDarkEndingECDsDestroyed;
+		}
 	}
 	return false;
 }
@@ -410,15 +415,26 @@ void DarkEngine::endGame() {
 		return;
 
 	if (_gameStateControl == kFreescapeGameStateEnd) {
-		if (!_ticksFromEnd)
-			_ticksFromEnd = _ticks;
-		else if ((_ticks - _ticksFromEnd) / 15 >= 15) {
-			if (_gameStateVars[kVariableDarkEnding]) {
-				executeLocalGlobalConditions(false, true, false);
-				_gameStateVars[kVariableDarkEnding] = 0;
-				insertTemporaryMessage(_messagesList[22], INT_MIN);
-				_currentArea->_colorRemaps.clear();
-				_gfx->setColorRemaps(&_currentArea->_colorRemaps);
+
+		if (_gameStateVars[kVariableDarkEnding] == kDarkEndingECDsDestroyed) {
+			insertTemporaryMessage(_messagesList[19], INT_MIN);
+			executeLocalGlobalConditions(false, true, false);
+			_currentArea->_colorRemaps.clear();
+			_gfx->setColorRemaps(&_currentArea->_colorRemaps);
+			_gameStateVars[kVariableDarkEnding] = 0;
+		} else if (_gameStateVars[kVariableDarkEnding] == kDarkEndingEvathDestroyed) {
+			if (!_ticksFromEnd)
+				_ticksFromEnd = _ticks;
+			else if ((_ticks - _ticksFromEnd) / 15 >= 15) {
+				if (_gameStateVars[kVariableDarkEnding]) {
+					executeLocalGlobalConditions(false, true, false);
+					if (_gameStateVars[kVariableDarkEnding] == kDarkEndingEvathDestroyed)
+						insertTemporaryMessage(_messagesList[22], INT_MIN);
+
+					_currentArea->_colorRemaps.clear();
+					_gfx->setColorRemaps(&_currentArea->_colorRemaps);
+					_gameStateVars[kVariableDarkEnding] = 0;
+				}
 			}
 		}
 	}
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index 1e05f95c2f7..47860ca0f84 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -91,21 +91,26 @@ void EclipseEngine::loadAssets() {
 }
 
 bool EclipseEngine::checkIfGameEnded() {
-	if (_hasFallen && _avoidRenderingFrames == 0) {
-		_hasFallen = false;
-		playSoundFx(4, false);
-
-		// If shield is less than 11 after a fall, the game ends
-		if (_gameStateVars[k8bitVariableShield] > 15 + 11) {
-			_gameStateVars[k8bitVariableShield] -= 15;
-			return false; // Game can continue
+	if (_gameStateControl == kFreescapeGameStatePlaying) {
+		if (_hasFallen && _avoidRenderingFrames == 0) {
+			_hasFallen = false;
+			playSoundFx(4, false);
+
+			// If shield is less than 11 after a fall, the game ends
+			if (_gameStateVars[k8bitVariableShield] > 15 + 11) {
+				_gameStateVars[k8bitVariableShield] -= 15;
+				return false; // Game can continue
+			}
+			if (!_fallenMessage.empty())
+				insertTemporaryMessage(_fallenMessage, _countdown - 4);
+			_gameStateControl = kFreescapeGameStateEnd;
+		} else if (getGameBit(16)) {
+			_gameStateControl = kFreescapeGameStateEnd;
+			insertTemporaryMessage(_messagesList[4], INT_MIN);
 		}
-		if (!_fallenMessage.empty())
-			insertTemporaryMessage(_fallenMessage, _countdown - 4);
-		_gameStateControl = kFreescapeGameStateEnd;
-	}
 
-	FreescapeEngine::checkIfGameEnded();
+		FreescapeEngine::checkIfGameEnded();
+	}
 	return false;
 }
 
@@ -117,13 +122,20 @@ void EclipseEngine::endGame() {
 
 	if (_gameStateControl == kFreescapeGameStateEnd) {
 		removeTimers();
-		if (_countdown > 0)
-			_countdown -= 10;
-		else
-			_countdown = 0;
+		if (getGameBit(16)) {
+			if (_countdown > - 3600)
+				_countdown -= 10;
+			else
+				_countdown = -3600;
+		} else {
+			if (_countdown > 0)
+				_countdown -= 10;
+			else
+				_countdown = 0;
+		}
 	}
 
-	if (_endGameKeyPressed && _countdown == 0) {
+	if (_endGameKeyPressed && (_countdown == 0 || _countdown == -3600)) {
 		if (isSpectrum())
 			playSound(5, true);
 		_gameStateControl = kFreescapeGameStateRestart;
@@ -159,7 +171,10 @@ void EclipseEngine::gotoArea(uint16 areaID, int entranceID) {
 			playSound(9, true);
 	} if (areaID == _endArea && entranceID == _endEntrance) {
 		_flyMode = true;
-		_pitch = 20;
+		if (isDemo())
+			_pitch = 20;
+		else
+			_pitch = 10;
 	} else {
 		if (isSpectrum())
 			playSound(7, false);
@@ -178,13 +193,13 @@ void EclipseEngine::drawBackground() {
 	clearBackground();
 	_gfx->drawBackground(_currentArea->_skyColor);
 	if (_currentArea && _currentArea->getAreaID() == 1) {
-		if (_countdown <= 15 * 60) // Last 15 minutes
+		if (ABS(_countdown) <= 15 * 60) // Last 15 minutes
 			_gfx->drawBackground(5);
-		if (_countdown <= 10) // Last 10 seconds
+		if (ABS(_countdown) <= 10) // Last 10 seconds
 			_gfx->drawBackground(1);
 
 		float progress = 0;
-		if (_countdown >= 0)
+		if (_countdown >= 0 || getGameBit(16))
 			progress = float(_countdown) / _initialCountdown;
 
 		uint8 color1 = 15;


Commit: d88e762063d69a3890fd89256c1130f80d534467
    https://github.com/scummvm/scummvm/commit/d88e762063d69a3890fd89256c1130f80d534467
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-03-21T09:18:49+01:00

Commit Message:
FREESCAPE: improved zx sound emulation using pc speaker

Changed paths:
    engines/freescape/sound.cpp


diff --git a/engines/freescape/sound.cpp b/engines/freescape/sound.cpp
index c6fbb930641..8a8c5cdb424 100644
--- a/engines/freescape/sound.cpp
+++ b/engines/freescape/sound.cpp
@@ -155,29 +155,17 @@ void FreescapeEngine::loadSpeakerFxZX(Common::SeekableReadStream *file, int sfxT
 				assert(cond1 || cond2 || cond3);
 				do {
 					soundUnitZX soundUnit;
-					soundUnit.freqTimesSeconds = 200;
-					soundUnit.tStates = 437500 / 200 - 30.125;
+					soundUnit.freqTimesSeconds = 2000;
+					soundUnit.tStates = 437500 / 2000 - 30.125;
 					int totalSize = soundSize + sVar7;
 					//debugN("totalSize: %x ", totalSize);
-					soundUnit.multiplier = totalSize / 50;
+					soundUnit.multiplier = float(totalSize) / 2000; // 4000
 					_soundsSpeakerFxZX[i]->push_back(soundUnit);
 					//debugN("%x ", silenceSize);
 					soundUnit.freqTimesSeconds = 0;
 					soundUnit.tStates = 0;
-					soundUnit.multiplier = (silenceSize + 1) / 50;
+					soundUnit.multiplier = float(silenceSize) / 100;// + 1) / 100;
 					_soundsSpeakerFxZX[i]->push_back(soundUnit);
-
-					//do {
-					//	cVar3 = cVar3 + -1;
-					//} while (cVar3 != '\0');
-
-					//uint8 bVar9 = (byte)((uint16)sVar7);
-					//bVar4 = bVar9;
-					//do {
-					//	bVar4 = bVar4 - 1;
-					//} while (bVar4 != 0);
-					//soundType = (soundType | 0x18) & 0xf;
-					//ULA_PORT = soundType;
 					repetitions = repetitions + -1;
 					soundSize = SFXtempStruct[5] + soundSize;
 
@@ -219,9 +207,9 @@ void FreescapeEngine::loadSpeakerFxZX(Common::SeekableReadStream *file, int sfxT
 						//debug("wait %d", bVar1);
 						assert(bVar1 > 0);
 						soundUnitZX soundUnit;
-						soundUnit.freqTimesSeconds = beep ? 50 : 0;
-						soundUnit.tStates = beep ? 437500 / 50 - 30.125 : 0;
-						soundUnit.multiplier = bVar1 / 100;
+						soundUnit.freqTimesSeconds = beep ? 1000 : 0;
+						soundUnit.tStates = beep ? 437500 / 1000 - 30.125 : 0;
+						soundUnit.multiplier = float(bVar1) / 500;
 						_soundsSpeakerFxZX[i]->push_back(soundUnit);
 
 						// No need to wait


Commit: 64627cb38efe0987311de8c531bd71efb043b575
    https://github.com/scummvm/scummvm/commit/64627cb38efe0987311de8c531bd71efb043b575
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-03-21T09:18:49+01:00

Commit Message:
FREESCAPE: added full release of eclipse for zx

Changed paths:
    engines/freescape/detection.cpp
    engines/freescape/games/eclipse/eclipse.h
    engines/freescape/games/eclipse/zx.cpp


diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index fac975dec38..48972ee4625 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -485,6 +485,18 @@ static const ADGameDescription gameDescriptions[] = {
 		ADGF_UNSTABLE | ADGF_DEMO | GF_ZX_DEMO_CRASH,
 		GUIO1(GUIO_NOMIDI)
 	},
+	{
+		"totaleclipse",
+		"",
+		{
+			{"totaleclipse.zx.data", 0, "5bc0c4ff50407d16bb409776eda7f4a8", 36055},
+			AD_LISTEND
+		},
+		Common::EN_ANY,
+		Common::kPlatformZX,
+		ADGF_UNSTABLE,
+		GUIO1(GUIO_NOMIDI)
+	},
 	{
 		"totaleclipse",
 		"",
diff --git a/engines/freescape/games/eclipse/eclipse.h b/engines/freescape/games/eclipse/eclipse.h
index b9506d0b1a6..96262421a82 100644
--- a/engines/freescape/games/eclipse/eclipse.h
+++ b/engines/freescape/games/eclipse/eclipse.h
@@ -62,6 +62,8 @@ public:
 	void initDOS();
 	void initCPC();
 	void initZX();
+
+	void loadAssetsZXFullGame() override;
 	void loadAssetsCPCDemo() override;
 	void loadAssetsZXDemo() override;
 
diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index d3065aa5f1c..4a8d3ab8154 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -33,6 +33,39 @@ void EclipseEngine::initZX() {
 	_maxShield = 63;
 }
 
+void EclipseEngine::loadAssetsZXFullGame() {
+	Common::File file;
+
+	file.open("totaleclipse.zx.title");
+	if (file.isOpen()) {
+		_title = loadAndCenterScrImage(&file);
+	} else
+		error("Unable to find totaleclipse.zx.title");
+
+	file.close();
+	file.open("totaleclipse.zx.border");
+	if (file.isOpen()) {
+		_border = loadAndCenterScrImage(&file);
+	} else
+		error("Unable to find totaleclipse.zx.border");
+	file.close();
+
+	file.open("totaleclipse.zx.data");
+	if (!file.isOpen())
+		error("Failed to open totaleclipse.zx.data");
+
+	loadMessagesFixedSize(&file, 0x2ac, 16, 23);
+	loadSpeakerFxZX(&file, 0x816, 0x86a);
+	loadFonts(&file, 0x6163);
+	load8bitBinary(&file, 0x635b, 4);
+
+	for (auto &it : _areaMap) {
+		it._value->addStructure(_areaMap[255]);
+		for (int16 id = 183; id < 207; id++)
+			it._value->addObjectFromArea(id, _areaMap[255]);
+	}
+}
+
 void EclipseEngine::loadAssetsZXDemo() {
 	Common::File file;
 


Commit: 03cb4e17894b9b4a062014a2f8ccd1c39a2239b0
    https://github.com/scummvm/scummvm/commit/03cb4e17894b9b4a062014a2f8ccd1c39a2239b0
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-03-21T09:18:49+01:00

Commit Message:
FREESCAPE: initial support for eclipse 2 in zx

Changed paths:
    engines/freescape/detection.cpp
    engines/freescape/games/eclipse/zx.cpp
    engines/freescape/metaengine.cpp


diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index 48972ee4625..3f9c4be8b0e 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -33,6 +33,7 @@ static const PlainGameDescriptor freescapeGames[] = {
 	{"spacestationoblivion", "Space Station Oblivion"},
 	{"darkside", "Dark Side"},
 	{"totaleclipse", "Total Eclipse"},
+	{"totaleclipse2", "Total Eclipse 2"},
 	{"castlemaster", "Castle Master"},
 	{0, 0}};
 
@@ -497,6 +498,18 @@ static const ADGameDescription gameDescriptions[] = {
 		ADGF_UNSTABLE,
 		GUIO1(GUIO_NOMIDI)
 	},
+	{
+		"totaleclipse2",
+		"",
+		{
+			{"totaleclipse.zx.data", 0, "5e80cb6a518d5ab2192b845801b1a32e", 35661},
+			AD_LISTEND
+		},
+		Common::EN_ANY,
+		Common::kPlatformZX,
+		ADGF_UNSTABLE,
+		GUIO1(GUIO_NOMIDI)
+	},
 	{
 		"totaleclipse",
 		"",
diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index 4a8d3ab8154..37fe45480b3 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -35,6 +35,7 @@ void EclipseEngine::initZX() {
 
 void EclipseEngine::loadAssetsZXFullGame() {
 	Common::File file;
+	bool isTotalEclipse2 = _targetName.hasPrefix("totaleclipse2");
 
 	file.open("totaleclipse.zx.title");
 	if (file.isOpen()) {
@@ -54,13 +55,24 @@ void EclipseEngine::loadAssetsZXFullGame() {
 	if (!file.isOpen())
 		error("Failed to open totaleclipse.zx.data");
 
-	loadMessagesFixedSize(&file, 0x2ac, 16, 23);
-	loadSpeakerFxZX(&file, 0x816, 0x86a);
-	loadFonts(&file, 0x6163);
-	load8bitBinary(&file, 0x635b, 4);
+	if (isTotalEclipse2) {
+		loadMessagesFixedSize(&file, 0x2ac, 16, 30);
+		loadFonts(&file, 0x61c3);
+		loadSpeakerFxZX(&file, 0x8c6, 0x91a);
+		load8bitBinary(&file, 0x63bb, 4);
+	} else {
+		loadMessagesFixedSize(&file, 0x2ac, 16, 23);
+		loadFonts(&file, 0x6163);
+		loadSpeakerFxZX(&file, 0x816, 0x86a);
+		load8bitBinary(&file, 0x635b, 4);
+	}
 
 	for (auto &it : _areaMap) {
 		it._value->addStructure(_areaMap[255]);
+
+		if (isTotalEclipse2 && it._value->getAreaID() == 1)
+			continue;
+
 		for (int16 id = 183; id < 207; id++)
 			it._value->addObjectFromArea(id, _areaMap[255]);
 	}
diff --git a/engines/freescape/metaengine.cpp b/engines/freescape/metaengine.cpp
index b5f09fbacdc..3161ae950c9 100644
--- a/engines/freescape/metaengine.cpp
+++ b/engines/freescape/metaengine.cpp
@@ -133,7 +133,7 @@ Common::Error FreescapeMetaEngine::createInstance(OSystem *syst, Engine **engine
 		*engine = (Engine *)new Freescape::DrillerEngine(syst, gd);
 	} else if (Common::String(gd->gameId) == "darkside") {
 		*engine = (Engine *)new Freescape::DarkEngine(syst, gd);
-	} else if (Common::String(gd->gameId) == "totaleclipse") {
+	} else if (Common::String(gd->gameId) == "totaleclipse" || Common::String(gd->gameId) == "totaleclipse2") {
 		*engine = (Engine *)new Freescape::EclipseEngine(syst, gd);
 	} else if (Common::String(gd->gameId) == "castlemaster") {
 		*engine = (Engine *)new Freescape::CastleEngine(syst, gd);


Commit: bbb35a5ed7bc8b6185777056f956685e04bea908
    https://github.com/scummvm/scummvm/commit/bbb35a5ed7bc8b6185777056f956685e04bea908
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-03-21T09:18:49+01:00

Commit Message:
FREESCAPE: play the intro in eclipse 2 for zx

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


diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 80ad9dfa95d..b5780255a12 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -120,7 +120,8 @@ public:
 	bool isSpaceStationOblivion() { return _targetName.hasPrefix("spacestationoblivion"); }
 	bool isDriller() { return _targetName.hasPrefix("driller") || _targetName.hasPrefix("spacestationoblivion"); }
 	bool isDark() { return _targetName.hasPrefix("darkside"); }
-	bool isEclipse() { return _targetName.hasPrefix("totaleclipse"); }
+	bool isEclipse() { return _targetName.hasPrefix("totaleclipse"); } // This will match Total Eclipse 1 and 2.
+	bool isEclipse2() { return _targetName.hasPrefix("totaleclipse2"); }
 	bool isCastle() { return _targetName.hasPrefix("castle"); }
 	bool isAmiga() { return _gameDescription->platform == Common::kPlatformAmiga; }
 	bool isAtariST() { return _gameDescription->platform == Common::kPlatformAtariST; }
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index 47860ca0f84..a48fc82ccb2 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -169,6 +169,12 @@ void EclipseEngine::gotoArea(uint16 areaID, int entranceID) {
 			playSound(7, true);
 		else
 			playSound(9, true);
+
+		if (isEclipse2()) {
+			_yaw = 120;
+			_gameStateControl = kFreescapeGameStateStart;
+		}
+
 	} if (areaID == _endArea && entranceID == _endEntrance) {
 		_flyMode = true;
 		if (isDemo())
@@ -511,6 +517,11 @@ void EclipseEngine::drawSensorShoot(Sensor *sensor) {
 }
 
 void EclipseEngine::updateTimeVariables() {
+	if (isEclipse2() && _gameStateControl == kFreescapeGameStateStart) {
+		executeLocalGlobalConditions(false, true, false);
+		_gameStateControl = kFreescapeGameStatePlaying;
+	}
+
 	if (_gameStateControl != kFreescapeGameStatePlaying)
 		return;
 	// This function only executes "on collision" room/global conditions


Commit: e8550f040cb690158c827520c8c1a1501f2c6a60
    https://github.com/scummvm/scummvm/commit/e8550f040cb690158c827520c8c1a1501f2c6a60
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-03-21T09:18:49+01:00

Commit Message:
FREESCAPE: initial eclipse support for cpc

Changed paths:
    engines/freescape/detection.cpp
    engines/freescape/games/eclipse/cpc.cpp
    engines/freescape/games/eclipse/eclipse.h
    engines/freescape/sound.cpp


diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index 3f9c4be8b0e..525cac9eea5 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -510,6 +510,34 @@ static const ADGameDescription gameDescriptions[] = {
 		ADGF_UNSTABLE,
 		GUIO1(GUIO_NOMIDI)
 	},
+	{
+		"totaleclipse",
+		"",
+		{
+			{"TECODE.BIN", 0, "369d87a5a38df89cb8aa396995bb49d5", 35794},
+			{"TECON.SCR", 0, "f6381a7e07b3bdcd569cb7423a269fd3", 16512},
+			{"TESCR.SCR", 0, "9635f9401dae0936e22c556065c254f6", 16512},
+			AD_LISTEND
+		},
+		Common::EN_ANY,
+		Common::kPlatformAmstradCPC,
+		ADGF_UNSTABLE,
+		GUIO1(GUIO_NOMIDI)
+	},
+	{
+		"totaleclipse2",
+		"",
+		{
+			{"TE2.BI1", 0, "fc6e1a240e76a68e02ce1db5ad9a689a", 16512},
+			{"TE2.BI2", 0, "c346262234e509ba5576c0a3362bc414", 35456},
+			{"TE2.BI3", 0, "d73485df2eccb90592bb598693b10555", 16512},
+			AD_LISTEND
+		},
+		Common::EN_ANY,
+		Common::kPlatformAmstradCPC,
+		ADGF_UNSTABLE,
+		GUIO1(GUIO_NOMIDI)
+	},
 	{
 		"totaleclipse",
 		"",
diff --git a/engines/freescape/games/eclipse/cpc.cpp b/engines/freescape/games/eclipse/cpc.cpp
index 2a00c9207d9..a9937c220c6 100644
--- a/engines/freescape/games/eclipse/cpc.cpp
+++ b/engines/freescape/games/eclipse/cpc.cpp
@@ -37,6 +37,69 @@ extern byte kCPCPaletteBorderData[4][3];
 
 extern Graphics::ManagedSurface *readCPCImage(Common::SeekableReadStream *file, bool mode0);
 
+void EclipseEngine::loadAssetsCPCFullGame() {
+	Common::File file;
+
+	if (isEclipse2())
+		file.open("TE2.BI1");
+	else
+		file.open("TESCR.SCR");
+
+	if (!file.isOpen())
+		error("Failed to open TESCR.SCR/TE2.BI1");
+
+	_title = readCPCImage(&file, true);
+	_title->setPalette((byte*)&kCPCPaletteTitleData, 0, 4);
+
+	file.close();
+	if (isEclipse2())
+		file.open("TE2.BI3");
+	else
+		file.open("TECON.SCR");
+
+	if (!file.isOpen())
+		error("Failed to open TECON.SCR/TE2.BI3");
+
+	_border = readCPCImage(&file, true);
+	_border->setPalette((byte*)&kCPCPaletteTitleData, 0, 4);
+
+	file.close();
+	if (isEclipse2())
+		file.open("TE2.BI2");
+	else
+		file.open("TECODE.BIN");
+
+	if (!file.isOpen())
+		error("Failed to open TECODE.BIN/TE2.BI2");
+
+	if (isEclipse2()) {
+		loadFonts(&file, 0x60bc);
+		loadMessagesFixedSize(&file, 0x326, 16, 30);
+		load8bitBinary(&file, 0x62b4, 16);
+	} else {
+		loadFonts(&file, 0x6076);
+		loadMessagesFixedSize(&file, 0x326, 16, 30);
+		load8bitBinary(&file, 0x626e, 16);
+	}
+
+	for (auto &it : _areaMap) {
+		it._value->addStructure(_areaMap[255]);
+
+		if (isEclipse2() && it._value->getAreaID() == 1)
+			continue;
+
+		for (int16 id = 183; id < 207; id++)
+			it._value->addObjectFromArea(id, _areaMap[255]);
+	}
+	loadColorPalette();
+	swapPalette(1);
+
+	_indicators.push_back(loadBundledImage("eclipse_ankh_indicator"));
+
+	for (auto &it : _indicators)
+		it->convertToInPlace(_gfx->_texturePixelFormat);
+}
+
 void EclipseEngine::loadAssetsCPCDemo() {
 	Common::File file;
 
diff --git a/engines/freescape/games/eclipse/eclipse.h b/engines/freescape/games/eclipse/eclipse.h
index 96262421a82..492b654a158 100644
--- a/engines/freescape/games/eclipse/eclipse.h
+++ b/engines/freescape/games/eclipse/eclipse.h
@@ -64,6 +64,7 @@ public:
 	void initZX();
 
 	void loadAssetsZXFullGame() override;
+	void loadAssetsCPCFullGame() override;
 	void loadAssetsCPCDemo() override;
 	void loadAssetsZXDemo() override;
 
diff --git a/engines/freescape/sound.cpp b/engines/freescape/sound.cpp
index 8a8c5cdb424..d3d1db4733d 100644
--- a/engines/freescape/sound.cpp
+++ b/engines/freescape/sound.cpp
@@ -316,6 +316,9 @@ void FreescapeEngine::playSound(int index, bool sync) {
 	} else if (isSpectrum() && !isDriller()) {
 		playSoundZX(_soundsSpeakerFxZX[index]);
 		return;
+	} else if (isCPC() && !isDriller()) {
+		debugC(1, kFreescapeDebugMedia, "Not implemented");
+		return;
 	}
 
 	switch (index) {




More information about the Scummvm-git-logs mailing list