2016-04-27 19:59:38 +00:00
|
|
|
#ifndef __URDE_CSCRIPTSPECIALFUNCTION_HPP__
|
|
|
|
#define __URDE_CSCRIPTSPECIALFUNCTION_HPP__
|
|
|
|
|
|
|
|
#include "CActor.hpp"
|
|
|
|
#include "CDamageInfo.hpp"
|
|
|
|
#include "zeus/CTransform.hpp"
|
|
|
|
#include "zeus/CColor.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CScriptSpecialFunction : public CActor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum class ESpecialFunction
|
|
|
|
{
|
2017-08-10 13:40:07 +00:00
|
|
|
What = 0,
|
|
|
|
PlayerFollowLocator = 1,
|
|
|
|
SpinnerController = 2,
|
|
|
|
ObjectFollowLocator = 3,
|
2017-08-29 13:17:52 +00:00
|
|
|
ChaffTarget = 4,
|
2017-08-10 13:40:07 +00:00
|
|
|
InventoryActivator = 5,
|
|
|
|
MapStation = 6,
|
|
|
|
SaveStation = 7,
|
|
|
|
IntroBossRingController = 8,
|
|
|
|
ViewFrustumTester = 9,
|
|
|
|
ShotSpinnerController = 10,
|
|
|
|
EscapeSequence = 11,
|
|
|
|
BossEnergyBar = 12,
|
|
|
|
EndGame = 13,
|
|
|
|
HUDFadeIn = 14,
|
|
|
|
CinematicSkip = 15,
|
|
|
|
ScriptLayerController = 16,
|
|
|
|
RainSimulator = 17,
|
|
|
|
AreaDamage = 18,
|
|
|
|
ObjectFollowObject = 19,
|
|
|
|
RedundantHintSystem = 20,
|
|
|
|
DropBomb = 21,
|
2017-08-29 13:17:52 +00:00
|
|
|
ScaleActor = 22,
|
2017-08-10 13:40:07 +00:00
|
|
|
MissileStation = 23,
|
|
|
|
Billboard = 24,
|
|
|
|
PlayerInAreaRelay = 25,
|
|
|
|
HUDTarget = 26,
|
|
|
|
FogFader = 27,
|
|
|
|
EnterLogbook = 28,
|
|
|
|
PowerBombStation = 29,
|
|
|
|
Ending = 30,
|
|
|
|
FusionRelay = 31,
|
|
|
|
WeaponSwitch = 32,
|
2016-09-02 15:26:29 +00:00
|
|
|
FogVolume = 47,
|
|
|
|
RadialDamage = 48,
|
|
|
|
EnvFxDensityController = 49,
|
|
|
|
RumbleEffect = 50
|
2016-04-27 19:59:38 +00:00
|
|
|
};
|
|
|
|
|
2016-12-19 18:27:58 +00:00
|
|
|
enum class ESpinnerControllerMode
|
|
|
|
{
|
2018-05-20 05:01:17 +00:00
|
|
|
Zero,
|
|
|
|
One,
|
2016-12-19 18:27:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SRingController
|
|
|
|
{
|
2018-05-20 05:01:17 +00:00
|
|
|
TUniqueId x0_id;
|
|
|
|
float x4_;
|
|
|
|
bool x8_;
|
|
|
|
zeus::CVector3f xc_;
|
|
|
|
SRingController(TUniqueId uid, float f, bool b);
|
2016-12-19 18:27:58 +00:00
|
|
|
};
|
|
|
|
|
2016-04-27 19:59:38 +00:00
|
|
|
private:
|
2016-12-19 18:27:58 +00:00
|
|
|
ESpecialFunction xe8_function;
|
|
|
|
std::string xec_locatorName;
|
2017-08-29 13:17:52 +00:00
|
|
|
float xfc_;
|
2016-12-19 18:27:58 +00:00
|
|
|
float x100_;
|
|
|
|
float x104_;
|
|
|
|
float x108_;
|
|
|
|
zeus::CVector3f x10c_;
|
|
|
|
zeus::CColor x118_;
|
|
|
|
CDamageInfo x11c_damageInfo;
|
|
|
|
float x138_ = 0.f;
|
|
|
|
zeus::CTransform x13c_ = zeus::CTransform::Identity();
|
|
|
|
float x16c_ = 0.f;
|
|
|
|
s16 x170_;
|
|
|
|
s16 x172_;
|
|
|
|
s16 x174_;
|
2018-05-20 05:01:17 +00:00
|
|
|
CSfxHandle x178_sfxHandle;
|
2016-12-19 18:27:58 +00:00
|
|
|
u32 x17c_;
|
|
|
|
float x180_ = 0.f;
|
|
|
|
std::vector<float> x184_;
|
|
|
|
float x194_ = 0.f;
|
2018-05-20 05:01:17 +00:00
|
|
|
std::vector<SRingController> x198_ringControllers;
|
2016-12-19 18:27:58 +00:00
|
|
|
u32 x1a8_ = 2;
|
|
|
|
zeus::CVector3f x1ac_ = zeus::CVector3f::skZero;
|
|
|
|
bool x1b8_ = true;
|
2017-08-13 05:26:14 +00:00
|
|
|
CAssetId x1bc_;
|
|
|
|
CAssetId x1c0_;
|
|
|
|
CAssetId x1c4_;
|
2018-04-30 03:12:41 +00:00
|
|
|
std::experimental::optional<zeus::CAABox> x1c8_;
|
2016-12-19 18:27:58 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x1e4_24_ : 1;
|
2018-05-20 05:01:17 +00:00
|
|
|
bool x1e4_25_spinnerCanMove : 1;
|
2016-12-19 18:27:58 +00:00
|
|
|
bool x1e4_26_ : 1;
|
|
|
|
bool x1e4_27_ : 1;
|
2018-05-20 05:01:17 +00:00
|
|
|
bool x1e4_28_frustumEntered : 1;
|
|
|
|
bool x1e4_29_frustumExited : 1;
|
|
|
|
bool x1e4_30_ : 1;
|
2016-12-19 18:27:58 +00:00
|
|
|
bool x1e4_31_ : 1;
|
2017-08-29 13:17:52 +00:00
|
|
|
bool x1e5_24_doSave : 1;
|
2016-12-19 18:27:58 +00:00
|
|
|
bool x1e5_25_ : 1;
|
2018-05-20 05:01:17 +00:00
|
|
|
bool x1e5_26_displayBillboard : 1;
|
2016-12-19 18:27:58 +00:00
|
|
|
};
|
|
|
|
u32 x1e4_dummy = 0;
|
|
|
|
};
|
2018-05-20 05:01:17 +00:00
|
|
|
TLockedToken<CTexture> x1e8_; // Used to be optional
|
2016-04-27 19:59:38 +00:00
|
|
|
public:
|
2017-11-13 06:19:18 +00:00
|
|
|
CScriptSpecialFunction(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, ESpecialFunction,
|
|
|
|
std::string_view, float, float, float, float, const zeus::CVector3f&, const zeus::CColor&,
|
2017-08-13 05:26:14 +00:00
|
|
|
bool, const CDamageInfo&, CAssetId, CAssetId, CAssetId, s16, s16, s16);
|
2016-12-19 18:27:58 +00:00
|
|
|
|
2017-01-15 03:07:01 +00:00
|
|
|
void Accept(IVisitor& visitor);
|
2016-12-19 18:27:58 +00:00
|
|
|
void Think(float, CStateManager &);
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager &);
|
2017-02-11 00:52:52 +00:00
|
|
|
void PreRender(CStateManager &, const zeus::CFrustum &);
|
2016-12-19 18:27:58 +00:00
|
|
|
void AddToRenderer(const zeus::CFrustum &, const CStateManager &) const;
|
|
|
|
void Render(const CStateManager &) const;
|
|
|
|
|
|
|
|
void SkipCinematic(CStateManager&);
|
|
|
|
void RingMoveCloser(CStateManager&, float);
|
|
|
|
void RingMoveAway(CStateManager&, float);
|
|
|
|
void ThinkRingPuller(float, CStateManager&);
|
|
|
|
void RingScramble(CStateManager&);
|
|
|
|
void ThinkIntroBossRingController(float, CStateManager&);
|
|
|
|
void ThinkPlayerFollowLocator(float, CStateManager&);
|
|
|
|
void ThinkSpinnerController(float, CStateManager&, ESpinnerControllerMode);
|
|
|
|
void ThinkObjectFollowLocator(float, CStateManager&);
|
2018-05-20 05:01:17 +00:00
|
|
|
void ThinkObjectFollowObject(float, CStateManager&);
|
2016-12-19 18:27:58 +00:00
|
|
|
void ThinkChaffTarget(float, CStateManager&);
|
2017-08-29 13:17:52 +00:00
|
|
|
void ThinkActorScale(float, CStateManager&);
|
|
|
|
void ThinkSaveStation(float, CStateManager&);
|
2018-05-20 05:01:17 +00:00
|
|
|
void ThinkRainSimulator(float, CStateManager&);
|
|
|
|
void ThinkAreaDamage(float, CStateManager&);
|
|
|
|
void ThinkPlayerInArea(float, CStateManager&);
|
2017-02-18 02:19:50 +00:00
|
|
|
|
|
|
|
bool ShouldSkipCinematic(CStateManager& stateMgr) const;
|
2018-05-20 05:01:17 +00:00
|
|
|
|
|
|
|
void DeleteEmitter(const CSfxHandle& handle);
|
|
|
|
u32 GetSpecialEnding(const CStateManager&) const;
|
2016-04-27 19:59:38 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // CSCRIPTSPECIALFUNCTION_HPP
|