aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2007-02-10 02:05:59 +0000
committerMax Horn2007-02-10 02:05:59 +0000
commit6899e72be9f8c87940168d24ded008007bae0225 (patch)
tree22acd760c208960a0362d71e703d98ebdfa0681f /engines
parent7940720d71edcc6476e6b5f8f56d174ccb65b3f7 (diff)
downloadscummvm-rg350-6899e72be9f8c87940168d24ded008007bae0225.tar.gz
scummvm-rg350-6899e72be9f8c87940168d24ded008007bae0225.tar.bz2
scummvm-rg350-6899e72be9f8c87940168d24ded008007bae0225.zip
Got rid of GF_DIGI_IMUSE and GF_NEW_CAMERA
svn-id: r25454
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/camera.cpp8
-rw-r--r--engines/scumm/gfx.cpp10
-rw-r--r--engines/scumm/input.cpp2
-rw-r--r--engines/scumm/plugin.cpp12
-rw-r--r--engines/scumm/room.cpp2
-rw-r--r--engines/scumm/saveload.cpp2
-rw-r--r--engines/scumm/script_v6.cpp4
-rw-r--r--engines/scumm/scumm.cpp10
-rw-r--r--engines/scumm/scumm.h10
-rw-r--r--engines/scumm/sound.cpp4
10 files changed, 28 insertions, 36 deletions
diff --git a/engines/scumm/camera.cpp b/engines/scumm/camera.cpp
index 52fbac01c5..03b5a64401 100644
--- a/engines/scumm/camera.cpp
+++ b/engines/scumm/camera.cpp
@@ -29,7 +29,7 @@
namespace Scumm {
void ScummEngine::setCameraAtEx(int at) {
- if (!(_game.features & GF_NEW_CAMERA)) {
+ if (_game.version < 7) {
camera._mode = kNormalCameraMode;
camera._cur.x = at;
setCameraAt(at, 0);
@@ -176,7 +176,7 @@ void ScummEngine::moveCamera() {
void ScummEngine::cameraMoved() {
int screenLeft;
- if (_game.features & GF_NEW_CAMERA) {
+ if (_game.version >= 7) {
assert(camera._cur.x >= (_screenWidth / 2) && camera._cur.y >= (_screenHeight / 2));
} else {
if (camera._cur.x < (_screenWidth / 2)) {
@@ -190,7 +190,7 @@ void ScummEngine::cameraMoved() {
_screenEndStrip = _screenStartStrip + _gdi->_numStrips - 1;
_screenTop = camera._cur.y - (_screenHeight / 2);
- if (_game.features & GF_NEW_CAMERA) {
+ if (_game.version >= 7) {
screenLeft = camera._cur.x - (_screenWidth / 2);
} else {
screenLeft = _screenStartStrip * 8;
@@ -206,7 +206,7 @@ void ScummEngine::panCameraTo(int x, int y) {
}
void ScummEngine::actorFollowCamera(int act) {
- if (!(_game.features & GF_NEW_CAMERA)) {
+ if (_game.version < 7) {
int old;
old = camera._follows;
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 0f17b6bcfd..03cdb5db41 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -448,7 +448,7 @@ void ScummEngine::drawDirtyScreenParts() {
updateDirtyScreen(kTextVirtScreen);
// Update game area ("stage")
- if (camera._last.x != camera._cur.x || (_game.features & GF_NEW_CAMERA && (camera._cur.y != camera._last.y))) {
+ if (camera._last.x != camera._cur.x || (_game.version >= 7 && (camera._cur.y != camera._last.y))) {
// Camera moved: redraw everything
VirtScreen *vs = &virtscr[kMainVirtScreen];
drawStripToScreen(vs, 0, vs->w, 0, vs->h);
@@ -779,13 +779,13 @@ void ScummEngine::redrawBGAreas() {
int diff;
int val = 0;
- if (!(_game.features & GF_NEW_CAMERA)) {
+ if (_game.id != GID_PASS && _game.version >= 4 && _game.version <= 6) {
// Starting with V4 games (with the exception of the PASS demo), text
// is drawn over the game graphics (as opposed to be drawn in a
// separate region of the screen). So, when scrolling in one of these
// games (pre-new camera system), if actor text is visible (as indicated
// by the _hasMask flag), we first remove it before proceeding.
- if (camera._cur.x != camera._last.x && _charset->_hasMask && (_game.version > 3 && _game.id != GID_PASS))
+ if (camera._cur.x != camera._last.x && _charset->_hasMask)
stopTalk();
}
@@ -798,7 +798,7 @@ void ScummEngine::redrawBGAreas() {
}
}
- if (_game.features & GF_NEW_CAMERA) {
+ if (_game.version >= 7) {
diff = camera._cur.x / 8 - camera._last.x / 8;
if (_fullRedraw || ABS(diff) >= _gdi->_numStrips) {
_bgNeedsRedraw = false;
@@ -3110,7 +3110,7 @@ void ScummEngine::fadeOut(int effect) {
VirtScreen *vs = &virtscr[0];
vs->setDirtyRange(0, 0);
- if (!(_game.features & GF_NEW_CAMERA))
+ if (_game.version < 7)
camera._last.x = camera._cur.x;
// TheDig can disable fadeIn(), and may call fadeOut() several times
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 807d1767c0..3bd7202ac5 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -243,7 +243,7 @@ void ScummEngine::processInput() {
_virtualMouse.x = _mouse.x + virtscr[0].xstart;
_virtualMouse.y = _mouse.y - virtscr[0].topline;
- if (_game.features & GF_NEW_CAMERA)
+ if (_game.version >= 7)
_virtualMouse.y += _screenTop;
if (_virtualMouse.y < 0)
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp
index 64db74de2c..0e846a82d1 100644
--- a/engines/scumm/plugin.cpp
+++ b/engines/scumm/plugin.cpp
@@ -246,14 +246,14 @@ static const GameSettings gameVariantsTable[] = {
{"samnmax", 0, GID_SAMNMAX, 6, 0, /*MDT_PCSPK |*/ MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK},
#ifndef DISABLE_SCUMM_7_8
- {"ft", "", GID_FT, 7, 0, MDT_NONE, GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE, UNK},
- {"ft", "Demo", GID_FT, 7, 0, MDT_NONE, GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO, UNK},
+ {"ft", "", GID_FT, 7, 0, MDT_NONE, GF_NEW_COSTUMES, UNK},
+ {"ft", "Demo", GID_FT, 7, 0, MDT_NONE, GF_NEW_COSTUMES | GF_DEMO, UNK},
- {"dig", "", GID_DIG, 7, 0, MDT_NONE, GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE, UNK},
- {"dig", "Demo", GID_DIG, 7, 0, MDT_NONE, GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO, UNK},
+ {"dig", "", GID_DIG, 7, 0, MDT_NONE, GF_NEW_COSTUMES, UNK},
+ {"dig", "Demo", GID_DIG, 7, 0, MDT_NONE, GF_NEW_COSTUMES | GF_DEMO, UNK},
- {"comi", "", GID_CMI, 8, 0, MDT_NONE, GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE, Common::kPlatformWindows},
- {"comi", "Demo", GID_CMI, 8, 0, MDT_NONE, GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEMO, Common::kPlatformWindows},
+ {"comi", "", GID_CMI, 8, 0, MDT_NONE, GF_NEW_COSTUMES, Common::kPlatformWindows},
+ {"comi", "Demo", GID_CMI, 8, 0, MDT_NONE, GF_NEW_COSTUMES | GF_DEMO, Common::kPlatformWindows},
#endif
// Humongous Entertainment Scumm Version 6
diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp
index 1ac12e39d3..102b012f76 100644
--- a/engines/scumm/room.cpp
+++ b/engines/scumm/room.cpp
@@ -158,7 +158,7 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) {
if (VAR_CAMERA_MAX_X != 0xFF)
VAR(VAR_CAMERA_MAX_X) = _roomWidth - (_screenWidth / 2);
- if (_game.features & GF_NEW_CAMERA) {
+ if (_game.version >= 7) {
VAR(VAR_CAMERA_MIN_Y) = _screenHeight / 2;
VAR(VAR_CAMERA_MAX_Y) = _roomHeight - (_screenHeight / 2);
setCameraAt(_screenWidth / 2, _screenHeight / 2);
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index e8771b68f2..25988c5122 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -334,7 +334,7 @@ bool ScummEngine::loadState(int slot, bool compat) {
// Load the static room data
setupRoomSubBlocks();
- if (!(_game.features & GF_NEW_CAMERA)) {
+ if (_game.version < 7) {
camera._last.x = camera._cur.x;
}
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index d2e9a49458..d29b30fc8f 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -1100,7 +1100,7 @@ void ScummEngine_v6::o6_startSound() {
offset = pop();
#ifndef DISABLE_SCUMM_7_8
- if (_game.features & GF_DIGI_IMUSE)
+ if (_game.version >= 7)
_imuseDigital->startSfx(pop(), 64);
else
#endif
@@ -1112,7 +1112,7 @@ void ScummEngine_v6::o6_stopSound() {
}
void ScummEngine_v6::o6_startMusic() {
- if (_game.features & GF_DIGI_IMUSE)
+ if (_game.version >= 7)
error("o6_startMusic() It shouldn't be called here for imuse digital");
_sound->addSoundToQueue(pop());
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index c8434029be..c191f74a7a 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1176,9 +1176,7 @@ void ScummEngine::setupScumm() {
#ifndef DISABLE_SCUMM_7_8
void ScummEngine_v7::setupScumm() {
- if (_game.features & GF_DIGI_IMUSE) {
- _musicEngine = _imuseDigital = new IMuseDigital(this, _mixer, 10);
- }
+ _musicEngine = _imuseDigital = new IMuseDigital(this, _mixer, 10);
ScummEngine::setupScumm();
@@ -1314,7 +1312,7 @@ void ScummEngine::resetScumm() {
_verbs[i].key = 0;
}
- if (_game.features & GF_NEW_CAMERA) {
+ if (_game.version >= 7) {
VAR(VAR_CAMERA_THRESHOLD_X) = 100;
VAR(VAR_CAMERA_THRESHOLD_Y) = 70;
VAR(VAR_CAMERA_ACCEL_X) = 100;
@@ -1538,7 +1536,7 @@ void ScummEngine::setupMusic(int midi) {
}
// Init iMuse
- if (_game.features & GF_DIGI_IMUSE) {
+ if (_game.version >= 7) {
// Setup for digital iMuse is performed in another place
} else if (_game.platform == Common::kPlatformC64) {
// TODO
@@ -1889,7 +1887,7 @@ int ScummEngine_v90he::scummLoop(int delta) {
#endif
void ScummEngine::scummLoop_updateScummVars() {
- if (_game.features & GF_NEW_CAMERA) {
+ if (_game.version >= 7) {
VAR(VAR_CAMERA_POS_X) = camera._cur.x;
VAR(VAR_CAMERA_POS_Y) = camera._cur.y;
} else if (_game.version <= 2) {
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index d71b756641..63786864e4 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -80,15 +80,9 @@ enum {
* Note that some of them could be replaced by checks for the SCUMM version.
*/
enum GameFeatures {
- /** Games with the new camera system (ScummEngine_v7 and subclasses). */
- GF_NEW_CAMERA = 1 << 1,
-
/** Games with the AKOS costume system (ScummEngine_v7 and subclasses, HE games). */
GF_NEW_COSTUMES = 1 << 2,
- /** Games with digital iMUSE (ScummEngine_v7 and subclasses). */
- GF_DIGI_IMUSE = 1 << 3,
-
/** Games using XOR encrypted data files. */
GF_USE_KEY = 1 << 4,
@@ -120,7 +114,7 @@ enum GameFeatures {
* HE Games with more global scripts and different sprite handling
* i.e. read it as HE version 9.85. Used for HE98 only.
*/
- GF_HE_985 = 1 << 14,
+ GF_HE_985 = 1 << 14,
/** HE games with 16 bit color */
GF_16BIT_COLOR = 1 << 15,
@@ -1288,7 +1282,7 @@ public:
byte VAR_SUBTITLES;
byte VAR_V6_EMSSPACE;
- // V7/V8 (=GF_NEW_CAMERA) specific variables
+ // V7/V8 specific variables
byte VAR_CAMERA_POS_Y;
byte VAR_CAMERA_MIN_Y;
byte VAR_CAMERA_MAX_Y;
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index bde14d3c55..0dfa99a82e 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -111,7 +111,7 @@ void Sound::addSoundToQueue2(int sound, int heOffset, int heChannel, int heFlags
}
void Sound::processSound() {
- if (_vm->_game.features & GF_DIGI_IMUSE) {
+ if (_vm->_game.version >= 7) {
processSfxQueues();
} else if (_vm->_game.heversion >= 60) {
processSoundQueues();
@@ -765,7 +765,7 @@ void Sound::stopSound(int sound) {
stopCDTimer();
}
- if (!(_vm->_game.features & GF_DIGI_IMUSE))
+ if (_vm->_game.version < 7)
_mixer->stopID(sound);
if (_vm->_musicEngine)