diff options
author | Strangerke | 2013-12-20 07:11:09 +0100 |
---|---|---|
committer | Strangerke | 2013-12-20 07:11:09 +0100 |
commit | 5e35729ee8492b26b9ef77fe7b74987ea62d097e (patch) | |
tree | 39819c4125037fe219941cdd9ddf1d206a05fe36 | |
parent | 0ba254475b1853c195716b3d258e637004c51ce5 (diff) | |
download | scummvm-rg350-5e35729ee8492b26b9ef77fe7b74987ea62d097e.tar.gz scummvm-rg350-5e35729ee8492b26b9ef77fe7b74987ea62d097e.tar.bz2 scummvm-rg350-5e35729ee8492b26b9ef77fe7b74987ea62d097e.zip |
TSAGE: Some renaming, remove some useless variables from Core, increase savegame version
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.cpp | 3 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes9.cpp | 1 | ||||
-rw-r--r-- | engines/tsage/core.cpp | 52 | ||||
-rw-r--r-- | engines/tsage/core.h | 12 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 12 | ||||
-rw-r--r-- | engines/tsage/saveload.h | 2 | ||||
-rw-r--r-- | engines/tsage/user_interface.cpp | 6 | ||||
-rw-r--r-- | engines/tsage/user_interface.h | 1 |
8 files changed, 42 insertions, 47 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index be5fb4c7b7..c8a0117bcf 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -875,7 +875,6 @@ void PalettedScene::synchronize(Serializer &s) { void PalettedScene::postInit(SceneObjectList *OwnerList) { _hasFader = false; - _palette._field412 = 1; SceneExt::postInit(OwnerList); } @@ -890,8 +889,6 @@ void PalettedScene::remove() { BF_GLOBALS._scenePalette.loadPalette(2); BF_GLOBALS._sceneManager._hasPalette = true; } - - BF_GLOBALS._scenePalette._field412 = 0; } PaletteFader *PalettedScene::addFader(const byte *arrBufferRGB, int step, Action *action) { diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp index 2b42dc8625..405a436f55 100644 --- a/engines/tsage/blue_force/blueforce_scenes9.cpp +++ b/engines/tsage/blue_force/blueforce_scenes9.cpp @@ -2977,7 +2977,6 @@ bool Scene920::Item8::startAction(CursorType action, Event &event) { // On the other hand, it's not really important as just after the hero leaves the scene // so the variable is no longer used. // scene->_oldCoord = &scene; - _field10 = 1; } else { scene->_sceneMode = 9201; scene->setAction(&scene->_sequenceManager1, scene, 9201, &BF_GLOBALS._player, NULL); diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 0b3eb53268..7f27c43a22 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1301,7 +1301,6 @@ ScenePalette::ScenePalette() { *palData++ = idx; } - _field412 = 0; _redColor = _greenColor = _blueColor = 0; _aquaColor = 0; _purpleColor = 0; @@ -1313,7 +1312,6 @@ ScenePalette::~ScenePalette() { } ScenePalette::ScenePalette(int paletteNum) { - _field412 = 0; _redColor = _greenColor = _blueColor = 0; _aquaColor = 0; _purpleColor = 0; @@ -1565,8 +1563,13 @@ void SceneItem::synchronize(Serializer &s) { _bounds.synchronize(s); s.syncString(_msg); - s.syncAsSint32LE(_fieldE); - s.syncAsSint32LE(_field10); + + if (s.getVersion() < 15) { + int useless = 0; + s.syncAsSint32LE(useless); + s.syncAsSint32LE(useless); + } + s.syncAsSint16LE(_position.x); s.syncAsSint32LE(_position.y); s.syncAsSint16LE(_yDiff); s.syncAsSint32LE(_sceneRegionId); @@ -2119,7 +2122,7 @@ SceneObject::SceneObject() : SceneHotspot() { _xs = 0; _xe = 0; _endFrame = 0; - _field68 = 0; + _loopCount = 0; _regionIndex = 0; _shadowMap = NULL; } @@ -2368,7 +2371,7 @@ void SceneObject::animate(AnimateMode animMode, ...) { case ANIM_MODE_1: _frameChange = 1; - _field2E = _position; + _oldPosition = _position; _endAction = 0; break; @@ -2416,9 +2419,9 @@ void SceneObject::animate(AnimateMode animMode, ...) { case ANIM_MODE_9: if (_animateMode == ANIM_MODE_9 && g_vm->getGameID() == GType_Ringworld2) { _frameChange = -1; - _field2E = _position; + _oldPosition = _position; } else { - _field68 = va_arg(va, int); + _loopCount = va_arg(va, int); _endAction = va_arg(va, Action *); _frameChange = 1; _endFrame = getFrameCount(); @@ -2485,7 +2488,7 @@ void SceneObject::synchronize(Serializer &s) { s.syncAsUint32LE(_updateStartFrame); s.syncAsUint32LE(_walkStartFrame); - s.syncAsSint16LE(_field2E.x); s.syncAsSint16LE(_field2E.y); + s.syncAsSint16LE(_oldPosition.x); s.syncAsSint16LE(_oldPosition.y); s.syncAsSint16LE(_percent); s.syncAsSint16LE(_priority); s.syncAsSint16LE(_angle); @@ -2500,7 +2503,7 @@ void SceneObject::synchronize(Serializer &s) { SYNC_ENUM(_animateMode, AnimateMode); s.syncAsSint32LE(_frame); s.syncAsSint32LE(_endFrame); - s.syncAsSint32LE(_field68); + s.syncAsSint32LE(_loopCount); s.syncAsSint32LE(_frameChange); s.syncAsSint32LE(_numFrames); s.syncAsSint32LE(_regionIndex); @@ -2587,9 +2590,9 @@ void SceneObject::dispatch() { case ANIM_MODE_1: if (isNoMover()) setFrame(1); - else if ((_field2E.x != _position.x) || (_field2E.y != _position.y)) { + else if ((_oldPosition.x != _position.x) || (_oldPosition.y != _position.y)) { setFrame(changeFrame()); - _field2E = _position; + _oldPosition = _position; } break; @@ -2632,7 +2635,7 @@ void SceneObject::dispatch() { _endFrame = 1; setFrame(changeFrame()); - } else if (!_field68 || (--_field68 > 0)) { + } else if (!_loopCount || (--_loopCount > 0)) { _frameChange = 1; _endFrame = getFrameCount(); @@ -2651,7 +2654,7 @@ void SceneObject::dispatch() { _frameChange = -1; _strip = ((_strip - 1) ^ 1) + 1; _endFrame = 1; - } else if ((_field68 == 0) || (--_field68 != 0)) { + } else if (!_loopCount || (--_loopCount > 0)) { _frameChange = 1; _endFrame = getFrameCount(); @@ -3365,7 +3368,6 @@ Player::Player(): SceneObject() { _canWalk = false; _enabled = false; _uiEnabled = false; - _field8C = 0; // Return to Ringworld specific fields _characterIndex = R2_NONE; @@ -3384,15 +3386,11 @@ void Player::postInit(SceneObjectList *OwnerList) { _canWalk = true; _uiEnabled = true; _percent = 100; - _field8C = 10; - if (g_vm->getGameID() != GType_Ringworld2) - { + if (g_vm->getGameID() != GType_Ringworld2) { _moveDiff.x = 4; _moveDiff.y = 2; - } - else - { + } else { _moveDiff.x = 3; _moveDiff.y = 2; _effect = EFFECT_SHADED; @@ -3500,7 +3498,10 @@ void Player::synchronize(Serializer &s) { s.syncAsByte(_canWalk); s.syncAsByte(_uiEnabled); - s.syncAsSint16LE(_field8C); + if (s.getVersion() < 15) { + int useless = 0; + s.syncAsSint16LE(useless); + } if (g_vm->getGameID() != GType_Ringworld) s.syncAsByte(_enabled); @@ -4248,7 +4249,6 @@ double FloatSet::sqrt(FloatSet &floatSet) { GameHandler::GameHandler() : EventHandler() { _nextWaitCtr = 1; _waitCtr.setCtr(1); - _field14 = 10; } GameHandler::~GameHandler() { @@ -4270,7 +4270,11 @@ void GameHandler::synchronize(Serializer &s) { _lockCtr.synchronize(s); _waitCtr.synchronize(s); s.syncAsSint16LE(_nextWaitCtr); - s.syncAsSint16LE(_field14); + + if (s.getVersion() < 14) { + int useless = 0; + s.syncAsSint16LE(useless); + } } /*--------------------------------------------------------------------------*/ diff --git a/engines/tsage/core.h b/engines/tsage/core.h index 3286ee1448..c285fba669 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -358,7 +358,6 @@ public: byte _palette[256 * 3]; GfxColors _colors; SynchronizedList<PaletteModifier *> _listeners; - int _field412; uint8 _redColor; uint8 _greenColor; @@ -410,12 +409,11 @@ class SceneItem : public EventHandler { public: Rect _bounds; Common::String _msg; - int _fieldE, _field10; Common::Point _position; int _yDiff; int _sceneRegionId; public: - SceneItem() : EventHandler() { _msg = "Feature"; _action = NULL; _sceneRegionId = 0; _yDiff = 0; _fieldE = _field10 = 0;} + SceneItem() : EventHandler() { _msg = "Feature"; _action = NULL; _sceneRegionId = 0; _yDiff = 0;} virtual void synchronize(Serializer &s); virtual Common::String getClassName() { return "SceneItem"; } @@ -529,7 +527,7 @@ public: int changeFrame(); uint32 _updateStartFrame; uint32 _walkStartFrame; - Common::Point _field2E; + Common::Point _oldPosition; int _percent; int _priority; int _angle; @@ -542,7 +540,7 @@ public: AnimateMode _animateMode; int _frame; int _endFrame; - int _field68; + int _loopCount; int _frameChange; int _numFrames; int _regionIndex; @@ -651,7 +649,6 @@ class Player : public SceneObject { public: bool _canWalk; bool _uiEnabled; - int _field8C; bool _enabled; // Return to Ringworld specific fields @@ -778,8 +775,6 @@ public: class ScenePriorities : public Common::List<Region> { public: int _resNum; - int _field14; - int _field16; Region _defaultPriorityRegion; public: void load(int resNum); @@ -885,7 +880,6 @@ public: RefCounter _lockCtr; RefCounter _waitCtr; int _nextWaitCtr; - int _field14; public: GameHandler(); virtual ~GameHandler(); diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index cd0dd4d8a8..e9775622c0 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -6223,8 +6223,8 @@ void Scene1337::handlePlayer2() { _selectedCard._cardId = handcard->_cardId; _selectedCard._stationPos = handcard->_stationPos; //warning("_selectedCard._actorName = handcard->_actorName;"); - _selectedCard._fieldE = handcard->_fieldE; - _selectedCard._field10 = handcard->_field10; + //warning("_selectedCard._fieldE = handcard->_fieldE;"); + //warning("_selectedCard._field10 = handcard->_field10;"); //warning("_selectedCard._field12 = handcard->_field12;"); //warning("_selectedCard._field14 = handcard->_field14;"); //warning("_selectedCard._field16 = handcard->_field16;"); @@ -6241,7 +6241,7 @@ void Scene1337::handlePlayer2() { _selectedCard._card._updateStartFrame = handcard->_card._updateStartFrame; _selectedCard._card._walkStartFrame = handcard->_card._walkStartFrame; // _field2E is named _field3C in R2R - _selectedCard._card._field2E = handcard->_card._field2E; + _selectedCard._card._oldPosition = handcard->_card._oldPosition; _selectedCard._card._percent = handcard->_card._percent; _selectedCard._card._priority = handcard->_card._priority; _selectedCard._card._angle = handcard->_card._angle; @@ -6257,7 +6257,7 @@ void Scene1337::handlePlayer2() { _selectedCard._card._frame = handcard->_card._frame; _selectedCard._card._endFrame = handcard->_card._endFrame; // _field68 is named _field76 in R2R - _selectedCard._card._field68 = handcard->_card._field68; + _selectedCard._card._loopCount = handcard->_card._loopCount; _selectedCard._card._frameChange = handcard->_card._frameChange; _selectedCard._card._numFrames = handcard->_card._numFrames; _selectedCard._card._regionIndex = handcard->_card._regionIndex; @@ -6268,8 +6268,8 @@ void Scene1337::handlePlayer2() { _selectedCard._card._endAction = handcard->_card._endAction; _selectedCard._card._regionBitList = handcard->_card._regionBitList; // _selectedCard._object1._actorName = handcard->_object1._actorName; - _selectedCard._card._fieldE = handcard->_card._fieldE; - _selectedCard._card._field10 = handcard->_card._field10; + //warning("_selectedCard._card._fieldE = handcard->_card._fieldE;"); + //warning("_selectedCard._card._field10 = handcard->_card._field10;"); //warning("_selectedCard._card._field12 = handcard->_card._field12;"); //warning("_selectedCard._card._field14 = handcard->_card._field14;"); //warning("_selectedCard._card._field16 = handcard->_card._field16;"); diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h index 19022f93f1..42fd4f3282 100644 --- a/engines/tsage/saveload.h +++ b/engines/tsage/saveload.h @@ -33,7 +33,7 @@ namespace TsAGE { typedef void (*SaveNotifierFn)(bool postFlag); -#define TSAGE_SAVEGAME_VERSION 14 +#define TSAGE_SAVEGAME_VERSION 15 class SavedObject; diff --git a/engines/tsage/user_interface.cpp b/engines/tsage/user_interface.cpp index ae34ac0574..ae5c6c8cee 100644 --- a/engines/tsage/user_interface.cpp +++ b/engines/tsage/user_interface.cpp @@ -38,13 +38,15 @@ void StripProxy::process(Event &event) { void UIElement::synchronize(Serializer &s) { BackgroundSceneObject::synchronize(s); - s.syncAsSint16LE(_field88); + if (s.getVersion() < 15) { + int useless = 0; + s.syncAsSint16LE(useless); + } s.syncAsSint16LE(_enabled); s.syncAsSint16LE(_frameNum); } void UIElement::setup(int visage, int stripNum, int frameNum, int posX, int posY, int priority) { - _field88 = 0; _frameNum = frameNum; _enabled = true; diff --git a/engines/tsage/user_interface.h b/engines/tsage/user_interface.h index 60cefc0751..bc2398bf05 100644 --- a/engines/tsage/user_interface.h +++ b/engines/tsage/user_interface.h @@ -37,7 +37,6 @@ public: class UIElement: public BackgroundSceneObject { public: - int _field88; bool _enabled; int _frameNum; |