diff options
author | Paul Gilbert | 2016-08-20 07:36:40 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-20 07:36:40 -0400 |
commit | 847b9c847251f8ef0d7b7970e29efea928fc53b2 (patch) | |
tree | cdf689e3426bf504cf6568dd97b2c1e5c2d01529 | |
parent | fdd4e8369a1dfd8726b533f74b80bb414db0e612 (diff) | |
download | scummvm-rg350-847b9c847251f8ef0d7b7970e29efea928fc53b2.tar.gz scummvm-rg350-847b9c847251f8ef0d7b7970e29efea928fc53b2.tar.bz2 scummvm-rg350-847b9c847251f8ef0d7b7970e29efea928fc53b2.zip |
TITANIC: Fix compiler warnings
-rw-r--r-- | engines/titanic/game/chev_code.cpp | 9 | ||||
-rw-r--r-- | engines/titanic/game/chev_panel.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/true_talk/true_talk_manager.cpp | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/engines/titanic/game/chev_code.cpp b/engines/titanic/game/chev_code.cpp index 07225f0cf8..0acdf575f4 100644 --- a/engines/titanic/game/chev_code.cpp +++ b/engines/titanic/game/chev_code.cpp @@ -70,7 +70,7 @@ bool CChevCode::SetChevFloorBits(CSetChevFloorBits *msg) { int index = (msg->_floorNum + 4) % 10; _chevCode &= ~0xFF00; - int val; + int val = 0; switch (section) { case 0: val = 144; @@ -101,7 +101,7 @@ bool CChevCode::SetChevRoomBits(CSetChevRoomBits *msg) { } bool CChevCode::GetChevLiftNum(CGetChevLiftNum *msg) { - msg->_liftNum = (_chevCode >> 18) & 3 + 1; + msg->_liftNum = ((_chevCode >> 18) & 3) + 1; return true; } @@ -112,7 +112,7 @@ bool CChevCode::GetChevClassNum(CGetChevClassNum *msg) { bool CChevCode::GetChevFloorNum(CGetChevFloorNum *msg) { int val1 = (_chevCode >> 8) & 0xF; - int val2 = (_chevCode >> 12) & 0xF - 9; + int val2 = ((_chevCode >> 12) & 0xF) - 9; switch (val2) { case 0: @@ -148,7 +148,7 @@ bool CChevCode::CheckChevCode(CCheckChevCode *msg) { CGetChevRoomNum getRoomMsg; CString roomName; int classNum = 0; - uint bits; + uint bits = 0; if (_chevCode & 1) { switch (_chevCode) { @@ -252,7 +252,6 @@ bool CChevCode::CheckChevCode(CCheckChevCode *msg) { break; } } - // TODO } msg->_classNum = classNum; diff --git a/engines/titanic/game/chev_panel.cpp b/engines/titanic/game/chev_panel.cpp index c644776bc9..ed730c9d61 100644 --- a/engines/titanic/game/chev_panel.cpp +++ b/engines/titanic/game/chev_panel.cpp @@ -88,7 +88,7 @@ bool CChevPanel::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { } bool CChevPanel::SetChevPanelBitMsg(CSetChevPanelBitMsg *msg) { - _chevCode = _chevCode & ~(1 << msg->_value1) | (msg->_value2 << msg->_value1); + _chevCode = (_chevCode & ~(1 << msg->_value1)) | (msg->_value2 << msg->_value1); return true; } diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp index 977edd5399..19beee9796 100644 --- a/engines/titanic/true_talk/true_talk_manager.cpp +++ b/engines/titanic/true_talk/true_talk_manager.cpp @@ -114,7 +114,7 @@ void CTrueTalkManager::loadStatics(SimpleFile *file) { _v9 = file->readNumber(); _v10 = file->readNumber() != 0; - for (int idx = count; count > 10; --idx) + for (int idx = count; idx > 10; --idx) file->readNumber(); int count2 = file->readNumber(); |