[Scummvm-cvs-logs] SF.net SVN: scummvm:[35542] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu Dec 25 21:40:01 CET 2008
Revision: 35542
http://scummvm.svn.sourceforge.net/scummvm/?rev=35542&view=rev
Author: fingolfin
Date: 2008-12-25 20:40:00 +0000 (Thu, 25 Dec 2008)
Log Message:
-----------
Pushing down some header deps (on common/system.h, mostly)
Modified Paths:
--------------
scummvm/trunk/backends/events/default/default-events.h
scummvm/trunk/common/events.h
scummvm/trunk/common/xmlparser.cpp
scummvm/trunk/common/xmlparser.h
scummvm/trunk/engines/cine/prc.cpp
scummvm/trunk/engines/cruise/cruise_main.cpp
scummvm/trunk/engines/engine.h
scummvm/trunk/engines/kyra/kyra_v1.h
scummvm/trunk/engines/parallaction/input.cpp
scummvm/trunk/engines/parallaction/parallaction.cpp
scummvm/trunk/engines/queen/music.cpp
scummvm/trunk/engines/saga/introproc_ihnm.cpp
scummvm/trunk/engines/sky/logic.cpp
scummvm/trunk/engines/sky/sky.cpp
scummvm/trunk/engines/sword1/detection.cpp
scummvm/trunk/engines/sword1/sound.cpp
scummvm/trunk/engines/tucker/locations.cpp
Modified: scummvm/trunk/backends/events/default/default-events.h
===================================================================
--- scummvm/trunk/backends/events/default/default-events.h 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/backends/events/default/default-events.h 2008-12-25 20:40:00 UTC (rev 35542)
@@ -28,7 +28,10 @@
#include "common/events.h"
#include "common/savefile.h"
+#include "common/mutex.h"
+class OSystem;
+
/*
At some point we will remove pollEvent from OSystem and change
DefaultEventManager to use a "boss" derived from this class:
Modified: scummvm/trunk/common/events.h
===================================================================
--- scummvm/trunk/common/events.h 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/common/events.h 2008-12-25 20:40:00 UTC (rev 35542)
@@ -29,7 +29,6 @@
#include "common/keyboard.h"
#include "common/queue.h"
#include "common/rect.h"
-#include "common/system.h"
#include "common/noncopyable.h"
namespace Common {
Modified: scummvm/trunk/common/xmlparser.cpp
===================================================================
--- scummvm/trunk/common/xmlparser.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/common/xmlparser.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -23,17 +23,47 @@
*
*/
+#include "common/xmlparser.h"
#include "common/util.h"
-#include "common/system.h"
-#include "common/events.h"
-#include "common/hashmap.h"
-#include "common/hash-str.h"
-#include "common/xmlparser.h"
+#include "common/archive.h"
namespace Common {
-using namespace Graphics;
+bool XMLParser::loadFile(const Common::String &filename) {
+ _stream = SearchMan.openFile(filename);
+ if (!_stream)
+ return false;
+ _fileName = filename;
+ return true;
+}
+
+bool XMLParser::loadFile(const FSNode &node) {
+ _stream = node.openForReading();
+ if (!_stream)
+ return false;
+
+ _fileName = node.getName();
+ return true;
+}
+
+bool XMLParser::loadBuffer(const byte *buffer, uint32 size, bool disposable) {
+ _stream = new MemoryReadStream(buffer, size, disposable);
+ _fileName = "Memory Stream";
+ return true;
+}
+
+bool XMLParser::loadStream(Common::SeekableReadStream *stream) {
+ _stream = stream;
+ _fileName = "File Stream";
+ return true;
+}
+
+void XMLParser::close() {
+ delete _stream;
+ _stream = 0;
+}
+
bool XMLParser::parserError(const char *errorString, ...) {
_state = kParserError;
Modified: scummvm/trunk/common/xmlparser.h
===================================================================
--- scummvm/trunk/common/xmlparser.h 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/common/xmlparser.h 2008-12-25 20:40:00 UTC (rev 35542)
@@ -27,11 +27,7 @@
#define XML_PARSER_H
#include "common/scummsys.h"
-#include "common/archive.h"
-#include "common/system.h"
#include "common/stream.h"
-#include "common/file.h"
-#include "common/fs.h"
#include "common/hashmap.h"
#include "common/hash-str.h"
@@ -40,6 +36,8 @@
namespace Common {
+class FSNode;
+
/*
XMLParser.cpp/h -- Generic XML Parser
=====================================
@@ -184,24 +182,10 @@
*
* @param filename Name of the file to load.
*/
- bool loadFile(const Common::String &filename) {
- _stream = SearchMan.openFile(filename);
- if (!_stream)
- return false;
+ bool loadFile(const Common::String &filename);
- _fileName = filename;
- return true;
- }
+ bool loadFile(const FSNode &node);
- bool loadFile(const FSNode &node) {
- _stream = node.openForReading();
- if (!_stream)
- return false;
-
- _fileName = node.getName();
- return true;
- }
-
/**
* Loads a memory buffer into the parser.
* Used for loading the default theme fallback directly
@@ -213,22 +197,11 @@
* i.e. if it can be freed safely after it's
* no longer needed by the parser.
*/
- bool loadBuffer(const byte *buffer, uint32 size, bool disposable = false) {
- _stream = new MemoryReadStream(buffer, size, disposable);
- _fileName = "Memory Stream";
- return true;
- }
+ bool loadBuffer(const byte *buffer, uint32 size, bool disposable = false);
- bool loadStream(Common::SeekableReadStream *stream) {
- _stream = stream;
- _fileName = "File Stream";
- return true;
- }
+ bool loadStream(Common::SeekableReadStream *stream);
- void close() {
- delete _stream;
- _stream = 0;
- }
+ void close();
/**
* The actual parsing function.
Modified: scummvm/trunk/engines/cine/prc.cpp
===================================================================
--- scummvm/trunk/engines/cine/prc.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/cine/prc.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -26,11 +26,12 @@
#include "common/endian.h"
#include "common/events.h"
+#include "common/config-manager.h"
+#include "common/system.h" // for g_system->getEventManager()
#include "cine/cine.h"
#include "cine/various.h"
-#include "common/config-manager.h"
namespace Cine {
Modified: scummvm/trunk/engines/cruise/cruise_main.cpp
===================================================================
--- scummvm/trunk/engines/cruise/cruise_main.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/cruise/cruise_main.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -23,9 +23,9 @@
*
*/
-
#include "common/endian.h"
#include "common/events.h"
+#include "common/system.h" // for g_system->getEventManager()
#include "cruise/cruise_main.h"
#include "cruise/cell.h"
Modified: scummvm/trunk/engines/engine.h
===================================================================
--- scummvm/trunk/engines/engine.h 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/engine.h 2008-12-25 20:40:00 UTC (rev 35542)
@@ -250,6 +250,11 @@
*/
void openMainMenuDialog();
+
+ Common::TimerManager *getTimerManager() { return _timer; }
+ Common::EventManager *getEventManager() { return _eventMan; }
+ Common::SaveFileManager *getSaveFileManager() { return _saveFileMan; }
+
public:
/** On some systems, check if the game appears to be run from CD. */
Modified: scummvm/trunk/engines/kyra/kyra_v1.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.h 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/kyra/kyra_v1.h 2008-12-25 20:40:00 UTC (rev 35542)
@@ -30,6 +30,7 @@
#include "common/array.h"
#include "common/events.h"
+#include "common/system.h"
#include "kyra/script.h"
Modified: scummvm/trunk/engines/parallaction/input.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/input.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/parallaction/input.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -24,6 +24,7 @@
*/
#include "common/events.h"
+#include "common/system.h"
#include "parallaction/input.h"
#include "parallaction/parallaction.h"
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -27,6 +27,7 @@
#include "common/events.h"
#include "common/file.h"
#include "common/util.h"
+#include "common/system.h"
#include "sound/mididrv.h"
#include "sound/mixer.h"
Modified: scummvm/trunk/engines/queen/music.cpp
===================================================================
--- scummvm/trunk/engines/queen/music.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/queen/music.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -84,7 +84,7 @@
_parser->setMidiDriver(this);
_parser->setTimerRate(_driver->getBaseTempo());
- vm->_system->getEventManager()->registerRandomSource(_rnd, "queenMusic");
+ vm->getEventManager()->registerRandomSource(_rnd, "queenMusic");
}
MidiMusic::~MidiMusic() {
Modified: scummvm/trunk/engines/saga/introproc_ihnm.cpp
===================================================================
--- scummvm/trunk/engines/saga/introproc_ihnm.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/saga/introproc_ihnm.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -39,6 +39,7 @@
#include "saga/scene.h"
#include "common/events.h"
+#include "common/system.h"
namespace Saga {
Modified: scummvm/trunk/engines/sky/logic.cpp
===================================================================
--- scummvm/trunk/engines/sky/logic.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/sky/logic.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/rect.h"
#include "common/events.h"
+#include "common/system.h"
#include "sky/autoroute.h"
#include "sky/compact.h"
Modified: scummvm/trunk/engines/sky/sky.cpp
===================================================================
--- scummvm/trunk/engines/sky/sky.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/sky/sky.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -24,6 +24,7 @@
*/
#include "common/config-manager.h"
+#include "common/system.h"
#include "sky/control.h"
#include "sky/debug.h"
Modified: scummvm/trunk/engines/sword1/detection.cpp
===================================================================
--- scummvm/trunk/engines/sword1/detection.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/sword1/detection.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -31,6 +31,7 @@
#include "common/file.h"
#include "common/fs.h"
#include "common/savefile.h"
+#include "common/system.h"
#include "graphics/thumbnail.h"
#include "engines/metaengine.h"
Modified: scummvm/trunk/engines/sword1/sound.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sound.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/sword1/sound.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -28,6 +28,7 @@
#include "common/util.h"
#include "common/events.h"
+#include "common/system.h"
#include "sword1/sound.h"
#include "sword1/resman.h"
Modified: scummvm/trunk/engines/tucker/locations.cpp
===================================================================
--- scummvm/trunk/engines/tucker/locations.cpp 2008-12-25 20:36:58 UTC (rev 35541)
+++ scummvm/trunk/engines/tucker/locations.cpp 2008-12-25 20:40:00 UTC (rev 35542)
@@ -25,6 +25,7 @@
#include "tucker/tucker.h"
#include "tucker/graphics.h"
+#include "common/system.h"
namespace Tucker {
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