Another He 7.2 function

svn-id: r14719
This commit is contained in:
Travis Howell 2004-08-23 14:03:54 +00:00
parent 42fb68694d
commit 25ccf3a0ee
4 changed files with 42 additions and 2 deletions

View File

@ -665,6 +665,7 @@ protected:
void o72_dimArray();
void o72_dim2dimArray();
void o72_jumpToScript();
void o72_drawObject();
void o72_stringLen();
void o72_readINI();
void o72_unknownF4();

View File

@ -597,7 +597,7 @@ void ScummEngine_v6::o6_pushWord() {
}
void ScummEngine_v6::o6_pushByteVar() {
push(readVar(fetchScriptByte()));
push(readVar(fetchScriptWord()));
}
void ScummEngine_v6::o6_pushWordVar() {

View File

@ -559,6 +559,45 @@ void ScummEngine_v72he::o72_jumpToScript() {
runScript(script, (flags == 199 || flags == 200), (flags == 195 || flags == 200), args);
}
void ScummEngine_v72he::o72_drawObject() {
int subOp = fetchScriptByte();
int state = 0, y = -1, x = -1;
switch (subOp) {
case 62:
state = pop();
y = pop();
x = pop();
break;
case 63:
state = pop();
if (state == 0)
state = 1;
break;
case 65:
state = 1;
y = pop();
x = pop();
default:
warning("o72_drawObject: default case %d", subOp);
}
int object = pop();
int objnum = getObjectIndex(object);
if (objnum == -1)
return;
if (y != -1 && x != -1) {
_objs[objnum].x_pos = x * 8;
_objs[objnum].y_pos = y * 8;
}
if (state != -1) {
addObjectToDrawQue(objnum);
putState(object, state);
}
}
void ScummEngine_v72he::o72_stringLen() {
int a, len;
byte *addr;

View File

@ -511,7 +511,7 @@ void ScummEngine_v7he::o7_startSound() {
break;
default:
break;
error("o7_startSound invalid case %d", op);
}
}