diff options
author | Max Horn | 2002-12-28 01:57:19 +0000 |
---|---|---|
committer | Max Horn | 2002-12-28 01:57:19 +0000 |
commit | ae5b30df3d67644f341a30997de5192fed8bcbdc (patch) | |
tree | db63a860f15229ec901e9b6d0bedaaf9f6f2435f /common | |
parent | 319facc9c3a54bff3adab663e32f37bddb07c9e9 (diff) | |
download | scummvm-rg350-ae5b30df3d67644f341a30997de5192fed8bcbdc.tar.gz scummvm-rg350-ae5b30df3d67644f341a30997de5192fed8bcbdc.tar.bz2 scummvm-rg350-ae5b30df3d67644f341a30997de5192fed8bcbdc.zip |
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
svn-id: r6215
Diffstat (limited to 'common')
-rw-r--r-- | common/util.cpp | 25 | ||||
-rw-r--r-- | common/util.h | 4 |
2 files changed, 0 insertions, 29 deletions
diff --git a/common/util.cpp b/common/util.cpp index 2423cd0af0..ef0e2fb7a0 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -133,31 +133,6 @@ void hexdump(const byte * data, int len) 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; diff --git a/common/util.h b/common/util.h index 3be8c556e0..ee03684410 100644 --- a/common/util.h +++ b/common/util.h @@ -47,10 +47,6 @@ void ClearBlendCache(byte *palette, int weight); */ void hexdump(const byte * data, int len); -// Resource string length -int resStrLen(const char *src); - - class RandomSource { private: uint32 _randSeed; |