diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-25 19:03:05 +0300 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-25 19:03:51 +0300 |
commit | 2b67aba94cb6448fb24c869559465eddf2bad069 (patch) | |
tree | 5c68ff4f8ce3153640a7b864495e167bec04cce8 /src/audio | |
parent | 6152f02333e296bd87fbc12f4fe59ca42e7e293e (diff) |
Redo ReadSaveBuf + common.h cleanup
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/AudioScriptObject.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/audio/AudioScriptObject.cpp b/src/audio/AudioScriptObject.cpp index ac30f757..623c43ca 100644 --- a/src/audio/AudioScriptObject.cpp +++ b/src/audio/AudioScriptObject.cpp @@ -3,6 +3,7 @@ #include "AudioScriptObject.h" #include "Pools.h" #include "DMAudio.h" +#include "SaveBuf.h" cAudioScriptObject::cAudioScriptObject() { @@ -53,12 +54,14 @@ cAudioScriptObject::LoadAllAudioScriptObjects(uint8 *buf, uint32 size) CheckSaveHeader(buf, 'A', 'U', 'D', '\0', size - SAVE_HEADER_SIZE); - int32 pool_size = ReadSaveBuf<int32>(buf); + int32 pool_size; + ReadSaveBuf(&pool_size, buf); for (int32 i = 0; i < pool_size; i++) { - int handle = ReadSaveBuf<int32>(buf); + int32 handle; + ReadSaveBuf(&handle, buf); cAudioScriptObject *p = new(handle) cAudioScriptObject; assert(p != nil); - *p = ReadSaveBuf<cAudioScriptObject>(buf); + ReadSaveBuf(p, buf); p->AudioEntity = DMAudio.CreateLoopingScriptObject(p); } |