diff options
author | Paul Gilbert | 2013-09-15 19:23:45 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-09-15 19:23:45 -0400 |
commit | 829e281546338db9c12f55d4744c9a260df96f55 (patch) | |
tree | 365afb8c15ca56dd3f4e9f659288ae447d1c868f | |
parent | 2fc1f7eddae6fd1573e0ababce58b94414d70047 (diff) | |
download | scummvm-rg350-829e281546338db9c12f55d4744c9a260df96f55.tar.gz scummvm-rg350-829e281546338db9c12f55d4744c9a260df96f55.tar.bz2 scummvm-rg350-829e281546338db9c12f55d4744c9a260df96f55.zip |
TSAGE: Fix for R2R balloon calculation
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes2.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp index eabf330f0d..81c936dce1 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp @@ -4790,8 +4790,10 @@ void Scene2900::Map::redraw(Rect *updateRect) { } void Scene2900::Map::synchronize(Serializer &s) { - s.syncAsUint16LE(_mapWidth); - s.syncAsUint16LE(_mapHeight); + s.syncAsUint16LE(_resNum); + if (s.isLoading()) + load(_resNum); + s.syncAsSint16LE(_xV); s.syncAsSint16LE(_yV); _bounds.synchronize(s); @@ -5088,10 +5090,10 @@ void Scene2900::dispatch() { } else { _field416 = true; _altitudeChanging = false; - _field41C += R2_GLOBALS._balloonAltitude / 48; - _field426 = 100 - (_field41C * 25); + _field426 = 100 - ((R2_GLOBALS._balloonAltitude / 48) + _field41C) * 25; } + // Zooming/altitude balloon change if (_field425 == _field426) { _field416 = false; } else { @@ -5138,6 +5140,7 @@ void Scene2900::dispatch() { R2_GLOBALS._player.setPosition(_balloonScreenPos); if ((_balloonLocation.x % 100) == 50 && (_balloonLocation.y % 100) == 50 && !_field416) { + // At an altitude change point, so calculate new altitude _newAltitude = R2_GLOBALS._balloonAltitude; if (_altitudeChanging) { _newAltitude += _altitudeMajorChange * 48; @@ -5159,9 +5162,10 @@ void Scene2900::dispatch() { if (balloonData[R2_GLOBALS._balloonAltitude].v3 > 0) { _newAltitude += 48; } else if (balloonData[R2_GLOBALS._balloonAltitude].v3 < 0) { - _newAltitude += 208; + _newAltitude -= 48; } + assert(_newAltitude < 193); R2_GLOBALS._balloonAltitude = _newAltitude; if (R2_GLOBALS._balloonAltitude == 189) { // Finally reached landing point |