metaforce/Runtime/World/CActorParameters.hpp

80 lines
2.7 KiB
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-04-18 01:58:13 +00:00
#include "CLightParameters.hpp"
#include "CScannableParameters.hpp"
#include "CVisorParameters.hpp"
namespace urde
{
class CActorParameters
{
2016-04-19 00:17:49 +00:00
friend class ScriptLoader;
2017-11-24 08:23:28 +00:00
friend class CActor;
2018-06-02 06:06:25 +00:00
friend class CScriptActor;
CLightParameters x0_lightParms;
2016-04-18 01:58:13 +00:00
CScannableParameters x40_scanParms;
2017-08-13 05:26:14 +00:00
std::pair<CAssetId, CAssetId> x44_xrayAssets = {};
std::pair<CAssetId, CAssetId> x4c_thermalAssets = {};
2016-04-18 01:58:13 +00:00
CVisorParameters x54_visorParms;
union
{
struct
{
bool x58_24_globalTimeProvider : 1;
bool x58_25_thermalHeat : 1;
bool x58_26_renderUnsorted : 1;
2017-11-24 08:23:28 +00:00
bool x58_27_noSortThermal : 1;
};
u32 _dummy = 0;
};
2018-06-02 06:06:25 +00:00
float x5c_fadeInTime = 0.f;
float x60_fadeOutTime = 0.f;
2018-02-09 07:12:26 +00:00
float x64_thermalMag = 0.f;
2016-04-18 01:58:13 +00:00
public:
CActorParameters() : x58_24_globalTimeProvider(true), x58_25_thermalHeat(false),
x58_26_renderUnsorted(false), x58_27_noSortThermal(false) {}
2016-04-18 01:58:13 +00:00
CActorParameters(const CLightParameters& lightParms, const CScannableParameters& scanParms,
const std::pair<CAssetId, CAssetId>& xrayAssets,
const std::pair<CAssetId, CAssetId>& thermalAssets,
const CVisorParameters& visorParms, bool globalTimeProvider, bool thermalHeat,
2018-06-02 06:06:25 +00:00
bool renderUnsorted, bool noSortThermal,
float fadeInTime, float fadeOutTime, float thermalMag)
: x0_lightParms(lightParms)
, x40_scanParms(scanParms)
, x44_xrayAssets(xrayAssets)
, x4c_thermalAssets(thermalAssets)
, x54_visorParms(visorParms)
, x58_24_globalTimeProvider(globalTimeProvider)
, x58_25_thermalHeat(thermalHeat)
, x58_26_renderUnsorted(renderUnsorted)
, x58_27_noSortThermal(noSortThermal)
2018-06-02 06:06:25 +00:00
, x5c_fadeInTime(fadeInTime)
, x60_fadeOutTime(fadeOutTime)
, x64_thermalMag(thermalMag)
{
}
CActorParameters Scannable(const CScannableParameters& sParms) const
{
CActorParameters aParms = *this;
aParms.x40_scanParms = sParms;
return aParms;
}
static CActorParameters None() { return CActorParameters(); }
CActorParameters HotInThermal(bool hot) const
{
CActorParameters ret = *this;
ret.x58_25_thermalHeat = hot;
return ret;
}
2016-05-03 08:27:28 +00:00
void SetVisorParameters(const CVisorParameters& vParams) { x54_visorParms = vParams; }
const CVisorParameters& GetVisorParameters() const { return x54_visorParms; }
const CLightParameters& GetLightParameters() const { return x0_lightParms; }
2017-08-25 06:18:09 +00:00
bool HasThermalHeat() const { return x58_25_thermalHeat; }
2018-09-07 23:51:07 +00:00
float GetThermalMag() const { return x64_thermalMag; }
2016-04-18 01:58:13 +00:00
};
}