aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-05-14 23:28:22 +0000
committerEugene Sandulenko2005-05-14 23:28:22 +0000
commit80ee8188d3d7fdd43c36a47fa68283ee78f9e8dd (patch)
tree61a692342f0c6762919d3701811438d77991c5f7
parent3588b96d4fc6c1100a01f21987f34dab9c0e97bf (diff)
downloadscummvm-rg350-80ee8188d3d7fdd43c36a47fa68283ee78f9e8dd.tar.gz
scummvm-rg350-80ee8188d3d7fdd43c36a47fa68283ee78f9e8dd.tar.bz2
scummvm-rg350-80ee8188d3d7fdd43c36a47fa68283ee78f9e8dd.zip
Improvements to --disable-* stuff. Now less ugly #ifdefs with #includes.
svn-id: r18100
-rw-r--r--common/scaler.cpp6
-rw-r--r--scumm/actor.cpp5
-rw-r--r--scumm/akos.h2
-rw-r--r--scumm/cursor.cpp7
-rw-r--r--scumm/imuse_digi/dimuse.h2
-rw-r--r--scumm/input.cpp10
-rw-r--r--scumm/insane/insane.h2
-rw-r--r--scumm/logic_he.h5
-rw-r--r--scumm/resource.cpp2
-rw-r--r--scumm/resource_v7he.h2
-rw-r--r--scumm/script_v6.cpp9
-rw-r--r--scumm/scumm.cpp16
-rw-r--r--scumm/smush/smush_player.h2
-rw-r--r--scumm/sound.cpp5
-rw-r--r--scumm/vars.cpp5
-rw-r--r--scumm/wiz_he.h2
16 files changed, 30 insertions, 52 deletions
diff --git a/common/scaler.cpp b/common/scaler.cpp
index 0d059f84ec..2d1996b6ba 100644
--- a/common/scaler.cpp
+++ b/common/scaler.cpp
@@ -103,10 +103,8 @@ void InitScalers(uint32 BitFormat) {
InitLUT(BitFormat);
}
-#ifdef DISABLE_HQ_SCALERS
-void InitLUT(uint32 BitFormat) {}
-#else
void InitLUT(uint32 BitFormat) {
+#ifndef DISABLE_HQ_SCALERS
int r, g, b;
int Y, u, v;
int gInc, gShift;
@@ -133,8 +131,8 @@ void InitLUT(uint32 BitFormat) {
}
}
}
-}
#endif
+}
/**
* Trivial 'scaler' - in fact it doesn't do any scaling but just copies the
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index b120f2b617..d077cf867e 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -23,6 +23,7 @@
#include "stdafx.h"
#include "scumm/scumm.h"
#include "scumm/actor.h"
+#include "scumm/akos.h"
#include "scumm/boxes.h"
#include "scumm/charset.h"
#include "scumm/costume.h"
@@ -35,10 +36,6 @@
#include "scumm/util.h"
#include "scumm/wiz_he.h"
-#ifndef DISABLE_SCUMM_7_8
-#include "scumm/akos.h"
-#endif
-
namespace Scumm {
byte Actor::kInvalidBox = 0;
diff --git a/scumm/akos.h b/scumm/akos.h
index 6a15bf0bdc..e4b7c6c396 100644
--- a/scumm/akos.h
+++ b/scumm/akos.h
@@ -20,7 +20,7 @@
*
*/
-#ifndef AKOS_H
+#if !defined(AKOS_H) && !defined(DISABLE_SCUMM_7_8)
#define AKOS_H
#include "scumm/base-costume.h"
diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp
index 0aad5939de..5eea91fd18 100644
--- a/scumm/cursor.cpp
+++ b/scumm/cursor.cpp
@@ -22,16 +22,13 @@
#include "stdafx.h"
#include "common/system.h"
#include "common/util.h"
+#include "scumm/bomp.h"
#include "scumm/charset.h"
#include "scumm/intern.h"
#include "scumm/object.h"
+#include "scumm/resource_v7he.h"
#include "scumm/saveload.h"
#include "scumm/scumm.h"
-#include "scumm/bomp.h"
-
-#ifndef DISABLE_HE
-#include "scumm/resource_v7he.h"
-#endif
namespace Scumm {
diff --git a/scumm/imuse_digi/dimuse.h b/scumm/imuse_digi/dimuse.h
index b03600e41a..74eac91312 100644
--- a/scumm/imuse_digi/dimuse.h
+++ b/scumm/imuse_digi/dimuse.h
@@ -18,7 +18,7 @@
* $Header$
*/
-#ifndef IMUSE_DIGI_H
+#if !defined(IMUSE_DIGI_H) && !defined(DISABLE_SCUMM_7_8)
#define IMUSE_DIGI_H
#include "common/scummsys.h"
diff --git a/scumm/input.cpp b/scumm/input.cpp
index 787ed4f284..d3f8071b8d 100644
--- a/scumm/input.cpp
+++ b/scumm/input.cpp
@@ -30,18 +30,12 @@
#include "scumm/debugger.h"
#include "scumm/dialogs.h"
+#include "scumm/insane/insane.h"
#include "scumm/imuse.h"
+#include "scumm/logic_he.h"
#include "scumm/scumm.h"
#include "scumm/sound.h"
-#ifndef DISABLE_SCUMM_7_8
-#include "scumm/insane/insane.h"
-#endif
-
-#ifndef DISABLE_HE
-#include "scumm/logic_he.h"
-#endif
-
#ifdef _WIN32_WCE
#define KEY_ALL_SKIP 3457
diff --git a/scumm/insane/insane.h b/scumm/insane/insane.h
index c5752b3294..7e422d81ad 100644
--- a/scumm/insane/insane.h
+++ b/scumm/insane/insane.h
@@ -19,7 +19,7 @@
*
*/
-#ifndef INSANE_H
+#if !defined(INSANE_H) && !defined(DISABLE_SCUMM_7_8)
#define INSANE_H
#include "base/engine.h"
diff --git a/scumm/logic_he.h b/scumm/logic_he.h
index 8d41c4aaeb..a51f7d1c5a 100644
--- a/scumm/logic_he.h
+++ b/scumm/logic_he.h
@@ -19,6 +19,9 @@
*
*/
+#if !defined(LOGIC_HE_H) && !defined(DISABLE_HE)
+#define LOGIC_HE_H
+
#include "stdafx.h"
#include "scumm/intern.h"
@@ -105,3 +108,5 @@ private:
};
} // End of namespace Scumm
+
+#endif
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 2ac7d110df..f38483dbd2 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -256,6 +256,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) {
char buf[128];
if (_version == 8) {
+#ifndef DISABLE_SCUMM_7_8
char result;
_imuseDigital->stopAllSounds();
@@ -270,6 +271,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) {
if (!result) {
error("Cannot find file: '%s'", filename);
}
+#endif
} else {
sprintf(buf, "Cannot find file: '%s'", filename);
InfoDialog dialog(this, (char*)buf);
diff --git a/scumm/resource_v7he.h b/scumm/resource_v7he.h
index fc64a04241..a4808f1f54 100644
--- a/scumm/resource_v7he.h
+++ b/scumm/resource_v7he.h
@@ -23,7 +23,7 @@
*
*/
-#ifndef RESOURCE_V7HE_H
+#if !defined(RESOURCE_V7HE_H) && !defined(DISABLE_HE)
#define RESOURCE_V7HE_H
namespace Scumm {
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index f744ee9365..6ed5c7637f 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -28,10 +28,13 @@
#include "scumm/actor.h"
#include "scumm/charset.h"
#include "scumm/imuse.h"
+#include "scumm/imuse_digi/dimuse.h"
+#include "scumm/insane/insane.h"
#include "scumm/intern.h"
#include "scumm/object.h"
#include "scumm/resource.h"
#include "scumm/scumm.h"
+#include "scumm/smush/smush_player.h"
#include "scumm/sound.h"
#include "scumm/util.h"
#include "scumm/verbs.h"
@@ -39,12 +42,6 @@
#include "sound/mididrv.h"
#include "sound/mixer.h"
-#ifndef DISABLE_SCUMM_7_8
-#include "scumm/imuse_digi/dimuse.h"
-#include "scumm/insane/insane.h"
-#include "scumm/smush/smush_player.h"
-#endif
-
namespace Scumm {
#define OPCODE(x) _OPCODE(ScummEngine_v6, x)
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 0fbd069c3a..1c31f14177 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -34,32 +34,26 @@
#include "gui/message.h"
#include "gui/newgui.h"
+#include "scumm/akos.h"
#include "scumm/charset.h"
#include "scumm/costume.h"
#include "scumm/debugger.h"
#include "scumm/dialogs.h"
#include "scumm/imuse.h"
+#include "scumm/imuse_digi/dimuse.h"
+#include "scumm/insane/insane.h"
#include "scumm/intern.h"
+#include "scumm/logic_he.h"
#include "scumm/player_nes.h"
#include "scumm/player_v1.h"
#include "scumm/player_v2.h"
#include "scumm/player_v2a.h"
#include "scumm/player_v3a.h"
+#include "scumm/resource_v7he.h"
#include "scumm/sound.h"
#include "scumm/scumm.h"
#include "scumm/util.h"
-#ifndef DISABLE_HE
-#include "scumm/logic_he.h"
-#include "scumm/resource_v7he.h"
-#endif
-
-#ifndef DISABLE_SCUMM_7_8
-#include "scumm/akos.h"
-#include "scumm/imuse_digi/dimuse.h"
-#include "scumm/insane/insane.h"
-#endif
-
#ifdef __PALM_OS__
#include "extras/palm-scumm-md5.h"
#else
diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h
index 7b6b4ded18..6785b05c11 100644
--- a/scumm/smush/smush_player.h
+++ b/scumm/smush/smush_player.h
@@ -19,7 +19,7 @@
*
*/
-#ifndef SMUSH_PLAYER_H
+#if !defined(SMUSH_PLAYER_H) && !defined(DISABLE_SCUMM_7_8)
#define SMUSH_PLAYER_H
#include "common/util.h"
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index e222ab19d7..62ac97f15e 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -23,15 +23,12 @@
#include "stdafx.h"
#include "scumm/actor.h"
#include "scumm/imuse.h"
+#include "scumm/imuse_digi/dimuse.h"
#include "scumm/scumm.h"
#include "scumm/saveload.h"
#include "scumm/sound.h"
#include "scumm/util.h"
-#ifndef DISABLE_SCUMM_7_8
-#include "scumm/imuse_digi/dimuse.h"
-#endif
-
#include "common/config-manager.h"
#include "common/timer.h"
#include "common/util.h"
diff --git a/scumm/vars.cpp b/scumm/vars.cpp
index e78fd5abc9..a86c090c45 100644
--- a/scumm/vars.cpp
+++ b/scumm/vars.cpp
@@ -25,11 +25,8 @@
#include "common/config-manager.h"
#include "scumm/scumm.h"
#include "scumm/intern.h"
-#include "sound/mididrv.h"
-
-#ifndef DISABLE_HE
#include "scumm/logic_he.h"
-#endif
+#include "sound/mididrv.h"
namespace Scumm {
diff --git a/scumm/wiz_he.h b/scumm/wiz_he.h
index 574ef016c5..3a815f8db3 100644
--- a/scumm/wiz_he.h
+++ b/scumm/wiz_he.h
@@ -20,7 +20,7 @@
*
*/
-#ifndef WIZ_HE_H
+#if !defined(WIZ_HE_H) && !defined(DISABLE_HE)
#define WIZ_HE_H
#include "common/rect.h"