[Scummvm-cvs-logs] SF.net SVN: scummvm: [25454] scummvm/trunk/engines/scumm
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Feb 10 03:06:00 CET 2007
Revision: 25454
http://scummvm.svn.sourceforge.net/scummvm/?rev=25454&view=rev
Author: fingolfin
Date: 2007-02-09 18:05:59 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Got rid of GF_DIGI_IMUSE and GF_NEW_CAMERA
Modified Paths:
--------------
scummvm/trunk/engines/scumm/camera.cpp
scummvm/trunk/engines/scumm/gfx.cpp
scummvm/trunk/engines/scumm/input.cpp
scummvm/trunk/engines/scumm/plugin.cpp
scummvm/trunk/engines/scumm/room.cpp
scummvm/trunk/engines/scumm/saveload.cpp
scummvm/trunk/engines/scumm/script_v6.cpp
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/scumm/scumm.h
scummvm/trunk/engines/scumm/sound.cpp
Modified: scummvm/trunk/engines/scumm/camera.cpp
===================================================================
--- scummvm/trunk/engines/scumm/camera.cpp 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/camera.cpp 2007-02-10 02:05:59 UTC (rev 25454)
@@ -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::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 @@
_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::actorFollowCamera(int act) {
- if (!(_game.features & GF_NEW_CAMERA)) {
+ if (_game.version < 7) {
int old;
old = camera._follows;
Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/gfx.cpp 2007-02-10 02:05:59 UTC (rev 25454)
@@ -448,7 +448,7 @@
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 @@
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 @@
}
}
- 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 @@
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
Modified: scummvm/trunk/engines/scumm/input.cpp
===================================================================
--- scummvm/trunk/engines/scumm/input.cpp 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/input.cpp 2007-02-10 02:05:59 UTC (rev 25454)
@@ -243,7 +243,7 @@
_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)
Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/plugin.cpp 2007-02-10 02:05:59 UTC (rev 25454)
@@ -246,14 +246,14 @@
{"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
Modified: scummvm/trunk/engines/scumm/room.cpp
===================================================================
--- scummvm/trunk/engines/scumm/room.cpp 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/room.cpp 2007-02-10 02:05:59 UTC (rev 25454)
@@ -158,7 +158,7 @@
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);
Modified: scummvm/trunk/engines/scumm/saveload.cpp
===================================================================
--- scummvm/trunk/engines/scumm/saveload.cpp 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/saveload.cpp 2007-02-10 02:05:59 UTC (rev 25454)
@@ -334,7 +334,7 @@
// Load the static room data
setupRoomSubBlocks();
- if (!(_game.features & GF_NEW_CAMERA)) {
+ if (_game.version < 7) {
camera._last.x = camera._cur.x;
}
Modified: scummvm/trunk/engines/scumm/script_v6.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v6.cpp 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/script_v6.cpp 2007-02-10 02:05:59 UTC (rev 25454)
@@ -1100,7 +1100,7 @@
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_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());
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2007-02-10 02:05:59 UTC (rev 25454)
@@ -1176,9 +1176,7 @@
#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 @@
_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 @@
}
// 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 @@
#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) {
Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/scumm.h 2007-02-10 02:05:59 UTC (rev 25454)
@@ -80,15 +80,9 @@
* 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 @@
* 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 @@
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;
Modified: scummvm/trunk/engines/scumm/sound.cpp
===================================================================
--- scummvm/trunk/engines/scumm/sound.cpp 2007-02-09 18:23:59 UTC (rev 25453)
+++ scummvm/trunk/engines/scumm/sound.cpp 2007-02-10 02:05:59 UTC (rev 25454)
@@ -111,7 +111,7 @@
}
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 @@
stopCDTimer();
}
- if (!(_vm->_game.features & GF_DIGI_IMUSE))
+ if (_vm->_game.version < 7)
_mixer->stopID(sound);
if (_vm->_musicEngine)
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