Should be HE60/70.

svn-id: r15211
This commit is contained in:
Travis Howell 2004-09-21 01:00:30 +00:00
parent c63169d3f3
commit 2c0f36cddc
10 changed files with 283 additions and 279 deletions

View file

@ -147,7 +147,7 @@ void ScummEngine::setCursorFromBuffer(byte *ptr, int width, int height, int pitc
updateCursor();
}
void ScummEngine_v7he::setCursorFromImg(uint img, uint room, uint imgindex) {
void ScummEngine_v70he::setCursorFromImg(uint img, uint room, uint imgindex) {
_win32ResExtractor->setCursor(img);
}

View file

@ -542,11 +542,11 @@ protected:
byte VAR_TIMEDATE_SECOND;
};
class ScummEngine_v6he : public ScummEngine_v6 {
class ScummEngine_v60he : public ScummEngine_v6 {
protected:
typedef void (ScummEngine_v6he::*OpcodeProcV6he)();
struct OpcodeEntryV6he {
OpcodeProcV6he proc;
typedef void (ScummEngine_v60he::*OpcodeProcv60he)();
struct OpcodeEntryv60he {
OpcodeProcv60he proc;
const char *desc;
};
struct vsUnpackCtx {
@ -560,12 +560,12 @@ protected:
uint8 buf[256];
};
const OpcodeEntryV6he *_opcodesV6he;
const OpcodeEntryv60he *_opcodesv60he;
File _hFileTable[17];
public:
ScummEngine_v6he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) : ScummEngine_v6(detector, syst, gs, md5sum) {}
ScummEngine_v60he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) : ScummEngine_v6(detector, syst, gs, md5sum) {}
protected:
virtual void setupOpcodes();
@ -587,41 +587,41 @@ protected:
void swapObjects(int object1, int object2);
/* HE version 60 script opcodes */
void o6he_setState();
void o6he_roomOps();
void o6he_actorOps();
void o6he_wait();
void o6he_kernelSetFunctions();
void o6he_kernelGetFunctions();
void o6he_openFile();
void o6he_closeFile();
void o6he_deleteFile();
void o6he_readFile();
void o6he_rename();
void o6he_writeFile();
void o6he_soundOps();
void o6he_seekFilePos();
void o6he_localizeArray();
void o6he_redimArray();
void o6he_readFilePos();
void o60_setState();
void o60_roomOps();
void o60_actorOps();
void o60_wait();
void o60_kernelSetFunctions();
void o60_kernelGetFunctions();
void o60_openFile();
void o60_closeFile();
void o60_deleteFile();
void o60_readFile();
void o60_rename();
void o60_writeFile();
void o60_soundOps();
void o60_seekFilePos();
void o60_localizeArray();
void o60_redimArray();
void o60_readFilePos();
};
class ScummEngine_v7he : public ScummEngine_v6he {
class ScummEngine_v70he : public ScummEngine_v60he {
friend class Win32ResExtractor;
protected:
typedef void (ScummEngine_v7he::*OpcodeProcV7he)();
struct OpcodeEntryV7he {
OpcodeProcV7he proc;
typedef void (ScummEngine_v70he::*OpcodeProcv70he)();
struct OpcodeEntryv70he {
OpcodeProcv70he proc;
const char *desc;
};
Win32ResExtractor *_win32ResExtractor;
const OpcodeEntryV7he *_opcodesV7he;
const OpcodeEntryv70he *_opcodesv70he;
public:
ScummEngine_v7he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]);
ScummEngine_v70he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]);
protected:
virtual void setupOpcodes();
@ -638,26 +638,26 @@ protected:
virtual void setCursorFromImg(uint img, uint room, uint imgindex);
/* HE version 70 script opcodes */
void o70he_startSound();
void o70he_pickupObject();
void o70he_getActorRoom();
void o70he_resourceRoutines();
void o70he_quitPauseRestart();
void o70he_kernelSetFunctions();
void o70he_unknownED();
void o70he_stringLen();
void o70he_unknownEF();
void o70he_readINI();
void o70he_writeINI();
void o70he_unknownF5();
void o70he_unknownF6();
void o70he_setFilePath();
void o70he_unknownFA();
void o70he_polygonOps();
void o70he_polygonHit();
void o70_startSound();
void o70_pickupObject();
void o70_getActorRoom();
void o70_resourceRoutines();
void o70_quitPauseRestart();
void o70_kernelSetFunctions();
void o70_unknownED();
void o70_stringLen();
void o70_unknownEF();
void o70_readINI();
void o70_writeINI();
void o70_unknownF5();
void o70_unknownF6();
void o70_setFilePath();
void o70_unknownFA();
void o70_polygonOps();
void o70_polygonHit();
};
class ScummEngine_v72he : public ScummEngine_v7he {
class ScummEngine_v72he : public ScummEngine_v70he {
protected:
typedef void (ScummEngine_v72he::*OpcodeProcV72he)();
struct OpcodeEntryV72he {
@ -694,7 +694,7 @@ protected:
uint16 _wizImagesNum;
public:
ScummEngine_v72he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) : ScummEngine_v7he(detector, syst, gs, md5sum), _wizImagesNum(0) {}
ScummEngine_v72he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16]) : ScummEngine_v70he(detector, syst, gs, md5sum), _wizImagesNum(0) {}
protected:
virtual void setupScummVars();
@ -753,7 +753,7 @@ protected:
void o72_arrayOps();
void o72_dimArray();
void o72_dim2dimArray();
void o72_unknownC1();
void o72_traceStatus();
void o72_unknownCF();
void o72_drawWizImage();
void o72_jumpToScript();

View file

@ -47,7 +47,7 @@ const char *res_types[] = {
};
#define RES_TYPE_COUNT (sizeof(res_types)/sizeof(char *))
Win32ResExtractor::Win32ResExtractor(ScummEngine_v7he *scumm) {
Win32ResExtractor::Win32ResExtractor(ScummEngine_v70he *scumm) {
_vm = scumm;
snprintf(_fileName, 256, "%s.he3", _vm->getGameName());

View file

@ -116,7 +116,7 @@ namespace Scumm {
class Win32ResExtractor {
public:
Win32ResExtractor(ScummEngine_v7he *scumm);
Win32ResExtractor(ScummEngine_v70he *scumm);
~Win32ResExtractor();
int extractResource(const char *resType, char *resName, byte **data);
void setCursor(int id);
@ -125,7 +125,7 @@ class Win32ResExtractor {
private:
bool _arg_raw;
ScummEngine_v7he *_vm;
ScummEngine_v70he *_vm;
char _fileName[256];
typedef Common::MemoryReadStream MemoryReadStream;

View file

@ -46,10 +46,10 @@ namespace Scumm {
// transparency in akos.cpp
// negative size in file read/write
#define OPCODE(x) { &ScummEngine_v6he::x, #x }
#define OPCODE(x) { &ScummEngine_v60he::x, #x }
void ScummEngine_v6he::setupOpcodes() {
static const OpcodeEntryV6he opcodes[256] = {
void ScummEngine_v60he::setupOpcodes() {
static const OpcodeEntryv60he opcodes[256] = {
/* 00 */
OPCODE(o6_pushByte),
OPCODE(o6_pushWord),
@ -191,7 +191,7 @@ void ScummEngine_v6he::setupOpcodes() {
OPCODE(o6_setClass),
OPCODE(o6_getState),
/* 70 */
OPCODE(o6he_setState),
OPCODE(o60_setState),
OPCODE(o6_setOwner),
OPCODE(o6_getOwner),
OPCODE(o6_jump),
@ -246,8 +246,8 @@ void ScummEngine_v6he::setupOpcodes() {
OPCODE(o6_invalid),
OPCODE(o6_resourceRoutines),
/* 9C */
OPCODE(o6he_roomOps),
OPCODE(o6he_actorOps),
OPCODE(o60_roomOps),
OPCODE(o60_actorOps),
OPCODE(o6_verbOps),
OPCODE(o6_getActorFromXY),
/* A0 */
@ -262,7 +262,7 @@ void ScummEngine_v6he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
OPCODE(o6he_wait),
OPCODE(o60_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorAnimCounter1),
/* AC */
@ -301,8 +301,8 @@ void ScummEngine_v6he::setupOpcodes() {
OPCODE(o6_distObjectPt),
OPCODE(o6_distPtPt),
/* C8 */
OPCODE(o6he_kernelGetFunctions),
OPCODE(o6he_kernelSetFunctions),
OPCODE(o60_kernelGetFunctions),
OPCODE(o60_kernelSetFunctions),
OPCODE(o6_delayFrames),
OPCODE(o6_pickOneOf),
/* CC */
@ -322,18 +322,18 @@ void ScummEngine_v6he::setupOpcodes() {
OPCODE(o6_bor),
/* D8 */
OPCODE(o6_isRoomScriptRunning),
OPCODE(o6he_closeFile),
OPCODE(o6he_openFile),
OPCODE(o6he_readFile),
OPCODE(o60_closeFile),
OPCODE(o60_openFile),
OPCODE(o60_readFile),
/* DC */
OPCODE(o6he_writeFile),
OPCODE(o60_writeFile),
OPCODE(o6_findAllObjects),
OPCODE(o6he_deleteFile),
OPCODE(o6he_rename),
OPCODE(o60_deleteFile),
OPCODE(o60_rename),
/* E0 */
OPCODE(o6he_soundOps),
OPCODE(o60_soundOps),
OPCODE(o6_getPixel),
OPCODE(o6he_localizeArray),
OPCODE(o60_localizeArray),
OPCODE(o6_pickVarRandom),
/* E4 */
OPCODE(o6_setBoxSet),
@ -342,9 +342,9 @@ void ScummEngine_v6he::setupOpcodes() {
OPCODE(o6_invalid),
/* E8 */
OPCODE(o6_invalid),
OPCODE(o6he_seekFilePos),
OPCODE(o6he_redimArray),
OPCODE(o6he_readFilePos),
OPCODE(o60_seekFilePos),
OPCODE(o60_redimArray),
OPCODE(o60_readFilePos),
/* EC */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
@ -372,19 +372,19 @@ void ScummEngine_v6he::setupOpcodes() {
OPCODE(o6_invalid),
};
_opcodesV6he = opcodes;
_opcodesv60he = opcodes;
}
void ScummEngine_v6he::executeOpcode(byte i) {
OpcodeProcV6he op = _opcodesV6he[i].proc;
void ScummEngine_v60he::executeOpcode(byte i) {
OpcodeProcv60he op = _opcodesv60he[i].proc;
(this->*op) ();
}
const char *ScummEngine_v6he::getOpcodeDesc(byte i) {
return _opcodesV6he[i].desc;
const char *ScummEngine_v60he::getOpcodeDesc(byte i) {
return _opcodesv60he[i].desc;
}
void ScummEngine_v6he::o6he_setState() {
void ScummEngine_v60he::o60_setState() {
int state = pop();
int obj = pop();
@ -402,7 +402,7 @@ void ScummEngine_v6he::o6he_setState() {
clearDrawObjectQueue();
}
void ScummEngine_v6he::o6he_roomOps() {
void ScummEngine_v60he::o60_roomOps() {
int a, b, c, d, e;
byte op;
@ -512,7 +512,7 @@ void ScummEngine_v6he::o6he_roomOps() {
case 187: // SO_CYCLE_SPEED
b = pop();
a = pop();
checkRange(16, 1, a, "o6he_roomOps: 187: color cycle out of range (%d)");
checkRange(16, 1, a, "o60_roomOps: 187: color cycle out of range (%d)");
_colorCycle[a - 1].delay = (b != 0) ? 0x4000 / (b * 0x4C) : 0;
break;
@ -541,14 +541,14 @@ void ScummEngine_v6he::o6he_roomOps() {
case 236: // HE 7.2
b = pop();
a = pop();
warning("o6he_roomOps: case %d (%d, %d)", op, b, a);
warning("o60_roomOps: case %d (%d, %d)", op, b, a);
break;
default:
error("o6he_roomOps: default case %d", op);
error("o60_roomOps: default case %d", op);
}
}
void ScummEngine_v6he::swapObjects(int object1, int object2) {
void ScummEngine_v60he::swapObjects(int object1, int object2) {
int idx1 = -1, idx2 = -1;
if (_numObjectsInRoom >= 0) { // how could it be negative?
@ -574,7 +574,7 @@ void ScummEngine_v6he::swapObjects(int object1, int object2) {
memcpy(&_objs[idx2], &tmpOd, sizeof(tmpOd));
}
void ScummEngine_v6he::o6he_actorOps() {
void ScummEngine_v60he::o60_actorOps() {
Actor *a;
int i, j, k;
int args[8];
@ -586,7 +586,7 @@ void ScummEngine_v6he::o6he_actorOps() {
return;
}
a = derefActorSafe(_curActor, "o6he_actorOps");
a = derefActorSafe(_curActor, "o60_actorOps");
if (!a)
return;
@ -745,11 +745,11 @@ void ScummEngine_v6he::o6he_actorOps() {
break;
}
default:
error("o6he_actorOps: default case %d", b);
error("o60_actorOps: default case %d", b);
}
}
void ScummEngine_v6he::o6he_wait() {
void ScummEngine_v60he::o60_wait() {
int actnum;
int offs = -2;
Actor *a;
@ -759,7 +759,7 @@ void ScummEngine_v6he::o6he_wait() {
case 168: // SO_WAIT_FOR_ACTOR Wait for actor
offs = fetchScriptWordSigned();
actnum = pop();
a = derefActor(actnum, "o6he_wait:168");
a = derefActor(actnum, "o60_wait:168");
if (a->moving)
break;
return;
@ -781,14 +781,14 @@ void ScummEngine_v6he::o6he_wait() {
return;
break;
default:
error("o6he_wait: default case 0x%x", subOp);
error("o60_wait: default case 0x%x", subOp);
}
_scriptPointer += offs;
o6_breakHere();
}
void ScummEngine_v6he::o6he_kernelSetFunctions() {
void ScummEngine_v60he::o60_kernelSetFunctions() {
int args[29];
int num;
@ -806,11 +806,11 @@ void ScummEngine_v6he::o6he_kernelSetFunctions() {
//Used before mini games in 3DO versions, seems safe to ignore.
break;
default:
error("o6he_kernelSetFunctions: default case %d (param count %d)", args[0], num);
error("o60_kernelSetFunctions: default case %d (param count %d)", args[0], num);
}
}
void ScummEngine_v6he::virtScreenLoad(int resIdx, int x1, int y1, int x2, int y2) {
void ScummEngine_v60he::virtScreenLoad(int resIdx, int x1, int y1, int x2, int y2) {
vsUnpackCtx ctx;
memset(&ctx, 0, sizeof(ctx));
VirtScreen &vs = virtscr[kMainVirtScreen]; // XXX gdi_virtScreen = 0;
@ -832,7 +832,7 @@ void ScummEngine_v6he::virtScreenLoad(int resIdx, int x1, int y1, int x2, int y2
markRectAsDirty(kMainVirtScreen, x1, x2, y1, y2 + 1); // XXX , 0x4000);
}
uint8 ScummEngine_v6he::virtScreenLoadUnpack(vsUnpackCtx *ctx, byte *data) {
uint8 ScummEngine_v60he::virtScreenLoadUnpack(vsUnpackCtx *ctx, byte *data) {
uint8 decByte;
if (data != 0) {
ctx->type = 0;
@ -865,7 +865,7 @@ uint8 ScummEngine_v6he::virtScreenLoadUnpack(vsUnpackCtx *ctx, byte *data) {
return decByte;
}
void ScummEngine_v6he::o6he_kernelGetFunctions() {
void ScummEngine_v60he::o60_kernelGetFunctions() {
int args[29];
int retval;
ArrayHeader *ah;
@ -883,11 +883,11 @@ void ScummEngine_v6he::o6he_kernelGetFunctions() {
push(retval);
break;
default:
error("o6he_kernelGetFunctions: default case %d", args[0]);
error("o60_kernelGetFunctions: default case %d", args[0]);
}
}
int ScummEngine_v6he::virtScreenSave(byte *dst, int x1, int y1, int x2, int y2) {
int ScummEngine_v60he::virtScreenSave(byte *dst, int x1, int y1, int x2, int y2) {
int packedSize = 0;
VirtScreen &vs = virtscr[kMainVirtScreen]; // XXX gdi_virtScreen = 0;
@ -903,7 +903,7 @@ int ScummEngine_v6he::virtScreenSave(byte *dst, int x1, int y1, int x2, int y2)
return packedSize;
}
int ScummEngine_v6he::virtScreenSavePack(byte *dst, byte *src, int len, int unk) {
int ScummEngine_v60he::virtScreenSavePack(byte *dst, byte *src, int len, int unk) {
vsPackCtx ctx;
memset(&ctx, 0, sizeof(ctx));
@ -965,7 +965,7 @@ int ScummEngine_v6he::virtScreenSavePack(byte *dst, byte *src, int len, int unk)
return ctx.size;
}
void ScummEngine_v6he::virtScreenSavePackBuf(vsPackCtx *ctx, uint8 *&dst, int len) {
void ScummEngine_v60he::virtScreenSavePackBuf(vsPackCtx *ctx, uint8 *&dst, int len) {
if (dst) {
*dst++ = (len - 1) * 2;
}
@ -979,7 +979,7 @@ void ScummEngine_v6he::virtScreenSavePackBuf(vsPackCtx *ctx, uint8 *&dst, int le
}
}
void ScummEngine_v6he::virtScreenSavePackByte(vsPackCtx *ctx, uint8 *&dst, int len, uint8 b) {
void ScummEngine_v60he::virtScreenSavePackByte(vsPackCtx *ctx, uint8 *&dst, int len, uint8 b) {
if (dst) {
*dst++ = ((len - 1) * 2) | 1;
}
@ -990,7 +990,7 @@ void ScummEngine_v6he::virtScreenSavePackByte(vsPackCtx *ctx, uint8 *&dst, int l
++ctx->size;
}
void ScummEngine_v6he::o6he_openFile() {
void ScummEngine_v60he::o60_openFile() {
int mode, len, slot, l, r;
byte filename[100];
@ -1019,7 +1019,7 @@ void ScummEngine_v6he::o6he_openFile() {
else if (mode == 2)
_hFileTable[slot].open((char*)filename + r, File::kFileWriteMode);
else
error("o6he_openFile(): wrong open file mode");
error("o60_openFile(): wrong open file mode");
if (_hFileTable[slot].isOpen() == false)
slot = -1;
@ -1028,14 +1028,14 @@ void ScummEngine_v6he::o6he_openFile() {
push(slot);
}
void ScummEngine_v6he::o6he_closeFile() {
void ScummEngine_v60he::o60_closeFile() {
int slot = pop();
if (slot != -1)
if (_hFileTable[slot].isOpen() == true)
_hFileTable[slot].close();
}
void ScummEngine_v6he::o6he_deleteFile() {
void ScummEngine_v60he::o60_deleteFile() {
int len, r;
byte filename[100];
@ -1049,10 +1049,10 @@ void ScummEngine_v6he::o6he_deleteFile() {
break;
}
debug(1, "stub o6he_deleteFile(\"%s\")", filename + r);
debug(1, "stub o60_deleteFile(\"%s\")", filename + r);
}
void ScummEngine_v6he::o6he_rename() {
void ScummEngine_v60he::o60_rename() {
int len, r1, r2;
byte filename[100],filename2[100];
@ -1076,10 +1076,10 @@ void ScummEngine_v6he::o6he_rename() {
break;
}
debug(1, "stub o6he_rename(\"%s\" to \"%s\")", filename + r1, filename2 + r2);
debug(1, "stub o60_rename(\"%s\" to \"%s\")", filename + r1, filename2 + r2);
}
int ScummEngine_v6he::readFileToArray(int slot, int32 size) {
int ScummEngine_v60he::readFileToArray(int slot, int32 size) {
if (size == 0)
size = _hFileTable[slot].size() - _hFileTable[slot].pos();
@ -1091,7 +1091,7 @@ int ScummEngine_v6he::readFileToArray(int slot, int32 size) {
return readVar(0);
}
void ScummEngine_v6he::o6he_readFile() {
void ScummEngine_v60he::o60_readFile() {
int32 size = pop();
int slot = pop();
int val;
@ -1112,14 +1112,14 @@ void ScummEngine_v6he::o6he_readFile() {
}
}
void ScummEngine_v6he::writeFileFromArray(int slot, int resID) {
void ScummEngine_v60he::writeFileFromArray(int slot, int resID) {
ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, resID);
int32 size = FROM_LE_16(ah->dim1) * FROM_LE_16(ah->dim2);
_hFileTable[slot].write(ah->data, size);
}
void ScummEngine_v6he::o6he_writeFile() {
void ScummEngine_v60he::o60_writeFile() {
int32 size = pop();
int16 resID = pop();
int slot = pop();
@ -1137,7 +1137,7 @@ void ScummEngine_v6he::o6he_writeFile() {
}
}
void ScummEngine_v6he::o6he_soundOps() {
void ScummEngine_v60he::o60_soundOps() {
byte subOp = fetchScriptByte();
int arg = pop();
switch (subOp) {
@ -1151,23 +1151,23 @@ void ScummEngine_v6he::o6he_soundOps() {
_sound->setOverrideFreq(arg);
break;
default:
error("o6he_soundOps: default case 0x%x", subOp);
error("o60_soundOps: default case 0x%x", subOp);
}
}
void ScummEngine_v6he::localizeArray(int slot, int script) {
void ScummEngine_v60he::localizeArray(int slot, int script) {
if (slot >= _numArray)
error("o6he_localizeArray(%d): array slot out of range", slot);
error("o60_localizeArray(%d): array slot out of range", slot);
_arraySlot[slot] = vm.slot[_currentScript].number;
}
void ScummEngine_v6he::o6he_localizeArray() {
void ScummEngine_v60he::o60_localizeArray() {
int slot = pop();
localizeArray(slot, vm.slot[_currentScript].number);
}
void ScummEngine_v6he::o6he_seekFilePos() {
void ScummEngine_v60he::o60_seekFilePos() {
int mode, offset, slot;
mode = pop();
offset = pop();
@ -1176,7 +1176,7 @@ void ScummEngine_v6he::o6he_seekFilePos() {
seekFilePos(slot, offset, mode - 1);
}
void ScummEngine_v6he::seekFilePos(int slot, int offset, int mode) {
void ScummEngine_v60he::seekFilePos(int slot, int offset, int mode) {
if (slot == 1)
return;
@ -1195,7 +1195,7 @@ void ScummEngine_v6he::seekFilePos(int slot, int offset, int mode) {
}
}
void ScummEngine_v6he::o6he_readFilePos() {
void ScummEngine_v60he::o60_readFilePos() {
int slot = pop();
if (slot == -1) {
@ -1206,7 +1206,7 @@ void ScummEngine_v6he::o6he_readFilePos() {
push(_hFileTable[slot].pos());
}
void ScummEngine_v6he::o6he_redimArray() {
void ScummEngine_v60he::o60_redimArray() {
int subcode, newX, newY;
newY = pop();
newX = pop();
@ -1223,11 +1223,11 @@ void ScummEngine_v6he::o6he_redimArray() {
redimArray(fetchScriptWord(), newX, newY, kByteArray);
break;
default:
error("o6he_redimArray: default type %d", subcode);
error("o60_redimArray: default type %d", subcode);
}
}
void ScummEngine_v6he::redimArray(int arrayId, int newX, int newY, int type) {
void ScummEngine_v60he::redimArray(int arrayId, int newX, int newY, int type) {
// Used in mini game at Cosmic Dust Diner in puttmoon
int newSize, oldSize;
@ -1253,7 +1253,7 @@ void ScummEngine_v6he::redimArray(int arrayId, int newX, int newY, int type) {
ah->dim2 = TO_LE_16(newX + 1);
}
void ScummEngine_v6he::decodeParseString(int m, int n) {
void ScummEngine_v60he::decodeParseString(int m, int n) {
byte b;
int i, color;
int args[31];

View file

@ -185,12 +185,12 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_setClass),
OPCODE(o6_getState),
/* 70 */
OPCODE(o6he_setState),
OPCODE(o60_setState),
OPCODE(o6_setOwner),
OPCODE(o6_getOwner),
OPCODE(o6_jump),
/* 74 */
OPCODE(o70he_startSound),
OPCODE(o70_startSound),
OPCODE(o6_stopSound),
OPCODE(o6_startMusic),
OPCODE(o6_stopObjectScript),
@ -210,7 +210,7 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_animateActor),
OPCODE(o6_doSentence),
/* 84 */
OPCODE(o70he_pickupObject),
OPCODE(o70_pickupObject),
OPCODE(o6_loadRoomWithEgo),
OPCODE(o6_invalid),
OPCODE(o6_getRandomNumber),
@ -220,7 +220,7 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_getActorMoving),
OPCODE(o6_isScriptRunning),
/* 8C */
OPCODE(o70he_getActorRoom),
OPCODE(o70_getActorRoom),
OPCODE(o6_getObjectX),
OPCODE(o6_getObjectY),
OPCODE(o6_getObjectOldDir),
@ -238,9 +238,9 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_isSoundRunning),
OPCODE(o6_setBoxFlags),
OPCODE(o6_invalid),
OPCODE(o70he_resourceRoutines),
OPCODE(o70_resourceRoutines),
/* 9C */
OPCODE(o6he_roomOps),
OPCODE(o60_roomOps),
OPCODE(o72_actorOps),
OPCODE(o72_verbOps),
OPCODE(o6_getActorFromXY),
@ -256,13 +256,13 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
OPCODE(o6he_wait),
OPCODE(o60_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorAnimCounter1),
/* AC */
OPCODE(o6_invalid),
OPCODE(o6_isAnyOf),
OPCODE(o70he_quitPauseRestart),
OPCODE(o70_quitPauseRestart),
OPCODE(o6_isActorInBox),
/* B0 */
OPCODE(o6_delay),
@ -286,7 +286,7 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_startScriptQuick2),
/* C0 */
OPCODE(o72_dim2dimArray),
OPCODE(o72_unknownC1),
OPCODE(o72_traceStatus),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
/* C4 */
@ -295,8 +295,8 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_distObjectPt),
OPCODE(o6_distPtPt),
/* C8 */
OPCODE(o6he_kernelGetFunctions),
OPCODE(o70he_kernelSetFunctions),
OPCODE(o60_kernelGetFunctions),
OPCODE(o70_kernelSetFunctions),
OPCODE(o6_delayFrames),
OPCODE(o6_pickOneOf),
/* CC */
@ -316,18 +316,18 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_bor),
/* D8 */
OPCODE(o6_isRoomScriptRunning),
OPCODE(o6he_closeFile),
OPCODE(o60_closeFile),
OPCODE(o72_openFile),
OPCODE(o72_readFile),
/* DC */
OPCODE(o72_writeFile),
OPCODE(o72_findAllObjects),
OPCODE(o72_deleteFile),
OPCODE(o6he_rename),
OPCODE(o60_rename),
/* E0 */
OPCODE(o6he_soundOps),
OPCODE(o60_soundOps),
OPCODE(o72_getPixel),
OPCODE(o6he_localizeArray),
OPCODE(o60_localizeArray),
OPCODE(o72_pickVarRandom),
/* E4 */
OPCODE(o6_setBoxSet),
@ -336,13 +336,13 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_invalid),
/* E8 */
OPCODE(o6_invalid),
OPCODE(o6he_seekFilePos),
OPCODE(o60_seekFilePos),
OPCODE(o72_redimArray),
OPCODE(o6he_readFilePos),
OPCODE(o60_readFilePos),
/* EC */
OPCODE(o72_unknownEC),
OPCODE(o72_unknownED),
OPCODE(o70he_stringLen),
OPCODE(o70_stringLen),
OPCODE(o72_unknownEF),
/* F0 */
OPCODE(o72_unknownF0),
@ -358,9 +358,9 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o72_unknownF8),
OPCODE(o72_setFilePath),
OPCODE(o72_unknownFA),
OPCODE(o70he_polygonOps),
OPCODE(o70_polygonOps),
/* FC */
OPCODE(o70he_polygonHit),
OPCODE(o70_polygonHit),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
@ -889,7 +889,7 @@ void ScummEngine_v72he::o72_actorOps() {
return;
}
a = derefActorSafe(_curActor, "o6he_actorOps");
a = derefActorSafe(_curActor, "o60_actorOps");
if (!a)
return;
@ -1353,13 +1353,11 @@ void ScummEngine_v72he::o72_dim2dimArray() {
defineArray(fetchScriptWord(), data, 0, a, 0, b);
}
void ScummEngine_v72he::o72_unknownC1() {
void ScummEngine_v72he::o72_traceStatus() {
byte string[80];
copyScriptString(string);
pop();
//debug(1, "stub o72_unknownC1(%s)", string);
}
void ScummEngine_v72he::getWizImageDim(int resnum, int state, uint32 &w, uint32 &h) {
@ -1660,7 +1658,7 @@ void ScummEngine_v72he::drawWizPolygon(int resnum, int state, int id, int flags)
}
void ScummEngine_v72he::redrawBGAreas() {
ScummEngine_v7he::redrawBGAreas();
ScummEngine_v70he::redrawBGAreas();
flushWizBuffer();
}
@ -1755,7 +1753,7 @@ void ScummEngine_v72he::o72_openFile() {
else if (mode == 2)
_hFileTable[slot].open((char*)filename + r, File::kFileWriteMode);
else
error("o6he_openFile(): wrong open file mode %d", mode);
error("o60_openFile(): wrong open file mode %d", mode);
if (_hFileTable[slot].isOpen() == false)
slot = -1;
@ -2095,7 +2093,7 @@ void ScummEngine_v72he::o72_unknownF1() {
}
push (1);
debug(1,"o70he_unknownF1 stub (%d, %d)", id, id2);
debug(1,"o70_unknownF1 stub (%d, %d)", id, id2);
}
void ScummEngine_v72he::o72_checkGlobQueue() {

View file

@ -41,10 +41,10 @@
namespace Scumm {
#define OPCODE(x) { &ScummEngine_v7he::x, #x }
#define OPCODE(x) { &ScummEngine_v70he::x, #x }
void ScummEngine_v7he::setupOpcodes() {
static const OpcodeEntryV7he opcodes[256] = {
void ScummEngine_v70he::setupOpcodes() {
static const OpcodeEntryv70he opcodes[256] = {
/* 00 */
OPCODE(o6_pushByte),
OPCODE(o6_pushWord),
@ -186,12 +186,12 @@ void ScummEngine_v7he::setupOpcodes() {
OPCODE(o6_setClass),
OPCODE(o6_getState),
/* 70 */
OPCODE(o6he_setState),
OPCODE(o60_setState),
OPCODE(o6_setOwner),
OPCODE(o6_getOwner),
OPCODE(o6_jump),
/* 74 */
OPCODE(o70he_startSound),
OPCODE(o70_startSound),
OPCODE(o6_stopSound),
OPCODE(o6_startMusic),
OPCODE(o6_stopObjectScript),
@ -211,7 +211,7 @@ void ScummEngine_v7he::setupOpcodes() {
OPCODE(o6_animateActor),
OPCODE(o6_doSentence),
/* 84 */
OPCODE(o70he_pickupObject),
OPCODE(o70_pickupObject),
OPCODE(o6_loadRoomWithEgo),
OPCODE(o6_invalid),
OPCODE(o6_getRandomNumber),
@ -221,7 +221,7 @@ void ScummEngine_v7he::setupOpcodes() {
OPCODE(o6_getActorMoving),
OPCODE(o6_isScriptRunning),
/* 8C */
OPCODE(o70he_getActorRoom),
OPCODE(o70_getActorRoom),
OPCODE(o6_getObjectX),
OPCODE(o6_getObjectY),
OPCODE(o6_getObjectOldDir),
@ -239,10 +239,10 @@ void ScummEngine_v7he::setupOpcodes() {
OPCODE(o6_isSoundRunning),
OPCODE(o6_setBoxFlags),
OPCODE(o6_invalid),
OPCODE(o70he_resourceRoutines),
OPCODE(o70_resourceRoutines),
/* 9C */
OPCODE(o6he_roomOps),
OPCODE(o6he_actorOps),
OPCODE(o60_roomOps),
OPCODE(o60_actorOps),
OPCODE(o6_verbOps),
OPCODE(o6_getActorFromXY),
/* A0 */
@ -257,13 +257,13 @@ void ScummEngine_v7he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
OPCODE(o6he_wait),
OPCODE(o60_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorAnimCounter1),
/* AC */
OPCODE(o6_invalid),
OPCODE(o6_isAnyOf),
OPCODE(o70he_quitPauseRestart),
OPCODE(o70_quitPauseRestart),
OPCODE(o6_isActorInBox),
/* B0 */
OPCODE(o6_delay),
@ -296,8 +296,8 @@ void ScummEngine_v7he::setupOpcodes() {
OPCODE(o6_distObjectPt),
OPCODE(o6_distPtPt),
/* C8 */
OPCODE(o6he_kernelGetFunctions),
OPCODE(o70he_kernelSetFunctions),
OPCODE(o60_kernelGetFunctions),
OPCODE(o70_kernelSetFunctions),
OPCODE(o6_delayFrames),
OPCODE(o6_pickOneOf),
/* CC */
@ -317,18 +317,18 @@ void ScummEngine_v7he::setupOpcodes() {
OPCODE(o6_bor),
/* D8 */
OPCODE(o6_isRoomScriptRunning),
OPCODE(o6he_closeFile),
OPCODE(o6he_openFile),
OPCODE(o6he_readFile),
OPCODE(o60_closeFile),
OPCODE(o60_openFile),
OPCODE(o60_readFile),
/* DC */
OPCODE(o6he_writeFile),
OPCODE(o60_writeFile),
OPCODE(o6_findAllObjects),
OPCODE(o6he_deleteFile),
OPCODE(o6he_rename),
OPCODE(o60_deleteFile),
OPCODE(o60_rename),
/* E0 */
OPCODE(o6he_soundOps),
OPCODE(o60_soundOps),
OPCODE(o6_getPixel),
OPCODE(o6he_localizeArray),
OPCODE(o60_localizeArray),
OPCODE(o6_pickVarRandom),
/* E4 */
OPCODE(o6_setBoxSet),
@ -337,49 +337,49 @@ void ScummEngine_v7he::setupOpcodes() {
OPCODE(o6_invalid),
/* E8 */
OPCODE(o6_invalid),
OPCODE(o6he_seekFilePos),
OPCODE(o6he_redimArray),
OPCODE(o6he_readFilePos),
OPCODE(o60_seekFilePos),
OPCODE(o60_redimArray),
OPCODE(o60_readFilePos),
/* EC */
OPCODE(o6_invalid),
OPCODE(o70he_unknownED),
OPCODE(o70he_stringLen),
OPCODE(o70he_unknownEF),
OPCODE(o70_unknownED),
OPCODE(o70_stringLen),
OPCODE(o70_unknownEF),
/* F0 */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o70he_readINI),
OPCODE(o70_readINI),
/* F4 */
OPCODE(o70he_writeINI),
OPCODE(o70he_unknownF5),
OPCODE(o70he_unknownF6),
OPCODE(o70_writeINI),
OPCODE(o70_unknownF5),
OPCODE(o70_unknownF6),
OPCODE(o6_invalid),
/* F8 */
OPCODE(o6_invalid),
OPCODE(o70he_setFilePath),
OPCODE(o70he_unknownFA),
OPCODE(o70he_polygonOps),
OPCODE(o70_setFilePath),
OPCODE(o70_unknownFA),
OPCODE(o70_polygonOps),
/* FC */
OPCODE(o70he_polygonHit),
OPCODE(o70_polygonHit),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
};
_opcodesV7he = opcodes;
_opcodesv70he = opcodes;
}
void ScummEngine_v7he::executeOpcode(byte i) {
OpcodeProcV7he op = _opcodesV7he[i].proc;
void ScummEngine_v70he::executeOpcode(byte i) {
OpcodeProcv70he op = _opcodesv70he[i].proc;
(this->*op) ();
}
const char *ScummEngine_v7he::getOpcodeDesc(byte i) {
return _opcodesV7he[i].desc;
const char *ScummEngine_v70he::getOpcodeDesc(byte i) {
return _opcodesv70he[i].desc;
}
void ScummEngine_v7he::arrrays_unk2(int dst, int src, int len2, int len) {
void ScummEngine_v70he::arrrays_unk2(int dst, int src, int len2, int len) {
int edi, value;
int i = 0;
@ -404,7 +404,7 @@ void ScummEngine_v7he::arrrays_unk2(int dst, int src, int len2, int len) {
writeArray(0, 0, edi + i, 0);
}
void ScummEngine_v7he::o70he_startSound() {
void ScummEngine_v70he::o70_startSound() {
byte op;
op = fetchScriptByte();
@ -413,7 +413,7 @@ void ScummEngine_v7he::o70he_startSound() {
_heSndLoop |= 4;
break;
case 23:
debug(1,"o70he_startSound: case 29 (%d, %d, %d)", pop(), pop(), pop());
debug(1,"o70_startSound: case 29 (%d, %d, %d)", pop(), pop(), pop());
break;
case 56:
_heSndLoop |= 2;
@ -447,16 +447,16 @@ void ScummEngine_v7he::o70he_startSound() {
case 255:
// _sound->addSoundToQueue(_heSndSoundId, _heSndOffset, _heSndChannel, _heSndLoop);
_sound->addSoundToQueue(_heSndSoundId, _heSndOffset);
debug(2, "o70he_startSound stub (%d, %d, %d, %d)", _heSndSoundId, _heSndOffset, _heSndChannel, _heSndLoop);
debug(2, "o70_startSound stub (%d, %d, %d, %d)", _heSndSoundId, _heSndOffset, _heSndChannel, _heSndLoop);
_heSndLoop = 0;
break;
default:
error("o70he_startSound invalid case %d", op);
error("o70_startSound invalid case %d", op);
}
}
void ScummEngine_v7he::o70he_pickupObject() {
void ScummEngine_v70he::o70_pickupObject() {
int obj, room;
room = pop();
@ -475,17 +475,17 @@ void ScummEngine_v7he::o70he_pickupObject() {
runInventoryScript(obj); /* Difference */
}
void ScummEngine_v7he::o70he_getActorRoom() {
void ScummEngine_v70he::o70_getActorRoom() {
int act = pop();
if (act < _numActors) {
Actor *a = derefActor(act, "o70he_getActorRoom");
Actor *a = derefActor(act, "o70_getActorRoom");
push(a->room);
} else
push(getObjectRoom(act));
}
void ScummEngine_v7he::o70he_resourceRoutines() {
void ScummEngine_v70he::o70_resourceRoutines() {
int resid, op;
op = fetchScriptByte();
@ -603,18 +603,18 @@ void ScummEngine_v7he::o70he_resourceRoutines() {
break;
case 233:
resid = pop();
debug(5,"stub o70he_resourceRoutines lock object %d", resid);
debug(5,"stub o70_resourceRoutines lock object %d", resid);
break;
case 235:
resid = pop();
debug(5,"stub o70he_resourceRoutines unlock object %d", resid);
debug(5,"stub o70_resourceRoutines unlock object %d", resid);
break;
default:
debug(1,"o70he_resourceRoutines: default case %d", op);
debug(1,"o70_resourceRoutines: default case %d", op);
}
}
void ScummEngine_v7he::o70he_quitPauseRestart() {
void ScummEngine_v70he::o70_quitPauseRestart() {
byte subOp = fetchScriptByte();
int par1;
@ -628,24 +628,24 @@ void ScummEngine_v7he::o70he_quitPauseRestart() {
break;
case 250:
par1 = pop();
warning("stub: o70he_quitPauseRestart subOpcode %d", subOp);
warning("stub: o70_quitPauseRestart subOpcode %d", subOp);
break;
case 253:
par1 = pop();
warning("stub: o70he_quitPauseRestart subOpcode %d", subOp);
warning("stub: o70_quitPauseRestart subOpcode %d", subOp);
case 244: // SO_QUIT
shutDown();
break;
case 251:
case 252:
warning("stub: o70he_quitPauseRestart subOpcode %d", subOp);
warning("stub: o70_quitPauseRestart subOpcode %d", subOp);
break;
default:
warning("o70he_quitPauseRestart invalid case %d", subOp);
warning("o70_quitPauseRestart invalid case %d", subOp);
}
}
void ScummEngine_v7he::o70he_unknownED() {
void ScummEngine_v70he::o70_unknownED() {
int array, pos, len;
int chr, result = 0;
@ -666,17 +666,17 @@ void ScummEngine_v7he::o70he_unknownED() {
}
push(result);
debug(1,"stub o70he_unknownED");
debug(1,"stub o70_unknownED");
}
void ScummEngine_v7he::o70he_kernelSetFunctions() {
void ScummEngine_v70he::o70_kernelSetFunctions() {
int args[29];
int num;
Actor *a;
num = getStackList(args, ARRAYSIZE(args));
debug(1, "o70he_kernelSetFunctions: case %d (param count %d)", args[0], num);
debug(1, "o70_kernelSetFunctions: case %d (param count %d)", args[0], num);
switch (args[0]) {
case 1:
// Used to restore images when decorating cake in
@ -684,7 +684,7 @@ void ScummEngine_v7he::o70he_kernelSetFunctions() {
virtScreenLoad(args[1], args[2], args[3], args[4], args[5]);
break;
case 20: // HE72+
a = derefActor(args[1], "o70he_kernelSetFunctions: 20");
a = derefActor(args[1], "o70_kernelSetFunctions: 20");
queueAuxBlock(a);
break;
case 21:
@ -706,7 +706,7 @@ void ScummEngine_v7he::o70he_kernelSetFunctions() {
_fullRedraw = 1;
break;
case 30:
a = derefActor(args[1], "o70he_kernelSetFunctions: 30");
a = derefActor(args[1], "o70_kernelSetFunctions: 30");
a->clipOverride.bottom = args[2];
break;
case 42:
@ -718,11 +718,11 @@ void ScummEngine_v7he::o70he_kernelSetFunctions() {
case 714:
break;
default:
error("o70he_kernelSetFunctions: default case %d (param count %d)", args[0], num);
error("o70_kernelSetFunctions: default case %d (param count %d)", args[0], num);
}
}
void ScummEngine_v7he::o70he_stringLen() {
void ScummEngine_v70he::o70_stringLen() {
int id, len;
byte *addr;
@ -730,13 +730,13 @@ void ScummEngine_v7he::o70he_stringLen() {
addr = getStringAddress(id);
if (!addr)
error("o70he_stringLen: Reference to zeroed array pointer (%d)", id);
error("o70_stringLen: Reference to zeroed array pointer (%d)", id);
len = resStrLen(getStringAddress(id));
push(len);
}
void ScummEngine_v7he::o70he_unknownEF() {
void ScummEngine_v70he::o70_unknownEF() {
int dst, size;
int b = pop();
int a = pop();
@ -753,10 +753,10 @@ void ScummEngine_v7he::o70he_unknownEF() {
arrrays_unk2(dst, src, a, b);
push(dst);
debug(1,"stub o70he_unknownEF");
debug(1,"stub o70_unknownEF");
}
void ScummEngine_v7he::o70he_readINI() {
void ScummEngine_v70he::o70_readINI() {
int len;
int type;
int retval;
@ -785,11 +785,11 @@ void ScummEngine_v7he::o70he_readINI() {
push(retval); // var ID string
break;
default:
error("o70he_readINI: default type %d", type);
error("o70_readINI: default type %d", type);
}
}
void ScummEngine_v7he::o70he_writeINI() {
void ScummEngine_v70he::o70_writeINI() {
int type, value;
byte option[256], option2[256];
int len;
@ -803,20 +803,20 @@ void ScummEngine_v7he::o70he_writeINI() {
switch (type) {
case 1: // number
debug(1, "o70he_writeINI: %s set to %d", option, value);
debug(1, "o70_writeINI: %s set to %d", option, value);
break;
case 2: // string
addMessageToStack(_scriptPointer, option2, sizeof(option2));
len = resStrLen(_scriptPointer);
_scriptPointer += len + 1;
debug(1, "o70he_writeINI: %s set to %s", option, option2);
debug(1, "o70_writeINI: %s set to %s", option, option2);
break;
default:
error("o70he_writeINI: default type %d", type);
error("o70_writeINI: default type %d", type);
}
}
void ScummEngine_v7he::o70he_unknownF5() {
void ScummEngine_v70he::o70_unknownF5() {
int chr, max;
int array, len, pos, result = 0;
max = pop();
@ -837,10 +837,10 @@ void ScummEngine_v7he::o70he_unknownF5() {
}
push(len);
debug(1,"stub o70he_unknownF5 (%d)", result);
debug(1,"stub o70_unknownF5 (%d)", result);
}
void ScummEngine_v7he::o70he_unknownF6() {
void ScummEngine_v70he::o70_unknownF6() {
int len, edi, pos, value, id;
value = pop();
edi = pop();
@ -878,10 +878,10 @@ void ScummEngine_v7he::o70he_unknownF6() {
}
push(-1);
debug(1,"stub o70he_unknownF6");
debug(1,"stub o70_unknownF6");
}
void ScummEngine_v7he::o70he_setFilePath() {
void ScummEngine_v70he::o70_setFilePath() {
// File related
int len;
byte filename[100];
@ -891,17 +891,17 @@ void ScummEngine_v7he::o70he_setFilePath() {
len = resStrLen(_scriptPointer);
_scriptPointer += len + 1;
debug(1,"stub o70he_setFilePath(%s)", filename);
debug(1,"stub o70_setFilePath(%s)", filename);
}
void ScummEngine_v7he::o70he_unknownFA() {
void ScummEngine_v70he::o70_unknownFA() {
int num = fetchScriptByte();
int len = resStrLen(_scriptPointer);
debug(1,"stub o70he_unknownFA(%d, \"%s\")", num, _scriptPointer);
debug(1,"stub o70_unknownFA(%d, \"%s\")", num, _scriptPointer);
_scriptPointer += len + 1;
}
void ScummEngine_v7he::o70he_polygonOps() {
void ScummEngine_v70he::o70_polygonOps() {
byte b;
b = fetchScriptByte();
int vert1x, vert1y, vert2x, vert2y, vert3x, vert3y, vert4x, vert4y;
@ -973,21 +973,21 @@ void ScummEngine::polygonStore(int id, bool flag, int vert1x, int vert1y, int ve
}
}
void ScummEngine_v7he::polygonErase(int fromId, int toId) {
void ScummEngine_v70he::polygonErase(int fromId, int toId) {
for (int i = 0; i < _wizNumPolygons; i++) {
if (_wizPolygons[i].id >= fromId && _wizPolygons[i].id <= toId)
memset(&_wizPolygons[i], 0, sizeof(WizPolygon));
}
}
void ScummEngine_v7he::o70he_polygonHit() {
void ScummEngine_v70he::o70_polygonHit() {
int y = pop();
int x = pop();
push(polygonHit(0, x, y));
}
int ScummEngine_v7he::polygonHit(int id, int x, int y) {
int ScummEngine_v70he::polygonHit(int id, int x, int y) {
for (int i = 0; i < _wizNumPolygons; i++) {
if ((!id || _wizPolygons[i].id == id) && _wizPolygons[i].bound.contains(x, y)) {
if (polygonContains(_wizPolygons[i], x, y)) {
@ -999,7 +999,7 @@ int ScummEngine_v7he::polygonHit(int id, int x, int y) {
return 0;
}
bool ScummEngine_v7he::polygonDefined(int id) {
bool ScummEngine_v70he::polygonDefined(int id) {
for (int i = 0; i < _wizNumPolygons; i++)
if (_wizPolygons[i].id == id)
return true;
@ -1007,7 +1007,7 @@ bool ScummEngine_v7he::polygonDefined(int id) {
return false;
}
bool ScummEngine_v7he::polygonContains(WizPolygon &pol, int x, int y) {
bool ScummEngine_v70he::polygonContains(WizPolygon &pol, int x, int y) {
int pi = pol.numVerts - 1;
bool diry = (y < pol.vert[pi].y);
bool curdir;

View file

@ -190,7 +190,7 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_getOwner),
OPCODE(o6_jump),
/* 74 */
OPCODE(o70he_startSound),
OPCODE(o70_startSound),
OPCODE(o6_stopSound),
OPCODE(o6_startMusic),
OPCODE(o6_stopObjectScript),
@ -210,7 +210,7 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_animateActor),
OPCODE(o6_doSentence),
/* 84 */
OPCODE(o70he_pickupObject),
OPCODE(o70_pickupObject),
OPCODE(o6_loadRoomWithEgo),
OPCODE(o6_invalid),
OPCODE(o6_getRandomNumber),
@ -220,7 +220,7 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_getActorMoving),
OPCODE(o6_isScriptRunning),
/* 8C */
OPCODE(o70he_getActorRoom),
OPCODE(o70_getActorRoom),
OPCODE(o6_getObjectX),
OPCODE(o6_getObjectY),
OPCODE(o6_getObjectOldDir),
@ -238,9 +238,9 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_isSoundRunning),
OPCODE(o6_setBoxFlags),
OPCODE(o6_invalid),
OPCODE(o70he_resourceRoutines),
OPCODE(o70_resourceRoutines),
/* 9C */
OPCODE(o6he_roomOps),
OPCODE(o60_roomOps),
OPCODE(o72_actorOps),
OPCODE(o72_verbOps),
OPCODE(o6_getActorFromXY),
@ -256,13 +256,13 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
OPCODE(o6he_wait),
OPCODE(o60_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorAnimCounter1),
/* AC */
OPCODE(o80_drawWizPolygon),
OPCODE(o6_isAnyOf),
OPCODE(o70he_quitPauseRestart),
OPCODE(o70_quitPauseRestart),
OPCODE(o6_isActorInBox),
/* B0 */
OPCODE(o6_delay),
@ -286,7 +286,7 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_startScriptQuick2),
/* C0 */
OPCODE(o72_dim2dimArray),
OPCODE(o72_unknownC1),
OPCODE(o72_traceStatus),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
/* C4 */
@ -295,8 +295,8 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_distObjectPt),
OPCODE(o6_distPtPt),
/* C8 */
OPCODE(o6he_kernelGetFunctions),
OPCODE(o70he_kernelSetFunctions),
OPCODE(o60_kernelGetFunctions),
OPCODE(o70_kernelSetFunctions),
OPCODE(o6_delayFrames),
OPCODE(o6_pickOneOf),
/* CC */
@ -316,18 +316,18 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_bor),
/* D8 */
OPCODE(o6_isRoomScriptRunning),
OPCODE(o6he_closeFile),
OPCODE(o60_closeFile),
OPCODE(o72_openFile),
OPCODE(o72_readFile),
/* DC */
OPCODE(o72_writeFile),
OPCODE(o72_findAllObjects),
OPCODE(o72_deleteFile),
OPCODE(o6he_rename),
OPCODE(o60_rename),
/* E0 */
OPCODE(o6_invalid),
OPCODE(o72_getPixel),
OPCODE(o6he_localizeArray),
OPCODE(o60_localizeArray),
OPCODE(o80_pickVarRandom),
/* E4 */
OPCODE(o6_setBoxSet),
@ -336,13 +336,13 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_invalid),
/* E8 */
OPCODE(o6_invalid),
OPCODE(o6he_seekFilePos),
OPCODE(o60_seekFilePos),
OPCODE(o72_redimArray),
OPCODE(o6he_readFilePos),
OPCODE(o60_readFilePos),
/* EC */
OPCODE(o72_unknownEC),
OPCODE(o72_unknownED),
OPCODE(o70he_stringLen),
OPCODE(o70_stringLen),
OPCODE(o72_unknownEF),
/* F0 */
OPCODE(o72_unknownF0),
@ -358,9 +358,9 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o72_unknownF8),
OPCODE(o72_setFilePath),
OPCODE(o72_unknownFA),
OPCODE(o70he_polygonOps),
OPCODE(o70_polygonOps),
/* FC */
OPCODE(o70he_polygonHit),
OPCODE(o70_polygonHit),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),

View file

@ -190,7 +190,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_getOwner),
OPCODE(o6_jump),
/* 74 */
OPCODE(o70he_startSound),
OPCODE(o70_startSound),
OPCODE(o6_stopSound),
OPCODE(o6_startMusic),
OPCODE(o6_stopObjectScript),
@ -210,7 +210,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_animateActor),
OPCODE(o6_doSentence),
/* 84 */
OPCODE(o70he_pickupObject),
OPCODE(o70_pickupObject),
OPCODE(o6_loadRoomWithEgo),
OPCODE(o6_invalid),
OPCODE(o6_getRandomNumber),
@ -220,7 +220,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_getActorMoving),
OPCODE(o6_isScriptRunning),
/* 8C */
OPCODE(o70he_getActorRoom),
OPCODE(o70_getActorRoom),
OPCODE(o6_getObjectX),
OPCODE(o6_getObjectY),
OPCODE(o6_getObjectOldDir),
@ -238,9 +238,9 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_isSoundRunning),
OPCODE(o6_setBoxFlags),
OPCODE(o6_invalid),
OPCODE(o70he_resourceRoutines),
OPCODE(o70_resourceRoutines),
/* 9C */
OPCODE(o6he_roomOps),
OPCODE(o60_roomOps),
OPCODE(o72_actorOps),
OPCODE(o90_unknown9E),
OPCODE(o6_getActorFromXY),
@ -256,13 +256,13 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
OPCODE(o6he_wait),
OPCODE(o60_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorAnimCounter1),
/* AC */
OPCODE(o80_drawWizPolygon),
OPCODE(o6_isAnyOf),
OPCODE(o70he_quitPauseRestart),
OPCODE(o70_quitPauseRestart),
OPCODE(o6_isActorInBox),
/* B0 */
OPCODE(o6_delay),
@ -286,7 +286,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_startScriptQuick2),
/* C0 */
OPCODE(o72_dim2dimArray),
OPCODE(o72_unknownC1),
OPCODE(o72_traceStatus),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
/* C4 */
@ -295,8 +295,8 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_distObjectPt),
OPCODE(o6_distPtPt),
/* C8 */
OPCODE(o6he_kernelGetFunctions),
OPCODE(o70he_kernelSetFunctions),
OPCODE(o60_kernelGetFunctions),
OPCODE(o70_kernelSetFunctions),
OPCODE(o6_delayFrames),
OPCODE(o6_pickOneOf),
/* CC */
@ -316,18 +316,18 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_bor),
/* D8 */
OPCODE(o6_isRoomScriptRunning),
OPCODE(o6he_closeFile),
OPCODE(o60_closeFile),
OPCODE(o72_openFile),
OPCODE(o72_readFile),
/* DC */
OPCODE(o72_writeFile),
OPCODE(o72_findAllObjects),
OPCODE(o72_deleteFile),
OPCODE(o6he_rename),
OPCODE(o60_rename),
/* E0 */
OPCODE(o6_invalid),
OPCODE(o72_getPixel),
OPCODE(o6he_localizeArray),
OPCODE(o60_localizeArray),
OPCODE(o80_pickVarRandom),
/* E4 */
OPCODE(o6_setBoxSet),
@ -336,13 +336,13 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_invalid),
/* E8 */
OPCODE(o6_invalid),
OPCODE(o6he_seekFilePos),
OPCODE(o60_seekFilePos),
OPCODE(o72_redimArray),
OPCODE(o6he_readFilePos),
OPCODE(o60_readFilePos),
/* EC */
OPCODE(o72_unknownEC),
OPCODE(o72_unknownED),
OPCODE(o70he_stringLen),
OPCODE(o70_stringLen),
OPCODE(o72_unknownEF),
/* F0 */
OPCODE(o72_unknownF0),
@ -358,9 +358,9 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o72_unknownF8),
OPCODE(o72_setFilePath),
OPCODE(o72_unknownFA),
OPCODE(o70he_polygonOps),
OPCODE(o70_polygonOps),
/* FC */
OPCODE(o70he_polygonHit),
OPCODE(o70_polygonHit),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
@ -487,6 +487,12 @@ void ScummEngine_v90he::o90_unknown1C() {
_wizY1 = pop();
_wizX1 = pop();
break;
case 21:
pop();
pop();
pop();
pop();
break;
case 87: // HE99+
pop();
pop();

View file

@ -1008,8 +1008,8 @@ ScummEngine_v6::ScummEngine_v6(GameDetector *detector, OSystem *syst, const Scum
_smushFrameRate = 0;
}
ScummEngine_v7he::ScummEngine_v7he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16])
: ScummEngine_v6he(detector, syst, gs, md5sum) {
ScummEngine_v70he::ScummEngine_v70he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16])
: ScummEngine_v60he(detector, syst, gs, md5sum) {
_win32ResExtractor = new Win32ResExtractor(this);
}
@ -2837,11 +2837,11 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
break;
case 71:
case 70:
engine = new ScummEngine_v7he(detector, syst, game, md5sum);
engine = new ScummEngine_v70he(detector, syst, game, md5sum);
break;
#endif
case 60:
engine = new ScummEngine_v6he(detector, syst, game, md5sum);
engine = new ScummEngine_v60he(detector, syst, game, md5sum);
break;
default:
engine = new ScummEngine_v6(detector, syst, game, md5sum);