Fix command line args on macOS when passed via open, implement CScriptCameraPitchVolume

This commit is contained in:
Phillip Stephens 2017-01-23 02:13:36 -08:00
parent afd852f1a4
commit a8f5efb6e5
12 changed files with 33 additions and 22 deletions

View File

@ -34,6 +34,7 @@
#include "Tweaks/CTweakSlideShow.hpp"
#include "Tweaks/CTweakGame.hpp"
#include "Tweaks/CTweakTargeting.hpp"
#include "Tweaks/CTweakGui.hpp"
namespace DataSpec
{
@ -388,6 +389,8 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK& pak, const PAK::En
return {ExtractTweak<CTweakGame>, {_S(".yaml")}};
if (!name.compare("Targeting"))
return {ExtractTweak<CTweakTargeting>, {_S(".yaml")}};
if (!name.compare("Gui"))
return {ExtractTweak<CTweakGui>, {_S(".yaml")}};
}
break;
}

View File

@ -1,5 +1,5 @@
#ifndef _DNAMP1_CTWEAKGAME_HPP_
#define _DNAMP1_CTWEAKGAME_HPP_
#ifndef _DNAMP1_CTWEAKGUI_HPP_
#define _DNAMP1_CTWEAKGUI_HPP_
#include "../../DNACommon/Tweaks/ITweakGui.hpp"
@ -7,7 +7,6 @@ namespace DataSpec
{
namespace DNAMP1
{
struct CTweakGui : ITweakGui
{
DECL_YAML
@ -232,4 +231,4 @@ struct CTweakGui : ITweakGui
}
}
#endif
#endif // _DNAMP1_CTWEAKGUI_HPP_

View File

@ -216,6 +216,8 @@ public:
const boo::SystemChar* platformName() { return m_mainPlatformName; }
bool proc();
void stop();
void deferOpenProject(const hecl::SystemString& path) { m_deferedProject = path; }
};
}

View File

@ -63,7 +63,7 @@ struct Application : boo::IApplicationCallback
hecl::ProjectRootPath projPath = hecl::SearchForProject(path);
if (projPath)
{
m_viewManager->projectManager().openProject(path);
m_viewManager->deferOpenProject(path);
break;
}
}

View File

@ -111,8 +111,8 @@ public:
bool DDPLeft() const {return x2d_b26_DPLeft;}
bool DDPDown() const {return x2d_b25_DPDown;}
bool DDPUp() const {return x2c_b31_DPUp;}
bool DRTrigger() const {return x1c_anaRightTrigger > 050000001;}
bool DLTrigger() const {return x18_anaLeftTrigger > 050000001;}
bool DRTrigger() const {return x1c_anaRightTrigger > 0.050000001;}
bool DLTrigger() const {return x18_anaLeftTrigger > 0.050000001;}
bool DRARight() const {return x10_anaRightX > 0.69999999;}
bool DRALeft() const {return x10_anaRightX < -0.69999999;}
bool DRADown() const {return x14_anaRightY < -0.69999999;}

View File

@ -630,11 +630,11 @@ CRealElement* CParticleDataFactory::GetRealElement(CInputStream& in)
}
case SBIG('PSLL'):
{
return new CREPSLL;
return new CREParticleSizeOrLineLength;
}
case SBIG('PRLW'):
{
return new CREPRLW;
return new CREParticleRotationOrLineWidth;
}
case SBIG('SUB_'):
{

View File

@ -38,14 +38,14 @@ CParticleElectric::CParticleElectric(const TToken<CElectricDescription>& token)
else
x2c_LIFE = 0x7FFFFF;
if (desc->x40_SSWH.m_found)
if (desc->x40_SSWH)
{
x450_27_HaveSSWH = true;
for (int i = 0 ; i < x154_SCNT ; i++)
x1e0_lineManagers[i].SSWH.reset(new CParticleSwoosh(desc->x40_SSWH.m_token, x150_SSEG));
}
if (desc->x50_GPSM.m_found)
if (desc->x50_GPSM)
{
x450_25_HaveGPSM = true;
for (int i = 0 ; i < x154_SCNT ; i++)
@ -54,7 +54,7 @@ CParticleElectric::CParticleElectric(const TToken<CElectricDescription>& token)
CElementGen::EOptionalSystemFlags::One));
}
if (desc->x60_EPSM.m_found)
if (desc->x60_EPSM)
{
x450_26_HaveEPSM = true;
for (int i = 0 ; i < x154_SCNT ; i++)
@ -135,8 +135,8 @@ void CParticleElectric::SetGlobalScale(const zeus::CVector3f& scale)
void CParticleElectric::SetLocalScale(const zeus::CVector3f& scale)
{
xec_localScale = scale;
x450_28 = true;
if (x450_26_HaveEPSM)
x450_29 = true;
if (x450_27_HaveSSWH)
{
}
}

View File

@ -35,6 +35,7 @@ private:
float x128 = 0.f;
float x12c = 0.f;
zeus::CVector3f x130;
zeus::CVector3f x13c;
CRandom16 x14c_randState;
int x150_SSEG = 8;
int x154_SCNT = 1;

View File

@ -281,13 +281,13 @@ bool CREParticleAccessParam8::GetValue(int /*frame*/, float& valOut) const
return false;
}
bool CREPSLL::GetValue(int /*frame*/, float& valOut) const
bool CREParticleSizeOrLineLength::GetValue(int /*frame*/, float& valOut) const
{
valOut = CElementGen::g_currentParticle->x2c_lineLengthOrSize;
return false;
}
bool CREPRLW::GetValue(int /*frame*/, float& valOut) const
bool CREParticleRotationOrLineWidth::GetValue(int /*frame*/, float& valOut) const
{
valOut = CElementGen::g_currentParticle->x30_lineWidthOrRota;
return false;

View File

@ -237,13 +237,13 @@ public:
bool GetValue(int frame, float& valOut) const;
};
class CREPSLL : public CRealElement
class CREParticleSizeOrLineLength : public CRealElement
{
public:
bool GetValue(int frame, float& valOut) const;
};
class CREPRLW : public CRealElement
class CREParticleRotationOrLineWidth : public CRealElement
{
public:
bool GetValue(int frame, float& valOut) const;

View File

@ -29,10 +29,17 @@ void CScriptCameraPitchVolume::Accept(IVisitor& visitor)
visitor.Visit(this);
}
void CScriptCameraPitchVolume::Think(float, CStateManager&)
void CScriptCameraPitchVolume::Think(float, CStateManager& mgr)
{
if (!x30_24_active)
return;
if (x13c_24_entered && !x13c_25_occupied)
Entered(mgr);
else if (!x13c_24_entered && x13c_25_occupied)
Exited(mgr);
x13c_24_entered = false;
}
rstl::optional_object<zeus::CAABox> CScriptCameraPitchVolume::GetTouchBounds() const
@ -50,8 +57,7 @@ void CScriptCameraPitchVolume::Touch(CActor& act, CStateManager& mgr)
if (!plBox)
return;
zeus::COBBox plOBox = zeus::COBBox::FromAABox(plBox.value(), zeus::CTransform::Identity());
xe8_obbox;
x13c_24_entered = xe8_obbox.AABoxIntersectsBox(plBox.value());
}
const zeus::CVector3f& CScriptCameraPitchVolume::GetScale() const { return x12c_scale; }

@ -1 +1 @@
Subproject commit 66bc6b4caf32b3f9d936c2809e3d8bfa458bcce5
Subproject commit 661b391cd0277bb6de3aeb74d53c990e6ec07099