summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioScriptObject.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-06-25 23:25:59 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-06-25 23:25:59 +0200
commitaf7573ddbe38e0aaa485877e7ccb2e704b0f5a7f (patch)
tree75a719bb1ab82b354f464562ecc1fae9c55f64d0 /src/audio/AudioScriptObject.cpp
parentMerge pull request #1147 from withmorten/githash (diff)
downloadre3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.gz
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.bz2
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.lz
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.xz
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.tar.zst
re3-af7573ddbe38e0aaa485877e7ccb2e704b0f5a7f.zip
Diffstat (limited to 'src/audio/AudioScriptObject.cpp')
-rw-r--r--src/audio/AudioScriptObject.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/audio/AudioScriptObject.cpp b/src/audio/AudioScriptObject.cpp
index 623c43ca..ac30f757 100644
--- a/src/audio/AudioScriptObject.cpp
+++ b/src/audio/AudioScriptObject.cpp
@@ -3,7 +3,6 @@
#include "AudioScriptObject.h"
#include "Pools.h"
#include "DMAudio.h"
-#include "SaveBuf.h"
cAudioScriptObject::cAudioScriptObject()
{
@@ -54,14 +53,12 @@ cAudioScriptObject::LoadAllAudioScriptObjects(uint8 *buf, uint32 size)
CheckSaveHeader(buf, 'A', 'U', 'D', '\0', size - SAVE_HEADER_SIZE);
- int32 pool_size;
- ReadSaveBuf(&pool_size, buf);
+ int32 pool_size = ReadSaveBuf<int32>(buf);
for (int32 i = 0; i < pool_size; i++) {
- int32 handle;
- ReadSaveBuf(&handle, buf);
+ int handle = ReadSaveBuf<int32>(buf);
cAudioScriptObject *p = new(handle) cAudioScriptObject;
assert(p != nil);
- ReadSaveBuf(p, buf);
+ *p = ReadSaveBuf<cAudioScriptObject>(buf);
p->AudioEntity = DMAudio.CreateLoopingScriptObject(p);
}