summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioScriptObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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);
}