diff options
author | strangerke | 2011-04-13 21:27:46 +0200 |
---|---|---|
committer | strangerke | 2011-04-13 21:27:46 +0200 |
commit | 66b43f2312578f35e0718d0699de207a7bf77f1a (patch) | |
tree | 335cfee6fdf606686f178619c3ef5c1eb99fd573 | |
parent | a132bbb10c2f7349862c6c35d03d829ff76d5dea (diff) | |
download | scummvm-rg350-66b43f2312578f35e0718d0699de207a7bf77f1a.tar.gz scummvm-rg350-66b43f2312578f35e0718d0699de207a7bf77f1a.tar.bz2 scummvm-rg350-66b43f2312578f35e0718d0699de207a7bf77f1a.zip |
TSAGE: "Cosmetic" cleanups
46 files changed, 1167 insertions, 1167 deletions
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp index 82ee298e0b..fd1dfe9e9d 100644 --- a/engines/tsage/converse.cpp +++ b/engines/tsage/converse.cpp @@ -18,13 +18,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/converse.cpp $ - * $Id: converse.cpp 230 2011-02-12 06:57:31Z dreammaster $ + * $URL$ + * $Id$ * */ #include "common/str-array.h" - + #include "tsage/tsage.h" #include "tsage/globals.h" #include "tsage/staticres.h" @@ -34,7 +34,7 @@ namespace tSage { #define STRIP_WORD_DELAY 30 -SequenceManager::SequenceManager(): Action() { +SequenceManager::SequenceManager() : Action() { Common::set_to(&_objectList[0], &_objectList[6], (SceneObject *)NULL); _sequenceData.clear(); _field24 = 0; @@ -172,7 +172,7 @@ void SequenceManager::signal() { v2 = getNextValue(); NpcMover *mover = new NpcMover(); Common::Point destPos(v1, v3); - _sceneObject->addMover(mover, &destPos, v2 ? this : NULL); + _sceneObject->addMover(mover, &destPos, v2 ? this : NULL); break; } case 14: @@ -239,7 +239,7 @@ void SequenceManager::signal() { v2 = getNextValue(); PlayerMover *mover = new PlayerMover(); Common::Point destPos(v1, v3); - _sceneObject->addMover(mover, &destPos, v2 ? this : NULL); + _sceneObject->addMover(mover, &destPos, v2 ? this : NULL); break; } case 28: @@ -277,7 +277,7 @@ void SequenceManager::signal() { int objIndex3 = getNextValue(); int objIndex4 = getNextValue(); int objIndex5 = getNextValue(); - + setAction(globalManager(), v2 ? this : NULL, v1, _objectList[objIndex1], _objectList[objIndex2], _objectList[objIndex3], _objectList[objIndex4], _objectList[objIndex5]); break; @@ -349,7 +349,7 @@ void SequenceManager::setMessage(int resNum, int lineNum, int colour, const Comm // Get the needed rect, and move it to the desired position Rect textRect; - _globals->gfxManager().getStringBounds(msg.c_str(), textRect, width); + _globals->gfxManager().getStringBounds(msg.c_str(), textRect, width); Rect sceneBounds = _globals->_sceneManager._scene->_sceneBounds; sceneBounds.collapse(4, 2); textRect.moveTo(pt); @@ -416,7 +416,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) { // Event handling loop Event event; while (!_vm->getEventManager()->shouldQuit()) { - while (!_globals->_events.getEvent(event, EVENT_KEYPRESS | EVENT_BUTTON_DOWN | EVENT_MOUSE_MOVE) && + while (!_globals->_events.getEvent(event, EVENT_KEYPRESS | EVENT_BUTTON_DOWN | EVENT_MOUSE_MOVE) && !_vm->getEventManager()->shouldQuit()) ; if (_vm->getEventManager()->shouldQuit()) @@ -444,7 +444,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) { if (_selectedIndex != _choiceList.size()) { // De-highlight previously selected item _gfxManager._font._colours.foreground = _stdColour; - _gfxManager._font.writeLines(_choiceList[_selectedIndex]._msg.c_str(), + _gfxManager._font.writeLines(_choiceList[_selectedIndex]._msg.c_str(), _choiceList[_selectedIndex]._bounds, ALIGN_LEFT); } @@ -483,7 +483,7 @@ void ConversationChoiceDialog::draw() { // Loop through writing the conversation choices for (uint idx = 0; idx < _choiceList.size(); ++idx) { Common::String strNum = Common::String::format("%d", idx + 1); - + // Write the choice number _gfxManager._font.setPosition(13, _choiceList[idx]._bounds.top); _gfxManager._font.writeString(strNum.c_str()); @@ -572,7 +572,7 @@ void StripManager::load() { Common::copy(script, script + scriptSize, &_script[0]); DEALLOCATE(script); - + // Get the object list byte *obj44List = _vm->_dataManager->getResource(RES_STRIP, _stripNum, 1); int dataSize = _vm->_memoryManager.getSize(obj44List); @@ -584,7 +584,7 @@ void StripManager::load() { obj.load(dataP); _obj44List.push_back(obj); } - + DEALLOCATE(obj44List); } @@ -654,14 +654,14 @@ void StripManager::signal() { EventHandler *owner = _fmt; int stripNum = ABS(_obj44Index); remove(); - + start(stripNum, owner); return; } else if (_obj44Index == 10000) { // Reached end of strip remove(); return; - } + } // Run strip @@ -712,7 +712,7 @@ void StripManager::signal() { for (idx = 0; idx < OBJ44_LIST_SIZE; ++idx) { if (!obj44._field2[idx]) break; - + _callbackObject->stripCallback(obj44._field2[idx]); } } @@ -775,7 +775,7 @@ Speaker *StripManager::getSpeaker(const char *speakerName) { int StripManager::getNewIndex(int id) { if (id == 10000) return id; - + for (uint idx = 0; idx < _obj44List.size(); ++idx) { if (_obj44List[idx]._id == id) { return (id == 0) ? 10001 : idx; @@ -787,7 +787,7 @@ int StripManager::getNewIndex(int id) { /*--------------------------------------------------------------------------*/ -Speaker::Speaker(): EventHandler() { +Speaker::Speaker() : EventHandler() { _newSceneNumber = -1; _hideObjects = true; _field18 = 0; @@ -873,7 +873,7 @@ void Speaker::removeText() { /*--------------------------------------------------------------------------*/ -SpeakerGameText::SpeakerGameText(): Speaker() { +SpeakerGameText::SpeakerGameText() : Speaker() { _speakerName = "GAMETEXT"; _textPos = Common::Point(40, 40); _textMode = ALIGN_CENTRE; @@ -884,7 +884,7 @@ SpeakerGameText::SpeakerGameText(): Speaker() { /*--------------------------------------------------------------------------*/ -ScreenSpeaker::ScreenSpeaker(): Speaker() { +ScreenSpeaker::ScreenSpeaker() : Speaker() { _npc = NULL; _textMode = ALIGN_CENTRE; } @@ -894,12 +894,12 @@ void ScreenSpeaker::setText(const Common::String &msg) { gfxMan.activate(); gfxMan._font.setFontNumber(_fontNumber); Rect textRect; - + _globals->gfxManager().getStringBounds(msg.c_str(), textRect, _textWidth); if (_npc) { textRect.centre(_npc->_position.x, _npc->_bounds.top - (textRect.height() / 2 + 10)); } else { - textRect.centre(_globals->_sceneManager._scene->_sceneBounds.left + + textRect.centre(_globals->_sceneManager._scene->_sceneBounds.left + (_globals->_sceneManager._scene->_sceneBounds.width() / 2), _globals->_sceneManager._scene->_sceneBounds.top); } diff --git a/engines/tsage/converse.h b/engines/tsage/converse.h index 6159b2f782..4d6e51a6b8 100644 --- a/engines/tsage/converse.h +++ b/engines/tsage/converse.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/converse.h $ - * $Id: converse.h 230 2011-02-12 06:57:31Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -31,12 +31,12 @@ namespace tSage { -class StripCallback: public Action { +class StripCallback : public Action { public: virtual void stripCallback(int v) = 0; }; -class SequenceManager: public Action { +class SequenceManager : public Action { private: void setup(); uint16 getNextValue(); @@ -66,7 +66,7 @@ public: }; -class Speaker: public EventHandler { +class Speaker : public EventHandler { public: Rect _fieldA; Action *_field18; @@ -95,14 +95,14 @@ public: void setTextPos(const Common::Point &pt) { _textPos = pt; } }; -class SpeakerGameText: public Speaker { +class SpeakerGameText : public Speaker { public: SpeakerGameText(); virtual Common::String getClassName() { return "SpeakerGameText"; } }; -class ScreenSpeaker: public Speaker { +class ScreenSpeaker : public Speaker { public: SceneItem *_npc; public: @@ -112,14 +112,14 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerAction: public Action { +class SpeakerAction : public Action { public: virtual void signal(); virtual Common::String getClassName() { return "SpeakerAction"; } }; -class AnimatedSpeaker: public Speaker { +class AnimatedSpeaker : public Speaker { public: SceneObject _object1; SceneObject _object2; @@ -135,13 +135,13 @@ public: Rect _bounds; ChoiceEntry() {} - ChoiceEntry(const Common::String &msg, const Rect &bounds) { + ChoiceEntry(const Common::String &msg, const Rect &bounds) { _msg = msg; _bounds = bounds; } }; -class ConversationChoiceDialog: public ModalDialog { +class ConversationChoiceDialog : public ModalDialog { public: int _stdColour; int _highlightColour; @@ -163,12 +163,12 @@ public: virtual void draw(); }; -class Obj0A: public Serialisable { +class Obj0A : public Serialisable { public: int _id; uint _scriptOffset; - virtual void synchronise(Serialiser &s) { + virtual void synchronise(Serialiser &s) { s.syncAsSint32LE(_id); s.syncAsUint32LE(_scriptOffset); } @@ -176,7 +176,7 @@ public: #define OBJ44_LIST_SIZE 5 -class Obj44: public Serialisable { +class Obj44 : public Serialisable { public: int _id; int _field2[OBJ44_LIST_SIZE]; @@ -187,7 +187,7 @@ public: virtual void synchronise(Serialiser &s); }; -class StripManager: public Action { +class StripManager : public Action { private: void reset(); void load(); diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index bbeda5bab2..81088b4eaa 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/core.cpp $ - * $Id: core.cpp 229 2011-02-12 06:50:14Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -43,7 +43,7 @@ namespace tSage { /*--------------------------------------------------------------------------*/ -InvObject::InvObject(int sceneNumber, int rlbNum, int cursorNum, CursorType cursorId, const Common::String description): +InvObject::InvObject(int sceneNumber, int rlbNum, int cursorNum, CursorType cursorId, const Common::String description) : _sceneNumber(sceneNumber), _rlbNum(rlbNum), _cursorNum(cursorNum), _cursorId(cursorId), _description(description) { _displayResNum = 3; @@ -63,7 +63,7 @@ void InvObject::setCursor() { if (_iconResNum != -1) { GfxSurface s = surfaceFromRes(_iconResNum, _rlbNum, _cursorNum); - + Graphics::Surface src = s.lockSurface(); _globals->_events.setCursor(src, s._transColour, s._centroid, _cursorId); } @@ -71,7 +71,7 @@ void InvObject::setCursor() { /*--------------------------------------------------------------------------*/ -InvObjectList::InvObjectList(): +InvObjectList::InvObjectList() : _stunner(2280, 1, 2, OBJECT_STUNNER, "This is your stunner."), _scanner(1, 1, 3, OBJECT_SCANNER, "A combination scanner comm unit."), _stasisBox(5200, 1, 4, OBJECT_STASIS_BOX, "A stasis box."), @@ -151,7 +151,7 @@ void InvObjectList::synchronise(Serialiser &s) { /*--------------------------------------------------------------------------*/ -void EventHandler::dispatch() { +void EventHandler::dispatch() { if (_action) _action->dispatch(); } @@ -254,7 +254,7 @@ ObjectMover::~ObjectMover() { void ObjectMover::synchronise(Serialiser &s) { EventHandler::synchronise(s); - + s.syncAsSint16LE(_destPosition.x); s.syncAsSint16LE(_destPosition.y); s.syncAsSint16LE(_moveDelta.x); s.syncAsSint16LE(_moveDelta.y); s.syncAsSint16LE(_moveSign.x); s.syncAsSint16LE(_moveSign.y); @@ -285,7 +285,7 @@ void ObjectMover::dispatch() { if (!xAmount) xAmount = _moveSign.x; currPos.x += xAmount; - + int yAmount = ABS(_destPosition.y - currPos.y); int yChange = _majorDiff / ABS(xAmount); int ySign; @@ -299,7 +299,7 @@ void ObjectMover::dispatch() { ++v; _field1A -= yChange; } - + ySign = _moveSign.y * v; } @@ -311,7 +311,7 @@ void ObjectMover::dispatch() { if (!yAmount) yAmount = _moveSign.y; currPos.y += yAmount; - + int xAmount = ABS(_destPosition.x - currPos.x); int xChange = _majorDiff / ABS(yAmount); int xSign; @@ -325,7 +325,7 @@ void ObjectMover::dispatch() { ++v; _field1A -= xChange; } - + xSign = _moveSign.x * v; } @@ -360,7 +360,7 @@ void ObjectMover::setup(const Common::Point &destPos) { int ySign = (diffY < 0) ? -1 : (diffY > 0 ? 1 : 0); diffX = ABS(diffX); diffY = ABS(diffY); - + if (diffX < diffY) { _minorDiff = diffX / 2; _majorDiff = diffY; @@ -394,7 +394,7 @@ void ObjectMover::endMove() { /*--------------------------------------------------------------------------*/ -ObjectMover2::ObjectMover2(): ObjectMover() { +ObjectMover2::ObjectMover2() : ObjectMover() { _destObject = NULL; } @@ -490,7 +490,7 @@ void PlayerMover::startMove(SceneObject *sceneObj, va_list va) { Common::Point *pt = va_arg(va, Common::Point *); _finalDest = *pt; _action = va_arg(va, Action *); - + setDest(_finalDest); } @@ -560,7 +560,7 @@ void PlayerMover::pathfind(Common::Point *routeList, Common::Point srcPos, Commo // Source is outside walkable areas tempRouteEnds = routeEnds; objPos = _sceneObject->_position; - + Common::Point newPos; findLinePoint(&tempRouteEnds, &objPos, 1, &newPos); int srcId = _globals->_walkRegions.indexOf(newPos); @@ -610,19 +610,19 @@ void PlayerMover::pathfind(Common::Point *routeList, Common::Point srcPos, Commo tempList[0] = 0; int endIndex = 0; int idx = 1; - + do { int breakEntry = routeRegions[idx]; int breakEntry2 = routeRegions[idx + 1]; - int listIndex = 0; + int listIndex = 0; while (_globals->_walkRegions._idxList[_globals->_walkRegions[breakEntry]._idxListIndex + listIndex] != breakEntry2) ++listIndex; - tempList[idx] = _globals->_walkRegions._idxList2[_globals->_walkRegions[breakEntry]._idxList2Index + tempList[idx] = _globals->_walkRegions._idxList2[_globals->_walkRegions[breakEntry]._idxList2Index + listIndex]; - + ++endIndex; } while (routeRegions[++idx] != destRegion); @@ -645,23 +645,23 @@ void PlayerMover::pathfind(Common::Point *routeList, Common::Point srcPos, Commo _globals->_walkRegions._field18[0]._pt1 = tempPt; *routeList++ = tempPt; } else { - int v16 = + int v16 = (findDistance(_globals->_walkRegions._field18[0]._pt1, _globals->_walkRegions._field18[var10]._pt1) << 1) + (findDistance(_globals->_walkRegions._field18[var10]._pt1, _globals->_walkRegions._field18[1]._pt1) << 1) + findDistance(_globals->_walkRegions._field18[var10]._pt1, _globals->_walkRegions._field18[var12]._pt1) + findDistance(_globals->_walkRegions._field18[var10]._pt1, _globals->_walkRegions._field18[var12]._pt2); - - int v1A = + + int v1A = (findDistance(_globals->_walkRegions._field18[0]._pt1, _globals->_walkRegions._field18[var10]._pt2) << 1) + (findDistance(_globals->_walkRegions._field18[var10]._pt2, _globals->_walkRegions._field18[1]._pt2) << 1) + findDistance(_globals->_walkRegions._field18[var10]._pt2, _globals->_walkRegions._field18[var12]._pt1) + findDistance(_globals->_walkRegions._field18[var10]._pt2, _globals->_walkRegions._field18[var12]._pt2); if (v16 < v1A) { - checkMovement2(_globals->_walkRegions._field18[var10]._pt1, + checkMovement2(_globals->_walkRegions._field18[var10]._pt1, _globals->_walkRegions._field18[var10]._pt2, 1, objPos); } else { - checkMovement2(_globals->_walkRegions._field18[var10]._pt2, + checkMovement2(_globals->_walkRegions._field18[var10]._pt2, _globals->_walkRegions._field18[var10]._pt1, 1, objPos); } @@ -793,7 +793,7 @@ int PlayerMover::checkMover(Common::Point &srcPos, const Common::Point &destPos) NpcMover *mover = new NpcMover(); _sceneObject->addMover(mover, &destPos, NULL); - + // Handle automatic movement of the player until a walkable region is reached, // or the end point of the movement is do { @@ -840,7 +840,7 @@ void PlayerMover::checkMovement2(const Common::Point &srcPos, const Common::Poin if (_sceneObject->_mover) _sceneObject->_mover->remove(); - + _sceneObject->_mover = this; } @@ -864,7 +864,7 @@ int PlayerMover::proc1(int *routeList, int srcRegion, int destRegion, int &v) { WalkRegion &srcWalkRegion = _globals->_walkRegions[srcRegion]; int distance; if (!routeList[0]) { - // No route + // No route distance = 0; } else { WalkRegion ®ion = _globals->_walkRegions[routeList[*routeList]]; @@ -883,7 +883,7 @@ int PlayerMover::proc1(int *routeList, int srcRegion, int destRegion, int &v) { return distance; } else { int foundIndex = 0; - int idx = 0; + int idx = 0; int currDest; while ((currDest = _globals->_walkRegions._idxList[srcWalkRegion._idxListIndex + idx]) != 0) { if (currDest == destRegion) { @@ -897,10 +897,10 @@ int PlayerMover::proc1(int *routeList, int srcRegion, int destRegion, int &v) { int resultOffset = 31990; while (((currDest = _globals->_walkRegions._idxList[srcWalkRegion._idxListIndex + foundIndex]) != 0) && (v == 0)) { int newDistance = proc1(tempList, currDest, destRegion, v); - + if ((newDistance <= resultOffset) || v) { routeList[0] = newIndex - 1; - + for (int i = newIndex; i <= tempList[0]; ++i) { routeList[i] = tempList[i]; ++routeList[0]; @@ -948,7 +948,7 @@ bool PlayerMover::sub_F8E5(const Common::Point &pt1, const Common::Point &pt2, c if (var8 == var10) return false; - + double var48, var50; if (diff1 == 0) { if (diff3 == 0) @@ -1019,7 +1019,7 @@ void PlayerMover2::startMove(SceneObject *sceneObj, va_list va) { _field7E = va_arg(va, int); _minArea = va_arg(va, int); _destObject = va_arg(va, SceneObject *); - + PlayerMover::setDest(_destObject->_position); } @@ -1036,7 +1036,7 @@ PaletteModifier::PaletteModifier() { /*--------------------------------------------------------------------------*/ -PaletteRotation::PaletteRotation(): PaletteModifier() { +PaletteRotation::PaletteRotation() : PaletteModifier() { _disabled = false; _delayFrames = 0; _delayCtr = 0; @@ -1159,7 +1159,7 @@ void PaletteRotation::set(ScenePalette *palette, int start, int end, int rotatio default: _currIndex = _start; break; - } + } } void PaletteRotation::setPalette(ScenePalette *palette, bool disabled) { @@ -1222,7 +1222,7 @@ void PaletteUnknown::remove() { /*--------------------------------------------------------------------------*/ -ScenePalette::ScenePalette() { +ScenePalette::ScenePalette() { // Set a default gradiant range for (int idx = 0; idx < 256; ++idx) _palette[idx].r = _palette[idx].g = _palette[idx].b = idx; @@ -1230,8 +1230,8 @@ ScenePalette::ScenePalette() { _field412 = 0; } -ScenePalette::ScenePalette(int paletteNum) { - loadPalette(paletteNum); +ScenePalette::ScenePalette(int paletteNum) { + loadPalette(paletteNum); } bool ScenePalette::loadPalette(int paletteNum) { @@ -1289,7 +1289,7 @@ uint8 ScenePalette::indexOf(uint r, uint g, uint b, int threshold) { int rDiff = abs(_palette[i].r - (int)r); int gDiff = abs(_palette[i].g - (int)g); int bDiff = abs(_palette[i].b - (int)b); - + int idxThreshold = rDiff * rDiff + gDiff * gDiff + bDiff * bDiff; if (idxThreshold <= threshold) { threshold = idxThreshold; @@ -1394,7 +1394,7 @@ void ScenePalette::changeBackground(const Rect &bounds, FadeMode fadeMode) { } } - _globals->_screenSurface.copyFrom(_globals->_sceneManager._scene->_backSurface, + _globals->_screenSurface.copyFrom(_globals->_sceneManager._scene->_backSurface, bounds, Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), NULL); for (SynchronisedList<PaletteModifier *>::iterator i = tempPalette._listeners.begin(); i != tempPalette._listeners.end(); ++i) @@ -1417,7 +1417,7 @@ void ScenePalette::synchronise(Serialiser &s) { s.syncAsByte(_blueColour); s.syncAsByte(_aquaColour); s.syncAsByte(_purpleColour); - s.syncAsByte(_limeColour); + s.syncAsByte(_limeColour); } /*--------------------------------------------------------------------------*/ @@ -1458,7 +1458,7 @@ void SceneItem::doAction(int action) { msg = DEFAULT_SCENE_HOTSPOT; break; } - + GUIErrorMessage(msg); } @@ -1467,8 +1467,8 @@ bool SceneItem::contains(const Common::Point &pt) { if (_sceneRegionId == 0) return _bounds.contains(pt.x + sceneBounds.left, pt.y + sceneBounds.top); - else - return _globals->_sceneRegions.indexOf(Common::Point(pt.x + sceneBounds.left, + else + return _globals->_sceneRegions.indexOf(Common::Point(pt.x + sceneBounds.left, pt.y + sceneBounds.top)) == _sceneRegionId; } @@ -1486,7 +1486,7 @@ void SceneItem::display(int resNum, int lineNum, ...) { int maxWidth = 120; bool keepOnscreen = false; bool centreText = true; - + if (resNum) { va_list va; va_start(va, lineNum); @@ -1561,7 +1561,7 @@ void SceneItem::display(int resNum, int lineNum, ...) { va_end(va); } - + if (resNum) { // Get required bounding size _globals->gfxManager().getStringBounds(msg.c_str(), textRect, maxWidth); @@ -1715,7 +1715,7 @@ void SceneObjectWrapper::dispatch() { /*--------------------------------------------------------------------------*/ -SceneObject::SceneObject(): SceneHotspot() { +SceneObject::SceneObject() : SceneHotspot() { _endAction = NULL; _mover = NULL; _objectWrapper = NULL; @@ -1736,7 +1736,7 @@ SceneObject::SceneObject(): SceneHotspot() { _frameChange = 0; } -SceneObject::SceneObject(const SceneObject &so): SceneHotspot() { +SceneObject::SceneObject(const SceneObject &so) : SceneHotspot() { *this = so; if (_objectWrapper) // Create a fresh object wrapper for this object @@ -1882,7 +1882,7 @@ void SceneObject::setObjectWrapper(SceneObjectWrapper *objWrapper) { } void SceneObject::addMover(ObjectMover *mover, ...) { - if (_mover) + if (_mover) _mover->remove(); _mover = mover; @@ -1921,7 +1921,7 @@ int SceneObject::checkRegion(const Common::Point &pt) { // Temporarily change the position Common::Point savedPos = _position; _position = pt; - + int regIndex = _globals->_sceneRegions.indexOf(pt); if (_regionBitList & (1 << regIndex)) regionIndex = regIndex; @@ -2026,7 +2026,7 @@ void SceneObject::animate(AnimateMode animMode, ...) { _endFrame = getFrameCount(); if (_frame == _endFrame) setFrame(getNewFrame()); - break; + break; } } @@ -2058,7 +2058,7 @@ void SceneObject::show() { int SceneObject::getSpliceArea(const SceneObject *obj) { int xd = ABS(_position.x - obj->_position.x); int yd = ABS(_position.y - obj->_position.y); - + return (xd * xd + yd) / 2; } @@ -2090,7 +2090,7 @@ void SceneObject::synchronise(Serialiser &s) { s.syncAsSint16LE(_moveDiff.x); s.syncAsSint16LE(_moveDiff.y); s.syncAsSint32LE(_field7A); SYNC_POINTER(_endAction); - s.syncAsUint32LE(_regionBitList); + s.syncAsUint32LE(_regionBitList); } void SceneObject::postInit(SceneObjectList *OwnerList) { @@ -2124,7 +2124,7 @@ void SceneObject::postInit(SceneObjectList *OwnerList) { void SceneObject::remove() { SceneItem::remove(); if (_globals->_sceneObjects->contains(this)) - // For objects in the object list, flag the object for removal in the next drawing, so that + // For objects in the object list, flag the object for removal in the next drawing, so that // the drawing code has a chance to restore the area previously covered by the object _flags |= OBJFLAG_PANES | OBJFLAG_REMOVE | OBJFLAG_HIDE; else @@ -2206,7 +2206,7 @@ void SceneObject::dispatch() { } else { setFrame(changeFrame()); } - + break; default: @@ -2268,15 +2268,15 @@ void SceneObject::reposition() { */ void SceneObject::draw() { Rect destRect = _bounds; - destRect.translate(-_globals->_sceneManager._scene->_sceneBounds.left, + destRect.translate(-_globals->_sceneManager._scene->_sceneBounds.left, -_globals->_sceneManager._scene->_sceneBounds.top); Region *priorityRegion = _globals->_sceneManager._scene->_priorities.find(_priority); GfxSurface frame = getFrame(); - _globals->gfxManager().copyFrom(frame, destRect, priorityRegion); + _globals->gfxManager().copyFrom(frame, destRect, priorityRegion); } /** - * Refreshes the background around the area of a scene object prior to it's being redrawn, + * Refreshes the background around the area of a scene object prior to it's being redrawn, * in case it is moving */ void SceneObject::updateScreen() { @@ -2381,7 +2381,7 @@ void SceneObjectList::draw() { // Handle updating object priority if (!(obj->_flags & OBJFLAG_FIXED_PRIORITY)) { - obj->_priority = MIN((int)obj->_position.y - 1, + obj->_priority = MIN((int)obj->_position.y - 1, (int)_globals->_sceneManager._scene->_backgroundBounds.bottom); } @@ -2411,7 +2411,7 @@ void SceneObjectList::draw() { } else { for (uint objIndex = 0; objIndex < objList.size(); ++objIndex) { SceneObject *obj = objList[objIndex]; - + if ((obj->_flags & flagMask) && obj->_paneRects[paneNum].isValidRect()) obj->updateScreen(); } @@ -2445,7 +2445,7 @@ redraw: obj->_flags &= ~flagMask; if (obj->_flags & OBJFLAG_REMOVE) { obj->_flags |= OBJFLAG_PANES; - + checkIntersection(objList, objIndex, CURRENT_PANENUM); obj->updateScreen(); @@ -2559,7 +2559,7 @@ void SceneObjectList::synchronise(Serialiser &s) { /*--------------------------------------------------------------------------*/ -SceneText::SceneText(): SceneObject() { +SceneText::SceneText() : SceneObject() { _fontNumber = 2; _width = 160; _textMode = ALIGN_LEFT; @@ -2574,7 +2574,7 @@ void SceneText::setup(const Common::String &msg) { GfxManager gfxMan(_textSurface); gfxMan.activate(); Rect textRect; - + gfxMan._font.setFontNumber(_fontNumber); gfxMan._font._colours.foreground = _colour1; gfxMan._font._colours2.background = _colour2; @@ -2589,7 +2589,7 @@ void SceneText::setup(const Common::String &msg) { // Write the text to the surface gfxMan._bounds = textRect; - gfxMan._font.writeLines(msg.c_str(), textRect, _textMode); + gfxMan._font.writeLines(msg.c_str(), textRect, _textMode); // Do post-init, which adds this SceneText object to the scene postInit(); @@ -2702,7 +2702,7 @@ void Player::enableControl() { } void Player::process(Event &event) { - if (!event.handled && (event.eventType == EVENT_BUTTON_DOWN) && + if (!event.handled && (event.eventType == EVENT_BUTTON_DOWN) && (_globals->_events.getCursor() == CURSOR_WALK) && _globals->_player._canWalk && (_position != event.mousePos) && _globals->_sceneObjects->contains(this)) { @@ -2805,7 +2805,7 @@ void Region::setRect(int xs, int ys, int xe, int ye) { } else { _regionSize = 22; _bounds.set(xs, ys, xe, ye); - + LineSliceSet sliceSet; sliceSet.load2(1, xs, xe); @@ -2814,7 +2814,7 @@ void Region::setRect(int xs, int ys, int xe, int ye) { } const LineSliceSet &Region::getLineSlices(int yp) { - return _ySlices[(_regionSize == 22) ? 0 : yp - _bounds.top]; + return _ySlices[(_regionSize == 22) ? 0 : yp - _bounds.top]; } LineSliceSet Region::sectPoints(int yp, const LineSliceSet &sliceSet) { @@ -2838,7 +2838,7 @@ LineSliceSet Region::mergeSlices(const LineSliceSet &set1, const LineSliceSet &s } else { bool set1Flag = set1.items[set1Index].xs >= set2.items[set2Index].xs; const LineSlice &slice = set1Flag ? set1.items[set1Index] : set2.items[set2Index]; - + result.add(slice.xs, MIN(set1.items[set1Index].xe, set2.items[set2Index].xe)); if (set1Flag) ++set1Index; @@ -2861,13 +2861,13 @@ void Region::draw() { LineSliceSet tempSet; tempSet.add(sceneBounds.left, sceneBounds.right); LineSliceSet newSet = sectPoints(yp, tempSet); - + // Loop through the calculated slices for (uint idx = 0; idx < newSet.items.size(); ++idx) { Rect rect1(newSet.items[idx].xs, yp, newSet.items[idx].xe, yp + 1); rect1.left &= ~3; rect1.right = (rect1.right + 3) & ~3; - + Rect rect2 = rect1; rect1.translate(-_globals->_sceneOffset.x, -_globals->_sceneOffset.y); rect2.translate(-sceneBounds.left, -sceneBounds.top); @@ -2880,7 +2880,7 @@ void Region::draw() { void Region::uniteLine(int yp, LineSliceSet &sliceSet) { // TODO: More properly implement like the original - + // First expand the bounds as necessary to fit in the row if (_ySlices.empty()) { _bounds = Rect(sliceSet.items[0].xs, yp, sliceSet.items[sliceSet.items.size() - 1].xe, yp + 1); @@ -2941,7 +2941,7 @@ void SceneRegions::load(int sceneNum) { clear(); byte *regionData = _vm->_dataManager->getResource(RES_CONTROL, sceneNum, 9999, true); - + if (regionData) { int regionCount = READ_LE_UINT16(regionData); for (int regionCtr = 0; regionCtr < regionCount; ++regionCtr) { @@ -3061,7 +3061,7 @@ void WalkRegion::loadRegion(byte *dataP, int size) { process3(yp, dataCount, processIndex, idx2); process4(yp, processIndex, idx2, count); - loadRecords(yp, count, processIndex); + loadRecords(yp, count, processIndex); } } @@ -3080,7 +3080,7 @@ void WalkRegion::loadProcessList(byte *dataP, int dataSize, int &dataIndex, int int v; if (idx == (dataSize - 1)) v = READ_LE_UINT16(dataP + 2); - else + else v = process1(idx, dataP, dataSize); warning("TODO: v not used? - %d", v); */ @@ -3117,7 +3117,7 @@ void WalkRegion::process2(int dataIndex, int x1, int y1, int x2, int y2) { int yDiff = ABS(y2 - y1); int halfDiff = MAX(xDiff, yDiff) / 2; int yMax = MIN(y1, y2); - + while (dataIndex && (_processList[dataIndex - 1]._yp > yMax)) { _processList[dataIndex] = _processList[dataIndex - 1]; --dataIndex; @@ -3227,7 +3227,7 @@ void WalkRegions::load(int sceneNum) { } DEALLOCATE(dataP); - + // Load the idx list dataP = _vm->_dataManager->getResource(RES_WALKRGNS, sceneNum, 3); dataSize = _vm->_memoryManager.getSize(dataP); @@ -3298,7 +3298,7 @@ void ScenePriorities::load(int resNum) { clear(); byte *regionData = _vm->_dataManager->getResource(RES_PRIORITY, resNum, 9999, true); - + if (regionData) { int regionCount = READ_LE_UINT16(regionData); for (int regionCtr = 0; regionCtr < regionCount; ++regionCtr) { @@ -3360,7 +3360,7 @@ double FloatSet::sqrt(FloatSet &floatSet) { /*--------------------------------------------------------------------------*/ -GameHandler::GameHandler(): EventHandler() { +GameHandler::GameHandler() : EventHandler() { _nextWaitCtr = 1; _waitCtr.setCtr(1); _field14 = 10; @@ -3420,7 +3420,7 @@ void SceneHandler::postInit(SceneObjectList *OwnerList) { _globals->_inventory._ring._sceneNumber = 1; // Switch to the title screen - _globals->_sceneManager.setNewScene(1000); + _globals->_sceneManager.setNewScene(1000); } void SceneHandler::process(Event &event) { @@ -3447,7 +3447,7 @@ void SceneHandler::process(Event &event) { _globals->_game.quitGame(); event.handled = false; break; - + case Common::KEYCODE_F4: // F4 - Restart _globals->_game.restartGame(); @@ -3475,7 +3475,7 @@ void SceneHandler::process(Event &event) { } // Check for displaying right-click dialog - if ((event.eventType == EVENT_BUTTON_DOWN) && (event.btnState == BTNSHIFT_RIGHT) && + if ((event.eventType == EVENT_BUTTON_DOWN) && (event.btnState == BTNSHIFT_RIGHT) && _globals->_player._uiEnabled) { RightClickDialog *dlg = new RightClickDialog(); dlg->execute(); @@ -3507,7 +3507,7 @@ void SceneHandler::process(Event &event) { } // Mouse press handling - if (_globals->_player._uiEnabled && (event.eventType == EVENT_BUTTON_DOWN) && + if (_globals->_player._uiEnabled && (event.eventType == EVENT_BUTTON_DOWN) && !_globals->_sceneItems.empty()) { // Scan the item list to find one the mouse is within SynchronisedList<SceneItem *>::iterator i = _globals->_sceneItems.begin(); @@ -3557,11 +3557,11 @@ void SceneHandler::dispatch() { _globals->_sceneObjects->recurse(SceneHandler::dispatchObject); // If a scene is active, then dispatch to it - if (_globals->_sceneManager._scene) + if (_globals->_sceneManager._scene) _globals->_sceneManager._scene->dispatch(); //TODO: Figure out purpose of the given list - //_globals->_regions.forEach(SceneHandler::handleListener); + //_globals->_regions.forEach(SceneHandler::handleListener); Event event; while (_globals->_events.getEvent(event)) @@ -3655,7 +3655,7 @@ void Game::handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName void Game::restart() { _globals->_scenePalette.clearListeners(); _globals->_soundHandler.proc3(); - + // Reset the flags _globals->reset(); _globals->setFlag(34); diff --git a/engines/tsage/core.h b/engines/tsage/core.h index e30d6efb2d..77923606d1 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/core.h $ - * $Id: core.h 227 2011-02-11 22:13:54Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -49,7 +49,7 @@ class ObjectMover; class Action; class Serialiser; -class InvObject: public SavedObject { +class InvObject : public SavedObject { public: int _sceneNumber; int _displayResNum; @@ -71,7 +71,7 @@ public: } }; -class InvObjectList: public SavedObject { +class InvObjectList : public SavedObject { public: InvObject _stunner; InvObject _scanner; @@ -121,7 +121,7 @@ public: /** * Basic reference counter class */ -class RefCounter: public Serialisable { +class RefCounter : public Serialisable { private: int _ctr; public: @@ -142,11 +142,11 @@ public: virtual void synchronise(Serialiser &s) { s.syncAsSint16LE(_ctr); } }; -class EventHandler: public SavedObject { +class EventHandler : public SavedObject { public: Action *_action; - EventHandler(): SavedObject() { _action = NULL; } + EventHandler() : SavedObject() { _action = NULL; } virtual ~EventHandler() { destroy(); } virtual void synchronise(Serialiser &s) { SYNC_POINTER(_action); } @@ -161,7 +161,7 @@ public: virtual void destroy() {}; }; -class Action: public EventHandler { +class Action : public EventHandler { public: EventHandler *_owner; int _actionIndex; @@ -178,7 +178,7 @@ public: virtual void process(Event &event); virtual void dispatch(); virtual void attached(EventHandler *newOwner, EventHandler *fmt, va_list va); - + void attach(EventHandler *newOwner, EventHandler *fmt, ...) { va_list va; va_start(va, fmt); @@ -190,12 +190,12 @@ public: void setDelay(int numFrames); }; -class ActionExt: public Action { +class ActionExt : public Action { public: int _state; }; -class ObjectMover: public EventHandler { +class ObjectMover : public EventHandler { public: Common::Point _destPosition; Common::Point _moveDelta; @@ -219,7 +219,7 @@ public: virtual void endMove(); }; -class ObjectMover2: public ObjectMover { +class ObjectMover2 : public ObjectMover { public: SceneObject *_destObject; int _minArea; @@ -235,7 +235,7 @@ public: virtual void endMove(); }; -class ObjectMover3: public ObjectMover2 { +class ObjectMover3 : public ObjectMover2 { public: virtual Common::String getClassName() { return "ObjectMover3"; } virtual void dispatch(); @@ -243,7 +243,7 @@ public: virtual void endMove(); }; -class NpcMover: public ObjectMover { +class NpcMover : public ObjectMover { public: virtual Common::String getClassName() { return "NpcMover"; } virtual void startMove(SceneObject *sceneObj, va_list va); @@ -258,7 +258,7 @@ public: Common::Point moveDest; }; -class PlayerMover: public NpcMover { +class PlayerMover : public NpcMover { protected: void setDest(const Common::Point &destPos); void pathfind(Common::Point *routeList, Common::Point srcPos, Common::Point destPos, RouteEnds routeEnds); @@ -284,12 +284,12 @@ public: virtual void endMove(); }; -class PlayerMover2: public PlayerMover { +class PlayerMover2 : public PlayerMover { public: SceneObject *_destObject; int _field7E; int _minArea; - PlayerMover2(): PlayerMover() { _destObject = NULL; } + PlayerMover2() : PlayerMover() { _destObject = NULL; } virtual void synchronise(Serialiser &s); virtual Common::String getClassName() { return "PlayerMover2"; } @@ -302,7 +302,7 @@ public: class ScenePalette; -class PaletteModifier: public SavedObject { +class PaletteModifier : public SavedObject { public: ScenePalette *_scenePalette; Action *_action; @@ -317,7 +317,7 @@ public: virtual void remove() = 0; }; -class PaletteRotation: public PaletteModifier { +class PaletteRotation : public PaletteModifier { public: bool _disabled; int _delayFrames; @@ -346,7 +346,7 @@ public: /*--------------------------------------------------------------------------*/ -class PaletteUnknown: public PaletteModifier { +class PaletteUnknown : public PaletteModifier { public: int _step, _percent, _field12, _field14; RGB8 _palette[256]; @@ -359,7 +359,7 @@ public: enum FadeMode {FADEMODE_NONE = 0, FADEMODE_GRADUAL = 1, FADEMODE_IMMEDIATE = 2}; -class ScenePalette: public SavedObject { +class ScenePalette : public SavedObject { public: RGB8 _palette[256]; GfxColours _colours; @@ -407,7 +407,7 @@ const int SET_POS_MODE = 9; const int SET_TEXT_MODE = 10; const int LIST_END = -999; -class SceneItem: public EventHandler { +class SceneItem : public EventHandler { public: Rect _bounds; Common::String _msg; @@ -416,7 +416,7 @@ public: int _yDiff; int _sceneRegionId; public: - SceneItem(): EventHandler() { _msg = "Feature"; _action = NULL; _sceneRegionId = 0; } + SceneItem() : EventHandler() { _msg = "Feature"; _action = NULL; _sceneRegionId = 0; } virtual void synchronise(Serialiser &s); virtual Common::String getClassName() { return "SceneItem"; } @@ -434,7 +434,7 @@ public: } }; -class SceneItemExt: public SceneItem { +class SceneItemExt : public SceneItem { public: int _state; @@ -445,18 +445,18 @@ public: } }; -class SceneHotspot: public SceneItem { +class SceneHotspot : public SceneItem { public: - SceneHotspot(): SceneItem() {} + SceneHotspot() : SceneItem() {} virtual Common::String getClassName() { return "SceneHotspot"; } virtual void doAction(int action); }; -class NamedHotspot: public SceneHotspot { +class NamedHotspot : public SceneHotspot { public: int _resnum, _lookLineNum, _useLineNum; - NamedHotspot(): SceneHotspot() {} + NamedHotspot() : SceneHotspot() {} void setup(const int ys, const int xe, const int ye, const int xs, const int resnum, const int lookLineNum, const int useLineNum); virtual void doAction(int action); @@ -485,7 +485,7 @@ public: Visage &operator=(const Visage &s); }; -class SceneObjectWrapper: public EventHandler { +class SceneObjectWrapper : public EventHandler { private: Visage _visageImages; public: @@ -502,13 +502,13 @@ public: virtual void dispatch(); }; -enum ObjectFlags {OBJFLAG_FIXED_PRIORITY = 1, OBJFLAG_NO_UPDATES = 2, OBJFLAG_ZOOMED = 4, - OBJFLAG_SUPPRESS_DISPATCH = 8, OBJFLAG_HIDE = 0x100, OBJFLAG_HIDING = 0x200, OBJFLAG_REMOVE = 0x400, - OBJFLAG_CLONED = 0x800, OBJFLAG_CHECK_REGION = 0x1000, OBJFLAG_PANE_0 = 0x4000, OBJFLAG_PANE_1 = 0x8000, +enum ObjectFlags {OBJFLAG_FIXED_PRIORITY = 1, OBJFLAG_NO_UPDATES = 2, OBJFLAG_ZOOMED = 4, + OBJFLAG_SUPPRESS_DISPATCH = 8, OBJFLAG_HIDE = 0x100, OBJFLAG_HIDING = 0x200, OBJFLAG_REMOVE = 0x400, + OBJFLAG_CLONED = 0x800, OBJFLAG_CHECK_REGION = 0x1000, OBJFLAG_PANE_0 = 0x4000, OBJFLAG_PANE_1 = 0x8000, OBJFLAG_PANES = OBJFLAG_PANE_0 | OBJFLAG_PANE_1 }; -class SceneObject: public SceneHotspot { +class SceneObject : public SceneHotspot { private: Visage _visageImages; @@ -586,7 +586,7 @@ public: void setup(int visage, int stripFrameNum, int frameNum, int posX, int posY, int priority); }; -class SceneObjectExt: public SceneObject { +class SceneObjectExt : public SceneObject { public: int _state; @@ -597,7 +597,7 @@ public: virtual Common::String getClassName() { return "SceneObjectExt"; } }; -class SceneText: public SceneObject { +class SceneText : public SceneObject { public: int _fontNumber; int _width; @@ -617,13 +617,13 @@ public: virtual GfxSurface getFrame() { return _textSurface; } }; -class Player: public SceneObject { +class Player : public SceneObject { public: bool _canWalk; bool _uiEnabled; int _field8C; public: - Player(): SceneObject() {} + Player() : SceneObject() {} virtual Common::String getClassName() { return "Player"; } virtual void synchronise(Serialiser &s); @@ -652,7 +652,7 @@ public: int xs = va_arg(va, int); int xe = va_arg(va, int); items.push_back(LineSlice(xs, xe)); - } + } } void add(LineSlice &slice) { items.push_back(slice); } @@ -684,14 +684,14 @@ public: static LineSliceSet mergeSlices(const LineSliceSet &set1, const LineSliceSet &set2); }; -class SceneRegions: public Common::List<Region> { +class SceneRegions : public Common::List<Region> { public: void load(int sceneNum); int indexOf(const Common::Point &pt); }; -class SceneObjectList: public SavedObject { +class SceneObjectList : public SavedObject { private: void checkIntersection(Common::Array<SceneObject *> &ObjList, uint ObjIndex, int PaneNum); @@ -723,13 +723,13 @@ public: bool contains(SceneObject *sceneObj) { return tSage::contains(_objList, sceneObj); } void push_back(SceneObject *sceneObj) { _objList.push_back(sceneObj); } void push_front(SceneObject *sceneObj) { _objList.push_front(sceneObj); } - void remove(SceneObject *sceneObj) { - _objList.remove(sceneObj); + void remove(SceneObject *sceneObj) { + _objList.remove(sceneObj); _listAltered = true; } }; -class ScenePriorities: public Common::List<Region> { +class ScenePriorities : public Common::List<Region> { public: int _resNum; int _field14; @@ -772,7 +772,7 @@ public: } }; -class SoundHandler: public EventHandler { +class SoundHandler : public EventHandler { public: GameSoundHandler _sound; Action *_action; @@ -811,7 +811,7 @@ public: /*--------------------------------------------------------------------------*/ -class SceneItemList: public SynchronisedList<SceneItem *> { +class SceneItemList : public SynchronisedList<SceneItem *> { public: void addItems(SceneItem *first, ...); }; @@ -833,7 +833,7 @@ public: #define PROCESS_LIST_SIZE 100 -class WalkRegion: public Region { +class WalkRegion : public Region { private: static RegionSupportRec _processList[PROCESS_LIST_SIZE]; void loadProcessList(byte *dataP, int dataSize, int &dataIndex, int ®ionHeight); @@ -894,14 +894,14 @@ public: /*--------------------------------------------------------------------------*/ -class GameHandler: public EventHandler { +class GameHandler : public EventHandler { public: RefCounter _lockCtr; RefCounter _waitCtr; int _nextWaitCtr; int _field14; public: - GameHandler(); + GameHandler(); virtual ~GameHandler(); void execute(); @@ -911,7 +911,7 @@ public: virtual void dispatch() {} }; -class SceneHandler: public GameHandler { +class SceneHandler : public GameHandler { public: int _saveGameSlot; int _loadGameSlot; diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp index cc5c9d899c..d04fd71461 100644 --- a/engines/tsage/debugger.cpp +++ b/engines/tsage/debugger.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/debugger.cpp $ - * $Id: debugger.cpp 223 2011-02-09 13:03:31Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -32,7 +32,7 @@ namespace tSage { -Debugger::Debugger(): GUI::Debugger() { +Debugger::Debugger() : GUI::Debugger() { DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_Scene)); DCmd_Register("walk_regions", WRAP_METHOD(Debugger, Cmd_WalkRegions)); @@ -67,7 +67,7 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) { if (argc == 3) _globals->_sceneManager._sceneNumber = strToInt(argv[2]); - _globals->_sceneManager.changeScene(strToInt(argv[1])); + _globals->_sceneManager.changeScene(strToInt(argv[1])); return false; } } @@ -82,7 +82,7 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) { } // Colour index to use for the first walk region - int colour = 16; + int colour = 16; // Lock the background surface for access Graphics::Surface destSurface = _globals->_sceneManager._scene->_backSurface.lockSurface(); @@ -120,7 +120,7 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) { regionNum = strToInt(argv[1]); // Colour index to use for the first priority region - int colour = 16; + int colour = 16; int count = 0; // Lock the background surface for access @@ -145,7 +145,7 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) { } } - regionsDesc += Common::String::format("Region Priority = %d bounds=%d,%d,%d,%d\n", + regionsDesc += Common::String::format("Region Priority = %d bounds=%d,%d,%d,%d\n", r._regionId, r._bounds.left, r._bounds.top, r._bounds.right, r._bounds.bottom); } diff --git a/engines/tsage/debugger.h b/engines/tsage/debugger.h index 348d2cb821..c94d77b2ab 100644 --- a/engines/tsage/debugger.h +++ b/engines/tsage/debugger.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/debugger.h $ - * $Id: debugger.h 176 2011-01-25 11:33:33Z dreammaster $ + * $URL$ + * $Id$ * */ diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp index 22f276e546..371166d782 100644 --- a/engines/tsage/detection.cpp +++ b/engines/tsage/detection.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/detection.cpp $ - * $Id: detection.cpp 209 2011-02-06 00:46:36Z dreammaster $ + * $URL$ + * $Id$ * */ diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h index 429d6aecdb..f932c62367 100644 --- a/engines/tsage/detection_tables.h +++ b/engines/tsage/detection_tables.h @@ -29,7 +29,7 @@ static const tSageGameDescription gameDescriptions[] = { // Ringworld English CD version { - { + { "ring", "CD", AD_ENTRY1s("ring.rlb", "466f0e6492d9d0f34d35c5cd088de90f", 37847618), @@ -43,7 +43,7 @@ static const tSageGameDescription gameDescriptions[] = { }, // Ringworld First Wave English CD version { - { + { "ring", "CD", AD_ENTRY1s("ring.rlb", "0a25b4ee58d44a54425c0b47e5096bbc", 37847618), diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp index 2766ad0450..b76d60ac48 100644 --- a/engines/tsage/dialogs.cpp +++ b/engines/tsage/dialogs.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/dialogs.cpp $ - * $Id: dialogs.cpp 215 2011-02-07 12:06:13Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -39,8 +39,8 @@ namespace tSage { /** * This dialog class provides a simple message display with support for either one or two buttons. */ -MessageDialog::MessageDialog(const Common::String &message, const Common::String &btn1Message, - const Common::String &btn2Message): GfxDialog() { +MessageDialog::MessageDialog(const Common::String &message, const Common::String &btn1Message, + const Common::String &btn2Message) : GfxDialog() { // Set up the message addElements(&_msg, &_btn1, NULL); @@ -98,7 +98,7 @@ int MessageDialog::show2(const Common::String &message, const Common::String &bt /*--------------------------------------------------------------------------*/ -ConfigDialog::ConfigDialog(): GUI::OptionsDialog("", "GlobalConfig") { +ConfigDialog::ConfigDialog() : GUI::OptionsDialog("", "GlobalConfig") { // // Sound controllers // @@ -119,7 +119,7 @@ ConfigDialog::ConfigDialog(): GUI::OptionsDialog("", "GlobalConfig") { #define BUTTON_WIDTH 28 #define BUTTON_HEIGHT 29 -RightClickButton::RightClickButton(int buttonIndex, int xp, int yp): GfxButton() { +RightClickButton::RightClickButton(int buttonIndex, int xp, int yp) : GfxButton() { _buttonIndex = buttonIndex; this->_bounds.left = xp; this->_bounds.top = yp; @@ -143,7 +143,7 @@ void RightClickButton::highlight() { GfxSurface btnSelected = surfaceFromRes(imgData); _globals->gfxManager().copyFrom(btnSelected, _bounds.left, _bounds.top); - + DEALLOCATE(imgData); } } @@ -153,7 +153,7 @@ void RightClickButton::highlight() { /** * This dialog implements the right-click dialog */ -RightClickDialog::RightClickDialog(): GfxDialog(), +RightClickDialog::RightClickDialog() : GfxDialog(), _walkButton(1, 48, 12), _lookButton(2, 31, 29), _useButton(3, 65, 29), _talkButton(4, 14, 47), _inventoryButton(5, 48, 47), _optionsButton(6, 83, 47) { Rect rectArea, dialogRect; @@ -173,7 +173,7 @@ RightClickDialog::RightClickDialog(): GfxDialog(), Rect screenRect = _globals->gfxManager()._bounds; screenRect.collapse(4, 4); dialogRect.contain(screenRect); - + _bounds = dialogRect; _gfxManager._bounds = _bounds; @@ -332,7 +332,7 @@ void ModalDialog::drawFrame() { for (int xp = _bounds.left + 10; xp < (_bounds.right - 20); xp += 10) surface.draw(Common::Point(xp, _bounds.top)); surface.draw(Common::Point(_bounds.right - 20, _bounds.top)); - + surface = surfaceFromRes(8, 1, 1); surface.draw(Common::Point(_bounds.left, _bounds.top)); @@ -474,7 +474,7 @@ void InventoryDialog::execute() { ; if (_vm->getEventManager()->shouldQuit()) return; - + hiliteObj = NULL; if ((event.eventType == EVENT_BUTTON_DOWN) && !_bounds.contains(event.mousePos)) break; @@ -495,7 +495,7 @@ void InventoryDialog::execute() { break; } } - + if (hiliteObj == &_btnOk) { // Ok button clicked if (lookFlag) @@ -581,7 +581,7 @@ OptionsDialog::OptionsDialog() { // Set all the buttons to the widest button GfxButton *btnList[6] = {&_btnRestore, &_btnSave, &_btnRestart, &_btnQuit, &_btnSound, &_btnResume}; int16 btnWidth = 0; - for (int idx = 0; idx < 6; ++idx) + for (int idx = 0; idx < 6; ++idx) btnWidth = MAX(btnWidth, btnList[idx]->_bounds.width()); for (int idx = 0; idx < 6; ++idx) btnList[idx]->_bounds.setWidth(btnWidth); diff --git a/engines/tsage/dialogs.h b/engines/tsage/dialogs.h index 0fece89781..8e766372b4 100644 --- a/engines/tsage/dialogs.h +++ b/engines/tsage/dialogs.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/dialogs.h $ - * $Id: dialogs.h 215 2011-02-07 12:06:13Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -35,7 +35,7 @@ namespace tSage { -class MessageDialog: public GfxDialog { +class MessageDialog : public GfxDialog { public: GfxButton _btn1, _btn2; GfxDialog _dialog; @@ -52,7 +52,7 @@ public: ConfigDialog(); }; -class RightClickButton: public GfxButton { +class RightClickButton : public GfxButton { private: GfxSurface *_savedButton; public: @@ -64,7 +64,7 @@ public: virtual void highlight(); }; -class RightClickDialog: public GfxDialog { +class RightClickDialog : public GfxDialog { private: GfxSurface _surface; RightClickButton *_highlightedButton; @@ -83,7 +83,7 @@ public: /*--------------------------------------------------------------------------*/ -class ModalDialog: public GfxDialog { +class ModalDialog : public GfxDialog { protected: void drawFrame(); public: @@ -92,18 +92,18 @@ public: /*--------------------------------------------------------------------------*/ -class GfxInvImage: public GfxImage { +class GfxInvImage : public GfxImage { public: InvObject *_invObject; public: - GfxInvImage(): GfxImage(), _invObject(NULL) {} + GfxInvImage() : GfxImage(), _invObject(NULL) {} virtual bool process(Event &event); }; #define MAX_INVOBJECT_DISPLAY 20 -class InventoryDialog: public ModalDialog { +class InventoryDialog : public ModalDialog { private: Common::Array<GfxInvImage> _images; GfxButton _btnOk, _btnLook; @@ -117,7 +117,7 @@ public: /*--------------------------------------------------------------------------*/ -class OptionsDialog: public ModalDialog { +class OptionsDialog : public ModalDialog { private: GfxButton _btnSave, _btnRestore, _btnRestart; GfxButton _btnQuit, _btnResume; diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp index 7b02683226..4d2a1cce8c 100644 --- a/engines/tsage/events.cpp +++ b/engines/tsage/events.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/events.cpp $ - * $Id: events.cpp 224 2011-02-10 10:58:52Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -36,7 +36,7 @@ namespace tSage { -EventsClass::EventsClass() { +EventsClass::EventsClass() { _currentCursor = CURSOR_NONE; _frameNumber = 0; _priorFrameTime = 0; @@ -137,7 +137,7 @@ bool EventsClass::getEvent(Event &evt, int eventMask) { */ void EventsClass::setCursor(CursorType cursorType) { _globals->clearFlag(122); - + if ((_currentCursor == cursorType) && CursorMan.isVisible()) return; @@ -146,7 +146,7 @@ void EventsClass::setCursor(CursorType cursorType) { CursorMan.showMouse(false); return; } - + CursorMan.showMouse(true); const byte *cursor; @@ -159,7 +159,7 @@ void EventsClass::setCursor(CursorType cursorType) { cursor = _vm->_dataManager->getSubResource(4, 1, 6, &size); _globals->setFlag(122); break; - + case CURSOR_LOOK: // Look cursor cursor = _vm->_dataManager->getSubResource(4, 1, 5, &size); @@ -230,7 +230,7 @@ void EventsClass::hideCursor() { */ void EventsClass::delay(int numFrames) { while (_frameNumber < (_prevDelayFrame + numFrames)) { - uint32 delayAmount = CLIP(_priorFrameTime + GAME_FRAME_TIME - g_system->getMillis(), + uint32 delayAmount = CLIP(_priorFrameTime + GAME_FRAME_TIME - g_system->getMillis(), (uint32)0, (uint32)GAME_FRAME_TIME); if (delayAmount > 0) g_system->delayMillis(delayAmount); diff --git a/engines/tsage/events.h b/engines/tsage/events.h index d8f58a4ce2..202ac9ccd2 100644 --- a/engines/tsage/events.h +++ b/engines/tsage/events.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/events.h $ - * $Id: events.h 212 2011-02-06 10:19:01Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -59,17 +59,17 @@ enum CursorType { OBJECT_STUNNER = 0, OBJECT_SCANNER = 1, OBJECT_STASIS_BOX = 2, OBJECT_INFODISK = 3, OBJECT_STASIS_NEGATOR = 4, OBJECT_KEY_DEVICE = 5, OBJECT_MEDKIT = 6, OBJECT_LADDER = 7, OBJECT_ROPE = 8, OBJECT_KEY = 9, OBJECT_TRANSLATOR = 10, OBJECT_ALE = 11, - OBJECT_PAPER = 12, OBJECT_WALDOS = 13, OBJECT_STASIS_BOX2 = 14, OBJECT_RING = 15, + OBJECT_PAPER = 12, OBJECT_WALDOS = 13, OBJECT_STASIS_BOX2 = 14, OBJECT_RING = 15, OBJECT_CLOAK = 16, OBJECT_TUNIC = 17, OBJECT_CANDLE = 18, OBJECT_STRAW = 19, OBJECT_SCIMITAR = 20, OBJECT_SWORD = 21, OBJECT_HELMET = 22, OBJECT_ITEMS = 23, OBJECT_CONCENTRATOR = 24, - OBJECT_NULLIFIER = 25, OBJECT_PEG = 26, OBJECT_VIAL = 27, OBJECT_JACKET = 28, - OBJECT_TUNIC2 = 29, OBJECT_BONE = 30, OBJECT_EMPTY_JAR = 31, OBJECT_JAR = 32, + OBJECT_NULLIFIER = 25, OBJECT_PEG = 26, OBJECT_VIAL = 27, OBJECT_JACKET = 28, + OBJECT_TUNIC2 = 29, OBJECT_BONE = 30, OBJECT_EMPTY_JAR = 31, OBJECT_JAR = 32, - CURSOR_WALK = 0x100, CURSOR_LOOK = 0x200, CURSOR_700 = 700, CURSOR_USE = 0x400, CURSOR_TALK = 0x800, + CURSOR_WALK = 0x100, CURSOR_LOOK = 0x200, CURSOR_700 = 700, CURSOR_USE = 0x400, CURSOR_TALK = 0x800, CURSOR_NONE = -1, CURSOR_CROSSHAIRS = -2, CURSOR_ARROW = -3 }; -class EventsClass: public SaveListener { +class EventsClass : public SaveListener { private: Common::Event _event; uint32 _frameNumber; diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index 2bf47a3ed7..b9abb9d751 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/globals.cpp $ - * $Id: globals.cpp 229 2011-02-12 06:50:14Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -40,13 +40,13 @@ static SavedObject *classFactoryProc(const Common::String &className) { if (className == "ObjectMover2") return new ObjectMover2(); if (className == "ObjectMover3") return new ObjectMover3(); if (className == "PlayerMover") return new PlayerMover(); - + return NULL; } /*--------------------------------------------------------------------------*/ -Globals::Globals(): +Globals::Globals() : _dialogCentre(160, 140), _gfxManagerInstance(_screenSurface) { reset(); @@ -56,7 +56,7 @@ Globals::Globals(): _gfxColours.foreground = 18; _fontColours.background = 51; _fontColours.foreground = 54; - + _screenSurface.setScreenSurface(); _gfxManagers.push_back(&_gfxManagerInstance); diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index b102fdf913..59afe140a0 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/globals.h $ - * $Id: globals.h 229 2011-02-12 06:50:14Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -35,7 +35,7 @@ namespace tSage { -class Globals: public SavedObject { +class Globals : public SavedObject { public: GfxSurface _screenSurface; GfxManager _gfxManagerInstance; diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index 12ccabd6a5..641e10b3e9 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/graphics.cpp $ - * $Id: graphics.cpp 225 2011-02-10 11:00:11Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -115,7 +115,7 @@ GfxSurface surfaceFromRes(const byte *imgData) { assert(width == 0); } } - + s.unlockSurface(); return s; } @@ -220,7 +220,7 @@ void Rect::synchronise(Serialiser &s) { /*--------------------------------------------------------------------------*/ -GfxSurface::GfxSurface(): _bounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) { +GfxSurface::GfxSurface() : _bounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) { _disableUpdates = false; _screenSurface = false; _lockSurfaceCtr = 0; @@ -276,7 +276,7 @@ Graphics::Surface GfxSurface::lockSurface() { src = _customSurface; assert(src); - // Setup the returned surface either as one pointing to the same pixels as the source, or + // Setup the returned surface either as one pointing to the same pixels as the source, or // as a subset of the source one based on the currently set bounds Graphics::Surface result; result.w = _bounds.width(); @@ -425,7 +425,7 @@ static int *scaleLine(int size, int srcSize) { distCtr -= 100; } } - + return v; } @@ -481,13 +481,13 @@ void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Regi srcImage.create(srcBounds.width(), srcBounds.height()); Graphics::Surface destSurface = srcImage.lockSurface(); - + const byte *srcP = (const byte *)srcSurface.getBasePtr(srcBounds.left, srcBounds.top); byte *destP = (byte *)destSurface.pixels; for (int yp = srcBounds.top; yp < srcBounds.bottom; ++yp, srcP += srcSurface.pitch, destP += destSurface.pitch) { Common::copy(srcP, srcP + srcBounds.width(), destP); } - + srcImage.unlockSurface(); src.unlockSurface(); } @@ -578,11 +578,11 @@ void GfxElement::setDefaults() { * Highlights the specified graphics element */ void GfxElement::highlight() { - // Get a lock on the surface + // Get a lock on the surface GfxManager &gfxManager = _globals->gfxManager(); Graphics::Surface surface = gfxManager.lockSurface(); - // Scan through the contents of the element, switching any occurances of the foreground + // Scan through the contents of the element, switching any occurances of the foreground // colour with the background colour and vice versa Rect tempRect(_bounds); tempRect.collapse(2, 2); @@ -684,7 +684,7 @@ bool GfxElement::focusedEvent(Event &event) { /*--------------------------------------------------------------------------*/ -GfxImage::GfxImage(): GfxElement() { +GfxImage::GfxImage() : GfxElement() { _resNum = 0; _rlbNum = 0; _cursorNum = 0; @@ -705,7 +705,7 @@ void GfxImage::setDefaults() { byte *imgData = _vm->_dataManager->getSubResource(_resNum, _rlbNum, _cursorNum, &size); _surface = surfaceFromRes(imgData); DEALLOCATE(imgData); - + // Set up the display bounds Rect imgBounds = _surface.getBounds(); imgBounds.moveTo(_bounds.left, _bounds.top); @@ -716,12 +716,12 @@ void GfxImage::draw() { Rect tempRect = _bounds; tempRect.translate(_globals->gfxManager()._topLeft.x, _globals->gfxManager()._topLeft.y); - _globals->gfxManager().copyFrom(_surface, tempRect); + _globals->gfxManager().copyFrom(_surface, tempRect); } /*--------------------------------------------------------------------------*/ -GfxMessage::GfxMessage(): GfxElement() { +GfxMessage::GfxMessage() : GfxElement() { _textAlign = ALIGN_LEFT; _width = 0; } @@ -743,7 +743,7 @@ void GfxMessage::setDefaults() { gfxManager._font.setFontNumber(this->_fontNumber); gfxManager.getStringBounds(_message.c_str(), tempRect, _width); - + tempRect.collapse(-1, -1); tempRect.moveTo(_bounds.left, _bounds.top); _bounds = tempRect; @@ -906,14 +906,14 @@ void GfxDialog::draw() { _gfxManager.deactivate(); } -void GfxDialog::add(GfxElement *element) { - _elements.push_back(element); +void GfxDialog::add(GfxElement *element) { + _elements.push_back(element); element->_owner = this; } void GfxDialog::addElements(GfxElement *ge, ...) { va_list va; - va_start(va, ge); + va_start(va, ge); GfxElement *gfxElement = ge; while (gfxElement) { add(gfxElement); @@ -994,13 +994,13 @@ void GfxDialog::setPalette() { /*--------------------------------------------------------------------------*/ -GfxManager::GfxManager(): _surface(_globals->_screenSurface), _oldManager(NULL) { +GfxManager::GfxManager() : _surface(_globals->_screenSurface), _oldManager(NULL) { _font.setOwner(this); _font._fillFlag = false; _bounds = Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); } -GfxManager::GfxManager(GfxSurface &s): _surface(s), _oldManager(NULL) { +GfxManager::GfxManager(GfxSurface &s) : _surface(s), _oldManager(NULL) { _font.setOwner(this); _font._fillFlag = false; } @@ -1037,7 +1037,7 @@ int GfxManager::getStringWidth(const char *s) { } void GfxManager::getStringBounds(const char *s, Rect &bounds, int maxWidth) { - _font.getStringBounds(s, bounds, maxWidth); + _font.getStringBounds(s, bounds, maxWidth); } void GfxManager::fillArea(int xp, int yp, int colour) { @@ -1121,7 +1121,7 @@ void GfxFont::setFontNumber(uint32 fontNumber) { DEALLOCATE(_fontData); _fontNumber = fontNumber; - + _fontData = _vm->_tSageManager->getResource(RES_FONT, _fontNumber, 0, true); if (!_fontData) _fontData = _vm->_dataManager->getResource(RES_FONT, _fontNumber, 0); @@ -1204,11 +1204,11 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) { } break; } - + ++numChars; - } + } - int totalChars = s - sStart; + int totalChars = s - sStart; if (nextChar == '\0') --s; if ((nextChar == ' ') || (nextChar == '\r') || (nextChar == '\0')) @@ -1218,7 +1218,7 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) { } /** - * Fills out the passed rect with the dimensions of a given string word-wrapped to a + * Fills out the passed rect with the dimensions of a given string word-wrapped to a * maximum specified width * * @s Message to be analysed diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h index e1527bdbcb..0ad76772b3 100644 --- a/engines/tsage/graphics.h +++ b/engines/tsage/graphics.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/graphics.h $ - * $Id: graphics.h 184 2011-02-03 11:31:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -41,10 +41,10 @@ class Region; /** * Extended Rect class with extra support methods */ -class Rect: public Common::Rect, public Serialisable { +class Rect : public Common::Rect, public Serialisable { public: - Rect(): Common::Rect() {}; - Rect(int16 x1, int16 y1, int16 x2, int16 y2): Common::Rect(x1, y1, x2, y2) {}; + Rect() : Common::Rect() {}; + Rect(int16 x1, int16 y1, int16 x2, int16 y2) : Common::Rect(x1, y1, x2, y2) {}; void set(int16 x1, int16 y1, int16 x2, int16 y2); void collapse(int dx, int dy); @@ -63,13 +63,13 @@ public: uint8 foreground; uint8 background; - GfxColours(): foreground(0), background(0) {}; + GfxColours() : foreground(0), background(0) {}; }; class LineSlice { public: int xs, xe; - + LineSlice() { xs = 0; xe = 0; } LineSlice(int xStart, int xEnd) { xs = xStart; xe = xEnd; } }; @@ -195,7 +195,7 @@ public: virtual bool focusedEvent(Event &event); }; -class GfxImage: public GfxElement { +class GfxImage : public GfxElement { public: GfxSurface _surface; int _resNum; @@ -211,7 +211,7 @@ public: virtual bool process(Event &event) { return false; } }; -class GfxMessage: public GfxElement { +class GfxMessage : public GfxElement { public: Common::String _message; TextAlign _textAlign; @@ -226,13 +226,13 @@ public: virtual void draw(); }; -class GfxButton: public GfxElement { +class GfxButton : public GfxElement { private: void setFocus(); public: Common::String _message; public: - GfxButton(): GfxElement() {}; + GfxButton() : GfxElement() {}; virtual ~GfxButton() {} void setText(const Common::String &s) { @@ -270,7 +270,7 @@ public: void getStringBounds(const char *s, Rect &bounds, int maxWidth); void setDialogPalette(); - Graphics::Surface lockSurface() { + Graphics::Surface lockSurface() { _surface.setBounds(_bounds); return _surface.lockSurface(); } @@ -312,7 +312,7 @@ public: typedef Common::List<GfxElement *> GfxElementList; -class GfxDialog: public GfxElement { +class GfxDialog : public GfxElement { public: GfxManager _gfxManager; GfxElementList _elements; @@ -326,9 +326,9 @@ public: void addElements(GfxElement *ge, ...); void setTopLeft(int xp, int yp); void setCentre(int xp, int yp); - void frame() { + void frame() { setDefaults(); - _bounds.collapse(6, 6); + _bounds.collapse(6, 6); } GfxButton *execute(GfxButton *defaultButton = NULL); diff --git a/engines/tsage/resources.cpp b/engines/tsage/resources.cpp index 2e75c19872..c87c3eaf1e 100644 --- a/engines/tsage/resources.cpp +++ b/engines/tsage/resources.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/resources.cpp $ - * $Id: resources.cpp 145 2011-01-08 11:41:39Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -48,11 +48,11 @@ MemoryManager::~MemoryManager() { uint16 MemoryManager::allocate(uint32 size) { int idx = 0; - while ((idx < MEMORY_POOL_SIZE) && (_memoryPool[idx] != NULL)) + while ((idx < MEMORY_POOL_SIZE) && (_memoryPool[idx] != NULL)) ++idx; if (idx == MEMORY_POOL_SIZE) error("Out of memory handles"); - + // Create the new entry _memoryPool[idx] = (MemoryHeader *)malloc(sizeof(MemoryHeader) + size); _memoryPool[idx]->id = MEMORY_ENTRY_ID; @@ -134,7 +134,7 @@ uint16 BitReader::readToken() { /*-------------------------------------------------------------------------*/ -RlbManager::RlbManager(MemoryManager &memManager, const Common::String filename): +RlbManager::RlbManager(MemoryManager &memManager, const Common::String filename) : _memoryManager(memManager) { // If the resource strings list isn't yet loaded, load them @@ -233,7 +233,7 @@ byte *RlbManager::getResource(uint16 id, bool suppressErrors) { byte *dataOut = _memoryManager.allocate2(re->uncompressedSize); byte *destP = dataOut; uint bytesWritten = 0; - + uint16 ctrCurrent = 0x102, ctrMax = 0x200; uint16 word_48050 = 0, currentToken = 0, word_48054 =0; byte byte_49068 = 0, byte_49069 = 0; @@ -242,7 +242,7 @@ byte *RlbManager::getResource(uint16 id, bool suppressErrors) { for (;;) { // Get the next decode token - uint16 token = bitReader.readToken(); + uint16 token = bitReader.readToken(); // Handle the token if (token == 0x101) { @@ -297,7 +297,7 @@ byte *RlbManager::getResource(uint16 id, bool suppressErrors) { ctrMax <<= 1; } } - } + } assert(bytesWritten == re->uncompressedSize); delete compStream; @@ -331,7 +331,7 @@ void RlbManager::loadIndex() { // Get the single resource from it const byte *pData = getResource(0); const byte *p = pData; - + _sections.clear(); // Loop through reading the entries @@ -379,7 +379,7 @@ byte *RlbManager::getSubResource(int resNum, int rlbNum, int index, uint *size) int numEntries = READ_LE_UINT16(dataIn); uint32 entryOffset = READ_LE_UINT32(dataIn + 2 + (index - 1) * 4); - uint32 nextOffset = (index == numEntries) ? + uint32 nextOffset = (index == numEntries) ? _memoryManager.getSize(dataIn) : READ_LE_UINT32(dataIn + 2 + index * 4); *size = nextOffset - entryOffset; assert(*size < (1024 * 1024)); @@ -399,7 +399,7 @@ Common::String RlbManager::getMessage(int resNum, int lineNum) { assert(msgData); const char *srcP = (const char *)msgData; - while (lineNum-- > 0) + while (lineNum-- > 0) srcP += strlen(srcP) + 1; Common::String result(srcP); diff --git a/engines/tsage/resources.h b/engines/tsage/resources.h index 1aa9affe65..1af1bb8d2f 100644 --- a/engines/tsage/resources.h +++ b/engines/tsage/resources.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/resources.h $ - * $Id: resources.h 145 2011-01-08 11:41:39Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -106,7 +106,7 @@ public: typedef Common::List<ResourceEntry> ResourceList; -class SectionList: public Common::List<SectionEntry> { +class SectionList : public Common::List<SectionEntry> { public: uint32 fileOffset; @@ -138,8 +138,8 @@ private: uint8 _remainder, _bitsLeft; byte readByte() { return _stream.eos() ? 0 : _stream.readByte(); } public: - BitReader(Common::ReadStream &s): _stream(s) { - numBits = 9; + BitReader(Common::ReadStream &s) : _stream(s) { + numBits = 9; _remainder = 0; _bitsLeft = 0; } diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp index c9f866bb10..32f62bea76 100644 --- a/engines/tsage/ringworld_logic.cpp +++ b/engines/tsage/ringworld_logic.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.cpp $ - * $Id: scene_logic.cpp 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -423,7 +423,7 @@ void SpeakerOR::setText(const Common::String &msg) { /*--------------------------------------------------------------------------*/ -SpeakerOText::SpeakerOText(): SpeakerGText() { +SpeakerOText::SpeakerOText() : SpeakerGText() { _speakerName = "OTEXT"; _textWidth = 240; _textPos = Common::Point(130, 10); @@ -433,7 +433,7 @@ SpeakerOText::SpeakerOText(): SpeakerGText() { /*--------------------------------------------------------------------------*/ -SpeakerQText::SpeakerQText(): ScreenSpeaker() { +SpeakerQText::SpeakerQText() : ScreenSpeaker() { _speakerName = "QTEXT"; _textPos = Common::Point(160, 40); _colour1 = 35; @@ -444,7 +444,7 @@ SpeakerQText::SpeakerQText(): ScreenSpeaker() { /*--------------------------------------------------------------------------*/ -SpeakerSText::SpeakerSText(): ScreenSpeaker() { +SpeakerSText::SpeakerSText() : ScreenSpeaker() { _speakerName = "STEXT"; _colour1 = 13; _textWidth = 240; @@ -454,7 +454,7 @@ SpeakerSText::SpeakerSText(): ScreenSpeaker() { /*--------------------------------------------------------------------------*/ -SpeakerPOText::SpeakerPOText(): ScreenSpeaker() { +SpeakerPOText::SpeakerPOText() : ScreenSpeaker() { _speakerName = "POTEXT"; _textWidth = 240; _textMode = ALIGN_CENTRE; @@ -512,7 +512,7 @@ SpeakerHText::SpeakerHText() { /*--------------------------------------------------------------------------*/ -SpeakerSKText::SpeakerSKText(): ScreenSpeaker() { +SpeakerSKText::SpeakerSKText() : ScreenSpeaker() { _speakerName = "SKTEXT"; _textWidth = 240; _textMode = ALIGN_CENTRE; @@ -571,7 +571,7 @@ SpeakerBatText::SpeakerBatText() { /*--------------------------------------------------------------------------*/ -SpeakerSKL::SpeakerSKL(): AnimatedSpeaker() { +SpeakerSKL::SpeakerSKL() : AnimatedSpeaker() { _speakerName = "SKL"; _newSceneNumber = 7011; _textPos = Common::Point(10, 30); @@ -602,7 +602,7 @@ void SpeakerSKL::setText(const Common::String &msg) { /*--------------------------------------------------------------------------*/ -SpeakerQL::SpeakerQL(): AnimatedSpeaker() { +SpeakerQL::SpeakerQL() : AnimatedSpeaker() { _speakerName = "QL"; _newSceneNumber = 2610; _textPos = Common::Point(160, 30); diff --git a/engines/tsage/ringworld_logic.h b/engines/tsage/ringworld_logic.h index fd3264e403..66c7bff912 100644 --- a/engines/tsage/ringworld_logic.h +++ b/engines/tsage/ringworld_logic.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.h $ - * $Id: scene_logic.h 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -52,33 +52,33 @@ public: static Scene *createScene(int sceneNumber); }; -class DisplayHotspot: public SceneObject { +class DisplayHotspot : public SceneObject { private: Common::Array<int> _actions; bool performAction(int action); public: DisplayHotspot(int regionId, ...); - virtual void doAction(int action) { + virtual void doAction(int action) { if (!performAction(action)) SceneHotspot::doAction(action); } }; -class DisplayObject: public SceneObject { +class DisplayObject : public SceneObject { private: Common::Array<int> _actions; bool performAction(int action); public: DisplayObject(int firstAction, ...); - virtual void doAction(int action) { + virtual void doAction(int action) { if (!performAction(action)) SceneHotspot::doAction(action); } }; -class SceneArea: public SavedObject { +class SceneArea : public SavedObject { public: GfxSurface _surface; GfxSurface *_savedArea; @@ -105,7 +105,7 @@ public: /*--------------------------------------------------------------------------*/ // Ringworld specific game speakers -class SpeakerGText: public Speaker { +class SpeakerGText : public Speaker { public: SceneObject _sceneObject; public: @@ -114,10 +114,10 @@ public: virtual Common::String getClassName() { return "SpeakerGText"; } virtual void setText(const Common::String &msg); virtual void removeText(); -}; +}; -class SpeakerPOR: public AnimatedSpeaker { - class SpeakerAction1: public SpeakerAction { +class SpeakerPOR : public AnimatedSpeaker { + class SpeakerAction1 : public SpeakerAction { public: virtual void signal(); }; @@ -129,121 +129,121 @@ public: SpeakerPOR(); virtual Common::String getClassName() { return "SpeakerPOR"; } virtual void setText(const Common::String &msg); -}; +}; -class SpeakerOR: public AnimatedSpeaker { +class SpeakerOR : public AnimatedSpeaker { public: SpeakerOR(); virtual Common::String getClassName() { return "SpeakerOR"; } virtual void setText(const Common::String &msg); -}; +}; -class SpeakerOText: public SpeakerGText { +class SpeakerOText : public SpeakerGText { public: SpeakerOText(); virtual Common::String getClassName() { return "SpeakerOText"; } -}; +}; -class SpeakerPOText: public ScreenSpeaker { +class SpeakerPOText : public ScreenSpeaker { public: SpeakerPOText(); virtual Common::String getClassName() { return "SpeakerPOText"; } }; -class SpeakerSText: public ScreenSpeaker { +class SpeakerSText : public ScreenSpeaker { public: SpeakerSText(); virtual Common::String getClassName() { return "SpeakerSText"; } }; -class SpeakerQText: public ScreenSpeaker { +class SpeakerQText : public ScreenSpeaker { public: SpeakerQText(); virtual Common::String getClassName() { return "SpeakerQText"; } }; -class SpeakerMText: public ScreenSpeaker { +class SpeakerMText : public ScreenSpeaker { public: SpeakerMText(); virtual Common::String getClassName() { return "SpeakerMText"; } }; -class SpeakerCText: public ScreenSpeaker { +class SpeakerCText : public ScreenSpeaker { public: SpeakerCText(); virtual Common::String getClassName() { return "SpeakerCText"; } }; -class SpeakerEText: public ScreenSpeaker { +class SpeakerEText : public ScreenSpeaker { public: SpeakerEText(); virtual Common::String getClassName() { return "SpeakerEText"; } }; -class SpeakerGR: public AnimatedSpeaker { +class SpeakerGR : public AnimatedSpeaker { public: SpeakerGR(); virtual Common::String getClassName() { return "SpeakerGR"; } -}; +}; -class SpeakerHText: public ScreenSpeaker { +class SpeakerHText : public ScreenSpeaker { public: SpeakerHText(); virtual Common::String getClassName() { return "SpeakerHText"; } }; -class SpeakerPText: public ScreenSpeaker { +class SpeakerPText : public ScreenSpeaker { public: SpeakerPText(); virtual Common::String getClassName() { return "SpeakerPText"; } }; -class SpeakerCHFText: public ScreenSpeaker { +class SpeakerCHFText : public ScreenSpeaker { public: SpeakerCHFText(); virtual Common::String getClassName() { return "SpeakerCHFText"; } }; -class SpeakerSKText: public ScreenSpeaker { +class SpeakerSKText : public ScreenSpeaker { public: SpeakerSKText(); virtual Common::String getClassName() { return "SpeakerSKText"; } }; -class SpeakerCDRText: public ScreenSpeaker { +class SpeakerCDRText : public ScreenSpeaker { public: SpeakerCDRText(); virtual Common::String getClassName() { return "SpeakerCDRText"; } }; -class SpeakerFLText: public ScreenSpeaker { +class SpeakerFLText : public ScreenSpeaker { public: SpeakerFLText(); virtual Common::String getClassName() { return "SpeakerFLText"; } }; -class SpeakerBatText: public ScreenSpeaker { +class SpeakerBatText : public ScreenSpeaker { public: SpeakerBatText(); virtual Common::String getClassName() { return "SpeakerFLText"; } }; -class SpeakerQR: public AnimatedSpeaker { +class SpeakerQR : public AnimatedSpeaker { public: SpeakerQR(); @@ -251,7 +251,7 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerQU: public AnimatedSpeaker { +class SpeakerQU : public AnimatedSpeaker { public: SpeakerQU(); @@ -259,7 +259,7 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerSKL: public AnimatedSpeaker { +class SpeakerSKL : public AnimatedSpeaker { public: SpeakerSKL(); @@ -267,7 +267,7 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerQL: public AnimatedSpeaker { +class SpeakerQL : public AnimatedSpeaker { public: SpeakerQL(); @@ -275,7 +275,7 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerSR: public AnimatedSpeaker { +class SpeakerSR : public AnimatedSpeaker { public: SceneObject _object3; public: @@ -285,7 +285,7 @@ public: void setText(const Common::String &msg); }; -class SpeakerSL: public AnimatedSpeaker { +class SpeakerSL : public AnimatedSpeaker { public: SpeakerSL(); @@ -293,7 +293,7 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerCR: public AnimatedSpeaker { +class SpeakerCR : public AnimatedSpeaker { public: SpeakerCR(); @@ -301,7 +301,7 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerMR: public AnimatedSpeaker { +class SpeakerMR : public AnimatedSpeaker { public: SpeakerMR(); @@ -309,39 +309,39 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerSAL: public AnimatedSpeaker { +class SpeakerSAL : public AnimatedSpeaker { public: SpeakerSAL(); virtual Common::String getClassName() { return "SpeakerSAL"; } virtual void setText(const Common::String &msg); -}; +}; -class SpeakerML: public AnimatedSpeaker { +class SpeakerML : public AnimatedSpeaker { public: SpeakerML(); virtual Common::String getClassName() { return "SpeakerML"; } virtual void setText(const Common::String &msg); -}; +}; -class SpeakerCHFL: public AnimatedSpeaker { +class SpeakerCHFL : public AnimatedSpeaker { public: SpeakerCHFL(); virtual Common::String getClassName() { return "SpeakerCHFL"; } virtual void setText(const Common::String &msg); -}; +}; -class SpeakerCHFR: public AnimatedSpeaker { +class SpeakerCHFR : public AnimatedSpeaker { public: SpeakerCHFR(); virtual Common::String getClassName() { return "SpeakerCHFR"; } virtual void setText(const Common::String &msg); -}; +}; -class SpeakerPL: public AnimatedSpeaker { +class SpeakerPL : public AnimatedSpeaker { public: SceneObject _object3; SpeakerAction _speakerAction2; @@ -351,9 +351,9 @@ public: virtual Common::String getClassName() { return "SpeakerPL"; } virtual void setText(const Common::String &msg); virtual void removeText(); -}; +}; -class SpeakerPR: public AnimatedSpeaker { +class SpeakerPR : public AnimatedSpeaker { public: SceneObject _object3; SpeakerAction _speakerAction2; @@ -363,17 +363,17 @@ public: virtual Common::String getClassName() { return "SpeakerPR"; } virtual void setText(const Common::String &msg); virtual void removeText(); -}; +}; -class SpeakerCDR: public AnimatedSpeaker { +class SpeakerCDR : public AnimatedSpeaker { public: SpeakerCDR(); virtual Common::String getClassName() { return "SpeakerCDR"; } virtual void setText(const Common::String &msg); -}; +}; -class SpeakerCDL: public AnimatedSpeaker { +class SpeakerCDL : public AnimatedSpeaker { public: SpeakerCDL(); @@ -381,7 +381,7 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerFLL: public AnimatedSpeaker { +class SpeakerFLL : public AnimatedSpeaker { public: SpeakerFLL(); @@ -389,7 +389,7 @@ public: virtual void setText(const Common::String &msg); }; -class SpeakerBatR: public AnimatedSpeaker { +class SpeakerBatR : public AnimatedSpeaker { public: SpeakerBatR(); diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp index 46fbe7736b..4497d6af75 100644 --- a/engines/tsage/ringworld_scenes1.cpp +++ b/engines/tsage/ringworld_scenes1.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.cpp $ - * $Id: scene_logic.cpp 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -67,7 +67,7 @@ void Scene10::Action1::signal() { scene->_object2.setFrame(1); scene->_object2.setPosition(Common::Point(240, 51)); scene->_object2.show(); - + scene->_object3.setStrip(6); scene->_object3.setFrame(1); scene->_object3.setPosition(Common::Point(200, 76)); @@ -130,7 +130,7 @@ void Scene10::Action2::signal() { void Scene10::postInit(SceneObjectList *OwnerList) { loadScene(10); setZoomPercents(0, 100, 200, 100); - + _stripManager.addSpeaker(&_speakerSText); _stripManager.addSpeaker(&_speakerQText); _speakerSText._speakerName = "STEXT"; @@ -242,7 +242,7 @@ void Scene15::Action1::signal() { SceneItem::display(0, 0); _globals->_sceneManager.changeScene(20); break; - } + } } void Scene15::Action1::dispatch() { @@ -299,7 +299,7 @@ void Scene20::Action2::signal() { setDelay(10); break; case 1: - SceneItem::display(20, 1, SET_WIDTH, 200, SET_Y, 20, SET_X, 160, SET_KEEP_ONSCREEN, true, + SceneItem::display(20, 1, SET_WIDTH, 200, SET_Y, 20, SET_X, 160, SET_KEEP_ONSCREEN, true, SET_EXT_BGCOLOUR, 4, LIST_END); setDelay(120); break; @@ -472,7 +472,7 @@ void Scene20::Action4::signal() { scene->_SceneObjectExt.setStrip(1); scene->_SceneObjectExt.setFrame(1); scene->_SceneObjectExt.animate(ANIM_MODE_5, NULL); - + scene->_SceneObjectExt._moveDiff.x = 4; NpcMover *mover1 = new NpcMover(); Common::Point pt(scene->_SceneObjectExt._position.x - 12, scene->_SceneObjectExt._position.y + 5); @@ -493,7 +493,7 @@ void Scene20::Action4::signal() { scene->_sound.startSound(42); scene->_SceneObjectExt.setStrip(2); scene->_SceneObjectExt.animate(ANIM_MODE_2, NULL); - + scene->_sceneObject5.remove(); _globals->_player.setVisage(21); _globals->_player.setStrip(1); @@ -543,7 +543,7 @@ void Scene20::postInit(SceneObjectList *OwnerList) { _SceneObjectExt.setVisage(20); _SceneObjectExt.setPosition(Common::Point(400, 69)); _SceneObjectExt.animate(ANIM_MODE_1, NULL); - + _sceneObject3.postInit(); _sceneObject3.setVisage(20); _sceneObject3.setPosition(Common::Point(395, 69)); @@ -571,7 +571,7 @@ void Scene20::postInit(SceneObjectList *OwnerList) { _speakerQText._textWidth = 260; _speakerGameText.setTextPos(Common::Point(350, 20)); _speakerGameText._textWidth = 260; - + _globals->_soundHandler.startSound(8); _sceneBounds = Rect(320, 0, 640, 200); } else { @@ -594,7 +594,7 @@ void Scene20::postInit(SceneObjectList *OwnerList) { _SceneObjectExt.setPosition(Common::Point(595, 79)); _SceneObjectExt.animate(ANIM_MODE_1, NULL); - if ((_globals->getFlag(120) && _globals->getFlag(116)) || + if ((_globals->getFlag(120) && _globals->getFlag(116)) || (_globals->getFlag(117) && _globals->getFlag(119))) { setAction(&_action3); } else if (_globals->getFlag(104)) { @@ -725,7 +725,7 @@ void Scene30::RingAction::signal() { Scene30 *scene = (Scene30 *)_globals->_sceneManager._scene; switch (_actionIndex++) { - case 0: { + case 0: { _globals->_player.disableControl(); scene->_kzin.setAction(NULL); NpcMover *mover = new NpcMover(); @@ -733,7 +733,7 @@ void Scene30::RingAction::signal() { _globals->_player.addMover(mover, &pt, this); break; } - + case 1: _globals->_player.checkAngle(&scene->_kzin); scene->_stripManager.start(32, this); @@ -831,14 +831,14 @@ void Scene30::KzinObject::doAction(int action) { scene->setAction(&scene->_talkAction); break; default: - SceneObject::doAction(action); + SceneObject::doAction(action); break; } } /*--------------------------------------------------------------------------*/ -Scene30::Scene30(): +Scene30::Scene30() : _groundHotspot(9, OBJECT_SCANNER, 50, 17, CURSOR_LOOK, 30, 3, CURSOR_USE, 30, 8, LIST_END), _wallsHotspot(8, OBJECT_SCANNER, 50, 13, CURSOR_LOOK, 30, 0, CURSOR_USE, 30, 7, LIST_END), _courtyardHotspot(0, CURSOR_LOOK, 30, 4, LIST_END), @@ -856,7 +856,7 @@ void Scene30::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_speakerQText); _speakerSText._npc = &_kzin; _speakerQText._npc = &_globals->_player; - + // Setup player _globals->_player.postInit(); @@ -885,7 +885,7 @@ void Scene30::postInit(SceneObjectList *OwnerList) { _courtyardHotspot.setBounds(Rect(0, 0, 320, 200)); // Add the objects and hotspots to the scene - _globals->_sceneItems.addItems(&_beam, &_wallsHotspot, &_door, &_treeHotspot, &_groundHotspot, + _globals->_sceneItems.addItems(&_beam, &_wallsHotspot, &_door, &_treeHotspot, &_groundHotspot, &_courtyardHotspot, NULL); // Load the scene data @@ -1179,7 +1179,7 @@ void Scene40::Action5::signal() { Scene40 *scene = (Scene40 *)_globals->_sceneManager._scene; switch (_actionIndex++) { - case 0: + case 0: setDelay(_globals->_randomSource.getRandomNumber(120)); break; case 1: @@ -1260,7 +1260,7 @@ void Scene40::Action8::signal() { break; case 1: _globals->_player.disableControl(); - + if ((_globals->_player._position.y >= 197) || (_globals->_player._visage)) { _actionIndex = 1; setDelay(30); @@ -1310,7 +1310,7 @@ void Scene40::DyingKzin::doAction(int action) { SceneItem::display2(40, 43); break; case CURSOR_CROSSHAIRS: - SceneItem::display2(40, 44); + SceneItem::display2(40, 44); break; case CURSOR_LOOK: SceneItem::display2(40, 12); @@ -1415,7 +1415,7 @@ void Scene40::Item6::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene40::Scene40(): +Scene40::Scene40() : _item1(2, OBJECT_SCANNER, 40, 24, CURSOR_CROSSHAIRS, 40, 25, CURSOR_LOOK, 40, 7, CURSOR_USE, 40, 16, LIST_END), _item3(5, OBJECT_SCANNER, 40, 26, CURSOR_CROSSHAIRS, 40, 27, CURSOR_LOOK, 40, 9, CURSOR_USE, 40, 17, LIST_END), _item4(6, OBJECT_SCANNER, 40, 31, CURSOR_CROSSHAIRS, 40, 32, CURSOR_LOOK, 40, 5, CURSOR_USE, 40, 33, LIST_END), @@ -1452,7 +1452,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) { if (_globals->_sceneManager._previousScene == 20) { _globals->_soundHandler.startSound(24); _globals->_player.setVisage(43); - + _object1.postInit(); _object1.setVisage(41); _object1.setPosition(Common::Point(105, 220)); @@ -1470,7 +1470,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) { _object3.setPosition(Common::Point(110, 186)); _object3._numFrames = 2; _object3.animate(ANIM_MODE_8, NULL, NULL); - + _assassin.postInit(); _assassin.setPosition(Common::Point(-40, 191)); _globals->_sceneItems.push_back(&_assassin); @@ -1488,7 +1488,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) { _doorway.setPosition(Common::Point(148, 74)); _doorway.setStrip(2); _doorway.setFrame(_doorway.getFrameCount()); - + _dyingKzin.postInit(); _dyingKzin.setVisage(40); _dyingKzin.setPosition(Common::Point(205, 183)); @@ -1517,8 +1517,8 @@ void Scene40::postInit(SceneObjectList *OwnerList) { _item5.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); _item6._sceneRegionId = 3; _item2._sceneRegionId = 7; - - _globals->_sceneItems.addItems(&_dyingKzin, &_item8, &_item1, &_item2, &_item3, &_item4, + + _globals->_sceneItems.addItems(&_dyingKzin, &_item8, &_item1, &_item2, &_item3, &_item4, &_item6, &_item7, &_item5, NULL); } @@ -1611,7 +1611,7 @@ void Scene50::Action3::signal() { remove(); break; } -} +} /*--------------------------------------------------------------------------*/ @@ -1623,7 +1623,7 @@ void Scene50::Object1::doAction(int action) { SceneItem::display2(50, 20); break; case OBJECT_SCANNER: - SceneItem::display2(50, 19); + SceneItem::display2(50, 19); break; case CURSOR_LOOK: SceneItem::display2(50, 4); @@ -1650,7 +1650,7 @@ void Scene50::Object2::doAction(int action) { SceneItem::display2(50, 11); break; case OBJECT_SCANNER: - SceneItem::display2(50, 10); + SceneItem::display2(50, 10); break; case CURSOR_LOOK: SceneItem::display2(50, 1); @@ -1674,7 +1674,7 @@ void Scene50::Object3::doAction(int action) { SceneItem::display2(50, 11); break; case OBJECT_SCANNER: - SceneItem::display2(50, 10); + SceneItem::display2(50, 10); break; case CURSOR_LOOK: SceneItem::display2(50, 1); @@ -1702,7 +1702,7 @@ void Scene50::Object4::doAction(int action) { SceneItem::display2(50, 11); break; case OBJECT_SCANNER: - SceneItem::display2(50, 10); + SceneItem::display2(50, 10); break; case CURSOR_LOOK: SceneItem::display2(50, 1); @@ -1722,7 +1722,7 @@ void Scene50::Object4::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene50::Scene50(): +Scene50::Scene50() : _item0(0, CURSOR_LOOK, 50, 3, LIST_END), _item1(0, OBJECT_SCANNER, 50, 15, CURSOR_USE, 50, 16, CURSOR_LOOK, 50, 3, LIST_END), _item2(0, CURSOR_LOOK, 50, 7, LIST_END), @@ -1738,7 +1738,7 @@ void Scene50::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_speakerQText); _stripManager.addSpeaker(&_speakerSText); - + _globals->_player.postInit(); _globals->_player.setVisage(0); _globals->_player.animate(ANIM_MODE_1, NULL); @@ -1940,7 +1940,7 @@ void Scene60::Action1::signal() { scene->_object8.setFrame(1); scene->_object8._state = 0; - + _globals->clearFlag(103); _globals->clearFlag(!_globals->_stripNum ? 116 : 119); break; @@ -2008,7 +2008,7 @@ void Scene60::Object3::doAction(int action) { } } else { SceneHotspot::doAction(action); - } + } } void Scene60::Object4::doAction(int action) { @@ -2040,7 +2040,7 @@ void Scene60::Object4::doAction(int action) { scene->_object8.setVisage(60); scene->_object8.setStrip(8); scene->_object8.setPosition(Common::Point(143, 105)); - + _globals->_sceneItems.push_front(&scene->_object8); _globals->_sceneItems.push_front(&scene->_slaveButton); @@ -2071,7 +2071,7 @@ void Scene60::Object4::doAction(int action) { scene->signal(); } else { SceneHotspot::doAction(action); - } + } } void Scene60::Object5::doAction(int action) { @@ -2084,7 +2084,7 @@ void Scene60::Object5::doAction(int action) { _globals->setFlag(83); } else { SceneHotspot::doAction(action); - } + } } void Scene60::Object6::doAction(int action) { @@ -2105,7 +2105,7 @@ void Scene60::Object6::doAction(int action) { } } else { SceneHotspot::doAction(action); - } + } } void Scene60::SlaveObject::doAction(int action) { @@ -2114,7 +2114,7 @@ void Scene60::SlaveObject::doAction(int action) { if (action == CURSOR_LOOK) { SceneItem::display2(60, 8); } else if (action == CURSOR_USE) { - if (scene->_object8._state) + if (scene->_object8._state) scene->_sceneMode = 19; else if (_state) { scene->_soundHandler3.proc3(); @@ -2135,7 +2135,7 @@ void Scene60::SlaveObject::doAction(int action) { setAction(&scene->_sequenceManager, scene, 62, NULL); } else { SceneHotspot::doAction(action); - } + } } void Scene60::Object8::doAction(int action) { @@ -2144,7 +2144,7 @@ void Scene60::Object8::doAction(int action) { if (action == CURSOR_LOOK) { SceneItem::display2(60, 7); } else if (action == CURSOR_USE) { - if (!scene->_object8._state) + if (!scene->_object8._state) scene->_sceneMode = 14; else if (_state) { scene->_soundHandler3.proc3(); @@ -2165,7 +2165,7 @@ void Scene60::Object8::doAction(int action) { setAction(&scene->_sequenceManager, scene, 62, NULL); } else { SceneHotspot::doAction(action); - } + } } void Scene60::Object9::doAction(int action) { @@ -2178,7 +2178,7 @@ void Scene60::Object9::doAction(int action) { scene->setAction(&scene->_action1); } else { SceneHotspot::doAction(action); - } + } } /*--------------------------------------------------------------------------*/ @@ -2241,7 +2241,7 @@ void Scene60::Item::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene60::Scene60(): +Scene60::Scene60() : _item2(0, 12, 12), _item3(8, 22, 23), _item4(9, 24, 25), @@ -2269,7 +2269,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) { _object8.setStrip(8); _object8.setPosition(Common::Point(143, 105)); _object8._state = 0; - + _globals->_sceneItems.push_back(&_object8); _globals->_sceneItems.push_back(&_slaveButton); @@ -2343,7 +2343,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) { _object10.setPosition(Common::Point(199, 186)); _object10.animate(ANIM_MODE_8, 0, NULL); _object10._numFrames = 5; - + _soundHandler1.startSound(35); if (!_globals->getFlag(83)) { @@ -2473,7 +2473,7 @@ void Scene90::Action1::signal() { _globals->_soundHandler.startSound(68); scene->_object3.animate(ANIM_MODE_6, NULL); - SceneItem::display(90, _globals->getFlag(104) ? 15 : 14, + SceneItem::display(90, _globals->getFlag(104) ? 15 : 14, SET_EXT_BGCOLOUR, 13, SET_KEEP_ONSCREEN, -1, SET_X, 120, SET_Y, 20, LIST_END); break; case 12: @@ -2537,7 +2537,7 @@ void Scene90::Object2::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene90::Scene90(): +Scene90::Scene90() : _item1(0, CURSOR_LOOK, 90, 9, LIST_END), _item2(0, CURSOR_LOOK, 90, 10, LIST_END), _item3(0, CURSOR_LOOK, 90, 11, LIST_END), @@ -2613,7 +2613,7 @@ void Scene90::postInit(SceneObjectList *OwnerList) { _object3.setPosition(Common::Point(196, 181)); _object3.setPriority2(175); _globals->_sceneItems.push_back(&_object3); - + _globals->_player.disableControl(); _globals->_soundHandler.startSound(55); _soundHandler1.startSound(52); @@ -2691,7 +2691,7 @@ void Scene95::Action1::signal() { } case 3: { scene->_soundHandler.startSound(21); - + Common::Point pt1(235, 72); PlayerMover *mover1 = new PlayerMover(); _globals->_player.addMover(mover1, &pt1, NULL); @@ -2787,7 +2787,7 @@ void Scene95::postInit(SceneObjectList *OwnerList) { _object3.postInit(); _object3.setVisage(96); _object3.setPosition(Common::Point(29, 198)); - + _soundHandler.startSound(67); setAction(&_action1); } @@ -2938,16 +2938,16 @@ void Scene6100::Action5::dispatch() { if (tempSet._float2 < 0) { scene->_objList[idx]->_position.y = 300; - + if (idx != 3) { - scene->_objList[idx]->_floats._float1 = + scene->_objList[idx]->_floats._float1 = _globals->_randomSource.getRandomNumber(199); scene->_objList[idx]->_floats._float2 = _globals->_randomSource.getRandomNumber(999) + 750.0; scene->_objList[idx]->_floats.proc1( -(scene->_turnAmount * 10 + scene->_angle) * MULTIPLY_FACTOR); - scene->_objList[idx]->_floats.add(scene->_probe._floats._float1, + scene->_objList[idx]->_floats.add(scene->_probe._floats._float1, scene->_probe._floats._float2, scene->_probe._floats._float3); } } @@ -3028,7 +3028,7 @@ void Scene6100::GetBoxAction::signal() { scene->showMessage(NULL, 0, NULL); _globals->_sceneManager.changeScene(2320); remove(); - } + } } void Scene6100::GetBoxAction::dispatch() { @@ -3039,7 +3039,7 @@ void Scene6100::GetBoxAction::dispatch() { scene->_speed = 0; scene->_getBoxAction.signal(); } - + if (scene->_probe._percent > 4) // Handle the probe disappearing into the rocks scene->_probe._percent = scene->_probe._percent * 7 / 8; @@ -3145,7 +3145,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) { _objList[1] = &_sunflower2; _objList[2] = &_sunflower3; _objList[3] = &_rocks; - + int baseVal = 2000; for (int idx = 0; idx < 3; ++idx) { _objList[idx]->_floats._float1 = _globals->_randomSource.getRandomNumber(999); @@ -3177,7 +3177,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) { if (!_globals->getFlag(76)) _probe.setAction(&_action4); - + _globals->_soundHandler.startSound(231); } @@ -3238,7 +3238,7 @@ void Scene6100::dispatch() { if (_rocksCheck && (_action == &_action5)) { // Check whether the probe is close enough to the rocks double distance = _probe._floats.sqrt(_rocks._floats); - + if ((distance >= 300.0) && (distance <= 500.0)) setAction(&_getBoxAction); } diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h index 89aa0a65c5..b567aeea2d 100644 --- a/engines/tsage/ringworld_scenes1.h +++ b/engines/tsage/ringworld_scenes1.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.h $ - * $Id: scene_logic.h 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -36,13 +36,13 @@ namespace tSage { -class Scene10: public Scene { +class Scene10 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; @@ -58,9 +58,9 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene15: public Scene { +class Scene15 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); virtual void dispatch(); @@ -73,21 +73,21 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene20: public Scene { +class Scene20 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; @@ -109,10 +109,10 @@ public: virtual void signal(); }; -class Scene30: public Scene { +class Scene30 : public Scene { /* Scene objects */ // Doorway beam sensor - class BeamObject: public SceneObject { + class BeamObject : public SceneObject { public: virtual void doAction(int action) { if (action == OBJECT_SCANNER) @@ -128,7 +128,7 @@ class Scene30: public Scene { }; // Doorway object - class DoorObject: public SceneObject { + class DoorObject : public SceneObject { public: virtual void doAction(int action) { if (action == OBJECT_SCANNER) @@ -143,25 +143,25 @@ class Scene30: public Scene { }; // Kzin object - class KzinObject: public SceneObject { + class KzinObject : public SceneObject { public: virtual void doAction(int action); }; /* Actions */ - class BeamAction: public Action { + class BeamAction : public Action { public: virtual void signal(); }; - class KzinAction: public Action { + class KzinAction : public Action { public: virtual void signal(); }; - class RingAction: public Action { + class RingAction : public Action { public: virtual void signal(); }; - class TalkAction: public Action { + class TalkAction : public Action { public: virtual void signal(); }; @@ -191,61 +191,61 @@ public: virtual void signal(); }; -class Scene40: public Scene { +class Scene40 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; - class Action7: public Action { + class Action7 : public Action { public: virtual void signal(); }; - class Action8: public Action { + class Action8 : public Action { public: virtual void signal(); }; /* Objects */ - class DyingKzin: public SceneObject { + class DyingKzin : public SceneObject { public: virtual void doAction(int action); }; - class Assassin: public SceneObject { + class Assassin : public SceneObject { public: virtual void doAction(int action); }; /* Items */ - class Item2: public SceneItem { + class Item2 : public SceneItem { public: virtual void doAction(int action); }; - class Item6: public SceneItem { + class Item6 : public SceneItem { public: virtual void doAction(int action); }; - class Item8: public SceneItem { + class Item8 : public SceneItem { public: virtual void doAction(int action); }; @@ -281,35 +281,35 @@ public: virtual void dispatch(); }; -class Scene50: public Scene { +class Scene50 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; /* Objects */ - class Object1: public SceneObject { + class Object1 : public SceneObject { public: virtual void doAction(int action); }; - class Object2: public SceneObject { + class Object2 : public SceneObject { public: virtual void doAction(int action); }; - class Object3: public SceneObject { + class Object3 : public SceneObject { public: virtual void doAction(int action); }; - class Object4: public SceneObject { + class Object4 : public SceneObject { public: virtual void doAction(int action); }; @@ -335,52 +335,52 @@ public: virtual void dispatch(); }; -class Scene60: public Scene { - class Action1: public Action { +class Scene60 : public Scene { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Object2: public SceneObject { + class Object2 : public SceneObject { public: virtual void doAction(int action); }; - class Object3: public SceneObject { + class Object3 : public SceneObject { public: virtual void doAction(int action); }; - class Object4: public SceneObject { + class Object4 : public SceneObject { public: virtual void doAction(int action); }; - class Object5: public SceneObject { + class Object5 : public SceneObject { public: virtual void doAction(int action); }; - class Object6: public SceneObject { + class Object6 : public SceneObject { public: virtual void doAction(int action); }; - class SlaveObject: public SceneObjectExt { + class SlaveObject : public SceneObjectExt { public: virtual void doAction(int action); }; - class Object8: public SceneObjectExt { + class Object8 : public SceneObjectExt { public: virtual void doAction(int action); }; - class Object9: public SceneObject { + class Object9 : public SceneObject { public: virtual void doAction(int action); }; - class Item1: public SceneHotspot { + class Item1 : public SceneHotspot { public: virtual void doAction(int action); }; - class Item: public SceneHotspot { + class Item : public SceneHotspot { public: int _messageNum, _sceneMode; @@ -421,16 +421,16 @@ public: virtual void process(Event &event); }; -class Scene90: public Scene { - class Action1: public Action { +class Scene90 : public Scene { + class Action1 : public Action { public: virtual void signal(); }; - class Object1: public SceneObject { + class Object1 : public SceneObject { public: virtual void doAction(int action); }; - class Object2: public SceneObject { + class Object2 : public SceneObject { public: virtual void doAction(int action); }; @@ -456,8 +456,8 @@ public: virtual void signal(); }; -class Scene95: public Scene { - class Action1: public ActionExt { +class Scene95 : public Scene { + class Action1 : public ActionExt { public: virtual void signal(); }; @@ -472,50 +472,50 @@ public: virtual void postInit(SceneObjectList *OwnerList); }; -class Scene6100: public Scene { +class Scene6100 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void dispatch(); }; - class GetBoxAction: public Action { + class GetBoxAction : public Action { public: virtual void signal(); virtual void dispatch(); }; - class Action7: public Action { + class Action7 : public Action { public: virtual void signal(); }; /* Objects */ - class Object: public SceneObject { + class Object : public SceneObject { public: FloatSet _floats; }; - class ProbeMover: public NpcMover { + class ProbeMover : public NpcMover { public: virtual void dispatch(); }; /* Items */ - class Item1: public SceneItem { + class Item1 : public SceneItem { public: virtual void doAction(int action); }; diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp index 34a222a627..30a0ffd34e 100644 --- a/engines/tsage/ringworld_scenes10.cpp +++ b/engines/tsage/ringworld_scenes10.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.cpp $ - * $Id: scene_logic.cpp 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -47,7 +47,7 @@ void Object9350::draw() { destRect.translate(-_globals->_sceneOffset.x, -_globals->_sceneOffset.y); Region *priorityRegion = _globals->_sceneManager._scene->_priorities.find(_globals->_sceneManager._scene->_stripManager._stripNum); GfxSurface frame = getFrame(); - _globals->gfxManager().copyFrom(frame, destRect, priorityRegion); + _globals->gfxManager().copyFrom(frame, destRect, priorityRegion); } /*-------------------------------------------------------------------------- @@ -74,7 +74,7 @@ void Scene9100::SceneHotspot1::doAction(int action) { void Scene9100::dispatch() { Scene9100 *scene = (Scene9100 *)_globals->_sceneManager._scene; - + if (!_action) { if (_globals->_player._position.x < 25) { if (!_globals->getFlag(11)) { @@ -186,7 +186,7 @@ void Scene9150::Object3::signal() { case 0: _timer = 10 + _globals->_randomSource.getRandomNumber(90); break; - default: + default: animate(ANIM_MODE_5, this); _signalFlag = 0; break; @@ -227,7 +227,7 @@ void Scene9150::dispatch() { _sceneHotspot3.setAction(&_sequenceManager2, 0, 9154, &_object3, 0); _sceneHotspot10.remove(); } - + if (_action) { _action->dispatch(); } else { @@ -386,7 +386,7 @@ void Scene9200::dispatch() { _globals->_player.disableControl(); _sceneState = 9207; setAction(&_sequenceManager, this, 9207, &_globals->_player, &_object2, &_object3, 0); - } + } } } } @@ -849,7 +849,7 @@ void Scene9450::Hotspot1::doAction(int action) { void Scene9450::Hotspot3::doAction(int action) { Scene9450 *scene = (Scene9450 *)_globals->_sceneManager._scene; - + switch (action) { case OBJECT_CLOAK: case OBJECT_JACKET: @@ -1129,7 +1129,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) { _globals->_player.postInit(); _globals->_soundHandler.startSound(305, 0, 127); - + _candle.postInit(0); _candle.setVisage(9500); _candle.setStrip(1); @@ -1137,7 +1137,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) { _candle.setPosition(Common::Point(30, 105), 0); if (_globals->_inventory._candle._sceneNumber != 9500) _candle.setStrip(2); - + _object3.postInit(0); _object3.hide(); _object3.setPriority2(150); @@ -1174,7 +1174,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) { } else { _hotspot1.setup(105, 295, 134, 313, 9500, 9, 10); } - + _hotspot17.setup(101, 293, 135, 315, 9500, 9, 10); _hotspot3.setup(84, 12, 107, 47, 9500, 15, 15); _hotspot6.setup(93, 11, 167, 46, 9500, 0, 1); @@ -1184,7 +1184,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) { _hotspot5.setup(111, 68, 155, 244, 9500, 17, -1); _hotspot4.setup(57, 71, 120, 126, 9500, 16, -1); } - + _hotspot8.setup(60, 24, 90, 53, 9500, 4, 5); _hotspot9.setup(72, 143, 93, 163, 9500, 4, 5); _hotspot10.setup(70, 205, 92, 228, 9500, 4, 5); @@ -1197,10 +1197,10 @@ void Scene9500::postInit(SceneObjectList *OwnerList) { _hotspot19.setup(101, 207, 120, 225, 9500, 9, 10); _hotspot18.setup(98, 144, 117, 162, 9500, 9, 10); _hotspot20.setup(102, 27, 132, 50, 9500, 9, 10); - + _globals->_events.setCursor(CURSOR_WALK); _globals->_player.disableControl(); - + if ((_globals->_sceneManager._previousScene == 9200) || (_globals->_sceneManager._previousScene != 9850)) { _sceneMode = 0; if (_globals->_inventory._helmet._sceneNumber != 1) { @@ -1297,7 +1297,7 @@ void Scene9750::signal() { _globals->_soundHandler.proc1(this); break; case 9752: - _globals->_sceneManager.changeScene(2100); + _globals->_sceneManager.changeScene(2100); default: break; } @@ -1311,7 +1311,7 @@ void Scene9750::postInit(SceneObjectList *OwnerList) { loadScene(9750); Scene::postInit(); setZoomPercents(0, 100, 200, 100); - + _globals->_player.postInit(); _object1.postInit(); _object1.hide(); @@ -1712,11 +1712,11 @@ void Scene9900::strAction2::signal() { _txtArray1[_txtArray1Index].setPriority2(255); int frameWidth = _txtArray1[_txtArray1Index].getFrame().getBounds().width(); int frameHeight = _txtArray1[_txtArray1Index].getFrame().getBounds().height(); - _txtArray1[_txtArray1Index].setPosition(Common::Point((320 - frameWidth) / 2, 200)); + _txtArray1[_txtArray1Index].setPosition(Common::Point((320 - frameWidth) / 2, 200)); NpcMover *mover2 = new NpcMover(); Common::Point pt2(_txtArray1[_txtArray1Index]._position.x, 100); _txtArray1[_txtArray1Index].addMover(mover2, &pt2, 0); - + _txtArray2[_txtArray1Index]._textMode = ALIGN_CENTRE; _txtArray2[_txtArray1Index]._width = 240; _txtArray2[_txtArray1Index]._fontNumber = 2; @@ -1966,7 +1966,7 @@ void Scene9900::postInit(SceneObjectList *OwnerList) { _globals->_inventory._items._rlbNum = 3; _globals->_inventory._items._cursorNum = 6; _globals->_inventory._items._description = Common::String("One of the items from the stasis ship. The other is on the Lance's bridge."); - + _stripManager.addSpeaker(&_speakerMR); _globals->_player.disableControl(); _sceneMode = 9910; @@ -2014,12 +2014,12 @@ void Scene9999::postInit(SceneObjectList *OwnerList) { loadScene(9998); Scene::postInit(); setZoomPercents(0, 100, 200, 100); - + _object1.postInit(); _object1.setVisage(1303); _object1.setStrip2(3); _object1.setPosition(Common::Point(160, 152), 0); - + _globals->_player.postInit(); _globals->_player.setVisage(1303); _globals->_player.setStrip2(1); diff --git a/engines/tsage/ringworld_scenes10.h b/engines/tsage/ringworld_scenes10.h index 4f70a23ede..a89456e39d 100644 --- a/engines/tsage/ringworld_scenes10.h +++ b/engines/tsage/ringworld_scenes10.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.h $ - * $Id: scene_logic.h 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -35,7 +35,7 @@ namespace tSage { -class SceneObject9150: public SceneObject { +class SceneObject9150 : public SceneObject { public: int _timer, _signalFlag; @@ -47,7 +47,7 @@ public: virtual Common::String getClassName() { return "SceneObject9150"; } }; -class Scene2: public Scene { +class Scene2 : public Scene { public : int _sceneState; @@ -58,15 +58,15 @@ public : } }; -class Object9350: public SceneObject { +class Object9350 : public SceneObject { public: virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void draw(); }; -class Scene9100: public Scene { +class Scene9100 : public Scene { /* Items */ - class SceneHotspot1: public NamedHotspot { + class SceneHotspot1 : public NamedHotspot { public: virtual void doAction(int action); }; @@ -90,8 +90,8 @@ public: virtual void dispatch(); }; -class Scene9150: public Scene2 { - class Object3: public SceneObject9150 { +class Scene9150 : public Scene2 { + class Object3 : public SceneObject9150 { public: virtual void signal(); virtual void dispatch(); @@ -118,8 +118,8 @@ public: virtual void dispatch(); }; -class Scene9200: public Scene2 { - class SceneHotspot1: public NamedHotspot{ +class Scene9200 : public Scene2 { + class SceneHotspot1 : public NamedHotspot{ public: virtual void doAction(int action); }; @@ -134,7 +134,7 @@ public: SpeakerQText _speakerQText; SoundHandler _soundHandler; SceneHotspot1 _hotspot1; - NamedHotspot _hotspot2; + NamedHotspot _hotspot2; NamedHotspot _hotspot3; NamedHotspot _hotspot4; NamedHotspot _hotspot5; @@ -148,7 +148,7 @@ public: virtual void process(Event &event); }; -class Scene9300: public Scene { +class Scene9300 : public Scene { public: SequenceManager _sequenceManager; SceneObject _object1; @@ -172,7 +172,7 @@ public: virtual void dispatch(); }; -class Scene9350: public Scene2 { +class Scene9350 : public Scene2 { public: SequenceManager _sequenceManager; Object9350 _object1; @@ -188,7 +188,7 @@ public: virtual void dispatch(); }; -class Scene9360: public Scene2 { +class Scene9360 : public Scene2 { public: SequenceManager _sequenceManager; Action _action1; @@ -207,13 +207,13 @@ public: virtual void dispatch(); }; -class Scene9400: public Scene2 { - class SceneHotspot7: public NamedHotspot{ +class Scene9400 : public Scene2 { + class SceneHotspot7 : public NamedHotspot{ public: virtual void doAction(int action); }; - class SceneHotspot8: public NamedHotspot{ + class SceneHotspot8 : public NamedHotspot{ public: virtual void doAction(int action); }; @@ -243,23 +243,23 @@ public: virtual void dispatch(); }; -class Scene9450: public Scene2 { - class Object2: public SceneObject { +class Scene9450 : public Scene2 { + class Object2 : public SceneObject { public: virtual void signal(); }; - class Object3: public SceneObject9150 { + class Object3 : public SceneObject9150 { public: virtual void dispatch(); }; - class Hotspot1: public NamedHotspot{ + class Hotspot1 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot3: public NamedHotspot{ + class Hotspot3 : public NamedHotspot{ public: virtual void doAction(int action); }; @@ -292,23 +292,23 @@ public: virtual void dispatch(); }; -class Scene9500: public Scene2 { - class Hotspot1: public NamedHotspot{ +class Scene9500 : public Scene2 { + class Hotspot1 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot2: public NamedHotspot{ + class Hotspot2 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot3: public NamedHotspot{ + class Hotspot3 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot4: public NamedHotspot{ + class Hotspot4 : public NamedHotspot{ public: virtual void doAction(int action); }; @@ -345,7 +345,7 @@ public: virtual void process(Event &event); }; -class Scene9700: public Scene2 { +class Scene9700 : public Scene2 { SequenceManager _sequenceManager; SceneObject _object1; NamedHotspot _sceneHotspot1; @@ -361,7 +361,7 @@ class Scene9700: public Scene2 { virtual void process(Event &event); }; -class Scene9750: public Scene { +class Scene9750 : public Scene { public: SequenceManager _sequenceManager; SceneObject _object1; @@ -372,48 +372,48 @@ public: virtual void dispatch(); }; -class Scene9850: public Scene { - class Object6: public SceneObject{ +class Scene9850 : public Scene { + class Object6 : public SceneObject{ public: virtual void doAction(int action); }; - class Object7: public SceneObjectExt{ + class Object7 : public SceneObjectExt{ public: virtual void doAction(int action); }; - class Hotspot12: public NamedHotspot{ + class Hotspot12 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot14: public NamedHotspot{ + class Hotspot14 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot16: public NamedHotspot{ + class Hotspot16 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot17: public NamedHotspot{ + class Hotspot17 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot18: public NamedHotspot{ + class Hotspot18 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot19: public NamedHotspot{ + class Hotspot19 : public NamedHotspot{ public: virtual void doAction(int action); }; - class Hotspot20: public NamedHotspot{ + class Hotspot20 : public NamedHotspot{ public: virtual void doAction(int action); }; @@ -454,8 +454,8 @@ public: virtual void dispatch(); }; -class Scene9900: public Scene { - class strAction1: public Action { +class Scene9900 : public Scene { + class strAction1 : public Action { public: SceneObject _object9; ScenePalette _palette1; @@ -463,7 +463,7 @@ class Scene9900: public Scene { virtual void signal(); }; - class strAction2: public Action { + class strAction2 : public Action { public: SceneText _txtArray1[2]; SceneText _txtArray2[2]; @@ -473,7 +473,7 @@ class Scene9900: public Scene { virtual void dispatch(); }; - class strAction3: public Action { + class strAction3 : public Action { public: SceneObject _object10; ScenePalette _palette2; @@ -515,13 +515,13 @@ public: virtual void process(Event &event); }; -class Scene9999: public Scene { +class Scene9999 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; diff --git a/engines/tsage/ringworld_scenes2.cpp b/engines/tsage/ringworld_scenes2.cpp index 65b676885a..8d95460615 100644 --- a/engines/tsage/ringworld_scenes2.cpp +++ b/engines/tsage/ringworld_scenes2.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.cpp $ - * $Id: scene_logic.cpp 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -210,7 +210,7 @@ void Scene1000::Action3::signal() { scene->_object3.setStrip(5); scene->_object3.setFrame(1); scene->_object3.setPosition(Common::Point(292, 192)); - + zoom(true); setDelay(300); break; @@ -227,7 +227,7 @@ void Scene1000::Action3::signal() { break; default: break; - } + } } void Scene1000::Action3::zoom(bool up) { @@ -268,7 +268,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) { _globals->_sceneManager._scene->_sceneBounds.centre(_object1._position.x, _object1._position.y); _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds); - + _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; _globals->_soundHandler.startSound(114); } else if (_globals->_sceneManager._previousScene == 2222) { @@ -279,7 +279,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) { _object1.animate(ANIM_MODE_2, 0); _object1._moveDiff = Common::Point(2, 2); _object1.setPosition(Common::Point(120, 180)); - + _globals->_sceneManager._scene->_sceneBounds.centre(_object1._position.x, _object1._position.y); _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds); _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; @@ -292,7 +292,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) { _object3.setVisage(1050); _object3.changeZoom(-1); _object3.setPosition(Common::Point(158, 0)); - + _globals->_player.postInit(); _globals->_player.setVisage(1050); _globals->_player.setStrip(3); @@ -314,7 +314,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) { void Scene1001::Action1::signal() { Scene1001 *scene = (Scene1001 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: setDelay(10); @@ -377,7 +377,7 @@ void Scene1001::Action1::signal() { scene->_object1.setFrame(1); scene->_object1.setPosition(Common::Point(-75, 87)); scene->_object1.animate(ANIM_MODE_2, NULL); - + Common::Point pt(0, 100); NpcMover *mover = new NpcMover(); scene->_object1.addMover(mover, &pt, this); @@ -447,7 +447,7 @@ void Scene1001::Action1::signal() { NpcMover *mover = new NpcMover(); scene->_object6.addMover(mover, &pt, this); break; - } + } case 17: { scene->_soundHandler1.startSound(90); scene->_object6.remove(); @@ -465,7 +465,7 @@ void Scene1001::Action1::signal() { NpcMover *mover = new NpcMover(); scene->_object7.addMover(mover, &pt, this); break; - } + } case 18: scene->_object7.remove(); @@ -534,13 +534,13 @@ void Scene1001::postInit(SceneObjectList *OwnerList) { /*-------------------------------------------------------------------------- - * Scene 1250 - + * Scene 1250 - * *--------------------------------------------------------------------------*/ void Scene1250::Action1::signal() { Scene1250 *scene = (Scene1250 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: setDelay(_globals->_randomSource.getRandomNumber(120) + 60); @@ -554,7 +554,7 @@ void Scene1250::Action1::signal() { void Scene1250::Action2::signal() { Scene1250 *scene = (Scene1250 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: switch (_globals->_randomSource.getRandomNumber(2)) { @@ -580,7 +580,7 @@ void Scene1250::Action2::signal() { void Scene1250::Action3::signal() { Scene1250 *scene = (Scene1250 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: setDelay(30); @@ -599,7 +599,7 @@ void Scene1250::Action3::signal() { void Scene1250::Action4::signal() { Scene1250 *scene = (Scene1250 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: setDelay(3); @@ -641,7 +641,7 @@ void Scene1250::postInit(SceneObjectList *OwnerList) { _object2.setPriority2(255); _object2._frame = 1; _object2.setAction(&_action2); - + _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds); _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; @@ -791,7 +791,7 @@ void Scene1400::postInit(SceneObjectList *OwnerList) { void Scene1500::Action1::signal() { Scene1500 *scene = (Scene1500 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: { scene->_object1.postInit(); @@ -866,7 +866,7 @@ void Scene1500::Action1::signal() { void Scene1500::Action2::signal() { Scene1500 *scene = (Scene1500 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: setDelay(6); diff --git a/engines/tsage/ringworld_scenes2.h b/engines/tsage/ringworld_scenes2.h index 7cd72adf1c..75843d3570 100644 --- a/engines/tsage/ringworld_scenes2.h +++ b/engines/tsage/ringworld_scenes2.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.h $ - * $Id: scene_logic.h 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -35,17 +35,17 @@ namespace tSage { -class Scene1000: public Scene { +class Scene1000 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { private: void zoom(bool up); public: @@ -61,9 +61,9 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene1001: public Scene { +class Scene1001 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; @@ -80,22 +80,22 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene1250: public Scene { +class Scene1250 : public Scene { public: /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; @@ -110,10 +110,10 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene1400: public Scene { +class Scene1400 : public Scene { public: /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); virtual void dispatch(); @@ -125,14 +125,14 @@ public: }; -class Scene1500: public Scene { +class Scene1500 : public Scene { public: /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp index 27ddbb4334..b37b156907 100644 --- a/engines/tsage/ringworld_scenes3.cpp +++ b/engines/tsage/ringworld_scenes3.cpp @@ -371,11 +371,11 @@ void Scene2000::postInit(SceneObjectList *OwnerList) { _speakerMText._npc = &_object6; _speakerHText._npc = &_object6; _stripManager.setCallback(this); - + _object3.postInit(); _object3.setVisage(2002); _object3.setPosition(Common::Point(65, 199)); - + _object4.postInit(); _object4.setVisage(2002); _object4.setStrip(2); @@ -846,7 +846,7 @@ void Scene2100::Action10::signal() { setAction(&scene->_action6, NULL); break; - } + } case 5: scene->_soundHandler.startSound(162); scene->_object1.animate(ANIM_MODE_5, this); @@ -863,7 +863,7 @@ void Scene2100::Action10::signal() { Common::Point pt1(163, 55); NpcMover *mover1 = new NpcMover(); scene->_object3.addMover(mover1, &pt1, NULL); - + scene->_object2.setPriority2(2); Common::Point pt2(158, 55); NpcMover *mover2 = new NpcMover(); @@ -877,7 +877,7 @@ void Scene2100::Action10::signal() { scene->_object3.setStrip(2); scene->_object2.setPriority2(2); scene->_object2.setStrip(3); - + setDelay(45); break; case 9: @@ -1190,7 +1190,7 @@ void Scene2100::Action15::signal() { case 3: { scene->_soundHandler.startSound(162); scene->_object1.animate(ANIM_MODE_6, this); - + Common::Point pt(272, 140); NpcMover *mover = new NpcMover(); scene->_object3.addMover(mover, &pt, this); @@ -1520,8 +1520,8 @@ void Scene2100::Object3::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene2100::Scene2100(): - _hotspot1(0, CURSOR_LOOK, 2100, 2, LIST_END), +Scene2100::Scene2100() : + _hotspot1(0, CURSOR_LOOK, 2100, 2, LIST_END), _hotspot5(0, CURSOR_LOOK, 2100, 9, LIST_END), _hotspot6(0, CURSOR_LOOK, 2100, 7, CURSOR_USE, 2100, 8, LIST_END), _hotspot7(0, CURSOR_LOOK, 2100, 7, CURSOR_USE, 2100, 11, LIST_END), @@ -1550,7 +1550,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) { _speakerMText._npc = &_object3; _speakerQText._npc = &_globals->_player; _speakerSText._npc = &_object2; - + _object1.postInit(); _object1.setVisage(2100); _object1.animate(ANIM_MODE_NONE, NULL); @@ -1695,7 +1695,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) { _globals->_player.setPriority2(1); _globals->_player.setPosition(Common::Point(144, 55)); - + _object2.setVisage(2806); _object2.changeZoom(-1); _object2.setPosition(Common::Point(158, 55)); @@ -1710,7 +1710,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) { if (_globals->_stripNum == 2321) { if (_globals->_sceneObjects->contains(&_object3)) _object3.remove(); - + _globals->_player.setPriority2(1); _globals->_player.setPosition(Common::Point(144, 55)); @@ -1750,7 +1750,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) { if (_globals->_sceneObjects->contains(&_object2)) _object2.remove(); - + _globals->_player._angle = 225; _globals->_player.setStrip(6); _globals->_player.setFrame(1); @@ -1806,7 +1806,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) { _globals->_player.setPosition(Common::Point(65, 149)); _globals->_player.setPriority2(152); _globals->_player.setStrip(2); - + _field1800 = 1; _object4.postInit(); @@ -1824,7 +1824,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) { if (_globals->_inventory._stasisBox2._sceneNumber == 1) { _globals->_player.setPriority2(1); _globals->_player.setPosition(Common::Point(157, 56)); - + _object4.postInit(); _object4.setVisage(2102); _object4.setPosition(Common::Point(160, 199)); @@ -1866,7 +1866,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) { _globals->_player.setPosition(Common::Point(65, 149)); _globals->_player.setPriority2(152); _globals->_player.setStrip(2); - + _sceneMode = 2106; setAction(&_sequenceManager, this, 2106, NULL); break; @@ -1879,7 +1879,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) { _globals->_player.setPosition(Common::Point(65, 149)); _globals->_player.setPriority2(152); _globals->_player.setStrip(2); - + _object4.postInit(); _object4.setVisage(2102); _object4.setPosition(Common::Point(160, 199)); @@ -2006,7 +2006,7 @@ void Scene2120::Action1::signal() { case 3: // Display an image associated with the encyclopedia entry SceneItem::display(0, 0); - + scene->_visageHotspot.postInit(); scene->_visageHotspot.setVisage(_entries[scene->_subjectIndex]._visage); scene->_visageHotspot.setPosition(Common::Point(129, 180)); @@ -2050,7 +2050,7 @@ void Scene2120::Action1::dispatch() { scene->_prevDbMode = scene->_dbMode; scene->_dbMode = 2; scene->_lineOffset = 0; - + _actionIndex = !_entries[scene->_subjectIndex]._visage ? 4 : 3; setDelay(30); scene->_soundHandler.startSound(159); @@ -2063,7 +2063,7 @@ void Scene2120::Action1::dispatch() { scene->_arrowHotspot.setPosition(Common::Point(291, 76)); scene->_arrowHotspot.animate(ANIM_MODE_5, NULL); scene->_dbMode = 1; - + _actionIndex = 2; setDelay(30); } @@ -2144,7 +2144,7 @@ void Scene2120::Action1::dispatch() { scene->_soundHandler.startSound(159); } } - + Action::dispatch(); } @@ -2165,7 +2165,7 @@ void Scene2120::postInit(SceneObjectList *OwnerList) { _topicArrowHotspot.setVisage(2120); _topicArrowHotspot.animate(ANIM_MODE_NONE, NULL); _topicArrowHotspot.setPosition(Common::Point(240, 55)); - + _arrowHotspot.postInit(); _arrowHotspot.setVisage(2121); _arrowHotspot.animate(ANIM_MODE_NONE, NULL); @@ -2451,7 +2451,7 @@ void Scene2150::Hotspot10::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene2150::Scene2150(): +Scene2150::Scene2150() : _hotspot3(18, CURSOR_LOOK, 2150, 2, CURSOR_USE, 2150, 18, LIST_END), _hotspot5(17, CURSOR_LOOK, 2150, 4, CURSOR_USE, 2150, 18, LIST_END), _hotspot6(0, CURSOR_LOOK, 2150, 5, CURSOR_USE, 2150, 18, LIST_END), @@ -2551,7 +2551,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) { _globals->_player.disableControl(); _globals->_player._angle = 180; _globals->_player.setPosition(Common::Point(265, 80)); - + _hotspot2._frame = _hotspot2.getFrameCount(); _sceneMode = 2157; setAction(&_sequenceManager, this, 2157, &_hotspot2, NULL); @@ -2607,7 +2607,7 @@ void Scene2150::signal() { void Scene2150::dispatch() { Scene::dispatch(); - + if (!_action) { if (_rect1.contains(_globals->_player._position)) { _globals->_player.disableControl(); @@ -2622,7 +2622,7 @@ void Scene2150::dispatch() { if (_globals->_player._position.y >= 196) { _globals->_player.disableControl(); SceneItem::display2(2150, 20); - + _sceneMode = 2153; setAction(&_sequenceManager, this, 2153, &_globals->_player, NULL); } @@ -2720,7 +2720,7 @@ void Scene2200::Action3::signal() { } _globals->_sceneManager._scene->loadScene(66); - + scene->_hotspot6.postInit(); scene->_hotspot6.setVisage(66); scene->_hotspot6.setPosition(Common::Point(160, 197)); @@ -2874,7 +2874,7 @@ void Scene2200::Hotspot9::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene2200::Scene2200(): +Scene2200::Scene2200() : _hotspot1(0, CURSOR_LOOK, 2200, 5, CURSOR_USE, 2200, 6, LIST_END), _hotspot10(0, CURSOR_LOOK, 2200, 4, LIST_END) { } @@ -2896,13 +2896,13 @@ void Scene2200::postInit(SceneObjectList *OwnerList) { _speakerQText._npc = &_globals->_player; _speakerSText._npc = &_hotspot5; _speakerMText._npc = &_hotspot3; - + _stripManager.setCallback(this); _hotspot5.postInit(); _hotspot5.setVisage(2840); _hotspot5.setPosition(Common::Point(50, 235)); - + _hotspot8.postInit(); _hotspot8.setVisage(2840); _hotspot8.setStrip(2); @@ -2949,7 +2949,7 @@ void Scene2200::postInit(SceneObjectList *OwnerList) { case 2310: default: _globals->_inventory._infoDisk._sceneNumber = 1; - + _hotspot3.postInit(); _hotspot3.setVisage(2215); _hotspot3.setPosition(Common::Point(144, 132)); @@ -2965,7 +2965,7 @@ void Scene2200::postInit(SceneObjectList *OwnerList) { _soundHandler1.startSound(101); _soundHandler2.startSound(100); _globals->_soundHandler.proc5(true); - + _globals->_sceneItems.push_back(&_hotspot5); setAction(&_action2); break; @@ -3080,7 +3080,7 @@ void Scene2222::postInit(SceneObjectList *OwnerList) { _hotspot2.setStrip2(2); _hotspot2._frame = 2; _hotspot2.animate(ANIM_MODE_2, 0); - + _hotspot3.postInit(); _hotspot3.setVisage(3401); _hotspot3.setStrip2(2); @@ -3113,7 +3113,7 @@ void Scene2222::postInit(SceneObjectList *OwnerList) { _hotspot3.setPosition(Common::Point(162, 96)); _hotspot4.setPosition(Common::Point(118, 141)); _hotspot5.setPosition(Common::Point(124, 107)); - + setAction(&_action1); } @@ -3222,7 +3222,7 @@ void Scene2230::Action3::signal() { _globals->_player.setAction(NULL); _globals->_player._moveDiff = Common::Point(5, 3); _globals->_player.setStrip2(_globals->_player._strip); - + Common::Point pt(190, 74); NpcMover *mover = new NpcMover(); _globals->_player.addMover(mover, &pt, this); @@ -3361,7 +3361,7 @@ void Scene2230::Action7::signal() { scene->_hotspot2.setPosition(Common::Point(166, 116)); scene->_hotspot2.setPriority2(131); scene->_hotspot2.animate(ANIM_MODE_5, this); - + scene->_hotspot8._frame = 2; break; case 4: @@ -3666,7 +3666,7 @@ void Scene2230::Hotspot12::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene2230::Scene2230(): +Scene2230::Scene2230() : _hotspot9(0, CURSOR_LOOK, 2230, 16, CURSOR_USE, 2230, 18, LIST_END) { } @@ -3689,7 +3689,7 @@ void Scene2230::postInit(SceneObjectList *OwnerList) { _hotspot8.setPosition(Common::Point(164, 133)); _hotspot8.changeZoom(100); _hotspot8.setPriority2(129); - + _rect1 = Rect(59, 64, 89, 74); _globals->_player.postInit(); @@ -3712,7 +3712,7 @@ void Scene2230::postInit(SceneObjectList *OwnerList) { _hotspot10.setBounds(Rect(170, 96, 176, 106)); _hotspot11.setBounds(Rect(158, 109, 164, 115)); _hotspot12.setBounds(Rect(170, 109, 177, 115)); - + _globals->_sceneItems.addItems(&_hotspot8, &_hotspot5, &_hotspot4, &_hotspot6, &_hotspot7, &_hotspot1, &_hotspot3, NULL); @@ -3817,7 +3817,7 @@ void Scene2280::Action2::signal() { _globals->setFlag(13); SceneItem::display2(2280, 37); - + _globals->_player.enableControl(); remove(); break; @@ -4001,7 +4001,7 @@ void Scene2280::Hotspot1::doAction(int action) { break; } } - + void Scene2280::Hotspot2::doAction(int action) { switch (action) { case CURSOR_LOOK: @@ -4151,7 +4151,7 @@ void Scene2280::Hotspot17::doAction(int action) { switch (action) { case CURSOR_LOOK: - if (_globals->getFlag(18)) + if (_globals->getFlag(18)) SceneItem::display2(2280, 26); else { _globals->setFlag(18); @@ -4178,7 +4178,7 @@ void Scene2280::Hotspot18::doAction(int action) { switch (action) { case CURSOR_LOOK: - if (_globals->getFlag(19)) + if (_globals->getFlag(19)) SceneItem::display2(2280, 28); else { _globals->setFlag(19); @@ -4202,7 +4202,7 @@ void Scene2280::Hotspot18::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene2280::Scene2280(): +Scene2280::Scene2280() : _hotspot3(0, CURSOR_LOOK, 2280, 30, CURSOR_USE, 31, 0, LIST_END), _hotspot5(0, CURSOR_LOOK, 2280, 35, CURSOR_USE, 2280, 36, LIST_END), _hotspot6(0, CURSOR_LOOK, 2280, 19, CURSOR_USE, 2280, 20, LIST_END), @@ -4229,7 +4229,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) { _hotspot17._strip = 2; _hotspot17.setPosition(Common::Point(162, 39)); _hotspot17.setPriority2(1); - + _globals->_sceneItems.push_back(&_hotspot17); } @@ -4240,7 +4240,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) { _hotspot18._frame = 2; _hotspot17.setPosition(Common::Point(152, 43)); _hotspot17.setPriority2(1); - + _globals->_sceneItems.push_back(&_hotspot17); } @@ -4250,21 +4250,21 @@ void Scene2280::postInit(SceneObjectList *OwnerList) { _hotspot8._strip = 2; _hotspot8.setPosition(Common::Point(79, 108)); _hotspot8.setPriority2(1); - + _hotspot10.postInit(); _hotspot10.setVisage(2280); _hotspot10._strip = 2; _hotspot10._frame = 2; _hotspot10.setPosition(Common::Point(79, 104)); _hotspot10.setPriority2(2); - + _hotspot12.postInit(); _hotspot12.setVisage(2280); _hotspot12._strip = 2; _hotspot12._frame = 3; _hotspot12.setPosition(Common::Point(88, 76)); _hotspot12.setPriority2(1); - + _globals->_sceneItems.addItems(&_hotspot8, &_hotspot10, &_hotspot12, NULL); } @@ -4295,7 +4295,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) { _hotspot6.setBounds(Rect(261, 39, 276, 90)); _hotspot7.setBounds(Rect(142, 19, 174, 38)); _hotspot15.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); - + _exitRect = Rect(145, 180, 195, 195); _globals->_player.postInit(); @@ -4312,7 +4312,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) { _globals->setFlag(109); _globals->_player.setPriority2(76); _globals->_player.disableControl(); - + _sceneMode = 2281; setAction(&_sequenceManager, this, 2281, &_globals->_player, &_hotspot16, NULL); @@ -4364,7 +4364,7 @@ void Scene2300::Action1::signal() { NpcMover *mover = new NpcMover(); scene->_hotspot2.addMover(mover, &pt, this); break; - } + } case 2: { scene->_hotspot8.setAction(&scene->_action4); scene->_soundHandler2.startSound(21); @@ -4394,7 +4394,7 @@ void Scene2300::Action1::signal() { scene->_hotspot6._moveDiff.x = 5; scene->_hotspot5.animate(ANIM_MODE_1, NULL); scene->_hotspot6.animate(ANIM_MODE_1, NULL); - + Common::Point pt1(178, 147); NpcMover *mover1 = new NpcMover(); scene->_hotspot5.addMover(mover1, &pt1, this); @@ -4429,7 +4429,7 @@ void Scene2300::Action1::signal() { scene->_hotspot5.addMover(NULL); if (scene->_hotspot6._mover) scene->_hotspot6.addMover(NULL); - + scene->_hotspot5.animate(ANIM_MODE_NONE, NULL); scene->_hotspot6.animate(ANIM_MODE_NONE, NULL); @@ -4456,7 +4456,7 @@ void Scene2300::Action1::signal() { scene->_hotspot6.animate(ANIM_MODE_5, NULL); scene->_hotspot5.setPriority2(20); scene->_hotspot6.setPriority2(20); - + _globals->_player.setVisage(2672); _globals->_player._strip = 5; _globals->_player._frame = _globals->_player.getFrameCount(); @@ -4590,7 +4590,7 @@ void Scene2300::Action3::signal() { scene->_hotspot7._strip = 2; scene->_hotspot7._frame = 1; scene->_hotspot7.animate(ANIM_MODE_5, this); - + _globals->_player.setVisage(2672); _globals->_player._strip = 2; _globals->_player._frame = _globals->_player.getFrameCount(); @@ -4693,7 +4693,7 @@ void Scene2300::Hotspot6::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene2300::Scene2300(): +Scene2300::Scene2300() : _hotspot11(0, CURSOR_LOOK, 2300, 6, CURSOR_USE, 2300, 14, LIST_END), _hotspot12(0, CURSOR_LOOK, 2300, 5, CURSOR_USE, 2300, 13, LIST_END), _hotspot13(0, CURSOR_LOOK, 2300, 9, CURSOR_USE, 2300, 20, LIST_END), @@ -4912,7 +4912,7 @@ void Scene2310::process(Event &event) { int frameNum = 0; if (!event.handled && (event.eventType == EVENT_BUTTON_DOWN)) { - int idx = 0; + int idx = 0; while (idx < 5) { if (_rectList[idx].contains(event.mousePos)) break; @@ -4928,7 +4928,7 @@ void Scene2310::process(Event &event) { if (event.mousePos.y > 105) idx = findObject(idx); - + if (idx != 5) { _wireList[idx].hide(); _globals->_sceneObjects->draw(); @@ -5034,7 +5034,7 @@ void Scene2320::Action2::signal() { case 0: { scene->_soundHandler.startSound(253); scene->_hotspot13.setPriority2(99); - + Common::Point pt(scene->_hotspot13._position.x, 200); NpcMover *mover = new NpcMover(); scene->_hotspot13.addMover(mover, &pt, this); @@ -5244,7 +5244,7 @@ void Scene2320::Action4::signal() { _globals->_player.setStrip(5); _globals->_player.setFrame(1); _globals->_player.animate(ANIM_MODE_1, NULL); - + scene->_hotspot16.show(); setDelay(3); break; @@ -5289,7 +5289,7 @@ void Scene2320::Action4::signal() { _globals->_player.enableControl(); _globals->_player.setVisage(0); _globals->_player.animate(ANIM_MODE_1, NULL); - + scene->_hotspot13.setPriority2(1); remove(); break; @@ -5340,7 +5340,7 @@ void Scene2320::Action5::signal() { scene->_hotspot11.setVisage(2705); scene->_hotspot11.animate(ANIM_MODE_1, NULL); scene->_hotspot11.setObjectWrapper(new SceneObjectWrapper()); - + Common::Point pt(185, 135); NpcMover *mover = new NpcMover(); scene->_hotspot11.addMover(mover, &pt, NULL); @@ -5379,7 +5379,7 @@ void Scene2320::Action6::signal() { _globals->_player.setPriority2(-1); _globals->_player.setObjectWrapper(new SceneObjectWrapper()); _globals->_player.animate(ANIM_MODE_1, NULL); - + setDelay(60); break; case 4: @@ -5406,7 +5406,7 @@ void Scene2320::Action6::signal() { } else { setDelay(60); } - + _globals->_sceneItems.push_front(&scene->_hotspot11); } else { setDelay(3); @@ -5436,7 +5436,7 @@ void Scene2320::Action7::signal() { ADD_MOVER_NULL(scene->_hotspot10, 321, 94); scene->_hotspot11.setPriority2(-1); ADD_MOVER_NULL(scene->_hotspot11, 346, 85); - + _globals->_player.setPriority2(-1); ADD_MOVER(_globals->_player, 297, 89); break; @@ -5739,7 +5739,7 @@ void Scene2320::Hotspot15::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene2320::Scene2320(): +Scene2320::Scene2320() : _hotspot1(0, CURSOR_LOOK, 2320, 0, LIST_END), _hotspot2(0, CURSOR_LOOK, 2320, 1, LIST_END), _hotspot3(0, CURSOR_LOOK, 2320, 11, LIST_END), @@ -5763,7 +5763,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_speakerSAL); _stripManager.addSpeaker(&_speakerSText); _stripManager.addSpeaker(&_speakerGameText); - + _speakerMText._npc = &_hotspot11; _speakerQText._npc = &_globals->_player; _hotspotPtr = &_hotspot10; @@ -5814,7 +5814,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) { _hotspot11.setPosition(Common::Point(510, 156)); _hotspot11._state = 0; _hotspot11.setAction(&_action1); - + _globals->_sceneItems.push_back(&_hotspot11); } @@ -5885,13 +5885,13 @@ void Scene2320::postInit(SceneObjectList *OwnerList) { _globals->_player.setFrame(5); _globals->_player.setPriority2(137); _globals->_player.setPosition(Common::Point(165, 132)); - + setAction(&_action6); break; case 6100: _globals->_soundHandler.startSound(160); _globals->_soundHandler.proc5(true); - + _hotspot8.postInit(); _hotspot8.setVisage(2345); _hotspot8.setPosition(Common::Point(634, 65)); @@ -5904,7 +5904,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) { _globals->_soundHandler.startSound(160); _globals->_soundHandler.proc5(true); _soundHandler.startSound(21); - + _globals->_player.setVisage(2323); _globals->_player.setStrip(2); _globals->_player.setFrame(_globals->_player.getFrameCount()); @@ -5913,7 +5913,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) { _globals->_player.disableControl(); _hotspot13.setPosition(Common::Point(319, 199)); - + _hotspot16.postInit(); _hotspot16.setVisage(2331); _hotspot16._strip = 3; @@ -5930,7 +5930,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) { _globals->_player.disableControl(); _globals->_player.setStrip(3); _globals->_player.setPosition(Common::Point(307, 84)); - + _hotspot11.postInit(); _hotspot11.setVisage(2705); _hotspot11._strip = 2; @@ -5955,7 +5955,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) { _hotspot8.setVisage(2345); _hotspot8.setPosition(Common::Point(634, 65)); _hotspot8.hide(); - + _sceneMode = 2325; setAction(&_sequenceManager1, this, 2325, &_globals->_player, &_hotspot6, &_hotspot8, &_hotspot7, NULL); break; @@ -5982,7 +5982,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) { _hotspot5.setBounds(Rect(104, 122, 174, 157)); _hotspot15.setBounds(Rect(191, 53, 205, 63)); - _globals->_sceneItems.addItems(&_hotspot14, &_hotspot15, &_hotspot5, &_hotspot6, &_hotspot12, + _globals->_sceneItems.addItems(&_hotspot14, &_hotspot15, &_hotspot5, &_hotspot6, &_hotspot12, &_hotspot13, &_hotspot4, &_hotspot3, &_hotspot2, &_hotspot1, NULL); } @@ -6091,7 +6091,7 @@ void Scene2400::postInit(SceneObjectList *OwnerList) { _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position.x, _globals->_player._position.y); _globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds); _globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160; - + _globals->_soundHandler.startSound(153); } diff --git a/engines/tsage/ringworld_scenes3.h b/engines/tsage/ringworld_scenes3.h index 420307ca99..61aac522f2 100644 --- a/engines/tsage/ringworld_scenes3.h +++ b/engines/tsage/ringworld_scenes3.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.h $ - * $Id: scene_logic.h 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -33,61 +33,61 @@ namespace tSage { -class Scene2000: public Scene { +class Scene2000 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; - class Action7: public Action { + class Action7 : public Action { public: virtual void signal(); }; - class Action8: public Action { + class Action8 : public Action { public: virtual void signal(); }; - class Action9: public Action { + class Action9 : public Action { public: virtual void signal(); }; - class Action10: public Action { + class Action10 : public Action { public: virtual void signal(); }; - class Action11: public Action { + class Action11 : public Action { public: virtual void signal(); }; - class Action12: public Action { + class Action12 : public Action { public: virtual void signal(); }; - class Action13: public Action { + class Action13 : public Action { public: virtual void signal(); }; - class Action14: public Action { + class Action14 : public Action { public: virtual void signal(); }; @@ -123,113 +123,113 @@ public: virtual void stripCallback(int v); }; -class Scene2100: public Scene { +class Scene2100 : public Scene { /* Actions */ - class Action1: public ActionExt { + class Action1 : public ActionExt { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; - class Action7: public Action { + class Action7 : public Action { public: virtual void signal(); }; - class Action8: public Action { + class Action8 : public Action { public: virtual void signal(); }; - class Action9: public Action { + class Action9 : public Action { public: virtual void signal(); }; - class Action10: public Action { + class Action10 : public Action { public: virtual void signal(); }; - class Action11: public Action { + class Action11 : public Action { public: virtual void signal(); }; - class Action12: public Action { + class Action12 : public Action { public: virtual void signal(); }; - class Action13: public Action { + class Action13 : public Action { public: virtual void signal(); }; - class Action14: public Action { + class Action14 : public Action { public: virtual void signal(); }; - class Action15: public Action { + class Action15 : public Action { public: virtual void signal(); }; - class Action16: public Action { + class Action16 : public Action { public: virtual void signal(); }; - class Action17: public Action { + class Action17 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot2: public SceneObject { + class Hotspot2 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot3: public SceneObject { + class Hotspot3 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot4: public SceneObject { + class Hotspot4 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot8: public SceneObject { + class Hotspot8 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot10: public SceneObject { + class Hotspot10 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot14: public SceneObject { + class Hotspot14 : public SceneObject { public: virtual void doAction(int action); }; /* Objects */ - class Object1: public SceneObject { + class Object1 : public SceneObject { public: virtual void doAction(int action); }; - class Object2: public SceneObject { + class Object2 : public SceneObject { public: virtual void doAction(int action); }; - class Object3: public SceneObject { + class Object3 : public SceneObject { public: virtual void doAction(int action); }; @@ -246,7 +246,7 @@ public: SpeakerSL _speakerSL; SpeakerSAL _speakerSAL; SpeakerHText _speakerHText; - + DisplayHotspot _hotspot1; Hotspot2 _hotspot2; Hotspot3 _hotspot3; @@ -290,7 +290,7 @@ public: virtual void signal(); }; -class Scene2120: public Scene { +class Scene2120 : public Scene { /* Actions */ class Entry { public: @@ -302,7 +302,7 @@ class Scene2120: public Scene { Entry(int size, int lineNum, int visage) { _size = size; _lineNum = lineNum; _visage = visage; } }; - class Action1: public Action { + class Action1 : public Action { private: Common::Array<Entry> _entries; public: @@ -327,35 +327,35 @@ public: virtual void synchronise(Serialiser &s); }; -class Scene2150: public Scene { +class Scene2150 : public Scene { /* Actions */ - class Action1: public ActionExt { + class Action1 : public ActionExt { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot1: public SceneObject { + class Hotspot1 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot2: public SceneObject { + class Hotspot2 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot4: public SceneObject { + class Hotspot4 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot7: public SceneObject { + class Hotspot7 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot10: public SceneObject { + class Hotspot10 : public SceneObject { public: virtual void doAction(int action); }; @@ -386,36 +386,36 @@ public: virtual void dispatch(); }; -class Scene2200: public Scene { +class Scene2200 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public ActionExt { + class Action3 : public ActionExt { public: virtual void signal(); virtual void process(Event &event); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot3: public SceneObject { + class Hotspot3 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot5: public SceneObject { + class Hotspot5 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot9: public SceneObject { + class Hotspot9 : public SceneObject { public: virtual void doAction(int action); }; @@ -451,13 +451,13 @@ public: virtual void dispatch(); }; -class Scene2222: public Scene { +class Scene2222 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; @@ -478,79 +478,79 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene2230: public Scene { +class Scene2230 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; - class Action7: public Action { + class Action7 : public Action { public: virtual void signal(); }; - class Action8: public Action { + class Action8 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot1: public SceneObject { + class Hotspot1 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot3: public SceneObject { + class Hotspot3 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot4: public SceneObject { + class Hotspot4 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot5: public SceneObject { + class Hotspot5 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot6: public SceneObject { + class Hotspot6 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot7: public SceneObject { + class Hotspot7 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot8: public SceneObject { + class Hotspot8 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot10: public SceneObject { + class Hotspot10 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot11: public SceneObject { + class Hotspot11 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot12: public SceneObject { + class Hotspot12 : public SceneObject { public: virtual void doAction(int action); }; @@ -567,7 +567,7 @@ public: Hotspot1 _hotspot1; Hotspot3 _hotspot3; Hotspot4 _hotspot4; - SceneObject _hotspot2; + SceneObject _hotspot2; Hotspot5 _hotspot5; Hotspot6 _hotspot6; Hotspot7 _hotspot7; @@ -585,71 +585,71 @@ public: virtual void dispatch(); }; -class Scene2280: public Scene { +class Scene2280 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public ActionExt { + class Action4 : public ActionExt { public: virtual void signal(); - }; + }; /* Hotspots */ - class Hotspot1: public SceneObject { + class Hotspot1 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot2: public SceneObject { + class Hotspot2 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot4: public SceneObject { + class Hotspot4 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot7: public SceneObject { + class Hotspot7 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot8: public SceneObject { + class Hotspot8 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot10: public SceneObject { + class Hotspot10 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot12: public SceneObject { + class Hotspot12 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot14: public SceneObject { + class Hotspot14 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot15: public SceneObject { + class Hotspot15 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot16: public SceneObject { + class Hotspot16 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot17: public SceneObject { + class Hotspot17 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot18: public SceneObject { + class Hotspot18 : public SceneObject { public: virtual void doAction(int action); }; @@ -686,39 +686,39 @@ public: virtual void dispatch(); }; -class Scene2300: public Scene { +class Scene2300 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public ActionExt { + class Action4 : public ActionExt { public: virtual void signal(); - }; + }; /* Hotspots */ - class Hotspot5: public SceneObject { + class Hotspot5 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot6: public SceneObject { + class Hotspot6 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot12: public SceneObject { + class Hotspot12 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot13: public SceneObject { + class Hotspot13 : public SceneObject { public: virtual void doAction(int action); }; @@ -742,7 +742,7 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene2310: public Scene { +class Scene2310 : public Scene { private: int findObject(int objIndex); @@ -751,8 +751,8 @@ private: public: int _pageNumber; int _connectionList[5]; - - void set(int pageNumber, int v1, int v2, int v3, int v4, int v5) { + + void set(int pageNumber, int v1, int v2, int v3, int v4, int v5) { _pageNumber = pageNumber; _connectionList[0] = v1; _connectionList[1] = v2; _connectionList[2] = v3; _connectionList[3] = v4; _connectionList[4] = v5; @@ -775,71 +775,71 @@ public: virtual void dispatch(); }; -class Scene2320: public Scene { +class Scene2320 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public ActionExt { + class Action3 : public ActionExt { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; - class Action7: public Action { + class Action7 : public Action { public: virtual void signal(); }; - class Action8: public Action { + class Action8 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot5: public SceneObject { + class Hotspot5 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot6: public SceneObject { + class Hotspot6 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot8: public SceneObject { + class Hotspot8 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot10: public SceneObjectExt { + class Hotspot10 : public SceneObjectExt { public: virtual void doAction(int action); }; - class Hotspot11: public SceneObjectExt { + class Hotspot11 : public SceneObjectExt { public: virtual void doAction(int action); }; - class Hotspot12: public SceneObject { + class Hotspot12 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot14: public SceneObject { + class Hotspot14 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot15: public SceneObject { + class Hotspot15 : public SceneObject { public: virtual void doAction(int action); }; @@ -886,9 +886,9 @@ public: virtual void signal(); }; -class Scene2400: public Scene { +class Scene2400 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); virtual void dispatch(); diff --git a/engines/tsage/ringworld_scenes4.cpp b/engines/tsage/ringworld_scenes4.cpp index 944930ad09..89feb223a1 100644 --- a/engines/tsage/ringworld_scenes4.cpp +++ b/engines/tsage/ringworld_scenes4.cpp @@ -130,7 +130,7 @@ void Scene3700::Viewer::dispatch() { for (int idx = 3; idx > 1; --idx) _frameList[idx] = _frameList[idx - 1]; - + int newFrame; do { newFrame = _globals->_randomSource.getRandomNumber(4) + 1; @@ -154,13 +154,13 @@ void Scene3700::Viewer::draw() { GfxSurface img = v.getFrame(_frameList[idx]); Rect destRect = img.getBounds(); - destRect.resize(img, (_position.x - _globals->_sceneOffset.x), + destRect.resize(img, (_position.x - _globals->_sceneOffset.x), (_position.y - _globals->_sceneOffset.y - _yDiff), _percentList[idx]); - destRect.translate(-_globals->_sceneManager._scene->_sceneBounds.left, + destRect.translate(-_globals->_sceneManager._scene->_sceneBounds.left, -_globals->_sceneManager._scene->_sceneBounds.top); - _globals->gfxManager().copyFrom(img, destRect, priorityRegion); + _globals->gfxManager().copyFrom(img, destRect, priorityRegion); } } diff --git a/engines/tsage/ringworld_scenes4.h b/engines/tsage/ringworld_scenes4.h index 4179d1a256..f5dac297fc 100644 --- a/engines/tsage/ringworld_scenes4.h +++ b/engines/tsage/ringworld_scenes4.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.h $ - * $Id: scene_logic.h 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -33,13 +33,13 @@ namespace tSage { -class Scene3500: public Scene { +class Scene3500 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; @@ -53,9 +53,9 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene3700: public Scene { +class Scene3700 : public Scene { /* Custom classes */ - class Viewer: public SceneObject { + class Viewer : public SceneObject { public: Visage _images1; Visage _images2; @@ -74,7 +74,7 @@ class Scene3700: public Scene { }; /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; diff --git a/engines/tsage/ringworld_scenes5.cpp b/engines/tsage/ringworld_scenes5.cpp index a8a1055338..de29a1cefc 100644 --- a/engines/tsage/ringworld_scenes5.cpp +++ b/engines/tsage/ringworld_scenes5.cpp @@ -46,9 +46,9 @@ void Scene4000::Action1::signal() { scene->_hotspot5.setObjectWrapper(new SceneObjectWrapper()); scene->_hotspot5.animate(ANIM_MODE_1, NULL); scene->_hotspot5.setPosition(Common::Point(116, 160)); - + ADD_PLAYER_MOVER_NULL(scene->_hotspot5, 208, 169); - + _globals->_inventory._ale._sceneNumber = 0; _globals->clearFlag(42); _globals->clearFlag(36); @@ -70,7 +70,7 @@ void Scene4000::Action1::signal() { scene->_hotspot4.animate(ANIM_MODE_1, NULL); scene->_hotspot4.setStrip(1); scene->_hotspot4.setPosition(Common::Point(207, 136)); - + ADD_PLAYER_MOVER_NULL(scene->_hotspot4, 220, 151); scene->_hotspot7.postInit(); @@ -300,7 +300,7 @@ void Scene4000::Action7::signal() { switch (_actionIndex++) { case 0: _globals->_player.disableControl(); - + scene->_hotspot6.setFrame(1); ADD_MOVER(_globals->_player, 247, 53); break; @@ -701,7 +701,7 @@ void Scene4000::Hotspot::doAction(int action) { default: SceneHotspot::doAction(action); break; - } + } } void Scene4000::Hotspot17::doAction(int action) { @@ -755,8 +755,8 @@ void Scene4000::Hotspot23::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene4000::Scene4000(): - _hotspot11(0, CURSOR_LOOK, 4000, 14, CURSOR_USE, 4000, 32, OBJECT_STUNNER, 4000, 33, +Scene4000::Scene4000() : + _hotspot11(0, CURSOR_LOOK, 4000, 14, CURSOR_USE, 4000, 32, OBJECT_STUNNER, 4000, 33, OBJECT_SCANNER, 4000, 19, LIST_END), _hotspot19(0, CURSOR_LOOK, 4000, 7, LIST_END), _hotspot20(0, CURSOR_LOOK, 4000, 3, LIST_END), @@ -839,7 +839,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _hotspot12.setFrame(3); _hotspot12.setPriority2(200); _hotspot12.setPosition(Common::Point(281, 176)); - + if (_globals->getFlag(34)) { _soundHandler1.startSound(156); @@ -866,7 +866,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _hotspot7.setObjectWrapper(new SceneObjectWrapper()); _hotspot7._moveDiff = Common::Point(4, 2); _hotspot7.setPosition(Common::Point(-210, 139)); - + _globals->_sceneItems.push_back(&_hotspot7); } @@ -899,13 +899,13 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { case 4010: _hotspot7.setPosition(Common::Point(-210, 139)); - + _hotspot9.postInit(); _hotspot9.setVisage(4001); _hotspot9.animate(ANIM_MODE_1, NULL); _hotspot9.setObjectWrapper(new SceneObjectWrapper()); _hotspot9.setPosition(Common::Point(314, 132)); - + _hotspot2.postInit(); _hotspot2.setVisage(4018); _hotspot2._strip = 1; @@ -921,7 +921,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _hotspot8.remove(); _globals->_player.setPosition(Common::Point(260, 185)); - + if (!_globals->getFlag(36) && !_globals->getFlag(43)) _hotspot7.setPosition(Common::Point(246, 146)); @@ -945,7 +945,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _hotspot5.setPosition(Common::Point(-18, 86)); _globals->_player.disableControl(); - + if (!_globals->getFlag(96)) { _hotspot4.postInit(); _hotspot4.setVisage(4006); @@ -1006,7 +1006,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _hotspot9.setObjectWrapper(new SceneObjectWrapper()); _hotspot9.setPosition(Common::Point(231, 159)); _hotspot9.setStrip(4); - + setAction(&_action12); } break; @@ -1021,7 +1021,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _globals->_player.setFrame(_globals->_player.getFrameCount()); _globals->_player.setPriority2(16); _globals->_player.setPosition(Common::Point(260, 55)); - + _sceneMode = 4007; setAction(&_sequenceManager1, this, 4007, &_globals->_player, NULL); } else { @@ -1068,7 +1068,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _hotspot9.setVisage(4001); _hotspot9.setStrip(3); _hotspot9.setPosition(Common::Point(255, 153)); - + setAction(&_action11); _globals->_inventory._ladder._sceneNumber = 4100; _globals->_inventory._rope._sceneNumber = 4150; @@ -1213,7 +1213,7 @@ void Scene4000::dispatch() { _globals->_player.disableControl(); _soundHandler1.startSound(177); _globals->_soundHandler.startSound(178); - + setAction(&_action1); } @@ -1275,7 +1275,7 @@ void Scene4010::postInit(SceneObjectList *OwnerList) { _hotspot1.changeZoom(75); _hotspot1.animate(ANIM_MODE_1, NULL); _hotspot1.setObjectWrapper(new SceneObjectWrapper()); - + _globals->_player.disableControl(); setAction(&_sequenceManager, this, 4017, &_globals->_player, &_hotspot1, &_hotspot2, NULL); } @@ -1322,7 +1322,7 @@ void Scene4025::Action1::signal() { scene->_pegPtr2->show(); scene->_pegPtr2->_armStrip = scene->_pegPtr->_armStrip; } - + scene->_pegPtr->_armStrip = 0; scene->_pegPtr->setPosition(Common::Point(-10, -10)); scene->_pegPtr2 = scene->_pegPtr; @@ -1367,7 +1367,7 @@ void Scene4025::Action2::signal() { scene->_pegPtr->setStrip(1); scene->_pegPtr->show(); scene->_pegPtr->_armStrip = scene->_holePtr->_armStrip; - + scene->_holePtr->_pegPtr = scene->_pegPtr; scene->_pegPtr = scene->_pegPtr2; } @@ -1465,7 +1465,7 @@ void Scene4025::Peg::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene4025::Scene4025(): Scene() { +Scene4025::Scene4025() : Scene() { _holePtr = NULL; _pegPtr = _pegPtr2 = NULL; } @@ -1690,7 +1690,7 @@ void Scene4045::Action2::signal() { _globals->_sceneManager.changeScene(4000); break; } -} +} void Scene4045::Action3::signal() { Scene4045 *scene = (Scene4045 *)_globals->_sceneManager._scene; @@ -1747,9 +1747,9 @@ void Scene4045::Hotspot1::doAction(int action) { _globals->_stripNum = 4080; } else if (!_globals->getFlag(38)) _globals->_stripNum = 4060; - else + else _globals->_stripNum = 4503; - + scene->setAction(&scene->_action2); } break; @@ -1804,7 +1804,7 @@ void Scene4045::Hotspot6::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene4045::Scene4045(): +Scene4045::Scene4045() : _hotspot3(0, CURSOR_LOOK, 4045, 1, CURSOR_USE, 4100, 21, LIST_END), _hotspot7(9, CURSOR_LOOK, 4045, 0, CURSOR_USE, 4045, 15, LIST_END), _hotspot8(10, CURSOR_LOOK, 4045, 2, LIST_END), @@ -1895,7 +1895,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) { _hotspot1.animate(ANIM_MODE_2, NULL); _hotspot5.setPosition(Common::Point(177, 40)); - + if (_globals->_inventory._peg._sceneNumber == 4045) { _hotspot6.postInit(); _hotspot6.setVisage(4045); @@ -1994,7 +1994,7 @@ void Scene4050::Action1::signal() { break; case 2: _globals->_player.checkAngle(&scene->_hotspot17); - + scene->_hotspot14.postInit(); scene->_hotspot14.setVisage(4050); scene->_hotspot14.setStrip(2); @@ -2184,7 +2184,7 @@ void Scene4050::Hotspot17::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene4050::Scene4050(): +Scene4050::Scene4050() : _hotspot1(0, CURSOR_LOOK, 4050, 0, LIST_END), _hotspot2(0, CURSOR_LOOK, 4050, 1, CURSOR_USE, 4050, 15, LIST_END), _hotspot3(0, CURSOR_LOOK, 4050, 2, CURSOR_USE, 4050, 16, LIST_END), @@ -2224,7 +2224,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) { _globals->_player.changeZoom(130); _globals->_player.setPriority2(200); _globals->_player.setStrip(2); - + setAction(&_action2); _globals->_soundHandler.startSound(175); } else { @@ -2249,7 +2249,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) { _globals->_player.animate(ANIM_MODE_1, NULL); _globals->_player.setObjectWrapper(new SceneObjectWrapper()); _globals->_player.setPosition(Common::Point(193, 193)); - + _globals->_soundHandler.startSound(175); break; default: @@ -2278,7 +2278,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) { _hotspot10.setBounds(Rect(278, 43, 310, 115)); _hotspot11.setBounds(Rect(263, 105, 279, 147)); _hotspot12.setBounds(Rect(258, 154, 307, 180)); - + _globals->_sceneItems.addItems(&_hotspot17, &_hotspot12, &_hotspot11, &_hotspot10, &_hotspot13, &_hotspot2, &_hotspot3, &_hotspot4, &_hotspot5, &_hotspot6, &_hotspot8, &_hotspot9, &_hotspot7, &_hotspot1, NULL); @@ -2560,7 +2560,7 @@ void Scene4100::Hotspot14::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene4100::Scene4100(): +Scene4100::Scene4100() : _hotspot3(0, CURSOR_LOOK, 4100, 10, CURSOR_USE, 4100, 21, LIST_END), _hotspot4(0, CURSOR_LOOK, 4100, 8, LIST_END), _hotspot7(0, CURSOR_USE, 4100, 3, CURSOR_USE, 4150, 29, LIST_END), @@ -2620,7 +2620,7 @@ void Scene4100::postInit(SceneObjectList *OwnerList) { _hotspot5.setStrip2(3); _hotspot5.setFrame(2); _hotspot5.setPosition(Common::Point(65, 188)); - + _globals->_sceneItems.push_back(&_hotspot5); } @@ -2641,7 +2641,7 @@ void Scene4100::postInit(SceneObjectList *OwnerList) { _hotspot12.setBounds(Rect(229, 59, 256, 122)); _hotspot13.setBounds(Rect(255, 152, 286, 183)); - _globals->_sceneItems.addItems(&_hotspot3, &_hotspot1, &_hotspot13, &_hotspot12, &_hotspot4, + _globals->_sceneItems.addItems(&_hotspot3, &_hotspot1, &_hotspot13, &_hotspot12, &_hotspot4, &_hotspot11, &_hotspot9, &_hotspot7, &_hotspot10, &_hotspot8, &_hotspot14, NULL); if (_globals->_sceneManager._previousScene == 4150) { @@ -2653,7 +2653,7 @@ void Scene4100::postInit(SceneObjectList *OwnerList) { _hotspot1.setStrip2(-1); _hotspot1.setFrame2(-1); _hotspot1.setFrame(1); - + _globals->_player.setStrip(2); _globals->_player.disableControl(); setAction(&_action4); @@ -2693,7 +2693,7 @@ void Scene4100::dispatch() { if (!_action) { if ((_globals->_player.getRegionIndex() == 15) && !_globals->getFlag(42)) setAction(&_action6); - + if (_globals->_player.getRegionIndex() == 8) _globals->_sceneManager.changeScene(4150); @@ -2913,13 +2913,13 @@ void Scene4150::Hotspot3::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene4150::Scene4150(): +Scene4150::Scene4150() : _hotspot1(0, CURSOR_LOOK, 4000, 17, CURSOR_USE, 4150, 21, CURSOR_TALK, 4150, 21, OBJECT_SCANNER, 4150, 22, OBJECT_STUNNER, 4150, 23, LIST_END), _hotspot2(0, CURSOR_LOOK, 4150, 4, CURSOR_USE, 4150, 24, LIST_END), _hotspot7(0, CURSOR_LOOK, 4150, 1, CURSOR_USE, 4150, 25, OBJECT_ROPE, 4150, 26, LIST_END), _hotspot8(0, CURSOR_LOOK, 4150, 1, CURSOR_USE, 4150, 25, OBJECT_ROPE, 4150, 26, LIST_END), - _hotspot9(0, CURSOR_LOOK, 4150, 2, CURSOR_USE, 4150, 27, OBJECT_SCANNER, 4150, 28, + _hotspot9(0, CURSOR_LOOK, 4150, 2, CURSOR_USE, 4150, 27, OBJECT_SCANNER, 4150, 28, OBJECT_STUNNER, 4150, 32, LIST_END), _hotspot10(0, CURSOR_LOOK, 4150, 5, CURSOR_USE, 4150, 29, LIST_END), _hotspot11(0, CURSOR_LOOK, 4150, 6, CURSOR_USE, 4150, 29, LIST_END), @@ -2935,7 +2935,7 @@ Scene4150::Scene4150(): { } -void Scene4150::postInit(SceneObjectList *OwnerList) { +void Scene4150::postInit(SceneObjectList *OwnerList) { loadScene(4150); Scene::postInit(); setZoomPercents(60, 85, 200, 100); @@ -2984,7 +2984,7 @@ void Scene4150::postInit(SceneObjectList *OwnerList) { _hotspot3.postInit(); _hotspot3.setVisage(4150); _hotspot3.setPosition(Common::Point(175, 70)); - + _globals->_sceneItems.push_back(&_hotspot3); } @@ -3048,7 +3048,7 @@ void Scene4150::dispatch() { void Scene4250::Action1::signal() { Scene4250 *scene = (Scene4250 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: _globals->_player.disableControl(); @@ -3086,7 +3086,7 @@ void Scene4250::Action1::signal() { void Scene4250::Action2::signal() { Scene4250 *scene = (Scene4250 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: _globals->_player.disableControl(); @@ -3142,7 +3142,7 @@ void Scene4250::Action2::signal() { void Scene4250::Action3::signal() { Scene4250 *scene = (Scene4250 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: setDelay(3); @@ -3159,7 +3159,7 @@ void Scene4250::Action3::signal() { void Scene4250::Action4::signal() { Scene4250 *scene = (Scene4250 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: _globals->_player.disableControl(); @@ -3181,7 +3181,7 @@ void Scene4250::Action4::signal() { void Scene4250::Action5::signal() { Scene4250 *scene = (Scene4250 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: _globals->_player.disableControl(); @@ -3228,7 +3228,7 @@ void Scene4250::Hotspot1::doAction(int action) { scene->_sceneMode = 4265; scene->setAction(&scene->_sequenceManager, scene, 4265, this, NULL); } else { - scene->setAction(&scene->_sequenceManager, scene, + scene->setAction(&scene->_sequenceManager, scene, _globals->_sceneObjects->contains(&scene->_hotspot6) ? 4260 : 4262, this, NULL); } } @@ -3306,12 +3306,12 @@ void Scene4250::Hotspot4::doAction(int action) { scene->setAction(&scene->_sequenceManager, scene, 4263, NULL); } else { scene->_sceneMode = 4254; - + if (_globals->_inventory._helmet._sceneNumber == 4250) { scene->_sceneMode = 4266; scene->setAction(&scene->_sequenceManager, scene, 4266, this, NULL); } else { - scene->setAction(&scene->_sequenceManager, scene, + scene->setAction(&scene->_sequenceManager, scene, (_globals->_inventory._concentrator._sceneNumber == 1) ? 4255 : 4254, NULL); } } @@ -3426,7 +3426,7 @@ void Scene4250::Hotspot8::doAction(int action) { case OBJECT_STASIS_NEGATOR: _globals->_player.disableControl(); scene->_sceneMode = 4270; - scene->setAction(&scene->_sequenceManager, scene, + scene->setAction(&scene->_sequenceManager, scene, (_globals->_inventory._helmet._sceneNumber == 4250) ? 4270 : 4271, NULL); break; default: @@ -3437,7 +3437,7 @@ void Scene4250::Hotspot8::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene4250::Scene4250(): +Scene4250::Scene4250() : _hotspot7(0, CURSOR_LOOK, 4250, 0, LIST_END) { } @@ -3496,7 +3496,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) { _hotspot1.setPosition(Common::Point(197, 173)); _hotspot1.changeZoom(70); - + _globals->_player.setObjectWrapper(new SceneObjectWrapper()); _globals->_player.setPosition(Common::Point(252, 176)); _globals->_player.changeZoom(70); @@ -3936,7 +3936,7 @@ void Scene4300::Hotspot19::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene4300::Scene4300(): +Scene4300::Scene4300() : _hotspot18(0, CURSOR_LOOK, 4300, 0, LIST_END) { } @@ -4119,7 +4119,7 @@ void Scene4300::signal() { } void Scene4300::dispatch() { - if (_action) + if (_action) _action->dispatch(); } @@ -4144,10 +4144,10 @@ void Scene4301::Action1::synchronise(Serialiser &s) { void Scene4301::Action1::remove() { Scene4301 *scene = (Scene4301 *)_globals->_sceneManager._scene; _globals->_player.enableControl(); - + for (_state = 0; _state < 6; ++_state) _buttonList[_state].remove(); - + scene->_hotspot3.remove(); scene->_hotspot2.remove(); @@ -4189,7 +4189,7 @@ void Scene4301::Action1::signal() { case 10: _globals->_events.setCursor(CURSOR_NONE); scene->_soundHandler.startSound(337); - if (scene->_hotspot3._flags & OBJFLAG_HIDE) + if (scene->_hotspot3._flags & OBJFLAG_HIDE) scene->_hotspot3.show(); else scene->_hotspot3.hide(); @@ -4214,11 +4214,11 @@ void Scene4301::Action1::signal() { _globals->_player.disableControl(); scene->_soundHandler.startSound(339); scene->_hotspot3._frame = 3; - if (scene->_hotspot3._flags & OBJFLAG_HIDE) + if (scene->_hotspot3._flags & OBJFLAG_HIDE) scene->_hotspot3.show(); else scene->_hotspot3.hide(); - + if (_state <= 8) _actionIndex = 20; ++_state; @@ -4258,8 +4258,8 @@ void Scene4301::Action1::process(Event &event) { _buttonList[_state].setPriority2(255); _buttonList[_state]._numFrames = 25; _buttonList[_state].animate(ANIM_MODE_5, NULL); - - _indexList[_state++] = buttonIndex; + + _indexList[_state++] = buttonIndex; if (_state == 6) { // Six buttons pressed @@ -4335,7 +4335,7 @@ void Scene4301::postInit(SceneObjectList *OwnerList) { _hotspot1._strip = 1; _hotspot1._frame = 1; _hotspot1.setPriority2(250); - + _hotspot5.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); _globals->_sceneItems.push_back(&_hotspot5); diff --git a/engines/tsage/ringworld_scenes5.h b/engines/tsage/ringworld_scenes5.h index e9ad5b62cb..0def49ebe6 100644 --- a/engines/tsage/ringworld_scenes5.h +++ b/engines/tsage/ringworld_scenes5.h @@ -33,67 +33,67 @@ namespace tSage { -class Scene4000: public Scene { +class Scene4000 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; - class Action7: public Action { + class Action7 : public Action { public: virtual void signal(); }; - class Action8: public Action { + class Action8 : public Action { public: virtual void signal(); }; - class Action9: public Action { + class Action9 : public Action { public: virtual void signal(); }; - class Action10: public Action { + class Action10 : public Action { public: virtual void signal(); }; - class Action11: public Action { + class Action11 : public Action { public: virtual void signal(); }; - class Action12: public Action { + class Action12 : public Action { public: virtual void signal(); }; - class Action13: public Action { + class Action13 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot7: public SceneObject { + class Hotspot7 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot8: public SceneObject { + class Hotspot8 : public SceneObject { private: int _ctr; public: @@ -103,35 +103,35 @@ class Scene4000: public Scene { } virtual void doAction(int action); }; - class Hotspot9: public SceneObject { + class Hotspot9 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot10: public SceneObject { + class Hotspot10 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot12: public SceneObject { + class Hotspot12 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot13: public SceneObject { + class Hotspot13 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot: public SceneObject { + class Hotspot : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot17: public SceneObject { + class Hotspot17 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot18: public SceneObject { + class Hotspot18 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot23: public SceneObject { + class Hotspot23 : public SceneObject { public: virtual void doAction(int action); }; @@ -186,7 +186,7 @@ public: virtual void dispatch(); }; -class Scene4010: public Scene { +class Scene4010 : public Scene { public: SequenceManager _sequenceManager; SpeakerQText _speakerQText; @@ -194,15 +194,15 @@ public: SpeakerMText _speakerMText; SceneObject _hotspot1, _hotspot2; - virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void signal(); }; -class Scene4025: public Scene { +class Scene4025 : public Scene { /* Custom classes */ class Peg; - class Hole: public SceneObject { + class Hole : public SceneObject { public: Peg *_pegPtr; int _armStrip; @@ -211,26 +211,26 @@ class Scene4025: public Scene { virtual void synchronise(Serialiser &s); virtual void doAction(int action); }; - class Peg: public SceneObject { + class Peg : public SceneObject { public: int _field88; int _armStrip; - Peg(): SceneObject() { _field88 = 0; _armStrip = 3; } + Peg() : SceneObject() { _field88 = 0; _armStrip = 3; } virtual void synchronise(Serialiser &s); virtual void doAction(int action); }; /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; @@ -255,31 +255,31 @@ public: virtual void dispatch(); }; -class Scene4045: public Scene { +class Scene4045 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot1: public SceneObject { + class Hotspot1 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot2: public SceneObject { + class Hotspot2 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot6: public SceneObject { + class Hotspot6 : public SceneObject { public: virtual void doAction(int action); }; @@ -310,35 +310,35 @@ public: virtual void dispatch(); }; -class Scene4050: public Scene { +class Scene4050 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot14: public SceneObject { + class Hotspot14 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot17: public SceneObject { + class Hotspot17 : public SceneObject { public: virtual void doAction(int action); }; -public: +public: SpeakerPText _speakerPText; SpeakerQText _speakerQText; SpeakerGameText _speakerGameText; @@ -359,55 +359,55 @@ public: virtual void dispatch(); }; -class Scene4100: public Scene { +class Scene4100 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot1: public SceneObject { + class Hotspot1 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot2: public SceneObject { + class Hotspot2 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot5: public SceneObject { + class Hotspot5 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot6: public SceneObject { + class Hotspot6 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot14: public SceneObject { + class Hotspot14 : public SceneObject { public: virtual void doAction(int action); }; -public: +public: SequenceManager _sequenceManager; SpeakerMText _speakerMText; SpeakerML _speakerML; @@ -437,36 +437,36 @@ public: virtual void dispatch(); }; -class Scene4150: public Scene { +class Scene4150 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; /* Hotspots */ - class HotspotGroup1: public SceneObject { + class HotspotGroup1 : public SceneObject { public: virtual void doAction(int action); }; - class HotspotGroup3: public SceneObject { + class HotspotGroup3 : public SceneObject { public: virtual void doAction(int action); }; - class HotspotGroup6: public SceneObject { + class HotspotGroup6 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot3: public SceneObject { + class Hotspot3 : public SceneObject { public: virtual void doAction(int action); }; @@ -496,47 +496,47 @@ public: virtual void dispatch(); }; -class Scene4250: public Scene { +class Scene4250 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot1: public SceneObject { + class Hotspot1 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot2: public SceneObject { + class Hotspot2 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot4: public SceneObject { + class Hotspot4 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot6: public SceneObject { + class Hotspot6 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot8: public SceneObject { + class Hotspot8 : public SceneObject { public: virtual void doAction(int action); }; @@ -574,43 +574,43 @@ public: virtual void dispatch(); }; -class Scene4300: public Scene { +class Scene4300 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot8: public SceneObject { + class Hotspot8 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot9: public NamedHotspot { + class Hotspot9 : public NamedHotspot { public: virtual void doAction(int action); }; - class Hotspot10: public SceneObject { + class Hotspot10 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot15: public SceneObject { + class Hotspot15 : public SceneObject { public: virtual void signal(); }; - class Hotspot16: public SceneObject { + class Hotspot16 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot17: public SceneObject { + class Hotspot17 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot19: public SceneObject { + class Hotspot19 : public SceneObject { public: virtual void doAction(int action); }; @@ -647,9 +647,9 @@ public: virtual void process(Event &event); }; -class Scene4301: public Scene { +class Scene4301 : public Scene { /* Actions */ - class Action1: public ActionExt { + class Action1 : public ActionExt { public: SceneObject _buttonList[6]; int _field34E; @@ -662,11 +662,11 @@ class Scene4301: public Scene { }; /* Hotspots */ - class Hotspot4: public NamedHotspot { + class Hotspot4 : public NamedHotspot { public: virtual void doAction(int action); }; - class Hotspot5: public NamedHotspot { + class Hotspot5 : public NamedHotspot { public: virtual void doAction(int action); }; @@ -683,7 +683,7 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void dispatch(); - virtual void synchronise(Serialiser &s) { + virtual void synchronise(Serialiser &s) { Scene::synchronise(s); s.syncAsSint16LE(_field68E); } diff --git a/engines/tsage/ringworld_scenes6.cpp b/engines/tsage/ringworld_scenes6.cpp index ccd857b5f9..3ea4d7b279 100644 --- a/engines/tsage/ringworld_scenes6.cpp +++ b/engines/tsage/ringworld_scenes6.cpp @@ -421,13 +421,13 @@ void Scene5000::HotspotGroup1::doAction(int action) { } /*--------------------------------------------------------------------------*/ -Scene5000::Scene5000(): +Scene5000::Scene5000() : _hotspot1(0, CURSOR_LOOK, 5000, 3, LIST_END), _hotspot12(0, CURSOR_LOOK, 5000, 6, CURSOR_USE, 5000, 7, OBJECT_STUNNER, 5000, 14, - OBJECT_SCANNER, 5000, 16, LIST_END), - _hotspot13(0, CURSOR_LOOK, 5000, 8, CURSOR_USE, 5000, 9, OBJECT_STUNNER, 5000, 0, OBJECT_SCANNER, 5000, 16, LIST_END), - _hotspot14(0, CURSOR_LOOK, 5000, 8, CURSOR_USE, 5000, 9, OBJECT_STUNNER, 5000, 0, + _hotspot13(0, CURSOR_LOOK, 5000, 8, CURSOR_USE, 5000, 9, OBJECT_STUNNER, 5000, 0, + OBJECT_SCANNER, 5000, 16, LIST_END), + _hotspot14(0, CURSOR_LOOK, 5000, 8, CURSOR_USE, 5000, 9, OBJECT_STUNNER, 5000, 0, OBJECT_SCANNER, 5000, 16, LIST_END), _hotspot15(0, CURSOR_LOOK, 5000, 2, OBJECT_STUNNER, 5000, 15, LIST_END), _hotspot16(0, CURSOR_LOOK, 5000, 4, CURSOR_USE, 5000, 5, LIST_END), @@ -526,7 +526,7 @@ void Scene5000::postInit(SceneObjectList *OwnerList) { _hotspot1.setPosition(Common::Point(233, 90)); _hotspot1.changeZoom(100); _hotspot1.show(); - + _hotspot5.setFrame(1); _hotspot5.animate(ANIM_MODE_5, NULL); _hotspot5.setPosition(Common::Point(218, 76)); @@ -543,11 +543,11 @@ void Scene5000::postInit(SceneObjectList *OwnerList) { setAction(&_action1); } - break; + break; default: _globals->_player.disableControl(); _globals->_player.setPosition(Common::Point(0, 146)); - + _hotspot1.changeZoom(100); _hotspot1.setPosition(Common::Point(233, 90)); _hotspot1.show(); @@ -578,7 +578,7 @@ void Scene5000::signal() { void Scene5000::dispatch() { Scene::dispatch(); - + if (!_action) { if (!_globals->_sceneObjects->contains(&_hotspot7) && (_globals->_player.getRegionIndex() == 10)) { _globals->_player.disableControl(); @@ -757,7 +757,7 @@ void Scene5100::Action3::signal() { ADD_PLAYER_MOVER_NULL(scene->_hotspot2, 10, 140); } - + _globals->_player.setVisage(2672); _globals->_player._frame = _globals->_player.getFrameCount(); _globals->_player.animate(ANIM_MODE_6, this); @@ -996,7 +996,7 @@ void Scene5100::Hotspot18::doAction(int action) { break; } break; - + default: SceneHotspot::doAction(action); break; @@ -1053,7 +1053,7 @@ void Scene5100::Hotspot20::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene5100::Scene5100(): +Scene5100::Scene5100() : _hotspot16(0, CURSOR_LOOK, 5100, 48, LIST_END), _hotspot21(0, CURSOR_LOOK, 5100, 4, CURSOR_USE, 5100, 5, LIST_END) { } @@ -1224,7 +1224,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) { switch (_globals->_stripNum) { case 5300: _sceneMode = 5111; - + _globals->_player.setVisage(5101); _globals->_player.setStrip(6); _globals->_player.setPriority2(170); @@ -1235,7 +1235,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) { break; case 5302: _globals->_player.setPosition(Common::Point(512, 190)); - + if (_globals->_sceneObjects->contains(&_hotspot8)) setAction(&_action2); else @@ -1270,7 +1270,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) { _hotspot18.setBounds(Rect(0, 0, 1280, 200)); _globals->_sceneItems.push_back(&_hotspot18); - + _hotspot15.postInit(); _hotspot15.setVisage(5140); _hotspot15.setStrip(3); @@ -1380,7 +1380,7 @@ void Scene5100::dispatch() { &_globals->_player, &_hotspot15, NULL); } - if (_globals->getFlag(61) && !_globals->getFlag(62) && + if (_globals->getFlag(61) && !_globals->getFlag(62) && ((_globals->_player._position.x - _hotspot2._position.x) < 160) && (_globals->_sceneManager._previousScene != 5200) && (_globals->_sceneManager._previousScene != 5150)) { @@ -1586,7 +1586,7 @@ void Scene5200::Hotspot14::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene5200::Scene5200(): +Scene5200::Scene5200() : _hotspot11(0, CURSOR_LOOK, 5200, 0, CURSOR_USE, 5200, 13, LIST_END), _hotspot12(10, CURSOR_LOOK, 5200, 9, LIST_END), _hotspot13(8, CURSOR_LOOK, 5200, 0, CURSOR_USE, 5200, 13, LIST_END) { @@ -1734,7 +1734,7 @@ void Scene5200::dispatch() { void Scene5300::Action1::signal() { Scene5300 *scene = (Scene5300 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: _globals->_player.disableControl(); @@ -1782,7 +1782,7 @@ void Scene5300::Action1::signal() { void Scene5300::Action2::signal() { Scene5300 *scene = (Scene5300 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: _globals->_player.disableControl(); @@ -1810,7 +1810,7 @@ void Scene5300::Action2::signal() { void Scene5300::Action3::signal() { Scene5300 *scene = (Scene5300 *)_globals->_sceneManager._scene; - + switch (_actionIndex++) { case 0: _globals->_player.disableControl(); @@ -1844,7 +1844,7 @@ void Scene5300::Hotspot1::doAction(int action) { break; } } - + void Scene5300::Hotspot2::doAction(int action) { Scene5300 *scene = (Scene5300 *)_globals->_sceneManager._scene; @@ -1922,7 +1922,7 @@ void Scene5300::Hotspot5::doAction(int action) { case CURSOR_USE: _globals->_inventory._bone._sceneNumber = 1; _globals->_player.disableControl(); - + scene->_sceneMode = 5309; scene->setAction(&scene->_sequenceManager, scene, 5309, &_globals->_player, this, NULL); break; @@ -2003,7 +2003,7 @@ void Scene5300::Hotspot8::doAction(int action) { /*--------------------------------------------------------------------------*/ -Scene5300::Scene5300(): +Scene5300::Scene5300() : _hotspot3(0, CURSOR_LOOK, 5300, 3, CURSOR_USE, 5300, 16, LIST_END) { } diff --git a/engines/tsage/ringworld_scenes6.h b/engines/tsage/ringworld_scenes6.h index 9ab446f712..272aea4fe9 100644 --- a/engines/tsage/ringworld_scenes6.h +++ b/engines/tsage/ringworld_scenes6.h @@ -35,44 +35,44 @@ namespace tSage { -class Scene5000: public Scene { +class Scene5000 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); virtual void dispatch(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot7: public SceneObject { + class Hotspot7 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot8: public SceneObject { + class Hotspot8 : public SceneObject { public: virtual void doAction(int action); }; - class HotspotGroup1: public SceneObject { + class HotspotGroup1 : public SceneObject { public: virtual void doAction(int action); }; @@ -101,66 +101,66 @@ public: virtual void dispatch(); }; -class Scene5100: public Scene { +class Scene5100 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; /* Hotspots */ - class HotspotGroup1: public SceneObject { + class HotspotGroup1 : public SceneObject { public: virtual void doAction(int action); }; - class HotspotGroup2: public SceneObject { + class HotspotGroup2 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot4: public SceneObject { + class Hotspot4 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot9: public SceneObject { + class Hotspot9 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot17: public SceneObject { + class Hotspot17 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot18: public SceneHotspot { + class Hotspot18 : public SceneHotspot { public: int _index1; int _index2; virtual void doAction(int action); }; - class Hotspot19: public SceneObject { + class Hotspot19 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot20: public SceneObject { + class Hotspot20 : public SceneObject { public: virtual void doAction(int action); }; @@ -196,35 +196,35 @@ public: virtual void dispatch(); }; -class Scene5200: public Scene { +class Scene5200 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot9: public SceneItemExt { + class Hotspot9 : public SceneItemExt { public: virtual void doAction(int action); }; - class Hotspot10: public SceneItemExt { + class Hotspot10 : public SceneItemExt { public: virtual void doAction(int action); }; - class Hotspot14: public SceneObject { + class Hotspot14 : public SceneObject { public: virtual void doAction(int action); }; @@ -253,43 +253,43 @@ public: virtual void dispatch(); }; -class Scene5300: public Scene { +class Scene5300 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; /* Hotspots */ - class Hotspot1: public SceneObject { + class Hotspot1 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot2: public SceneObject { + class Hotspot2 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot5: public SceneObject { + class Hotspot5 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot6: public SceneObject { + class Hotspot6 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot7: public SceneObject { + class Hotspot7 : public SceneObject { public: virtual void doAction(int action); }; - class Hotspot8: public SceneObject { + class Hotspot8 : public SceneObject { public: virtual void doAction(int action); }; diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp index 70ef94e83b..416b7fe0fd 100644 --- a/engines/tsage/ringworld_scenes8.cpp +++ b/engines/tsage/ringworld_scenes8.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.cpp $ - * $Id: scene_logic.cpp 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -445,7 +445,7 @@ void Scene7000::Object1::doAction(int action) { void Scene7000::dispatch() { Scene7000 *scene = (Scene7000 *)_globals->_sceneManager._scene; - + if (!_action) { if (_globals->_sceneRegions.indexOf(_globals->_player._position) == 8) { if (!_globals->getFlag(13)) { @@ -519,7 +519,7 @@ void Scene7000::postInit(SceneObjectList *OwnerList) { _object3.setPosition(Common::Point(107, 92), 0); _object3.changeZoom(100); _object3.setPriority2(10); - + _object1.postInit(); _object1.setVisage(7003); if (_globals->getFlag(81)) @@ -576,7 +576,7 @@ void Scene7000::postInit(SceneObjectList *OwnerList) { if (!_globals->getFlag(81)) { _object1.setPosition(Common::Point(151, 182), 0); _object1.changeZoom(100); - } + } _object8.remove(); _object9.remove(); } else if (_globals->_sceneManager._previousScene == 2320) { @@ -816,7 +816,7 @@ void Scene7100::Action8::signal() { scene->_object17.setStrip2(4); scene->_object18.setStrip2(4); scene->_object19.setStrip2(4); - + Common::Point pt1(482, 153); NpcMover *mover1 = new NpcMover(); scene->_object17.addMover(mover1, &pt1, this); @@ -852,7 +852,7 @@ void Scene7100::Action8::signal() { scene->_object17.setStrip2(4); scene->_object18.setStrip2(4); scene->_object19.setStrip2(4); - + Common::Point pt1(386, 167); NpcMover *mover1 = new NpcMover(); scene->_object17.addMover(mover1, &pt1, this); @@ -1642,7 +1642,7 @@ void Scene7700::Action3::signal() { scene->_sceneHotspot9.remove(); scene->_object19.remove(); setDelay(60); - // No break on purpose! + // No break on purpose! case 2: scene->_soundHandler.startSound(260, 0, 127); scene->_object8.setVisage(7703); @@ -1770,7 +1770,7 @@ void Scene7700::SceneHotspot3::doAction(int action) { } else if (_globals->_inventory._key._sceneNumber == 7700) { _globals->_player.disableControl(); scene->_sceneMode = 7705; - scene->setAction(&scene->_sequenceManager, scene, 7705, &_globals->_player, 0); + scene->setAction(&scene->_sequenceManager, scene, 7705, &_globals->_player, 0); } break; default: @@ -1980,7 +1980,7 @@ void Scene7700::Object3::doAction(int action) { void Scene7700::Object7::doAction(int action) { Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene; - + switch (action) { case CURSOR_LOOK: if (_globals->getFlag(78)) @@ -2019,7 +2019,7 @@ void Scene7700::Object7::doAction(int action) { _globals->_player.disableControl(); scene->_sceneMode = 7704; scene->setAction(&scene->_sequenceManager, scene, 7704, &_globals->_player, this, 0); - } + } break; default: SceneHotspot::doAction(action); @@ -2124,7 +2124,7 @@ void Scene7700::Object10::doAction(int action) { scene->_object14.remove(); scene->_object9.remove(); remove(); - } else { + } else { SceneHotspot::doAction(action); } } @@ -2403,7 +2403,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) { _sceneItem7.setBounds(0, 320, 200, 0); _sceneItem10.setBounds(0, 320, 200, 0); - + _sceneHotspot11._sceneRegionId = 57; _sceneHotspot11._useLineNum = 0; _sceneHotspot11._lookLineNum = 0; diff --git a/engines/tsage/ringworld_scenes8.h b/engines/tsage/ringworld_scenes8.h index 929426696e..0c39920614 100644 --- a/engines/tsage/ringworld_scenes8.h +++ b/engines/tsage/ringworld_scenes8.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scene_logic.h $ - * $Id: scene_logic.h 232 2011-02-12 11:56:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -35,15 +35,15 @@ namespace tSage { -class NamedHotspotMult: public SceneHotspot { +class NamedHotspotMult : public SceneHotspot { public: int _useLineNum, _lookLineNum; - NamedHotspotMult(): SceneHotspot() {} + NamedHotspotMult() : SceneHotspot() {} virtual Common::String getClassName() { return "NamedHotspotMult"; } }; -class SceneObject7700: public SceneObjectExt { +class SceneObject7700 : public SceneObjectExt { public: int _lookLineNum, _defltLineNum; @@ -55,46 +55,46 @@ public: virtual Common::String getClassName() { return "SceneObject7700"; } }; -class Scene7000: public Scene { +class Scene7000 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void dispatch(); virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; - class Action7: public Action { + class Action7 : public Action { public: virtual void signal(); }; /* Objects */ - class Object1: public SceneObject { + class Object1 : public SceneObject { public: virtual void doAction(int action); }; /* Items */ - class SceneItem1: public SceneItem { + class SceneItem1 : public SceneItem { public: virtual void doAction(int action); }; @@ -131,41 +131,41 @@ public: virtual void dispatch(); }; -class Scene7100: public Scene { +class Scene7100 : public Scene { /* Actions */ - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; - class Action7: public Action { + class Action7 : public Action { public: virtual void signal(); }; - class Action8: public Action { + class Action8 : public Action { public: virtual void signal(); }; - class Action9: public Action { + class Action9 : public Action { public: virtual void signal(); }; - class Action10: public Action { + class Action10 : public Action { public: virtual void signal(); }; - class Action11: public Action { + class Action11 : public Action { public: virtual void signal(); }; @@ -213,13 +213,13 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene7200: public Scene { +class Scene7200 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; @@ -241,21 +241,21 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene7300: public Scene { +class Scene7300 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; @@ -282,13 +282,13 @@ public: virtual void dispatch(); }; -class Scene7600: public Scene { +class Scene7600 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; @@ -308,109 +308,109 @@ public: virtual void postInit(SceneObjectList *OwnerList = NULL); }; -class Scene7700: public Scene { +class Scene7700 : public Scene { /* Actions */ - class Action1: public Action { + class Action1 : public Action { public: virtual void signal(); }; - class Action2: public Action { + class Action2 : public Action { public: virtual void signal(); }; - class Action3: public Action { + class Action3 : public Action { public: virtual void signal(); }; - class Action4: public Action { + class Action4 : public Action { public: virtual void signal(); }; - class Action5: public Action { + class Action5 : public Action { public: virtual void signal(); }; - class Action6: public Action { + class Action6 : public Action { public: virtual void signal(); }; - class Object1: public SceneObject7700 { + class Object1 : public SceneObject7700 { public: virtual void signal(); virtual void doAction(int action); }; - class Object3: public SceneObject { + class Object3 : public SceneObject { public: virtual void doAction(int action); }; - class Object7: public SceneObjectExt { + class Object7 : public SceneObjectExt { public: virtual void doAction(int action); }; - class Object8: public SceneObject { + class Object8 : public SceneObject { public: virtual void doAction(int action); }; - class Object9: public SceneObject { + class Object9 : public SceneObject { public: virtual void doAction(int action); }; - class Object10: public SceneObject { + class Object10 : public SceneObject { public: virtual void doAction(int action); }; - class Object11: public SceneObject { + class Object11 : public SceneObject { public: virtual void doAction(int action); }; - class Object12: public SceneObject { + class Object12 : public SceneObject { public: virtual void doAction(int action); }; /* Items */ - class SceneHotspot1: public SceneHotspot { + class SceneHotspot1 : public SceneHotspot { public: virtual void doAction(int action); }; - class SceneHotspot2: public SceneHotspot { + class SceneHotspot2 : public SceneHotspot { public: virtual void doAction(int action); }; - class SceneHotspot3: public SceneHotspot { + class SceneHotspot3 : public SceneHotspot { public: virtual void doAction(int action); }; - class SceneHotspot4: public SceneHotspot { + class SceneHotspot4 : public SceneHotspot { public: virtual void doAction(int action); }; - class SceneHotspot5: public SceneHotspot { + class SceneHotspot5 : public SceneHotspot { public: virtual void doAction(int action); }; - class SceneHotspot6: public SceneHotspot { + class SceneHotspot6 : public SceneHotspot { public: virtual void doAction(int action); }; - class SceneItem7: public SceneItem { + class SceneItem7 : public SceneItem { public: virtual void doAction(int action); }; - class SceneHotspot8: public SceneHotspot { + class SceneHotspot8 : public SceneHotspot { public: virtual void doAction(int action); }; - class SceneHotspot9: public SceneHotspot { + class SceneHotspot9 : public SceneHotspot { public: virtual void doAction(int action); }; - class SceneItem10: public SceneItem { + class SceneItem10 : public SceneItem { public: virtual void doAction(int action); }; - class SceneHotspot11: public NamedHotspotMult { + class SceneHotspot11 : public NamedHotspotMult { public: virtual void doAction(int action); }; diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp index 8f9db26cdd..7983e2a34c 100644 --- a/engines/tsage/saveload.cpp +++ b/engines/tsage/saveload.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/saveload.cpp $ - * $Id: saveload.cpp 209 2011-02-06 00:46:36Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -64,7 +64,7 @@ Saver::~Saver() { /*--------------------------------------------------------------------------*/ -void Serialiser::syncPointer(SavedObject **ptr, Common::Serializer::Version minVersion, +void Serialiser::syncPointer(SavedObject **ptr, Common::Serializer::Version minVersion, Common::Serializer::Version maxVersion) { int idx; assert(ptr); @@ -88,7 +88,7 @@ void Serialiser::syncPointer(SavedObject **ptr, Common::Serializer::Version minV } } -void Serialiser::validate(const Common::String &s, Common::Serializer::Version minVersion, +void Serialiser::validate(const Common::String &s, Common::Serializer::Version minVersion, Common::Serializer::Version maxVersion) { Common::String tempStr = s; syncString(tempStr, minVersion, maxVersion); @@ -97,7 +97,7 @@ void Serialiser::validate(const Common::String &s, Common::Serializer::Version m error("Savegame is corrupt"); } -void Serialiser::validate(int v, Common::Serializer::Version minVersion, +void Serialiser::validate(int v, Common::Serializer::Version minVersion, Common::Serializer::Version maxVersion) { int tempVal = v; syncAsUint32LE(tempVal, minVersion, maxVersion); @@ -378,7 +378,7 @@ void Saver::resolveLoadPointers() { } } } - + // At this point, all the unresolved pointers should have been resolved and removed if (_unresolvedPtrs.size() > 0) error("Could not resolve savegame block pointers"); diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h index 2984f88144..83661b8f15 100644 --- a/engines/tsage/saveload.h +++ b/engines/tsage/saveload.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/saveload.h $ - * $Id: saveload.h 209 2011-02-06 00:46:36Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -58,15 +58,15 @@ struct tSageSavegameHeader { /** * Derived serialiser class with extra synchronisation types */ -class Serialiser: public Common::Serializer { +class Serialiser : public Common::Serializer { public: - Serialiser(Common::SeekableReadStream *in, Common::WriteStream *out): Common::Serializer(in, out) {} + Serialiser(Common::SeekableReadStream *in, Common::WriteStream *out) : Common::Serializer(in, out) {} - void syncPointer(SavedObject **ptr, Common::Serializer::Version minVersion = 0, + void syncPointer(SavedObject **ptr, Common::Serializer::Version minVersion = 0, Common::Serializer::Version maxVersion = kLastVersion); - void validate(const Common::String &s, Common::Serializer::Version minVersion = 0, + void validate(const Common::String &s, Common::Serializer::Version minVersion = 0, Common::Serializer::Version maxVersion = kLastVersion); - void validate(int v, Common::Serializer::Version minVersion = 0, + void validate(int v, Common::Serializer::Version minVersion = 0, Common::Serializer::Version maxVersion = kLastVersion); }; @@ -86,7 +86,7 @@ public: /*--------------------------------------------------------------------------*/ -class SavedObject: public Serialisable { +class SavedObject : public Serialisable { public: SavedObject(); virtual ~SavedObject(); @@ -121,7 +121,7 @@ public: // Get the list size entryCount = this->size(); - // Write out list + // Write out list s.syncAsUint32LE(entryCount); for (typename Common::List<T>::iterator i = this->begin(); i != this->end(); ++i) { s.syncPointer((SavedObject **)&*i); @@ -162,8 +162,8 @@ public: SavedObject **_savedObject; int _objIndex; - SavedObjectRef(): _savedObject(NULL), _objIndex(-1) {} - SavedObjectRef(SavedObject **so, int objIndex): _savedObject(so), _objIndex(objIndex) {} + SavedObjectRef() : _savedObject(NULL), _objIndex(-1) {} + SavedObjectRef(SavedObject **so, int objIndex) : _savedObject(so), _objIndex(objIndex) {} }; typedef SavedObject *(*SavedObjectFactory)(const Common::String &className); @@ -198,7 +198,7 @@ public: void addObject(SavedObject *obj); void removeObject(SavedObject *obj); void addFactory(SavedObjectFactory fn) { _factoryPtr = fn; } - void addSavedObjectPtr(SavedObject **ptr, int objIndex) { + void addSavedObjectPtr(SavedObject **ptr, int objIndex) { _unresolvedPtrs.push_back(SavedObjectRef(ptr, objIndex)); } diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp index 20f96f8cae..68320066d7 100644 --- a/engines/tsage/scenes.cpp +++ b/engines/tsage/scenes.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scenes.cpp $ - * $Id: scenes.cpp 229 2011-02-12 06:50:14Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -30,10 +30,10 @@ namespace tSage { -SceneManager::SceneManager() { +SceneManager::SceneManager() { _scene = NULL; _hasPalette = false; - _sceneNumber = -1; + _sceneNumber = -1; _nextSceneNumber = -1; _previousScene = 0; _fadeMode = FADEMODE_GRADUAL; @@ -86,7 +86,7 @@ void SceneManager::sceneChange() { ++ii; sceneItem->remove(); } - + // TODO: Clear _list_45BAA list // If there is an active scene, deactivate it @@ -211,7 +211,7 @@ void SceneManager::setBgOffset(const Common::Point &pt, int loadCount) { void SceneManager::listenerSynchronise(Serialiser &s) { s.validate("SceneManager"); _altSceneObjects.synchronise(s); - + s.syncAsSint32LE(_sceneNumber); if (s.isLoading()) { changeScene(_sceneNumber); @@ -226,7 +226,7 @@ void SceneManager::listenerSynchronise(Serialiser &s) { /*--------------------------------------------------------------------------*/ -Scene::Scene(): _sceneBounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), +Scene::Scene() : _sceneBounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), _backgroundBounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) { _sceneMode = 0; _oldSceneBounds = Rect(4000, 4000, 4100, 4100); @@ -272,7 +272,7 @@ void Scene::loadScene(int sceneNum) { _sceneNumber = sceneNum; if (_globals->_scenePalette.loadPalette(sceneNum)) _globals->_sceneManager._hasPalette = true; - + loadSceneData(sceneNum); } @@ -337,7 +337,7 @@ void Scene::loadBackground(int xAmount, int yAmount) { if ((_backgroundBounds.height() / 100) == 3) _globals->_sceneOffset.y = 0; - if ((_globals->_sceneOffset.x != _globals->_prevSceneOffset.x) || + if ((_globals->_sceneOffset.x != _globals->_prevSceneOffset.x) || (_globals->_sceneOffset.y != _globals->_prevSceneOffset.y)) { // Change has happend, so refresh background _globals->_prevSceneOffset = _globals->_sceneOffset; @@ -386,17 +386,17 @@ void Scene::refreshBackground(int xAmount, int yAmount) { int ySectionDest = yp - yHalfOffset; int xSectionSrc = _enabledSections[xp * 16 + yp] >> 4; int ySectionSrc = _enabledSections[xp * 16 + yp] & 0xf; - - Rect srcBounds(xSectionSrc * 160, ySectionSrc * 100, + + Rect srcBounds(xSectionSrc * 160, ySectionSrc * 100, (xSectionSrc + 1) * 160, (ySectionSrc + 1) * 100); - Rect destBounds(xSectionDest * 160, ySectionDest * 100, + Rect destBounds(xSectionDest * 160, ySectionDest * 100, (xSectionDest + 1) * 160, (ySectionDest + 1) * 100); - _backSurface.copyFrom(_backSurface, srcBounds, destBounds); + _backSurface.copyFrom(_backSurface, srcBounds, destBounds); } } - _enabledSections[xp * 16 + yp] = + _enabledSections[xp * 16 + yp] = ((xp - xHalfOffset) << 4) | (yp - yHalfOffset); } } @@ -418,7 +418,7 @@ void Scene::drawAltObjects() { // Handle updating object priority if (!(obj->_flags & OBJFLAG_FIXED_PRIORITY)) { - obj->_priority = MIN((int)obj->_position.y - 1, + obj->_priority = MIN((int)obj->_position.y - 1, (int)_globals->_sceneManager._scene->_backgroundBounds.bottom); } } @@ -432,7 +432,7 @@ void Scene::drawAltObjects() { obj->reposition(); obj->draw(); - } + } } void Scene::setZoomPercents(int yStart, int minPercent, int yEnd, int maxPercent) { @@ -462,7 +462,7 @@ void Scene::setZoomPercents(int yStart, int minPercent, int yEnd, int maxPercent ++minPercent; } } - } + } while (yEnd < 256) _zoomPercents[yEnd++] = minPercent; diff --git a/engines/tsage/scenes.h b/engines/tsage/scenes.h index 9d969c906b..1a6f92745d 100644 --- a/engines/tsage/scenes.h +++ b/engines/tsage/scenes.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/scenes.h $ - * $Id: scenes.h 216 2011-02-08 08:10:46Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -34,7 +34,7 @@ namespace tSage { -class Scene: public StripCallback { +class Scene : public StripCallback { private: void drawAltObjects(); public: @@ -72,9 +72,9 @@ public: void loadSceneData(int sceneNum); }; -class SceneManager: public GameHandler, public SaveListener { +class SceneManager : public GameHandler, public SaveListener { private: - void disposeRegions() { warning("TODO"); } + void disposeRegions() { warning("TODO: disposeRegions()"); } Scene *getNewScene(); public: Scene *_scene; @@ -100,7 +100,7 @@ public: void changeScene(int newSceneNumber); void setBgOffset(const Common::Point &pt, int loadCount); - void removeAction(Action *action) { + void removeAction(Action *action) { // Not currently implemented because addAction method doesn't seem to have any callers } diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp index e4182cdbb6..7c8325d53e 100644 --- a/engines/tsage/sound.cpp +++ b/engines/tsage/sound.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/sound.cpp $ - * $Id: sound.cpp 204 2011-02-05 12:23:20Z dreammaster $ + * $URL$ + * $Id$ * */ diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h index c25cebd1c2..a495344038 100644 --- a/engines/tsage/sound.h +++ b/engines/tsage/sound.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/sound.h $ - * $Id: sound.h 184 2011-02-03 11:31:38Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -31,7 +31,7 @@ namespace tSage { -class SoundManager: public SaveListener { +class SoundManager : public SaveListener { public: void dispatch() {} virtual void listenerSynchronise(Serialiser &s); diff --git a/engines/tsage/staticres.cpp b/engines/tsage/staticres.cpp index 59fca196b1..46b75e30ea 100644 --- a/engines/tsage/staticres.cpp +++ b/engines/tsage/staticres.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/staticres.cpp $ - * $Id: staticres.cpp 219 2011-02-08 12:05:46Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -28,12 +28,12 @@ namespace tSage { const byte CURSOR_ARROW_DATA[] = { - 15, 0, 15, 0, 0, 0, 0, 0, 9, 0, + 15, 0, 15, 0, 0, 0, 0, 0, 9, 0, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x00, 0xFF, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, - 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, + 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, + 0x00, 0xFF, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, + 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, + 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, diff --git a/engines/tsage/staticres.h b/engines/tsage/staticres.h index d4690e47bc..cb62272735 100644 --- a/engines/tsage/staticres.h +++ b/engines/tsage/staticres.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/staticres.h $ - * $Id: staticres.h 213 2011-02-07 10:02:58Z dreammaster $ + * $URL$ + * $Id$ * */ diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp index 5be5875652..1f6442f2ff 100644 --- a/engines/tsage/tsage.cpp +++ b/engines/tsage/tsage.cpp @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/tsage.cpp $ - * $Id: tsage.cpp 211 2011-02-06 06:59:31Z dreammaster $ + * $URL$ + * $Id$ * */ @@ -41,7 +41,7 @@ namespace tSage { TSageEngine *_vm = NULL; -TSageEngine::TSageEngine(OSystem *system, const tSageGameDescription *gameDesc): Engine(system), +TSageEngine::TSageEngine(OSystem *system, const tSageGameDescription *gameDesc) : Engine(system), _gameDescription(gameDesc) { _vm = this; DebugMan.addDebugChannel(kRingDebugScripts, "scripts", "Scripts debugging"); diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h index 02516152ae..2a627d80bc 100644 --- a/engines/tsage/tsage.h +++ b/engines/tsage/tsage.h @@ -18,8 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL: https://scummvm-misc.svn.sourceforge.net/svnroot/scummvm-misc/trunk/engines/tsage/tsage.h $ - * $Id: tsage.h 212 2011-02-06 10:19:01Z dreammaster $ + * $URL$ + * $Id$ * */ |