[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.45,2.46 script_v6.cpp,1.83,1.84
Pawel Kolodziejski
aquadran at users.sourceforge.net
Tue Mar 18 12:33:07 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv7839
Modified Files:
intern.h script_v6.cpp
Log Message:
added script opcode for dig minigame
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.45
retrieving revision 2.46
diff -u -d -r2.45 -r2.46
--- intern.h 7 Mar 2003 21:38:44 -0000 2.45
+++ intern.h 18 Mar 2003 20:32:00 -0000 2.46
@@ -377,6 +377,7 @@
void o6_pickVarRandom();
void o6_getDateTime();
void o6_unknownE0();
+ void o6_unknownE1();
void o6_unknownE4();
void o6_localizeArray();
void o6_shuffle();
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- script_v6.cpp 18 Mar 2003 19:26:00 -0000 1.83
+++ script_v6.cpp 18 Mar 2003 20:32:01 -0000 1.84
@@ -323,7 +323,7 @@
OPCODE(o6_invalid),
/* E0 */
OPCODE(o6_unknownE0),
- OPCODE(o6_invalid),
+ OPCODE(o6_unknownE1),
OPCODE(o6_localizeArray),
OPCODE(o6_pickVarRandom),
/* E4 */
@@ -2920,6 +2920,39 @@
if (_features & GF_AFTER_V8)
_vars[VAR_TIMEDATE_SECOND] = t->tm_sec;
+}
+
+void Scumm_v6::o6_unknownE1() {
+ // this opcode check ground area in minigame in the dig
+ int x = pop();
+ int y = pop();
+
+ if (x > _realWidth - 1) {
+ push(-1);
+ return;
+ }
+ if (x < 0) {
+ push(-1);
+ return;
+ }
+
+ if (y < 0) {
+ push(-1);
+ return;
+ }
+
+ VirtScreen *vs = findVirtScreen(y);
+
+ if (vs == NULL) {
+ push(-1);
+ return;
+ }
+
+ // FIXME: something is wrong, it take wrong position or wrong buffer check
+ int offset = (y - vs->topline) * _realWidth + x + vs->tdirty[0];
+
+ byte area = *(getResourceAddress(rtBuffer, vs->number + 1) + offset);
+ push(area);
}
void Scumm_v6::o6_unknownE0() {
More information about the Scummvm-git-logs
mailing list