diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-28 04:16:21 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-28 04:16:21 +0200 |
commit | eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9 (patch) | |
tree | 140cc1e91a53777cdcb38c4cdacdcd101740965b /src/audio | |
parent | Merge pull request #1153 from kusst/texread (diff) | |
parent | Redo ReadSaveBuf + common.h cleanup (diff) | |
download | re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.gz re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.bz2 re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.lz re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.xz re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.tar.zst re3-eaebaa6db32f4f6f310ea2746ed03da23f4c8ea9.zip |
Diffstat (limited to '')
-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 48c78c88..ac4bebcb 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); } |