2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CACTORPARAMETERS
|
|
|
|
#define _CACTORPARAMETERS
|
2022-08-13 01:26:00 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "Kyoto/Graphics/CColor.hpp"
|
2022-09-18 05:55:13 +00:00
|
|
|
#include "Kyoto/IObjectStore.hpp"
|
2022-08-13 01:26:00 +00:00
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
|
|
|
|
|
|
|
#include "rstl/auto_ptr.hpp"
|
|
|
|
#include "rstl/pair.hpp"
|
|
|
|
|
|
|
|
class CActorLights;
|
|
|
|
|
|
|
|
class CLightParameters {
|
|
|
|
public:
|
2022-11-03 23:54:33 +00:00
|
|
|
enum EShadowTessellation {
|
2022-08-13 01:26:00 +00:00
|
|
|
kST_Invalid = -1,
|
|
|
|
kST_Zero,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum EWorldLightingOptions {
|
|
|
|
kLO_Zero,
|
|
|
|
kLO_NormalWorld,
|
|
|
|
kLO_NoShadowCast,
|
|
|
|
kLO_DisableWorld,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ELightRecalculationOptions {
|
2022-11-04 03:46:49 +00:00
|
|
|
kLR_Never,
|
2022-08-13 01:26:00 +00:00
|
|
|
kLR_EightFrames,
|
|
|
|
kLR_FourFrames,
|
|
|
|
kLR_OneFrame,
|
|
|
|
};
|
|
|
|
|
2022-11-03 23:54:33 +00:00
|
|
|
CLightParameters();
|
2022-11-04 03:46:49 +00:00
|
|
|
CLightParameters(bool castShadow, float shadowScale,
|
|
|
|
CLightParameters::EShadowTessellation shadowTess, float shadowAlpha,
|
|
|
|
float maxShadowHeight, const CColor& ambientColor, bool makeLights,
|
|
|
|
CLightParameters::EWorldLightingOptions useWorldLighting,
|
|
|
|
CLightParameters::ELightRecalculationOptions lightRecalcOpts,
|
|
|
|
const CVector3f& lightingPositionOffset, int maxDynamicLights, int maxAreaLights,
|
|
|
|
bool ambChannelOverflow, int useLightSet);
|
2022-08-13 01:26:00 +00:00
|
|
|
virtual ~CLightParameters();
|
|
|
|
|
2022-11-04 03:46:49 +00:00
|
|
|
const CColor& GetAmbientColor() const { return x18_ambientColor; }
|
2022-08-13 01:26:00 +00:00
|
|
|
bool ShouldMakeLights() const { return x1c_makeLights; }
|
2022-11-04 03:46:49 +00:00
|
|
|
bool GetAmbientChannelOverflow() const { return x1d_ambientChannelOverflow; }
|
|
|
|
const CVector3f& GetLightingPositionOffset() const { return x2c_lightingPositionOffset; }
|
|
|
|
int GetMaxDynamicLights() const { return x38_maxDynamicLights; }
|
2022-09-05 04:01:13 +00:00
|
|
|
int GetMaxAreaLights() const { return x3c_maxAreaLights; }
|
2022-08-13 01:26:00 +00:00
|
|
|
|
2022-11-03 23:54:33 +00:00
|
|
|
static CLightParameters None();
|
|
|
|
|
|
|
|
static uint GetFramesBetweenRecalculation(ELightRecalculationOptions opts);
|
2022-08-13 01:26:00 +00:00
|
|
|
rstl::auto_ptr< CActorLights > MakeActorLights() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool x4_castShadow;
|
2022-10-09 05:37:23 +00:00
|
|
|
float x8_shadowScale;
|
2022-11-03 23:54:33 +00:00
|
|
|
EShadowTessellation xc_shadowTesselation;
|
2022-10-09 05:37:23 +00:00
|
|
|
float x10_shadowAlpha;
|
|
|
|
float x14_maxShadowHeight;
|
2022-11-04 03:46:49 +00:00
|
|
|
CColor x18_ambientColor;
|
2022-08-13 01:26:00 +00:00
|
|
|
bool x1c_makeLights;
|
|
|
|
bool x1d_ambientChannelOverflow;
|
2022-11-04 03:46:49 +00:00
|
|
|
EWorldLightingOptions x20_useWorldLighting;
|
|
|
|
ELightRecalculationOptions x24_lightRecalculation;
|
|
|
|
int x28_useLightSet;
|
|
|
|
CVector3f x2c_lightingPositionOffset;
|
2022-09-05 04:01:13 +00:00
|
|
|
int x38_maxDynamicLights;
|
|
|
|
int x3c_maxAreaLights;
|
2022-08-13 01:26:00 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CLightParameters, 0x40)
|
|
|
|
|
|
|
|
class CScannableParameters {
|
|
|
|
public:
|
|
|
|
CScannableParameters() {}
|
|
|
|
CScannableParameters(CAssetId scanId) : x0_scanId(scanId) {}
|
|
|
|
|
|
|
|
CAssetId GetScannableObject0() const { return x0_scanId; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
CAssetId x0_scanId;
|
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CScannableParameters, 0x4)
|
|
|
|
|
|
|
|
class CVisorParameters {
|
|
|
|
public:
|
2022-10-09 05:37:23 +00:00
|
|
|
CVisorParameters(uchar mask, bool b1, bool scanPassthrough)
|
2022-09-18 06:05:46 +00:00
|
|
|
: x0_mask(mask), x0_4_b1(b1), x0_5_scanPassthrough(scanPassthrough) {}
|
2022-08-13 01:26:00 +00:00
|
|
|
|
2022-10-09 05:37:23 +00:00
|
|
|
uchar GetMask() const { return x0_mask; }
|
2022-08-13 01:26:00 +00:00
|
|
|
// TODO: GetIsBlockXRay__16CVisorParametersCFv?
|
|
|
|
bool GetBool1() const { return x0_4_b1; }
|
|
|
|
bool GetScanPassthrough() const { return x0_5_scanPassthrough; }
|
|
|
|
|
2022-11-04 03:46:49 +00:00
|
|
|
static CVisorParameters None() { return CVisorParameters(0xF, false, false); }
|
2022-08-13 01:26:00 +00:00
|
|
|
|
|
|
|
private:
|
2022-09-05 04:01:13 +00:00
|
|
|
uint x0_mask : 4;
|
|
|
|
uint x0_4_b1 : 1;
|
|
|
|
uint x0_5_scanPassthrough : 1;
|
2022-08-13 01:26:00 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CVisorParameters, 0x4)
|
|
|
|
|
|
|
|
class CActorParameters {
|
|
|
|
public:
|
2022-11-03 23:54:33 +00:00
|
|
|
CActorParameters();
|
|
|
|
CActorParameters(const CLightParameters& lightParms, const CScannableParameters& scanParms,
|
|
|
|
const rstl::pair< CAssetId, CAssetId >& xrayAssets,
|
|
|
|
const rstl::pair< CAssetId, CAssetId >& thermalAssets,
|
|
|
|
const CVisorParameters& visorParms, bool globalTimeProvider, bool thermalHeat,
|
|
|
|
bool renderUnsorted, bool noSortThermal, float fadeInTime, float fadeOutTime,
|
|
|
|
float thermalMag);
|
|
|
|
CActorParameters(const CActorParameters&);
|
2022-12-24 05:34:11 +00:00
|
|
|
~CActorParameters() {}
|
2022-11-03 23:54:33 +00:00
|
|
|
|
2022-10-21 14:51:59 +00:00
|
|
|
CActorParameters Scannable(const CScannableParameters& sParms) const;
|
2022-11-03 23:54:33 +00:00
|
|
|
CActorParameters HotInThermal(bool hot) const;
|
|
|
|
CActorParameters MakeDamageableTriggerActorParms(const CVisorParameters& visorParam) const;
|
2022-08-13 01:26:00 +00:00
|
|
|
|
2022-11-04 03:46:49 +00:00
|
|
|
const CLightParameters& GetLighting() const { return x0_lighting; }
|
|
|
|
const CScannableParameters& GetScannable() const { return x40_scannable; }
|
2022-08-13 01:26:00 +00:00
|
|
|
const rstl::pair< CAssetId, CAssetId >& GetXRay() const { return x44_xrayAssets; }
|
|
|
|
const rstl::pair< CAssetId, CAssetId >& GetInfra() const { return x4c_thermalAssets; }
|
2022-11-04 03:46:49 +00:00
|
|
|
const CVisorParameters& GetVisorParameters() const { return x54_visor; }
|
2022-10-09 05:37:23 +00:00
|
|
|
float GetThermalMag() const { return x64_thermalMag; }
|
2022-11-04 03:46:49 +00:00
|
|
|
bool UseGlobalRenderTime() const { return x58_24_useGlobalRenderTime; }
|
2022-08-13 01:26:00 +00:00
|
|
|
bool IsHotInThermal() const { return x58_25_thermalHeat; }
|
2022-11-04 03:46:49 +00:00
|
|
|
bool ForceRenderUnsorted() const { return x58_26_forceRenderUnsorted; }
|
2022-08-13 01:26:00 +00:00
|
|
|
bool NoSortThermal() const { return x58_27_noSortThermal; }
|
2022-10-09 05:37:23 +00:00
|
|
|
float GetFadeInTime() const { return x5c_fadeInTime; }
|
|
|
|
float GetFadeOutTime() const { return x60_fadeOutTime; }
|
2022-08-13 01:26:00 +00:00
|
|
|
|
2022-09-14 02:25:08 +00:00
|
|
|
static CActorParameters None();
|
|
|
|
|
2022-08-13 01:26:00 +00:00
|
|
|
private:
|
2022-11-04 03:46:49 +00:00
|
|
|
CLightParameters x0_lighting;
|
|
|
|
CScannableParameters x40_scannable;
|
2022-08-13 01:26:00 +00:00
|
|
|
rstl::pair< CAssetId, CAssetId > x44_xrayAssets;
|
|
|
|
rstl::pair< CAssetId, CAssetId > x4c_thermalAssets;
|
2022-11-04 03:46:49 +00:00
|
|
|
CVisorParameters x54_visor;
|
|
|
|
uchar x58_24_useGlobalRenderTime : 1;
|
|
|
|
uchar x58_25_thermalHeat : 1;
|
|
|
|
uchar x58_26_forceRenderUnsorted : 1;
|
|
|
|
uchar x58_27_noSortThermal : 1;
|
2022-10-09 05:37:23 +00:00
|
|
|
float x5c_fadeInTime;
|
|
|
|
float x60_fadeOutTime;
|
|
|
|
float x64_thermalMag;
|
2022-08-13 01:26:00 +00:00
|
|
|
};
|
2022-11-04 00:09:51 +00:00
|
|
|
CHECK_SIZEOF(CActorParameters, 0x68)
|
2022-08-13 01:26:00 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CACTORPARAMETERS
|