diff options
author | Strangerke | 2013-12-22 12:56:42 +0100 |
---|---|---|
committer | Strangerke | 2013-12-22 13:11:12 +0100 |
commit | 7798c68512aa768069b4de050aef0fe7e1a05fc6 (patch) | |
tree | c5b417afc73743221a01c75a09a977f6d650095d /engines/tsage/ringworld2 | |
parent | abd0770cdb84fb536635b32e216e8ea4f746e69c (diff) | |
download | scummvm-rg350-7798c68512aa768069b4de050aef0fe7e1a05fc6.tar.gz scummvm-rg350-7798c68512aa768069b4de050aef0fe7e1a05fc6.tar.bz2 scummvm-rg350-7798c68512aa768069b4de050aef0fe7e1a05fc6.zip |
TSAGE: R2R - Scene 1337 - optimize game logic based on board behavior
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 65 |
1 files changed, 29 insertions, 36 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index f471293e2d..1869eeaae3 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -5569,9 +5569,9 @@ void Scene1337::handleClick(int arg1, Common::Point pt) { actionDisplay(1330, 34, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; } - found = true; - break; - } else if (_gameBoardSide[0]._outpostStation[i].isIn(pt)) { + return; + } + if (_gameBoardSide[0]._outpostStation[i].isIn(pt)) { switch (_gameBoardSide[0]._outpostStation[i]._cardId) { case 0: actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); @@ -5580,9 +5580,9 @@ void Scene1337::handleClick(int arg1, Common::Point pt) { actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154); break; } - found = true; - break; - } else if (_gameBoardSide[1]._outpostStation[i].isIn(pt)) { + return; + } + if (_gameBoardSide[1]._outpostStation[i].isIn(pt)) { switch (_gameBoardSide[1]._outpostStation[i]._cardId) { case 0: actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117); @@ -5591,9 +5591,9 @@ void Scene1337::handleClick(int arg1, Common::Point pt) { actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117); break; } - found = true; - break; - } else if (_gameBoardSide[3]._outpostStation[i].isIn(pt)) { + return; + } + if (_gameBoardSide[3]._outpostStation[i].isIn(pt)) { switch (_gameBoardSide[3]._outpostStation[i]._cardId) { case 0: actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172); @@ -5602,61 +5602,54 @@ void Scene1337::handleClick(int arg1, Common::Point pt) { actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172); break; } - found = true; - break; + return; } } if (_gameBoardSide[2]._delayCard.isIn(pt)) { // The original uses _gameBoardSide[0], which is obviously a bug. - if (_gameBoardSide[2]._delayCard._cardId != 0) { + if (_gameBoardSide[2]._delayCard._cardId != 0) actionDisplay(1330, 39, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else { + else actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } - found = true; - } + return; + } if (_gameBoardSide[3]._delayCard.isIn(pt)) { - if (_gameBoardSide[3]._delayCard._cardId != 0) { + if (_gameBoardSide[3]._delayCard._cardId != 0) actionDisplay(1330, 145, 20, 99, 1, 136, 0, 7, 0, 172, 172); - } else { + else actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172); - } - found = true; - } + return; + } if (_gameBoardSide[1]._delayCard.isIn(pt)) { - if (_gameBoardSide[1]._delayCard._cardId != 0) { + if (_gameBoardSide[1]._delayCard._cardId != 0) actionDisplay(1330, 144, 300, 99, 1, 136, 0, 7, 0, 117, 117); - } else { + else actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117); - } - found = true; - } + return; + } if (_gameBoardSide[0]._delayCard.isIn(pt)) { - if (_gameBoardSide[0]._delayCard._cardId != 0) { + if (_gameBoardSide[0]._delayCard._cardId != 0) actionDisplay(1330, 1, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } else { + else actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); - } - found = true; - } + return; + } if (_gameBoardSide[3]._emptyStationPos.isIn(pt)) { actionDisplay(1330, 147, 20, 99, 1, 136, 0, 7, 0, 172, 172); - found = true; + return; } - if (_gameBoardSide[1]._emptyStationPos.isIn(pt)) { actionDisplay(1330, 146, 300, 99, 1, 136, 0, 7, 0, 117, 117); - found = true; + return; } - if (_gameBoardSide[0]._emptyStationPos.isIn(pt)) { actionDisplay(1330, 11, 159, 10, 1, 200, 0, 7, 0, 154, 154); - found = true; + return; } if (found) |