[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.171,2.172 script_v6.cpp,1.345,1.346 script_v7he.cpp,2.26,2.27 scumm.cpp,1.68,1.69
Eugene Sandulenko
sev at users.sourceforge.net
Mon Jun 28 04:39:15 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19866/scumm
Modified Files:
intern.h script_v6.cpp script_v7he.cpp scumm.cpp
Log Message:
Move Win32ResExtractor to ScummEngine_v7he. Now it doesn't look alien.
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.171
retrieving revision 2.172
diff -u -d -r2.171 -r2.172
--- intern.h 27 Jun 2004 21:06:02 -0000 2.171
+++ intern.h 28 Jun 2004 11:38:26 -0000 2.172
@@ -326,10 +326,6 @@
const OpcodeEntryV6 *_opcodesV6;
- // HE v7.0+ games
- Win32ResExtractor *_Win32ResExtractor;
-
-
int _smushFrameRate;
public:
@@ -606,10 +602,12 @@
const char *desc;
};
+ Win32ResExtractor *_Win32ResExtractor;
+
const OpcodeEntryV7he *_opcodesV7he;
public:
- ScummEngine_v7he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs) : ScummEngine_v6he(detector, syst, gs) {}
+ ScummEngine_v7he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs);
protected:
virtual void setupScummVars();
@@ -633,6 +631,8 @@
void o7_getActorRoom();
void o7_pickupObject();
void o7_startSound();
+ void o7_actorOps();
+ void o7_cursorCommand();
};
class ScummEngine_v7 : public ScummEngine_v6 {
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.345
retrieving revision 1.346
diff -u -d -r1.345 -r1.346
--- script_v6.cpp 27 Jun 2004 21:52:23 -0000 1.345
+++ script_v6.cpp 28 Jun 2004 11:38:26 -0000 1.346
@@ -33,7 +33,6 @@
#include "scumm/intern.h"
#include "scumm/object.h"
#include "scumm/resource.h"
-#include "scumm/resource_v7he.h"
#include "scumm/scumm.h"
#include "scumm/sound.h"
#include "scumm/verbs.h"
@@ -934,10 +933,6 @@
break;
case 0x99: // SO_CURSOR_IMAGE Set cursor image
{
- if (_heversion >= 70) { // Windows titles
- _Win32ResExtractor->setCursor(pop());
- break;
- }
int room, obj = popRoomAndObj(&room);
setCursorImg(obj, room, 1);
break;
Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.26
retrieving revision 2.27
diff -u -d -r2.26 -r2.27
--- script_v7he.cpp 27 Jun 2004 15:41:01 -0000 2.26
+++ script_v7he.cpp 28 Jun 2004 11:38:26 -0000 2.27
@@ -30,6 +30,7 @@
#include "scumm/intern.h"
#include "scumm/object.h"
#include "scumm/resource.h"
+#include "scumm/resource_v7he.h"
#include "scumm/scumm.h"
#include "scumm/sound.h"
#include "scumm/verbs.h"
@@ -184,7 +185,7 @@
OPCODE(o6_cutscene),
OPCODE(o6_stopMusic),
OPCODE(o6_freezeUnfreeze),
- OPCODE(o6_cursorCommand),
+ OPCODE(o7_cursorCommand),
/* 6C */
OPCODE(o6_breakHere),
OPCODE(o6_ifClassOfIs),
@@ -699,4 +700,67 @@
}
+void ScummEngine_v7he::o7_cursorCommand() {
+ int a, i;
+ int args[16];
+ int subOp = fetchScriptByte();
+
+ switch (subOp) {
+ case 0x90: // SO_CURSOR_ON Turn cursor on
+ _cursor.state = 1;
+ verbMouseOver(0);
+ break;
+ case 0x91: // SO_CURSOR_OFF Turn cursor off
+ _cursor.state = 0;
+ verbMouseOver(0);
+ break;
+ case 0x92: // SO_USERPUT_ON
+ _userPut = 1;
+ break;
+ case 0x93: // SO_USERPUT_OFF
+ _userPut = 0;
+ break;
+ case 0x94: // SO_CURSOR_SOFT_ON Turn soft cursor on
+ _cursor.state++;
+ if (_cursor.state > 1)
+ error("Cursor state greater than 1 in script");
+ verbMouseOver(0);
+ break;
+ case 0x95: // SO_CURSOR_SOFT_OFF Turn soft cursor off
+ _cursor.state--;
+ verbMouseOver(0);
+ break;
+ case 0x96: // SO_USERPUT_SOFT_ON
+ _userPut++;
+ break;
+ case 0x97: // SO_USERPUT_SOFT_OFF
+ _userPut--;
+ break;
+ case 0x99: // SO_CURSOR_IMAGE Set cursor image
+ _Win32ResExtractor->setCursor(pop()); /* Difference */
+ break;
+ case 0x9A: // SO_CURSOR_HOTSPOT Set cursor hotspot
+ a = pop();
+ setCursorHotspot(pop(), a);
+ break;
+ case 0x9C: // SO_CHARSET_SET
+ initCharset(pop());
+ break;
+ case 0x9D: // SO_CHARSET_COLOR
+ getStackList(args, ARRAYSIZE(args));
+ for (i = 0; i < 16; i++)
+ _charsetColorMap[i] = _charsetData[_string[1]._default.charset][i] = (unsigned char)args[i];
+ break;
+ case 0xD6: // SO_CURSOR_TRANSPARENT Set cursor transparent color
+ makeCursorColorTransparent(pop());
+ break;
+ default:
+ error("o6_cursorCommand: default case %x", subOp);
+ }
+
+ VAR(VAR_CURSORSTATE) = _cursor.state;
+ VAR(VAR_USERPUT) = _userPut;
+}
+
+
} // End of namespace Scumm
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- scumm.cpp 28 Jun 2004 00:06:16 -0000 1.68
+++ scumm.cpp 28 Jun 2004 11:38:26 -0000 1.69
@@ -954,16 +954,14 @@
VAR_TIMEDATE_MINUTE = 0xFF;
VAR_TIMEDATE_SECOND = 0xFF;
- // HE v7.0+
- if (_heversion >= 70) {
- _Win32ResExtractor = new Win32ResExtractor(this);
- } else {
- _Win32ResExtractor = 0;
- }
-
_smushFrameRate = 0;
}
+ScummEngine_v7he::ScummEngine_v7he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs)
+ : ScummEngine_v6he(detector, syst, gs) {
+ _Win32ResExtractor = new Win32ResExtractor(this);
+}
+
void ScummEngine::go() {
launch();
mainRun();
More information about the Scummvm-git-logs
mailing list