[Scummvm-git-logs] scummvm master -> 05de8819baa4c9d1daef8bd742983d0665d03474

dreammaster paulfgilbert at gmail.com
Fri Aug 30 06:12:06 CEST 2019


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

Summary:
9f7cadaf8a XEEN: Shift getting specific game Id to an engine method
05de8819ba XEEN: Remove unused methods, comments for engine methods


Commit: 9f7cadaf8a059977ead55aae8cb94d6cb91f3f26
    https://github.com/scummvm/scummvm/commit/9f7cadaf8a059977ead55aae8cb94d6cb91f3f26
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-08-29T21:08:53-07:00

Commit Message:
XEEN: Shift getting specific game Id to an engine method

Changed paths:
    engines/xeen/detection.cpp
    engines/xeen/patcher.cpp
    engines/xeen/xeen.h


diff --git a/engines/xeen/detection.cpp b/engines/xeen/detection.cpp
index c542c8d..315b169 100644
--- a/engines/xeen/detection.cpp
+++ b/engines/xeen/detection.cpp
@@ -45,6 +45,14 @@ uint32 XeenEngine::getGameID() const {
 	return _gameDescription->gameID;
 }
 
+uint32 XeenEngine::getSpecificGameId() const {
+	uint gameId = g_vm->getGameID();
+	if (gameId == GType_WorldOfXeen)
+		gameId = _files->_ccNum ? GType_DarkSide : GType_Clouds;
+
+	return gameId;
+}
+
 uint32 XeenEngine::getGameFeatures() const {
 	return _gameDescription->features;
 }
diff --git a/engines/xeen/patcher.cpp b/engines/xeen/patcher.cpp
index b401549..0c59762 100644
--- a/engines/xeen/patcher.cpp
+++ b/engines/xeen/patcher.cpp
@@ -49,7 +49,7 @@ const byte DS_MAP116[] = { 9, 10, 6, 4, 2, OP_TakeOrGive, 0, 0, 103, 127 };
 const byte DS_MAP62_PIT1[] = { 9, 11, 8, DIR_ALL, 4, OP_FallToMap, 61, 11, 8, 0 };
 const byte DS_MAP62_PIT2[] = { 9, 7, 4, DIR_ALL, 4, OP_FallToMap, 61, 7, 4, 0 };
 
-#define SCRIPT_PATCHES_COUNT 6
+#define SCRIPT_PATCHES_COUNT 5
 static const ScriptEntry SCRIPT_PATCHES[] = {
 	{ GType_DarkSide, 54, DS_MAP54_LINE8 },	// Fix curtain on level 2 of Ellinger's Tower
 	{ GType_Swords, 53, SW_MAP53_LINE8 },	// Fix chest in Hart having gems, but saying "Nothing Here"
@@ -81,13 +81,10 @@ void Patcher::patch() {
 }
 
 void Patcher::patchScripts() {
-	FileManager &files = *g_vm->_files;
 	Map &map = *g_vm->_map;
 	Party &party = *g_vm->_party;
 
-	uint gameId = g_vm->getGameID();
-	if (gameId == GType_WorldOfXeen)
-		gameId = files._ccNum ? GType_DarkSide : GType_Clouds;
+	uint gameId = g_vm->getSpecificGameId();
 
 	for (int patchIdx = 0; patchIdx < SCRIPT_PATCHES_COUNT; ++patchIdx) {
 		const ScriptEntry &se = SCRIPT_PATCHES[patchIdx];
@@ -114,14 +111,11 @@ void Patcher::patchScripts() {
 }
 
 void Patcher::patchObjects() {
-	FileManager &files = *g_vm->_files;
 	Map &map = *g_vm->_map;
 	Party &party = *g_vm->_party;
 	const MazeData *mapData = map.mazeDataSurrounding();
 
-	int gameId = g_vm->getGameID();
-	if (gameId == GType_WorldOfXeen)
-		gameId = files._ccNum ? GType_DarkSide : GType_Clouds;
+	int gameId = g_vm->getSpecificGameId();
 
 	for (int roCtr = 0; roCtr < REMOVE_OBJECTS_COUNT; ++roCtr) {
 		const ObjectEntry &oe = REMOVE_OBJECTS[roCtr];
diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h
index 2ac4ee4..178aaf1 100644
--- a/engines/xeen/xeen.h
+++ b/engines/xeen/xeen.h
@@ -205,6 +205,13 @@ public:
 	Common::Platform getPlatform() const;
 	uint16 getVersion() const;
 	uint32 getGameID() const;
+
+	/**
+	 * Returns the game Id, but with a reuslt of Clouds or Dark Side for World of Xeen,
+	 * depending on which side the player is currently on
+	 */
+	uint32 getSpecificGameId() const;
+
 	uint32 getGameFeatures() const;
 	bool getIsCD() const;
 


Commit: 05de8819baa4c9d1daef8bd742983d0665d03474
    https://github.com/scummvm/scummvm/commit/05de8819baa4c9d1daef8bd742983d0665d03474
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-08-29T21:11:52-07:00

Commit Message:
XEEN: Remove unused methods, comments for engine methods

Changed paths:
    engines/xeen/dialogs/dialogs_party.cpp
    engines/xeen/xeen.h


diff --git a/engines/xeen/dialogs/dialogs_party.cpp b/engines/xeen/dialogs/dialogs_party.cpp
index ac92ceb..384edc2 100644
--- a/engines/xeen/dialogs/dialogs_party.cpp
+++ b/engines/xeen/dialogs/dialogs_party.cpp
@@ -47,7 +47,6 @@ void PartyDialog::execute() {
 	EventsManager &events = *_vm->_events;
 	FileManager &files = *_vm->_files;
 	Interface &intf = *_vm->_interface;
-	Map &map = *_vm->_map;
 	Party &party = *_vm->_party;
 	Screen &screen = *_vm->_screen;
 	Sound &sound = *_vm->_sound;
diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h
index 178aaf1..2f231c5 100644
--- a/engines/xeen/xeen.h
+++ b/engines/xeen/xeen.h
@@ -200,10 +200,24 @@ public:
 	XeenEngine(OSystem *syst, const XeenGameDescription *gameDesc);
 	virtual ~XeenEngine();
 
+	/**
+	 * Returns the features
+	 */
 	uint32 getFeatures() const;
+
+	/**
+	 * Returns the game language
+	 */
 	Common::Language getLanguage() const;
+
+	/**
+	 * Returns the game's platform
+	 */
 	Common::Platform getPlatform() const;
-	uint16 getVersion() const;
+
+	/**
+	 * Gets the game Id
+	 */
 	uint32 getGameID() const;
 
 	/**
@@ -212,11 +226,24 @@ public:
 	 */
 	uint32 getSpecificGameId() const;
 
+	/**
+	 * Returns the game features
+	 */
 	uint32 getGameFeatures() const;
+
+	/**
+	 * Returns true if the game is the CD version
+	 */
 	bool getIsCD() const;
 
+	/**
+	 * Returns a random number
+	 */
 	int getRandomNumber(int maxNumber);
 
+	/**
+	 * Returns a random number
+	 */
 	int getRandomNumber(int minNumber, int maxNumber);
 
 	/**





More information about the Scummvm-git-logs mailing list