aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2006-11-07 20:55:05 +0000
committerMax Horn2006-11-07 20:55:05 +0000
commit0cf2d2ffd9b4cc7bc98e4b4ade87e43f63a73274 (patch)
tree5d4b61378cb180d9e8b4e8a301b03884fe0dcd11 /engines
parentb1434f2632f0218147d7cb6dc9408cb8abbfc542 (diff)
downloadscummvm-rg350-0cf2d2ffd9b4cc7bc98e4b4ade87e43f63a73274.tar.gz
scummvm-rg350-0cf2d2ffd9b4cc7bc98e4b4ade87e43f63a73274.tar.bz2
scummvm-rg350-0cf2d2ffd9b4cc7bc98e4b4ade87e43f63a73274.zip
cleanup
svn-id: r24650
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/boxes.cpp12
-rw-r--r--engines/scumm/script_v5.cpp7
-rw-r--r--engines/scumm/scumm.cpp3
-rw-r--r--engines/scumm/verbs.cpp20
4 files changed, 19 insertions, 23 deletions
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index 051cba5a13..faba99d509 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -1043,11 +1043,11 @@ bool ScummEngine::areBoxesNeighbours(int box1nr, int box2nr) {
box2 = getBoxCoordinates(box1nr);
box = getBoxCoordinates(box2nr);
- // Roughly, the idea of this algorithm is to check if we can find
- // two sides of the two given boxes which touch.
+ // Roughly, the idea of this algorithm is to search for sies of the given
+ // boxes that touch each other.
// In order to keep te code simple, we only match the upper sides;
// then, we "rotate" the box coordinates four times each, for a total
- // of 16 comparisions (four sides compared with four sides each).
+ // of 16 comparisions.
for (int j = 0; j < 4; j++) {
for (int k = 0; k < 4; k++) {
// Are the "upper" sides of the boxes on a single vertical line
@@ -1165,9 +1165,9 @@ void Actor::findPathTowardsOld(byte box1, byte box2, byte finalBox, Common::Poin
* Compute the "gate" between two boxes. The gate is a pair of two lines which
* both start on box 'box1' and end on 'box2'. For both lines, one of its
* end points is the corner point of one of the two boxes. The other end point
- * is a point on the other point closest to first end point.
- * This way the lines bound a 'corridor' between the two boxes, through which
- * the actor has to walk to get from box1 to box2.
+ * is the point on the other box closest to the first end point.
+ * This way the lines form the boundary of a 'corridor' between the two boxes,
+ * through which the actor has to walk to get from box1 to box2.
*/
void getGates(const BoxCoords &box1, const BoxCoords &box2, Common::Point gateA[2], Common::Point gateB[2]) {
int i, j;
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 99e45137de..5db60d1180 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -2161,7 +2161,6 @@ void ScummEngine_v5::o5_startSound() {
// WORKAROUND: In the scene where Largo is talking to Mad Marty, the
// Woodtick music often resumes before Largo's theme has finished. As
// far as I can tell, this is a script bug.
-
if (_game.id == GID_MONKEY2 && sound == 110 && _sound->isSoundRunning(151)) {
debug(1, "Delaying Woodtick music until Largo's theme has finished\n");
_scriptPointer = oldaddr;
@@ -2230,8 +2229,8 @@ void ScummEngine_v5::o5_startScript() {
getWordVararg(data);
- // FIXME: Script 171 loads a complete room resource, instead of the actual script.
- // Causing invalid opcode cases, see bug #1290485
+ // WORKAROUND bug #1290485: Script 171 loads a complete room resource,
+ // instead of the actual script, causing invalid opcode cases
if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && script == 171)
return;
@@ -2379,7 +2378,7 @@ void ScummEngine_v5::o5_verbOps() {
case 5: // SO_VERB_AT
vs->curRect.left = getVarOrDirectWord(PARAM_1);
vs->curRect.top = getVarOrDirectWord(PARAM_2);
- // Macintosh verison of indy3ega used different interface, so adjust values.
+ // Macintosh version of indy3ega used different interface, so adjust values.
if ((_game.platform == Common::kPlatformMacintosh) && (_game.id == GID_INDY3)) {
switch (verb) {
case 1:
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 9dc8bce477..7b4331bca6 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2215,9 +2215,8 @@ GUI::Debugger *ScummEngine::getDebugger() {
void ScummEngine::errorString(const char *buf1, char *buf2) {
if (_currentScript != 0xFF) {
- ScriptSlot *ss = &vm.slot[_currentScript];
sprintf(buf2, "(%d:%d:0x%lX): %s", _roomResource,
- ss->number, (long)(_scriptPointer - _scriptOrgPointer), buf1);
+ vm.slot[_currentScript].number, (long)(_scriptPointer - _scriptOrgPointer), buf1);
} else {
strcpy(buf2, buf1);
}
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 8272795e6b..0efb37ea19 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -619,17 +619,15 @@ void ScummEngine::verbMouseOver(int verb) {
if (_game.id == GID_FT)
return;
- if (_verbMouseOver == verb)
- return;
-
- if (_verbs[_verbMouseOver].type != kImageVerbType) {
- drawVerb(_verbMouseOver, 0);
- _verbMouseOver = verb;
- }
-
- if (_verbs[verb].type != kImageVerbType && _verbs[verb].hicolor) {
- drawVerb(verb, 1);
- _verbMouseOver = verb;
+ if (_verbMouseOver != verb) {
+ if (_verbs[_verbMouseOver].type != kImageVerbType) {
+ drawVerb(_verbMouseOver, 0);
+ }
+
+ if (_verbs[verb].type != kImageVerbType && _verbs[verb].hicolor) {
+ drawVerb(verb, 1);
+ _verbMouseOver = verb;
+ }
}
}