2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 13:07:42 +00:00

CScriptMidi and work on CGameArea loading

This commit is contained in:
Jack Andersen
2017-02-26 19:25:14 -10:00
parent 628e5b41df
commit e923d83617
28 changed files with 446 additions and 112 deletions

View File

@@ -64,6 +64,7 @@
#include "MP1/World/CActorContraption.hpp"
#include "CScriptShadowProjector.hpp"
#include "CScriptStreamedMusic.hpp"
#include "CScriptMidi.hpp"
#include "CScriptRoomAcoustics.hpp"
#include "CPatternedInfo.hpp"
#include "CSimplePool.hpp"
@@ -1916,7 +1917,16 @@ CEntity* ScriptLoader::LoadThardusRockProjectile(CStateManager& mgr, CInputStrea
CEntity* ScriptLoader::LoadMidi(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
{
return nullptr;
if (!EnsurePropertyCount(propCount, 6, "Midi"))
return nullptr;
std::string name = mgr.HashInstanceName(in);
bool active = in.readBool();
u32 csng = in.readUint32Big();
float fadeIn = in.readFloatBig();
float fadeOut = in.readFloatBig();
u32 vol = in.readUint32Big();
return new CScriptMidi(mgr.AllocateUniqueId(), info, name, active, csng, fadeIn, fadeOut, vol);
}
CEntity* ScriptLoader::LoadStreamedAudio(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)