mirror of https://github.com/AxioDL/metaforce.git
Merge branch 'master' of https://github.com/AxioDL/urde
This commit is contained in:
commit
dbab69bf97
|
@ -58,8 +58,7 @@ RigInverter<CINFType>::Bone::Bone(const CINFType& cinf, const typename CINFType:
|
|||
m_tail /= float(actualChildren);
|
||||
if ((m_tail - boneOrigin).magSquared() < 0.001f)
|
||||
m_tail = naturalTail;
|
||||
|
||||
if (isLCTR)
|
||||
else if (isLCTR)
|
||||
m_tail = boneOrigin + zeus::CVector3f{0.f, 1.0f, 0.f} * (m_tail - boneOrigin).magnitude();
|
||||
}
|
||||
else if (parentIdx != -1)
|
||||
|
|
|
@ -41,6 +41,12 @@ class CCameraManager
|
|||
public:
|
||||
CCameraManager(TUniqueId curCameraId);
|
||||
|
||||
static float DefaultAspect() {return 1.42f;}
|
||||
static float DefaultFarPlane() {return 750.0f;}
|
||||
static float DefaultNearPlane() {return 0.2f;}
|
||||
static float DefaultFirstPersonFOV() {return 55.0f;}
|
||||
static float DefaultThirdPersonFOV() {return 60.0f;}
|
||||
|
||||
void SetSpecialCameras(CFirstPersonCamera& fp, CBallCamera& ball)
|
||||
{
|
||||
x7c_fpCamera = &fp;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "CScriptSound.hpp"
|
||||
#include "CScriptGenerator.hpp"
|
||||
#include "CScriptGrapplePoint.hpp"
|
||||
#include "Camera/CCinematicCamera.hpp"
|
||||
#include "CSimplePool.hpp"
|
||||
#include "Collision/CCollidableOBBTreeGroup.hpp"
|
||||
#include "Editor/ProjectResourceFactoryMP1.hpp"
|
||||
|
@ -730,6 +731,33 @@ CEntity* ScriptLoader::LoadDock(CStateManager& mgr, CInputStream& in,
|
|||
CEntity* ScriptLoader::LoadCamera(CStateManager& mgr, CInputStream& in,
|
||||
int propCount, const CEntityInfo& info)
|
||||
{
|
||||
if (!EnsurePropertyCount(propCount, 14, "Camera"))
|
||||
return nullptr;
|
||||
|
||||
SActorHead head = LoadActorHead(in, mgr);
|
||||
|
||||
bool b1 = in.readBool();
|
||||
float f1 = in.readFloatBig();
|
||||
bool b2 = in.readBool();
|
||||
bool b3 = in.readBool();
|
||||
bool b4 = in.readBool();
|
||||
bool b5 = in.readBool();
|
||||
bool b6 = in.readBool();
|
||||
bool b7 = in.readBool();
|
||||
bool b8 = in.readBool();
|
||||
float f2 = in.readFloatBig();
|
||||
bool b9 = in.readBool();
|
||||
|
||||
bool b10 = false;
|
||||
if (propCount > 14)
|
||||
b10 = in.readBool();
|
||||
|
||||
u32 flags = b2 | b3 << 1 | b4 << 2 | b5 << 3 | b6 << 4 | b7 << 5 | b8 << 6 | b9 << 8;
|
||||
|
||||
return new CCinematicCamera(mgr.AllocateUniqueId(), head.x0_name, info,
|
||||
head.x10_transform, b1, f1, f2 / CCameraManager::DefaultAspect(),
|
||||
CCameraManager::DefaultNearPlane(), CCameraManager::DefaultFarPlane(),
|
||||
CCameraManager::DefaultAspect(), flags);
|
||||
}
|
||||
|
||||
CEntity* ScriptLoader::LoadCameraWaypoint(CStateManager& mgr, CInputStream& in,
|
||||
|
|
Loading…
Reference in New Issue