[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.231,1.232 script_v5.cpp,1.296,1.297 scumm.h,1.644,1.645
kirben
kirben at users.sourceforge.net
Sun Oct 2 16:23:38 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5538/scumm
Modified Files:
script.cpp script_v5.cpp scumm.h
Log Message:
Inventory works in Macintosh version of indy3 now.
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -d -r1.231 -r1.232
--- script.cpp 1 Oct 2005 13:02:35 -0000 1.231
+++ script.cpp 2 Oct 2005 01:26:52 -0000 1.232
@@ -728,17 +728,20 @@
args[0] = i;
if (VAR(VAR_INVENTORY_SCRIPT)) {
if (_gameId == GID_INDY3 && _platform == Common::kPlatformMacintosh) {
- inventoryScript(args);
+ inventoryScript();
} else {
runScript(VAR(VAR_INVENTORY_SCRIPT), 0, 0, args);
}
}
}
-void ScummEngine::inventoryScript(int *args) {
+void ScummEngine::inventoryScript() {
VerbSlot *vs;
+ int args[24];
int j, slot;
+ memset(args, 0, sizeof(args));
+
if (VAR(67) < 0) {
VAR(67) = 0;
}
@@ -813,7 +816,6 @@
vs = &_verbs[slot];
vs->curmode = 0;
drawVerb(slot, 0);
- verbMouseOver(0);
slot = getVerbSlot(108, 0);
vs = &_verbs[slot];
vs->curmode = 0;
@@ -1120,6 +1122,25 @@
args[3] = VAR(VAR_VIRT_MOUSE_X);
args[4] = VAR(VAR_VIRT_MOUSE_Y);
}
+
+ // Macintosh verison of indy3ega used different interface, so adjust values.
+ if (_gameId == GID_INDY3 && _platform == Common::kPlatformMacintosh) {
+ if (a == 1 && (cmd >= 101 && cmd <= 108)) {
+ if (cmd == 107) {
+ VAR(67) -= 2;
+ inventoryScript();
+ return;
+ } else if (cmd == 108) {
+ VAR(67) += 2;
+ inventoryScript();
+ return;
+ } else {
+ args[0] = 3;
+ args[1] = VAR(83 + (cmd - 101));
+ }
+ }
+ }
+
if (verbScript)
runScript(verbScript, 0, 0, args);
}
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.296
retrieving revision 1.297
diff -u -d -r1.296 -r1.297
--- script_v5.cpp 1 Oct 2005 13:02:35 -0000 1.296
+++ script_v5.cpp 2 Oct 2005 01:26:53 -0000 1.297
@@ -2396,30 +2396,36 @@
vs->curRect.top = getVarOrDirectWord(PARAM_2);
// Macintosh verison of indy3ega used different interface, so adjust values.
if ((_platform == Common::kPlatformMacintosh) && (_gameId == GID_INDY3)) {
- if ((verb > 0) && (verb < 14) || (verb > 31) && (verb < 35)) {
- switch (verb) {
- case 1:
- case 2:
- case 9:
- vs->curRect.left += 16;
- break;
- case 10:
- case 11:
- case 12:
- vs->curRect.left += 36;
- break;
- case 4:
- case 5:
- case 8:
- vs->curRect.left += 60;
- break;
- case 13:
- case 32:
- case 33:
- case 34:
- vs->curRect.left += 90;
- break;
- }
+ switch (verb) {
+ case 1:
+ case 2:
+ case 9:
+ vs->curRect.left += 16;
+ break;
+ case 10:
+ case 11:
+ case 12:
+ vs->curRect.left += 36;
+ break;
+ case 4:
+ case 5:
+ case 8:
+ vs->curRect.left += 60;
+ break;
+ case 13:
+ case 32:
+ case 33:
+ case 34:
+ vs->curRect.left += 90;
+ break;
+ case 107:
+ vs->curRect.left -= 54;
+ vs->curRect.top += 16;
+ break;
+ case 108:
+ vs->curRect.left -= 54;
+ vs->curRect.top += 8;
+ break;
}
} else if (_gameId == GID_LOOM256) {
// FIXME: hack loom notes into right spot
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.644
retrieving revision 1.645
diff -u -d -r1.644 -r1.645
--- scumm.h 1 Oct 2005 21:13:38 -0000 1.644
+++ scumm.h 2 Oct 2005 01:26:53 -0000 1.645
@@ -635,7 +635,7 @@
void executeScript();
void updateScriptPtr();
virtual void runInventoryScript(int i);
- void inventoryScript(int *args);
+ void inventoryScript();
void checkAndRunSentenceScript();
void runExitScript();
void runEntryScript();
More information about the Scummvm-git-logs
mailing list