[Scummvm-cvs-logs] CVS: scummvm/common util.cpp,1.6,1.7 util.h,1.9,1.10
Max Horn
fingolfin at users.sourceforge.net
Fri Dec 27 17:58:02 CET 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.45,1.46 akos.cpp,1.31,1.32 object.cpp,1.36,1.37 script_v8.cpp,2.71,2.72
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.44,1.45 script.cpp,1.33,1.34 script_v5.cpp,1.10,1.11 script_v6.cpp,1.29,1.30 script_v8.cpp,2.72,2.73 scumm.h,1.117,1.118 string.cpp,1.70,1.71
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv15559/common
Modified Files:
util.cpp util.h
Log Message:
get rid of getStringLen and use the more powerful resStrLen instead; moved resStrLen from common/ to scumm/, where it belongs; enhanced resStrLen to suport V8; fixed translateText to support embeded vars (in strings I mean) - it may still not be fully correct but at least is better now; rewrote o6_arrayOps to parallel the V8 version - needs testing
Index: util.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/util.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- util.cpp 1 Dec 2002 14:57:49 -0000 1.6
+++ util.cpp 28 Dec 2002 01:57:17 -0000 1.7
@@ -133,31 +133,6 @@
printf("|\n");
}
-//
-// Given a pointer to a Scumm resource, this function returns the length
-// of the (string) data in that resource. To do so it understands certain
-// special chars starting with FF. The reason for this function is that
-// sometimes resource data will contain 0 bytes, thus we can't just use strlen.
-//
-int resStrLen(const char *src)
-{
- int num = 0;
- byte chr;
- while ((chr = *src++) != 0) {
- num++;
- if (chr == 255) {
- chr = *src++;
- num++;
-
- if (chr != 1 && chr != 2 && chr != 3 && chr != 8) {
- src += 2;
- num += 2;
- }
- }
- }
- return num;
-}
-
RandomSource::RandomSource(uint32 seed)
{
_randSeed = seed;
Index: util.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/util.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- util.h 13 Dec 2002 16:15:53 -0000 1.9
+++ util.h 28 Dec 2002 01:57:17 -0000 1.10
@@ -47,10 +47,6 @@
*/
void hexdump(const byte * data, int len);
-// Resource string length
-int resStrLen(const char *src);
-
-
class RandomSource {
private:
uint32 _randSeed;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.45,1.46 akos.cpp,1.31,1.32 object.cpp,1.36,1.37 script_v8.cpp,2.71,2.72
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.44,1.45 script.cpp,1.33,1.34 script_v5.cpp,1.10,1.11 script_v6.cpp,1.29,1.30 script_v8.cpp,2.72,2.73 scumm.h,1.117,1.118 string.cpp,1.70,1.71
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list