diff options
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes9.cpp | 4 | ||||
-rw-r--r-- | engines/tsage/converse.cpp | 7 | ||||
-rw-r--r-- | engines/tsage/core.cpp | 42 | ||||
-rw-r--r-- | engines/tsage/core.h | 7 | ||||
-rw-r--r-- | engines/tsage/detection_tables.h | 20 | ||||
-rw-r--r-- | engines/tsage/events.h | 2 | ||||
-rw-r--r-- | engines/tsage/graphics.h | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld/ringworld_scenes3.cpp | 6 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes0.cpp | 8 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 21 | ||||
-rw-r--r-- | engines/tsage/sound.cpp | 13 |
11 files changed, 100 insertions, 31 deletions
diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp index 1cb8191640..52115b95fe 100644 --- a/engines/tsage/blue_force/blueforce_scenes9.cpp +++ b/engines/tsage/blue_force/blueforce_scenes9.cpp @@ -705,6 +705,10 @@ void Scene900::process(Event &event) { void Scene900::dispatch() { SceneExt::dispatch(); + // WORKAROUND:: Fix for invalid data in the Blue Force floppy version when opening gate + if (_sceneMode == 9006 && (g_vm->getFeatures() & GF_FLOPPY) && BF_GLOBALS._player._endFrame == 8) + BF_GLOBALS._player._endFrame = 6; + if (BF_GLOBALS.getFlag(fWithLyle) && _lyle.isNoMover()) { _lyle.updateAngle(BF_GLOBALS._player._position); } diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp index ba27db9104..de5ac62425 100644 --- a/engines/tsage/converse.cpp +++ b/engines/tsage/converse.cpp @@ -42,6 +42,8 @@ SequenceManager::SequenceManager() : Action() { _objectIndex = 0; _keepActive = false; _onCallback = NULL; + for (int i = 0; i < 6; i ++) + _objectList[i] = NULL; setup(); } @@ -415,6 +417,8 @@ ConversationChoiceDialog::ConversationChoiceDialog() { _stdColor = 23; _highlightColor = g_globals->_scenePalette._colors.background; _fontNumber = 1; + _savedFgColor = _savedFontNumber = 0; + _selectedIndex = 0; } int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) { @@ -587,6 +591,8 @@ StripManager::StripManager() { _activeSpeaker = NULL; _onBegin = NULL; _onEnd = NULL; + _sceneNumber = 0; + _lookupList = NULL; reset(); } @@ -932,6 +938,7 @@ Speaker::Speaker() : EventHandler() { _color1 = _color2 = _color3 = g_globals->_scenePalette._colors.foreground; _action = NULL; _speakerName = "SPEAKER"; + _oldSceneNumber = -1; } void Speaker::synchronize(Serializer &s) { diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 292e74c09b..4a90e23a33 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -65,6 +65,11 @@ InvObject::InvObject(int visage, int strip, int frame) { _frame = frame; _sceneNumber = 0; _iconResNum = 10; + + _displayResNum = 0; + _rlbNum = 0; + _cursorNum = 0; + _cursorId = INV_NONE; } InvObject::InvObject(int strip, int frame) { @@ -75,6 +80,11 @@ InvObject::InvObject(int strip, int frame) { _visage = 7; _sceneNumber = 0; _iconResNum = 10; + + _displayResNum = 0; + _rlbNum = 0; + _cursorNum = 0; + _cursorId = INV_NONE; } void InvObject::setCursor() { @@ -163,6 +173,8 @@ Action::Action() { _owner = NULL; _endHandler = NULL; _attached = false; + _delayFrames = 0; + _startFrame = 0; } void Action::synchronize(Serializer &s) { @@ -387,6 +399,8 @@ void ObjectMover::endMove() { ObjectMover2::ObjectMover2() : ObjectMover() { _destObject = NULL; + _minArea = 0; + _maxArea = 0; } void ObjectMover2::synchronize(Serializer &s) { @@ -1047,6 +1061,8 @@ PaletteModifier::PaletteModifier() { PaletteModifierCached::PaletteModifierCached(): PaletteModifier() { _step = 0; _percent = 0; + for (int i = 0; i < 768; i++) + _palette[i] = 0; } void PaletteModifierCached::setPalette(ScenePalette *palette, int step) { @@ -1070,6 +1086,10 @@ PaletteRotation::PaletteRotation() : PaletteModifierCached() { _frameNumber = g_globals->_events.getFrameNumber(); _idxChange = 1; _countdown = 0; + _currIndex = 0; + _start = _end = 0; + _rotationMode = 0; + _duration = 0; } void PaletteRotation::synchronize(Serializer &s) { @@ -1273,6 +1293,10 @@ ScenePalette::ScenePalette() { } _field412 = 0; + _redColor = _greenColor = _blueColor = 0; + _aquaColor = 0; + _purpleColor = 0; + _limeColor = 0; } ScenePalette::~ScenePalette() { @@ -1280,6 +1304,12 @@ ScenePalette::~ScenePalette() { } ScenePalette::ScenePalette(int paletteNum) { + _field412 = 0; + _redColor = _greenColor = _blueColor = 0; + _aquaColor = 0; + _purpleColor = 0; + _limeColor = 0; + loadPalette(paletteNum); } @@ -1781,6 +1811,7 @@ void SceneItem::display(const Common::String &msg) { SceneHotspot::SceneHotspot(): SceneItem() { _lookLineNum = _useLineNum = _talkLineNum = 0; + _resNum = 0; } void SceneHotspot::synchronize(Serializer &s) { @@ -2036,6 +2067,13 @@ SceneObject::SceneObject() : SceneHotspot() { _linkedActor = NULL; _field8A = Common::Point(0, 0); + _angle = 0; + _xs = 0; + _xe = 0; + _endFrame = 0; + _field68 = 0; + _regionIndex = 0; + _field9C = NULL; } SceneObject::SceneObject(const SceneObject &so) : SceneHotspot() { @@ -2331,6 +2369,7 @@ void SceneObject::animate(AnimateMode animMode, ...) { setFrame(getNewFrame()); break; } + va_end(va); } SceneObject *SceneObject::clone() const { @@ -3072,6 +3111,7 @@ Visage::Visage(const Visage &v) { _data = v._data; if (_data) g_vm->_memoryManager.incLocks(_data); + _flipHoriz = false; } Visage &Visage::operator=(const Visage &s) { @@ -3579,6 +3619,7 @@ void SceneItemList::addItems(SceneItem *first, ...) { push_back(p); p = va_arg(va, SceneItem *); } + va_end(va); } /*--------------------------------------------------------------------------*/ @@ -4074,6 +4115,7 @@ SceneHandler::SceneHandler() { _saveGameSlot = -1; _loadGameSlot = -1; _prevFrameNumber = 0; + _delayTicks = 0; } void SceneHandler::registerHandler() { diff --git a/engines/tsage/core.h b/engines/tsage/core.h index 60a7930eab..296754011e 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -189,7 +189,7 @@ public: Action *_action; SceneObject *_sceneObject; public: - ObjectMover() { _action = NULL; _sceneObject = NULL; } + ObjectMover() { _action = NULL; _sceneObject = NULL; _minorDiff = 0; _majorDiff = 0; _changeCtr = 0;} virtual ~ObjectMover(); virtual void synchronize(Serializer &s); @@ -272,7 +272,7 @@ public: SceneObject *_destObject; int _maxArea; int _minArea; - PlayerMover2() : PlayerMover() { _destObject = NULL; } + PlayerMover2() : PlayerMover() { _destObject = NULL; _minArea = _maxArea = 0;} virtual void synchronize(Serializer &s); virtual Common::String getClassName() { return "PlayerMover2"; } @@ -415,7 +415,7 @@ public: int _yDiff; int _sceneRegionId; public: - SceneItem() : EventHandler() { _msg = "Feature"; _action = NULL; _sceneRegionId = 0; } + SceneItem() : EventHandler() { _msg = "Feature"; _action = NULL; _sceneRegionId = 0; _yDiff = 0; _fieldE = _field10 = 0;} virtual void synchronize(Serializer &s); virtual Common::String getClassName() { return "SceneItem"; } @@ -685,6 +685,7 @@ public: int xe = va_arg(va, int); items.push_back(LineSlice(xs, xe)); } + va_end(va); } void add(LineSlice &slice) { items.push_back(slice); } diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h index a84ee5662f..b374dbc98b 100644 --- a/engines/tsage/detection_tables.h +++ b/engines/tsage/detection_tables.h @@ -31,7 +31,7 @@ static const tSageGameDescription gameDescriptions[] = { "CD", AD_ENTRY1s("ring.rlb", "466f0e6492d9d0f34d35c5cd088de90f", 37847618), Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, @@ -45,7 +45,7 @@ static const tSageGameDescription gameDescriptions[] = { "CD", AD_ENTRY1s("ring.rlb", "cb8bba91b30cd172712371d7123bd763", 7427980), Common::ES_ESP, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, @@ -59,7 +59,7 @@ static const tSageGameDescription gameDescriptions[] = { "Floppy", AD_ENTRY1s("ring.rlb", "7b7f0c5b37b58fa5ec06ebb2ca0d0d9d", 8438770), Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, @@ -73,7 +73,7 @@ static const tSageGameDescription gameDescriptions[] = { "Floppy Demo", AD_ENTRY1s("tsage.rlb", "3b3604a97c06c91f3735d3e9d341f63f", 833453), Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_DEMO, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, @@ -88,7 +88,7 @@ static const tSageGameDescription gameDescriptions[] = { "Floppy Demo", AD_ENTRY1s("demoring.rlb", "64050e1806203b15bb03876140eb4f56", 832206), Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_DEMO, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, @@ -104,7 +104,7 @@ static const tSageGameDescription gameDescriptions[] = { "Floppy", AD_ENTRY1s("blue.rlb", "17c3993415e8a2cf93040eef7e88ec93", 1156508), Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_UNSTABLE, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, @@ -119,7 +119,7 @@ static const tSageGameDescription gameDescriptions[] = { "", AD_ENTRY1s("blue.rlb", "17eabb456cb1546c66baf1aff387ba6a", 10032614), Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, @@ -133,7 +133,7 @@ static const tSageGameDescription gameDescriptions[] = { "CD", AD_ENTRY1s("blue.rlb", "99983f48cb218f1f3760cf2f9a7ef11d", 63863322), Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, @@ -149,7 +149,7 @@ static const tSageGameDescription gameDescriptions[] = { "CD", AD_ENTRY1s("blue.rlb", "5b2b35c51b62e82d82b0791540bfae2d", 10082565), Common::ES_ESP, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, @@ -164,7 +164,7 @@ static const tSageGameDescription gameDescriptions[] = { "CD", AD_ENTRY1s("r2rw.rlb", "df6c25622387007788ca36d99362c1f0", 47586928), Common::EN_ANY, - Common::kPlatformPC, + Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO0() }, diff --git a/engines/tsage/events.h b/engines/tsage/events.h index 475db47315..a1e9da3477 100644 --- a/engines/tsage/events.h +++ b/engines/tsage/events.h @@ -32,7 +32,7 @@ namespace TsAGE { enum EventType {EVENT_NONE = 0, EVENT_BUTTON_DOWN = 1, EVENT_BUTTON_UP = 2, EVENT_KEYPRESS = 4, - EVENT_MOUSE_MOVE = 8}; + EVENT_MOUSE_MOVE = 8, EVENT_UNK27 = 27}; enum ButtonShiftFlags {BTNSHIFT_LEFT = 0, BTNSHIFT_RIGHT = 3, BTNSHIFT_MIDDLE = 4}; diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h index 9175b1050a..826f2fef6f 100644 --- a/engines/tsage/graphics.h +++ b/engines/tsage/graphics.h @@ -162,7 +162,6 @@ public: class GfxFontBackup { private: - GfxSurface *_surface; Common::Point _edgeSize; Common::Point _position; GfxColors _colors; diff --git a/engines/tsage/ringworld/ringworld_scenes3.cpp b/engines/tsage/ringworld/ringworld_scenes3.cpp index 0e4ccd1269..b2ed986331 100644 --- a/engines/tsage/ringworld/ringworld_scenes3.cpp +++ b/engines/tsage/ringworld/ringworld_scenes3.cpp @@ -2179,6 +2179,7 @@ Scene2120::Scene2120(): Scene() { _prevDbMode = 0; _visageVisable = false; _subjectIndex = 0; + _lineOffset = 0; } void Scene2120::postInit(SceneObjectList *OwnerList) { @@ -3690,8 +3691,8 @@ void Scene2230::Hotspot12::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene2230::Scene2230() : - _hotspot9(0, CURSOR_LOOK, 2230, 16, CURSOR_USE, 2230, 18, LIST_END) { +Scene2230::Scene2230() : _hotspot9(0, CURSOR_LOOK, 2230, 16, CURSOR_USE, 2230, 18, LIST_END) { + _field30A = 0; } void Scene2230::postInit(SceneObjectList *OwnerList) { @@ -4877,6 +4878,7 @@ Scene2310::Scene2310() { _rectList[4].set(199, 70, 215, 140); _wireIndex = 5; + _pageIndex = 0; } void Scene2310::postInit(SceneObjectList *OwnerList) { diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp index 4c98fcf00a..3b7d283e44 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp @@ -61,14 +61,10 @@ void Scene50::postInit(SceneObjectList *OwnerList) { } void Scene50::process(Event &event) { - if ((event.eventType != EVENT_BUTTON_DOWN) && (event.eventType != EVENT_KEYPRESS) && (event.eventType == 27)) { + if ((event.eventType != EVENT_BUTTON_DOWN) && (event.eventType != EVENT_KEYPRESS) && (event.eventType == EVENT_UNK27)) { event.handled = true; - warning("TODO: incomplete Scene50::process()"); - // CursorType _oldCursorId = _cursorId; g_globals->_events.setCursor(CURSOR_ARROW); - // _cursorManager.sub_1D474(2, 0); - // sub_5566A(1); - // _cursorManager._fieldE = _oldCursorId; + HelpDialog::show(); R2_GLOBALS._sceneManager.changeScene(100); } } diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index 216444e722..af62ab6916 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -1062,9 +1062,10 @@ void Scene1200::Area1::process(Event &event) { CursorType cursor = R2_GLOBALS._events.getCursor(); if (_actor2._bounds.contains(event.mousePos.x + g_globals->gfxManager()._bounds.left , event.mousePos.y)) { - if (cursor == _cursorNum) + if (cursor == _cursorNum) { warning("TODO: _cursorState = ???"); R2_GLOBALS._events.setCursor(_savedCursorNum); //, _cursorState); + } } else if (event.mousePos.y < 168) { if (cursor != _cursorNum) { _savedCursorNum = cursor; @@ -5106,11 +5107,11 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) { displayDialog(_arrunkObj1337[2]._arr1[2]._field34); else if (subC2BF8(&_arrunkObj1337[2]._arr1[3], pt)) displayDialog(_arrunkObj1337[2]._arr1[3]._field34); - else if ((curReg >= 6) || (curReg <= 9)) + else if ((curReg >= 6) && (curReg <= 9)) actionDisplay(1330, 29, 159, 10, 1, 200, 0, 7, 0, 154, 154); - else if ((curReg >= 11) || (curReg <= 14)) + else if ((curReg >= 11) && (curReg <= 14)) actionDisplay(1330, 31, 159, 10, 1, 200, 0, 7, 0, 154, 154); - else if ((curReg >= 16) || (curReg <= 19)) + else if ((curReg >= 16) && (curReg <= 19)) actionDisplay(1330, 30, 159, 10, 1, 200, 0, 7, 0, 154, 154); else { switch (curReg) { @@ -6930,9 +6931,10 @@ void Scene1550::UnkArea1550::process(Event &event) { CursorType cursor = R2_GLOBALS._events.getCursor(); if (_areaActor._bounds.contains(event.mousePos.x + g_globals->gfxManager()._bounds.left , event.mousePos.y)) { - if (cursor == _cursorNum) + if (cursor == _cursorNum) { warning("TODO: _cursorState = ???"); R2_GLOBALS._events.setCursor(_savedCursorNum); //, _cursorState); + } } else if (event.mousePos.y < 168) { if (cursor != _cursorNum) { _savedCursorNum = cursor; @@ -8232,9 +8234,10 @@ void Scene1550::subA2B2F() { R2_GLOBALS._sceneManager._fadeMode = FADEMODE_IMMEDIATE; if (varA == 0) { - if (_field417 != 1550) + if (_field417 != 1550) { g_globals->_scenePalette.loadPalette(1550); R2_GLOBALS._sceneManager._hasPalette = true; + } } else { g_globals->_scenePalette.loadPalette(varA); R2_GLOBALS._sceneManager._hasPalette = true; @@ -12951,9 +12954,10 @@ void Scene1950::Area1::process(Event &event) { CursorType cursor = R2_GLOBALS._events.getCursor(); if (_areaActor._bounds.contains(event.mousePos.x + g_globals->gfxManager()._bounds.left , event.mousePos.y)) { - if (cursor == _cursorNum) + if (cursor == _cursorNum) { warning("TODO: _cursorState = ???"); R2_GLOBALS._events.setCursor(_savedCursorNum); //, _cursorState); + } } else if (event.mousePos.y < 168) { if (cursor != _cursorNum) { _savedCursorNum = cursor; @@ -14556,9 +14560,10 @@ void Scene1950::signal() { case 1964: // No break on purpose case 1965: - if (!R2_GLOBALS.getFlag(37)) + if (!R2_GLOBALS.getFlag(37)) { SceneItem::display(1950, 26, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999); R2_GLOBALS._player.enableControl(); + } break; case 1966: _actor4.remove(); diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp index 69a9975ef4..b9567cece2 100644 --- a/engines/tsage/sound.cpp +++ b/engines/tsage/sound.cpp @@ -1494,6 +1494,11 @@ Sound::Sound() { memset(_trkLoopIndex, 0, SOUND_ARR_SIZE * sizeof(int)); memset(_trkRest, 0, SOUND_ARR_SIZE * sizeof(int)); memset(_trkLoopRest, 0, SOUND_ARR_SIZE * sizeof(int)); + for (int i = 0; i < 16; i++) { + _chWork[i] = false; + _trackInfo._chunks[i] = 0; + _trackInfo._voiceTypes[i] = 0; + } } Sound::~Sound() { @@ -2504,6 +2509,7 @@ SoundDriver::SoundDriver() { _driverResID = 0; _minVersion = _maxVersion = 0; _groupMask = 0; + _groupOffset = NULL; } /*--------------------------------------------------------------------------*/ @@ -2568,6 +2574,12 @@ AdlibSoundDriver::AdlibSoundDriver(): SoundDriver() { Common::fill(_pitchBlend, _pitchBlend + ADLIB_CHANNEL_COUNT, 0x2000); memset(_v4409E, 0, ADLIB_CHANNEL_COUNT * sizeof(int)); _patchData = NULL; + for (int i = 0; i < 256; i++) + _portContents[i] = 0; + for (int i = 0; i < 9; i++) { + _channelVoiced[i] = false; + _pitchBlend[i] = 0; + } } AdlibSoundDriver::~AdlibSoundDriver() { @@ -2862,6 +2874,7 @@ SoundBlasterDriver::SoundBlasterDriver(): SoundDriver() { _sampleRate = _mixer->getOutputRate(); _audioStream = NULL; _channelData = NULL; + _channelVolume = 0; } SoundBlasterDriver::~SoundBlasterDriver() { |