renamed class Scumm to ScummEngine (consisten with other engine names; also makes room for a potential 'Scumm' namespace)

svn-id: r10549
This commit is contained in:
Max Horn 2003-10-02 22:42:03 +00:00
parent 68810ac106
commit 3f55f2669d
57 changed files with 1008 additions and 1008 deletions

View file

@ -33,9 +33,9 @@
#include "sound/mixer.h"
#define OPCODE(x) { &Scumm_v8::x, #x }
#define OPCODE(x) { &ScummEngine_v8::x, #x }
void Scumm_v8::setupOpcodes() {
void ScummEngine_v8::setupOpcodes() {
static const OpcodeEntryV8 opcodes[256] = {
/* 00 */
OPCODE(o6_invalid),
@ -362,17 +362,17 @@ void Scumm_v8::setupOpcodes() {
_opcodesV8 = opcodes;
}
void Scumm_v8::executeOpcode(byte i) {
void ScummEngine_v8::executeOpcode(byte i) {
OpcodeProcV8 op = _opcodesV8[i].proc;
(this->*op) ();
}
const char *Scumm_v8::getOpcodeDesc(byte i) {
const char *ScummEngine_v8::getOpcodeDesc(byte i) {
return _opcodesV8[i].desc;
}
// In V8, the word size is 4 byte, not 2 bytes as in V6/V7 games
uint Scumm_v8::fetchScriptWord() {
uint ScummEngine_v8::fetchScriptWord() {
int a;
if (*_lastCodePtr + sizeof(MemBlkHeader) != _scriptOrgPointer) {
uint32 oldoffs = _scriptPointer - _scriptOrgPointer;
@ -384,11 +384,11 @@ uint Scumm_v8::fetchScriptWord() {
return a;
}
int Scumm_v8::fetchScriptWordSigned() {
int ScummEngine_v8::fetchScriptWordSigned() {
return (int32)fetchScriptWord();
}
int Scumm_v8::readVar(uint var) {
int ScummEngine_v8::readVar(uint var) {
debug(9, "readvar(%d)", var);
if (!(var & 0xF0000000)) {
@ -412,7 +412,7 @@ int Scumm_v8::readVar(uint var) {
return -1;
}
void Scumm_v8::writeVar(uint var, int value) {
void ScummEngine_v8::writeVar(uint var, int value) {
debug(9, "writeVar(%d, %d)", var, value);
if (!(var & 0xF0000000)) {
@ -450,7 +450,7 @@ void Scumm_v8::writeVar(uint var, int value) {
error("Illegal varbits (w)");
}
void Scumm_v8::decodeParseString(int m, int n) {
void ScummEngine_v8::decodeParseString(int m, int n) {
byte b;
b = fetchScriptByte();
@ -531,12 +531,12 @@ void Scumm_v8::decodeParseString(int m, int n) {
}
}
void Scumm_v8::o8_mod() {
void ScummEngine_v8::o8_mod() {
int a = pop();
push(pop() % a);
}
void Scumm_v8::o8_wait() {
void ScummEngine_v8::o8_wait() {
int actnum;
int offs = -2;
Actor *a;
@ -589,7 +589,7 @@ void Scumm_v8::o8_wait() {
o6_breakHere();
}
void Scumm_v8::o8_dim() {
void ScummEngine_v8::o8_dim() {
byte subOp = fetchScriptByte();
int array = fetchScriptWord();
@ -608,7 +608,7 @@ void Scumm_v8::o8_dim() {
}
}
void Scumm_v8::o8_dim2() {
void ScummEngine_v8::o8_dim2() {
byte subOp = fetchScriptByte();
int array = fetchScriptWord(), a, b;
@ -631,7 +631,7 @@ void Scumm_v8::o8_dim2() {
}
}
void Scumm_v8::o8_arrayOps() {
void ScummEngine_v8::o8_arrayOps() {
byte subOp = fetchScriptByte();
int array = fetchScriptWord();
int b, c, d, len;
@ -673,12 +673,12 @@ void Scumm_v8::o8_arrayOps() {
}
}
void Scumm_v8::o8_blastText() {
void ScummEngine_v8::o8_blastText() {
// FIXME
decodeParseString(5, 0);
}
void Scumm_v8::o8_cursorCommand() {
void ScummEngine_v8::o8_cursorCommand() {
byte subOp = fetchScriptByte();
int a, i;
int args[16];
@ -757,7 +757,7 @@ void Scumm_v8::o8_cursorCommand() {
VAR(VAR_USERPUT) = _userPut;
}
void Scumm_v8::o8_createBoxMatrix() {
void ScummEngine_v8::o8_createBoxMatrix() {
int i;
Actor *a;
@ -770,7 +770,7 @@ void Scumm_v8::o8_createBoxMatrix() {
}
}
void Scumm_v8::o8_resourceRoutines() {
void ScummEngine_v8::o8_resourceRoutines() {
byte subOp = fetchScriptByte();
int resid = pop();
@ -838,7 +838,7 @@ void Scumm_v8::o8_resourceRoutines() {
}
}
void Scumm_v8::o8_roomOps() {
void ScummEngine_v8::o8_roomOps() {
byte subOp = fetchScriptByte();
int a, b, c, d, e;
@ -912,7 +912,7 @@ void Scumm_v8::o8_roomOps() {
}
}
void Scumm_v8::o8_actorOps() {
void ScummEngine_v8::o8_actorOps() {
byte subOp = fetchScriptByte();
Actor *a;
int i, j;
@ -1085,7 +1085,7 @@ void Scumm_v8::o8_actorOps() {
}
}
void Scumm_v8::o8_cameraOps() {
void ScummEngine_v8::o8_cameraOps() {
// TODO
byte subOp = fetchScriptByte();
switch (subOp) {
@ -1100,7 +1100,7 @@ void Scumm_v8::o8_cameraOps() {
}
}
void Scumm_v8::o8_verbOps() {
void ScummEngine_v8::o8_verbOps() {
byte subOp = fetchScriptByte();
VerbSlot *vs = NULL;
int slot, a, b;
@ -1218,7 +1218,7 @@ void Scumm_v8::o8_verbOps() {
}
}
void Scumm_v8::o8_system() {
void ScummEngine_v8::o8_system() {
byte subOp = fetchScriptByte();
switch (subOp) {
case 0x28: // SO_SYSTEM_RESTART Restart game
@ -1233,7 +1233,7 @@ void Scumm_v8::o8_system() {
}
void Scumm_v8::o8_startVideo() {
void ScummEngine_v8::o8_startVideo() {
int len = resStrLen(_scriptPointer);
debug(4, "o8_startVideo(%s/%s)", getGameDataPath(), (const char*)_scriptPointer);
@ -1245,7 +1245,7 @@ void Scumm_v8::o8_startVideo() {
_scriptPointer += len + 1;
}
void Scumm_v8::o8_kernelSetFunctions() {
void ScummEngine_v8::o8_kernelSetFunctions() {
// TODO
Actor *a;
int args[30];
@ -1387,7 +1387,7 @@ void Scumm_v8::o8_kernelSetFunctions() {
}
}
void Scumm_v8::o8_kernelGetFunctions() {
void ScummEngine_v8::o8_kernelGetFunctions() {
// TODO
int args[30];
int len = getStackList(args, ARRAYSIZE(args));
@ -1510,7 +1510,7 @@ void Scumm_v8::o8_kernelGetFunctions() {
}
void Scumm_v8::o8_getActorChore() {
void ScummEngine_v8::o8_getActorChore() {
int actnum = pop();
Actor *a = derefActor(actnum, "o8_getActorChore");
@ -1524,7 +1524,7 @@ void Scumm_v8::o8_getActorChore() {
push(a->frame);
}
void Scumm_v8::o8_getActorZPlane() {
void ScummEngine_v8::o8_getActorZPlane() {
int actnum = pop();
Actor *a = derefActor(actnum, "o8_getActorZPlane");
@ -1539,27 +1539,27 @@ void Scumm_v8::o8_getActorZPlane() {
}
void Scumm_v8::o8_getObjectImageX() {
void ScummEngine_v8::o8_getObjectImageX() {
int i = getObjectIndex(pop());
push(_objs[i].x_pos);
}
void Scumm_v8::o8_getObjectImageY() {
void ScummEngine_v8::o8_getObjectImageY() {
int i = getObjectIndex(pop());
push(_objs[i].y_pos);
}
void Scumm_v8::o8_getObjectImageWidth() {
void ScummEngine_v8::o8_getObjectImageWidth() {
int i = getObjectIndex(pop());
push(_objs[i].width);
}
void Scumm_v8::o8_getObjectImageHeight() {
void ScummEngine_v8::o8_getObjectImageHeight() {
int i = getObjectIndex(pop());
push(_objs[i].height);
}
void Scumm_v8::o8_getStringWidth() {
void ScummEngine_v8::o8_getStringWidth() {
int charset = pop();
int oldID = _charset->getCurID();
int width;
@ -1584,7 +1584,7 @@ void Scumm_v8::o8_getStringWidth() {
push(width);
}
void Scumm_v8::o8_drawObject() {
void ScummEngine_v8::o8_drawObject() {
int state = pop(), y = pop(), x = pop(), obj = pop(), objnum = getObjectIndex(obj);
ObjectData *od;