aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/core/view_item.cpp2
-rw-r--r--engines/titanic/pet_control/pet_inventory.cpp9
-rw-r--r--engines/titanic/support/avi_surface.cpp2
-rw-r--r--engines/titanic/support/font.cpp8
-rw-r--r--engines/titanic/true_talk/deskbot_script.cpp1
5 files changed, 11 insertions, 11 deletions
diff --git a/engines/titanic/core/view_item.cpp b/engines/titanic/core/view_item.cpp
index 56069a9799..dff93514e2 100644
--- a/engines/titanic/core/view_item.cpp
+++ b/engines/titanic/core/view_item.cpp
@@ -250,7 +250,7 @@ bool CViewItem::MouseMoveMsg(CMouseMoveMsg *msg) {
bool CViewItem::handleMouseMsg(CMouseMsg *msg, bool flag) {
CMouseButtonUpMsg *upMsg = dynamic_cast<CMouseButtonUpMsg *>(msg);
- if (msg->isButtonUpMsg()) {
+ if (upMsg) {
handleButtonUpMsg(upMsg);
return true;
}
diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp
index 2fb60bf9a6..55176d8b0e 100644
--- a/engines/titanic/pet_control/pet_inventory.cpp
+++ b/engines/titanic/pet_control/pet_inventory.cpp
@@ -202,16 +202,15 @@ int CPetInventory::getItemIndex(CGameObject *item) const {
CGameObject *CPetInventory::getImage(int index) {
if (index >= 0 && index < 46) {
- int offset = index - 20;
int bits = 0;
- switch (offset) {
- case 0:
+ switch (index) {
+ case 20:
bits = 4;
break;
- case 1:
+ case 21:
bits = 8;
break;
- case 2:
+ case 22:
bits = 1;
break;
case 23:
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index 6507c8bbd4..c37bd83616 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -258,7 +258,7 @@ void AVISurface::setupDecompressor() {
g_system->getScreenFormat());
// TODO: See whether this simplified form of original works
- if (idx == 2)
+ if (idx == 1)
_videoSurface->_transBlitFlag = true;
}
}
diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp
index 07e4c28991..69c0efe504 100644
--- a/engines/titanic/support/font.cpp
+++ b/engines/titanic/support/font.cpp
@@ -260,12 +260,14 @@ void STFont::checkLineWrap(Point &textSize, int maxWidth, const char *&str) cons
if (*srcPtr == ' ' && flag)
break;
- if (*srcPtr == TEXTCMD_NPC)
+ if (*srcPtr == TEXTCMD_NPC) {
srcPtr += 3;
- else if (*srcPtr == TEXTCMD_SET_COLOR)
+ } else if (*srcPtr == TEXTCMD_SET_COLOR) {
srcPtr += 4;
- else
+ } else {
totalWidth += _chars[(byte)*srcPtr]._width;
+ flag = true;
+ }
}
if ((textSize.x + totalWidth) >= maxWidth && totalWidth < maxWidth) {
diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp
index 3f358889dc..f3a997e218 100644
--- a/engines/titanic/true_talk/deskbot_script.cpp
+++ b/engines/titanic/true_talk/deskbot_script.cpp
@@ -69,7 +69,6 @@ int DeskbotScript::process(const TTroomScript *roomScript, const TTsentence *sen
bool flag20 = getValue(20) != 0;
CTrueTalkManager::setFlags(20, 0);
checkItems(nullptr, nullptr);
- getState();
if (preprocess(roomScript, sentence) != 1)
return 1;