[Scummvm-cvs-logs] SF.net SVN: scummvm:[46782] scummvm/trunk/engines/mohawk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Dec 31 00:02:14 CET 2009


Revision: 46782
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46782&view=rev
Author:   fingolfin
Date:     2009-12-30 23:02:14 +0000 (Wed, 30 Dec 2009)

Log Message:
-----------
MOHAWK: Reduce header interdependencies

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/console.cpp
    scummvm/trunk/engines/mohawk/detection.cpp
    scummvm/trunk/engines/mohawk/dialogs.h
    scummvm/trunk/engines/mohawk/livingbooks.cpp
    scummvm/trunk/engines/mohawk/livingbooks.h
    scummvm/trunk/engines/mohawk/mohawk.cpp
    scummvm/trunk/engines/mohawk/mohawk.h
    scummvm/trunk/engines/mohawk/myst.cpp
    scummvm/trunk/engines/mohawk/myst.h
    scummvm/trunk/engines/mohawk/myst_scripts.cpp
    scummvm/trunk/engines/mohawk/riven.cpp
    scummvm/trunk/engines/mohawk/riven.h
    scummvm/trunk/engines/mohawk/riven_external.cpp
    scummvm/trunk/engines/mohawk/riven_scripts.cpp
    scummvm/trunk/engines/mohawk/video/qt_player.h
    scummvm/trunk/engines/mohawk/video/video.cpp
    scummvm/trunk/engines/mohawk/video/video.h

Modified: scummvm/trunk/engines/mohawk/console.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/console.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/console.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -29,6 +29,8 @@
 #include "mohawk/graphics.h"
 #include "mohawk/riven.h"
 #include "mohawk/livingbooks.h"
+#include "mohawk/sound.h"
+#include "mohawk/video/video.h"
 
 namespace Mohawk {
 

Modified: scummvm/trunk/engines/mohawk/detection.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/detection.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/detection.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -63,15 +63,15 @@
 	return _gameDescription->version;
 }
 
-uint8 MohawkEngine::getGameType() {
+uint8 MohawkEngine::getGameType() const {
 	return _gameDescription->gameType;
 }
 
-Common::String MohawkEngine_LivingBooks::getBookInfoFileName() {
+Common::String MohawkEngine_LivingBooks::getBookInfoFileName() const {
 	return _gameDescription->desc.filesDescriptions[0].fileName;
 }
 
-Common::Language MohawkEngine::getLanguage() {
+Common::Language MohawkEngine::getLanguage() const {
 	return _gameDescription->desc.language;
 }
 

Modified: scummvm/trunk/engines/mohawk/dialogs.h
===================================================================
--- scummvm/trunk/engines/mohawk/dialogs.h	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/dialogs.h	2009-12-30 23:02:14 UTC (rev 46782)
@@ -38,6 +38,8 @@
 namespace Mohawk {
 
 class MohawkEngine;
+class MohawkEngine_Myst;
+class MohawkEngine_Riven;
 
 class InfoDialog : public GUI::Dialog {
 protected:

Modified: scummvm/trunk/engines/mohawk/livingbooks.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/livingbooks.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/livingbooks.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -26,6 +26,8 @@
 #include "mohawk/livingbooks.h"
 #include "mohawk/file.h"
 
+#include "common/events.h"
+
 namespace Mohawk {
 
 MohawkEngine_LivingBooks::MohawkEngine_LivingBooks(OSystem *syst, const MohawkGameDescription *gamedesc) : MohawkEngine(syst, gamedesc) {
@@ -321,4 +323,8 @@
 	return filename;
 }
 
+MohawkFile *MohawkEngine_LivingBooks::createMohawkFile() const {
+	return (getGameType() == GType_NEWLIVINGBOOKS) ? new MohawkFile() : new OldMohawkFile();
+}
+
 } // End of namespace Mohawk

Modified: scummvm/trunk/engines/mohawk/livingbooks.h
===================================================================
--- scummvm/trunk/engines/mohawk/livingbooks.h	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/livingbooks.h	2009-12-30 23:02:14 UTC (rev 46782)
@@ -59,7 +59,7 @@
 	Common::ConfigFile _bookInfoFile;
 
 	uint16 _curPage;
-	Common::String getBookInfoFileName();
+	Common::String getBookInfoFileName() const;
 	void loadBookInfo(Common::String filename);
 	void loadIntro();
 
@@ -85,8 +85,8 @@
 	Common::String getFileNameFromConfig(Common::String section, Common::String key);
 	
 	// Platform/Version functions
-	bool isBigEndian() { return getGameType() == GType_NEWLIVINGBOOKS || getPlatform() == Common::kPlatformMacintosh; }
-	MohawkFile *createMohawkFile() { return (getGameType() == GType_NEWLIVINGBOOKS) ? new MohawkFile() : new OldMohawkFile(); }
+	bool isBigEndian() const { return getGameType() == GType_NEWLIVINGBOOKS || getPlatform() == Common::kPlatformMacintosh; }
+	MohawkFile *createMohawkFile() const;
 };
 
 } // End of namespace Mohawk

Modified: scummvm/trunk/engines/mohawk/mohawk.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/mohawk.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/mohawk.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -33,7 +33,12 @@
 #include "base/version.h"
 
 #include "mohawk/mohawk.h"
+#include "mohawk/dialogs.h"
+#include "mohawk/sound.h"
+#include "mohawk/video/video.h"
 
+#include "sound/mixer.h"
+
 namespace Mohawk {
 
 MohawkEngine::MohawkEngine(OSystem *syst, const MohawkGameDescription *gamedesc) : Engine(syst), _gameDescription(gamedesc) {

Modified: scummvm/trunk/engines/mohawk/mohawk.h
===================================================================
--- scummvm/trunk/engines/mohawk/mohawk.h	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/mohawk.h	2009-12-30 23:02:14 UTC (rev 46782)
@@ -27,21 +27,12 @@
 #define MOHAWK_H
 
 #include "common/scummsys.h"
-#include "common/util.h"
-#include "common/system.h"
-#include "common/rect.h"
 #include "common/array.h"
 
 #include "engines/engine.h"
 
-#include "gui/dialog.h"
+class OSystem;
 
-#include "mohawk/console.h"
-#include "mohawk/dialogs.h"
-#include "mohawk/file.h"
-#include "mohawk/sound.h"
-#include "mohawk/video/video.h"
-
 namespace Mohawk {
 
 enum MohawkGameType {
@@ -72,6 +63,8 @@
 struct MohawkGameDescription;
 class Sound;
 class PauseDialog;
+class MohawkFile;
+class VideoManager;
 
 class MohawkEngine : public ::Engine {
 protected:
@@ -87,8 +80,8 @@
 	uint32 getFeatures() const;
 	uint16 getVersion() const;
 	Common::Platform getPlatform() const;
-	uint8 getGameType();
-	Common::Language getLanguage();
+	uint8 getGameType() const;
+	Common::Language getLanguage() const;
 	
 	bool hasFeature(EngineFeature f) const;
 
@@ -105,7 +98,7 @@
 	void pauseEngineIntern(bool);
 
 	// An array holding the main Mohawk archives require by the games
-	Common::Array<MohawkFile*> _mhk;
+	Common::Array<MohawkFile *> _mhk;
 };
 
 } // End of namespace Mohawk

Modified: scummvm/trunk/engines/mohawk/myst.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/myst.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -29,6 +29,9 @@
 #include "mohawk/myst.h"
 #include "mohawk/myst_scripts.h"
 #include "mohawk/myst_saveload.h"
+#include "mohawk/dialogs.h"
+#include "mohawk/file.h"
+#include "mohawk/video/video.h"
 
 namespace Mohawk {
 

Modified: scummvm/trunk/engines/mohawk/myst.h
===================================================================
--- scummvm/trunk/engines/mohawk/myst.h	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/myst.h	2009-12-30 23:02:14 UTC (rev 46782)
@@ -40,6 +40,7 @@
 class MystScriptParser;
 class MystConsole;
 class MystSaveLoad;
+class MystOptionsDialog;
 
 // Engine Debug Flags
 enum {

Modified: scummvm/trunk/engines/mohawk/myst_scripts.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst_scripts.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/myst_scripts.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -26,6 +26,8 @@
 #include "mohawk/myst.h"
 #include "mohawk/graphics.h"
 #include "mohawk/myst_scripts.h"
+#include "mohawk/sound.h"
+#include "mohawk/video/video.h"
 
 #include "gui/message.h"
 

Modified: scummvm/trunk/engines/mohawk/riven.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/riven.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -31,6 +31,8 @@
 #include "mohawk/riven.h"
 #include "mohawk/riven_external.h"
 #include "mohawk/riven_saveload.h"
+#include "mohawk/dialogs.h"
+#include "mohawk/video/video.h"
 
 namespace Mohawk {
 
@@ -61,6 +63,11 @@
 	_cardData.scripts.clear();
 }
 
+GUI::Debugger *MohawkEngine_Riven::getDebugger() {
+	return _console;
+}
+
+
 Common::Error MohawkEngine_Riven::run() {
 	MohawkEngine::run();
 

Modified: scummvm/trunk/engines/mohawk/riven.h
===================================================================
--- scummvm/trunk/engines/mohawk/riven.h	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/riven.h	2009-12-30 23:02:14 UTC (rev 46782)
@@ -39,6 +39,7 @@
 class RivenExternal;
 class RivenConsole;
 class RivenSaveLoad;
+class RivenOptionsDialog;
 
 #define RIVEN_STACKS 8
 
@@ -110,7 +111,7 @@
 	Card _cardData;
 	bool _gameOver;
 	
-	GUI::Debugger *getDebugger() { return _console; }
+	GUI::Debugger *getDebugger();
 	
 	bool canLoadGameStateCurrently() { return true; }
 	bool canSaveGameStateCurrently() { return true; }

Modified: scummvm/trunk/engines/mohawk/riven_external.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven_external.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/riven_external.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -26,6 +26,8 @@
 #include "mohawk/graphics.h"
 #include "mohawk/riven.h"
 #include "mohawk/riven_external.h"
+#include "mohawk/sound.h"
+#include "mohawk/video/video.h"
 
 #include "common/EventRecorder.h"
 #include "gui/message.h"

Modified: scummvm/trunk/engines/mohawk/riven_scripts.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven_scripts.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/riven_scripts.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -27,6 +27,8 @@
 #include "mohawk/riven.h"
 #include "mohawk/riven_external.h"
 #include "mohawk/riven_scripts.h"
+#include "mohawk/sound.h"
+#include "mohawk/video/video.h"
 
 #include "common/stream.h"
 #include "graphics/cursorman.h"

Modified: scummvm/trunk/engines/mohawk/video/qt_player.h
===================================================================
--- scummvm/trunk/engines/mohawk/video/qt_player.h	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/video/qt_player.h	2009-12-30 23:02:14 UTC (rev 46782)
@@ -35,7 +35,6 @@
 #define MOHAWK_QT_PLAYER_H
 
 #include "common/scummsys.h"
-#include "common/file.h"
 
 #include "mohawk/video/video.h"
 

Modified: scummvm/trunk/engines/mohawk/video/video.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/video/video.cpp	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/video/video.cpp	2009-12-30 23:02:14 UTC (rev 46782)
@@ -33,6 +33,8 @@
 #include "mohawk/video/rpza.h"
 #include "mohawk/video/smc.h"
 
+#include "common/events.h"
+
 namespace Mohawk {
 
 ////////////////////////////////////////////

Modified: scummvm/trunk/engines/mohawk/video/video.h
===================================================================
--- scummvm/trunk/engines/mohawk/video/video.h	2009-12-30 23:01:36 UTC (rev 46781)
+++ scummvm/trunk/engines/mohawk/video/video.h	2009-12-30 23:02:14 UTC (rev 46782)
@@ -28,7 +28,7 @@
 
 #include "common/queue.h"
 #include "sound/audiostream.h"
-#include "sound/mixer.h"
+#include "sound/mixer.h"	// for Audio::SoundHandle
 #include "graphics/pixelformat.h"
 #include "graphics/video/codecs/codec.h"
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list