[Scummvm-git-logs] scummvm master -> 4396b011ac307e69fb76581704b719cdc2afd4ee

bgK bastien.bouclet at gmail.com
Sat May 19 18:24:45 CEST 2018


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:
4396b011ac MOHAWK: MYST: Fix the Wii/GameCube build


Commit: 4396b011ac307e69fb76581704b719cdc2afd4ee
    https://github.com/scummvm/scummvm/commit/4396b011ac307e69fb76581704b719cdc2afd4ee
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-05-19T18:23:45+02:00

Commit Message:
MOHAWK: MYST: Fix the Wii/GameCube build

Changed paths:
    engines/mohawk/myst.cpp
    engines/mohawk/myst.h
    engines/mohawk/myst_state.cpp
    engines/mohawk/myst_state.h


diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 7171373..1355b86 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -264,6 +264,8 @@ void MohawkEngine_Myst::playMovieBlocking(const Common::String &name, MystStack
 }
 
 void MohawkEngine_Myst::playFlybyMovie(uint16 stack, uint16 card) {
+	static const uint16 kMasterpieceOnly = 0xFFFF;
+
 	// Play Flyby Entry Movie on Masterpiece Edition.
 	const char *flyby = nullptr;
 
@@ -1180,7 +1182,7 @@ Common::Error MohawkEngine_Myst::saveGameState(int slot, const Common::String &d
 }
 
 void MohawkEngine_Myst::autoSave() {
-	if (!_gameState->save(Mohawk::kAutoSaveSlot, Mohawk::kAutoSaveName, true))
+	if (!_gameState->save(MystGameState::kAutoSaveSlot, "Autosave", true))
 		warning("Attempt to autosave has failed.");
 }
 
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index beefdb0..5c23870 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -95,10 +95,6 @@ enum TransitionType {
 	kNoTransition			= 999
 };
 
-const uint16 kMasterpieceOnly = 0xFFFF;
-const int kAutoSaveSlot = 0;
-const Common::String kAutoSaveName = "Autosave";
-
 struct MystCondition {
 	uint16 var;
 	Common::Array<uint16> values;
diff --git a/engines/mohawk/myst_state.cpp b/engines/mohawk/myst_state.cpp
index 5de336a..efc5025 100644
--- a/engines/mohawk/myst_state.cpp
+++ b/engines/mohawk/myst_state.cpp
@@ -63,6 +63,8 @@ bool MystSaveMetadata::sync(Common::Serializer &s) {
 	return true;
 }
 
+const int MystGameState::kAutoSaveSlot = 0;
+
 MystGameState::MystGameState(MohawkEngine_Myst *vm, Common::SaveFileManager *saveFileMan) : _vm(vm), _saveFileMan(saveFileMan) {
 	// Most of the variables are zero at game start.
 	memset(&_globals, 0, sizeof(_globals));
@@ -257,7 +259,7 @@ bool MystGameState::saveMetadata(int slot) {
 bool MystGameState::isAutoSaveAllowed() {
 	// Open autosave slot and see if it an autosave
 	// Autosaving will be enabled if it is an autosave or if there is no save in that slot
-	Common::String filename = buildMetadataFilename(Mohawk::kAutoSaveSlot);
+	Common::String filename = buildMetadataFilename(kAutoSaveSlot);
 	Common::ScopedPtr<Common::InSaveFile> metadataFile(g_system->getSavefileManager()->openForLoading(filename));
 	if (!metadataFile) { // There is no save in the autosave slot, enable autosave
 		return true;
@@ -280,7 +282,7 @@ SaveStateDescriptor MystGameState::querySaveMetaInfos(int slot) {
 	Common::InSaveFile *metadataFile = g_system->getSavefileManager()->openForLoading(filename);
 
 	SaveStateDescriptor desc;
-	desc.setWriteProtectedFlag(slot == Mohawk::kAutoSaveSlot);
+	desc.setWriteProtectedFlag(slot == kAutoSaveSlot);
 
 	if (!metadataFile) {
 		return desc;
@@ -300,7 +302,7 @@ SaveStateDescriptor MystGameState::querySaveMetaInfos(int slot) {
 	desc.setSaveDate(metadata.saveYear, metadata.saveMonth, metadata.saveDay);
 	desc.setSaveTime(metadata.saveHour, metadata.saveMinute);
 	desc.setPlayTime(metadata.totalPlayTime);
-	desc.setDeletableFlag(slot != Mohawk::kAutoSaveSlot);
+	desc.setDeletableFlag(slot != kAutoSaveSlot);
 
 	Graphics::Surface *thumbnail;
 	if (!Graphics::loadThumbnail(*metadataFile, thumbnail)) {
diff --git a/engines/mohawk/myst_state.h b/engines/mohawk/myst_state.h
index 8ff87d1..28bbf60 100644
--- a/engines/mohawk/myst_state.h
+++ b/engines/mohawk/myst_state.h
@@ -100,6 +100,8 @@ enum DniEnding {
 
 class MystGameState {
 public:
+	static const int kAutoSaveSlot;
+
 	MystGameState(MohawkEngine_Myst*, Common::SaveFileManager*);
 	~MystGameState();
 





More information about the Scummvm-git-logs mailing list