[Scummvm-cvs-logs] CVS: scummvm/scumm script_v100he.cpp,2.128,2.129 script_v72he.cpp,2.264,2.265 script_v80he.cpp,2.96,2.97
kirben
kirben at users.sourceforge.net
Mon Apr 18 04:20:52 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.113,1.114 actor.h,1.60,1.61 interface.cpp,1.73,1.74 sfuncs.cpp,1.100,1.101 sprite.cpp,1.45,1.46 sprite.h,1.16,1.17
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.445,2.446 resource_v7he.cpp,1.33,1.34 script_v100he.cpp,2.129,2.130 script_v72he.cpp,2.265,2.266 script_v80he.cpp,2.97,2.98
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11536/scumm
Modified Files:
script_v100he.cpp script_v72he.cpp script_v80he.cpp
Log Message:
Sound size should only include sound data.
Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.128
retrieving revision 2.129
diff -u -d -r2.128 -r2.129
--- script_v100he.cpp 18 Apr 2005 07:18:32 -0000 2.128
+++ script_v100he.cpp 18 Apr 2005 11:19:54 -0000 2.129
@@ -2191,6 +2191,7 @@
}
void ScummEngine_v100he::o100_getResourceSize() {
+ const byte *ptr;
int size, type;
int resid = pop();
@@ -2214,15 +2215,18 @@
int offs;
_sound->getHEMusicDetails(resid, offs, size);
push(size);
- return;
+ } else {
+ ptr = getResourceAddress(rtSound, resid);
+ assert(ptr);
+ size = READ_BE_UINT32(ptr + 4) - 40;
+ push(size);
}
- type = rtSound;
- break;
+ return;
default:
error("o100_getResourceSize: default type %d", subOp);
}
- const byte *ptr = getResourceAddress(type, resid);
+ ptr = getResourceAddress(type, resid);
assert(ptr);
size = READ_BE_UINT32(ptr + 4) - 8;
push(size);
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.264
retrieving revision 2.265
diff -u -d -r2.264 -r2.265
--- script_v72he.cpp 18 Apr 2005 07:18:32 -0000 2.264
+++ script_v72he.cpp 18 Apr 2005 11:19:54 -0000 2.265
@@ -2163,13 +2163,12 @@
int offs;
_sound->getHEMusicDetails(resid, offs, size);
push(size);
- return;
+ } else {
+ const byte *ptr = getResourceAddress(rtSound, resid);
+ assert(ptr);
+ size = READ_BE_UINT32(ptr + 4) - 40;
+ push(size);
}
-
- const byte *ptr = getResourceAddress(rtSound, resid);
- assert(ptr);
- size = getResourceDataSize(ptr);
- push(size);
}
void ScummEngine_v72he::o72_setFilePath() {
Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.96
retrieving revision 2.97
diff -u -d -r2.96 -r2.97
--- script_v80he.cpp 18 Apr 2005 07:18:32 -0000 2.96
+++ script_v80he.cpp 18 Apr 2005 11:19:54 -0000 2.97
@@ -806,6 +806,7 @@
}
void ScummEngine_v80he::o80_getResourceSize() {
+ const byte *ptr;
int size, type;
int resid = pop();
@@ -817,10 +818,13 @@
int offs;
_sound->getHEMusicDetails(resid, offs, size);
push(size);
- return;
+ } else {
+ ptr = getResourceAddress(rtSound, resid);
+ assert(ptr);
+ size = READ_BE_UINT32(ptr + 4) - 40;
+ push(size);
}
- type = rtSound;
- break;
+ return;
case 14:
type = rtRoomImage;
break;
@@ -837,14 +841,9 @@
error("o80_getResourceSize: default type %d", subOp);
}
- const byte *ptr = getResourceAddress(type, resid);
- if (ptr) {
- size = getResourceDataSize(ptr);
- } else {
- debug(0, "o80_getResourceSize: invalid resource type %d id %d", type, resid);
- size = 0;
- }
-
+ ptr = getResourceAddress(type, resid);
+ assert(ptr);
+ size = READ_BE_UINT32(ptr + 4) - 8;
push(size);
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.113,1.114 actor.h,1.60,1.61 interface.cpp,1.73,1.74 sfuncs.cpp,1.100,1.101 sprite.cpp,1.45,1.46 sprite.h,1.16,1.17
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.445,2.446 resource_v7he.cpp,1.33,1.34 script_v100he.cpp,2.129,2.130 script_v72he.cpp,2.265,2.266 script_v80he.cpp,2.97,2.98
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list