diff options
author | Paul Gilbert | 2017-04-01 17:36:10 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-04-01 17:36:10 -0400 |
commit | 8f54c55e903f5e5306e45f153241e9260fb8fe49 (patch) | |
tree | 9223f54f6d3ce2ed18e81419d376a821c75c9d88 /engines/titanic/star_control/star_control_sub13.cpp | |
parent | 03ed82ccd4b03aba3b9188fb562bf551e0b0e07e (diff) | |
download | scummvm-rg350-8f54c55e903f5e5306e45f153241e9260fb8fe49.tar.gz scummvm-rg350-8f54c55e903f5e5306e45f153241e9260fb8fe49.tar.bz2 scummvm-rg350-8f54c55e903f5e5306e45f153241e9260fb8fe49.zip |
TITANIC: Fix CStarControlSub13 loading/saving width & height
Diffstat (limited to 'engines/titanic/star_control/star_control_sub13.cpp')
-rw-r--r-- | engines/titanic/star_control/star_control_sub13.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/titanic/star_control/star_control_sub13.cpp b/engines/titanic/star_control/star_control_sub13.cpp index 1e9cffb55b..e6e46d92ca 100644 --- a/engines/titanic/star_control/star_control_sub13.cpp +++ b/engines/titanic/star_control/star_control_sub13.cpp @@ -77,8 +77,8 @@ void CStarControlSub13::load(SimpleFile *file, int param) { _field1C = file->readFloat(); int widthHeight = file->readNumber(); - _width = widthHeight & 0xff; - _height = _width >> 16; + _width = widthHeight & 0xffff; + _height = widthHeight >> 16; _field24 = file->readNumber(); for (int idx = 0; idx < 5; ++idx) @@ -97,7 +97,7 @@ void CStarControlSub13::save(SimpleFile *file, int indent) { file->writeFloatLine(_field14, indent); file->writeFloatLine(_field18, indent); file->writeFloatLine(_field1C, indent); - file->writeFloatLine(_width | (_height << 16), indent); + file->writeNumberLine(_width | (_height << 16), indent); for (int idx = 0; idx < 5; ++idx) file->writeFloatLine(_valArray[idx], indent); @@ -250,9 +250,7 @@ void CStarControlSub13::reset() { const double FACTOR = 2 * M_PI / 360.0; _sub2.copyFrom(_matrix); - _sub2._vector._x = _position._x; - _sub2._vector._y = _position._y; - _sub2._vector._z = _position._z; + _sub2._vector = _position; _sub2.fn4(&_sub1); double widthV = (double)_width * 0.5; |