diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 5 | ||||
-rw-r--r-- | scumm/scumm.cpp | 6 | ||||
-rw-r--r-- | scumm/scumm.h | 54 | ||||
-rw-r--r-- | scumm/vars.cpp | 14 |
4 files changed, 47 insertions, 32 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 544dc32da2..60876cdd20 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -696,6 +696,7 @@ protected: virtual void executeOpcode(byte i); virtual const char *getOpcodeDesc(byte i); + virtual void setupScummVars(); virtual void initScummVars(); virtual void readRoomsOffsets(); @@ -732,6 +733,8 @@ protected: void o70_setWindowCaption(); void o70_polygonOps(); void o70_polygonHit(); + + byte VAR_NUM_SOUND_CHANNELS; }; class ScummEngine_v72he : public ScummEngine_v70he { @@ -867,6 +870,8 @@ protected: void o72_setFilePath(); void o72_setWindowCaption(); + byte VAR_NUM_ACTIVE_SOUND_CHANNELS; + byte VAR_NUM_ROOMS; byte VAR_NUM_SCRIPTS; byte VAR_NUM_SOUNDS; diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 1ba0099b5e..afe1964bd6 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1038,8 +1038,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS VAR_MUSIC_BUNDLE_LOADED = 0xFF; VAR_VOICE_BUNDLE_LOADED = 0xFF; - VAR_NUM_ACTIVE_SOUND_CHANNELS = 0xFF; - VAR_NUM_SOUND_CHANNELS = 0xFF; VAR_MUSIC_CHANNEL = 0xFF; VAR_SOUND_CHANNEL = 0xFF; @@ -1255,6 +1253,8 @@ ScummEngine_v70he::ScummEngine_v70he(GameDetector *detector, OSystem *syst, cons _heSndFlags = 0; _heSndSoundFreq = 0; _heSBNGId = 0; + + VAR_NUM_SOUND_CHANNELS = 0xFF; } ScummEngine_v70he::~ScummEngine_v70he() { @@ -1265,6 +1265,8 @@ ScummEngine_v70he::~ScummEngine_v70he() { ScummEngine_v72he::ScummEngine_v72he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) : ScummEngine_v70he(detector, syst, gs, md5sum) { + VAR_NUM_ACTIVE_SOUND_CHANNELS = 0xFF; + VAR_NUM_ROOMS = 0xFF; VAR_NUM_SCRIPTS = 0xFF; VAR_NUM_SOUNDS = 0xFF; diff --git a/scumm/scumm.h b/scumm/scumm.h index b3e26053bf..5eee65969d 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1218,7 +1218,7 @@ public: byte VAR_ME; byte VAR_NUM_ACTOR; byte VAR_CURRENT_LIGHTS; - byte VAR_CURRENTDRIVE; // How about merging this with VAR_CURRENTDISK? + byte VAR_CURRENTDRIVE; byte VAR_CURRENTDISK; byte VAR_TMR_1; byte VAR_TMR_2; @@ -1268,6 +1268,7 @@ public: byte VAR_FADE_DELAY; byte VAR_NOSUBTITLES; + // V5+ byte VAR_SOUNDPARAM; byte VAR_SOUNDPARAM2; byte VAR_SOUNDPARAM3; @@ -1277,16 +1278,17 @@ public: byte VAR_ROOM_FLAG; byte VAR_GAME_LOADED; byte VAR_NEW_ROOM; - byte VAR_VERSION_KEY; + // V4/V5 byte VAR_V5_TALK_STRING_Y; + // V6+ byte VAR_ROOM_WIDTH; byte VAR_ROOM_HEIGHT; byte VAR_V6_EMSSPACE; + // V7/V8 (=GF_NEW_CAMERA) specific variables byte VAR_CAMERA_POS_Y; - byte VAR_CAMERA_MIN_Y; byte VAR_CAMERA_MAX_Y; byte VAR_CAMERA_THRESHOLD_X; @@ -1295,28 +1297,35 @@ public: byte VAR_CAMERA_SPEED_Y; byte VAR_CAMERA_ACCEL_X; byte VAR_CAMERA_ACCEL_Y; - byte VAR_CAMERA_DEST_X; - byte VAR_CAMERA_DEST_Y; - byte VAR_CAMERA_FOLLOWED_ACTOR; - byte VAR_LEFTBTN_DOWN; - byte VAR_RIGHTBTN_DOWN; - byte VAR_LEFTBTN_HOLD; - byte VAR_RIGHTBTN_HOLD; - byte VAR_MOUSE_BUTTONS; - byte VAR_MOUSE_HOLD; - byte VAR_SAVELOAD_SCRIPT; - byte VAR_SAVELOAD_SCRIPT2; - + // V7/V8 specific variables + byte VAR_VERSION_KEY; byte VAR_DEFAULT_TALK_DELAY; + byte VAR_CUSTOMSCALETABLE; + byte VAR_BLAST_ABOVE_TEXT; + byte VAR_VOICE_MODE; + byte VAR_MUSIC_BUNDLE_LOADED; + byte VAR_VOICE_BUNDLE_LOADED; + + byte VAR_LEFTBTN_DOWN; // V7 + byte VAR_RIGHTBTN_DOWN; // V7 + byte VAR_LEFTBTN_HOLD; // V6/V72HE/V7 + byte VAR_RIGHTBTN_HOLD; // V6/V72HE/V7 + byte VAR_MOUSE_BUTTONS; // V8 + byte VAR_MOUSE_HOLD; // V8 + byte VAR_SAVELOAD_SCRIPT; // V6/V7 (not HE) + byte VAR_SAVELOAD_SCRIPT2; // V6/V7 (not HE) + + // V6/V7 specific variables (actually, they are only used in FT and Sam, it seems?) byte VAR_CHARSET_MASK; - byte VAR_CUSTOMSCALETABLE; + // V6 specific variables byte VAR_V6_SOUNDMODE; + // V1/V2 specific variables byte VAR_CHARCOUNT; byte VAR_VERB_ALLOWED; byte VAR_ACTIVE_VERB; @@ -1324,23 +1333,18 @@ public: byte VAR_ACTIVE_OBJECT2; byte VAR_CLICK_AREA; - byte VAR_BLAST_ABOVE_TEXT; - byte VAR_VOICE_MODE; - byte VAR_MUSIC_BUNDLE_LOADED; - byte VAR_VOICE_BUNDLE_LOADED; - - byte VAR_NUM_ACTIVE_SOUND_CHANNELS; - byte VAR_NUM_SOUND_CHANNELS; + // HE specific variables byte VAR_MUSIC_CHANNEL; byte VAR_SOUND_CHANNEL; byte VAR_SCRIPT_CYCLE; byte VAR_NUM_SCRIPT_CYCLES; - byte VAR_NUM_GLOBAL_OBJS; // Exists both in V7 and in V72HE - byte VAR_KEY_STATE; // Used in parseEvents() byte VAR_MOUSE_STATE; + + // Exists both in V7 and in V72HE: + byte VAR_NUM_GLOBAL_OBJS; }; } // End of namespace Scumm diff --git a/scumm/vars.cpp b/scumm/vars.cpp index 8a268dbb93..de08073bf4 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -170,11 +170,7 @@ void ScummEngine_v6::setupScummVars() { VAR_V6_EMSSPACE = 76; VAR_RANDOM_NR = 118; - if (_heversion >= 70) { - VAR_NUM_SOUND_CHANNELS = 9; - VAR_SOUND_CHANNEL = 10; - VAR_MUSIC_CHANNEL = 14; - } else { + if (_heversion < 70) { VAR_V6_SOUNDMODE = 9; } @@ -189,6 +185,14 @@ void ScummEngine_v6::setupScummVars() { } +void ScummEngine_v70he::setupScummVars() { + ScummEngine_v6::setupScummVars(); + + VAR_NUM_SOUND_CHANNELS = 9; + VAR_SOUND_CHANNEL = 10; + VAR_MUSIC_CHANNEL = 14; +} + void ScummEngine_v72he::setupScummVars() { // TODO Not complete VAR_KEYPRESS = 0; |