[Scummvm-git-logs] scummvm master -> 526911b0bdce001ad084bfd73a85085743131b6d

neuromancer noreply at scummvm.org
Sun Mar 5 14:16:21 UTC 2023


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

Summary:
526911b0bd FREESCAPE: simplified loading of data files in driller cpc


Commit: 526911b0bdce001ad084bfd73a85085743131b6d
    https://github.com/scummvm/scummvm/commit/526911b0bdce001ad084bfd73a85085743131b6d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2023-03-05T15:17:13+01:00

Commit Message:
FREESCAPE: simplified loading of data files in driller cpc

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


diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index f3faa281ae6..758267f1f88 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -75,7 +75,7 @@ static const ADGameDescription gameDescriptions[] = {
 		"driller",
 		"",
 		{
-			{"DRILLER.CPC.EDSK", 0, "05df84207b5373e145ef90a3e4b98ae0", 215073},
+			{"DRILL.BIN", 0, "719f5157391e88b2c391c30576340637", 35320},
 			AD_LISTEND
 		},
 		Common::EN_ANY,
@@ -83,30 +83,6 @@ static const ADGameDescription gameDescriptions[] = {
 		GF_CPC_RETAIL,
 		GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
 	},
-	{
-		"driller",
-		"",
-		{
-			{"DRILLER.CPC.EDSK", 0, "ccca1fb22252f43403f75a546ebb5a57", 194816},
-			AD_LISTEND
-		},
-		Common::EN_ANY,
-		Common::kPlatformAmstradCPC,
-		GF_CPC_RETAIL2,
-		GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
-	},
-	{
-		"driller",
-		"",
-		{
-			{"DRILLER.CPC.EDSK", 0, "252f90756eaee25f2231e8d3bfaab68f", 125952},
-			AD_LISTEND
-		},
-		Common::EN_ANY,
-		Common::kPlatformAmstradCPC,
-		GF_CPC_BUDGET,
-		GUIO2(GUIO_NOMIDI, GAMEOPTION_AUTOMATIC_DRILLING)
-	},
 	{
 		"driller",
 		"VirtualWorlds-A",
diff --git a/engines/freescape/games/driller/cpc.cpp b/engines/freescape/games/driller/cpc.cpp
index 8bf22b5df99..c42df9fbd49 100644
--- a/engines/freescape/games/driller/cpc.cpp
+++ b/engines/freescape/games/driller/cpc.cpp
@@ -125,37 +125,16 @@ void deobfuscateDrillerCPCVirtualWorlds(byte *memBuffer) {
 
 void DrillerEngine::loadAssetsCPCFullGame() {
 	Common::File file;
-
 	loadBundledImages();
-	byte *memBuffer;
-	int memSize = 0;
-	if (_variant & GF_CPC_VIRTUALWORLDS) {
-		memBuffer = parseEDSK("virtualworlds.A.cpc.edsk", memSize);
-		deobfuscateDrillerCPCVirtualWorlds(memBuffer);
-	} else
-		memBuffer = parseEDSK("driller.cpc.edsk", memSize);
-	assert(memSize > 0);
-	Common::SeekableReadStream *stream = new Common::MemoryReadStream((const byte*)memBuffer, memSize);
-
-	if (_variant & GF_CPC_RETAIL) {
-		loadMessagesFixedSize(stream, 0xb0f7, 14, 20);
-		loadFonts(stream, 0xeb14);
-		load8bitBinary(stream, 0xec76, 4);
-		loadGlobalObjects(stream, 0xacb2);
-	} else if (_variant & GF_CPC_RETAIL2) {
-		loadMessagesFixedSize(stream, 0xb0f7 - 0x3fab, 14, 20);
-		loadFonts(stream, 0xeb14 - 0x3fab);
-		load8bitBinary(stream, 0xaccb, 4);
-		loadGlobalObjects(stream, 0xacb2 - 0x3fab);
-	} else if (_variant & _variant & GF_CPC_VIRTUALWORLDS) {
-		load8bitBinary(stream, 0x11acb, 4);
-	} else if (_variant & GF_CPC_BUDGET) {
-		loadMessagesFixedSize(stream, 0x9ef7, 14, 20);
-		loadFonts(stream, 0xd914);
-		load8bitBinary(stream, 0xda76, 4);
-		loadGlobalObjects(stream, 0x9ab2);
-	} else
-		error("Unknown Amstrad CPC variant");
+	file.open("DRILL.BIN");
+
+	if (!file.isOpen())
+		error("Failed to open DRILL.BIN");
+
+	loadMessagesFixedSize(&file, 0x214c, 14, 20);
+	loadFonts(&file, 0x5b69);
+	loadGlobalObjects(&file, 0x1d07);
+	load8bitBinary(&file, 0x5ccb, 16);
 }
 
 void DrillerEngine::drawCPCUI(Graphics::Surface *surface) {




More information about the Scummvm-git-logs mailing list