[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.230,1.231 script_v5.cpp,1.295,1.296 scumm.h,1.642,1.643
kirben
kirben at users.sourceforge.net
Sun Oct 2 15:36:39 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: web compatibility.php,1.442,1.443
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga animation.cpp,1.63,1.64 animation.h,1.35,1.36 ihnm_introproc.cpp,1.54,1.55 ite_introproc.cpp,1.68,1.69
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18269/scumm
Modified Files:
script.cpp script_v5.cpp scumm.h
Log Message:
Add inventory display for Mac. version of indy3.
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -d -r1.230 -r1.231
--- script.cpp 14 Sep 2005 10:36:18 -0000 1.230
+++ script.cpp 1 Oct 2005 13:02:35 -0000 1.231
@@ -30,6 +30,7 @@
#include "scumm/resource.h"
#include "scumm/util.h"
#include "scumm/scumm.h"
+#include "scumm/verbs.h"
namespace Scumm {
@@ -726,8 +727,100 @@
memset(args, 0, sizeof(args));
args[0] = i;
if (VAR(VAR_INVENTORY_SCRIPT)) {
- runScript(VAR(VAR_INVENTORY_SCRIPT), 0, 0, args);
+ if (_gameId == GID_INDY3 && _platform == Common::kPlatformMacintosh) {
+ inventoryScript(args);
+ } else {
+ runScript(VAR(VAR_INVENTORY_SCRIPT), 0, 0, args);
+ }
+ }
+}
+
+void ScummEngine::inventoryScript(int *args) {
+ VerbSlot *vs;
+ int j, slot;
+
+ if (VAR(67) < 0) {
+ VAR(67) = 0;
+ }
+ args[5] = getInventoryCount(VAR(VAR_EGO));
+ if (args[5] <= 6) {
+ VAR(67) = 0;
+ }
+ if (args[5] >= 6) {
+ args[5] -= 6;
+ }
+ args[6] = 0;
+ if (VAR(67) >= args[5]) {
+ VAR(67) = args[5];
+ args[4] = args[5];
+ args[5] /= 2;
+ args[5] *= 2;
+ args[4] -= args[5];
+ if (args[4]) {
+ VAR(67)++;
+ }
+ args[6]++;
+ }
+ args[2] = 1;
+ for (j = 1; j < 7; j++) {
+ args[1] = (VAR(67) + args[2]);
+ args[3] = findInventory(VAR(VAR_EGO),args[1]);
+ VAR(82 + args[2]) = args[3];
+ args[2]++;
}
+
+ byte tmp[6];
+
+ tmp[0] = 0xFF;
+ tmp[1] = 0x06;
+ tmp[3] = 0x00;
+ tmp[4] = 0x00;
+
+ for (j = 0; j < 6; j++) {
+ tmp[2] = 0x53 + j;
+
+ slot = getVerbSlot(101 + j, 0);
+ vs = &_verbs[slot];
+ loadPtrToResource(rtVerb, slot, tmp);
+ vs->type = kTextVerbType;
+ vs->imgindex = 0;
+ vs->curmode = 1;
+ drawVerb(slot, 0);
+ }
+
+ args[5] = getInventoryCount(VAR(VAR_EGO));
+ if (args[5] > 6) {
+ slot = getVerbSlot(107, 0);
+ if (VAR(67)) {
+ vs = &_verbs[slot];
+ vs->curmode = 1;
+ } else {
+ vs = &_verbs[slot];
+ vs->curmode = 0;
+ }
+ drawVerb(slot, 0);
+ slot = getVerbSlot(108, 0);
+ if (!args[6]) {
+ vs = &_verbs[slot];
+ vs->curmode = 1;
+ } else {
+ vs = &_verbs[slot];
+ vs->curmode = 0;
+ }
+ drawVerb(slot, 0);
+ } else {
+ slot = getVerbSlot(107, 0);
+ vs = &_verbs[slot];
+ vs->curmode = 0;
+ drawVerb(slot, 0);
+ verbMouseOver(0);
+ slot = getVerbSlot(108, 0);
+ vs = &_verbs[slot];
+ vs->curmode = 0;
+ drawVerb(slot, 0);
+ }
+
+ verbMouseOver(0);
}
void ScummEngine::freezeScripts(int flag) {
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.295
retrieving revision 1.296
diff -u -d -r1.295 -r1.296
--- script_v5.cpp 30 Sep 2005 13:46:46 -0000 1.295
+++ script_v5.cpp 1 Oct 2005 13:02:35 -0000 1.296
@@ -2131,6 +2131,24 @@
setResult(b);
_resultVarNumber++;
} while (--a);
+
+ // Macintosh verison of indy3ega used different interface, so adjust values.
+ if (_gameId == GID_INDY3 && _platform == Common::kPlatformMacintosh) {
+ VAR(68) = 0;
+ VAR(69) = 0;
+ VAR(70) = 168;
+ VAR(71) = 0;
+ VAR(72) = 168;
+ VAR(73) = 0;
+ VAR(74) = 168;
+ VAR(75) = 0;
+ VAR(76) = 176;
+ VAR(77) = 176;
+ VAR(78) = 184;
+ VAR(79) = 184;
+ VAR(80) = 192;
+ VAR(81) = 192;
+ }
}
void ScummEngine_v5::o5_startMusic() {
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.642
retrieving revision 1.643
diff -u -d -r1.642 -r1.643
--- scumm.h 24 Sep 2005 10:15:17 -0000 1.642
+++ scumm.h 1 Oct 2005 13:02:35 -0000 1.643
@@ -623,6 +623,7 @@
void executeScript();
void updateScriptPtr();
virtual void runInventoryScript(int i);
+ void inventoryScript(int *args);
void checkAndRunSentenceScript();
void runExitScript();
void runEntryScript();
- Previous message: [Scummvm-cvs-logs] CVS: web compatibility.php,1.442,1.443
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga animation.cpp,1.63,1.64 animation.h,1.35,1.36 ihnm_introproc.cpp,1.54,1.55 ite_introproc.cpp,1.68,1.69
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list