cleanup
svn-id: r24650
This commit is contained in:
parent
b1434f2632
commit
0cf2d2ffd9
4 changed files with 19 additions and 23 deletions
|
@ -1043,11 +1043,11 @@ bool ScummEngine::areBoxesNeighbours(int box1nr, int box2nr) {
|
||||||
box2 = getBoxCoordinates(box1nr);
|
box2 = getBoxCoordinates(box1nr);
|
||||||
box = getBoxCoordinates(box2nr);
|
box = getBoxCoordinates(box2nr);
|
||||||
|
|
||||||
// Roughly, the idea of this algorithm is to check if we can find
|
// Roughly, the idea of this algorithm is to search for sies of the given
|
||||||
// two sides of the two given boxes which touch.
|
// boxes that touch each other.
|
||||||
// In order to keep te code simple, we only match the upper sides;
|
// 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
|
// 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 j = 0; j < 4; j++) {
|
||||||
for (int k = 0; k < 4; k++) {
|
for (int k = 0; k < 4; k++) {
|
||||||
// Are the "upper" sides of the boxes on a single vertical line
|
// 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
|
* 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
|
* 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
|
* 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.
|
* is the point on the other box closest to the first end point.
|
||||||
* This way the lines bound a 'corridor' between the two boxes, through which
|
* This way the lines form the boundary of a 'corridor' between the two boxes,
|
||||||
* the actor has to walk to get from box1 to box2.
|
* 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]) {
|
void getGates(const BoxCoords &box1, const BoxCoords &box2, Common::Point gateA[2], Common::Point gateB[2]) {
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
|
@ -2161,7 +2161,6 @@ void ScummEngine_v5::o5_startSound() {
|
||||||
// WORKAROUND: In the scene where Largo is talking to Mad Marty, the
|
// WORKAROUND: In the scene where Largo is talking to Mad Marty, the
|
||||||
// Woodtick music often resumes before Largo's theme has finished. As
|
// Woodtick music often resumes before Largo's theme has finished. As
|
||||||
// far as I can tell, this is a script bug.
|
// far as I can tell, this is a script bug.
|
||||||
|
|
||||||
if (_game.id == GID_MONKEY2 && sound == 110 && _sound->isSoundRunning(151)) {
|
if (_game.id == GID_MONKEY2 && sound == 110 && _sound->isSoundRunning(151)) {
|
||||||
debug(1, "Delaying Woodtick music until Largo's theme has finished\n");
|
debug(1, "Delaying Woodtick music until Largo's theme has finished\n");
|
||||||
_scriptPointer = oldaddr;
|
_scriptPointer = oldaddr;
|
||||||
|
@ -2230,8 +2229,8 @@ void ScummEngine_v5::o5_startScript() {
|
||||||
|
|
||||||
getWordVararg(data);
|
getWordVararg(data);
|
||||||
|
|
||||||
// FIXME: Script 171 loads a complete room resource, instead of the actual script.
|
// WORKAROUND bug #1290485: Script 171 loads a complete room resource,
|
||||||
// Causing invalid opcode cases, see bug #1290485
|
// instead of the actual script, causing invalid opcode cases
|
||||||
if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && script == 171)
|
if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && script == 171)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2379,7 +2378,7 @@ void ScummEngine_v5::o5_verbOps() {
|
||||||
case 5: // SO_VERB_AT
|
case 5: // SO_VERB_AT
|
||||||
vs->curRect.left = getVarOrDirectWord(PARAM_1);
|
vs->curRect.left = getVarOrDirectWord(PARAM_1);
|
||||||
vs->curRect.top = getVarOrDirectWord(PARAM_2);
|
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)) {
|
if ((_game.platform == Common::kPlatformMacintosh) && (_game.id == GID_INDY3)) {
|
||||||
switch (verb) {
|
switch (verb) {
|
||||||
case 1:
|
case 1:
|
||||||
|
|
|
@ -2215,9 +2215,8 @@ GUI::Debugger *ScummEngine::getDebugger() {
|
||||||
|
|
||||||
void ScummEngine::errorString(const char *buf1, char *buf2) {
|
void ScummEngine::errorString(const char *buf1, char *buf2) {
|
||||||
if (_currentScript != 0xFF) {
|
if (_currentScript != 0xFF) {
|
||||||
ScriptSlot *ss = &vm.slot[_currentScript];
|
|
||||||
sprintf(buf2, "(%d:%d:0x%lX): %s", _roomResource,
|
sprintf(buf2, "(%d:%d:0x%lX): %s", _roomResource,
|
||||||
ss->number, (long)(_scriptPointer - _scriptOrgPointer), buf1);
|
vm.slot[_currentScript].number, (long)(_scriptPointer - _scriptOrgPointer), buf1);
|
||||||
} else {
|
} else {
|
||||||
strcpy(buf2, buf1);
|
strcpy(buf2, buf1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -619,17 +619,15 @@ void ScummEngine::verbMouseOver(int verb) {
|
||||||
if (_game.id == GID_FT)
|
if (_game.id == GID_FT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_verbMouseOver == verb)
|
if (_verbMouseOver != verb) {
|
||||||
return;
|
if (_verbs[_verbMouseOver].type != kImageVerbType) {
|
||||||
|
drawVerb(_verbMouseOver, 0);
|
||||||
if (_verbs[_verbMouseOver].type != kImageVerbType) {
|
}
|
||||||
drawVerb(_verbMouseOver, 0);
|
|
||||||
_verbMouseOver = verb;
|
if (_verbs[verb].type != kImageVerbType && _verbs[verb].hicolor) {
|
||||||
}
|
drawVerb(verb, 1);
|
||||||
|
_verbMouseOver = verb;
|
||||||
if (_verbs[verb].type != kImageVerbType && _verbs[verb].hicolor) {
|
}
|
||||||
drawVerb(verb, 1);
|
|
||||||
_verbMouseOver = verb;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue