aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/agi.cpp2
-rw-r--r--engines/agos/agos.cpp2
-rw-r--r--engines/cine/cine.cpp2
-rw-r--r--engines/cruise/cruise.cpp2
-rw-r--r--engines/draci/draci.cpp2
-rw-r--r--engines/drascula/drascula.cpp2
-rw-r--r--engines/engine.cpp1
-rw-r--r--engines/engine.h24
-rw-r--r--engines/gob/video.cpp3
-rw-r--r--engines/groovie/groovie.cpp3
-rw-r--r--engines/kyra/screen.cpp2
-rw-r--r--engines/lure/lure.cpp2
-rw-r--r--engines/m4/m4.cpp2
-rw-r--r--engines/made/made.cpp2
-rw-r--r--engines/mohawk/graphics.cpp2
-rw-r--r--engines/mohawk/livingbooks.cpp2
-rw-r--r--engines/parallaction/graphics.cpp1
-rw-r--r--engines/queen/queen.cpp2
-rw-r--r--engines/saga/gfx.cpp1
-rw-r--r--engines/sci/graphics/screen.cpp1
-rw-r--r--engines/sci/sci.cpp2
-rw-r--r--engines/scumm/scumm.cpp2
-rw-r--r--engines/sky/sky.cpp3
-rw-r--r--engines/sword1/sword1.cpp2
-rw-r--r--engines/sword2/sword2.cpp3
-rw-r--r--engines/teenagent/teenagent.cpp5
-rw-r--r--engines/tinsel/tinsel.cpp2
-rw-r--r--engines/touche/touche.cpp1
-rw-r--r--engines/tucker/tucker.cpp2
-rw-r--r--engines/util.h54
30 files changed, 109 insertions, 27 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 2a67b5a16f..561989ee66 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -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"
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 61e4351967..926b3a8972 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -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"
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index ee4bccf3fb..b91efb58db 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -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"
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index 0f6421ff3c..c91dfdd540 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -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"
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index ba9e30ba1d..5fbad40a4f 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -31,6 +31,8 @@
#include "common/keyboard.h"
#include "common/EventRecorder.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "graphics/font.h"
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 1fb3a53429..276554a24c 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -33,6 +33,8 @@
#include "base/plugins.h"
#include "base/version.h"
+#include "engines/util.h"
+
#include "sound/mixer.h"
#include "drascula/drascula.h"
diff --git a/engines/engine.cpp b/engines/engine.cpp
index a1bf09eed3..4cf797758f 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -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"
diff --git a/engines/engine.h b/engines/engine.h
index fc05a0bed4..ead1526d72 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -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 @@ namespace GUI {
}
/**
- * 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);
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp
index 9e1039f659..e2c25c3a22 100644
--- a/engines/gob/video.cpp
+++ b/engines/gob/video.cpp
@@ -24,6 +24,9 @@
*/
#include "common/endian.h"
+
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "graphics/fontman.h"
#include "graphics/surface.h"
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 0beccbd6c1..0e460a9049 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -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"
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 14463568ac..d088aeb66d 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -27,6 +27,8 @@
#include "common/endian.h"
#include "common/system.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "graphics/sjis.h"
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index f74f5f818a..45e207f0da 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -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"
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index 97b03c8582..37666f6880 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -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"
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index 1e173c0629..54e2189471 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -33,6 +33,8 @@
#include "graphics/cursorman.h"
+#include "engines/util.h"
+
#include "base/plugins.h"
#include "base/version.h"
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index 6c41f67d85..35691c36aa 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -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"
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index f0648fa114..515ee7c8ba 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -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) {
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index d92fc00c1e..a7b1f6fe32 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -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"
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index 29d9452f4c..08b8ded3bb 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -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"
diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp
index a1c76caac7..bb0a1677b1 100644
--- a/engines/saga/gfx.cpp
+++ b/engines/saga/gfx.cpp
@@ -34,6 +34,7 @@
#include "common/system.h"
#include "graphics/cursorman.h"
+#include "engines/util.h"
namespace Saga {
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 21f9b0afdd..e6c710b252 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -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"
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index a730688c3c..e96bfbad03 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -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"
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 29154b8738..93d4de6e97 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -29,6 +29,8 @@
#include "common/EventRecorder.h"
#include "common/system.h"
+#include "engines/util.h"
+
#include "gui/message.h"
#include "gui/GuiManager.h"
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index c099dbc8b1..9ea20aafc6 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -47,6 +47,9 @@
#include "sound/mididrv.h"
#include "sound/mixer.h"
+#include "engines/util.h"
+
+
#ifdef _WIN32_WCE
extern bool toolbar_drawn;
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 2b3a4042fc..26bb1d959b 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -38,6 +38,8 @@
#include "common/config-manager.h"
+#include "engines/util.h"
+
#include "gui/message.h"
#include "gui/GuiManager.h"
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 7d3a345d3c..29f567d7ef 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -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"
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index eb38e4820c..686ea8bb74 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -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"
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index aed6aae097..5f012ddff3 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -35,6 +35,8 @@
#include "common/serializer.h"
#include "common/stream.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "base/plugins.h"
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 185ad34753..9c54f18a79 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -29,6 +29,7 @@
#include "common/EventRecorder.h"
#include "common/system.h"
+#include "engines/util.h"
#include "graphics/cursorman.h"
#include "sound/mididrv.h"
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index f704dcb195..c86991ab1b 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -27,6 +27,8 @@
#include "common/events.h"
#include "common/system.h"
+#include "engines/util.h"
+
#include "graphics/cursorman.h"
#include "tucker/tucker.h"
diff --git a/engines/util.h b/engines/util.h
new file mode 100644
index 0000000000..5bfc4f8ad9
--- /dev/null
+++ b/engines/util.h
@@ -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