Add missing code for opcode
svn-id: r15391
This commit is contained in:
parent
a34efa68c2
commit
3aadf745f9
4 changed files with 37 additions and 9 deletions
|
@ -773,7 +773,7 @@ protected:
|
|||
void o72_unknownF4();
|
||||
void o72_unknownF5();
|
||||
void o72_unknownF6();
|
||||
void o72_unknownF8();
|
||||
void o72_getResourceSize();
|
||||
void o72_setFilePath();
|
||||
void o72_unknownFA();
|
||||
};
|
||||
|
|
|
@ -355,7 +355,7 @@ void ScummEngine_v72he::setupOpcodes() {
|
|||
OPCODE(o72_unknownF6),
|
||||
OPCODE(o6_invalid),
|
||||
/* F8 */
|
||||
OPCODE(o72_unknownF8),
|
||||
OPCODE(o72_getResourceSize),
|
||||
OPCODE(o72_setFilePath),
|
||||
OPCODE(o72_unknownFA),
|
||||
OPCODE(o70_polygonOps),
|
||||
|
@ -2411,12 +2411,40 @@ void ScummEngine_v72he::o72_unknownF6() {
|
|||
debug(1,"stub o72_unknownF6");
|
||||
}
|
||||
|
||||
void ScummEngine_v72he::o72_unknownF8() {
|
||||
int id = pop();
|
||||
byte subOp = fetchScriptByte();
|
||||
push(10);
|
||||
void ScummEngine_v72he::o72_getResourceSize() {
|
||||
int size, type;
|
||||
|
||||
debug(1,"stub o72_unknownF8: subOp %d, id %d", subOp, id);
|
||||
int idx = pop();
|
||||
byte subOp = fetchScriptByte();
|
||||
|
||||
switch (subOp) {
|
||||
case 13:
|
||||
if (idx > _numSounds) {
|
||||
// TODO Music resource size
|
||||
push(100);
|
||||
return;
|
||||
}
|
||||
type = rtSound;
|
||||
break;
|
||||
case 14:
|
||||
type = rtRoomImage;
|
||||
break;
|
||||
case 15:
|
||||
type = rtImage;
|
||||
break;
|
||||
case 16:
|
||||
type = rtCostume;
|
||||
break;
|
||||
case 17:
|
||||
type = rtScript;
|
||||
break;
|
||||
default:
|
||||
error("o72_getResourceSize: default type %d", subOp);
|
||||
}
|
||||
|
||||
const byte *ptr = getResourceAddress(type, idx);
|
||||
size = READ_BE_UINT32(ptr + 4) - 8;
|
||||
push(size);
|
||||
}
|
||||
|
||||
void ScummEngine_v72he::o72_setFilePath() {
|
||||
|
|
|
@ -354,7 +354,7 @@ void ScummEngine_v80he::setupOpcodes() {
|
|||
OPCODE(o72_unknownF6),
|
||||
OPCODE(o6_invalid),
|
||||
/* F8 */
|
||||
OPCODE(o72_unknownF8),
|
||||
OPCODE(o72_getResourceSize),
|
||||
OPCODE(o72_setFilePath),
|
||||
OPCODE(o72_unknownFA),
|
||||
OPCODE(o70_polygonOps),
|
||||
|
|
|
@ -354,7 +354,7 @@ void ScummEngine_v90he::setupOpcodes() {
|
|||
OPCODE(o72_unknownF6),
|
||||
OPCODE(o6_invalid),
|
||||
/* F8 */
|
||||
OPCODE(o72_unknownF8),
|
||||
OPCODE(o72_getResourceSize),
|
||||
OPCODE(o72_setFilePath),
|
||||
OPCODE(o72_unknownFA),
|
||||
OPCODE(o70_polygonOps),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue