diff options
author | Max Horn | 2009-04-07 13:20:29 +0000 |
---|---|---|
committer | Max Horn | 2009-04-07 13:20:29 +0000 |
commit | 37bfe22a54a6f4b48ac9e26935e8e2586f1b4a91 (patch) | |
tree | 92cdbcdc01109748ed9db7209a441a24d0f1e584 /engines/gob/parse.cpp | |
parent | 7444665152c24f0ad473baf8a4db4f1f9130e59b (diff) | |
download | scummvm-rg350-37bfe22a54a6f4b48ac9e26935e8e2586f1b4a91.tar.gz scummvm-rg350-37bfe22a54a6f4b48ac9e26935e8e2586f1b4a91.tar.bz2 scummvm-rg350-37bfe22a54a6f4b48ac9e26935e8e2586f1b4a91.zip |
GOB: Some more code cleanup. My respect for the developers of the original GOB engine is at an all-time low :)
svn-id: r39888
Diffstat (limited to 'engines/gob/parse.cpp')
-rw-r--r-- | engines/gob/parse.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/gob/parse.cpp b/engines/gob/parse.cpp index adff890507..3dfcc0bb47 100644 --- a/engines/gob/parse.cpp +++ b/engines/gob/parse.cpp @@ -456,4 +456,21 @@ void Parse::printVarIndex() { return; } +int Parse::cmpHelper(byte *operPtr, int32 *valPtr) { + byte var_C = operPtr[-3]; + int cmpTemp; + if (var_C == 20) { + cmpTemp = (int)valPtr[-3] - (int)valPtr[-1]; + } else if (var_C == 22) { + if ((char *)decodePtr(valPtr[-3]) != _vm->_global->_inter_resStr) { + strcpy(_vm->_global->_inter_resStr, (char *)decodePtr(valPtr[-3])); + valPtr[-3] = encodePtr((byte *) _vm->_global->_inter_resStr, kResStr); + } + cmpTemp = strcmp(_vm->_global->_inter_resStr, (char *)decodePtr(valPtr[-1])); + } + + return cmpTemp; +} + + } // End of namespace Gob |