diff options
-rw-r--r-- | engines/titanic/core/saveable_object.cpp | 22 | ||||
-rw-r--r-- | engines/titanic/core/view_item.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_slider.h | 1 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_text.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/support/font.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/support/string.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_parser.cpp | 7 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_quotes.cpp | 2 |
8 files changed, 21 insertions, 23 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index 4b24f3e37e..f6c83b2e74 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -783,9 +783,9 @@ DEFFN(CDropObjectMsg) DEFFN(CDropZoneGotObjectMsg) DEFFN(CDropZoneLostObjectMsg) DEFFN(CEditControlMsg) -DEFFN(CEnterNodeMsg); -DEFFN(CEnterRoomMsg); -DEFFN(CEnterViewMsg); +DEFFN(CEnterNodeMsg) +DEFFN(CEnterRoomMsg) +DEFFN(CEnterViewMsg) DEFFN(CEjectCylinderMsg) DEFFN(CErasePhonographCylinderMsg) DEFFN(CFrameMsg) @@ -805,9 +805,9 @@ DEFFN(CIsEarBowlPuzzleDone) DEFFN(CIsHookedOnMsg) DEFFN(CIsParrotPresentMsg) DEFFN(CKeyCharMsg) -DEFFN(CLeaveNodeMsg); -DEFFN(CLeaveRoomMsg); -DEFFN(CLeaveViewMsg); +DEFFN(CLeaveNodeMsg) +DEFFN(CLeaveRoomMsg) +DEFFN(CLeaveViewMsg) DEFFN(CLemonFallsFromTreeMsg) DEFFN(CLightsMsg) DEFFN(CLoadSuccessMsg) @@ -868,9 +868,9 @@ DEFFN(CPhonographRecordMsg) DEFFN(CPhonographStopMsg) DEFFN(CPlayRangeMsg) DEFFN(CPlayerTriesRestaurantTableMsg) -DEFFN(CPreEnterNodeMsg); -DEFFN(CPreEnterRoomMsg); -DEFFN(CPreEnterViewMsg); +DEFFN(CPreEnterNodeMsg) +DEFFN(CPreEnterRoomMsg) +DEFFN(CPreEnterViewMsg) DEFFN(CPreSaveMsg) DEFFN(CProdMaitreDMsg) DEFFN(CPumpingMsg) @@ -900,7 +900,7 @@ DEFFN(CSetChevLiftBits) DEFFN(CSetChevPanelBitMsg) DEFFN(CSetChevPanelButtonsMsg) DEFFN(CSetChevRoomBits) -DEFFN(CSetFrameMsg); +DEFFN(CSetFrameMsg) DEFFN(CSetMusicControlsMsg) DEFFN(CSetVarMsg) DEFFN(CSetVolumeMsg) @@ -998,7 +998,7 @@ DEFFN(CMusicPlayer) DEFFN(CNodeAutoSoundPlayer) DEFFN(CRestrictedAutoMusicPlayer) DEFFN(CRoomAutoSoundPlayer) -DEFFN(CRoomTriggerAutoMusicPlayer); +DEFFN(CRoomTriggerAutoMusicPlayer) DEFFN(CSeasonNoises) DEFFN(CSeasonalMusicPlayer) DEFFN(CTitaniaSpeech) diff --git a/engines/titanic/core/view_item.cpp b/engines/titanic/core/view_item.cpp index 07c01423e0..8faf100238 100644 --- a/engines/titanic/core/view_item.cpp +++ b/engines/titanic/core/view_item.cpp @@ -38,7 +38,7 @@ BEGIN_MESSAGE_MAP(CViewItem, CNamedItem) END_MESSAGE_MAP() CViewItem::CViewItem() : CNamedItem() { - Common::fill(&_buttonUpTargets[0], &_buttonUpTargets[4], nullptr); + Common::fill(&_buttonUpTargets[0], &_buttonUpTargets[4], (CTreeItem *)nullptr); _field24 = 0; _field28 = 0.0; _viewNumber = 0; diff --git a/engines/titanic/pet_control/pet_slider.h b/engines/titanic/pet_control/pet_slider.h index 93390a5d59..0bc9e825cd 100644 --- a/engines/titanic/pet_control/pet_slider.h +++ b/engines/titanic/pet_control/pet_slider.h @@ -80,6 +80,7 @@ protected: bool containsPt(const Point &pt) const { return _bounds.contains(pt); } public: CPetSlider(); + virtual ~CPetSlider() {} /** * Setup the background diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp index a8d9ba6eb5..f87b037109 100644 --- a/engines/titanic/pet_control/pet_text.cpp +++ b/engines/titanic/pet_control/pet_text.cpp @@ -404,7 +404,7 @@ bool CPetText::handleKey(char c) { return true; default: - if (c >= 32 && c <= 127) + if ((byte)c >= 32 && (byte)c <= 127) appendText(CString(c, 1)); break; } diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp index c960e2fa9e..f4466def31 100644 --- a/engines/titanic/support/font.cpp +++ b/engines/titanic/support/font.cpp @@ -112,7 +112,7 @@ int STFont::stringWidth(const CString &text) const { const char *srcP = text.c_str(); int total = 0; char c; - while (c = *srcP++) { + while (c = (*srcP++)) { if (c == 26) { // Skip over command parameter bytes srcP += 3; @@ -265,7 +265,7 @@ void STFont::checkLineWrap(Point &textSize, int maxWidth, const char *&str) cons else if (*srcPtr == TEXTCMD_SET_COLOR) srcPtr += 4; else - totalWidth += _chars[*srcPtr]._width; + totalWidth += _chars[(byte)*srcPtr]._width; } if ((textSize.x + totalWidth) >= maxWidth && totalWidth < maxWidth) { diff --git a/engines/titanic/support/string.cpp b/engines/titanic/support/string.cpp index 86dc0be0b0..d85fcfc515 100644 --- a/engines/titanic/support/string.cpp +++ b/engines/titanic/support/string.cpp @@ -32,9 +32,7 @@ CString::CString(char c, uint32 len) : Common::String() { } CString::CString(int val) : Common::String() { - char buffer[16]; - itoa(val, buffer, 10); - *this += buffer; + *this = CString::format("%d", val); } CString CString::left(uint count) const { diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp index 3014ebaa07..1d9c199054 100644 --- a/engines/titanic/true_talk/tt_parser.cpp +++ b/engines/titanic/true_talk/tt_parser.cpp @@ -476,7 +476,6 @@ const NumberEntry *TTparser::replaceNumbers2(TTstring &line, int *startIndex) { } int TTparser::findFrames(TTsentence *sentence) { - static bool flag; _sentenceConcept = &sentence->_sentenceConcept; _sentence = sentence; @@ -1428,10 +1427,10 @@ int TTparser::checkForAction() { } // Handle any remaining words - TTword *reqWord = nullptr; while (_currentWordP) { - if (considerRequests(_currentWordP) > 1) { - reqWord = _currentWordP; + int result = considerRequests(_currentWordP); + if (result > 1) { + status = result; } else { // Delete the top of the word chain TTword *wordP = _currentWordP; diff --git a/engines/titanic/true_talk/tt_quotes.cpp b/engines/titanic/true_talk/tt_quotes.cpp index 856cba9421..7b98558d63 100644 --- a/engines/titanic/true_talk/tt_quotes.cpp +++ b/engines/titanic/true_talk/tt_quotes.cpp @@ -63,7 +63,7 @@ void TTquotes::load(const CString &name) { // Read in buffer and then decode it r->read((byte *)_dataP, _dataSize); for (size_t idx = 0; idx < _dataSize; idx += 4) - WRITE_LE_UINT32((byte *)_dataP + idx, READ_LE_UINT32((byte *)_dataP + idx) ^ 0xA55A5AA5); + WRITE_LE_UINT32((byte *)_dataP + idx, READ_LE_UINT32((const byte *)_dataP + idx) ^ 0xA55A5AA5); delete r; } |