mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #304 from AxioDL/remove-union-bitfields
Runtime: Replace bitfield unions with explicit initializers
This commit is contained in:
commit
304340bd35
|
@ -446,14 +446,9 @@ public:
|
|||
private:
|
||||
dspadpcm_header x0_header;
|
||||
std::string x60_fileName; // arg1
|
||||
union {
|
||||
u32 dummy = 0;
|
||||
struct {
|
||||
bool x70_24_unclaimed : 1;
|
||||
bool x70_25_headerReadCancelled : 1;
|
||||
u8 x70_26_headerReadState : 2; // 0: not read 1: reading 2: read
|
||||
};
|
||||
};
|
||||
bool x70_24_unclaimed : 1;
|
||||
bool x70_25_headerReadCancelled : 1;
|
||||
u8 x70_26_headerReadState : 2; // 0: not read 1: reading 2: read
|
||||
s8 x71_companionRight = -1;
|
||||
s8 x72_companionLeft = -1;
|
||||
float x73_volume = 0.f;
|
||||
|
@ -465,13 +460,16 @@ private:
|
|||
static std::array<CDSPStreamManager, 4> g_Streams;
|
||||
|
||||
public:
|
||||
CDSPStreamManager() { x70_24_unclaimed = true; }
|
||||
CDSPStreamManager() : x70_24_unclaimed(true), x70_25_headerReadCancelled(false), x70_26_headerReadState(0) {}
|
||||
|
||||
CDSPStreamManager(std::string_view fileName, s32 handle, float volume, bool oneshot)
|
||||
: x60_fileName(fileName), x73_volume(volume), x74_oneshot(oneshot), x78_handleId(handle) {
|
||||
if (!CDvdFile::FileExists(fileName))
|
||||
x70_24_unclaimed = true;
|
||||
}
|
||||
: x60_fileName(fileName)
|
||||
, x70_24_unclaimed(!CDvdFile::FileExists(fileName))
|
||||
, x70_25_headerReadCancelled(false)
|
||||
, x70_26_headerReadState(0)
|
||||
, x73_volume(volume)
|
||||
, x74_oneshot(oneshot)
|
||||
, x78_handleId(handle) {}
|
||||
|
||||
static s32 FindUnclaimedStreamIdx() {
|
||||
for (size_t i = 0; i < g_Streams.size(); ++i) {
|
||||
|
|
|
@ -212,10 +212,12 @@ void CGameOptions::PutTo(CBitStreamWriter& writer) const {
|
|||
writer.WriteEncoded(x68_27_swapBeamsControls, 1);
|
||||
}
|
||||
|
||||
CGameOptions::CGameOptions() {
|
||||
x68_24_hudLag = true;
|
||||
x68_26_rumble = true;
|
||||
x68_28_hintSystem = true;
|
||||
CGameOptions::CGameOptions()
|
||||
: x68_24_hudLag(true)
|
||||
, x68_25_invertY(false)
|
||||
, x68_26_rumble(true)
|
||||
, x68_27_swapBeamsControls(false)
|
||||
, x68_28_hintSystem(true) {
|
||||
InitSoundMode();
|
||||
}
|
||||
|
||||
|
|
|
@ -56,21 +56,21 @@ class CPersistentOptions {
|
|||
u32 xc4_frozenBallCount = 0;
|
||||
u32 xc8_powerBombAmmoCount = 0;
|
||||
u32 xcc_logScanPercent = 0;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool xd0_24_fusionLinked : 1;
|
||||
bool xd0_25_normalModeBeat : 1;
|
||||
bool xd0_26_hardModeBeat : 1;
|
||||
bool xd0_27_fusionBeat : 1;
|
||||
bool xd0_28_fusionSuitActive : 1;
|
||||
bool xd0_29_allItemsCollected : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
bool xd0_24_fusionLinked : 1;
|
||||
bool xd0_25_normalModeBeat : 1;
|
||||
bool xd0_26_hardModeBeat : 1;
|
||||
bool xd0_27_fusionBeat : 1;
|
||||
bool xd0_28_fusionSuitActive : 1;
|
||||
bool xd0_29_allItemsCollected : 1;
|
||||
|
||||
public:
|
||||
CPersistentOptions() = default;
|
||||
CPersistentOptions()
|
||||
: xd0_24_fusionLinked(false)
|
||||
, xd0_25_normalModeBeat(false)
|
||||
, xd0_26_hardModeBeat(false)
|
||||
, xd0_27_fusionBeat(false)
|
||||
, xd0_28_fusionSuitActive(false)
|
||||
, xd0_29_allItemsCollected(false) {}
|
||||
explicit CPersistentOptions(CBitStreamReader& stream);
|
||||
|
||||
bool GetCinematicState(CAssetId mlvlId, TEditorId cineId) const;
|
||||
|
@ -116,22 +116,15 @@ class CGameOptions {
|
|||
u32 x5c_musicVol = 0x7f;
|
||||
u32 x60_hudAlpha = 0xff;
|
||||
u32 x64_helmetAlpha = 0xff;
|
||||
bool x68_24_hudLag : 1;
|
||||
bool x68_25_invertY : 1;
|
||||
bool x68_26_rumble : 1;
|
||||
bool x68_27_swapBeamsControls : 1;
|
||||
bool x68_28_hintSystem : 1;
|
||||
std::vector<std::pair<CAssetId, CAssetId>> x6c_controlTxtrMap;
|
||||
|
||||
s32 m_gamma = 0;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x68_24_hudLag : 1;
|
||||
bool x68_25_invertY : 1;
|
||||
bool x68_26_rumble : 1;
|
||||
bool x68_27_swapBeamsControls : 1;
|
||||
bool x68_28_hintSystem : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
|
||||
std::vector<std::pair<CAssetId, CAssetId>> x6c_controlTxtrMap;
|
||||
|
||||
public:
|
||||
CGameOptions();
|
||||
explicit CGameOptions(CBitStreamReader& stream);
|
||||
|
|
|
@ -137,6 +137,7 @@ CGameState::GameFileStateInfo CGameState::LoadGameFileState(const u8* data) {
|
|||
CGameState::CGameState() {
|
||||
x98_playerState = std::make_shared<CPlayerState>();
|
||||
x9c_transManager = std::make_shared<CWorldTransManager>();
|
||||
x228_24_hardMode = false;
|
||||
x228_25_initPowerupsAtFirstSpawn = true;
|
||||
if (g_MemoryCardSys)
|
||||
InitializeMemoryStates();
|
||||
|
@ -144,6 +145,7 @@ CGameState::CGameState() {
|
|||
|
||||
CGameState::CGameState(CBitStreamReader& stream, u32 saveIdx) : x20c_saveFileIdx(saveIdx) {
|
||||
x9c_transManager = std::make_shared<CWorldTransManager>();
|
||||
x228_24_hardMode = false;
|
||||
x228_25_initPowerupsAtFirstSpawn = true;
|
||||
|
||||
for (bool& value : x0_) {
|
||||
|
|
|
@ -81,14 +81,8 @@ class CGameState {
|
|||
u32 x20c_saveFileIdx = 0;
|
||||
u64 x210_cardSerial = 0;
|
||||
std::vector<u8> x218_backupBuf;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x228_24_hardMode : 1;
|
||||
bool x228_25_initPowerupsAtFirstSpawn : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
bool x228_24_hardMode : 1;
|
||||
bool x228_25_initPowerupsAtFirstSpawn : 1;
|
||||
|
||||
public:
|
||||
CGameState();
|
||||
|
|
|
@ -8,6 +8,7 @@ CPakFile::CPakFile(std::string_view filename, bool buildDepList, bool worldPak,
|
|||
Log.report(logvisor::Fatal, fmt("{}: Unable to open"), GetPath());
|
||||
x28_24_buildDepList = buildDepList;
|
||||
//x28_24_buildDepList = true; // Always do this so URDE can rapidly pre-warm shaders
|
||||
x28_25_aramFile = false;
|
||||
x28_26_worldPak = worldPak;
|
||||
x28_27_stashedInARAM = false;
|
||||
m_override = override;
|
||||
|
|
|
@ -36,16 +36,11 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
union {
|
||||
struct {
|
||||
bool x28_24_buildDepList : 1;
|
||||
bool x28_25_aramFile : 1;
|
||||
bool x28_26_worldPak : 1;
|
||||
bool x28_27_stashedInARAM : 1;
|
||||
bool m_override : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x28_24_buildDepList : 1;
|
||||
bool x28_25_aramFile : 1;
|
||||
bool x28_26_worldPak : 1;
|
||||
bool x28_27_stashedInARAM : 1;
|
||||
bool m_override : 1;
|
||||
enum class EAsyncPhase {
|
||||
Warmup = 0,
|
||||
InitialHeader = 1,
|
||||
|
|
|
@ -74,13 +74,13 @@ constexpr std::array<float, 5> ComboAmmoPeriods{
|
|||
};
|
||||
} // Anonymous namespace
|
||||
|
||||
CPlayerState::CPlayerState() : x188_staticIntf(5) {
|
||||
x0_24_alive = true;
|
||||
CPlayerState::CPlayerState()
|
||||
: x0_24_alive(true), x0_25_firingComboBeam(false), x0_26_fusion(false), x188_staticIntf(5) {
|
||||
x24_powerups.resize(41);
|
||||
}
|
||||
|
||||
CPlayerState::CPlayerState(CBitStreamReader& stream) : x188_staticIntf(5) {
|
||||
x0_24_alive = true;
|
||||
CPlayerState::CPlayerState(CBitStreamReader& stream)
|
||||
: x0_24_alive(true), x0_25_firingComboBeam(false), x0_26_fusion(false), x188_staticIntf(5) {
|
||||
x4_enabledItems = u32(stream.ReadEncoded(32));
|
||||
|
||||
const u32 integralHP = u32(stream.ReadEncoded(32));
|
||||
|
|
|
@ -94,15 +94,9 @@ private:
|
|||
constexpr CPowerUp() = default;
|
||||
constexpr CPowerUp(u32 amount, u32 capacity) : x0_amount(amount), x4_capacity(capacity) {}
|
||||
};
|
||||
union {
|
||||
struct {
|
||||
bool x0_24_alive : 1;
|
||||
bool x0_25_firingComboBeam : 1;
|
||||
bool x0_26_fusion : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
|
||||
bool x0_24_alive : 1;
|
||||
bool x0_25_firingComboBeam : 1;
|
||||
bool x0_26_fusion : 1;
|
||||
u32 x4_enabledItems = 0;
|
||||
EBeamId x8_currentBeam = EBeamId::Power;
|
||||
CHealthInfo xc_health = {99.f, 50.f};
|
||||
|
|
|
@ -62,7 +62,14 @@ CStateManager::CStateManager(const std::weak_ptr<CRelayTracker>& relayTracker,
|
|||
, x8bc_relayTracker(relayTracker)
|
||||
, x8c0_mapWorldInfo(mwInfo)
|
||||
, x8c4_worldTransManager(wtMgr)
|
||||
, x8c8_worldLayerState(layerState) {
|
||||
, x8c8_worldLayerState(layerState)
|
||||
, xf94_24_readyToRender(false)
|
||||
, xf94_25_quitGame(false)
|
||||
, xf94_26_generatingObject(false)
|
||||
, xf94_27_inMapScreen(false)
|
||||
, xf94_28_inSaveUI(false)
|
||||
, xf94_29_cinematicPause(false)
|
||||
, xf94_30_fullThreat(false) {
|
||||
x86c_stateManagerContainer = std::make_unique<CStateManagerContainer>();
|
||||
x870_cameraManager = &x86c_stateManagerContainer->x0_cameraManager;
|
||||
x874_sortedListManager = &x86c_stateManagerContainer->x3c0_sortedListManager;
|
||||
|
|
|
@ -202,19 +202,13 @@ private:
|
|||
CAssetId xf88_;
|
||||
float xf8c_ = 0.f;
|
||||
EStateManagerTransition xf90_deferredTransition = EStateManagerTransition::InGame;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool xf94_24_readyToRender : 1;
|
||||
bool xf94_25_quitGame : 1;
|
||||
bool xf94_26_generatingObject : 1;
|
||||
bool xf94_27_inMapScreen : 1;
|
||||
bool xf94_28_inSaveUI : 1;
|
||||
bool xf94_29_cinematicPause : 1;
|
||||
bool xf94_30_fullThreat : 1;
|
||||
};
|
||||
u32 xf94_ = 0;
|
||||
};
|
||||
bool xf94_24_readyToRender : 1;
|
||||
bool xf94_25_quitGame : 1;
|
||||
bool xf94_26_generatingObject : 1;
|
||||
bool xf94_27_inMapScreen : 1;
|
||||
bool xf94_28_inSaveUI : 1;
|
||||
bool xf94_29_cinematicPause : 1;
|
||||
bool xf94_30_fullThreat : 1;
|
||||
|
||||
CColoredQuadFilter m_deathWhiteout{EFilterType::Add};
|
||||
CColoredQuadFilter m_escapeWhiteout{EFilterType::Add};
|
||||
|
|
|
@ -21,9 +21,15 @@
|
|||
namespace urde {
|
||||
float CCameraManager::sFirstPersonFOV = 55.f;
|
||||
|
||||
CCameraManager::CCameraManager(TUniqueId curCameraId) : x0_curCameraId(curCameraId) {
|
||||
CSfxManager::AddListener(CSfxManager::ESfxChannels::Game, zeus::skZero3f, zeus::skZero3f,
|
||||
{1.f, 0.f, 0.f}, {0.f, 0.f, 1.f}, 50.f, 50.f, 1000.f, 1, 1.f);
|
||||
CCameraManager::CCameraManager(TUniqueId curCameraId)
|
||||
: x0_curCameraId(curCameraId)
|
||||
, xa0_24_pendingRumble(false)
|
||||
, xa0_25_rumbling(false)
|
||||
, xa0_26_inWater(false)
|
||||
, x3b8_24_(false)
|
||||
, x3b8_25_(false) {
|
||||
CSfxManager::AddListener(CSfxManager::ESfxChannels::Game, zeus::skZero3f, zeus::skZero3f, {1.f, 0.f, 0.f},
|
||||
{0.f, 0.f, 1.f}, 50.f, 50.f, 1000.f, 1, 1.f);
|
||||
sFirstPersonFOV = g_tweakGame->GetFirstPersonFOV();
|
||||
}
|
||||
|
||||
|
|
|
@ -40,16 +40,9 @@ class CCameraManager {
|
|||
float x94_fogDensityFactor = 1.f;
|
||||
float x98_fogDensitySpeed = 0.f;
|
||||
float x9c_fogDensityFactorTarget = 1.f;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool xa0_24_pendingRumble : 1;
|
||||
bool xa0_25_rumbling : 1;
|
||||
bool xa0_26_inWater : 1;
|
||||
};
|
||||
u8 _dummy1 = 0;
|
||||
};
|
||||
|
||||
bool xa0_24_pendingRumble : 1;
|
||||
bool xa0_25_rumbling : 1;
|
||||
bool xa0_26_inWater : 1;
|
||||
TUniqueId xa2_spindleCamId = kInvalidUniqueId;
|
||||
TUniqueId xa4_pathCamId = kInvalidUniqueId;
|
||||
TUniqueId xa6_camHintId = kInvalidUniqueId;
|
||||
|
@ -57,15 +50,8 @@ class CCameraManager {
|
|||
rstl::reserved_vector<std::pair<s32, TUniqueId>, 64> xac_cameraHints;
|
||||
rstl::reserved_vector<TUniqueId, 64> x2b0_inactiveCameraHints;
|
||||
rstl::reserved_vector<TUniqueId, 64> x334_activeCameraHints;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x3b8_24_ : 1;
|
||||
bool x3b8_25_ : 1;
|
||||
};
|
||||
u8 _dummy2;
|
||||
};
|
||||
|
||||
bool x3b8_24_ : 1;
|
||||
bool x3b8_25_ : 1;
|
||||
float x3bc_curFov = 60.f;
|
||||
|
||||
void SetPathCamera(TUniqueId id, CStateManager& mgr);
|
||||
|
|
|
@ -18,20 +18,22 @@ s32 CActorLights::sFrameSchedulerCount = 0;
|
|||
CActorLights::CActorLights(u32 areaUpdateFramePeriod, const zeus::CVector3f& actorPosBias, int maxDynamicLights,
|
||||
int maxAreaLights, bool ambientChannelOverflow, bool layer2, bool disableWorldLights,
|
||||
float positionUpdateThreshold)
|
||||
: x2a8_areaUpdateFramePeriod(areaUpdateFramePeriod)
|
||||
: x298_24_dirty(true)
|
||||
, x298_25_castShadows(true)
|
||||
, x298_26_hasAreaLights(false)
|
||||
, x298_27_findShadowLight(false)
|
||||
, x298_28_inArea(!disableWorldLights && maxAreaLights > 0)
|
||||
, x298_29_ambienceGenerated(ambientChannelOverflow)
|
||||
, x298_30_layer2(layer2)
|
||||
, x298_31_disableWorldLights(disableWorldLights)
|
||||
, x299_24_inBrightLight(true)
|
||||
, x299_25_useBrightLightLag(false)
|
||||
, x299_26_ambientOnly(false)
|
||||
, x2a8_areaUpdateFramePeriod(areaUpdateFramePeriod)
|
||||
, x2ac_actorPosBias(actorPosBias)
|
||||
, x2b8_maxAreaLights(maxAreaLights)
|
||||
, x2bc_maxDynamicLights(maxDynamicLights)
|
||||
, x2cc_actorPositionDeltaUpdateThreshold(positionUpdateThreshold * positionUpdateThreshold) {
|
||||
x298_24_dirty = true;
|
||||
x298_25_castShadows = true;
|
||||
|
||||
x298_28_inArea = !disableWorldLights && maxAreaLights > 0;
|
||||
x298_29_ambienceGenerated = ambientChannelOverflow;
|
||||
x298_30_layer2 = layer2;
|
||||
x298_31_disableWorldLights = disableWorldLights;
|
||||
x299_24_inBrightLight = true;
|
||||
|
||||
sFrameSchedulerCount++;
|
||||
sFrameSchedulerCount &= 7;
|
||||
}
|
||||
|
|
|
@ -20,23 +20,17 @@ class CActorLights {
|
|||
std::vector<CLight> x144_dynamicLights;
|
||||
zeus::CColor x288_ambientColor = zeus::skBlack;
|
||||
TAreaId x294_aid = kInvalidAreaId;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x298_24_dirty : 1;
|
||||
bool x298_25_castShadows : 1;
|
||||
bool x298_26_hasAreaLights : 1;
|
||||
bool x298_27_findShadowLight : 1;
|
||||
bool x298_28_inArea : 1;
|
||||
bool x298_29_ambienceGenerated : 1;
|
||||
bool x298_30_layer2 : 1;
|
||||
bool x298_31_disableWorldLights : 1;
|
||||
bool x299_24_inBrightLight : 1;
|
||||
bool x299_25_useBrightLightLag : 1;
|
||||
bool x299_26_ambientOnly : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
bool x298_24_dirty : 1;
|
||||
bool x298_25_castShadows : 1;
|
||||
bool x298_26_hasAreaLights : 1;
|
||||
bool x298_27_findShadowLight : 1;
|
||||
bool x298_28_inArea : 1;
|
||||
bool x298_29_ambienceGenerated : 1;
|
||||
bool x298_30_layer2 : 1;
|
||||
bool x298_31_disableWorldLights : 1;
|
||||
bool x299_24_inBrightLight : 1;
|
||||
bool x299_25_useBrightLightLag : 1;
|
||||
bool x299_26_ambientOnly : 1;
|
||||
bool x29a_findNearestDynamicLights = false;
|
||||
s32 x29c_shadowLightArrIdx = -1;
|
||||
s32 x2a0_shadowLightIdx = -1;
|
||||
|
|
|
@ -45,9 +45,9 @@ CAnimData::CAnimData(CAssetId id, const CCharacterInfo& character, int defaultAn
|
|||
const std::weak_ptr<CAnimSysContext>& ctx, std::shared_ptr<CAnimationManager> animMgr,
|
||||
std::shared_ptr<CTransitionManager> transMgr, TLockedToken<CCharacterFactory> charFactory,
|
||||
int drawInstCount)
|
||||
: x0_charFactory(std::move(charFactory))
|
||||
: x0_charFactory(charFactory)
|
||||
, xc_charInfo(character)
|
||||
, xcc_layoutData(std::move(layout))
|
||||
, xcc_layoutData(layout)
|
||||
, xd8_modelData(std::move(model))
|
||||
, xfc_animCtx(ctx.lock())
|
||||
, x100_animMgr(std::move(animMgr))
|
||||
|
@ -55,6 +55,14 @@ CAnimData::CAnimData(CAssetId id, const CCharacterInfo& character, int defaultAn
|
|||
, x1fc_transMgr(std::move(transMgr))
|
||||
, x204_charIdx(charIdx)
|
||||
, x208_defaultAnim(defaultAnim)
|
||||
, x220_24_animating(false)
|
||||
, x220_25_loop(false)
|
||||
, x220_26_aligningPos(false)
|
||||
, x220_27_(false)
|
||||
, x220_28_(false)
|
||||
, x220_29_animationJustStarted(false)
|
||||
, x220_30_poseBuilt(false)
|
||||
, x220_31_poseCached(false)
|
||||
, x224_pose(layout->GetSegIdList().GetList().size())
|
||||
, x2fc_poseBuilder(CLayoutDescription{layout})
|
||||
, m_drawInstCount(drawInstCount) {
|
||||
|
|
|
@ -124,21 +124,14 @@ private:
|
|||
u32 x214_passedParticleCount = 0;
|
||||
u32 x218_passedSoundCount = 0;
|
||||
s32 x21c_particleLightIdx = 0;
|
||||
|
||||
union {
|
||||
u32 x220_flags = 0;
|
||||
struct {
|
||||
bool x220_24_animating : 1;
|
||||
bool x220_25_loop : 1;
|
||||
bool x220_26_aligningPos : 1;
|
||||
bool x220_27_ : 1;
|
||||
bool x220_28_ : 1;
|
||||
bool x220_29_animationJustStarted : 1;
|
||||
bool x220_30_poseBuilt : 1;
|
||||
bool x220_31_poseCached : 1;
|
||||
};
|
||||
};
|
||||
|
||||
bool x220_24_animating : 1;
|
||||
bool x220_25_loop : 1;
|
||||
bool x220_26_aligningPos : 1;
|
||||
bool x220_27_ : 1;
|
||||
bool x220_28_ : 1;
|
||||
bool x220_29_animationJustStarted : 1;
|
||||
bool x220_30_poseBuilt : 1;
|
||||
bool x220_31_poseCached : 1;
|
||||
CPoseAsTransforms x224_pose;
|
||||
CHierarchyPoseBuilder x2fc_poseBuilder;
|
||||
|
||||
|
|
|
@ -12,8 +12,15 @@
|
|||
namespace urde {
|
||||
|
||||
CBodyController::CBodyController(CActor& actor, float turnSpeed, EBodyType bodyType)
|
||||
: x0_actor(actor), x2a4_bodyStateInfo(actor, bodyType), x2f4_bodyType(bodyType), x2fc_turnSpeed(turnSpeed) {
|
||||
x300_28_playDeathAnims = true;
|
||||
: x0_actor(actor)
|
||||
, x2a4_bodyStateInfo(actor, bodyType)
|
||||
, x2f4_bodyType(bodyType)
|
||||
, x2fc_turnSpeed(turnSpeed)
|
||||
, x300_24_animationOver(false)
|
||||
, x300_25_active(false)
|
||||
, x300_26_frozen(false)
|
||||
, x300_27_hasBeenFrozen(false)
|
||||
, x300_28_playDeathAnims(true) {
|
||||
x2a4_bodyStateInfo.x18_bodyController = this;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,16 +28,11 @@ class CBodyController {
|
|||
EBodyType x2f4_bodyType;
|
||||
s32 x2f8_curAnim = -1;
|
||||
float x2fc_turnSpeed;
|
||||
union {
|
||||
struct {
|
||||
bool x300_24_animationOver : 1;
|
||||
bool x300_25_active : 1;
|
||||
bool x300_26_frozen : 1;
|
||||
bool x300_27_hasBeenFrozen : 1;
|
||||
bool x300_28_playDeathAnims : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x300_24_animationOver : 1;
|
||||
bool x300_25_active : 1;
|
||||
bool x300_26_frozen : 1;
|
||||
bool x300_27_hasBeenFrozen : 1;
|
||||
bool x300_28_playDeathAnims : 1;
|
||||
float x304_intoFreezeDur = 0.f;
|
||||
float x308_frozenDur = 0.f;
|
||||
float x30c_breakoutDur = 0.f;
|
||||
|
|
|
@ -202,22 +202,23 @@ class CBSJump : public CBodyState {
|
|||
zeus::CVector3f xc_waypoint1;
|
||||
zeus::CVector3f x18_velocity;
|
||||
zeus::CVector3f x24_waypoint2;
|
||||
union {
|
||||
struct {
|
||||
bool x30_24_bodyForceSet : 1;
|
||||
bool x30_25_wallJump : 1;
|
||||
bool x30_26_wallBounceRight : 1;
|
||||
bool x30_27_wallBounceComplete : 1;
|
||||
bool x30_28_startInJumpLoop : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x30_24_bodyForceSet : 1;
|
||||
bool x30_25_wallJump : 1;
|
||||
bool x30_26_wallBounceRight : 1;
|
||||
bool x30_27_wallBounceComplete : 1;
|
||||
bool x30_28_startInJumpLoop : 1;
|
||||
pas::EAnimationState GetBodyStateTransition(float dt, const CBodyController& bc) const;
|
||||
bool CheckForWallJump(CBodyController& bc, CStateManager& mgr);
|
||||
void CheckForLand(CBodyController& bc, CStateManager& mgr);
|
||||
void PlayJumpLoop(CStateManager& mgr, CBodyController& bc);
|
||||
|
||||
public:
|
||||
CBSJump()
|
||||
: x30_24_bodyForceSet(false)
|
||||
, x30_25_wallJump(false)
|
||||
, x30_26_wallBounceRight(false)
|
||||
, x30_27_wallBounceComplete(false)
|
||||
, x30_28_startInJumpLoop(false) {}
|
||||
bool IsMoving() const override { return true; }
|
||||
bool ApplyHeadTracking() const override { return false; }
|
||||
bool CanShoot() const override;
|
||||
|
@ -277,17 +278,13 @@ public:
|
|||
};
|
||||
|
||||
class CBSScripted : public CBodyState {
|
||||
union {
|
||||
struct {
|
||||
bool x4_24_loopAnim : 1;
|
||||
bool x4_25_timedLoop : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x4_24_loopAnim : 1;
|
||||
bool x4_25_timedLoop : 1;
|
||||
float x8_remTime = 0.f;
|
||||
pas::EAnimationState GetBodyStateTransition(float dt, const CBodyController& bc) const;
|
||||
|
||||
public:
|
||||
CBSScripted() : x4_24_loopAnim(false), x4_25_timedLoop(false) {}
|
||||
bool ApplyHeadTracking() const override { return false; }
|
||||
void Start(CBodyController& bc, CStateManager& mgr) override;
|
||||
pas::EAnimationState UpdateBody(float dt, CBodyController& bc, CStateManager& mgr) override;
|
||||
|
@ -313,13 +310,8 @@ class CBSWallHang : public CBodyState {
|
|||
pas::EWallHangState x4_state = pas::EWallHangState::Invalid;
|
||||
TUniqueId x8_wpId = kInvalidUniqueId;
|
||||
zeus::CVector3f xc_launchVel;
|
||||
union {
|
||||
struct {
|
||||
bool x18_24_launched : 1;
|
||||
bool x18_25_needsExit : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x18_24_launched : 1;
|
||||
bool x18_25_needsExit : 1;
|
||||
pas::EAnimationState GetBodyStateTransition(float dt, const CBodyController& bc) const;
|
||||
void FixInPlace(CBodyController& bc);
|
||||
bool CheckForLand(CBodyController& bc, CStateManager& mgr);
|
||||
|
@ -327,6 +319,7 @@ class CBSWallHang : public CBodyState {
|
|||
void SetLaunchVelocity(CBodyController& bc);
|
||||
|
||||
public:
|
||||
CBSWallHang() : x18_24_launched(false), x18_25_needsExit(false) {}
|
||||
bool IsMoving() const override { return true; }
|
||||
bool CanShoot() const override { return x4_state == pas::EWallHangState::WallHang; }
|
||||
bool IsInAir(const CBodyController& bc) const override;
|
||||
|
|
|
@ -15,6 +15,8 @@ CBoneTracking::CBoneTracking(const CAnimData& animData, std::string_view bone,
|
|||
: x14_segId(animData.GetCharLayoutInfo().GetSegIdFromString(bone))
|
||||
, x1c_maxTrackingAngle(maxTrackingAngle)
|
||||
, x20_angSpeed(angSpeed)
|
||||
, x36_24_active(false)
|
||||
, x36_25_hasTrackedRotation(false)
|
||||
, x36_26_noParent(True(flags & EBoneTrackingFlags::NoParent))
|
||||
, x36_27_noParentOrigin(True(flags & EBoneTrackingFlags::NoParentOrigin))
|
||||
, x36_28_noHorizontalAim(True(flags & EBoneTrackingFlags::NoHorizontalAim))
|
||||
|
|
|
@ -33,17 +33,12 @@ class CBoneTracking {
|
|||
float x20_angSpeed;
|
||||
std::optional<zeus::CVector3f> x24_targetPosition;
|
||||
TUniqueId x34_target = kInvalidUniqueId;
|
||||
union {
|
||||
struct {
|
||||
bool x36_24_active : 1;
|
||||
bool x36_25_hasTrackedRotation : 1;
|
||||
bool x36_26_noParent : 1;
|
||||
bool x36_27_noParentOrigin : 1;
|
||||
bool x36_28_noHorizontalAim : 1;
|
||||
bool x36_29_parentIk : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x36_24_active : 1;
|
||||
bool x36_25_hasTrackedRotation : 1;
|
||||
bool x36_26_noParent : 1;
|
||||
bool x36_27_noParentOrigin : 1;
|
||||
bool x36_28_noHorizontalAim : 1;
|
||||
bool x36_29_parentIk : 1;
|
||||
|
||||
public:
|
||||
CBoneTracking(const CAnimData& animData, std::string_view bone,
|
||||
|
|
|
@ -21,16 +21,10 @@ class CIkChain {
|
|||
zeus::CQuaternion x24_holdRot;
|
||||
zeus::CVector3f x34_holdPos;
|
||||
float x40_time = 0.f;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x44_24_activated : 1;
|
||||
};
|
||||
u32 x44_dummy = 0;
|
||||
};
|
||||
bool x44_24_activated : 1;
|
||||
|
||||
public:
|
||||
CIkChain() = default;
|
||||
CIkChain() : x44_24_activated(false) {}
|
||||
|
||||
bool GetActive() const { return x44_24_activated; }
|
||||
void Update(float);
|
||||
|
|
|
@ -25,14 +25,16 @@ CModelData::~CModelData() = default;
|
|||
CModelData::CModelData() {}
|
||||
CModelData CModelData::CModelDataNull() { return CModelData(); }
|
||||
|
||||
CModelData::CModelData(const CStaticRes& res, int instCount) : x0_scale(res.GetScale()), m_drawInstCount(instCount) {
|
||||
CModelData::CModelData(const CStaticRes& res, int instCount)
|
||||
: x0_scale(res.GetScale()), x14_24_renderSorted(false), x14_25_sortThermal(false), m_drawInstCount(instCount) {
|
||||
x1c_normalModel = g_SimplePool->GetObj({SBIG('CMDL'), res.GetId()});
|
||||
if (!x1c_normalModel)
|
||||
Log.report(logvisor::Fatal, fmt("unable to find CMDL {}"), res.GetId());
|
||||
m_normalModelInst = x1c_normalModel->MakeNewInstance(0, instCount);
|
||||
}
|
||||
|
||||
CModelData::CModelData(const CAnimRes& res, int instCount) : x0_scale(res.GetScale()), m_drawInstCount(instCount) {
|
||||
CModelData::CModelData(const CAnimRes& res, int instCount)
|
||||
: x0_scale(res.GetScale()), x14_24_renderSorted(false), x14_25_sortThermal(false), m_drawInstCount(instCount) {
|
||||
TToken<CCharacterFactory> factory = g_CharFactoryBuilder->GetFactory(res);
|
||||
x10_animData =
|
||||
factory->CreateCharacter(res.GetCharacterNodeId(), res.CanLoop(), factory, res.GetDefaultAnim(), instCount);
|
||||
|
@ -76,13 +78,13 @@ bool CModelData::IsLoaded(int shaderIdx) const {
|
|||
}
|
||||
|
||||
u32 CModelData::GetNumMaterialSets() const {
|
||||
if (x10_animData)
|
||||
return x10_animData->GetModelData()->GetModel()->GetNumMaterialSets();
|
||||
if (x10_animData)
|
||||
return x10_animData->GetModelData()->GetModel()->GetNumMaterialSets();
|
||||
|
||||
if (x1c_normalModel)
|
||||
return x1c_normalModel->GetNumMaterialSets();
|
||||
if (x1c_normalModel)
|
||||
return x1c_normalModel->GetNumMaterialSets();
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
CModelData::EWhichModel CModelData::GetRenderingModel(const CStateManager& stateMgr) {
|
||||
|
|
|
@ -62,13 +62,8 @@ class CModelData {
|
|||
zeus::CVector3f x0_scale;
|
||||
bool xc_ = false;
|
||||
std::unique_ptr<CAnimData> x10_animData;
|
||||
union {
|
||||
struct {
|
||||
bool x14_24_renderSorted : 1;
|
||||
bool x14_25_sortThermal : 1;
|
||||
};
|
||||
u32 _flags = 0;
|
||||
};
|
||||
bool x14_24_renderSorted : 1;
|
||||
bool x14_25_sortThermal : 1;
|
||||
zeus::CColor x18_ambientColor;
|
||||
|
||||
TLockedToken<CModel> x1c_normalModel;
|
||||
|
|
|
@ -59,11 +59,15 @@ void CRagDoll::CRagDollPlaneConstraint::Update() {
|
|||
}
|
||||
|
||||
CRagDoll::CRagDoll(float normalGravity, float floatingGravity, float overTime, u32 flags)
|
||||
: x44_normalGravity(normalGravity), x48_floatingGravity(floatingGravity), x50_overTimer(overTime) {
|
||||
x68_27_continueSmallMovements = bool(flags & 0x1);
|
||||
x68_28_noOverTimer = bool(flags & 0x2);
|
||||
x68_29_noAiCollision = bool(flags & 0x4);
|
||||
}
|
||||
: x44_normalGravity(normalGravity)
|
||||
, x48_floatingGravity(floatingGravity)
|
||||
, x50_overTimer(overTime)
|
||||
, x68_24_prevMovingSlowly(false)
|
||||
, x68_25_over(false)
|
||||
, x68_26_primed(false)
|
||||
, x68_27_continueSmallMovements(bool(flags & 0x1))
|
||||
, x68_28_noOverTimer(bool(flags & 0x2))
|
||||
, x68_29_noAiCollision(bool(flags & 0x4)) {}
|
||||
|
||||
void CRagDoll::AccumulateForces(float dt, float waterTop) {
|
||||
float fps = 1.f / dt;
|
||||
|
|
|
@ -94,17 +94,12 @@ protected:
|
|||
float x54_impactVel = 0.f;
|
||||
zeus::CVector3f x58_averageVel;
|
||||
float x64_angTimer = 0.f;
|
||||
union {
|
||||
struct {
|
||||
bool x68_24_prevMovingSlowly : 1;
|
||||
bool x68_25_over : 1;
|
||||
bool x68_26_primed : 1;
|
||||
bool x68_27_continueSmallMovements : 1;
|
||||
bool x68_28_noOverTimer : 1;
|
||||
bool x68_29_noAiCollision : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x68_24_prevMovingSlowly : 1;
|
||||
bool x68_25_over : 1;
|
||||
bool x68_26_primed : 1;
|
||||
bool x68_27_continueSmallMovements : 1;
|
||||
bool x68_28_noOverTimer : 1;
|
||||
bool x68_29_noAiCollision : 1;
|
||||
void AccumulateForces(float dt, float waterTop);
|
||||
void SetNumParticles(int num) { x4_particles.reserve(num); }
|
||||
void AddParticle(CSegId id, const zeus::CVector3f& prevPos, const zeus::CVector3f& curPos, float radius);
|
||||
|
|
|
@ -173,16 +173,12 @@ public:
|
|||
class CAreaCollisionCache {
|
||||
zeus::CAABox x0_aabb;
|
||||
rstl::reserved_vector<CMetroidAreaCollider::COctreeLeafCache, 3> x18_leafCaches;
|
||||
union {
|
||||
struct {
|
||||
bool x1b40_24_leafOverflow : 1;
|
||||
bool x1b40_25_cacheOverflow : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x1b40_24_leafOverflow : 1;
|
||||
bool x1b40_25_cacheOverflow : 1;
|
||||
|
||||
public:
|
||||
explicit CAreaCollisionCache(const zeus::CAABox& aabb) : x0_aabb(aabb) {}
|
||||
explicit CAreaCollisionCache(const zeus::CAABox& aabb)
|
||||
: x0_aabb(aabb), x1b40_24_leafOverflow(false), x1b40_25_cacheOverflow(false) {}
|
||||
void ClearCache();
|
||||
const zeus::CAABox& GetCacheBounds() const { return x0_aabb; }
|
||||
void SetCacheBounds(const zeus::CAABox& aabb) { x0_aabb = aabb; }
|
||||
|
|
|
@ -681,7 +681,16 @@ void CBooRenderer::LoadBallFade() {
|
|||
}
|
||||
|
||||
CBooRenderer::CBooRenderer(IObjectStore& store, IFactory& resFac)
|
||||
: x8_factory(resFac), xc_store(store), x2a8_thermalRand(20) {
|
||||
: x8_factory(resFac), xc_store(store), x2a8_thermalRand(20)
|
||||
, x318_24_refectionDirty(false)
|
||||
, x318_25_drawWireframe(false)
|
||||
, x318_26_requestRGBA6(false)
|
||||
, x318_27_currentRGBA6(false)
|
||||
, x318_28_disableFog(false)
|
||||
, x318_29_thermalVisor(false)
|
||||
, x318_30_inAreaDraw(false)
|
||||
, x318_31_persistRGBA6(false)
|
||||
, m_thermalHotPass(false) {
|
||||
g_Renderer = this;
|
||||
xee_24_ = true;
|
||||
|
||||
|
|
|
@ -152,20 +152,15 @@ class CBooRenderer final : public IRenderer {
|
|||
// std::unique_ptr<CTexture> x314_phazonSuitMask;
|
||||
CPhazonSuitFilter m_phazonSuitFilter;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x318_24_refectionDirty : 1;
|
||||
bool x318_25_drawWireframe : 1;
|
||||
bool x318_26_requestRGBA6 : 1;
|
||||
bool x318_27_currentRGBA6 : 1;
|
||||
bool x318_28_disableFog : 1;
|
||||
bool x318_29_thermalVisor : 1;
|
||||
bool x318_30_inAreaDraw : 1;
|
||||
bool x318_31_persistRGBA6 : 1;
|
||||
bool m_thermalHotPass : 1;
|
||||
};
|
||||
u16 dummy = 0;
|
||||
};
|
||||
bool x318_24_refectionDirty : 1;
|
||||
bool x318_25_drawWireframe : 1;
|
||||
bool x318_26_requestRGBA6 : 1;
|
||||
bool x318_27_currentRGBA6 : 1;
|
||||
bool x318_28_disableFog : 1;
|
||||
bool x318_29_thermalVisor : 1;
|
||||
bool x318_30_inAreaDraw : 1;
|
||||
bool x318_31_persistRGBA6 : 1;
|
||||
bool m_thermalHotPass : 1;
|
||||
|
||||
void GenerateFogVolumeRampTex(boo::IGraphicsDataFactory::Context& ctx);
|
||||
void GenerateSphereRampTex(boo::IGraphicsDataFactory::Context& ctx);
|
||||
|
|
|
@ -140,10 +140,12 @@ u32 CMoviePlayer::THPAudioDecode(s16* buffer, const u8* audioFrame, bool stereo)
|
|||
}
|
||||
|
||||
CMoviePlayer::CMoviePlayer(const char* path, float preLoadSeconds, bool loop, bool deinterlace)
|
||||
: CDvdFile(path), xec_preLoadSeconds(preLoadSeconds) {
|
||||
xf4_24_loop = loop;
|
||||
m_deinterlace = deinterlace;
|
||||
|
||||
: CDvdFile(path)
|
||||
, xec_preLoadSeconds(preLoadSeconds)
|
||||
, xf4_24_loop(loop)
|
||||
, xf4_25_hasAudio(false)
|
||||
, xf4_26_fieldFlip(false)
|
||||
, m_deinterlace(deinterlace) {
|
||||
/* Read THP header information */
|
||||
u8 buf[64];
|
||||
SyncRead(buf, 64);
|
||||
|
|
|
@ -99,21 +99,15 @@ private:
|
|||
float xe8_curSeconds = 0.f;
|
||||
float xec_preLoadSeconds;
|
||||
u32 xf0_preLoadFrames = 0;
|
||||
bool xf4_24_loop : 1;
|
||||
bool xf4_25_hasAudio : 1;
|
||||
bool xf4_26_fieldFlip : 1;
|
||||
bool m_deinterlace : 1;
|
||||
u32 xf8_ = 0;
|
||||
u32 xfc_fieldIndex = 0;
|
||||
|
||||
std::unique_ptr<uint8_t[]> m_yuvBuf;
|
||||
|
||||
union {
|
||||
u32 m_dummy = 0;
|
||||
struct {
|
||||
bool xf4_24_loop : 1;
|
||||
bool xf4_25_hasAudio : 1;
|
||||
bool xf4_26_fieldFlip : 1;
|
||||
bool m_deinterlace : 1;
|
||||
};
|
||||
};
|
||||
|
||||
specter::View::ViewBlock m_viewVertBlock;
|
||||
boo::ObjToken<boo::IGraphicsBufferD> m_blockBuf;
|
||||
boo::ObjToken<boo::IGraphicsBufferD> m_vertBuf;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
namespace urde {
|
||||
|
||||
CErrorOutputWindow::CErrorOutputWindow(bool flag) : CIOWin("Error Output Window") {
|
||||
x18_24_ = false;
|
||||
x18_25_ = true;
|
||||
x18_26_ = true;
|
||||
x18_27_ = true;
|
||||
|
|
|
@ -11,16 +11,11 @@ public:
|
|||
|
||||
private:
|
||||
State x14_state = State::Zero;
|
||||
union {
|
||||
struct {
|
||||
bool x18_24_;
|
||||
bool x18_25_;
|
||||
bool x18_26_;
|
||||
bool x18_27_;
|
||||
bool x18_28_;
|
||||
};
|
||||
u16 dummy = 0;
|
||||
};
|
||||
bool x18_24_;
|
||||
bool x18_25_;
|
||||
bool x18_26_;
|
||||
bool x18_27_;
|
||||
bool x18_28_;
|
||||
const wchar_t* x1c_msg;
|
||||
|
||||
public:
|
||||
|
|
|
@ -11,7 +11,10 @@ CGuiSliderGroup::CGuiSliderGroup(const CGuiWidgetParms& parms, float min, float
|
|||
, xbc_maxVal(max)
|
||||
, xc0_roundedCurVal(def)
|
||||
, xc4_curVal(def)
|
||||
, xc8_increment(inc) {}
|
||||
, xc8_increment(inc)
|
||||
, xf4_24_inputPending(false)
|
||||
, m_mouseInside(false)
|
||||
, m_mouseDown(false) {}
|
||||
|
||||
void CGuiSliderGroup::SetSelectionChangedCallback(std::function<void(CGuiSliderGroup*, float)>&& func) {
|
||||
xd8_changeCallback = std::move(func);
|
||||
|
|
|
@ -22,14 +22,9 @@ private:
|
|||
std::array<CGuiWidget*, 2> xcc_sliderRangeWidgets{};
|
||||
std::function<void(CGuiSliderGroup*, float)> xd8_changeCallback;
|
||||
EState xf0_state = EState::None;
|
||||
union {
|
||||
struct {
|
||||
bool xf4_24_inputPending : 1;
|
||||
mutable bool m_mouseInside : 1;
|
||||
bool m_mouseDown : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool xf4_24_inputPending : 1;
|
||||
mutable bool m_mouseInside : 1;
|
||||
bool m_mouseDown : 1;
|
||||
|
||||
mutable float m_mouseT = 0.f;
|
||||
|
||||
|
|
|
@ -27,12 +27,11 @@ CHudEnergyInterface::CHudEnergyInterface(CGuiFrame& selHud, float tankEnergy, in
|
|||
: x0_hudType(hudType)
|
||||
, xc_tankEnergy(tankEnergy)
|
||||
, x10_totalEnergyTanks(totalEnergyTanks)
|
||||
, x14_numTanksFilled(numTanksFilled) {
|
||||
x1c_24_ = true;
|
||||
x1c_25_ = true;
|
||||
x1c_26_barDirty = true;
|
||||
x1c_27_energyLow = energyLow;
|
||||
|
||||
, x14_numTanksFilled(numTanksFilled)
|
||||
, x1c_24_(true)
|
||||
, x1c_25_(true)
|
||||
, x1c_26_barDirty(true)
|
||||
, x1c_27_energyLow(energyLow) {
|
||||
x20_textpane_energydigits = static_cast<CGuiTextPane*>(selHud.FindWidget("textpane_energydigits"));
|
||||
x24_meter_energytanks = static_cast<CAuiMeter*>(selHud.FindWidget("meter_energytanks"));
|
||||
x28_textpane_energywarning = static_cast<CGuiTextPane*>(selHud.FindWidget("textpane_energywarning"));
|
||||
|
@ -100,7 +99,7 @@ void CHudEnergyInterface::Update(float dt, float energyLowPulse) {
|
|||
x1c_26_barDirty = false;
|
||||
x18_cachedBarEnergy = x2c_energybart01_energybar->GetFilledEnergy();
|
||||
std::string string =
|
||||
fmt::format(fmt("{:02d}"), int(std::fmod(x18_cachedBarEnergy, CPlayerState::GetEnergyTankCapacity())));
|
||||
fmt::format(fmt("{:02d}"), int(std::fmod(x18_cachedBarEnergy, CPlayerState::GetEnergyTankCapacity())));
|
||||
x20_textpane_energydigits->TextSupport().SetText(string);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,15 +19,10 @@ class CHudEnergyInterface {
|
|||
int x10_totalEnergyTanks;
|
||||
int x14_numTanksFilled;
|
||||
float x18_cachedBarEnergy = 0.f;
|
||||
union {
|
||||
struct {
|
||||
bool x1c_24_ : 1;
|
||||
bool x1c_25_ : 1;
|
||||
bool x1c_26_barDirty : 1;
|
||||
bool x1c_27_energyLow : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
bool x1c_24_ : 1;
|
||||
bool x1c_25_ : 1;
|
||||
bool x1c_26_barDirty : 1;
|
||||
bool x1c_27_energyLow : 1;
|
||||
CGuiTextPane* x20_textpane_energydigits;
|
||||
CAuiMeter* x24_meter_energytanks;
|
||||
CGuiTextPane* x28_textpane_energywarning;
|
||||
|
|
|
@ -8,12 +8,12 @@ namespace urde {
|
|||
|
||||
CHudFreeLookInterface::CHudFreeLookInterface(CGuiFrame& selHud, EHudType hudType, bool inFreeLook, bool lookControlHeld,
|
||||
bool lockedOnObj)
|
||||
: x4_hudType(hudType) {
|
||||
x70_24_inFreeLook = inFreeLook;
|
||||
x70_25_lookControlHeld = lookControlHeld;
|
||||
x70_26_lockedOnObj = lockedOnObj;
|
||||
x70_27_visibleDebug = true;
|
||||
x70_28_visibleGame = true;
|
||||
: x4_hudType(hudType)
|
||||
, x70_24_inFreeLook(inFreeLook)
|
||||
, x70_25_lookControlHeld(lookControlHeld)
|
||||
, x70_26_lockedOnObj(lockedOnObj)
|
||||
, x70_27_visibleDebug(true)
|
||||
, x70_28_visibleGame(true) {
|
||||
x6c_lockOnInterp = (lockedOnObj && hudType == EHudType::Scan) ? 0.f : 1.f;
|
||||
|
||||
x74_basewidget_freelookleft = selHud.FindWidget("basewidget_freelookleft");
|
||||
|
|
|
@ -24,16 +24,11 @@ class CHudFreeLookInterface : public IFreeLookInterface {
|
|||
zeus::CTransform x38_freeLookRightXf;
|
||||
float x68_freeLookInterp = 0.f;
|
||||
float x6c_lockOnInterp;
|
||||
union {
|
||||
struct {
|
||||
bool x70_24_inFreeLook : 1;
|
||||
bool x70_25_lookControlHeld : 1;
|
||||
bool x70_26_lockedOnObj : 1;
|
||||
bool x70_27_visibleDebug : 1;
|
||||
bool x70_28_visibleGame : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
bool x70_24_inFreeLook : 1;
|
||||
bool x70_25_lookControlHeld : 1;
|
||||
bool x70_26_lockedOnObj : 1;
|
||||
bool x70_27_visibleDebug : 1;
|
||||
bool x70_28_visibleGame : 1;
|
||||
CGuiWidget* x74_basewidget_freelookleft;
|
||||
CGuiModel* x78_model_shieldleft;
|
||||
CGuiModel* x7c_model_freelookleft;
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
|
||||
namespace urde {
|
||||
|
||||
CHudHelmetInterface::CHudHelmetInterface(CGuiFrame& helmetFrame) {
|
||||
x3c_24_helmetVisibleDebug = true;
|
||||
x3c_25_helmetVisibleGame = true;
|
||||
x3c_26_glowVisibleDebug = true;
|
||||
x3c_27_glowVisibleGame = true;
|
||||
CHudHelmetInterface::CHudHelmetInterface(CGuiFrame& helmetFrame)
|
||||
: x3c_24_helmetVisibleDebug(true)
|
||||
, x3c_25_helmetVisibleGame(true)
|
||||
, x3c_26_glowVisibleDebug(true)
|
||||
, x3c_27_glowVisibleGame(true)
|
||||
, x3c_28_hudLagDirty(false) {
|
||||
x40_camera = helmetFrame.GetFrameCamera();
|
||||
x44_BaseWidget_Pivot = helmetFrame.FindWidget("BaseWidget_Pivot");
|
||||
x48_BaseWidget_Helmet = helmetFrame.FindWidget("BaseWidget_Helmet");
|
||||
|
|
|
@ -12,16 +12,11 @@ class CHudHelmetInterface {
|
|||
zeus::CMatrix3f x0_hudLagRotation;
|
||||
zeus::CVector3f x24_pivotPosition;
|
||||
zeus::CVector3f x30_hudLagPosition;
|
||||
union {
|
||||
struct {
|
||||
bool x3c_24_helmetVisibleDebug : 1;
|
||||
bool x3c_25_helmetVisibleGame : 1;
|
||||
bool x3c_26_glowVisibleDebug : 1;
|
||||
bool x3c_27_glowVisibleGame : 1;
|
||||
bool x3c_28_hudLagDirty : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
bool x3c_24_helmetVisibleDebug : 1;
|
||||
bool x3c_25_helmetVisibleGame : 1;
|
||||
bool x3c_26_glowVisibleDebug : 1;
|
||||
bool x3c_27_glowVisibleGame : 1;
|
||||
bool x3c_28_hudLagDirty : 1;
|
||||
CGuiCamera* x40_camera;
|
||||
CGuiWidget* x44_BaseWidget_Pivot;
|
||||
CGuiWidget* x48_BaseWidget_Helmet;
|
||||
|
|
|
@ -26,11 +26,10 @@ CHudMissileInterface::CHudMissileInterface(CGuiFrame& selHud, int missileCapacit
|
|||
: x0_hudType(hudType)
|
||||
, x4_missileCapacity(missileCapacity)
|
||||
, x8_numMissles(numMissiles)
|
||||
, x4c_chargeBeamFactor(chargeFactor) {
|
||||
x58_24_missilesActive = missilesActive;
|
||||
x58_25_visibleDebug = true;
|
||||
x58_26_visibleGame = true;
|
||||
|
||||
, x4c_chargeBeamFactor(chargeFactor)
|
||||
, x58_24_missilesActive(missilesActive)
|
||||
, x58_25_visibleDebug(true)
|
||||
, x58_26_visibleGame(true) {
|
||||
x5c_basewidget_missileicon = selHud.FindWidget("basewidget_missileicon");
|
||||
x60_textpane_missiledigits = static_cast<CGuiTextPane*>(selHud.FindWidget("textpane_missiledigits"));
|
||||
x64_energybart01_missilebar = static_cast<CAuiEnergyBarT01*>(selHud.FindWidget("energybart01_missilebar"));
|
||||
|
|
|
@ -26,16 +26,11 @@ class CHudMissileInterface {
|
|||
float x4c_chargeBeamFactor;
|
||||
float x50_missileIconAltDeplete = 0.f;
|
||||
float x54_missileIconIncrement = 0.f;
|
||||
union {
|
||||
struct {
|
||||
bool x58_24_missilesActive : 1;
|
||||
bool x58_25_visibleDebug : 1;
|
||||
bool x58_26_visibleGame : 1;
|
||||
bool x58_27_hasArrows : 1;
|
||||
bool x58_28_notXRay : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
bool x58_24_missilesActive : 1;
|
||||
bool x58_25_visibleDebug : 1;
|
||||
bool x58_26_visibleGame : 1;
|
||||
bool x58_27_hasArrows : 1;
|
||||
bool x58_28_notXRay : 1;
|
||||
CGuiWidget* x5c_basewidget_missileicon;
|
||||
CGuiTextPane* x60_textpane_missiledigits;
|
||||
CAuiEnergyBarT01* x64_energybart01_missilebar;
|
||||
|
|
|
@ -32,15 +32,10 @@ struct SAdsrData {
|
|||
float xc_decayDur = 0.f;
|
||||
float x10_sustainGain = 0.f;
|
||||
float x14_releaseDur = 0.f;
|
||||
union {
|
||||
struct {
|
||||
bool x18_24_hasSustain : 1;
|
||||
bool x18_25_autoRelease : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
bool x18_24_hasSustain : 1;
|
||||
bool x18_25_autoRelease : 1;
|
||||
|
||||
constexpr SAdsrData() noexcept { x18_24_hasSustain = false; x18_25_autoRelease = false; };
|
||||
constexpr SAdsrData() noexcept : x18_24_hasSustain(false), x18_25_autoRelease(false) {}
|
||||
constexpr SAdsrData(float attackGain, float autoReleaseDur, float attackDur, float decayDur, float sustainGain,
|
||||
float releaseDur, bool hasSustain, bool autoRelease) noexcept
|
||||
: x0_attackGain(attackGain)
|
||||
|
@ -48,10 +43,9 @@ struct SAdsrData {
|
|||
, x8_attackDur(attackDur)
|
||||
, xc_decayDur(decayDur)
|
||||
, x10_sustainGain(sustainGain)
|
||||
, x14_releaseDur(releaseDur) {
|
||||
x18_24_hasSustain = hasSustain;
|
||||
x18_25_autoRelease = autoRelease;
|
||||
}
|
||||
, x14_releaseDur(releaseDur)
|
||||
, x18_24_hasSustain(hasSustain)
|
||||
, x18_25_autoRelease(autoRelease) {}
|
||||
};
|
||||
|
||||
struct SAdsrDelta {
|
||||
|
|
|
@ -1412,10 +1412,9 @@ void CFrontEndUI::SNesEmulatorFrame::Draw(CSaveGameScreen* saveUi) const {
|
|||
}
|
||||
}
|
||||
|
||||
CFrontEndUI::SOptionsFrontEndFrame::SOptionsFrontEndFrame() {
|
||||
CFrontEndUI::SOptionsFrontEndFrame::SOptionsFrontEndFrame() : x134_24_visible(true), x134_25_exitOptions(false) {
|
||||
x4_frme = g_SimplePool->GetObj("FRME_OptionsFrontEnd");
|
||||
x10_pauseScreen = g_SimplePool->GetObj("STRG_PauseScreen");
|
||||
x134_24_visible = true;
|
||||
}
|
||||
|
||||
void CFrontEndUI::SOptionsFrontEndFrame::DoSliderChange(CGuiSliderGroup* caller, float value) {
|
||||
|
|
|
@ -279,13 +279,8 @@ public:
|
|||
float x38_rowPitch = 0.f;
|
||||
CSfxHandle x3c_sliderSfx;
|
||||
CRumbleGenerator x40_rumbleGen;
|
||||
union {
|
||||
u8 _dummy = 0;
|
||||
struct {
|
||||
bool x134_24_visible : 1;
|
||||
bool x134_25_exitOptions : 1;
|
||||
};
|
||||
};
|
||||
bool x134_24_visible : 1;
|
||||
bool x134_25_exitOptions : 1;
|
||||
|
||||
std::unique_ptr<CGameOptionsTouchBar> m_touchBar;
|
||||
bool m_touchBarInValue = false;
|
||||
|
|
|
@ -178,7 +178,11 @@ CInGameGuiManager::CInGameGuiManager(CStateManager& stateMgr, CArchitectureQueue
|
|||
, x1c_rand(1234)
|
||||
, x20_faceplateDecor(stateMgr)
|
||||
, x50_deathDot(g_SimplePool->GetObj("TXTR_DeathDot"))
|
||||
, x5c_pauseScreenDGRPs(LockPauseScreenDependencies()) {
|
||||
, x5c_pauseScreenDGRPs(LockPauseScreenDependencies())
|
||||
, x1f8_24_(false)
|
||||
, x1f8_25_playerAlive(true)
|
||||
, x1f8_26_deferTransition(false)
|
||||
, x1f8_27_exitSaveUI(true) {
|
||||
x1e0_helmetVisMode = g_tweakGui->GetHelmetVisMode();
|
||||
x1e4_enableTargetingManager = g_tweakGui->GetEnableTargetingManager();
|
||||
x1e8_enableAutoMapper = g_tweakGui->GetEnableAutoMapper();
|
||||
|
@ -187,9 +191,6 @@ CInGameGuiManager::CInGameGuiManager(CStateManager& stateMgr, CArchitectureQueue
|
|||
|
||||
x1f4_visorStaticAlpha = stateMgr.GetPlayer().GetVisorStaticAlpha();
|
||||
|
||||
x1f8_25_playerAlive = true;
|
||||
x1f8_27_exitSaveUI = true;
|
||||
|
||||
xc8_inGameGuiDGRPs.reserve(InGameGuiDGRPs.size());
|
||||
for (const char* const dgrp : InGameGuiDGRPs) {
|
||||
xc8_inGameGuiDGRPs.emplace_back(g_SimplePool->GetObj(dgrp));
|
||||
|
|
|
@ -95,6 +95,10 @@ private:
|
|||
EHudVisMode x1ec_hudVisMode;
|
||||
u32 x1f0_enablePlayerVisor;
|
||||
float x1f4_visorStaticAlpha;
|
||||
bool x1f8_24_ : 1;
|
||||
bool x1f8_25_playerAlive : 1;
|
||||
bool x1f8_26_deferTransition : 1;
|
||||
bool x1f8_27_exitSaveUI : 1;
|
||||
|
||||
std::optional<CTexturedQuadFilter> m_deathRenderTexQuad;
|
||||
std::optional<CTexturedQuadFilter> m_deathDotQuad;
|
||||
|
@ -102,16 +106,6 @@ private:
|
|||
CColoredQuadFilter m_deathWhiteout{EFilterType::Blend};
|
||||
CColoredQuadFilter m_deathBlackout{EFilterType::Blend};
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x1f8_24_ : 1;
|
||||
bool x1f8_25_playerAlive : 1;
|
||||
bool x1f8_26_deferTransition : 1;
|
||||
bool x1f8_27_exitSaveUI : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
static std::vector<TLockedToken<CDependencyGroup>> LockPauseScreenDependencies();
|
||||
bool CheckDGRPLoadComplete() const;
|
||||
void BeginStateTransition(EInGameGuiState state, CStateManager& stateMgr);
|
||||
|
|
|
@ -14,7 +14,10 @@
|
|||
namespace urde::MP1 {
|
||||
|
||||
CLogBookScreen::CLogBookScreen(const CStateManager& mgr, CGuiFrame& frame, const CStringTable& pauseStrg)
|
||||
: CPauseScreenBase(mgr, frame, pauseStrg, true) {
|
||||
: CPauseScreenBase(mgr, frame, pauseStrg, true)
|
||||
, x260_24_loaded(false)
|
||||
, x260_25_inTextScroll(false)
|
||||
, x260_26_exitTextScroll(false) {
|
||||
x19c_scanCompletes.resize(5);
|
||||
x200_viewScans.resize(5);
|
||||
x258_artifactDoll = std::make_unique<CArtifactDoll>();
|
||||
|
@ -177,7 +180,6 @@ bool CLogBookScreen::IsScanCategoryReady(CSaveWorld::EScanCategory category) con
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
void CLogBookScreen::UpdateBodyText() {
|
||||
if (x10_mode != EMode::TextScroll) {
|
||||
x174_textpane_body->TextSupport().SetText(u"");
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace urde {
|
|||
class CPlayerState;
|
||||
class CScannableObjectInfo;
|
||||
class CStringTable;
|
||||
}
|
||||
} // namespace urde
|
||||
|
||||
namespace urde::MP1 {
|
||||
class CArtifactDoll;
|
||||
|
@ -25,18 +25,14 @@ class CLogBookScreen : public CPauseScreenBase {
|
|||
x200_viewScans;
|
||||
float x254_viewInterp = 0.f;
|
||||
std::unique_ptr<CArtifactDoll> x258_artifactDoll;
|
||||
|
||||
enum class ELeavePauseState { InPause = 0, LeavingPause = 1, LeftPause = 2 };
|
||||
|
||||
ELeavePauseState x25c_leavePauseState = ELeavePauseState::InPause;
|
||||
union {
|
||||
struct {
|
||||
bool x260_24_loaded : 1;
|
||||
bool x260_25_inTextScroll : 1;
|
||||
bool x260_26_exitTextScroll : 1;
|
||||
};
|
||||
s32 _dummy = 0;
|
||||
};
|
||||
enum class ELeavePauseState {
|
||||
InPause = 0,
|
||||
LeavingPause = 1,
|
||||
LeftPause = 2
|
||||
} x25c_leavePauseState = ELeavePauseState::InPause;
|
||||
bool x260_24_loaded : 1;
|
||||
bool x260_25_inTextScroll : 1;
|
||||
bool x260_26_exitTextScroll : 1;
|
||||
|
||||
void InitializeLogBook();
|
||||
void UpdateRightTitles();
|
||||
|
|
|
@ -14,13 +14,16 @@ namespace urde::MP1 {
|
|||
|
||||
CMFGame::CMFGame(const std::weak_ptr<CStateManager>& stateMgr, const std::weak_ptr<CInGameGuiManager>& guiMgr,
|
||||
const CArchitectureQueue&)
|
||||
: CMFGameBase("CMFGame"), x14_stateManager(stateMgr.lock()), x18_guiManager(guiMgr.lock()) {
|
||||
x2a_25_samusAlive = true;
|
||||
: CMFGameBase("CMFGame")
|
||||
, x14_stateManager(stateMgr.lock())
|
||||
, x18_guiManager(guiMgr.lock())
|
||||
, x2a_24_initialized(false)
|
||||
, x2a_25_samusAlive(true) {
|
||||
static_cast<CMain&>(*g_Main).SetMFGameBuilt(true);
|
||||
}
|
||||
|
||||
CMFGame::~CMFGame() {
|
||||
CMain& main = static_cast<CMain&>(*g_Main);
|
||||
auto& main = static_cast<CMain&>(*g_Main);
|
||||
main.SetMFGameBuilt(false);
|
||||
main.SetScreenFading(false);
|
||||
CDecalManager::Reinitialize();
|
||||
|
@ -253,8 +256,9 @@ void CMFGame::EnterMapScreen() {
|
|||
x14_stateManager->SetInMapScreen(true);
|
||||
}
|
||||
|
||||
CMFGameLoader::CMFGameLoader() : CMFGameLoaderBase("CMFGameLoader") {
|
||||
CMain* m = static_cast<CMain*>(g_Main);
|
||||
CMFGameLoader::CMFGameLoader()
|
||||
: CMFGameLoaderBase("CMFGameLoader"), x2c_24_initialized(false), x2c_25_transitionFinished(false) {
|
||||
auto* m = static_cast<CMain*>(g_Main);
|
||||
switch (m->GetFlowState()) {
|
||||
case EFlowState::Default:
|
||||
case EFlowState::StateSetter: {
|
||||
|
|
|
@ -23,13 +23,8 @@ class CMFGame : public CMFGameBase {
|
|||
float x20_cineSkipTime;
|
||||
u32 x24_ = 0;
|
||||
TUniqueId x28_skippedCineCam = kInvalidUniqueId;
|
||||
union {
|
||||
struct {
|
||||
bool x2a_24_initialized : 1;
|
||||
bool x2a_25_samusAlive : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
bool x2a_24_initialized : 1;
|
||||
bool x2a_25_samusAlive : 1;
|
||||
|
||||
CColoredQuadFilter m_fadeToBlack{EFilterType::Multiply};
|
||||
|
||||
|
@ -57,14 +52,8 @@ class CMFGameLoader : public CMFGameLoaderBase {
|
|||
std::shared_ptr<CStateManager> x14_stateMgr;
|
||||
std::shared_ptr<CInGameGuiManager> x18_guiMgr;
|
||||
std::vector<CToken> x1c_loadList;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x2c_24_initialized : 1;
|
||||
bool x2c_25_transitionFinished : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
bool x2c_24_initialized : 1;
|
||||
bool x2c_25_transitionFinished : 1;
|
||||
|
||||
void MakeLoadDependencyList();
|
||||
|
||||
|
|
|
@ -18,9 +18,22 @@ namespace urde::MP1 {
|
|||
|
||||
CPauseScreenBase::CPauseScreenBase(const CStateManager& mgr, CGuiFrame& frame, const CStringTable& pauseStrg,
|
||||
bool isLogBook)
|
||||
: x4_mgr(mgr), x8_frame(frame), xc_pauseStrg(pauseStrg) {
|
||||
m_isLogBook = isLogBook;
|
||||
m_playRightTableSfx = true;
|
||||
: x4_mgr(mgr)
|
||||
, x8_frame(frame)
|
||||
, xc_pauseStrg(pauseStrg)
|
||||
, x198_24_ready(false)
|
||||
, x198_25_handledInput(false)
|
||||
, x198_26_exitPauseScreen(false)
|
||||
, x198_27_canDraw(false)
|
||||
, x198_28_pulseTextArrowTop(false)
|
||||
, x198_29_pulseTextArrowBottom(false)
|
||||
, m_isLogBook(isLogBook)
|
||||
, m_bodyUpClicked(false)
|
||||
, m_bodyDownClicked(false)
|
||||
, m_bodyClicked(false)
|
||||
, m_leftClicked(false)
|
||||
, m_rightClicked(false)
|
||||
, m_playRightTableSfx(true) {
|
||||
InitializeFrameGlue();
|
||||
}
|
||||
|
||||
|
|
|
@ -74,24 +74,20 @@ protected:
|
|||
CGuiSliderGroup* x18c_slidergroup_slider = nullptr;
|
||||
CGuiTableGroup* x190_tablegroup_double = nullptr;
|
||||
CGuiTableGroup* x194_tablegroup_triple = nullptr;
|
||||
union {
|
||||
struct {
|
||||
bool x198_24_ready : 1;
|
||||
bool x198_25_handledInput : 1;
|
||||
bool x198_26_exitPauseScreen : 1;
|
||||
bool x198_27_canDraw : 1;
|
||||
bool x198_28_pulseTextArrowTop : 1;
|
||||
bool x198_29_pulseTextArrowBottom : 1;
|
||||
bool m_isLogBook : 1;
|
||||
bool m_bodyUpClicked : 1;
|
||||
bool m_bodyDownClicked : 1;
|
||||
bool m_bodyClicked : 1;
|
||||
bool m_leftClicked : 1;
|
||||
bool m_rightClicked : 1;
|
||||
bool m_playRightTableSfx : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x198_24_ready : 1;
|
||||
bool x198_25_handledInput : 1;
|
||||
bool x198_26_exitPauseScreen : 1;
|
||||
bool x198_27_canDraw : 1;
|
||||
bool x198_28_pulseTextArrowTop : 1;
|
||||
bool x198_29_pulseTextArrowBottom : 1;
|
||||
bool m_isLogBook : 1;
|
||||
bool m_bodyUpClicked : 1;
|
||||
bool m_bodyDownClicked : 1;
|
||||
bool m_bodyClicked : 1;
|
||||
bool m_leftClicked : 1;
|
||||
bool m_rightClicked : 1;
|
||||
bool m_playRightTableSfx : 1;
|
||||
|
||||
void InitializeFrameGlue();
|
||||
void ChangeMode(EMode mode, bool playSfx = true);
|
||||
void UpdateSideTable(CGuiTableGroup* table);
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
|
||||
namespace urde::MP1 {
|
||||
|
||||
CPauseScreenBlur::CPauseScreenBlur() : x4_mapLightQuarter(g_SimplePool->GetObj("TXTR_MapLightQuarter")) {
|
||||
x50_25_gameDraw = true;
|
||||
}
|
||||
CPauseScreenBlur::CPauseScreenBlur()
|
||||
: x4_mapLightQuarter(g_SimplePool->GetObj("TXTR_MapLightQuarter")), x50_24_blurring(false), x50_25_gameDraw(true) {}
|
||||
|
||||
void CPauseScreenBlur::OnNewInGameGuiState(EInGameGuiState state, CStateManager& stateMgr) {
|
||||
switch (state) {
|
||||
|
|
|
@ -20,16 +20,12 @@ class CPauseScreenBlur {
|
|||
EState x14_nextState = EState::InGame;
|
||||
float x18_blurAmt = 0.f;
|
||||
CCameraBlurPass x1c_camBlur;
|
||||
bool x50_24_blurring : 1;
|
||||
bool x50_25_gameDraw : 1;
|
||||
|
||||
CTexturedQuadFilter m_quarterFilter{EFilterType::Multiply, x4_mapLightQuarter};
|
||||
CScanLinesFilterEven m_linesFilter{EFilterType::Multiply};
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x50_24_blurring : 1;
|
||||
bool x50_25_gameDraw : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
void OnBlurComplete(bool);
|
||||
void SetState(EState state);
|
||||
|
||||
|
|
|
@ -8,7 +8,13 @@ const char* kMovies[] = {"Video/wingame.thp", "Video/wingame_best.thp", "
|
|||
|
||||
bool CPlayMovie::IsResultsScreen(EWhichMovie which) { return int(which) <= 2; }
|
||||
|
||||
CPlayMovie::CPlayMovie(EWhichMovie which) : CPlayMovieBase("CPlayMovie", kMovies[int(which)]), x18_which(which) {
|
||||
CPlayMovie::CPlayMovie(EWhichMovie which)
|
||||
: CPlayMovieBase("CPlayMovie", kMovies[int(which)])
|
||||
, x18_which(which)
|
||||
, x78_24_(false)
|
||||
, x78_25_(false)
|
||||
, x78_26_resultsScreen(false)
|
||||
, x78_27_(false) {
|
||||
(void)x18_which;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,15 +20,11 @@ public:
|
|||
|
||||
private:
|
||||
EWhichMovie x18_which;
|
||||
union {
|
||||
struct {
|
||||
bool x78_24_ : 1;
|
||||
bool x78_25_ : 1;
|
||||
bool x78_26_resultsScreen : 1;
|
||||
bool x78_27_ : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
bool x78_24_ : 1;
|
||||
bool x78_25_ : 1;
|
||||
bool x78_26_resultsScreen : 1;
|
||||
bool x78_27_ : 1;
|
||||
|
||||
static bool IsResultsScreen(EWhichMovie which);
|
||||
|
||||
public:
|
||||
|
|
|
@ -98,7 +98,15 @@ CSamusDoll::CSamusDoll(const CDependencyGroup& suitDgrp, const CDependencyGroup&
|
|||
bool hasGrappleBeam)
|
||||
: x10_ballXf(zeus::CTransform::Translate(0.f, 0.f, 0.625f * g_tweakPlayer->GetPlayerBallHalfExtent()))
|
||||
, x44_suit(suit)
|
||||
, x48_beam(beam) {
|
||||
, x48_beam(beam)
|
||||
, x270_24_hasSpiderBall(hasSpiderBall)
|
||||
, x270_25_hasGrappleBeam(hasGrappleBeam)
|
||||
, x270_26_pulseSuit(false)
|
||||
, x270_27_pulseBeam(false)
|
||||
, x270_28_pulseGrapple(false)
|
||||
, x270_29_pulseBoots(false)
|
||||
, x270_30_pulseVisor(false)
|
||||
, x270_31_loaded(false) {
|
||||
x70_fixedRot.rotateZ(M_PIF);
|
||||
x90_userInterpRot = xb0_userRot = x70_fixedRot;
|
||||
x1d4_spiderBallGlass = g_SimplePool->GetObj(SpiderBallGlassModels[size_t(suit)].first);
|
||||
|
@ -115,8 +123,6 @@ CSamusDoll::CSamusDoll(const CDependencyGroup& suitDgrp, const CDependencyGroup&
|
|||
x230_ballTransitionFlash = g_SimplePool->GetObj("MorphBallTransitionFlash");
|
||||
x23c_lights.push_back(CLight::BuildDirectional(zeus::skForward, zeus::skWhite));
|
||||
x24c_actorLights = std::make_unique<CActorLights>(8, zeus::skZero3f, 4, 4, false, false, false, 0.1f);
|
||||
x270_24_hasSpiderBall = hasSpiderBall;
|
||||
x270_25_hasGrappleBeam = hasGrappleBeam;
|
||||
x22c_ballInnerGlowGen->SetGlobalScale(zeus::CVector3f(0.625f));
|
||||
x0_depToks.reserve(suitDgrp.GetObjectTagVector().size() + ballDgrp.GetObjectTagVector().size());
|
||||
for (const SObjectTag& tag : suitDgrp.GetObjectTagVector()) {
|
||||
|
|
|
@ -71,19 +71,14 @@ class CSamusDoll {
|
|||
CSfxHandle x264_offsetSfx;
|
||||
CSfxHandle x268_rotateSfx;
|
||||
CSfxHandle x26c_zoomSfx;
|
||||
union {
|
||||
struct {
|
||||
bool x270_24_hasSpiderBall : 1;
|
||||
bool x270_25_hasGrappleBeam : 1;
|
||||
bool x270_26_pulseSuit : 1;
|
||||
bool x270_27_pulseBeam : 1;
|
||||
bool x270_28_pulseGrapple : 1;
|
||||
bool x270_29_pulseBoots : 1;
|
||||
bool x270_30_pulseVisor : 1;
|
||||
bool x270_31_loaded : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x270_24_hasSpiderBall : 1;
|
||||
bool x270_25_hasGrappleBeam : 1;
|
||||
bool x270_26_pulseSuit : 1;
|
||||
bool x270_27_pulseBeam : 1;
|
||||
bool x270_28_pulseGrapple : 1;
|
||||
bool x270_29_pulseBoots : 1;
|
||||
bool x270_30_pulseVisor : 1;
|
||||
bool x270_31_loaded : 1;
|
||||
|
||||
static constexpr zeus::CVector3f skInitialOffset{0.0f, 0.0f, 0.8f};
|
||||
static CModelData BuildSuitModelData1(CPlayerState::EPlayerSuit suit);
|
||||
|
|
|
@ -23,9 +23,11 @@ CSamusHud::CSamusHud(CStateManager& stateMgr)
|
|||
: x8_targetingMgr(stateMgr)
|
||||
, x258_frmeHelmet(g_SimplePool->GetObj("FRME_Helmet"))
|
||||
, x268_frmeBaseHud(g_SimplePool->GetObj("FRME_BaseHud"))
|
||||
, x2e0_24_inFreeLook(false)
|
||||
, x2e0_25_lookControlHeld(false)
|
||||
, x2e0_26_latestFirstPerson(true)
|
||||
, x2e0_27_energyLow(stateMgr.GetPlayer().IsEnergyLow(stateMgr))
|
||||
, m_energyDrainFilter(g_tweakGui->GetEnergyDrainFilterAdditive() ? EFilterType::Add : EFilterType::Blend) {
|
||||
x2e0_26_latestFirstPerson = true;
|
||||
x2e0_27_energyLow = stateMgr.GetPlayer().IsEnergyLow(stateMgr);
|
||||
x33c_lights = std::make_unique<CActorLights>(8, zeus::skZero3f, 4, 1, true, 0, 0, 0.1f);
|
||||
x340_hudLights.resize(3, SCachedHudLight(zeus::skZero3f, zeus::skWhite, 0.f, 0.f, 0.f, 0.f));
|
||||
x46c_.resize(3);
|
||||
|
|
|
@ -95,17 +95,10 @@ class CSamusHud {
|
|||
u32 x2d4_totalEnergyTanks = 0;
|
||||
u32 x2d8_missileAmount = 0;
|
||||
u32 x2dc_missileCapacity = 0;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x2e0_24_inFreeLook : 1;
|
||||
bool x2e0_25_lookControlHeld : 1;
|
||||
bool x2e0_26_latestFirstPerson : 1;
|
||||
bool x2e0_27_energyLow : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
|
||||
bool x2e0_24_inFreeLook : 1;
|
||||
bool x2e0_25_lookControlHeld : 1;
|
||||
bool x2e0_26_latestFirstPerson : 1;
|
||||
bool x2e0_27_energyLow : 1;
|
||||
u32 x2e4_ = 0;
|
||||
u32 x2e8_ = 0;
|
||||
CPlayerGun::EMissleMode x2ec_missileMode = CPlayerGun::EMissleMode::Inactive;
|
||||
|
|
|
@ -6,12 +6,20 @@
|
|||
|
||||
namespace urde {
|
||||
|
||||
CSlideShow::CSlideShow() : CIOWin("SlideShow"), x5c_slideA(*this), x90_slideB(*this) {
|
||||
x130_ = g_tweakSlideShow->GetX54();
|
||||
x134_24_ = true;
|
||||
x134_30_ = true;
|
||||
x135_24_ = true;
|
||||
|
||||
CSlideShow::CSlideShow()
|
||||
: CIOWin("SlideShow")
|
||||
, x5c_slideA(*this)
|
||||
, x90_slideB(*this)
|
||||
, x130_(g_tweakSlideShow->GetX54())
|
||||
, x134_24_(true)
|
||||
, x134_25_(false)
|
||||
, x134_26_(false)
|
||||
, x134_27_(false)
|
||||
, x134_28_disableInput(false)
|
||||
, x134_29_(false)
|
||||
, x134_30_(true)
|
||||
, x134_31_(false)
|
||||
, x135_24_(true) {
|
||||
const SObjectTag* font = g_ResFactory->GetResourceIdByName(g_tweakSlideShow->GetFont());
|
||||
if (font) {
|
||||
CGuiTextProperties propsA(false, true, EJustification::Center, EVerticalJustification::Bottom);
|
||||
|
|
|
@ -87,21 +87,15 @@ private:
|
|||
float x12c_ = 32.f;
|
||||
*/
|
||||
float x130_;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x134_24_ : 1;
|
||||
bool x134_25_ : 1;
|
||||
bool x134_26_ : 1;
|
||||
bool x134_27_ : 1;
|
||||
bool x134_28_disableInput : 1;
|
||||
bool x134_29_ : 1;
|
||||
bool x134_30_ : 1;
|
||||
bool x134_31_ : 1;
|
||||
bool x135_24_ : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
bool x134_24_ : 1;
|
||||
bool x134_25_ : 1;
|
||||
bool x134_26_ : 1;
|
||||
bool x134_27_ : 1;
|
||||
bool x134_28_disableInput : 1;
|
||||
bool x134_29_ : 1;
|
||||
bool x134_30_ : 1;
|
||||
bool x134_31_ : 1;
|
||||
bool x135_24_ : 1;
|
||||
|
||||
bool LoadTXTRDep(std::string_view name);
|
||||
static bool AreAllDepsLoaded(const std::vector<TLockedToken<CDependencyGroup>>& deps);
|
||||
|
|
|
@ -240,7 +240,17 @@ void CGameArchitectureSupport::specialKeyUp(boo::ESpecialKey key, boo::EModifier
|
|||
|
||||
CMain::CMain(IFactory* resFactory, CSimplePool* resStore, boo::IGraphicsDataFactory* gfxFactory,
|
||||
boo::IGraphicsCommandQueue* cmdQ, const boo::ObjToken<boo::ITextureR>& spareTex)
|
||||
: m_booSetter(gfxFactory, cmdQ, spareTex), x128_globalObjects(resFactory, resStore) {
|
||||
: m_booSetter(gfxFactory, cmdQ, spareTex)
|
||||
, x128_globalObjects(resFactory, resStore)
|
||||
, x160_24_finished(false)
|
||||
, x160_25_mfGameBuilt(false)
|
||||
, x160_26_screenFading(false)
|
||||
, x160_27_(false)
|
||||
, x160_28_manageCard(false)
|
||||
, x160_29_(false)
|
||||
, x160_30_(false)
|
||||
, x160_31_cardBusy(false)
|
||||
, x161_24_gameFrameDrawn(false) {
|
||||
xe4_gameplayResult = EGameplayResult::Playing;
|
||||
g_Main = this;
|
||||
}
|
||||
|
|
|
@ -227,20 +227,15 @@ private:
|
|||
|
||||
u32 x130_[10] = {1000000};
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x160_24_finished : 1;
|
||||
bool x160_25_mfGameBuilt : 1;
|
||||
bool x160_26_screenFading : 1;
|
||||
bool x160_27_ : 1;
|
||||
bool x160_28_manageCard : 1;
|
||||
bool x160_29_ : 1;
|
||||
bool x160_30_ : 1;
|
||||
bool x160_31_cardBusy : 1;
|
||||
bool x161_24_gameFrameDrawn : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
bool x160_24_finished : 1;
|
||||
bool x160_25_mfGameBuilt : 1;
|
||||
bool x160_26_screenFading : 1;
|
||||
bool x160_27_ : 1;
|
||||
bool x160_28_manageCard : 1;
|
||||
bool x160_29_ : 1;
|
||||
bool x160_30_ : 1;
|
||||
bool x160_31_cardBusy : 1;
|
||||
bool x161_24_gameFrameDrawn : 1;
|
||||
|
||||
std::unique_ptr<CGameArchitectureSupport> x164_archSupport;
|
||||
|
||||
|
|
|
@ -69,7 +69,21 @@ CBabygoth::CBabygoth(TUniqueId uid, std::string_view name, const CEntityInfo& in
|
|||
g_SimplePool->GetObj({SBIG('WPSC'), babyData.x44_fireBreathWeapon})
|
||||
: g_SimplePool->GetObj("FlameThrower"sv))
|
||||
, x98c_dVuln(pInfo.GetDamageVulnerability())
|
||||
, xa00_shellHitPoints(babyData.GetShellHitPoints()) {
|
||||
, xa00_shellHitPoints(babyData.GetShellHitPoints())
|
||||
, xa48_24_isAlert(false)
|
||||
, xa48_25_(false)
|
||||
, xa48_26_inProjectileAttack(false)
|
||||
, xa48_27_(false)
|
||||
, xa48_28_pendingAttackContactDamage(false)
|
||||
, xa48_29_hasBeenEnraged(false)
|
||||
, xa48_30_heardPlayerFire(false)
|
||||
, xa48_31_approachNeedsPathSearch(true)
|
||||
, xa49_24_gettingUp(false)
|
||||
, xa49_25_shouldStepBackwards(false)
|
||||
, xa49_26_readyForTeam(false)
|
||||
, xa49_27_locomotionValid(false)
|
||||
, xa49_28_onApproachPath(false)
|
||||
, xa49_29_objectSpaceCollision(false) {
|
||||
TLockedToken<CModel> model = g_SimplePool->GetObj({SBIG('CMDL'), babyData.x138_noShellModel});
|
||||
TLockedToken<CSkinRules> skin = g_SimplePool->GetObj({SBIG('CSKR'), babyData.x13c_noShellSkin});
|
||||
xa08_noShellModel =
|
||||
|
@ -80,7 +94,6 @@ CBabygoth::CBabygoth(TUniqueId uid, std::string_view name, const CEntityInfo& in
|
|||
xa2c_destroyShellParticle = g_SimplePool->GetObj({SBIG('PART'), babyData.x154_destroyShellParticle});
|
||||
if (x570_babyData.x148_intermediateCrackParticle.IsValid())
|
||||
xa38_intermediateCrackParticle = g_SimplePool->GetObj({SBIG('PART'), babyData.x148_intermediateCrackParticle});
|
||||
xa48_31_approachNeedsPathSearch = true;
|
||||
x958_iceProjectile.Token().Lock();
|
||||
UpdateTouchBounds();
|
||||
x460_knockBackController.SetEnableFreeze(false);
|
||||
|
|
|
@ -100,25 +100,20 @@ private:
|
|||
TToken<CGenDescription> xa20_crackTwoParticle;
|
||||
TToken<CGenDescription> xa2c_destroyShellParticle;
|
||||
TLockedToken<CGenDescription> xa38_intermediateCrackParticle; // Used to be an optional, not necessary in URDE
|
||||
union {
|
||||
struct {
|
||||
bool xa48_24_isAlert : 1;
|
||||
bool xa48_25_ : 1;
|
||||
bool xa48_26_inProjectileAttack : 1;
|
||||
bool xa48_27_ : 1;
|
||||
bool xa48_28_pendingAttackContactDamage : 1;
|
||||
bool xa48_29_hasBeenEnraged : 1;
|
||||
bool xa48_30_heardPlayerFire : 1;
|
||||
bool xa48_31_approachNeedsPathSearch : 1;
|
||||
bool xa49_24_gettingUp : 1;
|
||||
bool xa49_25_shouldStepBackwards : 1;
|
||||
bool xa49_26_readyForTeam : 1;
|
||||
bool xa49_27_locomotionValid : 1;
|
||||
bool xa49_28_onApproachPath : 1;
|
||||
bool xa49_29_objectSpaceCollision : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool xa48_24_isAlert : 1;
|
||||
bool xa48_25_ : 1;
|
||||
bool xa48_26_inProjectileAttack : 1;
|
||||
bool xa48_27_ : 1;
|
||||
bool xa48_28_pendingAttackContactDamage : 1;
|
||||
bool xa48_29_hasBeenEnraged : 1;
|
||||
bool xa48_30_heardPlayerFire : 1;
|
||||
bool xa48_31_approachNeedsPathSearch : 1;
|
||||
bool xa49_24_gettingUp : 1;
|
||||
bool xa49_25_shouldStepBackwards : 1;
|
||||
bool xa49_26_readyForTeam : 1;
|
||||
bool xa49_27_locomotionValid : 1;
|
||||
bool xa49_28_onApproachPath : 1;
|
||||
bool xa49_29_objectSpaceCollision : 1;
|
||||
|
||||
void AddSphereCollisionList(const SSphereJointInfo*, s32, std::vector<CJointCollisionDescription>&);
|
||||
|
||||
|
|
|
@ -18,22 +18,23 @@ CBeetle::CBeetle(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
|||
CModelData&& mData, const CPatternedInfo& pInfo, CPatterned::EFlavorType flavor,
|
||||
CBeetle::EEntranceType entranceType, const CDamageInfo& touchDamage,
|
||||
const CDamageVulnerability& platingVuln, const zeus::CVector3f& tailAimReference,
|
||||
float initialAttackDelay, float retreatTime, float f3,
|
||||
const CDamageVulnerability& tailVuln, const CActorParameters& aParams,
|
||||
const std::optional<CStaticRes>& tailModel)
|
||||
float initialAttackDelay, float retreatTime, float f3, const CDamageVulnerability& tailVuln,
|
||||
const CActorParameters& aParams, const std::optional<CStaticRes>& tailModel)
|
||||
: CPatterned(ECharacter::Beetle, uid, name, flavor, info, xf, std::move(mData), pInfo, EMovementType::Ground,
|
||||
EColliderType::One, EBodyType::BiPedal, aParams, EKnockBackVariant(flavor))
|
||||
, x56c_entranceType(entranceType)
|
||||
, x574_tailAimReference(tailAimReference)
|
||||
, x580_f3(f3)
|
||||
, x584_touchDamage(touchDamage)
|
||||
, x5ac_tailModel(tailModel ? std::optional<CModelData>(CModelData(*tailModel)) :
|
||||
std::optional<CModelData>())
|
||||
, x5ac_tailModel(tailModel ? std::optional<CModelData>(CModelData(*tailModel)) : std::nullopt)
|
||||
, x5fc_pathFindSearch(nullptr, 1, pInfo.GetPathfindingIndex(), 1.f, 1.f)
|
||||
, x744_platingVuln(platingVuln)
|
||||
, x7ac_tailVuln(tailVuln)
|
||||
, x814_attackDelayTimer(initialAttackDelay)
|
||||
, x834_retreatTime(retreatTime) {
|
||||
, x834_retreatTime(retreatTime)
|
||||
, x838_24_hitSomething(false)
|
||||
, x838_25_burrowing(false)
|
||||
, x838_26_canSkid(false) {
|
||||
x5a0_headbuttDist = GetAnimationDistance(CPASAnimParmData(7, CPASAnimParm::FromEnum(0), CPASAnimParm::FromEnum(1)));
|
||||
x5a4_jumpBackwardDist =
|
||||
x64_modelData->GetScale().y() *
|
||||
|
|
|
@ -38,14 +38,9 @@ private:
|
|||
zeus::CVector3f x824_predictPos;
|
||||
float x830_intoGroundFactor = 1.f;
|
||||
float x834_retreatTime;
|
||||
union {
|
||||
struct {
|
||||
bool x838_24_hitSomething : 1;
|
||||
bool x838_25_burrowing : 1;
|
||||
bool x838_26_canSkid : 1;
|
||||
};
|
||||
u32 _dummy3 = 0;
|
||||
};
|
||||
bool x838_24_hitSomething : 1;
|
||||
bool x838_25_burrowing : 1;
|
||||
bool x838_26_canSkid : 1;
|
||||
|
||||
void SquadAdd(CStateManager& mgr);
|
||||
void SquadRemove(CStateManager& mgr);
|
||||
|
|
|
@ -23,6 +23,7 @@ CMetroid::CMetroid(TUniqueId uid, std::string_view name, EFlavorType flavor, con
|
|||
const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo,
|
||||
const CActorParameters& aParms, const CMetroidData& metroidData, TUniqueId)
|
||||
: CPatterned(ECharacter::Metroid, uid, name, flavor, info, xf, std::move(mData), pInfo, EMovementType::Flyer,
|
||||
EColliderType::One, EBodyType::Flyer, aParms, EKnockBackVariant::Medium) {}
|
||||
EColliderType::One, EBodyType::Flyer, aParms, EKnockBackVariant::Medium)
|
||||
, x9bf_29_(false) {}
|
||||
|
||||
} // namespace urde::MP1
|
||||
|
|
|
@ -30,12 +30,7 @@ public:
|
|||
};
|
||||
|
||||
class CMetroid : public CPatterned {
|
||||
union {
|
||||
struct {
|
||||
bool x9bf_29_ : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x9bf_29_ : 1;
|
||||
|
||||
public:
|
||||
DEFINE_PATTERNED(Metroid)
|
||||
|
|
|
@ -56,7 +56,15 @@ CMetroidBeta::CMetroidBeta(TUniqueId uid, std::string_view name, const CEntityIn
|
|||
, x824_(std::make_unique<CParticleSwoosh>(x7f0_, 0))
|
||||
, x828_(std::make_unique<CElementGen>(x7fc_))
|
||||
, x82c_(std::make_unique<CElementGen>(x808_))
|
||||
, x830_(std::make_unique<CElementGen>(x814_)) {
|
||||
, x830_(std::make_unique<CElementGen>(x814_))
|
||||
, x840_24_(false)
|
||||
, x840_25_(false)
|
||||
, x840_26_(false)
|
||||
, x840_27_(false)
|
||||
, x840_28_(false)
|
||||
, x840_29_(false)
|
||||
, x840_30_(false)
|
||||
, x840_31_(false) {
|
||||
x820_->SetParticleEmission(false);
|
||||
x828_->SetParticleEmission(false);
|
||||
x82c_->SetParticleEmission(false);
|
||||
|
|
|
@ -75,19 +75,14 @@ class CMetroidBeta : public CPatterned {
|
|||
float x834_ = 0.f;
|
||||
CRandom16 x838_ = CRandom16(1469);
|
||||
float x83c_;
|
||||
union {
|
||||
struct {
|
||||
bool x840_24_ : 1;
|
||||
bool x840_25_ : 1;
|
||||
bool x840_26_ : 1;
|
||||
bool x840_27_ : 1;
|
||||
bool x840_28_ : 1;
|
||||
bool x840_29_ : 1;
|
||||
bool x840_30_ : 1;
|
||||
bool x840_31_ : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x840_24_ : 1;
|
||||
bool x840_25_ : 1;
|
||||
bool x840_26_ : 1;
|
||||
bool x840_27_ : 1;
|
||||
bool x840_28_ : 1;
|
||||
bool x840_29_ : 1;
|
||||
bool x840_30_ : 1;
|
||||
bool x840_31_ : 1;
|
||||
|
||||
void CreateCollisionActorManager(CStateManager& mgr);
|
||||
void AddSphereJoints(SSphereJointInfo* sphereJoints, s32 count, std::vector<CJointCollisionDescription>& joints);
|
||||
|
|
|
@ -58,10 +58,19 @@ CParasite::CParasite(TUniqueId uid, std::string_view name, EFlavorType flavor, c
|
|||
, x714_iceZoomerJointHP(iceZoomerJointHP)
|
||||
, x73c_haltSfx(CSfxManager::TranslateSFXID(haltSfx))
|
||||
, x73e_getUpSfx(CSfxManager::TranslateSFXID(getUpSfx))
|
||||
, x740_crouchSfx(CSfxManager::TranslateSFXID(crouchSfx)) {
|
||||
x742_28_onGround = true;
|
||||
x742_30_attackOver = true;
|
||||
|
||||
, x740_crouchSfx(CSfxManager::TranslateSFXID(crouchSfx))
|
||||
, x742_24_receivedTelegraph(false)
|
||||
, x742_25_jumpVelDirty(false)
|
||||
, x742_26_(false)
|
||||
, x742_27_landed(false)
|
||||
, x742_28_onGround(true)
|
||||
, x742_29_(false)
|
||||
, x742_30_attackOver(true)
|
||||
, x742_31_(false)
|
||||
, x743_24_halted(false)
|
||||
, x743_25_vulnerable(false)
|
||||
, x743_26_oculusShotAt(false)
|
||||
, x743_27_inJump(false) {
|
||||
switch (x5d0_walkerType) {
|
||||
case EWalkerType::Geemer:
|
||||
x460_knockBackController.SetEnableFreeze(false);
|
||||
|
|
|
@ -70,23 +70,19 @@ class CParasite : public CWallWalker {
|
|||
u16 x73c_haltSfx;
|
||||
u16 x73e_getUpSfx;
|
||||
u16 x740_crouchSfx;
|
||||
union {
|
||||
struct {
|
||||
bool x742_24_receivedTelegraph : 1;
|
||||
bool x742_25_jumpVelDirty : 1;
|
||||
bool x742_26_ : 1;
|
||||
bool x742_27_landed : 1;
|
||||
bool x742_28_onGround : 1;
|
||||
bool x742_29_ : 1;
|
||||
bool x742_30_attackOver : 1;
|
||||
bool x742_31_ : 1;
|
||||
bool x743_24_halted : 1;
|
||||
bool x743_25_vulnerable : 1;
|
||||
bool x743_26_oculusShotAt : 1;
|
||||
bool x743_27_inJump : 1;
|
||||
};
|
||||
u16 _dummy = 0;
|
||||
};
|
||||
bool x742_24_receivedTelegraph : 1;
|
||||
bool x742_25_jumpVelDirty : 1;
|
||||
bool x742_26_ : 1;
|
||||
bool x742_27_landed : 1;
|
||||
bool x742_28_onGround : 1;
|
||||
bool x742_29_ : 1;
|
||||
bool x742_30_attackOver : 1;
|
||||
bool x742_31_ : 1;
|
||||
bool x743_24_halted : 1;
|
||||
bool x743_25_vulnerable : 1;
|
||||
bool x743_26_oculusShotAt : 1;
|
||||
bool x743_27_inJump : 1;
|
||||
|
||||
bool CloseToWall(const CStateManager& mgr) const;
|
||||
void FaceTarget(const zeus::CVector3f& target);
|
||||
TUniqueId RecursiveFindClosestWayPoint(CStateManager& mgr, TUniqueId id, float& dist);
|
||||
|
|
|
@ -418,6 +418,7 @@ CSpacePirate::CSpacePirate(TUniqueId uid, std::string_view name, const CEntityIn
|
|||
x637_24_enablePatrol = false;
|
||||
x637_25_enableAim = false;
|
||||
x637_26_hearPlayerFire = false;
|
||||
x637_27_inProjectilePath = false;
|
||||
x637_28_noPlayerLos = false;
|
||||
x637_29_inWallHang = false;
|
||||
x637_30_jumpVelSet = false;
|
||||
|
@ -438,6 +439,7 @@ CSpacePirate::CSpacePirate(TUniqueId uid, std::string_view name, const CEntityIn
|
|||
x639_29_enableBreakDodge = false;
|
||||
x639_30_closeMelee = false;
|
||||
x639_31_sentAttackMsg = false;
|
||||
x63a_24_normalDodge = false;
|
||||
|
||||
x758_headSeg = x64_modelData->GetAnimationData()->GetLocatorSegId("Head_1"sv);
|
||||
x7b6_gunSeg = x64_modelData->GetAnimationData()->GetLocatorSegId("R_gun_LCTR"sv);
|
||||
|
@ -2080,7 +2082,7 @@ void CSpacePirate::Cover(CStateManager& mgr, EStateMsg msg, float dt) {
|
|||
case EStateMsg::Activate:
|
||||
if (x450_bodyController->GetCurrentStateId() != pas::EAnimationState::Cover) {
|
||||
if (CScriptCoverPoint* cp = GetCoverPoint(mgr, x640_coverPoint)) {
|
||||
x79c_coverDir = (cp->GetAttackDirection() & 0x2) ? pas::ECoverDirection::Left : pas::ECoverDirection::Right;
|
||||
x79c_coverDir = cp->GetAttackDirection();
|
||||
x32c_animState = EAnimState::Ready;
|
||||
x2e0_destPos = cp->GetTranslation();
|
||||
TryCommand(mgr, pas::EAnimationState::Cover, &CPatterned::TryCover, int(x79c_coverDir));
|
||||
|
|
|
@ -97,61 +97,56 @@ private:
|
|||
};
|
||||
|
||||
CSpacePirateData x568_pirateData;
|
||||
union {
|
||||
struct {
|
||||
bool x634_24_pendingAmbush : 1;
|
||||
bool x634_25_ceilingAmbush : 1;
|
||||
bool x634_26_nonAggressive : 1;
|
||||
bool x634_27_melee : 1;
|
||||
bool x634_28_noShuffleCloseCheck : 1;
|
||||
bool x634_29_onlyAttackInRange : 1;
|
||||
bool x634_30_ : 1;
|
||||
bool x634_31_noKnockbackImpulseReset : 1;
|
||||
bool x635_24_noMeleeAttack : 1;
|
||||
bool x635_25_breakAttack : 1;
|
||||
bool x635_26_seated : 1;
|
||||
bool x635_27_shadowPirate : 1;
|
||||
bool x635_28_alertBeforeCloak : 1;
|
||||
bool x635_29_noBreakDodge : 1;
|
||||
bool x635_30_floatingCorpse : 1;
|
||||
bool x635_31_ragdollNoAiCollision : 1;
|
||||
bool x636_24_trooper : 1;
|
||||
bool x636_25_hearNoise : 1;
|
||||
bool x636_26_enableMeleeAttack : 1;
|
||||
bool x636_27_ : 1;
|
||||
bool x636_28_ : 1;
|
||||
bool x636_29_enableRetreat : 1;
|
||||
bool x636_30_shuffleClose : 1;
|
||||
bool x636_31_inAttackState : 1;
|
||||
bool x637_24_enablePatrol : 1;
|
||||
bool x637_25_enableAim : 1;
|
||||
bool x637_26_hearPlayerFire : 1;
|
||||
bool x637_27_inProjectilePath : 1;
|
||||
bool x637_28_noPlayerLos : 1;
|
||||
bool x637_29_inWallHang : 1;
|
||||
bool x637_30_jumpVelSet : 1;
|
||||
bool x637_31_prevInCineCam : 1;
|
||||
bool x638_24_pendingFrenzyChance : 1;
|
||||
bool x638_25_appliedBladeDamage : 1;
|
||||
bool x638_26_alwaysAggressive : 1;
|
||||
bool x638_27_coverCheck : 1;
|
||||
bool x638_28_enableDodge : 1;
|
||||
bool x638_29_noPlayerDodge : 1;
|
||||
bool x638_30_ragdollOver : 1;
|
||||
bool x638_31_mayStartAttack : 1;
|
||||
bool x639_24_ : 1;
|
||||
bool x639_25_useJumpBackJump : 1;
|
||||
bool x639_26_started : 1;
|
||||
bool x639_27_inRange : 1;
|
||||
bool x639_28_satUp : 1;
|
||||
bool x639_29_enableBreakDodge : 1;
|
||||
bool x639_30_closeMelee : 1;
|
||||
bool x639_31_sentAttackMsg : 1;
|
||||
bool x63a_24_normalDodge : 1;
|
||||
};
|
||||
|
||||
u64 _dummy = 0;
|
||||
};
|
||||
bool x634_24_pendingAmbush : 1;
|
||||
bool x634_25_ceilingAmbush : 1;
|
||||
bool x634_26_nonAggressive : 1;
|
||||
bool x634_27_melee : 1;
|
||||
bool x634_28_noShuffleCloseCheck : 1;
|
||||
bool x634_29_onlyAttackInRange : 1;
|
||||
bool x634_30_ : 1;
|
||||
bool x634_31_noKnockbackImpulseReset : 1;
|
||||
bool x635_24_noMeleeAttack : 1;
|
||||
bool x635_25_breakAttack : 1;
|
||||
bool x635_26_seated : 1;
|
||||
bool x635_27_shadowPirate : 1;
|
||||
bool x635_28_alertBeforeCloak : 1;
|
||||
bool x635_29_noBreakDodge : 1;
|
||||
bool x635_30_floatingCorpse : 1;
|
||||
bool x635_31_ragdollNoAiCollision : 1;
|
||||
bool x636_24_trooper : 1;
|
||||
bool x636_25_hearNoise : 1;
|
||||
bool x636_26_enableMeleeAttack : 1;
|
||||
bool x636_27_ : 1;
|
||||
bool x636_28_ : 1;
|
||||
bool x636_29_enableRetreat : 1;
|
||||
bool x636_30_shuffleClose : 1;
|
||||
bool x636_31_inAttackState : 1;
|
||||
bool x637_24_enablePatrol : 1;
|
||||
bool x637_25_enableAim : 1;
|
||||
bool x637_26_hearPlayerFire : 1;
|
||||
bool x637_27_inProjectilePath : 1;
|
||||
bool x637_28_noPlayerLos : 1;
|
||||
bool x637_29_inWallHang : 1;
|
||||
bool x637_30_jumpVelSet : 1;
|
||||
bool x637_31_prevInCineCam : 1;
|
||||
bool x638_24_pendingFrenzyChance : 1;
|
||||
bool x638_25_appliedBladeDamage : 1;
|
||||
bool x638_26_alwaysAggressive : 1;
|
||||
bool x638_27_coverCheck : 1;
|
||||
bool x638_28_enableDodge : 1;
|
||||
bool x638_29_noPlayerDodge : 1;
|
||||
bool x638_30_ragdollOver : 1;
|
||||
bool x638_31_mayStartAttack : 1;
|
||||
bool x639_24_ : 1;
|
||||
bool x639_25_useJumpBackJump : 1;
|
||||
bool x639_26_started : 1;
|
||||
bool x639_27_inRange : 1;
|
||||
bool x639_28_satUp : 1;
|
||||
bool x639_29_enableBreakDodge : 1;
|
||||
bool x639_30_closeMelee : 1;
|
||||
bool x639_31_sentAttackMsg : 1;
|
||||
bool x63a_24_normalDodge : 1;
|
||||
|
||||
s32 x63c_frenzyFrames = 0;
|
||||
TUniqueId x640_coverPoint = kInvalidUniqueId;
|
||||
|
|
|
@ -24,9 +24,15 @@ CWarWasp::CWarWasp(TUniqueId uid, std::string_view name, const CEntityInfo& info
|
|||
, x590_pfSearch(nullptr, 0x3, pInfo.GetPathfindingIndex(), 1.f, 1.f)
|
||||
, x684_(dInfo1)
|
||||
, x6d4_projectileInfo(projectileWeapon, projectileDamage)
|
||||
, x72c_projectileVisorSfx(CSfxManager::TranslateSFXID(projecileVisorSfx)) {
|
||||
x72e_24_jumpBackRepeat = true;
|
||||
x72e_26_initiallyInactive = !pInfo.GetActive();
|
||||
, x72c_projectileVisorSfx(CSfxManager::TranslateSFXID(projecileVisorSfx))
|
||||
, x72e_24_jumpBackRepeat(true)
|
||||
, x72e_25_canApplyDamage(false)
|
||||
, x72e_26_initiallyInactive(!pInfo.GetActive())
|
||||
, x72e_27_teamMatesMelee(false)
|
||||
, x72e_28_inProjectileAttack(false)
|
||||
, x72e_29_pathObstructed(false)
|
||||
, x72e_30_isRetreating(false)
|
||||
, x72e_31_heardNoise(false) {
|
||||
x6d4_projectileInfo.Token().Lock();
|
||||
UpdateTouchBounds();
|
||||
SetCoefficientOfRestitutionModifier(0.1f);
|
||||
|
|
|
@ -33,19 +33,15 @@ class CWarWasp : public CPatterned {
|
|||
float x718_circleBurstOffTotemAngle = zeus::degToRad(90.f);
|
||||
TLockedToken<CGenDescription> x71c_projectileVisorParticle; // Used to be optional
|
||||
u16 x72c_projectileVisorSfx;
|
||||
union {
|
||||
struct {
|
||||
bool x72e_24_jumpBackRepeat : 1;
|
||||
bool x72e_25_canApplyDamage : 1;
|
||||
bool x72e_26_initiallyInactive : 1;
|
||||
bool x72e_27_teamMatesMelee : 1;
|
||||
bool x72e_28_inProjectileAttack : 1;
|
||||
bool x72e_29_pathObstructed : 1;
|
||||
bool x72e_30_isRetreating : 1;
|
||||
bool x72e_31_heardNoise : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x72e_24_jumpBackRepeat : 1;
|
||||
bool x72e_25_canApplyDamage : 1;
|
||||
bool x72e_26_initiallyInactive : 1;
|
||||
bool x72e_27_teamMatesMelee : 1;
|
||||
bool x72e_28_inProjectileAttack : 1;
|
||||
bool x72e_29_pathObstructed : 1;
|
||||
bool x72e_30_isRetreating : 1;
|
||||
bool x72e_31_heardNoise : 1;
|
||||
|
||||
void SwarmAdd(CStateManager& mgr);
|
||||
void SwarmRemove(CStateManager& mgr);
|
||||
void ApplyDamage(CStateManager& mgr);
|
||||
|
|
|
@ -9,7 +9,7 @@ CRandom16 CDecal::sDecalRandom;
|
|||
bool CDecal::sMoveRedToAlphaBuffer = false;
|
||||
|
||||
CDecal::CDecal(const TToken<CDecalDescription>& desc, const zeus::CTransform& xf)
|
||||
: x0_description(desc), xc_transform(xf) {
|
||||
: x0_description(desc), xc_transform(xf), x5c_29_modelInvalid(false) {
|
||||
CGlobalRandom gr(sDecalRandom);
|
||||
|
||||
CDecalDescription& desco = *x0_description;
|
||||
|
|
|
@ -13,17 +13,12 @@
|
|||
namespace urde {
|
||||
struct SQuadDescr;
|
||||
struct CQuadDecal {
|
||||
union {
|
||||
struct {
|
||||
bool x0_24_invalid : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x0_24_invalid : 1;
|
||||
s32 x4_lifetime = 0;
|
||||
float x8_rotation = 0.f;
|
||||
const SQuadDescr* m_desc = nullptr;
|
||||
CQuadDecal() = default;
|
||||
CQuadDecal(s32 i, float f) : x4_lifetime(i), x8_rotation(f) { x0_24_invalid = true; }
|
||||
CQuadDecal() : x0_24_invalid(true) {}
|
||||
CQuadDecal(s32 i, float f) : x0_24_invalid(true), x4_lifetime(i), x8_rotation(f) {}
|
||||
|
||||
boo::ObjToken<boo::IGraphicsBufferD> m_instBuf;
|
||||
boo::ObjToken<boo::IGraphicsBufferD> m_uniformBuf;
|
||||
|
@ -41,14 +36,9 @@ class CDecal {
|
|||
std::array<CQuadDecal, 2> x3c_decalQuads;
|
||||
s32 x54_modelLifetime = 0;
|
||||
s32 x58_frameIdx = 0;
|
||||
union {
|
||||
struct {
|
||||
bool x5c_31_quad1Invalid : 1;
|
||||
bool x5c_30_quad2Invalid : 1;
|
||||
bool x5c_29_modelInvalid : 1;
|
||||
};
|
||||
u32 x5c_dummy = 0;
|
||||
};
|
||||
bool x5c_31_quad1Invalid : 1;
|
||||
bool x5c_30_quad2Invalid : 1;
|
||||
bool x5c_29_modelInvalid : 1;
|
||||
zeus::CVector3f x60_rotation;
|
||||
bool InitQuad(CQuadDecal& quad, const SQuadDescr& desc);
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@ struct SQuadDescr {
|
|||
|
||||
class CDecalDescription {
|
||||
public:
|
||||
CDecalDescription() : x5c_24_DMAB(false), x5c_25_DMOO(false) {}
|
||||
|
||||
SQuadDescr x0_Quads[2];
|
||||
SParticleModel x38_DMDL;
|
||||
std::unique_ptr<CIntElement> x48_DLFT;
|
||||
|
@ -30,13 +32,8 @@ public:
|
|||
std::unique_ptr<CVectorElement> x50_DMRT;
|
||||
std::unique_ptr<CVectorElement> x54_DMSC;
|
||||
std::unique_ptr<CColorElement> x58_DMCL;
|
||||
union {
|
||||
struct {
|
||||
bool x5c_24_DMAB : 1;
|
||||
bool x5c_25_DMOO : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
bool x5c_24_DMAB : 1;
|
||||
bool x5c_25_DMOO : 1;
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
|
|
|
@ -54,12 +54,25 @@ void CElementGen::Initialize() {
|
|||
void CElementGen::Shutdown() { CElementGenShaders::Shutdown(); }
|
||||
|
||||
CElementGen::CElementGen(TToken<CGenDescription> gen, EModelOrientationType orientType, EOptionalSystemFlags flags)
|
||||
: x1c_genDesc(std::move(gen)), x2c_orientType(orientType), x27c_randState(x94_randomSeed) {
|
||||
: x1c_genDesc(std::move(gen))
|
||||
, x2c_orientType(orientType)
|
||||
, x26c_24_translationDirty(false)
|
||||
, x26c_25_LIT_(false)
|
||||
, x26c_26_AAPH(false)
|
||||
, x26c_27_ZBUF(false)
|
||||
, x26c_28_zTest(false)
|
||||
, x26c_29_ORNT(false)
|
||||
, x26c_30_MBLR(false)
|
||||
, x26c_31_LINE(false)
|
||||
, x26d_24_FXLL(false)
|
||||
, x26d_25_warmedUp(false)
|
||||
, x26d_26_modelsUseLights(false)
|
||||
, x26d_27_enableOPTS(True(flags & EOptionalSystemFlags::Two))
|
||||
, x26d_28_enableADV(false)
|
||||
, x27c_randState(x94_randomSeed) {
|
||||
CGenDescription* desc = x1c_genDesc.GetObj();
|
||||
x28_loadedGenDesc = desc;
|
||||
|
||||
x26d_27_enableOPTS = True(flags & EOptionalSystemFlags::Two);
|
||||
|
||||
if (desc->x54_x40_TEXR)
|
||||
desc->x54_x40_TEXR->GetValueTexture(0).GetObj();
|
||||
if (desc->x58_x44_TIND)
|
||||
|
|
|
@ -87,26 +87,19 @@ private:
|
|||
u32 x260_cumulativeParticles = 0;
|
||||
u32 x264_recursiveParticleCount = 0;
|
||||
int x268_PSLT;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x26c_24_translationDirty : 1;
|
||||
bool x26c_25_LIT_ : 1;
|
||||
bool x26c_26_AAPH : 1;
|
||||
bool x26c_27_ZBUF : 1;
|
||||
bool x26c_28_zTest : 1;
|
||||
bool x26c_29_ORNT : 1;
|
||||
bool x26c_30_MBLR : 1;
|
||||
bool x26c_31_LINE : 1;
|
||||
bool x26d_24_FXLL : 1;
|
||||
bool x26d_25_warmedUp : 1;
|
||||
bool x26d_26_modelsUseLights : 1;
|
||||
bool x26d_27_enableOPTS : 1;
|
||||
bool x26d_28_enableADV : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
|
||||
bool x26c_24_translationDirty : 1;
|
||||
bool x26c_25_LIT_ : 1;
|
||||
bool x26c_26_AAPH : 1;
|
||||
bool x26c_27_ZBUF : 1;
|
||||
bool x26c_28_zTest : 1;
|
||||
bool x26c_29_ORNT : 1;
|
||||
bool x26c_30_MBLR : 1;
|
||||
bool x26c_31_LINE : 1;
|
||||
bool x26d_24_FXLL : 1;
|
||||
bool x26d_25_warmedUp : 1;
|
||||
bool x26d_26_modelsUseLights : 1;
|
||||
bool x26d_27_enableOPTS : 1;
|
||||
bool x26d_28_enableADV : 1;
|
||||
int x270_MBSP = 0;
|
||||
int m_maxMBSP = 0;
|
||||
ERglLightBits x274_backupLightActive = ERglLightBits::None;
|
||||
|
|
|
@ -39,30 +39,25 @@ public:
|
|||
// std::unique_ptr<CVectorElement> x38_ILOC;
|
||||
// std::unique_ptr<CVectorElement> x3c_IVEC;
|
||||
std::unique_ptr<CEmitterElement> x40_x2c_EMTR;
|
||||
union {
|
||||
struct {
|
||||
bool x44_28_x30_28_SORT : 1;
|
||||
bool x44_30_x31_24_MBLR : 1;
|
||||
bool x44_24_x30_24_LINE : 1;
|
||||
bool x44_29_x30_29_LIT_ : 1;
|
||||
bool x44_26_x30_26_AAPH : 1;
|
||||
bool x44_27_x30_27_ZBUF : 1;
|
||||
bool x44_25_x30_25_FXLL : 1;
|
||||
bool x44_31_x31_25_PMAB : 1;
|
||||
bool x45_29_x31_31_VMD4 : 1;
|
||||
bool x45_28_x31_30_VMD3 : 1;
|
||||
bool x45_27_x31_29_VMD2 : 1;
|
||||
bool x45_26_x31_28_VMD1 : 1;
|
||||
bool x45_31_x32_25_OPTS : 1;
|
||||
bool x45_24_x31_26_PMUS : 1;
|
||||
bool x45_25_x31_27_PMOO : 1;
|
||||
bool x45_30_x32_24_CIND : 1;
|
||||
/* 0-00 additions */
|
||||
bool x30_30_ORNT : 1;
|
||||
bool x30_31_RSOP : 1;
|
||||
};
|
||||
u32 dummy1 = 0;
|
||||
};
|
||||
bool x44_28_x30_28_SORT : 1;
|
||||
bool x44_30_x31_24_MBLR : 1;
|
||||
bool x44_24_x30_24_LINE : 1;
|
||||
bool x44_29_x30_29_LIT_ : 1;
|
||||
bool x44_26_x30_26_AAPH : 1;
|
||||
bool x44_27_x30_27_ZBUF : 1;
|
||||
bool x44_25_x30_25_FXLL : 1;
|
||||
bool x44_31_x31_25_PMAB : 1;
|
||||
bool x45_29_x31_31_VMD4 : 1;
|
||||
bool x45_28_x31_30_VMD3 : 1;
|
||||
bool x45_27_x31_29_VMD2 : 1;
|
||||
bool x45_26_x31_28_VMD1 : 1;
|
||||
bool x45_31_x32_25_OPTS : 1;
|
||||
bool x45_24_x31_26_PMUS : 1;
|
||||
bool x45_25_x31_27_PMOO : 1;
|
||||
bool x45_30_x32_24_CIND : 1;
|
||||
/* 0-00 additions */
|
||||
bool x30_30_ORNT : 1;
|
||||
bool x30_31_RSOP : 1;
|
||||
std::unique_ptr<CIntElement> x48_x34_MBSP;
|
||||
std::unique_ptr<CRealElement> x4c_x38_SIZE;
|
||||
std::unique_ptr<CRealElement> x50_x3c_ROTA;
|
||||
|
@ -112,7 +107,25 @@ public:
|
|||
/* Custom additions */
|
||||
std::unique_ptr<CColorElement> m_bevelGradient; /* FourCC BGCL */
|
||||
|
||||
CGenDescription() { x45_25_x31_27_PMOO = true; }
|
||||
CGenDescription()
|
||||
: x44_28_x30_28_SORT(false)
|
||||
, x44_30_x31_24_MBLR(false)
|
||||
, x44_24_x30_24_LINE(false)
|
||||
, x44_29_x30_29_LIT_(false)
|
||||
, x44_26_x30_26_AAPH(false)
|
||||
, x44_27_x30_27_ZBUF(false)
|
||||
, x44_25_x30_25_FXLL(false)
|
||||
, x44_31_x31_25_PMAB(false)
|
||||
, x45_29_x31_31_VMD4(false)
|
||||
, x45_28_x31_30_VMD3(false)
|
||||
, x45_27_x31_29_VMD2(false)
|
||||
, x45_26_x31_28_VMD1(false)
|
||||
, x45_31_x32_25_OPTS(false)
|
||||
, x45_24_x31_26_PMUS(false)
|
||||
, x45_25_x31_27_PMOO(true)
|
||||
, x45_30_x32_24_CIND(false)
|
||||
, x30_30_ORNT(false)
|
||||
, x30_31_RSOP(false) {}
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
|
|
|
@ -19,11 +19,16 @@ namespace urde {
|
|||
u16 CParticleElectric::g_GlobalSeed = 99;
|
||||
|
||||
CParticleElectric::CParticleElectric(const TToken<CElectricDescription>& token)
|
||||
: x1c_elecDesc(token), x14c_randState(g_GlobalSeed++) {
|
||||
: x1c_elecDesc(token)
|
||||
, x14c_randState(g_GlobalSeed++)
|
||||
, x450_24_emitting(true)
|
||||
, x450_25_haveGPSM(false)
|
||||
, x450_26_haveEPSM(false)
|
||||
, x450_27_haveSSWH(false)
|
||||
, x450_28_haveLWD(false)
|
||||
, x450_29_transformDirty(true) {
|
||||
x1bc_allocated.resize(32);
|
||||
|
||||
x450_24_emitting = true;
|
||||
x450_29_transformDirty = true;
|
||||
CElectricDescription* desc = x1c_elecDesc.GetObj();
|
||||
|
||||
if (CIntElement* sseg = desc->x10_SSEG.get())
|
||||
|
|
|
@ -85,22 +85,16 @@ private:
|
|||
std::vector<zeus::CVector3f> x420_calculatedVerts;
|
||||
std::vector<float> x430_fractalMags;
|
||||
std::vector<zeus::CVector3f> x440_fractalOffsets;
|
||||
bool x450_24_emitting : 1;
|
||||
bool x450_25_haveGPSM : 1;
|
||||
bool x450_26_haveEPSM : 1;
|
||||
bool x450_27_haveSSWH : 1;
|
||||
bool x450_28_haveLWD : 1;
|
||||
bool x450_29_transformDirty : 1;
|
||||
|
||||
size_t m_nextLineRenderer = 0;
|
||||
std::vector<std::unique_ptr<CLineRenderer>> m_lineRenderers;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x450_24_emitting : 1;
|
||||
bool x450_25_haveGPSM : 1;
|
||||
bool x450_26_haveEPSM : 1;
|
||||
bool x450_27_haveSSWH : 1;
|
||||
bool x450_28_haveLWD : 1;
|
||||
bool x450_29_transformDirty : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
|
||||
void SetupLineGXMaterial();
|
||||
void DrawLineStrip(const std::vector<zeus::CVector3f>& verts, float width, const zeus::CColor& color);
|
||||
void RenderLines();
|
||||
|
|
|
@ -16,8 +16,16 @@ CParticleSwoosh::CParticleSwoosh(const TToken<CSwooshDescription>& desc, int len
|
|||
, x1c0_rand(x1c_desc->x45_26_CRND ? std::chrono::duration_cast<std::chrono::microseconds>(
|
||||
std::chrono::steady_clock::now().time_since_epoch())
|
||||
.count()
|
||||
: 99) {
|
||||
x1d0_24_emitting = true;
|
||||
: 99)
|
||||
, x1d0_24_emitting(true)
|
||||
, x1d0_25_AALP(false)
|
||||
, x1d0_26_forceOneUpdate(false)
|
||||
, x1d0_27_renderGaps(false)
|
||||
, x1d0_28_LLRD(false)
|
||||
, x1d0_29_VLS1(false)
|
||||
, x1d0_30_VLS2(false)
|
||||
, x1d0_31_constantTex(false)
|
||||
, x1d1_24_constantUv(false) {
|
||||
++g_ParticleSystemAliveCount;
|
||||
|
||||
if (leng > 0)
|
||||
|
|
|
@ -83,21 +83,15 @@ class CParticleSwoosh : public CParticleGen {
|
|||
float x1c4_ = 0.f;
|
||||
float x1c8_ = 0.f;
|
||||
float x1cc_TSPN;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x1d0_24_emitting : 1;
|
||||
bool x1d0_25_AALP : 1;
|
||||
bool x1d0_26_forceOneUpdate : 1;
|
||||
bool x1d0_27_renderGaps : 1;
|
||||
bool x1d0_28_LLRD : 1;
|
||||
bool x1d0_29_VLS1 : 1;
|
||||
bool x1d0_30_VLS2 : 1;
|
||||
bool x1d0_31_constantTex : 1;
|
||||
bool x1d1_24_constantUv : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x1d0_24_emitting : 1;
|
||||
bool x1d0_25_AALP : 1;
|
||||
bool x1d0_26_forceOneUpdate : 1;
|
||||
bool x1d0_27_renderGaps : 1;
|
||||
bool x1d0_28_LLRD : 1;
|
||||
bool x1d0_29_VLS1 : 1;
|
||||
bool x1d0_30_VLS2 : 1;
|
||||
bool x1d0_31_constantTex : 1;
|
||||
bool x1d1_24_constantUv : 1;
|
||||
|
||||
SUVElementSet x1d4_uvs = {};
|
||||
CTexture* x1e4_tex = nullptr;
|
||||
|
|
|
@ -31,23 +31,29 @@ public:
|
|||
std::unique_ptr<CIntElement> x38_SPLN;
|
||||
std::unique_ptr<CUVElement> x3c_TEXR;
|
||||
std::unique_ptr<CIntElement> x40_TSPN;
|
||||
union {
|
||||
struct {
|
||||
bool x44_24_LLRD : 1;
|
||||
bool x44_25_CROS : 1;
|
||||
bool x44_26_VLS1 : 1;
|
||||
bool x44_27_VLS2 : 1;
|
||||
bool x44_28_SROT : 1;
|
||||
bool x44_29_WIRE : 1;
|
||||
bool x44_30_TEXW : 1;
|
||||
bool x44_31_AALP : 1;
|
||||
bool x45_24_ZBUF : 1;
|
||||
bool x45_25_ORNT : 1;
|
||||
bool x45_26_CRND : 1;
|
||||
};
|
||||
u32 dummy = 0;
|
||||
};
|
||||
bool x44_24_LLRD : 1;
|
||||
bool x44_25_CROS : 1;
|
||||
bool x44_26_VLS1 : 1;
|
||||
bool x44_27_VLS2 : 1;
|
||||
bool x44_28_SROT : 1;
|
||||
bool x44_29_WIRE : 1;
|
||||
bool x44_30_TEXW : 1;
|
||||
bool x44_31_AALP : 1;
|
||||
bool x45_24_ZBUF : 1;
|
||||
bool x45_25_ORNT : 1;
|
||||
bool x45_26_CRND : 1;
|
||||
|
||||
CSwooshDescription() { x44_25_CROS = true; }
|
||||
CSwooshDescription()
|
||||
: x44_24_LLRD(false)
|
||||
, x44_25_CROS(true)
|
||||
, x44_26_VLS1(false)
|
||||
, x44_27_VLS2(false)
|
||||
, x44_28_SROT(false)
|
||||
, x44_29_WIRE(false)
|
||||
, x44_30_TEXW(false)
|
||||
, x44_31_AALP(false)
|
||||
, x45_24_ZBUF(false)
|
||||
, x45_25_ORNT(false)
|
||||
, x45_26_CRND(false) {}
|
||||
};
|
||||
} // namespace urde
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
#include <zeus/Math.hpp>
|
||||
|
||||
namespace urde {
|
||||
CBurstFire::CBurstFire(const SBurst* const* burstDefs, s32 firstBurstCount) : x10_firstBurstCounter(firstBurstCount) {
|
||||
CBurstFire::CBurstFire(const SBurst* const* burstDefs, s32 firstBurstCount)
|
||||
: x10_firstBurstCounter(firstBurstCount), x14_24_shouldFire(false), x14_25_avoidAccuracy(false) {
|
||||
while (*burstDefs) {
|
||||
x1c_burstDefs.push_back(*burstDefs);
|
||||
++burstDefs;
|
||||
|
|
|
@ -23,13 +23,8 @@ class CBurstFire {
|
|||
float x8_timeToNextShot = 0.f;
|
||||
s32 xc_firstBurstIdx = 0;
|
||||
s32 x10_firstBurstCounter;
|
||||
union {
|
||||
struct {
|
||||
bool x14_24_shouldFire : 1;
|
||||
bool x14_25_avoidAccuracy : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x14_24_shouldFire : 1;
|
||||
bool x14_25_avoidAccuracy : 1;
|
||||
|
||||
const SBurst* x18_curBursts = nullptr;
|
||||
rstl::reserved_vector<const SBurst*, 16> x1c_burstDefs;
|
||||
|
|
|
@ -20,13 +20,17 @@ CEnergyProjectile::CEnergyProjectile(bool active, const TToken<CWeaponDescriptio
|
|||
const zeus::CTransform& xf, EMaterialTypes excludeMat, const CDamageInfo& damage,
|
||||
TUniqueId uid, TAreaId aid, TUniqueId owner, TUniqueId homingTarget,
|
||||
EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,
|
||||
const std::optional<TLockedToken<CGenDescription>>& visorParticle,
|
||||
u16 visorSfx, bool sendCollideMsg)
|
||||
const std::optional<TLockedToken<CGenDescription>>& visorParticle, u16 visorSfx,
|
||||
bool sendCollideMsg)
|
||||
: CGameProjectile(active, desc, "GameProjectile", type, xf, excludeMat, damage, uid, aid, owner, homingTarget, attribs,
|
||||
underwater, scale, visorParticle, visorSfx, sendCollideMsg)
|
||||
, x2ec_dir(xf.basis[1])
|
||||
, x2ec_dir(xf.frontVector())
|
||||
, x2f8_mag(x2ec_dir.magnitude())
|
||||
, x2fc_camShake(CCameraShakeData::BuildProjectileCameraShake(0.5f, 0.75f)) {
|
||||
, x2fc_camShake(CCameraShakeData::BuildProjectileCameraShake(0.5f, 0.75f))
|
||||
, x3d0_24_dead(false)
|
||||
, x3d0_25_(false)
|
||||
, x3d0_26_(false)
|
||||
, x3d0_27_camShakeDirty(false) {
|
||||
xe6_27_thermalVisorFlags = 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,15 +10,10 @@ class CEnergyProjectile : public CGameProjectile {
|
|||
zeus::CVector3f x2ec_dir;
|
||||
float x2f8_mag;
|
||||
CCameraShakeData x2fc_camShake;
|
||||
union {
|
||||
struct {
|
||||
bool x3d0_24_dead : 1;
|
||||
bool x3d0_25_ : 1;
|
||||
bool x3d0_26_ : 1;
|
||||
bool x3d0_27_camShakeDirty : 1;
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x3d0_24_dead : 1;
|
||||
bool x3d0_25_ : 1;
|
||||
bool x3d0_26_ : 1;
|
||||
bool x3d0_27_camShakeDirty : 1;
|
||||
float x3d4_curTime = 0.f;
|
||||
void StopProjectile(CStateManager& mgr);
|
||||
|
||||
|
|
|
@ -33,10 +33,8 @@ CFlameThrower::CFlameThrower(const TToken<CWeaponDescription>& wDesc, std::strin
|
|||
, x3fc_playerIceTxtr(playerIceTxtr)
|
||||
, x400_24_active(false)
|
||||
, x400_25_particlesActive(false)
|
||||
, x400_26_(!(flameInfo.GetAttributes() & 1))
|
||||
, x400_27_coneCollision((flameInfo.GetAttributes() & 0x2) != 0) {
|
||||
|
||||
}
|
||||
, x400_26_((flameInfo.GetAttributes() & 1) == 0)
|
||||
, x400_27_coneCollision((flameInfo.GetAttributes() & 0x2) != 0) {}
|
||||
|
||||
void CFlameThrower::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
|
@ -31,16 +31,10 @@ private:
|
|||
CAssetId x3f4_playerSteamTxtr;
|
||||
s16 x3f8_playerHitSfx;
|
||||
CAssetId x3fc_playerIceTxtr;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x400_24_active : 1;
|
||||
bool x400_25_particlesActive : 1;
|
||||
bool x400_26_ : 1;
|
||||
bool x400_27_coneCollision : 1; /* Z-sort and finer collision detection */
|
||||
};
|
||||
u32 _dummy = 0;
|
||||
};
|
||||
bool x400_24_active : 1;
|
||||
bool x400_25_particlesActive : 1;
|
||||
bool x400_26_ : 1;
|
||||
bool x400_27_coneCollision : 1; /* Z-sort and finer collision detection */
|
||||
|
||||
void CreateFlameParticles(CStateManager&);
|
||||
void SetFlameLightActive(CStateManager&, bool);
|
||||
|
|
|
@ -11,16 +11,12 @@ class CGSComboFire {
|
|||
s32 x4_loopState = -1; // In, loop, out
|
||||
s32 x8_cueAnimId = -1;
|
||||
s32 xc_gunId = -1;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool x10_24_over : 1;
|
||||
bool x10_25_idle : 1;
|
||||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
bool x10_24_over : 1;
|
||||
bool x10_25_idle : 1;
|
||||
|
||||
public:
|
||||
CGSComboFire() : x10_24_over(false), x10_25_idle(false) {}
|
||||
|
||||
bool IsComboOver() const { return x10_24_over; }
|
||||
s32 GetLoopState() const { return x4_loopState; }
|
||||
void SetLoopState(s32 l) { x4_loopState = l; }
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "Runtime/Weapon/CGameProjectile.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "Runtime/CStateManager.hpp"
|
||||
#include "Runtime/Collision/CCollisionActor.hpp"
|
||||
#include "Runtime/Collision/CInternalRayCastStructure.hpp"
|
||||
|
@ -19,15 +21,15 @@ CGameProjectile::CGameProjectile(bool active, const TToken<CWeaponDescription>&
|
|||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater,
|
||||
const zeus::CVector3f& scale,
|
||||
const std::optional<TLockedToken<CGenDescription>>& visorParticle,
|
||||
u16 visorSfx, bool sendCollideMsg)
|
||||
std::optional<TLockedToken<CGenDescription>> visorParticle, u16 visorSfx,
|
||||
bool sendCollideMsg)
|
||||
: CWeapon(uid, aid, active, owner, wType, name, xf,
|
||||
CMaterialFilter::MakeIncludeExclude(
|
||||
{EMaterialTypes::Solid, EMaterialTypes::NonSolidDamageable},
|
||||
{EMaterialTypes::Projectile, EMaterialTypes::ProjectilePassthrough, excludeMat}),
|
||||
CMaterialList(EMaterialTypes::Projectile), dInfo, attribs | GetBeamAttribType(wType),
|
||||
CModelData::CModelDataNull())
|
||||
, x158_visorParticle(visorParticle)
|
||||
, x158_visorParticle(std::move(visorParticle))
|
||||
, x168_visorSfx(visorSfx)
|
||||
, x170_projectile(wDesc, xf.origin, xf.basis, scale,
|
||||
(attribs & EProjectileAttrib::ParticleOPTS) == EProjectileAttrib::ParticleOPTS)
|
||||
|
@ -35,13 +37,12 @@ CGameProjectile::CGameProjectile(bool active, const TToken<CWeaponDescription>&
|
|||
, x2a4_projExtent((xe8_projectileAttribs & EProjectileAttrib::BigProjectile) == EProjectileAttrib::BigProjectile ? 0.25f
|
||||
: 0.1f)
|
||||
, x2c0_homingTargetId(homingTarget)
|
||||
, x2cc_wpscId(wDesc.GetObjectTag()->id) {
|
||||
x2e4_24_active = true;
|
||||
x2e4_25_startedUnderwater = underwater;
|
||||
x2e4_26_waterUpdate = underwater;
|
||||
x2e4_27_inWater = underwater;
|
||||
x2e4_28_sendProjectileCollideMsg = sendCollideMsg;
|
||||
}
|
||||
, x2cc_wpscId(wDesc.GetObjectTag()->id)
|
||||
, x2e4_24_active(true)
|
||||
, x2e4_25_startedUnderwater(underwater)
|
||||
, x2e4_26_waterUpdate(underwater)
|
||||
, x2e4_27_inWater(underwater)
|
||||
, x2e4_28_sendProjectileCollideMsg(sendCollideMsg) {}
|
||||
|
||||
void CGameProjectile::Accept(urde::IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue