diff options
author | Strangerke | 2014-06-12 21:05:19 +0200 |
---|---|---|
committer | Strangerke | 2014-06-12 21:05:19 +0200 |
commit | dfc94267d568a8e7b261961417fdf5716717cbd0 (patch) | |
tree | 5c06bc3c9ed9b37539e44ed2db02bf6dbb6edc54 | |
parent | 207f3c8be22b03b8f33e1f92a9010613747a5d03 (diff) | |
download | scummvm-rg350-dfc94267d568a8e7b261961417fdf5716717cbd0.tar.gz scummvm-rg350-dfc94267d568a8e7b261961417fdf5716717cbd0.tar.bz2 scummvm-rg350-dfc94267d568a8e7b261961417fdf5716717cbd0.zip |
CGE2: Get somewhat better values
-rw-r--r-- | engines/cge2/cge2_main.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index 2809de16e2..032c73cb2a 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -705,16 +705,28 @@ void CGE2Engine::loadTab() { if (_resman->exist(kTabName)) { EncryptedStream f(this, kTabName); for (int i = 0; i < kCaveMax; i++) { - int16 varI = f.readSint16LE(); - int16 varF = f.readUint16LE(); + int16 varI = f.readSint16BE(); + int16 varF = f.readUint16BE(); + if (varF & 0x8000) { + varI = -varI; + varF &= 0x7FFF; + } _eyeTab[i]->_x = FXP(varI, varF); - varI = f.readSint16LE(); - varF = f.readUint16LE(); + varI = f.readSint16BE(); + varF = f.readUint16BE(); + if (varF & 0x8000) { + varI = -varI; + varF &= 0x7FFF; + } _eyeTab[i]->_y = FXP(varI, varF); - varI = f.readSint16LE(); - varF = f.readUint16LE(); + varI = f.readSint16BE(); + varF = f.readUint16BE(); + if (varF & 0x8000) { + varI = -varI; + varF &= 0x7FFF; + } _eyeTab[i]->_z = FXP(varI, varF); } } |