[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.285,2.286 script_v72he.cpp,2.147,2.148 script_v80he.cpp,2.44,2.45 script_v90he.cpp,2.72,2.73
Travis Howell
kirben at users.sourceforge.net
Sun Oct 3 08:25:06 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1503/scumm
Modified Files:
intern.h script_v72he.cpp script_v80he.cpp script_v90he.cpp
Log Message:
Add missing code for opcode
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.285
retrieving revision 2.286
diff -u -d -r2.285 -r2.286
--- intern.h 3 Oct 2004 06:07:25 -0000 2.285
+++ intern.h 3 Oct 2004 14:13:04 -0000 2.286
@@ -773,7 +773,7 @@
void o72_unknownF4();
void o72_unknownF5();
void o72_unknownF6();
- void o72_unknownF8();
+ void o72_getResourceSize();
void o72_setFilePath();
void o72_unknownFA();
};
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.147
retrieving revision 2.148
diff -u -d -r2.147 -r2.148
--- script_v72he.cpp 3 Oct 2004 06:23:03 -0000 2.147
+++ script_v72he.cpp 3 Oct 2004 14:13:04 -0000 2.148
@@ -355,7 +355,7 @@
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 @@
debug(1,"stub o72_unknownF6");
}
-void ScummEngine_v72he::o72_unknownF8() {
- int id = pop();
+void ScummEngine_v72he::o72_getResourceSize() {
+ int size, type;
+
+ int idx = pop();
byte subOp = fetchScriptByte();
- push(10);
- debug(1,"stub o72_unknownF8: subOp %d, id %d", subOp, id);
+ 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() {
Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.44
retrieving revision 2.45
diff -u -d -r2.44 -r2.45
--- script_v80he.cpp 2 Oct 2004 00:12:09 -0000 2.44
+++ script_v80he.cpp 3 Oct 2004 14:13:05 -0000 2.45
@@ -354,7 +354,7 @@
OPCODE(o72_unknownF6),
OPCODE(o6_invalid),
/* F8 */
- OPCODE(o72_unknownF8),
+ OPCODE(o72_getResourceSize),
OPCODE(o72_setFilePath),
OPCODE(o72_unknownFA),
OPCODE(o70_polygonOps),
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.72
retrieving revision 2.73
diff -u -d -r2.72 -r2.73
--- script_v90he.cpp 3 Oct 2004 06:07:25 -0000 2.72
+++ script_v90he.cpp 3 Oct 2004 14:13:05 -0000 2.73
@@ -354,7 +354,7 @@
OPCODE(o72_unknownF6),
OPCODE(o6_invalid),
/* F8 */
- OPCODE(o72_unknownF8),
+ OPCODE(o72_getResourceSize),
OPCODE(o72_setFilePath),
OPCODE(o72_unknownFA),
OPCODE(o70_polygonOps),
More information about the Scummvm-git-logs
mailing list