mirror of https://github.com/AxioDL/metaforce.git
Merge branch 'master' of https://github.com/AxioDL/urde
This commit is contained in:
commit
a8021d4d88
|
@ -34,6 +34,7 @@ set(WORLD_SOURCES
|
|||
CScriptAreaAttributes.hpp CScriptAreaAttributes.cpp
|
||||
CScriptCameraWaypoint.hpp CScriptCameraWaypoint.cpp
|
||||
CScriptCoverPoint.hpp CScriptCoverPoint.cpp
|
||||
CScriptSpawnPoint.hpp CScriptSpawnPoint.cpp
|
||||
CGrappleParameters.hpp
|
||||
CActorParameters.hpp
|
||||
CLightParameters.hpp
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#include "CScriptSpawnPoint.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CScriptSpawnPoint::CScriptSpawnPoint(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, const std::vector<u32>& itemCounts,
|
||||
bool, bool active, bool)
|
||||
: CEntity(uid, info, active, name)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef __CSCRIPTSPAWNPOINT_HPP__
|
||||
#define __CSCRIPTSPAWNPOINT_HPP__
|
||||
|
||||
#include "CEntity.hpp"
|
||||
#include "zeus/CTransform.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
class CScriptSpawnPoint : public CEntity
|
||||
{
|
||||
public:
|
||||
CScriptSpawnPoint(TUniqueId, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, const std::vector<u32>& itemCounts,
|
||||
bool, bool, bool);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __CSCRIPTSPAWNPOINT_HPP__
|
|
@ -28,6 +28,7 @@
|
|||
#include "CScriptAreaAttributes.hpp"
|
||||
#include "CScriptCameraWaypoint.hpp"
|
||||
#include "CScriptCoverPoint.hpp"
|
||||
#include "CScriptSpawnPoint.hpp"
|
||||
#include "Camera/CCinematicCamera.hpp"
|
||||
#include "MP1/CNewIntroBoss.hpp"
|
||||
#include "MP1/CWarWasp.hpp"
|
||||
|
@ -827,6 +828,31 @@ CEntity* ScriptLoader::LoadNewIntroBoss(CStateManager& mgr, CInputStream& in,
|
|||
CEntity* ScriptLoader::LoadSpawnPoint(CStateManager& mgr, CInputStream& in,
|
||||
int propCount, const CEntityInfo& info)
|
||||
{
|
||||
if (!EnsurePropertyCount(propCount, 35, "SpawnPoint"))
|
||||
return nullptr;
|
||||
|
||||
const std::string* name = mgr.HashInstanceName(in);
|
||||
|
||||
zeus::CVector3f position;
|
||||
position.readBig(in);
|
||||
|
||||
zeus::CVector3f rotation;
|
||||
rotation.readBig(in);
|
||||
|
||||
std::vector<u32> itemCounts;
|
||||
itemCounts.reserve(propCount-6);
|
||||
for (int i=0 ; i<propCount-6 ; ++i)
|
||||
itemCounts.push_back(in.readUint32Big());
|
||||
|
||||
bool b1 = in.readBool();
|
||||
bool b2 = in.readBool();
|
||||
bool b3 = false;
|
||||
if (propCount > 34)
|
||||
b3 = in.readBool();
|
||||
|
||||
return new CScriptSpawnPoint(mgr.AllocateUniqueId(), *name, info,
|
||||
ConvertEditorEulerToTransform4f(rotation, position),
|
||||
itemCounts, b1, b2, b3);
|
||||
}
|
||||
|
||||
CEntity* ScriptLoader::LoadCameraHint(CStateManager& mgr, CInputStream& in,
|
||||
|
|
Loading…
Reference in New Issue