diff options
author | Max Horn | 2006-10-19 00:26:55 +0000 |
---|---|---|
committer | Max Horn | 2006-10-19 00:26:55 +0000 |
commit | a0b9f78bd374c1844472c4b8de1b721c2745bc44 (patch) | |
tree | d2e198a0461c87a744a850c8c43775dd65b0d762 /engines/scumm/script_v5.cpp | |
parent | 5148dbb3fb30303a562cd36e87d3ac805c69673e (diff) | |
download | scummvm-rg350-a0b9f78bd374c1844472c4b8de1b721c2745bc44.tar.gz scummvm-rg350-a0b9f78bd374c1844472c4b8de1b721c2745bc44.tar.bz2 scummvm-rg350-a0b9f78bd374c1844472c4b8de1b721c2745bc44.zip |
SCUMM: Introduced V12_X_MULTIPLIER and V12_Y_MULTIPLIER to make it a bit easier to find spots where we convert between C64-style coordinates and pixel coordinates (but beware, this probably doesnt't cover all relevant instances)
svn-id: r24384
Diffstat (limited to 'engines/scumm/script_v5.cpp')
-rw-r--r-- | engines/scumm/script_v5.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index b9389f226c..41f963faf3 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -1980,9 +1980,12 @@ void ScummEngine_v5::o5_roomOps() { int len = 256, cnt = 0; ptr = (byte *)malloc(len); while (ptr) { - int r = file->read(ptr + cnt, len - cnt); - if ((cnt += r) < len) break; - ptr = (byte *)realloc(ptr, len *= 2); + int r = file->read(ptr + cnt, len - cnt); + cnt += r; + if (cnt < len) + break; + len *= 2; + ptr = (byte *)realloc(ptr, len); } ptr[cnt] = '\0'; loadPtrToResource(rtString, a, ptr); @@ -2615,7 +2618,7 @@ void ScummEngine_v5::o5_walkActorToActor() { return; if (_game.version <= 2) - dist *= 8; + dist *= V12_X_MULTIPLIER; else if (dist == 0xFF) { dist = a->_scalex * a->_width / 0xFF; dist += (a2->_scalex * a2->_width / 0xFF) / 2; |