[Scummvm-cvs-logs] SF.net SVN: scummvm:[48934] scummvm/trunk/engines
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue May 4 13:58:13 CEST 2010
Revision: 48934
http://scummvm.svn.sourceforge.net/scummvm/?rev=48934&view=rev
Author: fingolfin
Date: 2010-05-04 11:58:12 +0000 (Tue, 04 May 2010)
Log Message:
-----------
Move initGraphics and initCommonGFX from to new header.
These functions are only used internally be Engine subclasses, and
by moving them to a separate header we can reduce indirect header
dependencies.
Modified Paths:
--------------
scummvm/trunk/engines/agi/agi.cpp
scummvm/trunk/engines/agos/agos.cpp
scummvm/trunk/engines/cine/cine.cpp
scummvm/trunk/engines/cruise/cruise.cpp
scummvm/trunk/engines/draci/draci.cpp
scummvm/trunk/engines/drascula/drascula.cpp
scummvm/trunk/engines/engine.cpp
scummvm/trunk/engines/engine.h
scummvm/trunk/engines/gob/video.cpp
scummvm/trunk/engines/groovie/groovie.cpp
scummvm/trunk/engines/kyra/screen.cpp
scummvm/trunk/engines/lure/lure.cpp
scummvm/trunk/engines/m4/m4.cpp
scummvm/trunk/engines/made/made.cpp
scummvm/trunk/engines/mohawk/graphics.cpp
scummvm/trunk/engines/mohawk/livingbooks.cpp
scummvm/trunk/engines/parallaction/graphics.cpp
scummvm/trunk/engines/queen/queen.cpp
scummvm/trunk/engines/saga/gfx.cpp
scummvm/trunk/engines/sci/graphics/screen.cpp
scummvm/trunk/engines/sci/sci.cpp
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/sky/sky.cpp
scummvm/trunk/engines/sword1/sword1.cpp
scummvm/trunk/engines/sword2/sword2.cpp
scummvm/trunk/engines/teenagent/teenagent.cpp
scummvm/trunk/engines/tinsel/tinsel.cpp
scummvm/trunk/engines/touche/touche.cpp
scummvm/trunk/engines/tucker/tucker.cpp
Added Paths:
-----------
scummvm/trunk/engines/util.h
Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/agi/agi.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -31,6 +31,8 @@
#include "common/config-manager.h"
#include "common/random.h"
+#include "engines/util.h"
+
#include "base/plugins.h"
#include "base/version.h"
Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/agos/agos.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -30,6 +30,8 @@
#include "common/fs.h"
#include "common/system.h"
+#include "engines/util.h"
+
#include "agos/debugger.h"
#include "agos/intern.h"
#include "agos/agos.h"
Modified: scummvm/trunk/engines/cine/cine.cpp
===================================================================
--- scummvm/trunk/engines/cine/cine.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/cine/cine.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -30,6 +30,8 @@
#include "common/config-manager.h"
#include "common/system.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "sound/mididrv.h"
Modified: scummvm/trunk/engines/cruise/cruise.cpp
===================================================================
--- scummvm/trunk/engines/cruise/cruise.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/cruise/cruise.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -30,6 +30,8 @@
#include "common/config-manager.h"
#include "common/system.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "sound/mididrv.h"
Modified: scummvm/trunk/engines/draci/draci.cpp
===================================================================
--- scummvm/trunk/engines/draci/draci.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/draci/draci.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -31,6 +31,8 @@
#include "common/keyboard.h"
#include "common/EventRecorder.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "graphics/font.h"
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -33,6 +33,8 @@
#include "base/plugins.h"
#include "base/version.h"
+#include "engines/util.h"
+
#include "sound/mixer.h"
#include "drascula/drascula.h"
Modified: scummvm/trunk/engines/engine.cpp
===================================================================
--- scummvm/trunk/engines/engine.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/engine.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -32,6 +32,7 @@
#include "engines/engine.h"
#include "engines/dialogs.h"
#include "engines/metaengine.h"
+#include "engines/util.h"
#include "common/config-manager.h"
#include "common/debug.h"
Modified: scummvm/trunk/engines/engine.h
===================================================================
--- scummvm/trunk/engines/engine.h 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/engine.h 2010-05-04 11:58:12 UTC (rev 48934)
@@ -28,8 +28,6 @@
#include "common/scummsys.h"
#include "common/error.h"
#include "common/str.h"
-#include "common/list.h"
-#include "graphics/pixelformat.h"
class OSystem;
@@ -47,28 +45,6 @@
}
/**
- * Setup the backend's graphics mode.
- */
-void initCommonGFX(bool defaultTo1XScaler);
-
-/**
- * Setup the backend's screen size and graphics mode.
- *
- * Shows an various warnings on certain backend graphics
- * transaction failures (aspect switch, fullscreen switch, etc.).
- *
- * Errors out when backend is not able to switch to the specified
- * mode.
- *
- * Defaults to 256 color paletted mode if no graphics format is provided.
- * Uses the backend's preferred format if graphics format pointer is NULL.
- * Finds the best compatible format if a list of graphics formats is provided.
- */
-void initGraphics(int width, int height, bool defaultTo1xScaler);
-void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format);
-void initGraphics(int width, int height, bool defaultTo1xScaler, const Common::List<Graphics::PixelFormat> &formatList);
-
-/**
* Initializes graphics and shows error message.
*/
void GUIErrorMessage(const Common::String msg);
Modified: scummvm/trunk/engines/gob/video.cpp
===================================================================
--- scummvm/trunk/engines/gob/video.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/gob/video.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -24,6 +24,9 @@
*/
#include "common/endian.h"
+
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "graphics/fontman.h"
#include "graphics/surface.h"
Modified: scummvm/trunk/engines/groovie/groovie.cpp
===================================================================
--- scummvm/trunk/engines/groovie/groovie.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/groovie/groovie.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -25,6 +25,9 @@
#include "common/config-manager.h"
#include "common/events.h"
+
+#include "engines/util.h"
+
#include "sound/mixer.h"
#include "groovie/groovie.h"
Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/kyra/screen.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -27,6 +27,8 @@
#include "common/endian.h"
#include "common/system.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "graphics/sjis.h"
Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/lure/lure.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -28,6 +28,8 @@
#include "common/savefile.h"
#include "common/EventRecorder.h"
+#include "engines/util.h"
+
#include "lure/luredefs.h"
#include "lure/surface.h"
#include "lure/lure.h"
Modified: scummvm/trunk/engines/m4/m4.cpp
===================================================================
--- scummvm/trunk/engines/m4/m4.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/m4/m4.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -58,7 +58,7 @@
#include "common/endian.h"
#include "common/system.h"
#include "common/config-manager.h"
-#include "engines/engine.h"
+#include "engines/util.h"
#include "graphics/surface.h"
#include "sound/mididrv.h"
Modified: scummvm/trunk/engines/made/made.cpp
===================================================================
--- scummvm/trunk/engines/made/made.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/made/made.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -33,6 +33,8 @@
#include "graphics/cursorman.h"
+#include "engines/util.h"
+
#include "base/plugins.h"
#include "base/version.h"
Modified: scummvm/trunk/engines/mohawk/graphics.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/graphics.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/mohawk/graphics.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -29,6 +29,8 @@
#include "mohawk/riven.h"
#include "mohawk/riven_cursors.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "graphics/primitives.h"
#include "gui/message.h"
Modified: scummvm/trunk/engines/mohawk/livingbooks.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/livingbooks.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/mohawk/livingbooks.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -28,6 +28,8 @@
#include "common/events.h"
+#include "engines/util.h"
+
namespace Mohawk {
MohawkEngine_LivingBooks::MohawkEngine_LivingBooks(OSystem *syst, const MohawkGameDescription *gamedesc) : MohawkEngine(syst, gamedesc) {
Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/parallaction/graphics.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -27,6 +27,7 @@
#include "common/system.h"
#include "common/file.h"
#include "graphics/primitives.h"
+#include "engines/util.h"
#include "parallaction/input.h"
#include "parallaction/parallaction.h"
Modified: scummvm/trunk/engines/queen/queen.cpp
===================================================================
--- scummvm/trunk/engines/queen/queen.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/queen/queen.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -33,6 +33,8 @@
#include "common/events.h"
#include "common/EventRecorder.h"
+#include "engines/util.h"
+
#include "queen/queen.h"
#include "queen/bankman.h"
#include "queen/command.h"
Modified: scummvm/trunk/engines/saga/gfx.cpp
===================================================================
--- scummvm/trunk/engines/saga/gfx.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/saga/gfx.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -34,6 +34,7 @@
#include "common/system.h"
#include "graphics/cursorman.h"
+#include "engines/util.h"
namespace Saga {
Modified: scummvm/trunk/engines/sci/graphics/screen.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/screen.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/sci/graphics/screen.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -27,6 +27,7 @@
#include "common/util.h"
#include "common/system.h"
#include "graphics/surface.h"
+#include "engines/util.h"
#include "sci/sci.h"
#include "sci/engine/state.h"
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/sci/sci.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -28,6 +28,8 @@
#include "common/config-manager.h"
#include "engines/advancedDetector.h"
+#include "engines/util.h"
+
#include "sci/sci.h"
#include "sci/debug.h"
#include "sci/console.h"
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -29,6 +29,8 @@
#include "common/EventRecorder.h"
#include "common/system.h"
+#include "engines/util.h"
+
#include "gui/message.h"
#include "gui/GuiManager.h"
Modified: scummvm/trunk/engines/sky/sky.cpp
===================================================================
--- scummvm/trunk/engines/sky/sky.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/sky/sky.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -47,6 +47,9 @@
#include "sound/mididrv.h"
#include "sound/mixer.h"
+#include "engines/util.h"
+
+
#ifdef _WIN32_WCE
extern bool toolbar_drawn;
Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/sword1/sword1.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -38,6 +38,8 @@
#include "common/config-manager.h"
+#include "engines/util.h"
+
#include "gui/message.h"
#include "gui/GuiManager.h"
Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/sword2/sword2.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -25,8 +25,6 @@
* $Id$
*/
-
-
#include "base/plugins.h"
#include "common/config-manager.h"
@@ -38,6 +36,7 @@
#include "common/system.h"
#include "engines/metaengine.h"
+#include "engines/util.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -27,11 +27,16 @@
#include "common/events.h"
#include "common/savefile.h"
#include "common/system.h"
+
#include "engines/advancedDetector.h"
+#include "engines/util.h"
+
#include "sound/mixer.h"
#include "sound/decoders/raw.h"
+
#include "graphics/cursorman.h"
#include "graphics/thumbnail.h"
+
#include "teenagent/console.h"
#include "teenagent/music.h"
#include "teenagent/objects.h"
Modified: scummvm/trunk/engines/tinsel/tinsel.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/tinsel.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/tinsel/tinsel.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -35,6 +35,8 @@
#include "common/serializer.h"
#include "common/stream.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "base/plugins.h"
Modified: scummvm/trunk/engines/touche/touche.cpp
===================================================================
--- scummvm/trunk/engines/touche/touche.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/touche/touche.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -29,6 +29,7 @@
#include "common/EventRecorder.h"
#include "common/system.h"
+#include "engines/util.h"
#include "graphics/cursorman.h"
#include "sound/mididrv.h"
Modified: scummvm/trunk/engines/tucker/tucker.cpp
===================================================================
--- scummvm/trunk/engines/tucker/tucker.cpp 2010-05-04 11:56:52 UTC (rev 48933)
+++ scummvm/trunk/engines/tucker/tucker.cpp 2010-05-04 11:58:12 UTC (rev 48934)
@@ -27,6 +27,8 @@
#include "common/events.h"
#include "common/system.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "tucker/tucker.h"
Added: scummvm/trunk/engines/util.h
===================================================================
--- scummvm/trunk/engines/util.h (rev 0)
+++ scummvm/trunk/engines/util.h 2010-05-04 11:58:12 UTC (rev 48934)
@@ -0,0 +1,54 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#ifndef ENGINES_UTIL_H
+#define ENGINES_UTIL_H
+
+#include "common/scummsys.h"
+#include "common/list.h"
+#include "graphics/pixelformat.h"
+
+/**
+ * Setup the backend's graphics mode.
+ */
+void initCommonGFX(bool defaultTo1XScaler);
+
+/**
+ * Setup the backend's screen size and graphics mode.
+ *
+ * Shows an various warnings on certain backend graphics
+ * transaction failures (aspect switch, fullscreen switch, etc.).
+ *
+ * Errors out when backend is not able to switch to the specified
+ * mode.
+ *
+ * Defaults to 256 color paletted mode if no graphics format is provided.
+ * Uses the backend's preferred format if graphics format pointer is NULL.
+ * Finds the best compatible format if a list of graphics formats is provided.
+ */
+void initGraphics(int width, int height, bool defaultTo1xScaler);
+void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format);
+void initGraphics(int width, int height, bool defaultTo1xScaler, const Common::List<Graphics::PixelFormat> &formatList);
+
+#endif
Property changes on: scummvm/trunk/engines/util.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:eol-style
+ native
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