summaryrefslogtreecommitdiffstats
path: root/src/save/GenericGameStorage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/save/GenericGameStorage.cpp')
-rw-r--r--src/save/GenericGameStorage.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp
index 29f666df..bb074042 100644
--- a/src/save/GenericGameStorage.cpp
+++ b/src/save/GenericGameStorage.cpp
@@ -3,6 +3,7 @@
#include "crossplatform.h"
#include "main.h"
+#include "DMAudio.h"
#include "AudioScriptObject.h"
#include "Camera.h"
#include "CarGen.h"
@@ -163,7 +164,7 @@ GenericSave(int file)
WriteDataToBufferPointer(buf, CompileDateAndTime.m_nMonth);
WriteDataToBufferPointer(buf, CompileDateAndTime.m_nYear);
WriteDataToBufferPointer(buf, CWeather::WeatherTypeInList);
-#ifdef FIX_BUGS
+#ifdef COMPATIBLE_SAVES
// converted to float for compatibility with original format
// TODO: maybe remove this? not really gonna break anything vital
float f = TheCamera.CarZoomIndicator;
@@ -254,9 +255,9 @@ GenericLoad()
buf = (work_buff + 0x40);
ReadDataFromBufferPointer(buf, saveSize);
ReadDataFromBufferPointer(buf, CGame::currLevel);
- ReadDataFromBufferPointer(buf, TheCamera.GetPosition().x);
- ReadDataFromBufferPointer(buf, TheCamera.GetPosition().y);
- ReadDataFromBufferPointer(buf, TheCamera.GetPosition().z);
+ ReadDataFromBufferPointer(buf, TheCamera.GetMatrix().GetPosition().x);
+ ReadDataFromBufferPointer(buf, TheCamera.GetMatrix().GetPosition().y);
+ ReadDataFromBufferPointer(buf, TheCamera.GetMatrix().GetPosition().z);
ReadDataFromBufferPointer(buf, CClock::ms_nMillisecondsPerGameMinute);
ReadDataFromBufferPointer(buf, CClock::ms_nLastClockTick);
ReadDataFromBufferPointer(buf, CClock::ms_nGameClockHours);
@@ -282,7 +283,7 @@ GenericLoad()
ReadDataFromBufferPointer(buf, CompileDateAndTime.m_nMonth);
ReadDataFromBufferPointer(buf, CompileDateAndTime.m_nYear);
ReadDataFromBufferPointer(buf, CWeather::WeatherTypeInList);
-#ifdef FIX_BUGS
+#ifdef COMPATIBLE_SAVES
// converted to float for compatibility with original format
// TODO: maybe remove this? not really gonna break anything vital
float f;
@@ -537,9 +538,9 @@ RestoreForStartLoad()
} else {
uint8 *_buf = buf + sizeof(int32) + sizeof(wchar[24]) + sizeof(SYSTEMTIME) + sizeof(SIZE_OF_ONE_GAME_IN_BYTES);
ReadDataFromBufferPointer(_buf, CGame::currLevel);
- ReadDataFromBufferPointer(_buf, TheCamera.GetPosition().x);
- ReadDataFromBufferPointer(_buf, TheCamera.GetPosition().y);
- ReadDataFromBufferPointer(_buf, TheCamera.GetPosition().z);
+ ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().x);
+ ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().y);
+ ReadDataFromBufferPointer(_buf, TheCamera.GetMatrix().GetPosition().z);
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
CCollision::SortOutCollisionAfterLoad();