diff options
Diffstat (limited to 'engines/titanic')
189 files changed, 475 insertions, 475 deletions
diff --git a/engines/titanic/carry/glass.cpp b/engines/titanic/carry/glass.cpp index 03050dc60d..ff4c54ca39 100644 --- a/engines/titanic/carry/glass.cpp +++ b/engines/titanic/carry/glass.cpp @@ -90,7 +90,7 @@ bool CGlass::UseWithCharMsg(CUseWithCharMsg *msg) { if (_string6 != "Bird") setPosition(_origPos); - + actMsg.execute(msg->_character); } else { petAddToInventory(); diff --git a/engines/titanic/carry/note.cpp b/engines/titanic/carry/note.cpp index 388f87e638..f06e41094f 100644 --- a/engines/titanic/carry/note.cpp +++ b/engines/titanic/carry/note.cpp @@ -35,7 +35,7 @@ void CNote::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeQuotedLine(_string6, indent); file->writeNumberLine(_field138, indent); - + CCarry::save(file, indent); } diff --git a/engines/titanic/carry/phonograph_cylinder.cpp b/engines/titanic/carry/phonograph_cylinder.cpp index 3dedbc4ac9..777aa8be5b 100644 --- a/engines/titanic/carry/phonograph_cylinder.cpp +++ b/engines/titanic/carry/phonograph_cylinder.cpp @@ -118,7 +118,7 @@ bool CPhonographCylinder::QueryCylinderMsg(CQueryCylinderMsg *msg) { bool CPhonographCylinder::RecordOntoCylinderMsg(CRecordOntoCylinderMsg *msg) { _itemName = "STMusic"; - + CQueryMusicControlSettingMsg queryMsg; queryMsg.execute("Bells Mute Control"); _bellsMuteControl = queryMsg._value; @@ -145,7 +145,7 @@ bool CPhonographCylinder::RecordOntoCylinderMsg(CRecordOntoCylinderMsg *msg) { queryMsg.execute("Piano Speed Control"); _pianoSpeedControl = queryMsg._value; queryMsg.execute("Piano Pitch Control"); - _pianoPitchControl = queryMsg._value; + _pianoPitchControl = queryMsg._value; queryMsg.execute("Piano Inversion Control"); _pianoInversionControl = queryMsg._value; queryMsg.execute("Piano Direction Control"); diff --git a/engines/titanic/core/file_item.h b/engines/titanic/core/file_item.h index 4cecee4882..0b02d9d938 100644 --- a/engines/titanic/core/file_item.h +++ b/engines/titanic/core/file_item.h @@ -44,7 +44,7 @@ public: /** * Load the data for the class from file */ - virtual void load(SimpleFile *file); + virtual void load(SimpleFile *file); /** * Returns true if the item is a file item diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 2e3132c2f4..8f71b3d995 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -89,7 +89,7 @@ void CGameObject::save(SimpleFile *file, int indent) { if (_surface) { const CMovieRangeInfoList *rangeList = _surface->getMovieRangeInfo(); - + if (rangeList) { for (CMovieRangeInfoList::const_iterator i = rangeList->begin(); i != rangeList->end(); ++i) { @@ -109,7 +109,7 @@ void CGameObject::save(SimpleFile *file, int indent) { file->writeNumberLine(_field40, indent + 1); file->writeQuotedLine(_resource, indent + 1); file->writeBounds(_bounds, indent + 1); - + file->writeFloatLine(_field34, indent + 1); file->writeFloatLine(_field38, indent + 1); file->writeFloatLine(_field3C, indent + 1); @@ -178,7 +178,7 @@ void CGameObject::load(SimpleFile *file) { _id = file->readNumber(); _roomFlags = file->readNumber(); - resourceKey.load(file); + resourceKey.load(file); _surface = nullptr; val = file->readNumber(); if (val) { @@ -199,7 +199,7 @@ void CGameObject::draw(CScreenManager *screenManager) { if (_credits && _credits->_objectP == this) { if (!_credits->draw()) CGameObject::deinit(); - + return; } @@ -354,7 +354,7 @@ void CGameObject::loadMovie(const CString &name, bool pendingFlag) { // Create the surface if it doesn't already exist if (!_surface) { CGameManager *gameManager = getGameManager(); - _surface = new OSVideoSurface(gameManager->setScreenManager(), nullptr); + _surface = new OSVideoSurface(gameManager->setScreenManager(), nullptr); } // Load the new movie resource @@ -405,7 +405,7 @@ void CGameObject::loadFrame(int frameNumber) { _frameNumber = -1; if (!_resource.empty()) loadResource(_resource); - + if (_surface) _surface->setMovieFrame(frameNumber); @@ -859,14 +859,14 @@ CViewItem *CGameObject::parseView(const CString &viewString) { CRoomItem *room = gameManager->getRoom(); CProjectItem *project = room->getRoot(); - + // Ensure we have the specified room if (project) { if (room->getName() != roomName) { // Scan for the correct room for (room = project->findFirstRoom(); room && room->getName() != roomName; room = project->findNextRoom(room)) ; - } + } } if (!room) return nullptr; @@ -954,7 +954,7 @@ CGameObject *CGameObject::findMailByFlags(int mode, uint roomFlags) { CMailMan *mailMan = getMailMan(); if (!mailMan) return nullptr; - + for (CGameObject *obj = mailMan->getFirstObject(); obj; obj = mailMan->getNextObject(obj)) { if (compareRoomFlags(mode, roomFlags, obj->_roomFlags)) @@ -1078,7 +1078,7 @@ void CGameObject::setText(const CString &str, int border, int borderRight) { _text = new CPetText(); _textBorder = border; _textBorderRight = borderRight; - + _text->setText(str); CScreenManager *screenManager = getGameManager()->setScreenManager(); _text->scrollToTop(screenManager); @@ -1208,7 +1208,7 @@ bool CGameObject::changeView(const CString &viewName, const CString &clipName) { if (!oldView || !newView) return false; - + CMovieClip *clip = nullptr; if (!clipName.empty()) { clip = oldView->findNode()->findRoom()->findClip(clipName); diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index b9a55ac008..b50278cf21 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -401,7 +401,7 @@ protected: * Clear the PET display */ void petClear() const; - + /** * Returns the MailMan */ @@ -488,7 +488,7 @@ protected: * Locks the PET, disabling all input. Can be called multiple times */ void petLockInput(); - + /** * Unlocks PET input */ @@ -646,7 +646,7 @@ public: * Change the object's status */ void playMovie(uint flags); - + /** * Play the movie specified in _resource */ @@ -671,7 +671,7 @@ public: * Get the current movie frame */ int getMovieFrame() const; - + /** * Returns the object's frame number */ @@ -706,7 +706,7 @@ public: * Return the player's passenger class */ int getPassengerClass() const; - + /** * Return the player's previous passenger class */ @@ -732,7 +732,7 @@ public: * Returns a hidden object */ CGameObject *getHiddenObject(const CString &name) const; - + /** * Sets up credits text */ @@ -742,7 +742,7 @@ public: * Support function for drag moving */ void dragMove(const Point &pt); - + /** * Returns the currently dragging item (if any) if it's a game object */ @@ -965,17 +965,17 @@ public: /*--- CGameState Methods ---*/ void setState1C(bool flag); - + /** * Change to the next season */ void stateChangeSeason(); - + /** * Returns the currently active season */ Season stateGetSeason() const; - + void stateSet24(); int stateGet24() const; void stateInc38(); diff --git a/engines/titanic/core/link_item.cpp b/engines/titanic/core/link_item.cpp index f77d081c61..559191efc9 100644 --- a/engines/titanic/core/link_item.cpp +++ b/engines/titanic/core/link_item.cpp @@ -57,8 +57,8 @@ CString CLinkItem::formName() { view->getName().c_str(), destView->getName().c_str()); case 3: - return CString::format("_TRACK,%d,%s,%d,%s", - node->_nodeNumber, view->getName().c_str(), + return CString::format("_TRACK,%d,%s,%d,%s", + node->_nodeNumber, view->getName().c_str(), destNode->_nodeNumber, destView->getName().c_str()); case 4: diff --git a/engines/titanic/core/list.h b/engines/titanic/core/list.h index 91a74adbdc..09068fb06a 100644 --- a/engines/titanic/core/list.h +++ b/engines/titanic/core/list.h @@ -130,7 +130,7 @@ public: */ void destroyContents() { typename Common::List<T *>::iterator i; - for (i = Common::List<T *>::begin(); + for (i = Common::List<T *>::begin(); i != Common::List<T *>::end(); ++i) { CSaveableObject *obj = *i; delete obj; @@ -149,7 +149,7 @@ public: } bool contains(const T *item) const { - for (typename Common::List<T *>::const_iterator i = Common::List<T *>::begin(); + for (typename Common::List<T *>::const_iterator i = Common::List<T *>::begin(); i != Common::List<T *>::end(); ++i) { if (*i == item) return true; diff --git a/engines/titanic/core/message_target.cpp b/engines/titanic/core/message_target.cpp index 4815d03973..a1060c643e 100644 --- a/engines/titanic/core/message_target.cpp +++ b/engines/titanic/core/message_target.cpp @@ -24,7 +24,7 @@ namespace Titanic { -const MSGMAP *CMessageTarget::getMessageMap() const { +const MSGMAP *CMessageTarget::getMessageMap() const { return getThisMessageMap(); } diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp index 76293233b0..65e8645baa 100644 --- a/engines/titanic/core/project_item.cpp +++ b/engines/titanic/core/project_item.cpp @@ -287,7 +287,7 @@ void CProjectItem::saveData(SimpleFile *file, CTreeItem *item) const { item->saveHeader(file, 0); item->save(file, 1); item->saveFooter(file, 0); - + CTreeItem *child = item->getFirstChild(); if (child) { file->write("\n{\n", 3); @@ -300,7 +300,7 @@ void CProjectItem::saveData(SimpleFile *file, CTreeItem *item) const { file->write("\n{\n", 3); file->writeQuotedString("ALONG"); } - + file->write("\n}\n", 3); item = item->getNextSibling(); } diff --git a/engines/titanic/core/project_item.h b/engines/titanic/core/project_item.h index 473ffd9556..4d009dd50b 100644 --- a/engines/titanic/core/project_item.h +++ b/engines/titanic/core/project_item.h @@ -66,7 +66,7 @@ public: /** * Load the data for the class from file */ - virtual void load(SimpleFile *file); + virtual void load(SimpleFile *file); }; /** @@ -89,7 +89,7 @@ private: * Called during save, iterates through the children to do some stuff */ void buildFilesList(); - + /** * Called at the beginning of loading a game */ @@ -161,7 +161,7 @@ public: /** * Load the data for the class from file */ - virtual void load(SimpleFile *file); + virtual void load(SimpleFile *file); /** * Get the game manager for the project diff --git a/engines/titanic/core/resource_key.cpp b/engines/titanic/core/resource_key.cpp index 3b390af2d4..3db5812d7d 100644 --- a/engines/titanic/core/resource_key.cpp +++ b/engines/titanic/core/resource_key.cpp @@ -37,7 +37,7 @@ void CResourceKey::save(SimpleFile *file, int indent) { void CResourceKey::load(SimpleFile *file) { int val = file->readNumber(); - + if (val == 0 || val == 1) { file->readBuffer(); CString str = file->readString(); diff --git a/engines/titanic/core/room_item.cpp b/engines/titanic/core/room_item.cpp index 49b3232ba1..1c360c7571 100644 --- a/engines/titanic/core/room_item.cpp +++ b/engines/titanic/core/room_item.cpp @@ -59,7 +59,7 @@ void CRoomItem::save(SimpleFile *file, int indent) { void CRoomItem::load(SimpleFile *file) { int val = file->readNumber(); - + switch (val) { case 3: // Read exit movie @@ -114,7 +114,7 @@ void CRoomItem::postLoad() { void CRoomItem::calcNodePosition(const Point &nodePos, double &xVal, double &yVal) const { xVal = yVal = 0.0; - + if (_roomDimensionX >= 0.0 && _roomDimensionY >= 0.0) { xVal = _roomRect.width() / _roomDimensionX; yVal = _roomRect.height() / _roomDimensionY; diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index 630404a6ee..7522a34737 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -421,7 +421,7 @@ CSaveableObject *ClassDef::create() { /*------------------------------------------------------------------------*/ -Common::HashMap<Common::String, CSaveableObject::CreateFunction> * +Common::HashMap<Common::String, CSaveableObject::CreateFunction> * CSaveableObject::_classList = nullptr; Common::List<ClassDef *> *CSaveableObject::_classDefs; @@ -1346,7 +1346,7 @@ void CSaveableObject::initClassList() { ADDFN(CTextUp, CPetGraphic); ADDFN(CToggleButton, CBackground); ADDFN(CToggleSwitch, CGameObject); - + ADDFN(CActMsg, CMessage); ADDFN(CActivationmsg, CMessage); ADDFN(CAddHeadPieceMsg, CMessage); diff --git a/engines/titanic/core/saveable_object.h b/engines/titanic/core/saveable_object.h index 6d80ad121d..4c7c1a7737 100644 --- a/engines/titanic/core/saveable_object.h +++ b/engines/titanic/core/saveable_object.h @@ -47,7 +47,7 @@ public: template<typename T> class TypeTemplate : public ClassDef { public: - TypeTemplate(const char *className, ClassDef *parent) : + TypeTemplate(const char *className, ClassDef *parent) : ClassDef(className, parent) {} virtual CSaveableObject *create() { return new T(); } }; @@ -79,7 +79,7 @@ public: public: CLASSDEF virtual ~CSaveableObject() {} - + bool isInstanceOf(const ClassDef *classDef) const; /** @@ -91,13 +91,13 @@ public: * Load the data for the class from file */ virtual void load(SimpleFile *file); - + /** * Write out a header definition for the class to file * prior to saving the actual data for the class */ virtual void saveHeader(SimpleFile *file, int indent); - + /** * Writes out a footer for the class after it's data has * been written to file diff --git a/engines/titanic/core/tree_item.cpp b/engines/titanic/core/tree_item.cpp index 86c34cab8b..97d06d7bbe 100644 --- a/engines/titanic/core/tree_item.cpp +++ b/engines/titanic/core/tree_item.cpp @@ -51,7 +51,7 @@ void CTreeItem::dump(int indent) { CTreeItem *item = getFirstChild(); while (item) { item->dump(indent + 1); - + item = item->getNextSibling(); } } diff --git a/engines/titanic/core/turn_on_play_sound.cpp b/engines/titanic/core/turn_on_play_sound.cpp index ab50b33134..44a9b3b0eb 100644 --- a/engines/titanic/core/turn_on_play_sound.cpp +++ b/engines/titanic/core/turn_on_play_sound.cpp @@ -28,7 +28,7 @@ BEGIN_MESSAGE_MAP(CTurnOnPlaySound, CTurnOnObject) ON_MESSAGE(MouseButtonUpMsg) END_MESSAGE_MAP() -CTurnOnPlaySound::CTurnOnPlaySound() : CTurnOnObject(), +CTurnOnPlaySound::CTurnOnPlaySound() : CTurnOnObject(), _soundName("NULL"), _soundVolume(80), _soundVal3(0) { } diff --git a/engines/titanic/core/view_item.cpp b/engines/titanic/core/view_item.cpp index 176765b12f..9b20860a46 100644 --- a/engines/titanic/core/view_item.cpp +++ b/engines/titanic/core/view_item.cpp @@ -63,7 +63,7 @@ void CViewItem::save(SimpleFile *file, int indent) { void CViewItem::load(SimpleFile *file) { int val = file->readNumber(); - + switch (val) { case 1: _resourceKey.load(file); @@ -86,7 +86,7 @@ bool CViewItem::getResourceKey(CResourceKey *key) { } void CViewItem::leaveView(CViewItem *newView) { - // Only do the processing if we've been passed a view, and it's not the same + // Only do the processing if we've been passed a view, and it's not the same if (newView && newView != this) { CLeaveViewMsg viewMsg(this, newView); viewMsg.execute(this, nullptr, MSGFLAG_SCAN); @@ -112,7 +112,7 @@ void CViewItem::leaveView(CViewItem *newView) { } void CViewItem::preEnterView(CViewItem *newView) { - // Only do the processing if we've been passed a view, and it's not the same + // Only do the processing if we've been passed a view, and it's not the same if (newView && newView != this) { CPreEnterViewMsg viewMsg(this, newView); viewMsg.execute(newView, nullptr, MSGFLAG_SCAN); @@ -134,7 +134,7 @@ void CViewItem::preEnterView(CViewItem *newView) { } void CViewItem::enterView(CViewItem *newView) { - // Only do the processing if we've been passed a view, and it's not the same + // Only do the processing if we've been passed a view, and it's not the same if (newView && newView != this) { CEnterViewMsg viewMsg(this, newView); viewMsg.execute(newView, nullptr, MSGFLAG_SCAN); diff --git a/engines/titanic/debugger.cpp b/engines/titanic/debugger.cpp index 086c6bfaaa..5d95ef5186 100644 --- a/engines/titanic/debugger.cpp +++ b/engines/titanic/debugger.cpp @@ -112,7 +112,7 @@ void Debugger::listRooms() { CRoomItem *room = gm._gameState._gameLocation.getRoom(); debugPrintf("Current location: %s, %s, %s\n", room->getName().c_str(), node->getName().c_str(), view->getName().c_str()); - + debugPrintf("Available rooms:\n"); for (CTreeItem *treeItem = root; treeItem; treeItem = treeItem->scan(root)) { CRoomItem *roomItem = dynamic_cast<CRoomItem *>(treeItem); @@ -142,7 +142,7 @@ bool Debugger::cmdDump(int argc, const char **argv) { CTreeItem *root = g_vm->_window->_gameManager->_project; if (argc == 2) root = root->findByName(argv[1]); - + if (root == nullptr) { debugPrintf("Could not find item\n"); } else { @@ -207,7 +207,7 @@ bool Debugger::cmdPET(int argc, const char **argv) { return true; } } - + debugPrintf("%s [on | off]\n", argv[0]); return true; } diff --git a/engines/titanic/debugger.h b/engines/titanic/debugger.h index cae8a07d80..919d6c5358 100644 --- a/engines/titanic/debugger.h +++ b/engines/titanic/debugger.h @@ -44,27 +44,27 @@ private: * Find a room by name or number */ CRoomItem *findRoom(const char *name); - + /** * Find a node within a room by name or number */ CNodeItem *findNode(CRoomItem *room, const char *name); - + /** * Find a view within a room node by name or number */ CViewItem *findView(CNodeItem *node, const char *name); - + /** * List all the rooms in the game */ void listRooms(); - + /** * List the nodes within a room */ void listRoom(CRoomItem *room); - + /** * List the views within a room node */ diff --git a/engines/titanic/detection.cpp b/engines/titanic/detection.cpp index 096cd4b618..33bae22312 100644 --- a/engines/titanic/detection.cpp +++ b/engines/titanic/detection.cpp @@ -128,7 +128,7 @@ SaveStateList TitanicMetaEngine::listSaves(const char *target) const { if (in) { Titanic::CompressedFile cf; cf.open(in); - + if (Titanic::CProjectItem::readSavegameHeader(&cf, header)) saveList.push_back(SaveStateDescriptor(slot, header._saveName)); diff --git a/engines/titanic/detection_tables.h b/engines/titanic/detection_tables.h index ba67942dfe..5ff09cec16 100644 --- a/engines/titanic/detection_tables.h +++ b/engines/titanic/detection_tables.h @@ -21,7 +21,7 @@ */ namespace Titanic { - + static const TitanicGameDescription gameDescriptions[] = { { { diff --git a/engines/titanic/events.h b/engines/titanic/events.h index 68666c7c46..3ea9b63217 100644 --- a/engines/titanic/events.h +++ b/engines/titanic/events.h @@ -34,8 +34,8 @@ namespace Titanic { #define GAME_FRAME_TIME (1000 / GAME_FRAME_RATE) #define DOUBLE_CLICK_TIME 100 -enum SpecialButtons { - MK_LBUTTON = 1, MK_RBUTTON = 2, MK_SHIFT = 4, MK_CONTROL = 8, +enum SpecialButtons { + MK_LBUTTON = 1, MK_RBUTTON = 2, MK_SHIFT = 4, MK_CONTROL = 8, MK_MBUTTON = 0x10 }; diff --git a/engines/titanic/game/bar_menu.cpp b/engines/titanic/game/bar_menu.cpp index 3812a8dab6..476e243fe9 100644 --- a/engines/titanic/game/bar_menu.cpp +++ b/engines/titanic/game/bar_menu.cpp @@ -40,7 +40,7 @@ void CBarMenu::save(SimpleFile *file, int indent) { file->writeNumberLine(_barFrameNumber, indent); file->writeNumberLine(_visibleFlag, indent); file->writeNumberLine(_numFrames, indent); - + CGameObject::save(file, indent); } @@ -67,7 +67,7 @@ bool CBarMenu::PETDownMsg(CPETDownMsg *msg) { if (_visibleFlag) { if (--_barFrameNumber < 0) _barFrameNumber = _numFrames - 1; - + loadFrame(_barFrameNumber); } diff --git a/engines/titanic/game/cdrom_computer.cpp b/engines/titanic/game/cdrom_computer.cpp index ceb0595188..5fd8e16350 100644 --- a/engines/titanic/game/cdrom_computer.cpp +++ b/engines/titanic/game/cdrom_computer.cpp @@ -29,7 +29,7 @@ BEGIN_MESSAGE_MAP(CCDROMComputer, CGameObject) ON_MESSAGE(MouseButtonDownMsg) END_MESSAGE_MAP() -CCDROMComputer::CCDROMComputer() : CGameObject(), +CCDROMComputer::CCDROMComputer() : CGameObject(), _clickRect(0, 3, 55, 32) { } @@ -58,7 +58,7 @@ bool CCDROMComputer::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { if (tray) { CStatusChangeMsg statusMsg; statusMsg.execute(tray); - + if (!statusMsg._success) { // Check if the mouse is within the clickable area Rect tempRect = _clickRect; diff --git a/engines/titanic/game/cdrom_tray.cpp b/engines/titanic/game/cdrom_tray.cpp index 1e5b135d35..505bdad319 100644 --- a/engines/titanic/game/cdrom_tray.cpp +++ b/engines/titanic/game/cdrom_tray.cpp @@ -110,7 +110,7 @@ bool CCDROMTray::ActMsg(CActMsg *msg) { bool CCDROMTray::MovieEndMsg(CMovieEndMsg *msg) { CTreeItem *screen = getRoom()->findByName("newScreen"); - + if (screen) { CActMsg actMsg(_insertedCD); actMsg.execute(screen); diff --git a/engines/titanic/game/chev_code.cpp b/engines/titanic/game/chev_code.cpp index 0acdf575f4..9381e1563a 100644 --- a/engines/titanic/game/chev_code.cpp +++ b/engines/titanic/game/chev_code.cpp @@ -69,7 +69,7 @@ bool CChevCode::SetChevFloorBits(CSetChevFloorBits *msg) { int section = (msg->_floorNum + 4) / 10; int index = (msg->_floorNum + 4) % 10; _chevCode &= ~0xFF00; - + int val = 0; switch (section) { case 0: @@ -87,7 +87,7 @@ bool CChevCode::SetChevFloorBits(CSetChevFloorBits *msg) { default: break; } - + _chevCode |= ((index + val) << 8); return true; } diff --git a/engines/titanic/game/chev_panel.cpp b/engines/titanic/game/chev_panel.cpp index ed730c9d61..5b58cbe594 100644 --- a/engines/titanic/game/chev_panel.cpp +++ b/engines/titanic/game/chev_panel.cpp @@ -41,7 +41,7 @@ void CChevPanel::save(SimpleFile *file, int indent) { file->writeNumberLine(_startPos.x, indent); file->writeNumberLine(_startPos.y, indent); file->writeNumberLine(_chevCode, indent); - + CGameObject::save(file, indent); } diff --git a/engines/titanic/game/chicken_dispensor.cpp b/engines/titanic/game/chicken_dispensor.cpp index e1e07844e1..8e02a1ec5c 100644 --- a/engines/titanic/game/chicken_dispensor.cpp +++ b/engines/titanic/game/chicken_dispensor.cpp @@ -107,7 +107,7 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) { _fieldE8 = 1; } break; - + default: break; } diff --git a/engines/titanic/game/code_wheel.cpp b/engines/titanic/game/code_wheel.cpp index 71d59ff514..441fddec02 100644 --- a/engines/titanic/game/code_wheel.cpp +++ b/engines/titanic/game/code_wheel.cpp @@ -77,7 +77,7 @@ bool CodeWheel::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { _state = (_state + 1) % 15; playMovie(START_FRAMES[_state], END_FRAMES[_state], - MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT); + MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT); } else { if (_state == _field108) _field110 = true; @@ -112,7 +112,7 @@ bool CodeWheel::MovieEndMsg(CMovieEndMsg *msg) { changeMsg._newStatus = 1; changeMsg.execute("Bomb"); - return true; + return true; } } // End of namespace Titanic diff --git a/engines/titanic/game/computer_screen.cpp b/engines/titanic/game/computer_screen.cpp index 9a7ac4b34e..98bef6eb63 100644 --- a/engines/titanic/game/computer_screen.cpp +++ b/engines/titanic/game/computer_screen.cpp @@ -99,7 +99,7 @@ bool CComputerScreen::TimerMsg(CTimerMsg *msg) { playClip(51, 150); playSound("a#31.wav"); playClip(151, 200); - + handle = playSound("a#27.wav"); playClip(200, 306); playSound("a#30.wav"); @@ -116,7 +116,7 @@ bool CComputerScreen::TimerMsg(CTimerMsg *msg) { playClip(392, 450); startTalking("Doorbot", 0x3611A); sleep(8000); - + playClip(450, 492); startTalking("Doorbot", 0x36121); playClip(492, 522); diff --git a/engines/titanic/game/credits.cpp b/engines/titanic/game/credits.cpp index d9149f6dd2..e13a2ce6f4 100644 --- a/engines/titanic/game/credits.cpp +++ b/engines/titanic/game/credits.cpp @@ -36,7 +36,7 @@ void CCredits::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_fieldBC, indent); file->writeNumberLine(_fieldC0, indent); - + CGameObject::save(file, indent); } @@ -60,7 +60,7 @@ bool CCredits::TimerMsg(CTimerMsg *msg) { setVisible(true); loadSound("a#16.wav"); loadSound("a#24.wav"); - + playCutscene(0, 18); playGlobalSound("a#16.wav", -1, false, false, 0); playCutscene(19, 642); diff --git a/engines/titanic/game/fan_control.cpp b/engines/titanic/game/fan_control.cpp index ad3efc92fb..288fdb639f 100644 --- a/engines/titanic/game/fan_control.cpp +++ b/engines/titanic/game/fan_control.cpp @@ -128,7 +128,7 @@ bool CFanControl::StatusChangeMsg(CStatusChangeMsg *msg) { } } break; - + default: break; } diff --git a/engines/titanic/game/fan_noises.cpp b/engines/titanic/game/fan_noises.cpp index 9144f523f4..d285563de3 100644 --- a/engines/titanic/game/fan_noises.cpp +++ b/engines/titanic/game/fan_noises.cpp @@ -96,7 +96,7 @@ bool CFanNoises::LeaveRoomMsg(CLeaveRoomMsg *msg) { if (getParent() == msg->_oldRoom && _soundHandle != -1) { if (isSoundActive(_soundHandle)) stopSound(_soundHandle, _stopSeconds); - + _soundHandle = -1; _startFlag = false; } diff --git a/engines/titanic/game/gondolier/gondolier_mixer.cpp b/engines/titanic/game/gondolier/gondolier_mixer.cpp index 26deda8bca..fc71ddd357 100644 --- a/engines/titanic/game/gondolier/gondolier_mixer.cpp +++ b/engines/titanic/game/gondolier/gondolier_mixer.cpp @@ -73,7 +73,7 @@ bool CGondolierMixer::EnterRoomMsg(CEnterRoomMsg *msg) { CTurnOn onMsg; onMsg.execute(this); } - + return true; } diff --git a/engines/titanic/game/gondolier/gondolier_slider.cpp b/engines/titanic/game/gondolier/gondolier_slider.cpp index e7a46eb33d..e7ca61de9c 100644 --- a/engines/titanic/game/gondolier/gondolier_slider.cpp +++ b/engines/titanic/game/gondolier/gondolier_slider.cpp @@ -190,7 +190,7 @@ bool CGondolierSlider::FrameMsg(CFrameMsg *msg) { int yp = 0; if (_arrayIndex > 0) yp = ARRAY[_arrayIndex] - ARRAY[_arrayIndex - 1]; - + if (!_string2.empty()) { CTranslateObjectMsg transMsg; transMsg._delta = Point(0, yp); diff --git a/engines/titanic/game/head_slot.cpp b/engines/titanic/game/head_slot.cpp index f7df02d364..06c366abd6 100644 --- a/engines/titanic/game/head_slot.cpp +++ b/engines/titanic/game/head_slot.cpp @@ -87,9 +87,9 @@ bool CHeadSlot::AddHeadPieceMsg(CAddHeadPieceMsg *msg) { } bool CHeadSlot::SenseWorkingMsg(CSenseWorkingMsg *msg) { - if (_fieldEC) + if (_fieldEC) playMovie(_fieldE4, _fieldE8, 0); - + _string1 = msg->_value; _fieldEC = false; return true; diff --git a/engines/titanic/game/idle_summoner.cpp b/engines/titanic/game/idle_summoner.cpp index 5ca3209e28..0e3604a4a9 100644 --- a/engines/titanic/game/idle_summoner.cpp +++ b/engines/titanic/game/idle_summoner.cpp @@ -82,7 +82,7 @@ bool CIdleSummoner::TimerMsg(CTimerMsg *msg) { int region = talkGetDialRegion("BellBot", 1); uint delay = region == 1 ? 15000 : 12000; uint enterTicks = MIN(getNodeEnterTicks(), _ticks); - + CString name; uint ticks = getTicksCount() - enterTicks; if (ticks > delay) { diff --git a/engines/titanic/game/light_switch.cpp b/engines/titanic/game/light_switch.cpp index 188691033a..6badf63b5b 100644 --- a/engines/titanic/game/light_switch.cpp +++ b/engines/titanic/game/light_switch.cpp @@ -40,7 +40,7 @@ END_MESSAGE_MAP() bool CLightSwitch::_flag; -CLightSwitch::CLightSwitch() : CBackground(), +CLightSwitch::CLightSwitch() : CBackground(), _fieldE0(0), _fieldE4(0), _fieldE8(0) { } diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp index 6f47131716..8f7845bc3f 100644 --- a/engines/titanic/game/missiveomat.cpp +++ b/engines/titanic/game/missiveomat.cpp @@ -96,7 +96,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) { if (editMsg._param == 1000) { editMsg._mode = 3; editMsg.execute(loginControl); - + _string1 = editMsg._text; if (!_string1.empty()) { loadFrame(2); @@ -222,7 +222,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) { CString *strP = &_messages[_personIndex * 19]; for (_totalMessages = 0; !strP->empty(); ++strP, ++_totalMessages) ; - + CMissiveOMatActionMsg actionMsg; actionMsg._action = REDRAW_MESSAGE; actionMsg.execute(this); @@ -237,7 +237,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) { actionMsg.execute(this); } break; - + case PRIOR_MESSAGE: if (_messageNum > 0) { --_messageNum; diff --git a/engines/titanic/game/music_console_button.cpp b/engines/titanic/game/music_console_button.cpp index dc86765476..40492aafe4 100644 --- a/engines/titanic/game/music_console_button.cpp +++ b/engines/titanic/game/music_console_button.cpp @@ -56,7 +56,7 @@ bool CMusicConsoleButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { CMusicHasStartedMsg startedMsg; startedMsg.execute("Music Room Phonograph"); - + if (CMusicRoom::_musicHandler->checkSound(1) && CMusicRoom::_musicHandler->checkSound(2) && CMusicRoom::_musicHandler->checkSound(3)) { @@ -82,7 +82,7 @@ bool CMusicConsoleButton::LeaveViewMsg(CLeaveViewMsg *msg) { bool CMusicConsoleButton::SetMusicControlsMsg(CSetMusicControlsMsg *msg) { CMusicRoom *musicRoom = getMusicRoom(); CQueryMusicControlSettingMsg queryMsg; - + queryMsg.execute("Bells Mute Control"); musicRoom->setMuteControl(BELLS, queryMsg._value == 1 ? 1 : 0); queryMsg.execute("Bells Pitch Control"); diff --git a/engines/titanic/game/nav_helmet.cpp b/engines/titanic/game/nav_helmet.cpp index 96411ad6b7..3e2a38486d 100644 --- a/engines/titanic/game/nav_helmet.cpp +++ b/engines/titanic/game/nav_helmet.cpp @@ -100,7 +100,7 @@ bool CNavHelmet::PETHelmetOnOffMsg(CPETHelmetOnOffMsg *msg) { playSound("a#48.wav"); playSound("a#47.wav"); } - + return true; } diff --git a/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp b/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp index 2654042967..69fc629606 100644 --- a/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp +++ b/engines/titanic/game/parrot/parrot_nut_bowl_actor.cpp @@ -35,7 +35,7 @@ BEGIN_MESSAGE_MAP(CParrotNutBowlActor, CGameObject) ON_MESSAGE(NutPuzzleMsg) END_MESSAGE_MAP() -CParrotNutBowlActor::CParrotNutBowlActor() : CGameObject(), +CParrotNutBowlActor::CParrotNutBowlActor() : CGameObject(), _puzzleDone(0), _state(0) { } @@ -43,7 +43,7 @@ void CParrotNutBowlActor::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_puzzleDone, indent); file->writeNumberLine(_state, indent); - + CGameObject::save(file, indent); } diff --git a/engines/titanic/game/parrot/parrot_nut_eater.cpp b/engines/titanic/game/parrot/parrot_nut_eater.cpp index 751da931ac..49b8de509f 100644 --- a/engines/titanic/game/parrot/parrot_nut_eater.cpp +++ b/engines/titanic/game/parrot/parrot_nut_eater.cpp @@ -39,7 +39,7 @@ CParrotNutEater::CParrotNutEater() : CGameObject(), _fieldBC(0), void CParrotNutEater::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_fieldBC, indent); - + CGameObject::save(file, indent); } diff --git a/engines/titanic/game/place_holder_item.cpp b/engines/titanic/game/place_holder_item.cpp index ecd9c9a10b..108c25ced8 100644 --- a/engines/titanic/game/place_holder_item.cpp +++ b/engines/titanic/game/place_holder_item.cpp @@ -44,7 +44,7 @@ void CPlaceHolderItem::save(SimpleFile *file, int indent) { file->writePoint(_pos1, indent); file->writePoint(_pos2, indent); file->writeQuotedLine(_string1, indent); - + CNamedItem::save(file, indent); } @@ -89,7 +89,7 @@ void CPlaceHolderItem::load(SimpleFile *file) { default: break; } - + CNamedItem::load(file); } diff --git a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h index 8ad3dcb8d1..25613643ea 100644 --- a/engines/titanic/game/placeholder/bar_shelf_vis_centre.h +++ b/engines/titanic/game/placeholder/bar_shelf_vis_centre.h @@ -37,7 +37,7 @@ private: public: CLASSDEF; CBarShelfVisCentre() : CPlaceHolder(), _flag(false) {} - + /** * Save the data for the class to file */ diff --git a/engines/titanic/game/restaurant_cylinder_holder.cpp b/engines/titanic/game/restaurant_cylinder_holder.cpp index 8726d1a925..adf029d8f7 100644 --- a/engines/titanic/game/restaurant_cylinder_holder.cpp +++ b/engines/titanic/game/restaurant_cylinder_holder.cpp @@ -121,7 +121,7 @@ bool CRestaurantCylinderHolder::MovieEndMsg(CMovieEndMsg *msg) { bool CRestaurantCylinderHolder::QueryCylinderHolderMsg(CQueryCylinderHolderMsg *msg) { CNamedItem *cylinder = findByName("Phonograph Cylinder", true); - msg->_value1 = _field118; + msg->_value1 = _field118; if (cylinder) { msg->_value2 = 1; msg->_target = cylinder; diff --git a/engines/titanic/game/sauce_dispensor.cpp b/engines/titanic/game/sauce_dispensor.cpp index 410d4a3153..7010d00be1 100644 --- a/engines/titanic/game/sauce_dispensor.cpp +++ b/engines/titanic/game/sauce_dispensor.cpp @@ -67,7 +67,7 @@ void CSauceDispensor::load(SimpleFile *file) { bool CSauceDispensor::Use(CUse *msg) { CVisibleMsg visibleMsg(true); - + if (msg->_item->isEquals("Chicken")) { CChicken *chicken = static_cast<CChicken *>(msg->_item); _field104 = true; @@ -113,7 +113,7 @@ bool CSauceDispensor::Use(CUse *msg) { CActMsg actMsg(_string3); actMsg.execute("BeerGlass"); - } + } } return true; diff --git a/engines/titanic/game/service_elevator_window.cpp b/engines/titanic/game/service_elevator_window.cpp index b0cc53abb4..13db7a26f8 100644 --- a/engines/titanic/game/service_elevator_window.cpp +++ b/engines/titanic/game/service_elevator_window.cpp @@ -69,7 +69,7 @@ bool CServiceElevatorWindow::ServiceElevatorFloorChangeMsg(CServiceElevatorFloor int count = _endFrame - _startFrame; setMovieFrameRate(1.0 * count / val); - + int startFrame = clip->_startFrame + count * FACTORS[msg->_value1] / 100; int endFrame = clip->_startFrame + count * FACTORS[msg->_value2] / 100; @@ -107,7 +107,7 @@ bool CServiceElevatorWindow::EnterViewMsg(CEnterViewMsg *msg) { loadFrame(0); } } - + return true; } diff --git a/engines/titanic/game/sgt/chest_of_drawers.cpp b/engines/titanic/game/sgt/chest_of_drawers.cpp index d9c72d3021..2db26addf5 100644 --- a/engines/titanic/game/sgt/chest_of_drawers.cpp +++ b/engines/titanic/game/sgt/chest_of_drawers.cpp @@ -58,7 +58,7 @@ bool CChestOfDrawers::TurnOff(CTurnOff *msg) { visibleMsg.execute("Drawer"); _statics->_v6 = "Closed"; _fieldE0 = true; - + _startFrame = 14; _endFrame = 27; playMovie(14, 27, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp index 780f92b5ad..571ebcd6fa 100644 --- a/engines/titanic/game/television.cpp +++ b/engines/titanic/game/television.cpp @@ -137,7 +137,7 @@ bool CTelevision::ChangeSeasonMsg(CChangeSeasonMsg *msg) { _v3 = 0; } - return true; + return true; } bool CTelevision::EnterViewMsg(CEnterViewMsg *msg) { @@ -219,7 +219,7 @@ bool CTelevision::PETActivateMsg(CPETActivateMsg *msg) { stopMovie(); if (isSoundActive(_soundHandle)) stopSound(_soundHandle, 0); - + setVisible(false); } diff --git a/engines/titanic/game/transport/lift_indicator.cpp b/engines/titanic/game/transport/lift_indicator.cpp index 10d62a0775..a642451fe0 100644 --- a/engines/titanic/game/transport/lift_indicator.cpp +++ b/engines/titanic/game/transport/lift_indicator.cpp @@ -150,7 +150,7 @@ bool CLiftindicator::PETActivateMsg(CPETActivateMsg *msg) { petDisplayMessage(1, BOT_BLOCKING_ELEVATOR); } else { _endFrame = pet->getRoomsFloorNum(); - + if (petGetRoomsWellEntry() == 4 && !CLift::_v6 && pet->getRoomsFloorNum() != CLift::_elevator4Floor) { petDisplayMessage(1, ELEVATOR_NON_FUNCTIONAL); diff --git a/engines/titanic/game/transport/service_elevator.cpp b/engines/titanic/game/transport/service_elevator.cpp index 1980825cb6..066a418dbb 100644 --- a/engines/titanic/game/transport/service_elevator.cpp +++ b/engines/titanic/game/transport/service_elevator.cpp @@ -24,7 +24,7 @@ #include "titanic/core/room_item.h" #include "titanic/npcs/doorbot.h" -namespace Titanic { +namespace Titanic { BEGIN_MESSAGE_MAP(CServiceElevator, CTransport) ON_MESSAGE(BodyInBilgeRoomMsg) @@ -182,7 +182,7 @@ bool CServiceElevator::TimerMsg(CTimerMsg *msg) { else if (_v3 == 1) actMsg._action = "DoorbotPlayerPressedMiddleButton"; - actMsg.execute(doorbot); + actMsg.execute(doorbot); } } } diff --git a/engines/titanic/game/variable_list.cpp b/engines/titanic/game/variable_list.cpp index 1ddf1bc957..2a4a7df961 100644 --- a/engines/titanic/game/variable_list.cpp +++ b/engines/titanic/game/variable_list.cpp @@ -33,7 +33,7 @@ void CVariableListItem::save(SimpleFile *file, int indent) { file->writeQuotedLine(_string2, indent); file->writeQuotedLine(_string3, indent); file->writeQuotedLine(_string4, indent); - + ListItem::save(file, indent); } @@ -66,7 +66,7 @@ void CVariableListItem::load(SimpleFile *file) { _field40 = field40; _field44 = field44; - + ListItem::load(file); } diff --git a/engines/titanic/game_location.cpp b/engines/titanic/game_location.cpp index 3a1d0c9e48..1e4e067f70 100644 --- a/engines/titanic/game_location.cpp +++ b/engines/titanic/game_location.cpp @@ -52,7 +52,7 @@ void CGameLocation::load(SimpleFile *file) { void CGameLocation::setView(CViewItem *view) { if (_view) { - for (CTreeItem *treeItem = _view; treeItem; + for (CTreeItem *treeItem = _view; treeItem; treeItem = treeItem->scan(_view)) { CGameObject *obj = dynamic_cast<CGameObject *>(treeItem); if (obj) diff --git a/engines/titanic/game_manager.cpp b/engines/titanic/game_manager.cpp index 7d9dc37a10..6023244325 100644 --- a/engines/titanic/game_manager.cpp +++ b/engines/titanic/game_manager.cpp @@ -32,11 +32,11 @@ namespace Titanic { CGameManager::CGameManager(CProjectItem *project, CGameView *gameView, Audio::Mixer *mixer): _project(project), _gameView(gameView), _trueTalkManager(this), - _inputHandler(this), _inputTranslator(&_inputHandler), + _inputHandler(this), _inputTranslator(&_inputHandler), _gameState(this), _sound(this, mixer), _musicRoom(this), _treeItem(nullptr), _soundMaker(nullptr), _movieRoom(nullptr), _dragItem(nullptr), _field54(0), _lastDiskTicksCount(0), _tickCount2(0) { - + CTimeEventInfo::_nextId = 0; _movie = nullptr; _movieSurface = CScreenManager::_screenManagerPtr->createSurface(600, 340); @@ -95,7 +95,7 @@ void CGameManager::postLoad(CProjectItem *project) { _gameView->setView(view); } } - + // Signal to anything interested that the game has been loaded CLoadSuccessMsg msg(_lastDiskTicksCount - _tickCount2); msg.execute(project, nullptr, MSGFLAG_SCAN); @@ -188,7 +188,7 @@ void CGameManager::update() { CTextCursor *textCursor = screenManager->_textCursor; if (textCursor && textCursor->_active) _bounds.extend(textCursor->getCursorBounds()); - + // Set the surface bounds screenManager->setSurfaceBounds(SURFACE_BACKBUFFER, _bounds); diff --git a/engines/titanic/game_manager.h b/engines/titanic/game_manager.h index 262ea0169b..1671517e07 100644 --- a/engines/titanic/game_manager.h +++ b/engines/titanic/game_manager.h @@ -196,7 +196,7 @@ public: /** * Flags whether the timer will be persisent across save & loads */ - void setTimerPersisent(uint id, bool flag) { + void setTimerPersisent(uint id, bool flag) { _timers.setPersisent(id, flag); } diff --git a/engines/titanic/game_state.cpp b/engines/titanic/game_state.cpp index 8814dba831..ea94deec35 100644 --- a/engines/titanic/game_state.cpp +++ b/engines/titanic/game_state.cpp @@ -89,7 +89,7 @@ void CGameState::setMode(GameStateMode newMode) { } else if (newMode != GSMODE_CUTSCENE && newMode != _mode) { if (sm && sm->_mouseCursor) sm->_mouseCursor->show(); - + if (_gameManager) _gameManager->unlockInputHandler(); } diff --git a/engines/titanic/game_state.h b/engines/titanic/game_state.h index 70d47b55c1..77b4ded79f 100644 --- a/engines/titanic/game_state.h +++ b/engines/titanic/game_state.h @@ -33,7 +33,7 @@ namespace Titanic { class CGameManager; -enum GameStateMode { +enum GameStateMode { GSMODE_NONE = 0, GSMODE_INTERACTIVE = 1, GSMODE_CUTSCENE = 2, GSMODE_3 = 3, GSMODE_4 = 4, GSMODE_INSERT_CD = 5, GSMODE_PENDING_LOAD = 6 }; diff --git a/engines/titanic/game_view.cpp b/engines/titanic/game_view.cpp index cb84b6a3b1..d155812390 100644 --- a/engines/titanic/game_view.cpp +++ b/engines/titanic/game_view.cpp @@ -58,7 +58,7 @@ void CGameView::createSurface(const CResourceKey &key) { _gameManager->initBounds(); delete _surface; _surface = nullptr; - + // Create a fresh surface CScreenManager::setCurrent(); _surface = CScreenManager::_currentScreenManagerPtr->createSurface(key); diff --git a/engines/titanic/game_view.h b/engines/titanic/game_view.h index 29e800bc7a..e17d72b472 100644 --- a/engines/titanic/game_view.h +++ b/engines/titanic/game_view.h @@ -57,7 +57,7 @@ public: * Set the currently active view */ virtual void setView(CViewItem *item) = 0; - + virtual void draw(const Rect &bounds) = 0; /** diff --git a/engines/titanic/gfx/send_to_succ.h b/engines/titanic/gfx/send_to_succ.h index 734c4a7db3..201735385d 100644 --- a/engines/titanic/gfx/send_to_succ.h +++ b/engines/titanic/gfx/send_to_succ.h @@ -32,7 +32,7 @@ class CSendToSucc : public CToggleSwitch { public: CLASSDEF; CSendToSucc(); - + /** * Save the data for the class to file */ diff --git a/engines/titanic/input_handler.cpp b/engines/titanic/input_handler.cpp index df09cf24fb..9fa2b0073c 100644 --- a/engines/titanic/input_handler.cpp +++ b/engines/titanic/input_handler.cpp @@ -164,7 +164,7 @@ CGameObject *CInputHandler::dragEnd(const Point &pt, CTreeItem *dragItem) { if (target) { // Check if the cursor is on the PET. If so, pass to the PET // to see what specific element the drag ended on - CProjectItem *project = view->getRoot(); + CProjectItem *project = view->getRoot(); if (project) { CPetControl *petControl = project->getPetControl(); if (petControl && petControl->contains(pt)) { diff --git a/engines/titanic/main_game_window.cpp b/engines/titanic/main_game_window.cpp index 690acdc25f..80da792e4a 100644 --- a/engines/titanic/main_game_window.cpp +++ b/engines/titanic/main_game_window.cpp @@ -130,14 +130,14 @@ int CMainGameWindow::selectSavegame() { void CMainGameWindow::setActiveView(CViewItem *viewItem) { _gameManager->_gameState._gameLocation.setView(viewItem); - + CResourceKey key; if (viewItem->getResourceKey(&key)) { // Create a surface based on the key _gameView->createSurface(key); } } - + void CMainGameWindow::draw() { if (_gameManager) { if (!_gameView->_surface) { diff --git a/engines/titanic/messages/messages.cpp b/engines/titanic/messages/messages.cpp index 5f587c975d..a8507063ff 100644 --- a/engines/titanic/messages/messages.cpp +++ b/engines/titanic/messages/messages.cpp @@ -91,7 +91,7 @@ const MSGMAP_ENTRY *CMessage::findMapEntry(const CTreeItem *treeItem, const Clas for (const ClassDef *entryDef = entry->_class; entryDef; entryDef = entryDef->_parent) { if (entryDef == classDef) return entry; - } + } } } diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h index 4fc4067a1a..b421e8ecb8 100644 --- a/engines/titanic/messages/messages.h +++ b/engines/titanic/messages/messages.h @@ -29,7 +29,7 @@ namespace Titanic { -enum MessageFlag { +enum MessageFlag { MSGFLAG_SCAN = 1, MSGFLAG_BREAK_IF_HANDLED = 2, MSGFLAG_CLASS_DEF = 4 diff --git a/engines/titanic/messages/mouse_messages.cpp b/engines/titanic/messages/mouse_messages.cpp index 18fa625c1c..888ca36187 100644 --- a/engines/titanic/messages/mouse_messages.cpp +++ b/engines/titanic/messages/mouse_messages.cpp @@ -29,7 +29,7 @@ namespace Titanic { void CMouseButtonDownMsg::generate() { CInputHandler &inputHandler = *CScreenManager::_screenManagerPtr->_inputHandler; const Point &mousePos = inputHandler._mousePos; - + CMouseButtonDownMsg msg(mousePos, MB_LEFT); inputHandler.handleMessage(msg, false); } diff --git a/engines/titanic/messages/mouse_messages.h b/engines/titanic/messages/mouse_messages.h index e7c419bbdc..a10f3b42a8 100644 --- a/engines/titanic/messages/mouse_messages.h +++ b/engines/titanic/messages/mouse_messages.h @@ -157,7 +157,7 @@ public: public: CLASSDEF; CPassOnDragStartMsg() : CMessage() {} - CPassOnDragStartMsg(const Point &pt, int v3 = 0, int v4 = 0) : + CPassOnDragStartMsg(const Point &pt, int v3 = 0, int v4 = 0) : CMessage(), _mousePos(pt), _value3(v3), _value4(v4) {} static bool isSupportedBy(const CTreeItem *item) { diff --git a/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp b/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp index c7e16ef84e..6d1951b72b 100644 --- a/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp +++ b/engines/titanic/moves/enter_exit_sec_class_mini_lift.cpp @@ -63,7 +63,7 @@ bool CEnterExitSecClassMiniLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { _statics->_viewName = getRoomNodeName() + ".W"; changeView("SecClassLittleLift.Node 1.E"); _statics->_state = 1; - + CPetControl *pet = getPetControl(); if (pet) { pet->setRoomsRoomNum(_roomNum); diff --git a/engines/titanic/moves/enter_exit_sec_class_mini_lift.h b/engines/titanic/moves/enter_exit_sec_class_mini_lift.h index 839d2c04fa..a16122a591 100644 --- a/engines/titanic/moves/enter_exit_sec_class_mini_lift.h +++ b/engines/titanic/moves/enter_exit_sec_class_mini_lift.h @@ -46,7 +46,7 @@ public: CEnterExitSecClassMiniLift() : CGameObject(), _roomNum(0) {} static void init(); static void deinit(); - + /** * Save the data for the class to file */ diff --git a/engines/titanic/moves/enter_exit_view.cpp b/engines/titanic/moves/enter_exit_view.cpp index 6778ebb52a..a3f01f981a 100644 --- a/engines/titanic/moves/enter_exit_view.cpp +++ b/engines/titanic/moves/enter_exit_view.cpp @@ -31,7 +31,7 @@ BEGIN_MESSAGE_MAP(CEnterExitView, CGameObject) END_MESSAGE_MAP() CEnterExitView::CEnterExitView() : CGameObject(), _leaveEndFrame(0), - _leaveStartFrame(0), _enterEndFrame(0), _enterStartFrame(0), + _leaveStartFrame(0), _enterEndFrame(0), _enterStartFrame(0), _visibleAfterMovie(true) { } diff --git a/engines/titanic/moves/exit_arboretum.cpp b/engines/titanic/moves/exit_arboretum.cpp index ba162843b5..3c1591c393 100644 --- a/engines/titanic/moves/exit_arboretum.cpp +++ b/engines/titanic/moves/exit_arboretum.cpp @@ -32,7 +32,7 @@ BEGIN_MESSAGE_MAP(CExitArboretum, CMovePlayerTo) ON_MESSAGE(TurnOff) END_MESSAGE_MAP() -CExitArboretum::CExitArboretum() : CMovePlayerTo(), +CExitArboretum::CExitArboretum() : CMovePlayerTo(), _seasonNum(0), _fieldCC(0), _enabled(true) { } diff --git a/engines/titanic/moves/exit_pellerator.cpp b/engines/titanic/moves/exit_pellerator.cpp index 3140d90b4c..3d1438a942 100644 --- a/engines/titanic/moves/exit_pellerator.cpp +++ b/engines/titanic/moves/exit_pellerator.cpp @@ -61,7 +61,7 @@ void CExitPellerator::load(SimpleFile *file) { bool CExitPellerator::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { CString name = getName(); - + if (name == "ExitPellerator") { if (_statics->_v2 != 2) { switch (getRandomNumber(2)) { diff --git a/engines/titanic/npcs/barbot.cpp b/engines/titanic/npcs/barbot.cpp index 2524a835f8..791adaa05c 100644 --- a/engines/titanic/npcs/barbot.cpp +++ b/engines/titanic/npcs/barbot.cpp @@ -142,7 +142,7 @@ void CBarbot::load(SimpleFile *file) { _field158 = file->readNumber(); _field15C = file->readNumber(); _field160 = file->readNumber(); - + CTrueTalkNPC::load(file); } @@ -179,7 +179,7 @@ bool CBarbot::ActMsg(CActMsg *msg) { statusMsg._newStatus = 2; statusMsg.execute("PickUpGlass"); _field158 = 3; - + playRange(_frames[32], MOVIE_NOTIFY_OBJECT); playRange(_frames[30], MOVIE_NOTIFY_OBJECT); _frameNum = _frames[30]._endFrame; @@ -317,7 +317,7 @@ bool CBarbot::TurnOn(CTurnOn *msg) { playRange(_frames[23], MOVIE_NOTIFY_OBJECT); playRange(_frames[21], MOVIE_NOTIFY_OBJECT); _frameNum = _frames[21]._endFrame; - + switch (g_vm->getRandomNumber(2)) { case 0: playRange(_frames[10], MOVIE_NOTIFY_OBJECT); @@ -575,7 +575,7 @@ bool CBarbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) { } bool CBarbot::FrameMsg(CFrameMsg *msg) { - if (!_fieldC4 || _frameNum != -1 || _field148 != -1 + if (!_fieldC4 || _frameNum != -1 || _field148 != -1 || (msg->_ticks - _field14C) <= 5000 || (msg->_ticks - _field150) <= 1000) return true; @@ -611,7 +611,7 @@ bool CBarbot::FrameMsg(CFrameMsg *msg) { playRange(_frames[1], MOVIE_NOTIFY_OBJECT); _field148 = _frames[1]._endFrame; break; - + case 4: playRange(_frames[3], MOVIE_NOTIFY_OBJECT); _field148 = _frames[3]._endFrame; diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp index 0170491270..7aa32eeef3 100644 --- a/engines/titanic/npcs/bellbot.cpp +++ b/engines/titanic/npcs/bellbot.cpp @@ -74,7 +74,7 @@ bool CBellBot::OnSummonBotMsg(COnSummonBotMsg *msg) { { "MusicRoomLobby", "z#192.wav" }, { "1stClassRestaurant", "z#190.wav" } }; - + int idx; for (idx = 0; idx < 8; ++idx) { if (compareRoomNameTo(ROOM_WAVES[idx][0])) { diff --git a/engines/titanic/npcs/callbot.cpp b/engines/titanic/npcs/callbot.cpp index 4af9876b35..0979fa46f6 100644 --- a/engines/titanic/npcs/callbot.cpp +++ b/engines/titanic/npcs/callbot.cpp @@ -57,7 +57,7 @@ bool CCallBot::TurnOn(CTurnOn *msg) { bool CCallBot::EnterViewMsg(CEnterViewMsg *msg) { if (_enabled) { CRoomItem *room = getRoom(); - + if (room) { CSummonBotQueryMsg queryMsg; queryMsg._npcName = _npcName; diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp index 8f1fc28e20..c5032f1674 100644 --- a/engines/titanic/npcs/deskbot.cpp +++ b/engines/titanic/npcs/deskbot.cpp @@ -94,7 +94,7 @@ bool CDeskbot::EnterViewMsg(CEnterViewMsg *msg) { _deskbotActive = false; _fieldC4 = 0; loadFrame(625); - + return true; } @@ -264,7 +264,7 @@ bool CDeskbot::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *m default: break; } - + return true; } diff --git a/engines/titanic/npcs/maitre_d.cpp b/engines/titanic/npcs/maitre_d.cpp index 09444f5611..658b7c7123 100644 --- a/engines/titanic/npcs/maitre_d.cpp +++ b/engines/titanic/npcs/maitre_d.cpp @@ -156,7 +156,7 @@ bool CMaitreD::NPCPlayTalkingAnimationMsg(CNPCPlayTalkingAnimationMsg *msg) { if (msg->_value2 != 2) { msg->_names = NAMES; - + CAnimateMaitreDMsg animMsg; if (_field12C) animMsg._value = 0; diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp index 6e7aa4ec57..358a86686f 100644 --- a/engines/titanic/npcs/parrot.cpp +++ b/engines/titanic/npcs/parrot.cpp @@ -116,13 +116,13 @@ CParrot::CParrot() : CTrueTalkNPC() { void CParrot::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_assetNumber, indent); - + file->writeQuotedLine(_assetName, indent); file->writeNumberLine(_field108, indent); file->writeNumberLine(_v1, indent); file->writeNumberLine(_v2, indent); file->writeNumberLine(_v3, indent); - + file->writeQuotedLine(_string2, indent); file->writeNumberLine(_field118, indent); file->writeNumberLine(_field11C, indent); @@ -581,7 +581,7 @@ bool CParrot::FrameMsg(CFrameMsg *msg) { actMsg.execute(_field134); } - _npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000 + _npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000 | NPCFLAG_80000 | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_400000); return true; } diff --git a/engines/titanic/npcs/parrot_succubus.cpp b/engines/titanic/npcs/parrot_succubus.cpp index d285c219b5..657bde5b66 100644 --- a/engines/titanic/npcs/parrot_succubus.cpp +++ b/engines/titanic/npcs/parrot_succubus.cpp @@ -34,7 +34,7 @@ BEGIN_MESSAGE_MAP(CParrotSuccUBus, CSuccUBus) ON_MESSAGE(LeaveNodeMsg) END_MESSAGE_MAP() -CParrotSuccUBus::CParrotSuccUBus() : CSuccUBus(), _field1DC(0), +CParrotSuccUBus::CParrotSuccUBus() : CSuccUBus(), _field1DC(0), _field1EC(0), _field1F0(376), _field1F4(393) { } @@ -43,7 +43,7 @@ void CParrotSuccUBus::save(SimpleFile *file, int indent) { file->writeNumberLine(_field1DC, indent); file->writeQuotedLine(_string3, indent); file->writeNumberLine(_field1EC, indent); - + CSuccUBus::save(file, indent); } diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp index 453f016757..6db8c8d798 100644 --- a/engines/titanic/npcs/succubus.cpp +++ b/engines/titanic/npcs/succubus.cpp @@ -183,7 +183,7 @@ void CSuccUBus::load(SimpleFile *file) { _startFrame2 = file->readNumber(); _endFrame2 = file->readNumber(); _field140 = file->readNumber(); - + _v2 = file->readNumber(); _startFrame5 = file->readNumber(); _endFrame5 = file->readNumber(); @@ -282,7 +282,7 @@ bool CSuccUBus::SubAcceptCCarryMsg(CSubAcceptCCarryMsg *msg) { CChicken *chicken = dynamic_cast<CChicken *>(item); bool chickenFlag = chicken ? chicken->_string6 != "None" : false; - + item->setVisible(false); if (_startFrame1 >= 0) { playSound("z#23.wav"); @@ -353,7 +353,7 @@ bool CSuccUBus::LeaveViewMsg(CLeaveViewMsg *msg) { _enabled = false; if (_startFrame10 >= 0) playSound("z#27.wav", 100); - + if (_field15C) setVisible(false); } @@ -397,7 +397,7 @@ bool CSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) { petDisplayMessage(2, NOTHING_IN_SUCCUBUS_TRAY); } else { _field19C = 0; - + CRoomFlags roomFlags = _roomFlags; if (!pet->testRooms5(roomFlags) || getPassengerClass() > 0) { roomFlags = pet->getSpecialRoomFlags("BilgeRoom"); @@ -512,7 +512,7 @@ bool CSuccUBus::MovieEndMsg(CMovieEndMsg *msg) { if (msg->_endFrame == _endFrame10) { if (_startFrame11 >= 0) playSound("z#30.wav", 100); - + if (_field15C) { _field15C = false; setVisible(false); diff --git a/engines/titanic/npcs/titania.cpp b/engines/titanic/npcs/titania.cpp index 000595f6b7..aa92ddd166 100644 --- a/engines/titanic/npcs/titania.cpp +++ b/engines/titanic/npcs/titania.cpp @@ -159,7 +159,7 @@ bool CTitania::ActMsg(CActMsg *msg) { CSenseWorkingMsg workingMsg2("Not Working"); CSenseWorkingMsg workingMsg3("Not Working"); CSenseWorkingMsg workingMsg4("Not Working"); - + if (_eye1 && _eye2) { workingMsg1._value = _visionCentre ? "Working" : "Random"; } @@ -201,10 +201,10 @@ bool CTitania::EnterViewMsg(CEnterViewMsg *msg) { _showIntro = false; disableMouse(); petHide(); - + CSetFrameMsg frameMsg; frameMsg._frameNumber = 25; - frameMsg.execute("Bomb"); + frameMsg.execute("Bomb"); playCutscene(0, 52); setVisible(false); diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index 95438ce81e..4cdab24f6d 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -42,7 +42,7 @@ BEGIN_MESSAGE_MAP(CPetControl, CGameObject) ON_MESSAGE(TimerMsg) END_MESSAGE_MAP() -CPetControl::CPetControl() : CGameObject(), +CPetControl::CPetControl() : CGameObject(), _currentArea(PET_CONVERSATION), _inputLockCount(0), _areaLockCount(0), _areaChangeType(-1), _activeNPC(nullptr), _remoteTarget(nullptr), _hiddenRoom(nullptr), _drawBounds(20, 350, 620, 480) { @@ -68,12 +68,12 @@ void CPetControl::save(SimpleFile *file, int indent) { void CPetControl::load(SimpleFile *file) { int val = file->readNumber(); isValid(); - + if (!val) { _currentArea = (PetArea)file->readNumber(); _activeNPCName = file->readString(); _remoteTargetName = file->readString(); - + loadAreas(file, 0); } @@ -93,7 +93,7 @@ void CPetControl::setup() { bool CPetControl::isValid() { return _conversations.isValid(this) && - _rooms.isValid(this) && + _rooms.isValid(this) && _remote.isValid(this) && _inventory.isValid(this) && _starfield.isValid(this) && @@ -427,7 +427,7 @@ void CPetControl::addToInventory(CGameObject *item) { setArea(PET_INVENTORY); if (_currentArea == PET_INVENTORY) _inventory.highlightItem(item); - + makeDirty(); CPETGainedObjectMsg msg; msg.execute(item); @@ -471,7 +471,7 @@ bool CPetControl::checkNode(const CString &name) { return true; if (name == "NULL") return false; - + CViewItem *view = gameManager->getView(); if (!view) return true; @@ -558,7 +558,7 @@ bool CPetControl::isBotInView(const CString &name) const { CViewItem *view = gameManager->getView(); if (!view) return false; - + // Iterate to find NPC for (CTreeItem *child = view->getFirstChild(); child; child = child->scan(view)) { CGameObject *gameObject = dynamic_cast<CGameObject *>(child); diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index 454fc0991b..d42dff598c 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -340,12 +340,12 @@ public: * Returns true if all input is currently locked (disabled) */ bool isInputLocked() const { return _inputLockCount > 0; } - + /** * Increments the input locked count */ void incInputLocks() { ++_inputLockCount; } - + /** * Decremenst the input locked count */ @@ -364,7 +364,7 @@ public: /** * Decrement the number of PET area (tab) locks */ - void decAreaLocks() { + void decAreaLocks() { _areaLockCount = MAX(_areaLockCount - 1, 0); } diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp index 173c586fc1..58dcd57384 100644 --- a/engines/titanic/pet_control/pet_conversations.cpp +++ b/engines/titanic/pet_control/pet_conversations.cpp @@ -60,7 +60,7 @@ bool CPetConversations::reset() { _dials[0].setup(MODE_UNSELECTED, "3PetDial1", _petControl); _dials[1].setup(MODE_UNSELECTED, "3PetDial2", _petControl); _dials[2].setup(MODE_UNSELECTED, "3PetDial3", _petControl); - + _dialBackground.reset("PetDialBack", _petControl); _scrollUp.reset("PetScrollUp", _petControl); _scrollDown.reset("PetScrollDown", _petControl); @@ -334,7 +334,7 @@ bool CPetConversations::setupControl(CPetControl *petControl) { _dialBackground.setBounds(Rect(0, 0, 21, 130)); _dialBackground.translate(20, 350); - + const Rect rect1(0, 0, 22, 36); _dials[0].setBounds(rect1); _dials[0].translate(20, 359); diff --git a/engines/titanic/pet_control/pet_conversations.h b/engines/titanic/pet_control/pet_conversations.h index 3333bdc523..efb7db4277 100644 --- a/engines/titanic/pet_control/pet_conversations.h +++ b/engines/titanic/pet_control/pet_conversations.h @@ -136,7 +136,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -146,12 +146,12 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Get the bounds for the section */ virtual Rect getBounds() const; - + /** * Returns true if the object is in a valid state */ @@ -190,7 +190,7 @@ public: * Called when a section is switched to */ virtual void enter(PetArea oldArea); - + /** * Called when a section is being left, to switch to another area */ @@ -220,7 +220,7 @@ public: * Show the text cursor */ virtual void showCursor(); - + /** * Hide the text cursor */ diff --git a/engines/titanic/pet_control/pet_frame.cpp b/engines/titanic/pet_control/pet_frame.cpp index 7375c69436..e8244cf2d7 100644 --- a/engines/titanic/pet_control/pet_frame.cpp +++ b/engines/titanic/pet_control/pet_frame.cpp @@ -97,7 +97,7 @@ bool CPetFrame::setPetControl(CPetControl *petControl) { // Set the bounds of the individual elements _background.setBounds(Rect(20, 350, 620, 480)); _modeBackground.setBounds(Rect(590, 365, 611, 467)); - + // Squares used for holding glyphs in various tabs Rect r(35, 373, 91, 429); for (int idx = 0, xp = 0; idx < TOTAL_GLYPHS; ++idx, xp += 70) { @@ -113,7 +113,7 @@ bool CPetFrame::setPetControl(CPetControl *petControl) { _modeButtons[idx].translate(4, YLIST[idx]); } _modeButtons[PET_AREAS[0]].setMode(MODE_SELECTED); - + const int XLIST[] = { 73, 54, 85, 109, 38, 71 }; for (int idx = 0; idx < 6; ++idx) { _titles[idx].setBounds(Rect(0, 0, 110, 11)); diff --git a/engines/titanic/pet_control/pet_frame.h b/engines/titanic/pet_control/pet_frame.h index d8924e83d3..720112c1c0 100644 --- a/engines/titanic/pet_control/pet_frame.h +++ b/engines/titanic/pet_control/pet_frame.h @@ -53,12 +53,12 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Sets up the section */ virtual bool reset(); - + /** * Handles mouse down messages */ diff --git a/engines/titanic/pet_control/pet_gfx_element.cpp b/engines/titanic/pet_control/pet_gfx_element.cpp index 6022885770..e43c847bb1 100644 --- a/engines/titanic/pet_control/pet_gfx_element.cpp +++ b/engines/titanic/pet_control/pet_gfx_element.cpp @@ -48,7 +48,7 @@ void CPetGfxElement::reset(const CString &name, CPetControl *petControl, PetElem if (!petControl) return; - CString numString(3); + CString numString(3); int classNum = petControl->getPassengerClass(); if (classNum >= 1 && classNum <= 3) { diff --git a/engines/titanic/pet_control/pet_glyphs.h b/engines/titanic/pet_control/pet_glyphs.h index c07cc5ed9a..79e032162c 100644 --- a/engines/titanic/pet_control/pet_glyphs.h +++ b/engines/titanic/pet_control/pet_glyphs.h @@ -77,7 +77,7 @@ public: * Called when the PET area is entered */ virtual void enter() {} - + /** * Called when the PET area is left */ @@ -137,7 +137,7 @@ public: * Handles keypresses */ virtual bool KeyCharMsg(int key) { return false; } - + /** * Handles keypresses */ @@ -162,7 +162,7 @@ public: * Selects a glyph */ virtual void selectGlyph(const Point &topLeft, const Point &pt) {} - + /** * Called when a glyph drag starts */ @@ -195,7 +195,7 @@ public: * Called on a highlighted item when PET area is entered */ virtual bool enterHighlighted() { return false; } - + /** * Called on a highlighted item when PET area is left */ @@ -241,7 +241,7 @@ public: */ bool isHighlighted() const; }; - + class CPetGlyphs : public List<CPetGlyph> { private: /** diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp index 88310459c6..be01146398 100644 --- a/engines/titanic/pet_control/pet_inventory.cpp +++ b/engines/titanic/pet_control/pet_inventory.cpp @@ -53,7 +53,7 @@ void CPetInventory::draw(CScreenManager *screenManager) { _text.draw(screenManager); } -Rect CPetInventory::getBounds() const { +Rect CPetInventory::getBounds() const { return _movie ? _movie->getBounds() : Rect(); } @@ -231,7 +231,7 @@ CGameObject *CPetInventory::getImage(int index) { return _itemGlyphs[index]; } } - + return nullptr; } diff --git a/engines/titanic/pet_control/pet_inventory.h b/engines/titanic/pet_control/pet_inventory.h index 184bb20385..5433feae95 100644 --- a/engines/titanic/pet_control/pet_inventory.h +++ b/engines/titanic/pet_control/pet_inventory.h @@ -64,7 +64,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Sets up the section */ @@ -74,12 +74,12 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Get the bounds for the section */ virtual Rect getBounds() const; - + /** * Called when a general change occurs */ @@ -141,7 +141,7 @@ public: virtual CGameObject *getBackground(int index) const; /** - * + * */ void change(CGameObject *item); diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.h b/engines/titanic/pet_control/pet_inventory_glyphs.h index 0d167c4c98..508db67f2d 100644 --- a/engines/titanic/pet_control/pet_inventory_glyphs.h +++ b/engines/titanic/pet_control/pet_inventory_glyphs.h @@ -63,7 +63,7 @@ public: CGameObject *_background; CGameObject *_image; public: - CPetInventoryGlyph() : _item(nullptr), _field34(1), + CPetInventoryGlyph() : _item(nullptr), _field34(1), _background(nullptr), _image(nullptr) {} CPetInventoryGlyph(CCarry *item, int val) : _item(item), _field34(val), _background(nullptr), _image(nullptr) {} @@ -72,7 +72,7 @@ public: * Called when the PET area is entered */ virtual void enter(); - + /** * Called when the PET area is left */ @@ -97,7 +97,7 @@ public: * Glyph has been shifted to be first visible one */ virtual void glyphFocused(const Point &topLeft, bool flag); - + /** * Called when a glyph drag starts */ @@ -133,7 +133,7 @@ class CInventoryGlyphAction : public CGlyphAction { public: CGameObject *_item; public: - CInventoryGlyphAction(CGameObject *item, GlyphActionMode mode) : + CInventoryGlyphAction(CGameObject *item, GlyphActionMode mode) : CGlyphAction(mode), _item(item) {} }; diff --git a/engines/titanic/pet_control/pet_load.cpp b/engines/titanic/pet_control/pet_load.cpp index 8e2afc727f..3d67cf6d71 100644 --- a/engines/titanic/pet_control/pet_load.cpp +++ b/engines/titanic/pet_control/pet_load.cpp @@ -30,7 +30,7 @@ namespace Titanic { bool CPetLoad::reset() { CPetLoadSave::reset(); - + CPetControl *pet = getPetControl(); if (pet) { setName("PetLoad", pet); diff --git a/engines/titanic/pet_control/pet_load.h b/engines/titanic/pet_control/pet_load.h index 421531974d..5669991b59 100644 --- a/engines/titanic/pet_control/pet_load.h +++ b/engines/titanic/pet_control/pet_load.h @@ -33,7 +33,7 @@ public: * Reset the glyph */ virtual bool reset(); - + /** * Handles mouse button up messages */ diff --git a/engines/titanic/pet_control/pet_load_save.cpp b/engines/titanic/pet_control/pet_load_save.cpp index aebe43551e..136953cab7 100644 --- a/engines/titanic/pet_control/pet_load_save.cpp +++ b/engines/titanic/pet_control/pet_load_save.cpp @@ -76,7 +76,7 @@ void CPetLoadSave::draw2(CScreenManager *screenManager) { bool CPetLoadSave::MouseButtonDownMsg(const Point &pt) { if (_btnLoadSave.MouseButtonDownMsg(pt)) return true; - + checkSlotsHighlight(pt); return false; } @@ -95,7 +95,7 @@ bool CPetLoadSave::KeyCharMsg(int key) { case Common::KEYCODE_UP: case Common::KEYCODE_KP8: if (_savegameSlotNum != -1) { - int slotNum = --_savegameSlotNum; + int slotNum = --_savegameSlotNum; highlightSlot((slotNum == -1) ? SAVEGAME_SLOTS_COUNT - 1 : slotNum); getPetControl()->makeDirty(); } diff --git a/engines/titanic/pet_control/pet_quit.cpp b/engines/titanic/pet_control/pet_quit.cpp index 218ed89812..a6fb22d7e1 100644 --- a/engines/titanic/pet_control/pet_quit.cpp +++ b/engines/titanic/pet_control/pet_quit.cpp @@ -41,7 +41,7 @@ bool CPetQuit::setup(CPetControl *petControl, CPetGlyphs *owner) { Rect btnRect(0, 0, 68, 52); btnRect.moveTo(496, 388); _btnYes.setBounds(btnRect); - + return true; } @@ -52,7 +52,7 @@ bool CPetQuit::reset() { setName("PetExit", pet); - uint col = getPetSection()->getColor(0); + uint col = getPetSection()->getColor(0); _text.setText("Are you sure you want to quit?"); _text.setLineColor(0, col); diff --git a/engines/titanic/pet_control/pet_quit.h b/engines/titanic/pet_control/pet_quit.h index 87d8aefbbf..b775000933 100644 --- a/engines/titanic/pet_control/pet_quit.h +++ b/engines/titanic/pet_control/pet_quit.h @@ -58,7 +58,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ diff --git a/engines/titanic/pet_control/pet_real_life.h b/engines/titanic/pet_control/pet_real_life.h index 40bc87d9b5..b359d285c8 100644 --- a/engines/titanic/pet_control/pet_real_life.h +++ b/engines/titanic/pet_control/pet_real_life.h @@ -53,7 +53,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -63,12 +63,12 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Get the bounds for the section */ virtual Rect getBounds() const { return Rect(); } - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area @@ -85,7 +85,7 @@ public: * Returns item a drag-drop operation has dropped on, if any */ virtual CGameObject *dragEnd(const Point &pt) const { return nullptr; } - + /** * Display a message */ @@ -115,7 +115,7 @@ public: * Called when a section is switched to */ virtual void enter(PetArea oldArea); - + /** * Called when a section is being left, to switch to another area */ diff --git a/engines/titanic/pet_control/pet_remote.cpp b/engines/titanic/pet_control/pet_remote.cpp index 9b43b8dab9..7e98308114 100644 --- a/engines/titanic/pet_control/pet_remote.cpp +++ b/engines/titanic/pet_control/pet_remote.cpp @@ -30,7 +30,7 @@ namespace Titanic { static const byte REMOTE_DATA[] = { - 0x00, 0x02, + 0x00, 0x02, GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY, 0x01, 0x02, GLYPH_SUMMON_PELLERATOR, GLYPH_SUCCUBUS_DELIVERY, @@ -83,7 +83,7 @@ static const byte REMOTE_DATA[] = { GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY, 0x1E, 0x0C, GLYPH_DEPLOY_FLORAL, GLYPH_DEPLOY_FULLY_RELAXATION, GLYPH_DEPLOY_COMFORT, - GLYPH_DEPLOY_MINOR_STORAGE, GLYPH_ENTERTAINMENT_DEVICE, + GLYPH_DEPLOY_MINOR_STORAGE, GLYPH_ENTERTAINMENT_DEVICE, GLYPH_DEPLOY_MAJOR_RELAXATION, GLYPH_INFLATE_RELAXATION, GLYPH_DEPLOY_MAINTENANCE, GLYPH_DEPLOY_WORK_SURFACE, GLYPH_DEPLOY_MINOR_RELAXATION, GLYPH_DEPLOY_SINK, diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp index 953428ff0c..aa756bc941 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.cpp +++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp @@ -68,7 +68,7 @@ void CBasicRemoteGlyph::draw2(CScreenManager *screenManager) { } bool CBasicRemoteGlyph::MouseButtonDownMsg(const Point &pt) { - return _gfxElement && _gfxElement->MouseButtonDownMsg(pt); + return _gfxElement && _gfxElement->MouseButtonDownMsg(pt); } bool CBasicRemoteGlyph::MouseButtonUpMsg(const Point &pt) { @@ -173,7 +173,7 @@ bool CTelevisionControlGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) _down = getElement(2); _onOff = getElement(4); } - + return true; } diff --git a/engines/titanic/pet_control/pet_remote_glyphs.h b/engines/titanic/pet_control/pet_remote_glyphs.h index d3541d6a94..6114c81a9f 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.h +++ b/engines/titanic/pet_control/pet_remote_glyphs.h @@ -90,7 +90,7 @@ private: CString _gfxName, _tooltip, _msgString; public: CBasicRemoteGlyph(const CString &gfxName, const CString &tooltip, - const CString &msgString) : CPetRemoteGlyph(), + const CString &msgString) : CPetRemoteGlyph(), _gfxName(gfxName), _tooltip(tooltip), _msgString(msgString) {} /** @@ -112,7 +112,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -144,7 +144,7 @@ public: /** * Called for mouse button up messages to the default element */ - bool elementMouseButtonUpMsg(const Point &pt, int petNum); + bool elementMouseButtonUpMsg(const Point &pt, int petNum); }; class CRemoteGotoGlyph : public CPetRemoteGlyph { @@ -154,7 +154,7 @@ protected: CString _gfxName, _tooltip; public: CRemoteGotoGlyph() : CPetRemoteGlyph(), _gfxElement(nullptr), _roomIndex(21) {} - CRemoteGotoGlyph(const CString &gfxName, const CString &tooltip) : + CRemoteGotoGlyph(const CString &gfxName, const CString &tooltip) : CPetRemoteGlyph(), _gfxElement(nullptr), _roomIndex(21), _gfxName(gfxName), _tooltip(tooltip) {} @@ -177,7 +177,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -223,7 +223,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -257,7 +257,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -318,7 +318,7 @@ public: virtual bool MouseButtonUpMsg(const Point &pt) { return elementMouseButtonUpMsg(pt, 0); } - + /** * Returns the tooltip text for when the glyph is selected */ diff --git a/engines/titanic/pet_control/pet_rooms.h b/engines/titanic/pet_control/pet_rooms.h index af1ea2ae4f..28d6553a33 100644 --- a/engines/titanic/pet_control/pet_rooms.h +++ b/engines/titanic/pet_control/pet_rooms.h @@ -76,7 +76,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -86,7 +86,7 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area @@ -101,7 +101,7 @@ public: * Check whether a drag drop can occur */ virtual bool checkDragEnd(CGameObject *item); - + /** * Display a message */ diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.h b/engines/titanic/pet_control/pet_rooms_glyphs.h index 5d0fec84f8..11de6c4a8e 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.h +++ b/engines/titanic/pet_control/pet_rooms_glyphs.h @@ -94,7 +94,7 @@ public: * Saves the data for the glyph */ virtual void saveGlyph(SimpleFile *file, int indent); - + virtual bool proc33(CPetGlyph *glyph); /** @@ -125,12 +125,12 @@ public: * Returns true if the room is either currently or previously assigned */ bool isAssigned() const { return _mode != RGM_UNASSIGNED; } - + /** * Returns true if the room is the one currently assigned to the player */ bool isCurrentlyAssigned() const { return _mode == RGM_ASSIGNED_ROOM; } - + /** * Returns true if the room was previously assigned to the player */ diff --git a/engines/titanic/pet_control/pet_save.cpp b/engines/titanic/pet_control/pet_save.cpp index 6d0733f534..d344c8cd14 100644 --- a/engines/titanic/pet_control/pet_save.cpp +++ b/engines/titanic/pet_control/pet_save.cpp @@ -28,7 +28,7 @@ namespace Titanic { bool CPetSave::reset() { CPetLoadSave::reset(); - + CPetControl *pet = getPetControl(); if (pet) { setName("PetSave", pet); diff --git a/engines/titanic/pet_control/pet_save.h b/engines/titanic/pet_control/pet_save.h index 54e91e4c76..e5e956403f 100644 --- a/engines/titanic/pet_control/pet_save.h +++ b/engines/titanic/pet_control/pet_save.h @@ -57,11 +57,11 @@ public: /** * Called on a highlighted item when PET area is entered */ - virtual bool enterHighlighted() { + virtual bool enterHighlighted() { highlightSave(_savegameSlotNum); return true; } - + /** * Called on a highlighted item when PET area is left */ diff --git a/engines/titanic/pet_control/pet_section.h b/engines/titanic/pet_control/pet_section.h index dc2f70b76f..9e9afe6c21 100644 --- a/engines/titanic/pet_control/pet_section.h +++ b/engines/titanic/pet_control/pet_section.h @@ -75,7 +75,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl) { return false; } - + /** * Reset the section */ @@ -85,17 +85,17 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager) {} - + /** * Get the bounds for the section */ virtual Rect getBounds() const { return Rect(); } - + /** * Called when a general change occurs */ virtual void changed(int changeType) {} - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area @@ -113,12 +113,12 @@ public: * Check whether a drag drop can occur */ virtual bool checkDragEnd(CGameObject *item) { return false; } - + /** * Returns item a drag-drop operation has dropped on, if any */ virtual CGameObject *dragEnd(const Point &pt) const { return nullptr; } - + /** * Display a message */ @@ -148,12 +148,12 @@ public: * Called when a section is switched to */ virtual void enter(PetArea oldArea) {} - + /** * Called when a section is being left, to switch to another area */ virtual void leave() {} - + virtual void proc23() {} /** @@ -175,7 +175,7 @@ public: * Removes text after a given duration */ virtual void removeText(int duration); - + /** * Removes text after a given duration */ @@ -217,7 +217,7 @@ public: * Show the text cursor */ virtual void showCursor() {} - + /** * Hide the text cursor */ @@ -237,7 +237,7 @@ public: * Get a specified color in the currently active UI color table */ uint getColor(uint index); - + /** * Get one of the game's three UI color tables. If the default * tableNum of -1 is used, the table is taken from the game state diff --git a/engines/titanic/pet_control/pet_slider.h b/engines/titanic/pet_control/pet_slider.h index 0bc9e825cd..be8c846a20 100644 --- a/engines/titanic/pet_control/pet_slider.h +++ b/engines/titanic/pet_control/pet_slider.h @@ -106,7 +106,7 @@ public: * Reset the slider */ virtual void reset(const CString &name) {} - + /** * Draw the slider */ @@ -116,7 +116,7 @@ public: * Reset the dirty area */ virtual Rect clearDirtyArea(); - + /** * Checks whether the slider is highlighted */ @@ -131,7 +131,7 @@ public: * Handles dragging the slider */ virtual bool MouseDragMoveMsg(const Point &pt); - + /** * Called when a slider drag ends */ @@ -144,8 +144,8 @@ public: virtual bool proc13() { return false; } virtual bool proc14() { return false; } - - + + virtual bool contains(const Point &pt) const; /** diff --git a/engines/titanic/pet_control/pet_sound.cpp b/engines/titanic/pet_control/pet_sound.cpp index 7bfeb25722..e9958c67be 100644 --- a/engines/titanic/pet_control/pet_sound.cpp +++ b/engines/titanic/pet_control/pet_sound.cpp @@ -111,7 +111,7 @@ bool CPetSound::reset() { void CPetSound::draw2(CScreenManager *screenManager) { _element.draw(screenManager); - + _musicVolume.draw(screenManager); _masterVolume.draw(screenManager); _parrotVolume.draw(screenManager); @@ -173,7 +173,7 @@ void CPetSound::sliderChanged(double offset, int sliderNum) { CPetControl *pet = getPetControl(); if (!pet) return; - + CGameManager *gameManager = pet->getGameManager(); if (!gameManager) return; diff --git a/engines/titanic/pet_control/pet_starfield.cpp b/engines/titanic/pet_control/pet_starfield.cpp index 3287f98817..dd953b592d 100644 --- a/engines/titanic/pet_control/pet_starfield.cpp +++ b/engines/titanic/pet_control/pet_starfield.cpp @@ -45,7 +45,7 @@ bool CPetStarfield::reset() { _btnSetDest.setup(MODE_UNSELECTED, "3PetSetDestin", _petControl); _btnSetDest.setup(MODE_SELECTED, "3PetSetDestin1", _petControl); _imgStarCtrl.setup(MODE_UNSELECTED, "3PetStarCtrl", _petControl); - + _leds[0].setup(MODE_UNSELECTED, "LEDOff1", _petControl); _leds[1].setup(MODE_UNSELECTED, "LEDOn1", _petControl); _leds[2].setup(MODE_UNSELECTED, "LEDOff2", _petControl); @@ -106,7 +106,7 @@ bool CPetStarfield::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { if (_petControl) { CStarControl *starControl = _petControl->getStarControl(); - + if (starControl && starControl->canSetStarDestination()) { CPETSetStarDestinationMsg starfieldMsg; starfieldMsg.execute(_petControl->_remoteTarget); diff --git a/engines/titanic/pet_control/pet_starfield.h b/engines/titanic/pet_control/pet_starfield.h index 9550e0acf9..6c47f47d67 100644 --- a/engines/titanic/pet_control/pet_starfield.h +++ b/engines/titanic/pet_control/pet_starfield.h @@ -66,7 +66,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -76,7 +76,7 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp index 2c20396cd9..1aa9b804ff 100644 --- a/engines/titanic/pet_control/pet_text.cpp +++ b/engines/titanic/pet_control/pet_text.cpp @@ -27,7 +27,7 @@ namespace Titanic { CPetText::CPetText(uint count) : _stringsMerged(false), _maxCharsPerLine(-1), _lineCount(0), _linesStart(-1), _unused1(0), _unused2(0), _unused3(0), - _backR(0xff), _backG(0xff), _backB(0xff), + _backR(0xff), _backG(0xff), _backB(0xff), _textR(0), _textG(0), _textB(200), _fontNumber(0), _npcFlag(0), _npcId(0), _hasBorder(true), _scrollTop(0), _textCursor(nullptr) { @@ -110,7 +110,7 @@ void CPetText::load(SimpleFile *file, int param) { _array[idx]._line = file->readString(); _array[idx]._rgb = file->readString(); _array[idx]._string3 = file->readString(); - } + } } } @@ -225,7 +225,7 @@ void CPetText::appendText(const CString &str) { // Only add part of the str up to the maximum allowed limit for line _array[_lineCount]._line += str.left(_maxCharsPerLine - lineSize); } - + updateStr3(_lineCount); _stringsMerged = false; } @@ -260,7 +260,7 @@ void CPetText::remapColors(uint count, uint *srcColors, uint *destColors) { } } } - + _stringsMerged = false; } @@ -277,7 +277,7 @@ void CPetText::updateStr3(int lineNum) { line[2] = _npcId; line[4] = '\0'; _array[lineNum]._string3 = CString(line); - + _stringsMerged = false; _npcFlag = _npcId = 0; } @@ -470,7 +470,7 @@ int CPetText::getNPCNum(uint npcId, uint startIndex) { strP += 4; } } - + return - 1; } diff --git a/engines/titanic/pet_control/pet_translation.h b/engines/titanic/pet_control/pet_translation.h index 2fcc758b44..26070d6e59 100644 --- a/engines/titanic/pet_control/pet_translation.h +++ b/engines/titanic/pet_control/pet_translation.h @@ -44,7 +44,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -54,7 +54,7 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area diff --git a/engines/titanic/sound/auto_music_player_base.cpp b/engines/titanic/sound/auto_music_player_base.cpp index ad8b848c03..49ae906e91 100644 --- a/engines/titanic/sound/auto_music_player_base.cpp +++ b/engines/titanic/sound/auto_music_player_base.cpp @@ -71,7 +71,7 @@ bool CAutoMusicPlayerBase::TimerMsg(CTimerMsg *msg) { bool CAutoMusicPlayerBase::LoadSuccessMsg(CLoadSuccessMsg *msg) { if (_isRepeated) playGlobalSound(_filename, _volumeMode, _initialMute, true, 0); - + return true; } diff --git a/engines/titanic/sound/enter_view_toggles_other_music.cpp b/engines/titanic/sound/enter_view_toggles_other_music.cpp index 2f0091a0a3..2d23043d83 100644 --- a/engines/titanic/sound/enter_view_toggles_other_music.cpp +++ b/engines/titanic/sound/enter_view_toggles_other_music.cpp @@ -28,7 +28,7 @@ BEGIN_MESSAGE_MAP(CEnterViewTogglesOtherMusic, CTriggerAutoMusicPlayer) ON_MESSAGE(EnterViewMsg) END_MESSAGE_MAP() -CEnterViewTogglesOtherMusic::CEnterViewTogglesOtherMusic() : +CEnterViewTogglesOtherMusic::CEnterViewTogglesOtherMusic() : CTriggerAutoMusicPlayer(), _value(2) { } diff --git a/engines/titanic/sound/proximity.cpp b/engines/titanic/sound/proximity.cpp index ee1cd3e741..796e344ae2 100644 --- a/engines/titanic/sound/proximity.cpp +++ b/engines/titanic/sound/proximity.cpp @@ -27,8 +27,8 @@ namespace Titanic { CProximity::CProximity() : _channelVolume(100), _balance(0), _priorSoundHandle(-1), _frequencyMultiplier(0.0), _frequencyAdjust(1.875), - _repeated(false), _channelMode(10), _positioningMode(POSMODE_NONE), - _azimuth(0.0), _range(0.5), _elevation(0), + _repeated(false), _channelMode(10), _positioningMode(POSMODE_NONE), + _azimuth(0.0), _range(0.5), _elevation(0), _posX(0.0), _posY(0.0), _posZ(0.0), _hasVelocity(false), _velocityX(0), _velocityY(0), _velocityZ(0), _disposeAfterUse(DisposeAfterUse::NO), _endTalkerFn(nullptr), _talker(nullptr), diff --git a/engines/titanic/sound/qmixer.cpp b/engines/titanic/sound/qmixer.cpp index c095b84e17..733164947e 100644 --- a/engines/titanic/sound/qmixer.cpp +++ b/engines/titanic/sound/qmixer.cpp @@ -31,7 +31,7 @@ QMixer::QMixer(Audio::Mixer *mixer) : _mixer(mixer) { bool QMixer::qsWaveMixInitEx(const QMIXCONFIG &config) { assert(_channels.empty()); assert(config.iChannels > 0 && config.iChannels < 256); - + _channels.resize(config.iChannels); return true; } @@ -71,7 +71,7 @@ void QMixer::qsWaveMixSetPanRate(int iChannel, uint flags, uint rate) { void QMixer::qsWaveMixSetVolume(int iChannel, uint flags, uint volume) { ChannelEntry &channel = _channels[iChannel]; - + // QMixer volumes go from 0-32767, but we need to convert to 0-255 for ScummVM assert(volume <= 32767); byte newVolume = (volume >= 32700) ? 255 : volume * 255 / 32767; @@ -149,7 +149,7 @@ void QMixer::qsWaveMixPump() { if (channel._volumeChangeEnd) { byte oldVolume = channel._volume; uint currentTicks = g_system->getMillis(); - + if (currentTicks >= channel._volumeChangeEnd) { // Reached end of transition period channel._volume = channel._volumeEnd; diff --git a/engines/titanic/sound/qmixer.h b/engines/titanic/sound/qmixer.h index 6a25484c29..9a0ea85ede 100644 --- a/engines/titanic/sound/qmixer.h +++ b/engines/titanic/sound/qmixer.h @@ -156,7 +156,7 @@ struct QMIXPLAYPARAMS { Audio::Mixer::SoundType _soundType; QMIXPLAYPARAMS() : dwSize(36), lpImage(nullptr), hwndNotify(0), callback(nullptr), - dwUser(nullptr), lStart(0), lStartLoop(0), lEndLoop(0), lEnd(0), + dwUser(nullptr), lStart(0), lStartLoop(0), lEndLoop(0), lEnd(0), lpChannelParams(nullptr), _soundType(Audio::Mixer::kPlainSoundType) {} }; @@ -165,7 +165,7 @@ struct QMIXPLAYPARAMS { * QSound Labs, Inc. Which itself is apparently based on Microsoft's * WaveMix API. * - * It does not currently have any actual code from the library, + * It does not currently have any actual code from the library, * and instead remaps calls to ScummVM's existing mixer where possible. * This means that advanced features of the QMixer library, like being * able to set up both the player and sounds at different positions are @@ -189,7 +189,7 @@ class QMixer { // Currently playing and any following queued sounds for the channel Common::List<SoundEntry> _sounds; // Current channel volume - byte _volume; + byte _volume; // Current time in milliseconds for paning (volume) changes uint _panRate; // Fields used to transition between volume levels diff --git a/engines/titanic/sound/room_trigger_auto_music_player.h b/engines/titanic/sound/room_trigger_auto_music_player.h index a57e133eb6..1c3394ce15 100644 --- a/engines/titanic/sound/room_trigger_auto_music_player.h +++ b/engines/titanic/sound/room_trigger_auto_music_player.h @@ -31,7 +31,7 @@ namespace Titanic { class CRoomTriggerAutoMusicPlayer : public CTriggerAutoMusicPlayer { DECLARE_MESSAGE_MAP; bool LeaveRoomMsg(CLeaveRoomMsg *msg); - bool EnterRoomMsg(CEnterRoomMsg *msg); + bool EnterRoomMsg(CEnterRoomMsg *msg); public: CLASSDEF; diff --git a/engines/titanic/sound/season_noises.cpp b/engines/titanic/sound/season_noises.cpp index ce045488ee..14689d5337 100644 --- a/engines/titanic/sound/season_noises.cpp +++ b/engines/titanic/sound/season_noises.cpp @@ -89,7 +89,7 @@ bool CSeasonNoises::ActMsg(CActMsg *msg) { default: break; } - + CSignalObject signalMsg; signalMsg._numValue = 2; signalMsg.execute(this); diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp index 3288c4f4dd..a8c4849f2b 100644 --- a/engines/titanic/sound/sound.cpp +++ b/engines/titanic/sound/sound.cpp @@ -26,7 +26,7 @@ namespace Titanic { -CSound::CSound(CGameManager *owner, Audio::Mixer *mixer) : +CSound::CSound(CGameManager *owner, Audio::Mixer *mixer) : _gameManager(owner), _soundManager(mixer) { g_vm->_movieManager.setSoundManager(&_soundManager); } diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp index 1fb0c7341c..c1a46e5103 100644 --- a/engines/titanic/sound/sound_manager.cpp +++ b/engines/titanic/sound/sound_manager.cpp @@ -304,7 +304,7 @@ void QSoundManager::setPolarPosition(int handle, double range, double azimuth, d Slot &slot = _slots[idx]; if (slot._handle == handle) { qsWaveMixSetPanRate(slot._channel, QMIX_USEONCE, panRate); - qsWaveMixSetPolarPosition(slot._channel, QMIX_USEONCE, + qsWaveMixSetPolarPosition(slot._channel, QMIX_USEONCE, QSPOLAR(azimuth, range, elevation)); break; } @@ -452,7 +452,7 @@ void QSoundManager::updateVolume(int channel, uint panRate) { default: break; } - + volume = (_musicPercent * volume) / 100; qsWaveMixSetPanRate(channel, 0, panRate); qsWaveMixSetVolume(channel, 0, (uint)volume); diff --git a/engines/titanic/sound/sound_manager.h b/engines/titanic/sound/sound_manager.h index d1afdb4ad4..a3074a8e57 100644 --- a/engines/titanic/sound/sound_manager.h +++ b/engines/titanic/sound/sound_manager.h @@ -45,7 +45,7 @@ protected: public: CSoundManager(); virtual ~CSoundManager() {} - + /** * Loads a sound * @param name Name of sound resource @@ -189,7 +189,7 @@ public: * Called after saving is complete */ virtual void postSave() {} - + /** * Sets the position and orientation for the listener (player) */ diff --git a/engines/titanic/sound/view_toggles_other_music.cpp b/engines/titanic/sound/view_toggles_other_music.cpp index 731f59bd53..ffca1caea7 100644 --- a/engines/titanic/sound/view_toggles_other_music.cpp +++ b/engines/titanic/sound/view_toggles_other_music.cpp @@ -28,7 +28,7 @@ BEGIN_MESSAGE_MAP(CViewTogglesOtherMusic, CEnterViewTogglesOtherMusic) ON_MESSAGE(LeaveViewMsg) END_MESSAGE_MAP() -CViewTogglesOtherMusic::CViewTogglesOtherMusic() : +CViewTogglesOtherMusic::CViewTogglesOtherMusic() : CEnterViewTogglesOtherMusic(), _value(1) { } diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp index 7ba160cd37..01318db774 100644 --- a/engines/titanic/star_control/star_control.cpp +++ b/engines/titanic/star_control/star_control.cpp @@ -58,7 +58,7 @@ void CStarControl::save(SimpleFile *file, int indent) { void CStarControl::load(SimpleFile *file) { int val = file->readNumber(); - + if (!val) { _starField.load(file); if (!_starField.initDocument()) @@ -74,7 +74,7 @@ void CStarControl::load(SimpleFile *file) { _fieldBC = 1; } - + CGameObject::load(file); } diff --git a/engines/titanic/star_control/star_control_sub12.cpp b/engines/titanic/star_control/star_control_sub12.cpp index 5840495d34..e8d49992bb 100644 --- a/engines/titanic/star_control/star_control_sub12.cpp +++ b/engines/titanic/star_control/star_control_sub12.cpp @@ -29,7 +29,7 @@ namespace Titanic { FMatrix *CStarControlSub12::_matrix1; FMatrix *CStarControlSub12::_matrix2; -CStarControlSub12::CStarControlSub12(void *val1, const CStar20Data *data) : +CStarControlSub12::CStarControlSub12(void *val1, const CStar20Data *data) : _currentIndex(-1), _handlerP(nullptr), _field108(0), _sub13(val1) { setupHandler(data); @@ -56,7 +56,7 @@ CStarControlSub12::~CStarControlSub12() { } void CStarControlSub12::proc2(const void *src) { - _sub13.copyFrom(src); + _sub13.copyFrom(src); } void CStarControlSub12::proc3(const CStar20Data *src) { diff --git a/engines/titanic/star_control/star_control_sub13.cpp b/engines/titanic/star_control/star_control_sub13.cpp index cc9e239194..490e6d0630 100644 --- a/engines/titanic/star_control/star_control_sub13.cpp +++ b/engines/titanic/star_control/star_control_sub13.cpp @@ -91,12 +91,12 @@ void CStarControlSub13::load(SimpleFile *file, int param) { _field14 = file->readFloat(); _field18 = file->readFloat(); _field1C = file->readFloat(); - + int widthHeight = file->readNumber(); _width = widthHeight & 0xff; _height = _width >> 16; _field24 = file->readNumber(); - + for (int idx = 0; idx < 5; ++idx) _valArray[idx] = file->readFloat(); diff --git a/engines/titanic/star_control/star_control_sub20.cpp b/engines/titanic/star_control/star_control_sub20.cpp index 5c6c243eaa..cc1029896a 100644 --- a/engines/titanic/star_control/star_control_sub20.cpp +++ b/engines/titanic/star_control/star_control_sub20.cpp @@ -43,7 +43,7 @@ CStarControlSub20::CStarControlSub20(const CStar20Data *src) { } } -CStarControlSub20::~CStarControlSub20() { +CStarControlSub20::~CStarControlSub20() { clear(); } diff --git a/engines/titanic/star_control/star_control_sub25.h b/engines/titanic/star_control/star_control_sub25.h index e943782e37..b61569c49d 100644 --- a/engines/titanic/star_control/star_control_sub25.h +++ b/engines/titanic/star_control/star_control_sub25.h @@ -35,7 +35,7 @@ public: CStarControlSub26 _sub1; CStarControlSub26 _sub2; public: - + }; } // End of namespace Titanic diff --git a/engines/titanic/star_control/star_field.cpp b/engines/titanic/star_control/star_field.cpp index c50e8466ec..0dbc5fd700 100644 --- a/engines/titanic/star_control/star_field.cpp +++ b/engines/titanic/star_control/star_field.cpp @@ -69,7 +69,7 @@ void CStarField::render(CVideoSurface *surface, CStarControlSub12 *sub12) { // TODO } -int CStarField::get1() const { +int CStarField::get1() const { return _val1; } @@ -102,7 +102,7 @@ void CStarField::set3(int val) { } void CStarField::toggle4() { - _val4 = !_val4; + _val4 = !_val4; } bool CStarField::set4(bool val) { diff --git a/engines/titanic/star_control/star_field.h b/engines/titanic/star_control/star_field.h index ef1ee29737..91cefbb457 100644 --- a/engines/titanic/star_control/star_field.h +++ b/engines/titanic/star_control/star_field.h @@ -73,12 +73,12 @@ public: void set54(int val); int get3() const; void set3(int val); - void toggle4(); + void toggle4(); bool set4(bool val); int get88() const; int get5() const; void update6(); - int get6() const; + int get6() const; }; } // End of namespace Titanic diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp index f5d1d36c49..437c0f0e52 100644 --- a/engines/titanic/star_control/star_view.cpp +++ b/engines/titanic/star_control/star_view.cpp @@ -29,7 +29,7 @@ namespace Titanic { CStarView::CStarView() : _sub12(nullptr, nullptr), _sub13((void *)nullptr), - _owner(nullptr), _starField(nullptr), _videoSurface(nullptr), _field118(0), + _owner(nullptr), _starField(nullptr), _videoSurface(nullptr), _field118(0), _videoSurface2(nullptr), _field210(0), _homePhotoMask(nullptr), _field218(0), _field21C(0) { CStar20Data data = { 0, 0, 0x47C35000, 0, 0x41A00000, @@ -53,7 +53,7 @@ void CStarView::load(SimpleFile *file, int param) { void CStarView::save(SimpleFile *file, int indent) { _sub12.save(file, indent); - + file->writeNumberLine(_field118, indent); if (_field118) _sub13.save(file, indent); diff --git a/engines/titanic/star_control/surface_fader_base.cpp b/engines/titanic/star_control/surface_fader_base.cpp index dfd7c4ab1d..fb17fb1f31 100644 --- a/engines/titanic/star_control/surface_fader_base.cpp +++ b/engines/titanic/star_control/surface_fader_base.cpp @@ -70,7 +70,7 @@ CVideoSurface *CSurfaceFaderBase::fade(CScreenManager *screenManager, CVideoSurf srcSurface->unlock(); _videoSurface->unlock(); - + ++_index; return _videoSurface; } diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index 45c3ce94b3..9e465c705f 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -94,19 +94,19 @@ bool AVISurface::play(int startFrame, int endFrame, int initialFrame, uint flags me->_endFrame = endFrame; me->_initialFrame = 0; me->_gameObject = obj; - + info->addEvent(me); } _movieRangeInfo.push_back(info); - + if (_movieRangeInfo.size() == 1) { // First play call, so start the movie playing setReversed(info->_isReversed); return startAtFrame(initialFrame); } else { return true; - } + } } void AVISurface::stop() { @@ -181,7 +181,7 @@ bool AVISurface::handleEvents(CMovieEventList &events) { setReversed(info->_isReversed); seekToFrame(newFrame); } - + // Get any events for the given position info->getMovieFrame(events, newFrame); return renderFrame(); @@ -221,7 +221,7 @@ void AVISurface::setupDecompressor() { _decoder->getVideoTrack(idx).getPixelFormat()); bool flag = false; - if (idx == 0 && _videoSurface && + if (idx == 0 && _videoSurface && _videoSurface->getPitch() == _movieFrameSurface[idx]->pitch) { const uint bitCount = _decoder->getVideoTrack(0).getBitCount(); const int vDepth = _videoSurface->getPixelDepth(); @@ -300,7 +300,7 @@ bool AVISurface::renderFrame() { // Blit the frame directly to the video surface assert(_streamCount == 1); _videoSurface->blitFrom(Point(0, 0), &_movieFrameSurface[0]->rawSurface()); - + _videoSurface->unlock(); } } else { diff --git a/engines/titanic/support/avi_surface.h b/engines/titanic/support/avi_surface.h index 0bb14ceb27..b6231a646f 100644 --- a/engines/titanic/support/avi_surface.h +++ b/engines/titanic/support/avi_surface.h @@ -44,12 +44,12 @@ public: Video::AVIDecoder(soundType) {} AVIDecoder(const Common::Rational &frameRateOverride, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType) : Video::AVIDecoder(frameRateOverride, soundType) {} - + /** * Returns the number of video tracks the decoder has */ uint videoTrackCount() const { return _videoTracks.size(); } - + /** * Returns the specified video track */ diff --git a/engines/titanic/support/credit_text.cpp b/engines/titanic/support/credit_text.cpp index 009c3f4944..da6de6278e 100644 --- a/engines/titanic/support/credit_text.cpp +++ b/engines/titanic/support/credit_text.cpp @@ -67,7 +67,7 @@ void CCreditText::setup() { // Create a new group and line within it CCreditLineGroup *group = new CCreditLineGroup(); - CCreditLine *line = new CCreditLine(srcLine, + CCreditLine *line = new CCreditLine(srcLine, _screenManagerP->stringWidth(srcLine)); group->_lines.push_back(line); @@ -125,7 +125,7 @@ void CCreditText::handleDots(CCreditLineGroup *group) { // Figure out the maximum width of secondary lines for (CCreditLines::iterator i = second; i != group->_lines.end(); ++i) maxWidth = MAX(maxWidth, (*i)->_lineWidth); - + int charWidth = _screenManagerP->stringWidth("."); // Process the secondary lines diff --git a/engines/titanic/support/direct_draw.h b/engines/titanic/support/direct_draw.h index a7e9cc8d93..08ead6d798 100644 --- a/engines/titanic/support/direct_draw.h +++ b/engines/titanic/support/direct_draw.h @@ -70,7 +70,7 @@ public: * @param width Screen width * @param height Screen height * @param bpp Bits per pixel - * @param numBackSurfaces Number of back surfaces + * @param numBackSurfaces Number of back surfaces */ void initVideo(int width, int height, int bpp, int numBackSurfaces); diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp index 22bff275d2..2882b8da85 100644 --- a/engines/titanic/support/files_manager.cpp +++ b/engines/titanic/support/files_manager.cpp @@ -75,7 +75,7 @@ bool CFilesManager::scanForFile(const CString &name) { CString filename = name; filename.toLowercase(); - + if (filename[0] == 'y' || filename[0] == 'z') return true; else if (filename[0] < 'a' || filename[0] > 'c') diff --git a/engines/titanic/support/files_manager.h b/engines/titanic/support/files_manager.h index a980ef1b25..45b067e86e 100644 --- a/engines/titanic/support/files_manager.h +++ b/engines/titanic/support/files_manager.h @@ -39,7 +39,7 @@ class CFilesManager { struct ResourceEntry { uint _offset; uint _size; - + ResourceEntry() : _offset(0), _size(0) {} ResourceEntry(uint offset, uint size) : _offset(offset), _size(size) {} }; diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp index 45d593755e..625d03720b 100644 --- a/engines/titanic/support/font.cpp +++ b/engines/titanic/support/font.cpp @@ -80,7 +80,7 @@ int STFont::getTextBounds(const CString &str, int maxWidth, Point *sizeOut) cons if (_fontHeight == 0 || !_dataPtr) // No font, so return immediately return 0; - + // Loop through the characters of the string if (!str.empty()) { for (const char *strP = str.c_str(); *strP; ++strP) { @@ -331,7 +331,7 @@ void STFont::checkLineWrap(Point &textSize, int maxWidth, const char *&str) cons flag = true; } } - + if ((textSize.x + totalWidth) >= maxWidth && totalWidth < maxWidth) { // Word wrap textSize.x = 0; diff --git a/engines/titanic/support/font.h b/engines/titanic/support/font.h index 6c4fe8e9c3..685ab8ad73 100644 --- a/engines/titanic/support/font.h +++ b/engines/titanic/support/font.h @@ -50,13 +50,13 @@ private: * Copys a rectangle representing a character in the font data to * a given destination position in the surface */ - void copyRect(CVideoSurface *surface, const Common::Point &destPos, + void copyRect(CVideoSurface *surface, const Common::Point &destPos, Rect &srcRect); /** * Write a character */ - WriteCharacterResult writeChar(CVideoSurface *surface, unsigned char c, + WriteCharacterResult writeChar(CVideoSurface *surface, unsigned char c, const Common::Point &pt, const Rect &destRect, const Rect *srcRect); /** diff --git a/engines/titanic/support/image_decoders.cpp b/engines/titanic/support/image_decoders.cpp index 495d1d0982..2dba66fbb3 100644 --- a/engines/titanic/support/image_decoders.cpp +++ b/engines/titanic/support/image_decoders.cpp @@ -32,9 +32,9 @@ void CJPEGDecode::decode(OSVideoSurface &surface, const CString &name) { // Use the ScucmmVM deoder to decode it loadStream(*file.readStream()); const Graphics::Surface *srcSurf = getSurface(); - + // Resize the surface if necessary - if (!surface.hasSurface() || surface.getWidth() != srcSurf->w + if (!surface.hasSurface() || surface.getWidth() != srcSurf->w || surface.getHeight() != srcSurf->h) surface.recreate(srcSurf->w, srcSurf->h); diff --git a/engines/titanic/support/mouse_cursor.cpp b/engines/titanic/support/mouse_cursor.cpp index 665ead3056..4dd1ab4366 100644 --- a/engines/titanic/support/mouse_cursor.cpp +++ b/engines/titanic/support/mouse_cursor.cpp @@ -53,7 +53,7 @@ CMouseCursor::CursorEntry::~CursorEntry() { delete _transSurface; } -CMouseCursor::CMouseCursor(CScreenManager *screenManager) : +CMouseCursor::CMouseCursor(CScreenManager *screenManager) : _screenManager(screenManager), _cursorId(CURSOR_HOURGLASS), _setCursorCount(0), _fieldE4(0), _fieldE8(0) { loadCursorImages(); @@ -79,7 +79,7 @@ void CMouseCursor::loadCursorImages() { // Open the cursors video and move to the given frame OSMovie movie(key, surface); movie.setFrame(idx); - + Graphics::ManagedSurface *transSurface = movie.duplicateTransparency(); _cursors[idx]._transSurface = transSurface; surface->setTransparencySurface(transSurface); @@ -147,7 +147,7 @@ void CMouseCursor::unlockE4() { void CMouseCursor::setPosition(const Point &pt, double rate) { assert(rate >= 0.0 && rate <= 1.0); - + // TODO: Figure out use of the rate parameter g_system->warpMouse(pt.x, pt.y); } diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h index 5bf6895a67..08de28e29d 100644 --- a/engines/titanic/support/mouse_cursor.h +++ b/engines/titanic/support/mouse_cursor.h @@ -86,12 +86,12 @@ public: * Hide the mouse cursor */ void hide(); - + /** * Set the cursor */ void setCursor(CursorId cursorId); - + /** * Updates the mouse cursor */ diff --git a/engines/titanic/support/movie.cpp b/engines/titanic/support/movie.cpp index eff0e0c754..aea51e1a1e 100644 --- a/engines/titanic/support/movie.cpp +++ b/engines/titanic/support/movie.cpp @@ -125,7 +125,7 @@ void OSMovie::play(uint startFrame, uint endFrame, uint initialFrame, uint flags void OSMovie::playCutscene(const Rect &drawRect, uint startFrame, uint endFrame) { if (!_movieSurface) _movieSurface = CScreenManager::_screenManagerPtr->createSurface(600, 340); - + bool widthLess = _videoSurface->getWidth() < 600; bool heightLess = _videoSurface->getHeight() < 340; Rect r(drawRect.left, drawRect.top, diff --git a/engines/titanic/support/movie.h b/engines/titanic/support/movie.h index be34244d96..acc647065f 100644 --- a/engines/titanic/support/movie.h +++ b/engines/titanic/support/movie.h @@ -72,7 +72,7 @@ public: * Starts playing the movie */ virtual void play(uint flags, CGameObject *obj) = 0; - + /** * Starts playing the movie */ @@ -82,13 +82,13 @@ public: * Starts playing the movie */ virtual void play(uint startFrame, uint endFrame, uint initialFrame, uint flags, CGameObject *obj) = 0; - + /** * Plays a sub-section of a movie, and doesn't return until either * the playback ends or a key has been pressed */ virtual void playCutscene(const Rect &drawRect, uint startFrame, uint endFrame) = 0; - + /** * Stops the movie */ @@ -103,12 +103,12 @@ public: * Set the current frame number */ virtual void setFrame(uint frameNumber) = 0; - + /** * Handle any pending movie events */ virtual bool handleEvents(CMovieEventList &events) = 0; - + /** * Return any movie range info associated with the movie */ @@ -171,17 +171,17 @@ public: * Starts playing the movie */ virtual void play(uint flags, CGameObject *obj); - + /** * Starts playing the movie */ virtual void play(uint startFrame, uint endFrame, uint flags, CGameObject *obj); - + /** * Starts playing the movie */ virtual void play(uint startFrame, uint endFrame, uint initialFrame, uint flags, CGameObject *obj); - + /** * Plays a sub-section of a movie, and doesn't return until either * the playback ends or a key has been pressed @@ -192,7 +192,7 @@ public: * Stops the movie */ virtual void stop(); - + /** * Add a playback event */ @@ -202,7 +202,7 @@ public: * Set the current frame number */ virtual void setFrame(uint frameNumber); - + /** * Handle any pending movie events */ diff --git a/engines/titanic/support/movie_clip.h b/engines/titanic/support/movie_clip.h index 513ed4a339..17c91b190c 100644 --- a/engines/titanic/support/movie_clip.h +++ b/engines/titanic/support/movie_clip.h @@ -27,7 +27,7 @@ namespace Titanic { -enum ClipFlag { +enum ClipFlag { CLIPFLAG_HAS_END_FRAME = 1, CLIPFLAG_4 = 4, CLIPFLAG_HAS_START_FRAME = 8, diff --git a/engines/titanic/support/movie_range_info.cpp b/engines/titanic/support/movie_range_info.cpp index d4d9fc0e2a..018ffd63b5 100644 --- a/engines/titanic/support/movie_range_info.cpp +++ b/engines/titanic/support/movie_range_info.cpp @@ -91,7 +91,7 @@ void CMovieRangeInfo::process(CGameObject *owner) { flags |= MOVIE_REPEAT; if (_startFrame) flags |= MOVIE_REVERSE; - + for (CMovieEventList::iterator i = _events.begin(); i != _events.end(); ++i) { CMovieEvent *movieEvent = *i; if (movieEvent->_type == MET_MOVIE_END) { diff --git a/engines/titanic/support/screen_manager.cpp b/engines/titanic/support/screen_manager.cpp index bcf43fc8cb..2e9bbcb6de 100644 --- a/engines/titanic/support/screen_manager.cpp +++ b/engines/titanic/support/screen_manager.cpp @@ -178,7 +178,7 @@ void OSScreenManager::blitFrom(SurfaceNum surfaceNum, CVideoSurface *src, destSurface = _backSurfaces[surfaceNum]._surface; if (!destSurface->hasSurface()) return; - + Point destPoint = destPos ? *destPos : Point(0, 0); Rect srcBounds = srcRect ? *srcRect : Rect(0, 0, src->getWidth(), src->getHeight()); Rect *bounds = &srcBounds; @@ -220,7 +220,7 @@ void OSScreenManager::blitFrom(SurfaceNum surfaceNum, const Rect *rect, CVideoSu destSurface->blitFrom(Point(rect->left, rect->top), src, rect); } -int OSScreenManager::writeString(int surfaceNum, const Rect &destRect, +int OSScreenManager::writeString(int surfaceNum, const Rect &destRect, int yOffset, const CString &str, CTextCursor *textCursor) { CVideoSurface *surface; Rect bounds; diff --git a/engines/titanic/support/screen_manager.h b/engines/titanic/support/screen_manager.h index cad6901b02..f88928af8b 100644 --- a/engines/titanic/support/screen_manager.h +++ b/engines/titanic/support/screen_manager.h @@ -78,7 +78,7 @@ public: virtual void setWindowHandle(int v); virtual bool resetWindowHandle(int v); - + /** * Sets the video mode */ @@ -88,17 +88,17 @@ public: * Handles drawing the cursors */ virtual void drawCursors() = 0; - + /** * Locks a specified surface number for access and returns a pointer to it */ virtual CVideoSurface *lockSurface(SurfaceNum surfaceNum) = 0; - + /** * Unlocks a previously locked surface */ virtual void unlockSurface(CVideoSurface *surface) = 0; - + /** * Gets a specified surface number */ @@ -108,7 +108,7 @@ public: * Return the front render surface */ virtual CVideoSurface *getFrontRenderSurface() const = 0; - + /** * Fill an area with a specific color */ @@ -191,7 +191,7 @@ public: * Creates a surface of a given size */ virtual CVideoSurface *createSurface(int w, int h) = 0; - + /** * Creates a surface from a specified resource */ @@ -213,7 +213,7 @@ public: * Show the mouse cursor */ virtual void showCursor() = 0; - + /** * Hide the mouse cursor */ @@ -272,12 +272,12 @@ public: * Locks a specified surface number for access and returns a pointer to it */ virtual CVideoSurface *lockSurface(SurfaceNum surfaceNum); - + /** * Unlocks a previously locked surface */ virtual void unlockSurface(CVideoSurface *surface); - + /** * Gets a specified surface number */ @@ -373,7 +373,7 @@ public: * Creates a surface of a given size */ virtual CVideoSurface *createSurface(int w, int h); - + /** * Creates a surface from a specified resource */ @@ -383,7 +383,7 @@ public: * Show the mouse cursor */ virtual void showCursor(); - + /** * Hide the mouse cursor */ diff --git a/engines/titanic/support/simple_file.cpp b/engines/titanic/support/simple_file.cpp index 35b2e28e4a..7e3cea35be 100644 --- a/engines/titanic/support/simple_file.cpp +++ b/engines/titanic/support/simple_file.cpp @@ -52,7 +52,7 @@ SimpleFile::~SimpleFile() { } void SimpleFile::open(Common::SeekableReadStream *stream) { - close(); + close(); _inStream = stream; } @@ -290,7 +290,7 @@ void SimpleFile::writeString(const CString &str) const { const char *msgP = str.c_str(); char c; - + while ((c = *msgP++) != '\0') { switch (c) { case '\r': @@ -422,8 +422,8 @@ bool SimpleFile::scanf(const char *format, ...) { while (!formatStr.empty()) { if (formatStr.hasPrefix(" ")) { formatStr.deleteChar(0); - - safeRead(&c, 1); + + safeRead(&c, 1); if (!Common::isSpace(c)) return false; @@ -434,7 +434,7 @@ bool SimpleFile::scanf(const char *format, ...) { formatStr = CString(formatStr.c_str() + 2); int *param = (int *)va_arg(va, int *); *param = readNumber(); - + if (!eos()) _inStream->seek(-1, SEEK_CUR); } else if (formatStr.hasPrefix("%s")) { @@ -488,7 +488,7 @@ bool StdCWadFile::open(const Common::String &filename) { CString resStr = name.mid(idx + 1, extPos - idx - 1); int resIndex = resStr.readInt(); - // Open up the index for access + // Open up the index for access f.open(fname); int indexSize = f.readUint32LE() / 4; assert(resIndex < indexSize); diff --git a/engines/titanic/support/string.cpp b/engines/titanic/support/string.cpp index 9961cfce59..cf1b29b6ec 100644 --- a/engines/titanic/support/string.cpp +++ b/engines/titanic/support/string.cpp @@ -41,7 +41,7 @@ CString CString::left(uint count) const { CString CString::right(uint count) const { uint strSize = size(); - return (count > strSize) ? CString() : + return (count > strSize) ? CString() : CString(c_str() + strSize - count, c_str() + strSize); } @@ -85,7 +85,7 @@ FileType CString::fileTypeSuffix() const { return FILETYPE_WAV; else if (ext == "2" || ext == "3") return FILETYPE_MOVIE; - + ext = right(3); if (ext == "tga" || ext == "jpg") return FILETYPE_IMAGE; diff --git a/engines/titanic/support/text_cursor.cpp b/engines/titanic/support/text_cursor.cpp index ad3fe4ed26..5c7593ba68 100644 --- a/engines/titanic/support/text_cursor.cpp +++ b/engines/titanic/support/text_cursor.cpp @@ -27,7 +27,7 @@ namespace Titanic { -CTextCursor::CTextCursor(CScreenManager *screenManager) : +CTextCursor::CTextCursor(CScreenManager *screenManager) : _screenManager(screenManager), _active(false), _blinkVisible(false), _backRenderSurface(nullptr), _frontRenderSurface(nullptr), _blinkDelay(300), _size(2, 10), _priorBlinkTime(0), @@ -70,7 +70,7 @@ void CTextCursor::draw() { if (_blinkVisible) { Rect cursorRect = getCursorBounds(); _surface->blitFrom(Common::Point(0, 0), _backRenderSurface, &cursorRect); - + if (!_screenBounds.isEmpty()) // Limit the cursor rect to only within designated screen area cursorRect.constrain(_screenBounds); @@ -80,7 +80,7 @@ void CTextCursor::draw() { _backRenderSurface->_ddSurface->fillRect(&cursorRect, _cursorR, _cursorG, _cursorB); } - + //_screenManager->blitFrom(SURFACE_BACKBUFFER, _surface, &_pos); } } diff --git a/engines/titanic/support/time_event_info.cpp b/engines/titanic/support/time_event_info.cpp index 0226223f1a..e088a8e0c2 100644 --- a/engines/titanic/support/time_event_info.cpp +++ b/engines/titanic/support/time_event_info.cpp @@ -90,7 +90,7 @@ void CTimeEventInfoList::setPersisent(uint id, bool flag) { uint CTimeEventInfo::_nextId; -CTimeEventInfo::CTimeEventInfo() : ListItem(), _lockCounter(0), +CTimeEventInfo::CTimeEventInfo() : ListItem(), _lockCounter(0), _repeated(false), _firstDuration(0), _repeatDuration(0), _target(nullptr), _actionVal(0), _timerCtr(0), _done(false), _lastTimerTicks(0), _relativeTicks(0), _persisent(true) { @@ -147,7 +147,7 @@ void CTimeEventInfo::load(SimpleFile *file) { void CTimeEventInfo::postLoad(uint ticks, CProjectItem *project) { if (!_persisent || _targetName.empty()) _done = true; - + // Get the timer's target if (project) _target = project->findByName(_targetName); diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp index c71f898889..45813bb740 100644 --- a/engines/titanic/support/video_surface.cpp +++ b/engines/titanic/support/video_surface.cpp @@ -35,7 +35,7 @@ byte CVideoSurface::_palette2[32][32]; CVideoSurface::CVideoSurface(CScreenManager *screenManager) : _screenManager(screenManager), _rawSurface(nullptr), _movie(nullptr), _pendingLoad(false), _flipVertically(false), _fastBlitFlag(false), - _transparencySurface(nullptr), _transparencyMode(TRANS_DEFAULT), + _transparencySurface(nullptr), _transparencyMode(TRANS_DEFAULT), _freeTransparencySurface(DisposeAfterUse::NO), _hasFrame(true), _lockCount(0) { _videoSurfaceNum = _videoSurfaceCounter++; } @@ -256,7 +256,7 @@ void CVideoSurface::transBlitRect(const Rect &srcRect, const Rect &destRect, CVi } // Move to next line - srcPtr = flipFlag ? srcPtr + (src->getPitch() / 2) : + srcPtr = flipFlag ? srcPtr + (src->getPitch() / 2) : srcPtr - (src->getPitch() / 2); destPtr -= destArea.pitch / 2; } @@ -330,7 +330,7 @@ OSVideoSurface::OSVideoSurface(CScreenManager *screenManager, const CResourceKey CVideoSurface(screenManager) { _ddSurface = nullptr; _pendingLoad = pendingLoad; - + if (_pendingLoad) { loadResource(key); } else { @@ -453,7 +453,7 @@ void OSVideoSurface::recreate(int width, int height) { } void OSVideoSurface::resize(int width, int height) { - if (!_ddSurface || _ddSurface->getWidth() != width || + if (!_ddSurface || _ddSurface->getWidth() != width || _ddSurface->getHeight() != height) recreate(width, height); } @@ -467,7 +467,7 @@ int OSVideoSurface::getPixelDepth() { error("Could not load resource"); lock(); - + int result = _rawSurface->format.bytesPerPixel; if (result == 1) // Paletted 8-bit images don't store the color directly in the pixels diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp index b327c3647e..76f28540ea 100644 --- a/engines/titanic/true_talk/barbot_script.cpp +++ b/engines/titanic/true_talk/barbot_script.cpp @@ -107,7 +107,7 @@ int BarbotScript::chooseResponse(const TTroomScript *roomScript, const TTsentenc applyResponse(); return 2; - + } else if (tag == MKTAG('B', 'A', 'R', 'U') && getRandomNumber(100) > 50) { selectResponse(250025); switch (getDialsBitset()) { @@ -120,7 +120,7 @@ int BarbotScript::chooseResponse(const TTroomScript *roomScript, const TTsentenc } applyResponse(); - return 2; + return 2; } if (tag == MKTAG('T', 'H', 'R', 'T') || tag == MKTAG('S', 'L', 'O', 'W') || @@ -165,7 +165,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent dialogueId = ARRAY2[_arrIndex++]; } else if (getRandomNumber(100) > 35) { dialogueId = ARRAY2[0]; - _arrIndex = 1; + _arrIndex = 1; } else if (getRandomNumber(100) > 60) { switch (sentence->_field2C) { case 2: @@ -204,7 +204,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent CTrueTalkManager::setFlags(32, getValue(32) - 1); CTrueTalkManager::setFlags(33, getValue(33) - 1); CTrueTalkManager::setFlags(34, getValue(34) - 1); - + TTtreeResult treeResult; int val34 = getState(); setState(0); @@ -314,7 +314,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent return applySentenceIds(50382); } else if (flag2) { return applySentenceIds(51423); - } + } // Deliberate fall-through case 16: @@ -523,7 +523,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent CTrueTalkManager::triggerAction(30, 0); return 2; } - + return applySentenceIds(50320); case 58: if (val2C == 6 || val2C == 10) @@ -935,7 +935,7 @@ int BarbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence * break; case MKTAG('P', 'H', 'I', 'L'): case MKTAG('R', 'C', 'K', 'T'): - case MKTAG('S', 'C', 'I', 'E'): + case MKTAG('S', 'C', 'I', 'E'): tagId = MKTAG('S', 'C', 'I', 'E'); break; case MKTAG('T', 'R', 'A', '2'): @@ -1011,7 +1011,7 @@ uint BarbotScript::getDialsBitset() const { bits |= 2; if (!getDialRegion(2)) bits |= 4; - + return bits; } @@ -1098,7 +1098,7 @@ int BarbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScrip } break; } - + case 10: { uint val = CTrueTalkManager::getStateValue(3); bool bit0 = (val & 1) != 0; diff --git a/engines/titanic/true_talk/barbot_script.h b/engines/titanic/true_talk/barbot_script.h index 1820d77216..a8c92b2927 100644 --- a/engines/titanic/true_talk/barbot_script.h +++ b/engines/titanic/true_talk/barbot_script.h @@ -74,7 +74,7 @@ public: virtual int handleQuote(const TTroomScript *roomScript, const TTsentence *sentence, uint val, uint tagId, uint remainder); - + /** * Handles updating NPC state based on specified dialogue Ids and dial positions */ diff --git a/engines/titanic/true_talk/bellbot_script.cpp b/engines/titanic/true_talk/bellbot_script.cpp index b773e8af30..038285ec8d 100644 --- a/engines/titanic/true_talk/bellbot_script.cpp +++ b/engines/titanic/true_talk/bellbot_script.cpp @@ -245,7 +245,7 @@ int BellbotScript::process(const TTroomScript *roomScript, const TTsentence *sen && sentence->localWord("we") && sentence->localWord("in")) || (sentence->_field2C == 3 && sentence->localWord("rom") && sentence->localWord("is") && sentence->localWord("this")) - ) { + ) { uint id = getRangeValue(getRoomDialogueId(roomScript)); addResponse(getDialogueId(id ? id : 201384)); applyResponse(); @@ -258,7 +258,7 @@ int BellbotScript::process(const TTroomScript *roomScript, const TTsentence *sen result = processEntries(&_sentences[2], 0, roomScript, sentence); } else if (getValue(1) == 1) { result = processEntries(&_sentences[3], 0, roomScript, sentence); - + if (sentence->contains("shrinkbot")) { addResponse(getDialogueId(200583)); applyResponse(); @@ -521,7 +521,7 @@ int BellbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence default: break; } - + return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder); } @@ -835,7 +835,7 @@ int BellbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * applyFlag = true; } break; - + case 5: if (sentence->_field2C == 11 || sentence->_field2C == 13) { addResponse(getDialogueId(200492)); @@ -1497,7 +1497,7 @@ stateFlag = false; case 84: if (sentence->_field2C == 12) { addResponse(getDialogueId(202119)); - + switch (getValue(1)) { case 1: addResponse(getDialogueId(202024)); @@ -1631,7 +1631,7 @@ bool BellbotScript::randomResponse1(const TTroomScript *roomScript, uint id) { randomResponse3(roomScript, id); applyResponse(); } - + return false; } @@ -1729,7 +1729,7 @@ bool BellbotScript::checkCommonWords(const TTroomScript *roomScript, const TTsen addResponse(getDialogueId(200847)); } else if (sentence->localWord("canal")) { addResponse(getDialogueId(getValue(1) == 1 ? 200846 : 200847)); - } else if (sentence->localWord("firstclass") && + } else if (sentence->localWord("firstclass") && (sentence->localWord("stateroom") || sentence->localWord("room"))) { addResponse(getDialogueId(getValue(1) == 1 ? 200840 : 200306)); } else if (sentence->localWord("secondclass") && sentence->localWord("stateroom") && sentence->localWord("room")) { @@ -1790,12 +1790,12 @@ bool BellbotScript::checkCommonWords(const TTroomScript *roomScript, const TTsen } else { addResponse(getDialogueId(200686)); } - } else if (sentence->localWord("embarklobby") + } else if (sentence->localWord("embarklobby") || sentence->localWord("lobby")) { addResponse(getDialogueId(200850)); } else if (sentence->localWord("pellerator")) { addResponse(getDialogueId(200862)); - } else if (sentence->localWord("servicelift") + } else if (sentence->localWord("servicelift") || (sentence->localWord("service") && sentence->localWord("elevator"))) { addResponse(getDialogueId(200855)); } else if (sentence->localWord("elevator")) { diff --git a/engines/titanic/true_talk/bellbot_script.h b/engines/titanic/true_talk/bellbot_script.h index 6f57ee718f..7edb182301 100644 --- a/engines/titanic/true_talk/bellbot_script.h +++ b/engines/titanic/true_talk/bellbot_script.h @@ -78,7 +78,7 @@ private: bool checkCommonWords(const TTroomScript *roomScript, const TTsentence *sentence); uint getRoomDialogueId(const TTroomScript *roomScript); - + /** * Adds a description of the room to the conversation response */ diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp index f3a997e218..4df47e0af1 100644 --- a/engines/titanic/true_talk/deskbot_script.cpp +++ b/engines/titanic/true_talk/deskbot_script.cpp @@ -276,7 +276,7 @@ int DeskbotScript::handleQuote(const TTroomScript *roomScript, const TTsentence default: break; } - + return TTnpcScript::handleQuote(roomScript, sentence, val, tagId, remainder); } @@ -324,7 +324,7 @@ int DeskbotScript::updateState(uint oldId, uint newId, int index) { newId = getStateDialogueId(); if (newId == 240464 && getValue(1) != 1) newId = 240462; - + if (newId == 241635 && isDial1Medium()) { addResponse(getDialogueId(241556)); newId = getRangeValue(241632); @@ -408,7 +408,7 @@ int DeskbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri default: break; } - + return 0; } @@ -480,7 +480,7 @@ uint DeskbotScript::addAssignedRoomDialogue2() { void DeskbotScript::addAssignedRoomDialogue3() { addResponse(getDialogueId(241513)); addResponse(getDialogueId(241510)); - + CTrueTalkManager::setFlags(1, 2); setDialRegion(0, 0); setDialRegion(1, 0); @@ -618,7 +618,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * if (isDial1Low() && getValue(1) == 4) { if (sentence->_field2C == 12 || sentence->_field2C == 13 || sentence->contains("do not")) { - + addResponse(getDialogueId(240447)); setDialRegion(0, 0); setDialRegion(1, 0); @@ -1148,7 +1148,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * addResponse(getDialogueId(241267)); break; } - + add241716(); applyFlag = true; stateFlag = false; @@ -1223,7 +1223,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * addResponse(getDialogueId(241711)); } - + applyFlag = true; stateFlag = false; break; @@ -1244,7 +1244,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * } } - + applyFlag = true; stateFlag = false; break; @@ -1254,7 +1254,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * || sentence->contains("balcony") || sentence->contains("neither") || sentence->contains("the 1") || sentence->contains("the 2") || sentence->contains("former") || sentence->contains("latter") - || sentence->contains("either")) { + || sentence->contains("either")) { addResponse(getDialogueId(241700)); addResponse(getDialogueId(241687)); } else { @@ -1299,7 +1299,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * || sentence->contains("princess") || sentence->contains("small") || sentence->contains("the 1") || sentence->contains("the 2") || sentence->contains("the 3") || sentence->contains("the 4") - || sentence->contains("big") || sentence->contains("large")) { + || sentence->contains("big") || sentence->contains("large")) { addResponse(getDialogueId(241700)); addResponse(getDialogueId(241739)); } else { @@ -1317,7 +1317,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * if (sentence->contains("constitutional") || sentence->contains("const") || sentence->contains("absolute") || sentence->contains("small") || sentence->contains("the 1") || sentence->contains("the 2") - || sentence->contains("big") || sentence->contains("large")) { + || sentence->contains("big") || sentence->contains("large")) { addResponse(getDialogueId(241700)); addResponse(getDialogueId(241739)); } else { @@ -1334,7 +1334,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * case 91: if (sentence->contains("benev") || sentence->contains("dict") || sentence->contains("small") || sentence->contains("the 1") - || sentence->contains("the 2") || sentence->contains("big") + || sentence->contains("the 2") || sentence->contains("big") || sentence->contains("large") || sentence->contains("former") || sentence->contains("latter")) { addResponse(getDialogueId(241700)); @@ -1384,7 +1384,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * || sentence->contains("suite") || sentence->contains("next door") || sentence->contains("the 1") || sentence->contains("the 2") || sentence->contains("former") || sentence->contains("latter") - || sentence->contains("same room")) { + || sentence->contains("same room")) { addAssignedRoom(); setState(0); CTrueTalkManager::setFlags(17, 0); @@ -1424,7 +1424,7 @@ int DeskbotScript::preprocess(const TTroomScript *roomScript, const TTsentence * stateFlag = false; } break; - + default: break; } diff --git a/engines/titanic/true_talk/dialogue_file.cpp b/engines/titanic/true_talk/dialogue_file.cpp index cbd3685315..e5438c5825 100644 --- a/engines/titanic/true_talk/dialogue_file.cpp +++ b/engines/titanic/true_talk/dialogue_file.cpp @@ -34,7 +34,7 @@ void DialogueIndexEntry::load(Common::SeekableReadStream &s) { CDialogueFile::CDialogueFile(const CString &filename, uint count) { if (!_file.open(filename)) error("Could not locate dialogue file - %s", filename.c_str()); - + _cache.resize(count); _file.readUint32LE(); // Skip over file Id diff --git a/engines/titanic/true_talk/doorbot_script.cpp b/engines/titanic/true_talk/doorbot_script.cpp index 1ca1ab13e5..5c7403f187 100644 --- a/engines/titanic/true_talk/doorbot_script.cpp +++ b/engines/titanic/true_talk/doorbot_script.cpp @@ -70,7 +70,7 @@ void DoorbotScript::setupSentences() { _mappings.load("Mappings/Doorbot", 4); _entries.load("Sentences/Doorbot"); - + static const int SENTENCE_NUMS[11] = { 2, 100, 101, 102, 107, 110, 111, 124, 129, 131, 132 }; @@ -364,7 +364,7 @@ int DoorbotScript::process(const TTroomScript *roomScript, const TTsentence *sen case 32: return setResponse(10110, 0); - + case 33: if (sentence->contains("sieve") || sentence->contains("colander") || sentence->contains("vegetable") || sentence->contains("ground") @@ -497,7 +497,7 @@ int DoorbotScript::process(const TTroomScript *roomScript, const TTsentence *sen return setResponse(getDialogueId(220000)); break; } - + return 2; } @@ -672,7 +672,7 @@ int DoorbotScript::updateState(uint oldId, uint newId, int index) { bool flag39 = getValue(39) != 0; CTrueTalkManager::setFlags(38, 0); CTrueTalkManager::setFlags(39, 0); - + if (newId > 220890) { switch (newId) { case 221064: @@ -897,7 +897,7 @@ int DoorbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri case 29: if (sentence->localWord("another") || sentence->localWord("more") || sentence->localWord("additional") || sentence->contains("another") || - sentence->contains("more") || sentence->contains("additional")) { + sentence->contains("more") || sentence->contains("additional")) { addResponse(getDialogueId(220058)); applyResponse(); return 2; diff --git a/engines/titanic/true_talk/maitred_script.cpp b/engines/titanic/true_talk/maitred_script.cpp index e0636d045f..e902169ed0 100644 --- a/engines/titanic/true_talk/maitred_script.cpp +++ b/engines/titanic/true_talk/maitred_script.cpp @@ -106,7 +106,7 @@ int MaitreDScript::process(const TTroomScript *roomScript, const TTsentence *sen applyResponse(); } - return 2; + return 2; } if (++_answerCtr > 50 || sentence->localWord("stop") || sentence->localWord("enough") diff --git a/engines/titanic/true_talk/parrot_script.h b/engines/titanic/true_talk/parrot_script.h index ec7bec7629..530eed09fd 100644 --- a/engines/titanic/true_talk/parrot_script.h +++ b/engines/titanic/true_talk/parrot_script.h @@ -32,7 +32,7 @@ private: /** * Setup sentence data */ - void setupSentences(); + void setupSentences(); public: ParrotScript(int val1, const char *charClass, int v2, const char *charName, int v3, int val2, int v4, int v5, int v6, int v7); diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp index 2741e6b640..802e2b4ba6 100644 --- a/engines/titanic/true_talk/script_handler.cpp +++ b/engines/titanic/true_talk/script_handler.cpp @@ -78,7 +78,7 @@ int CScriptHandler::processInput(TTroomScript *roomScript, TTnpcScript *npcScrip const TTstring &line) { if (!roomScript || !line.isValid()) return SS_5; - + TTsentence *sentence = new TTsentence(_inputCtr++, line, this, roomScript, npcScript); int result = _parser.preprocess(sentence); roomScript->scriptPreprocess(sentence); diff --git a/engines/titanic/true_talk/script_handler.h b/engines/titanic/true_talk/script_handler.h index 01aa2ef1c5..e28eeed1ac 100644 --- a/engines/titanic/true_talk/script_handler.h +++ b/engines/titanic/true_talk/script_handler.h @@ -58,7 +58,7 @@ public: /** * Set the character and room */ - ScriptChangedResult scriptChanged(TTroomScript *roomScript, + ScriptChangedResult scriptChanged(TTroomScript *roomScript, TTnpcScript *npcScript, uint dialogueId); int processInput(TTroomScript *roomScript, TTnpcScript *npcScript, diff --git a/engines/titanic/true_talk/script_support.cpp b/engines/titanic/true_talk/script_support.cpp index c24e275827..14560e2d9f 100644 --- a/engines/titanic/true_talk/script_support.cpp +++ b/engines/titanic/true_talk/script_support.cpp @@ -36,7 +36,7 @@ int TTnpcScriptResponse::size() const { /*------------------------------------------------------------------------*/ -TTscriptRange::TTscriptRange(uint id, const Common::Array<uint> &values, +TTscriptRange::TTscriptRange(uint id, const Common::Array<uint> &values, bool isRandom, bool isSequential) : _id(id), _nextP(nullptr) { _mode = SF_NONE; diff --git a/engines/titanic/true_talk/script_support.h b/engines/titanic/true_talk/script_support.h index a41673bd5c..bdaec6e7c9 100644 --- a/engines/titanic/true_talk/script_support.h +++ b/engines/titanic/true_talk/script_support.h @@ -55,7 +55,7 @@ struct TTscriptRange { TTscriptRange() : _id(0), _nextP(nullptr), _priorIndex(0), _mode(SF_NONE) {} - TTscriptRange(uint id, const Common::Array<uint> &values, bool isRandom, + TTscriptRange(uint id, const Common::Array<uint> &values, bool isRandom, bool isSequential); }; diff --git a/engines/titanic/true_talk/succubus_script.h b/engines/titanic/true_talk/succubus_script.h index d5cea7e66f..782e3eeb04 100644 --- a/engines/titanic/true_talk/succubus_script.h +++ b/engines/titanic/true_talk/succubus_script.h @@ -34,7 +34,7 @@ private: /** * Setup sentence data */ - void setupSentences(); + void setupSentences(); /** * Add a response and optionally set the state diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp index be9ca667de..ed45ab26a0 100644 --- a/engines/titanic/true_talk/true_talk_manager.cpp +++ b/engines/titanic/true_talk/true_talk_manager.cpp @@ -45,7 +45,7 @@ CTrueTalkNPC *CTrueTalkManager::_currentNPC; /*------------------------------------------------------------------------*/ -CTrueTalkManager::CTrueTalkManager(CGameManager *owner) : +CTrueTalkManager::CTrueTalkManager(CGameManager *owner) : _gameManager(owner), _scripts(&_titleEngine), _currentCharId(0), _dialogueFile(nullptr), _dialogueId(0) { _titleEngine.setup(3, 3); @@ -209,7 +209,7 @@ void CTrueTalkManager::preLoad() { void CTrueTalkManager::removeCompleted() { for (TTtalkerList::iterator i = _talkers.begin(); i != _talkers.end(); ) { TTtalker *talker = *i; - + if (talker->_done) { i = _talkers.erase(i); delete talker; @@ -222,7 +222,7 @@ void CTrueTalkManager::removeCompleted() { void CTrueTalkManager::start(CTrueTalkNPC *npc, uint id, CViewItem *view) { TTnpcScript *npcScript = getNpcScript(npc); TTroomScript *roomScript = getRoomScript(); - + _titleEngine.reset(); uint charId = npcScript->charId(); loadAssets(npc, charId); @@ -337,7 +337,7 @@ void CTrueTalkManager::processInput(CTrueTalkNPC *npc, CTextInputMsg *msg, CView loadAssets(npc, npcScript->charId()); setDialogue(npc, roomScript, view); } - + _currentNPC = nullptr; } @@ -376,7 +376,7 @@ CString CTrueTalkManager::readDialogueString() { size_t entrySize = textRes->size(); byte *tempBuffer = (entrySize < STRING_BUFFER_SIZE) ? buffer : new byte[entrySize + 1]; - + _dialogueFile->read(textRes, tempBuffer, entrySize); buffer[entrySize] = '\0'; @@ -406,7 +406,7 @@ uint CTrueTalkManager::readDialogueSpeech() { for (uint idx = 0; idx < _titleEngine._indexes.size(); ++idx) { CWaveFile *waveFile = _gameManager->_sound.getTrueTalkSound( _dialogueFile, _titleEngine._indexes[idx] - _dialogueId); - if (waveFile) { + if (waveFile) { _speechDuration += waveFile->getDuration(); } } diff --git a/engines/titanic/true_talk/tt_action.h b/engines/titanic/true_talk/tt_action.h index 29e2bc4e4a..c6f49af16d 100644 --- a/engines/titanic/true_talk/tt_action.h +++ b/engines/titanic/true_talk/tt_action.h @@ -29,7 +29,7 @@ namespace Titanic { class TTaction : public TTmajorWord { private: - static bool _staticFlag; + static bool _staticFlag; protected: int _field30; public: diff --git a/engines/titanic/true_talk/tt_concept.cpp b/engines/titanic/true_talk/tt_concept.cpp index c614e14dae..3c52c9f13b 100644 --- a/engines/titanic/true_talk/tt_concept.cpp +++ b/engines/titanic/true_talk/tt_concept.cpp @@ -27,7 +27,7 @@ namespace Titanic { -TTconcept::TTconcept() : _string1(" "), _string2(" "), +TTconcept::TTconcept() : _string1(" "), _string2(" "), _scriptP(nullptr), _wordP(nullptr) { if (setStatus()) setScriptType(ST_UNKNOWN_SCRIPT); @@ -51,7 +51,7 @@ TTconcept::TTconcept(TTscriptBase *script, ScriptType scriptType) : TTconcept::TTconcept(TTword *word, ScriptType scriptType) : _string1(" "), _string2(" "), _wordP(nullptr), _scriptP(nullptr) { - + if (!word || !setStatus() || word->getStatus()) { _status = SS_5; } else { @@ -74,7 +74,7 @@ TTconcept::TTconcept(TTconcept &src) : if (setStatus()) { _status = SS_VALID; _scriptP = src._scriptP; - + if (src._wordP) { _status = initializeWordRef(src._wordP); initialize(src); @@ -177,7 +177,7 @@ void TTconcept::initialize(TTconcept &src) { _field30 = src._field30; _field34 = src._field34; - + if (src._flag) { g_vm->_exeResources._owner->setParserConcept(this, &src); src.setFlag(true); @@ -225,7 +225,7 @@ int TTconcept::setOwner(TTconcept *src) { int TTconcept::setOwner(TTword *src, bool dontDup) { TTword *word = dontDup ? src : src->copy(); - + if (word) { if (!_word2P) { _word2P = word; diff --git a/engines/titanic/true_talk/tt_concept.h b/engines/titanic/true_talk/tt_concept.h index 88afb6f28b..430b3b6a8c 100644 --- a/engines/titanic/true_talk/tt_concept.h +++ b/engines/titanic/true_talk/tt_concept.h @@ -125,8 +125,8 @@ public: /** * Returns true if the word is of the specified class */ - bool isWordClass(WordClass wordClass) const { - return _wordP && _wordP->isClass(wordClass); + bool isWordClass(WordClass wordClass) const { + return _wordP && _wordP->isClass(wordClass); } void setFlag(bool val) { _flag = val; } diff --git a/engines/titanic/true_talk/tt_node.cpp b/engines/titanic/true_talk/tt_node.cpp index cbbb1dd756..fece3b8889 100644 --- a/engines/titanic/true_talk/tt_node.cpp +++ b/engines/titanic/true_talk/tt_node.cpp @@ -78,7 +78,7 @@ TTnode *TTnode::getHead() { TTnode *TTnode::getTail() { if (_nextP == nullptr) return this; - + TTnode *node = _nextP; while (node->_nextP) node = node->_nextP; diff --git a/engines/titanic/true_talk/tt_npc_script.h b/engines/titanic/true_talk/tt_npc_script.h index b9afdfad8a..bdca568b09 100644 --- a/engines/titanic/true_talk/tt_npc_script.h +++ b/engines/titanic/true_talk/tt_npc_script.h @@ -259,7 +259,7 @@ public: * and adds it to the response */ virtual void selectResponse(int id); - + /** * Handles scanning the word list for a given Id, and if * found adds it to the sentence concept list @@ -275,7 +275,7 @@ public: * either a random value, or each value in turn */ virtual uint getRangeValue(uint id); - + /** * Resets the prior used index for the specified range */ @@ -295,7 +295,7 @@ public: * Returns a bitset of the dials being off or not */ virtual uint getDialsBitset() const { return 0; } - + virtual const TTscriptMapping *getMapping(int index); virtual int doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence); @@ -303,7 +303,7 @@ public: * Handles any post-response NPC processing */ virtual void postResponse(int v1, const TTsentenceEntry *entry, const TTroomScript *roomScript, const TTsentence *sentence) {} - + virtual void save(SimpleFile *file); virtual void load(SimpleFile *file); virtual void saveBody(SimpleFile *file); @@ -337,7 +337,7 @@ public: * Handles a randomzied response */ virtual bool randomResponse(uint index); - + virtual uint translateId(uint id) const; void preLoad(); diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp index 95a302d53c..d67f5235c4 100644 --- a/engines/titanic/true_talk/tt_parser.cpp +++ b/engines/titanic/true_talk/tt_parser.cpp @@ -147,16 +147,16 @@ int TTparser::normalize(TTsentence *sentence) { case '!': sentence->set38(3); break; - + case '\'': if (!normalizeContraction(srcLine, index, *destLine)) flag = true; break; - + case '.': sentence->set38(1); break; - + case ':': commandVal = isEmoticon(srcLine, index); if (commandVal) { @@ -166,7 +166,7 @@ int TTparser::normalize(TTsentence *sentence) { flag = true; } break; - + case ';': commandVal = isEmoticon(srcLine, index); if (commandVal == 6) { @@ -177,7 +177,7 @@ int TTparser::normalize(TTsentence *sentence) { index += 2; } break; - + case '<': ++index; commandVal = isEmoticon(srcLine, index); @@ -315,7 +315,7 @@ bool TTparser::normalizeContraction(const TTstring &srcLine, int srcIndex, TTstr destLine.deleteLastChar(); destLine.deleteLastChar(); destLine += "m"; - } else if (srcLine.hasSuffix(" sha") || + } else if (srcLine.hasSuffix(" sha") || (srcIndex == 4 && srcLine.hasSuffix("sha"))) { // shan't -> shall not destLine.deleteLastChar(); @@ -726,7 +726,7 @@ int TTparser::loadRequests(TTword *word) { int TTparser::considerRequests(TTword *word) { if (!_nodesP || !word) return 0; - + TTconcept *concept = nullptr; int status = 0; bool flag = false; @@ -802,7 +802,7 @@ int TTparser::considerRequests(TTword *word) { } else { status = _sentenceConcept->createConcept(0, 2, word); } - + if (!status && !_sentenceConcept->_concept4P && _sentenceConcept->_concept0P) { TTconcept *oldConcept = _sentenceConcept->_concept2P; flag = filterConcepts(5, 2); @@ -814,14 +814,14 @@ int TTparser::considerRequests(TTword *word) { } } break; - + case SEEK_OBJECT_OVERRIDE: if ((word->_wordClass == WC_THING || word->_wordClass == WC_PRONOUN) && _sentence->fn2(2, TTstring("thePlayer"), _sentenceConcept) && !_sentenceConcept->_concept3P) { _sentenceConcept->_concept3P = _sentenceConcept->_concept2P; _sentenceConcept->_concept2P = nullptr; - + flag = filterConcepts(5, 2); if (!flag) { status = _sentenceConcept->createConcept(0, 2, word); @@ -893,7 +893,7 @@ int TTparser::considerRequests(TTword *word) { if (word->_id == 601) { if (_conceptP->findByWordClass(WC_THING)) status = _conceptP->setOwner(word, false); - + flag = true; } break; @@ -992,11 +992,11 @@ int TTparser::considerRequests(TTword *word) { oldNode->_field1C = 2; _sentenceConcept = oldNode->addSibling(); concept = nullptr; - + _sentenceConcept->_concept1P = oldNode->_concept1P; _sentenceConcept->_concept5P = oldNode->_concept5P; _sentenceConcept->_concept2P = oldNode->_concept2P; - + if (seekVal) { seekVal = 0; @@ -1107,7 +1107,7 @@ int TTparser::considerRequests(TTword *word) { if (!_sentenceConcept->_concept0P) { newPictP = new TTpicture(TTstring("?"), WC_THING, 0, 0, 0, 0, 0); newConceptP = new TTconcept(newPictP); - + _sentenceConcept->_concept0P = newConceptP; delete newPictP; addNode(4); @@ -1195,7 +1195,7 @@ int TTparser::considerRequests(TTword *word) { case MKTAG('H', 'E', 'L', 'P'): if (_sentence->_field2C == 1) _sentence->_field2C = 18; - + flag = true; break; @@ -1273,7 +1273,7 @@ int TTparser::considerRequests(TTword *word) { break; } - TTparserNode *nextP = dynamic_cast<TTparserNode *>(nodeP->_nextP); + TTparserNode *nextP = dynamic_cast<TTparserNode *>(nodeP->_nextP); if (flag) delete nodeP; nodeP = nextP; @@ -1288,7 +1288,7 @@ int TTparser::processRequests(TTword *word) { switch (status) { case 0: status = considerRequests(word); - + // Iterate through the words while (_currentWordP) { considerRequests(_currentWordP); @@ -1388,7 +1388,7 @@ int TTparser::checkForAction() { if (_conceptP && _currentWordP) { // Firstly we need to get the next word to process, and remove it from // the list pointed to by _currentWordP - TTword *word = _currentWordP; + TTword *word = _currentWordP; if (word->_nextP) { // Chain of words, so we need to find the last word of the chain, // and set the last-but-one's _nextP to nullptr to detach the last one @@ -1410,7 +1410,7 @@ int TTparser::checkForAction() { word->_text == "done") { TTstring doStr("do"); TTaction *action = new TTaction(doStr, WC_ACTION, 112, 0, _sentenceConcept->get18()); - + if (!action->isValid()) { status = SS_4; } else { diff --git a/engines/titanic/true_talk/tt_parser.h b/engines/titanic/true_talk/tt_parser.h index 201de7eb0e..5fd997a985 100644 --- a/engines/titanic/true_talk/tt_parser.h +++ b/engines/titanic/true_talk/tt_parser.h @@ -90,7 +90,7 @@ private: * spaces and lowercasing everything */ int normalize(TTsentence *sentence); - + /** * Submethod called by normalize to handle expanding contacted word pairs * like can't, should've, and so on. @@ -118,7 +118,7 @@ private: * @param startIndex Starting index in the start to check * @param strings List of strings to check for. Strings come in pairs, with the * first being the string to match, and the second the replacement - * @returns Index of the start of the following word + * @returns Index of the start of the following word */ static int searchAndReplace(TTstring &line, int startIndex, const StringArray &strings); diff --git a/engines/titanic/true_talk/tt_picture.h b/engines/titanic/true_talk/tt_picture.h index 18cb88278f..988f2a7437 100644 --- a/engines/titanic/true_talk/tt_picture.h +++ b/engines/titanic/true_talk/tt_picture.h @@ -53,7 +53,7 @@ public: * Checks whether the word's tag is a known type */ virtual bool checkTag() const; - + /** * Compare the word's tag to a given tag value */ @@ -63,7 +63,7 @@ public: * Return the tag associated with the word */ virtual uint getTag() const; - + virtual bool proc9(int val) const; virtual int proc10() const; diff --git a/engines/titanic/true_talk/tt_pronoun.h b/engines/titanic/true_talk/tt_pronoun.h index ccc077152c..f7d61780fa 100644 --- a/engines/titanic/true_talk/tt_pronoun.h +++ b/engines/titanic/true_talk/tt_pronoun.h @@ -29,7 +29,7 @@ namespace Titanic { class TTpronoun : public TTmajorWord { private: - static bool _staticFlag; + static bool _staticFlag; protected: int _field30; public: @@ -48,7 +48,7 @@ public: */ virtual TTword *copy() const; - virtual bool comparePronounTo(int val) const { + virtual bool comparePronounTo(int val) const { return _field30 == val; } diff --git a/engines/titanic/true_talk/tt_quotes_tree.cpp b/engines/titanic/true_talk/tt_quotes_tree.cpp index 1f073b83f2..16453a10ae 100644 --- a/engines/titanic/true_talk/tt_quotes_tree.cpp +++ b/engines/titanic/true_talk/tt_quotes_tree.cpp @@ -33,12 +33,12 @@ static uint TABLE_INDEXES[3] = { 922, 1015, 1018 }; void TTquotesTree::load() { Common::SeekableReadStream *r = g_vm->_filesManager->getResource("TEXT/TREE"); - + for (int idx = 0; idx < QUOTES_TREE_COUNT; ++idx) { TTquotesTreeEntry &rec = _entries[idx]; assert(r->pos() < r->size()); - - rec._id = r->readUint32LE(); + + rec._id = r->readUint32LE(); if (rec._id == 0) { // Nothing needed } else { @@ -64,14 +64,14 @@ int TTquotesTree::search(const char *str, QuoteTreeNum treeNum, const TTquotesTreeEntry *bTree = &_entries[TABLE_INDEXES[treeNum]]; if (!search1(&str, bTree, buffer, tagId) || !buffer->_treeItemP) return -1; - + if (remainder) { while (*str) { if (*str >= 'a' && *str != 's') *remainder += *str; } } - + return buffer->_treeItemP->_id & 0xffffff; } @@ -83,7 +83,7 @@ bool TTquotesTree::search1(const char **str, const TTquotesTreeEntry *bTree, const char *strP = *str; bool flag = false; - for (uint mode = bTree->_id >> 24; mode != 0; + for (uint mode = bTree->_id >> 24; mode != 0; ++bTree, mode = bTree->_id >> 24) { switch (mode) { @@ -91,11 +91,11 @@ bool TTquotesTree::search1(const char **str, const TTquotesTreeEntry *bTree, if (compareWord(str, bTree->_string.c_str())) flag = true; break; - + case 2: compareWord(str, bTree->_string.c_str()); break; - + case 5: if (READ_LE_UINT32(bTree->_string.c_str()) == tagId) flag = true; diff --git a/engines/titanic/true_talk/tt_response.cpp b/engines/titanic/true_talk/tt_response.cpp index f007f98f97..1c784ad320 100644 --- a/engines/titanic/true_talk/tt_response.cpp +++ b/engines/titanic/true_talk/tt_response.cpp @@ -32,7 +32,7 @@ TTresponse::TTresponse(int dialogueId, int val2) : _field0(val2), _text(" "), _dialogueId(dialogueId), _nextP(nullptr), _linkP(nullptr) { } -TTresponse::TTresponse(const TTresponse *src) : _field0(src->_field0), +TTresponse::TTresponse(const TTresponse *src) : _field0(src->_field0), _text(src->_text), _dialogueId(src->_dialogueId), _nextP(src->_nextP), _linkP(src->_linkP) { } @@ -52,7 +52,7 @@ TTresponse::~TTresponse() { TTresponse *TTresponse::copyChain() const { TTresponse *returnResponseP = new TTresponse(this); - for (TTresponse *srcP = _nextP, *destP = returnResponseP; + for (TTresponse *srcP = _nextP, *destP = returnResponseP; srcP; srcP = srcP->_nextP, destP = destP->_nextP) { destP->_nextP = new TTresponse(*srcP); } diff --git a/engines/titanic/true_talk/tt_room_script.cpp b/engines/titanic/true_talk/tt_room_script.cpp index a49a5a5bd1..9b7be0a976 100644 --- a/engines/titanic/true_talk/tt_room_script.cpp +++ b/engines/titanic/true_talk/tt_room_script.cpp @@ -49,7 +49,7 @@ void TTroomScript::proc9(int v) { ScriptChangedResult TTroomScript::scriptChanged(TTscriptBase *npcScript, int id) { if (id == 1) _field54 = 1; - + return SCR_1; } diff --git a/engines/titanic/true_talk/tt_room_script.h b/engines/titanic/true_talk/tt_room_script.h index 39a50ac30d..0f47830a12 100644 --- a/engines/titanic/true_talk/tt_room_script.h +++ b/engines/titanic/true_talk/tt_room_script.h @@ -49,12 +49,12 @@ public: virtual bool proc8() const = 0; virtual void proc9(int v) = 0; - + /** * Called when the script changes */ virtual ScriptChangedResult scriptChanged(TTscriptBase *npcScript, int id) = 0; - + virtual bool proc11() const = 0; }; diff --git a/engines/titanic/true_talk/tt_script_base.h b/engines/titanic/true_talk/tt_script_base.h index 869b0beb64..30a296a444 100644 --- a/engines/titanic/true_talk/tt_script_base.h +++ b/engines/titanic/true_talk/tt_script_base.h @@ -60,7 +60,7 @@ protected: * Delete any responses set up for the script */ void deleteResponses(); - + /** * Creates and appends a new response fragment to the script specified by * the given conversation Id @@ -83,7 +83,7 @@ protected: * Set the script state */ void setState(int state) { _state = state; } - + /** * Get the current state */ diff --git a/engines/titanic/true_talk/tt_scripts.cpp b/engines/titanic/true_talk/tt_scripts.cpp index f8ea65a475..4c01fd1ead 100644 --- a/engines/titanic/true_talk/tt_scripts.cpp +++ b/engines/titanic/true_talk/tt_scripts.cpp @@ -32,7 +32,7 @@ #include "titanic/true_talk/succubus_script.h" namespace Titanic { - + TTnpcScript *TTnpcScriptList::findById(int charId) const { for (TTnpcScriptList::const_iterator i = begin(); i != end(); ++i) { const TTnpcScriptListItem *item = *i; diff --git a/engines/titanic/true_talk/tt_string.h b/engines/titanic/true_talk/tt_string.h index 5b12d93418..69a94f6bf6 100644 --- a/engines/titanic/true_talk/tt_string.h +++ b/engines/titanic/true_talk/tt_string.h @@ -39,7 +39,7 @@ struct TTstringData { }; enum TTstringStatus { - SS_VALID = 0, SS_1 = 1, SS_2 = 2, SS_3 = 3, SS_4 = 4, + SS_VALID = 0, SS_1 = 1, SS_2 = 2, SS_3 = 3, SS_4 = 4, SS_5 = 5, SS_7 = 7, SS_8 = 8, SS_11 = 11, SS_13 = 13 }; @@ -127,7 +127,7 @@ public: * Get a char * pointer to the string data */ const char *c_str() const { return _data->_string.c_str(); } - + /** * Automatic operator to convert to a const char * */ diff --git a/engines/titanic/true_talk/tt_synonym.cpp b/engines/titanic/true_talk/tt_synonym.cpp index b476efefcb..bb78e734ca 100644 --- a/engines/titanic/true_talk/tt_synonym.cpp +++ b/engines/titanic/true_talk/tt_synonym.cpp @@ -24,7 +24,7 @@ namespace Titanic { -TTsynonym::TTsynonym() : TTstringNode(), _file(HANDLE_STDIN), +TTsynonym::TTsynonym() : TTstringNode(), _file(HANDLE_STDIN), _mode(0), _field1C(0) { } @@ -72,7 +72,7 @@ int TTsynonym::save(SimpleFile *file) { } file->writeFormat("%c", ' '); - + if (synP->_file) { file->writeFormat("%2.0d", synP->_file); } else { diff --git a/engines/titanic/true_talk/tt_title_script.cpp b/engines/titanic/true_talk/tt_title_script.cpp index 85b56d0e1e..2effb96cc7 100644 --- a/engines/titanic/true_talk/tt_title_script.cpp +++ b/engines/titanic/true_talk/tt_title_script.cpp @@ -25,7 +25,7 @@ namespace Titanic { TTTitleScript::TTTitleScript() : TTscriptBase(1, "", 0, "", 0, -1, -1, -1, 0), - _field50(0), _field5C(-1), _field60(0) { + _field50(0), _field5C(-1), _field60(0) { } } // End of namespace Titanic diff --git a/engines/titanic/true_talk/tt_word.h b/engines/titanic/true_talk/tt_word.h index 7fd61c38ac..7a42614f43 100644 --- a/engines/titanic/true_talk/tt_word.h +++ b/engines/titanic/true_talk/tt_word.h @@ -32,7 +32,7 @@ namespace Titanic { /** * Types of words */ -enum WordClass { +enum WordClass { WC_UNKNOWN = 0, WC_ACTION = 1, WC_THING = 2, WC_ABSTRACT = 3, WC_ARTICLE = 4, WC_CONJUNCTION = 5, WC_PRONOUN = 6, WC_PREPOSITION = 7, WC_ADJECTIVE = 8, WC_ADVERB = 9 @@ -155,7 +155,7 @@ public: * Creates a copy of the word */ virtual TTword *copy() const; - + virtual bool proc2(int val) const { return false; } virtual int proc3() const { return -1; } virtual void proc4() {} @@ -165,7 +165,7 @@ public: * Checks whether the word's tag is a known type */ virtual bool checkTag() const { return false; } - + /** * Compare the word's tag to a given tag value */ @@ -175,7 +175,7 @@ public: * Return the tag associated with the word */ virtual uint getTag() const { return 0; } - + virtual bool proc9(int val) const { return false; } virtual int proc10() const { return 0; } virtual void proc11() {} |