Compile fixes, update submodules
This commit is contained in:
parent
733faf2bb1
commit
4831847197
|
@ -1 +1 @@
|
||||||
Subproject commit b37fc9a516ad09be5484f343f730e8642c3495a3
|
Subproject commit 2c2e2bad43b4566e1de5452a23673f0c9d5202f7
|
|
@ -89,7 +89,7 @@ TString CGameInfo::GetDefaultGameInfoPath(EGame Game)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
const TString GameName = GetGameShortName(Game);
|
const TString GameName = GetGameShortName(Game);
|
||||||
return TString::Format("%s/%s/GameInfo%s.%s", *gDataDir, *gkGameInfoDir, *GameName, *gkGameInfoExt);
|
return TString::Format("%s/%s/GameInfo%s.%s", gDataDir.ToStdString().c_str(), gkGameInfoDir, GameName.ToStdString().c_str(), gkGameInfoExt);
|
||||||
}
|
}
|
||||||
|
|
||||||
TString CGameInfo::GetExtension()
|
TString CGameInfo::GetExtension()
|
||||||
|
|
|
@ -444,12 +444,12 @@ bool CPackage::ContainsAsset(const CAssetID& rkID) const
|
||||||
|
|
||||||
TString CPackage::DefinitionPath(bool Relative) const
|
TString CPackage::DefinitionPath(bool Relative) const
|
||||||
{
|
{
|
||||||
const TString RelPath = mPakPath + mPakName + ".pkd";
|
TString RelPath = mPakPath + mPakName + ".pkd";
|
||||||
return Relative ? RelPath : mpProject->PackagesDir(false) + RelPath;
|
return Relative ? RelPath : mpProject->PackagesDir(false) + RelPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
TString CPackage::CookedPackagePath(bool Relative) const
|
TString CPackage::CookedPackagePath(bool Relative) const
|
||||||
{
|
{
|
||||||
const TString RelPath = mPakPath + mPakName + ".pak";
|
TString RelPath = mPakPath + mPakName + ".pak";
|
||||||
return Relative ? RelPath : mpProject->DiscFilesystemRoot(false) + RelPath;
|
return Relative ? RelPath : mpProject->DiscFilesystemRoot(false) + RelPath;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "CAnimationLoader.h"
|
#include "CAnimationLoader.h"
|
||||||
#include <Common/Macros.h>
|
#include <Common/Macros.h>
|
||||||
#include <Common/Log.h>
|
#include <Common/Log.h>
|
||||||
|
#include <cmath>
|
||||||
#include <Common/Math/MathUtil.h>
|
#include <Common/Math/MathUtil.h>
|
||||||
|
|
||||||
bool CAnimationLoader::UncompressedCheckEchoes()
|
bool CAnimationLoader::UncompressedCheckEchoes()
|
||||||
|
@ -236,8 +237,10 @@ void CAnimationLoader::ReadCompressedANIM()
|
||||||
{
|
{
|
||||||
CBitStreamInWrapper BitStream(mpInput);
|
CBitStreamInWrapper BitStream(mpInput);
|
||||||
|
|
||||||
for (auto& flag : mKeyFlags)
|
for (size_t i = 0; i < mKeyFlags.size(); ++i)
|
||||||
flag = BitStream.ReadBit();
|
{
|
||||||
|
mKeyFlags[i] = BitStream.ReadBit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mpInput->Seek(mGame == EGame::Prime ? 0x8 : 0x4, SEEK_CUR);
|
mpInput->Seek(mGame == EGame::Prime ? 0x8 : 0x4, SEEK_CUR);
|
||||||
|
|
||||||
|
@ -462,9 +465,9 @@ CQuaternion CAnimationLoader::DequantizeRotation(bool Sign, int16 X, int16 Y, in
|
||||||
const float Multiplier = Math::skHalfPi / static_cast<float>(mRotationDivisor);
|
const float Multiplier = Math::skHalfPi / static_cast<float>(mRotationDivisor);
|
||||||
|
|
||||||
CQuaternion Out;
|
CQuaternion Out;
|
||||||
Out.X = std::sinf(static_cast<float>(X) * Multiplier);
|
Out.X = sinf(static_cast<float>(X) * Multiplier);
|
||||||
Out.Y = std::sinf(static_cast<float>(Y) * Multiplier);
|
Out.Y = sinf(static_cast<float>(Y) * Multiplier);
|
||||||
Out.Z = std::sinf(static_cast<float>(Z) * Multiplier);
|
Out.Z = sinf(static_cast<float>(Z) * Multiplier);
|
||||||
Out.W = Math::Sqrt(std::fmax(1.f - ((Out.X * Out.X) + (Out.Y * Out.Y) + (Out.Z * Out.Z)), 0.f));
|
Out.W = Math::Sqrt(std::fmax(1.f - ((Out.X * Out.X) + (Out.Y * Out.Y) + (Out.Z * Out.Z)), 0.f));
|
||||||
|
|
||||||
if (Sign)
|
if (Sign)
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
}
|
}
|
||||||
friend bool operator!=(const IProperty* pLeft, const TPropertyRef& kRight)
|
friend bool operator!=(const IProperty* pLeft, const TPropertyRef& kRight)
|
||||||
{
|
{
|
||||||
return !operator==(pLeft, kRight);
|
return !(*pLeft == *kRight);
|
||||||
}
|
}
|
||||||
|
|
||||||
friend bool operator==(const TPropertyRef& left, const IProperty* right)
|
friend bool operator==(const TPropertyRef& left, const IProperty* right)
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
}
|
}
|
||||||
friend bool operator!=(const TPropertyRef& left, const IProperty* right)
|
friend bool operator!=(const TPropertyRef& left, const IProperty* right)
|
||||||
{
|
{
|
||||||
return !operator==(left, right);
|
return !(left.Property() == right);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -94,16 +94,21 @@ private:
|
||||||
// Model parts
|
// Model parts
|
||||||
struct SModelPart
|
struct SModelPart
|
||||||
{
|
{
|
||||||
FAxes ModelAxes{EAxis::None};
|
FAxes ModelAxes;
|
||||||
bool EnableRayCast = false;
|
bool EnableRayCast = false;
|
||||||
bool IsBillboard = false;
|
bool IsBillboard = false;
|
||||||
TResPtr<CModel> pModel;
|
TResPtr<CModel> pModel;
|
||||||
|
|
||||||
SModelPart() = default;
|
SModelPart() :
|
||||||
|
ModelAxes(EAxis::None)
|
||||||
|
{};
|
||||||
|
|
||||||
SModelPart(FAxes Axes, bool RayCastOn, bool Billboard, TResPtr<CModel> _pModel) :
|
SModelPart(FAxes Axes, bool RayCastOn, bool Billboard, TResPtr<CModel> _pModel) :
|
||||||
ModelAxes(Axes), EnableRayCast(RayCastOn), IsBillboard(Billboard), pModel(_pModel) {}
|
ModelAxes(Axes), EnableRayCast(RayCastOn), IsBillboard(Billboard), pModel(_pModel)
|
||||||
|
{}
|
||||||
};
|
};
|
||||||
SModelPart *mpCurrentParts = nullptr;
|
|
||||||
|
SModelPart* mpCurrentParts = nullptr;
|
||||||
uint32 mNumCurrentParts = 0;
|
uint32 mNumCurrentParts = 0;
|
||||||
|
|
||||||
// Static
|
// Static
|
||||||
|
@ -116,7 +121,7 @@ public:
|
||||||
CGizmo();
|
CGizmo();
|
||||||
~CGizmo() override;
|
~CGizmo() override;
|
||||||
|
|
||||||
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo) override;
|
void AddToRenderer(CRenderer* pRenderer, const SViewInfo& rkViewInfo) override;
|
||||||
void Draw(FRenderOptions Options, int ComponentIndex, ERenderCommand Command, const SViewInfo& rkViewInfo) override;
|
void Draw(FRenderOptions Options, int ComponentIndex, ERenderCommand Command, const SViewInfo& rkViewInfo) override;
|
||||||
|
|
||||||
void IncrementSize();
|
void IncrementSize();
|
||||||
|
@ -130,22 +135,51 @@ public:
|
||||||
void EndTransform();
|
void EndTransform();
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
EGizmoMode Mode() const { return mMode; }
|
EGizmoMode Mode() const
|
||||||
ETransformSpace TransformSpace() const { return mTransformSpace; }
|
{ return mMode; }
|
||||||
CVector3f Position() const { return mPosition; }
|
|
||||||
CVector3f DeltaTranslation() const { return mDeltaTranslation; }
|
ETransformSpace TransformSpace() const
|
||||||
CVector3f TotalTranslation() const { return mTotalTranslation; }
|
{ return mTransformSpace; }
|
||||||
CQuaternion Rotation() const { return mRotation; }
|
|
||||||
CQuaternion DeltaRotation() const { return mDeltaRotation; }
|
CVector3f Position() const
|
||||||
CVector3f TotalRotation() const { return mTotalRotation; }
|
{ return mPosition; }
|
||||||
CVector3f Scale() const { return mScale; }
|
|
||||||
CVector3f DeltaScale() const { return mDeltaScale; }
|
CVector3f DeltaTranslation() const
|
||||||
CVector3f TotalScale() const { return mTotalScale; }
|
{ return mDeltaTranslation; }
|
||||||
bool IsTransforming() const { return mIsTransforming; }
|
|
||||||
bool HasTransformed() const { return mHasTransformed; }
|
CVector3f TotalTranslation() const
|
||||||
|
{ return mTotalTranslation; }
|
||||||
|
|
||||||
|
CQuaternion Rotation() const
|
||||||
|
{ return mRotation; }
|
||||||
|
|
||||||
|
CQuaternion DeltaRotation() const
|
||||||
|
{ return mDeltaRotation; }
|
||||||
|
|
||||||
|
CVector3f TotalRotation() const
|
||||||
|
{ return mTotalRotation; }
|
||||||
|
|
||||||
|
CVector3f Scale() const
|
||||||
|
{ return mScale; }
|
||||||
|
|
||||||
|
CVector3f DeltaScale() const
|
||||||
|
{ return mDeltaScale; }
|
||||||
|
|
||||||
|
CVector3f TotalScale() const
|
||||||
|
{ return mTotalScale; }
|
||||||
|
|
||||||
|
bool IsTransforming() const
|
||||||
|
{ return mIsTransforming; }
|
||||||
|
|
||||||
|
bool HasTransformed() const
|
||||||
|
{ return mHasTransformed; }
|
||||||
|
|
||||||
|
void SetPosition(const CVector3f& rkPosition)
|
||||||
|
{ mPosition = rkPosition; }
|
||||||
|
|
||||||
|
void EnableCursorWrap(bool Enable)
|
||||||
|
{ mEnableCursorWrap = Enable; }
|
||||||
|
|
||||||
void SetPosition(const CVector3f& rkPosition) { mPosition = rkPosition; }
|
|
||||||
void EnableCursorWrap(bool Enable) { mEnableCursorWrap = Enable; }
|
|
||||||
void SetMode(EGizmoMode mode);
|
void SetMode(EGizmoMode mode);
|
||||||
void SetTransformSpace(ETransformSpace Space);
|
void SetTransformSpace(ETransformSpace Space);
|
||||||
void SetLocalRotation(const CQuaternion& rkOrientation);
|
void SetLocalRotation(const CQuaternion& rkOrientation);
|
||||||
|
|
|
@ -16,15 +16,14 @@
|
||||||
class INodeEditor : public IEditor
|
class INodeEditor : public IEditor
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
public:
|
||||||
protected:
|
|
||||||
enum class ECloneState
|
enum class ECloneState
|
||||||
{
|
{
|
||||||
NotCloning,
|
NotCloning,
|
||||||
ReadyToClone,
|
ReadyToClone,
|
||||||
Cloning
|
Cloning
|
||||||
};
|
};
|
||||||
|
protected:
|
||||||
// Node management
|
// Node management
|
||||||
CScene mScene;
|
CScene mScene;
|
||||||
CNodeSelection *mpSelection;
|
CNodeSelection *mpSelection;
|
||||||
|
|
|
@ -222,7 +222,7 @@ void CWorldTreeModel::OnProjectChanged(CGameProject *pProj)
|
||||||
// Metroid Prime series; fetch all world assets
|
// Metroid Prime series; fetch all world assets
|
||||||
std::list<CAssetID> WorldIDs;
|
std::list<CAssetID> WorldIDs;
|
||||||
pProj->GetWorldList(WorldIDs);
|
pProj->GetWorldList(WorldIDs);
|
||||||
QList<CAssetID> QWorldIDs = QList<CAssetID>::fromStdList(WorldIDs);
|
QList<CAssetID> QWorldIDs = QList<CAssetID>(WorldIDs.begin(), WorldIDs.end());
|
||||||
|
|
||||||
for (const CAssetID& rkID : QWorldIDs)
|
for (const CAssetID& rkID : QWorldIDs)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue