mirror of https://github.com/AxioDL/metaforce.git
Windows fixes
This commit is contained in:
parent
4dd40f519e
commit
ad2681f857
|
@ -21,8 +21,8 @@ Everything else is much too experimental to make portable/stable release builds
|
||||||
* [CMake 3.10+](https://cmake.org)
|
* [CMake 3.10+](https://cmake.org)
|
||||||
* [Python 3+](https://python.org)
|
* [Python 3+](https://python.org)
|
||||||
* LLVM development package *(headers and libs)*
|
* LLVM development package *(headers and libs)*
|
||||||
* [Specialized Windows Package](https://axiodl.com/LLVM-6.0.0svn-win64.exe)
|
* [Specialized Windows Package](https://axiodl.com/LLVM-9.0.0svn-win64.exe)
|
||||||
* [macOS Package](http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-x86_64-apple-darwin.tar.xz)
|
* [macOS Package](http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz)
|
||||||
* **[Windows]** [Visual Studio 2017 and Windows SDK](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
|
* **[Windows]** [Visual Studio 2017 and Windows SDK](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
|
||||||
* **[macOS]** [Xcode Tools](https://developer.apple.com/xcode/download/)
|
* **[macOS]** [Xcode Tools](https://developer.apple.com/xcode/download/)
|
||||||
* **[Linux]** recent development packages of `udev`, `x11`, `xcb`, `xinput`, `glx`, `asound`
|
* **[Linux]** recent development packages of `udev`, `x11`, `xcb`, `xinput`, `glx`, `asound`
|
||||||
|
|
|
@ -46,7 +46,7 @@ bool CStaticAudioPlayer::IsReady() {
|
||||||
|
|
||||||
void CStaticAudioPlayer::DecodeMonoAndMix(s16* bufOut, u32 numSamples, u32 cur, u32 loopEndCur, u32 loopStartCur,
|
void CStaticAudioPlayer::DecodeMonoAndMix(s16* bufOut, u32 numSamples, u32 cur, u32 loopEndCur, u32 loopStartCur,
|
||||||
int vol, g72x_state& state,
|
int vol, g72x_state& state,
|
||||||
std::experimental::optional<g72x_state>& loopState) const {
|
rstl::optional<g72x_state>& loopState) const {
|
||||||
for (u32 remBytes = numSamples / 2; remBytes;) {
|
for (u32 remBytes = numSamples / 2; remBytes;) {
|
||||||
u32 curBuf = cur / RSF_BUFFER_SIZE;
|
u32 curBuf = cur / RSF_BUFFER_SIZE;
|
||||||
u32 thisBytes = (curBuf + 1) * RSF_BUFFER_SIZE - cur;
|
u32 thisBytes = (curBuf + 1) * RSF_BUFFER_SIZE - cur;
|
||||||
|
|
|
@ -23,8 +23,8 @@ class CStaticAudioPlayer {
|
||||||
std::vector<std::unique_ptr<u8[]>> x48_buffers;
|
std::vector<std::unique_ptr<u8[]>> x48_buffers;
|
||||||
g72x_state x58_leftState;
|
g72x_state x58_leftState;
|
||||||
g72x_state x8c_rightState;
|
g72x_state x8c_rightState;
|
||||||
std::experimental::optional<g72x_state> m_leftStateLoop;
|
rstl::optional<g72x_state> m_leftStateLoop;
|
||||||
std::experimental::optional<g72x_state> m_rightStateLoop;
|
rstl::optional<g72x_state> m_rightStateLoop;
|
||||||
u32 xc0_volume = 32768; // Out of 32768
|
u32 xc0_volume = 32768; // Out of 32768
|
||||||
|
|
||||||
static int16_t SampClamp(int32_t val) {
|
static int16_t SampClamp(int32_t val) {
|
||||||
|
@ -57,7 +57,7 @@ public:
|
||||||
|
|
||||||
bool IsReady();
|
bool IsReady();
|
||||||
void DecodeMonoAndMix(s16* bufOut, u32 numSamples, u32 cur, u32 loopEndCur, u32 loopStartCur, int vol,
|
void DecodeMonoAndMix(s16* bufOut, u32 numSamples, u32 cur, u32 loopEndCur, u32 loopStartCur, int vol,
|
||||||
g72x_state& state, std::experimental::optional<g72x_state>& loopState) const;
|
g72x_state& state, rstl::optional<g72x_state>& loopState) const;
|
||||||
void Decode(s16* bufOut, u32 numSamples);
|
void Decode(s16* bufOut, u32 numSamples);
|
||||||
void SetVolume(float vol) { xc0_volume = zeus::clamp(0.f, vol, 1.f) * 32768.f; }
|
void SetVolume(float vol) { xc0_volume = zeus::clamp(0.f, vol, 1.f) * 32768.f; }
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct SDSPStream : boo::IAudioVoiceCallback {
|
||||||
bool xe8_silent = true;
|
bool xe8_silent = true;
|
||||||
u8 xec_readState = 0; // 0: NoRead 1: Read 2: ReadWrap
|
u8 xec_readState = 0; // 0: NoRead 1: Read 2: ReadWrap
|
||||||
|
|
||||||
std::experimental::optional<CDvdFile> m_file;
|
rstl::optional<CDvdFile> m_file;
|
||||||
std::shared_ptr<IDvdRequest> m_readReqs[2];
|
std::shared_ptr<IDvdRequest> m_readReqs[2];
|
||||||
|
|
||||||
void ReadBuffer(int buf) {
|
void ReadBuffer(int buf) {
|
||||||
|
@ -262,7 +262,7 @@ struct SDSPStream : boo::IAudioVoiceCallback {
|
||||||
stream.m_readReqs[j].reset();
|
stream.m_readReqs[j].reset();
|
||||||
}
|
}
|
||||||
stream.xd4_ringBuffer.reset();
|
stream.xd4_ringBuffer.reset();
|
||||||
stream.m_file = std::experimental::nullopt;
|
stream.m_file = rstl::nullopt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ struct SDSPStream : boo::IAudioVoiceCallback {
|
||||||
void StopStream() {
|
void StopStream() {
|
||||||
x0_active = false;
|
x0_active = false;
|
||||||
m_booVoice->stop();
|
m_booVoice->stop();
|
||||||
m_file = std::experimental::nullopt;
|
m_file = rstl::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IsStreamActive(s32 id) {
|
static bool IsStreamActive(s32 id) {
|
||||||
|
|
|
@ -172,7 +172,7 @@ private:
|
||||||
u32 x328_ = 0;
|
u32 x328_ = 0;
|
||||||
bool x32c_loadingDummyWorld = false;
|
bool x32c_loadingDummyWorld = false;
|
||||||
|
|
||||||
std::experimental::optional<zeus::CVector2f> m_lastMouseCoord;
|
rstl::optional<zeus::CVector2f> m_lastMouseCoord;
|
||||||
zeus::CVector2f m_mouseDelta;
|
zeus::CVector2f m_mouseDelta;
|
||||||
boo::SScrollDelta m_lastAccumScroll;
|
boo::SScrollDelta m_lastAccumScroll;
|
||||||
boo::SScrollDelta m_mapScroll;
|
boo::SScrollDelta m_mapScroll;
|
||||||
|
|
|
@ -64,8 +64,8 @@ private:
|
||||||
: m_surface(ctx, g_doorVbo, g_doorIbo)
|
: m_surface(ctx, g_doorVbo, g_doorIbo)
|
||||||
, m_outline(ctx, CLineRenderer::EPrimitiveMode::LineLoop, 5, nullptr, false, false, true) {}
|
, m_outline(ctx, CLineRenderer::EPrimitiveMode::LineLoop, 5, nullptr, false, false, true) {}
|
||||||
};
|
};
|
||||||
std::experimental::optional<DoorSurface> m_doorSurface;
|
rstl::optional<DoorSurface> m_doorSurface;
|
||||||
std::experimental::optional<CTexturedQuadFilter> m_texQuadFilter;
|
rstl::optional<CTexturedQuadFilter> m_texQuadFilter;
|
||||||
|
|
||||||
zeus::CTransform AdjustTransformForType();
|
zeus::CTransform AdjustTransformForType();
|
||||||
std::pair<zeus::CColor, zeus::CColor> GetDoorColors(int idx, const CMapWorldInfo& mwInfo, float alpha) const;
|
std::pair<zeus::CColor, zeus::CColor> GetDoorColors(int idx, const CMapWorldInfo& mwInfo, float alpha) const;
|
||||||
|
|
|
@ -146,7 +146,7 @@ bool CMemoryCardSys::InitializePump() {
|
||||||
std::sort(x20_scanStates.begin(), x20_scanStates.end(), [&](const auto& a, const auto& b) -> bool {
|
std::sort(x20_scanStates.begin(), x20_scanStates.end(), [&](const auto& a, const auto& b) -> bool {
|
||||||
return g_ResFactory->TranslateNewToOriginal(a.first) < g_ResFactory->TranslateNewToOriginal(b.first);
|
return g_ResFactory->TranslateNewToOriginal(a.first) < g_ResFactory->TranslateNewToOriginal(b.first);
|
||||||
});
|
});
|
||||||
x1c_worldInter = std::experimental::nullopt;
|
x1c_worldInter = rstl::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
class CMemoryCardSys {
|
class CMemoryCardSys {
|
||||||
TLockedToken<CGameHintInfo> x0_hints;
|
TLockedToken<CGameHintInfo> x0_hints;
|
||||||
std::vector<std::pair<CAssetId, CSaveWorldMemory>> xc_memoryWorlds; /* MLVL as key */
|
std::vector<std::pair<CAssetId, CSaveWorldMemory>> xc_memoryWorlds; /* MLVL as key */
|
||||||
std::experimental::optional<std::vector<CSaveWorldIntermediate>> x1c_worldInter; /* used to be auto_ptr of vector */
|
rstl::optional<std::vector<CSaveWorldIntermediate>> x1c_worldInter; /* used to be auto_ptr of vector */
|
||||||
std::vector<std::pair<CAssetId, CSaveWorld::EScanCategory>> x20_scanStates;
|
std::vector<std::pair<CAssetId, CSaveWorld::EScanCategory>> x20_scanStates;
|
||||||
rstl::reserved_vector<u32, 6> x30_scanCategoryCounts;
|
rstl::reserved_vector<u32, 6> x30_scanCategoryCounts;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ public:
|
||||||
std::string x18_fileName;
|
std::string x18_fileName;
|
||||||
std::string x28_comment;
|
std::string x28_comment;
|
||||||
CAssetId x3c_bannerTex;
|
CAssetId x3c_bannerTex;
|
||||||
std::experimental::optional<TLockedToken<CTexture>> x40_bannerTok;
|
rstl::optional<TLockedToken<CTexture>> x40_bannerTok;
|
||||||
rstl::reserved_vector<Icon, 8> x50_iconToks;
|
rstl::reserved_vector<Icon, 8> x50_iconToks;
|
||||||
std::vector<u8> xf4_saveBuffer;
|
std::vector<u8> xf4_saveBuffer;
|
||||||
std::vector<u8> x104_cardBuffer;
|
std::vector<u8> x104_cardBuffer;
|
||||||
|
|
|
@ -1376,7 +1376,7 @@ void CStateManager::ProcessRadiusDamage(const CActor& damager, CActor& damagee,
|
||||||
void CStateManager::ApplyRadiusDamage(const CActor& a1, const zeus::CVector3f& pos, CActor& a2,
|
void CStateManager::ApplyRadiusDamage(const CActor& a1, const zeus::CVector3f& pos, CActor& a2,
|
||||||
const CDamageInfo& info) {
|
const CDamageInfo& info) {
|
||||||
zeus::CVector3f delta = a2.GetTranslation() - pos;
|
zeus::CVector3f delta = a2.GetTranslation() - pos;
|
||||||
std::experimental::optional<zeus::CAABox> bounds;
|
rstl::optional<zeus::CAABox> bounds;
|
||||||
if (delta.magSquared() < info.GetRadius() * info.GetRadius() ||
|
if (delta.magSquared() < info.GetRadius() * info.GetRadius() ||
|
||||||
((bounds = a2.GetTouchBounds()) &&
|
((bounds = a2.GetTouchBounds()) &&
|
||||||
CCollidableSphere::Sphere_AABox_Bool(zeus::CSphere{pos, info.GetRadius()}, *bounds))) {
|
CCollidableSphere::Sphere_AABox_Bool(zeus::CSphere{pos, info.GetRadius()}, *bounds))) {
|
||||||
|
@ -1426,7 +1426,7 @@ bool CStateManager::TestRayDamage(const zeus::CVector3f& pos, const CActor& dama
|
||||||
EMaterialTypes::Occluder, EMaterialTypes::Character);
|
EMaterialTypes::Occluder, EMaterialTypes::Character);
|
||||||
static const CMaterialFilter filter(incList, exList, CMaterialFilter::EFilterType::IncludeExclude);
|
static const CMaterialFilter filter(incList, exList, CMaterialFilter::EFilterType::IncludeExclude);
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> bounds = damagee.GetTouchBounds();
|
rstl::optional<zeus::CAABox> bounds = damagee.GetTouchBounds();
|
||||||
if (!bounds)
|
if (!bounds)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -1930,7 +1930,7 @@ void CStateManager::CrossTouchActors() {
|
||||||
CActor& actor = static_cast<CActor&>(*ent);
|
CActor& actor = static_cast<CActor&>(*ent);
|
||||||
if (!actor.GetActive() || !actor.GetCallTouch())
|
if (!actor.GetActive() || !actor.GetCallTouch())
|
||||||
continue;
|
continue;
|
||||||
std::experimental::optional<zeus::CAABox> touchAABB = actor.GetTouchBounds();
|
rstl::optional<zeus::CAABox> touchAABB = actor.GetTouchBounds();
|
||||||
if (!touchAABB)
|
if (!touchAABB)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1946,7 +1946,7 @@ void CStateManager::CrossTouchActors() {
|
||||||
if (!ent2)
|
if (!ent2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> touchAABB2 = ent2->GetTouchBounds();
|
rstl::optional<zeus::CAABox> touchAABB2 = ent2->GetTouchBounds();
|
||||||
if (!ent2->GetActive() || !touchAABB2)
|
if (!ent2->GetActive() || !touchAABB2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -2217,7 +2217,7 @@ void CStateManager::UpdateActorInSortedLists(CActor& act) {
|
||||||
if (!act.GetUseInSortedLists() || !act.xe4_27_notInSortedLists)
|
if (!act.GetUseInSortedLists() || !act.xe4_27_notInSortedLists)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> aabb = CalculateObjectBounds(act);
|
rstl::optional<zeus::CAABox> aabb = CalculateObjectBounds(act);
|
||||||
bool actorInLists = x874_sortedListManager->ActorInLists(&act);
|
bool actorInLists = x874_sortedListManager->ActorInLists(&act);
|
||||||
if (actorInLists || aabb) {
|
if (actorInLists || aabb) {
|
||||||
act.xe4_27_notInSortedLists = false;
|
act.xe4_27_notInSortedLists = false;
|
||||||
|
@ -2240,8 +2240,8 @@ void CStateManager::UpdateSortedLists() {
|
||||||
UpdateActorInSortedLists(static_cast<CActor&>(*actor));
|
UpdateActorInSortedLists(static_cast<CActor&>(*actor));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CStateManager::CalculateObjectBounds(const CActor& actor) {
|
rstl::optional<zeus::CAABox> CStateManager::CalculateObjectBounds(const CActor& actor) {
|
||||||
std::experimental::optional<zeus::CAABox> bounds = actor.GetTouchBounds();
|
rstl::optional<zeus::CAABox> bounds = actor.GetTouchBounds();
|
||||||
if (bounds) {
|
if (bounds) {
|
||||||
zeus::CAABox aabb;
|
zeus::CAABox aabb;
|
||||||
aabb.accumulateBounds(bounds->min);
|
aabb.accumulateBounds(bounds->min);
|
||||||
|
|
|
@ -335,7 +335,7 @@ public:
|
||||||
const CActor*) const;
|
const CActor*) const;
|
||||||
void UpdateActorInSortedLists(CActor&);
|
void UpdateActorInSortedLists(CActor&);
|
||||||
void UpdateSortedLists();
|
void UpdateSortedLists();
|
||||||
std::experimental::optional<zeus::CAABox> CalculateObjectBounds(const CActor&);
|
rstl::optional<zeus::CAABox> CalculateObjectBounds(const CActor&);
|
||||||
void AddObject(CEntity&);
|
void AddObject(CEntity&);
|
||||||
void AddObject(CEntity*);
|
void AddObject(CEntity*);
|
||||||
CRayCastResult RayStaticIntersection(const zeus::CVector3f& pos, const zeus::CVector3f& dir, float length,
|
CRayCastResult RayStaticIntersection(const zeus::CVector3f& pos, const zeus::CVector3f& dir, float length,
|
||||||
|
|
|
@ -29,7 +29,7 @@ void CCameraFilterPass<S>::Update(float dt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x0_curType == EFilterType::Passthru)
|
if (x0_curType == EFilterType::Passthru)
|
||||||
m_shader = std::experimental::nullopt;
|
m_shader = rstl::nullopt;
|
||||||
else if (x0_curType != origType)
|
else if (x0_curType != origType)
|
||||||
m_shader.emplace(x0_curType, x24_texObj);
|
m_shader.emplace(x0_curType, x24_texObj);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ void CCameraFilterPass<S>::SetFilter(EFilterType type, EFilterShape shape, float
|
||||||
if (txtr.IsValid())
|
if (txtr.IsValid())
|
||||||
x24_texObj = g_SimplePool->GetObj({FOURCC('TXTR'), txtr});
|
x24_texObj = g_SimplePool->GetObj({FOURCC('TXTR'), txtr});
|
||||||
if (type == EFilterType::Passthru)
|
if (type == EFilterType::Passthru)
|
||||||
m_shader = std::experimental::nullopt;
|
m_shader = rstl::nullopt;
|
||||||
else if (x0_curType != type || (x20_nextTxtr != txtr && txtr.IsValid()))
|
else if (x0_curType != type || (x20_nextTxtr != txtr && txtr.IsValid()))
|
||||||
m_shader.emplace(type, x24_texObj);
|
m_shader.emplace(type, x24_texObj);
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ void CCameraFilterPass<S>::SetFilter(EFilterType type, EFilterShape shape, float
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x0_curType == EFilterType::Passthru)
|
if (x0_curType == EFilterType::Passthru)
|
||||||
m_shader = std::experimental::nullopt;
|
m_shader = rstl::nullopt;
|
||||||
else if (x0_curType != origType || (x20_nextTxtr != origTxtr && x20_nextTxtr.IsValid()))
|
else if (x0_curType != origType || (x20_nextTxtr != origTxtr && x20_nextTxtr.IsValid()))
|
||||||
m_shader.emplace(x0_curType, x24_texObj);
|
m_shader.emplace(x0_curType, x24_texObj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
class CCameraFilterPass final : public CCameraFilterPassBase {
|
class CCameraFilterPass final : public CCameraFilterPassBase {
|
||||||
std::experimental::optional<S> m_shader;
|
rstl::optional<S> m_shader;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Update(float dt);
|
void Update(float dt);
|
||||||
|
@ -103,8 +103,8 @@ class CCameraBlurPass {
|
||||||
// bool x2d_noPersistentCopy = false;
|
// bool x2d_noPersistentCopy = false;
|
||||||
// u32 x30_persistentBuf = 0;
|
// u32 x30_persistentBuf = 0;
|
||||||
|
|
||||||
mutable std::experimental::optional<CCameraBlurFilter> m_shader;
|
mutable rstl::optional<CCameraBlurFilter> m_shader;
|
||||||
mutable std::experimental::optional<CXRayBlurFilter> m_xrayShader;
|
mutable rstl::optional<CXRayBlurFilter> m_xrayShader;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Draw(bool clearDepth = false);
|
void Draw(bool clearDepth = false);
|
||||||
|
|
|
@ -37,7 +37,7 @@ void CAnimData::InitializeCache() {}
|
||||||
|
|
||||||
CAnimData::CAnimData(CAssetId id, const CCharacterInfo& character, int defaultAnim, int charIdx, bool loop,
|
CAnimData::CAnimData(CAssetId id, const CCharacterInfo& character, int defaultAnim, int charIdx, bool loop,
|
||||||
const TLockedToken<CCharLayoutInfo>& layout, const TToken<CSkinnedModel>& model,
|
const TLockedToken<CCharLayoutInfo>& layout, const TToken<CSkinnedModel>& model,
|
||||||
const std::experimental::optional<TToken<CMorphableSkinnedModel>>& iceModel,
|
const rstl::optional<TToken<CMorphableSkinnedModel>>& iceModel,
|
||||||
const std::weak_ptr<CAnimSysContext>& ctx, const std::shared_ptr<CAnimationManager>& animMgr,
|
const std::weak_ptr<CAnimSysContext>& ctx, const std::shared_ptr<CAnimationManager>& animMgr,
|
||||||
const std::shared_ptr<CTransitionManager>& transMgr,
|
const std::shared_ptr<CTransitionManager>& transMgr,
|
||||||
const TLockedToken<CCharacterFactory>& charFactory, int drawInstCount)
|
const TLockedToken<CCharacterFactory>& charFactory, int drawInstCount)
|
||||||
|
@ -541,14 +541,14 @@ void CAnimData::RecalcPoseBuilder(const CCharAnimTime* time) {
|
||||||
void CAnimData::RenderAuxiliary(const zeus::CFrustum& frustum) const { x120_particleDB.AddToRendererClipped(frustum); }
|
void CAnimData::RenderAuxiliary(const zeus::CFrustum& frustum) const { x120_particleDB.AddToRendererClipped(frustum); }
|
||||||
|
|
||||||
void CAnimData::Render(CSkinnedModel& model, const CModelFlags& drawFlags,
|
void CAnimData::Render(CSkinnedModel& model, const CModelFlags& drawFlags,
|
||||||
const std::experimental::optional<CVertexMorphEffect>& morphEffect,
|
const rstl::optional<CVertexMorphEffect>& morphEffect,
|
||||||
const float* morphMagnitudes) {
|
const float* morphMagnitudes) {
|
||||||
SetupRender(model, drawFlags, morphEffect, morphMagnitudes);
|
SetupRender(model, drawFlags, morphEffect, morphMagnitudes);
|
||||||
DrawSkinnedModel(model, drawFlags);
|
DrawSkinnedModel(model, drawFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAnimData::SetupRender(CSkinnedModel& model, const CModelFlags& drawFlags,
|
void CAnimData::SetupRender(CSkinnedModel& model, const CModelFlags& drawFlags,
|
||||||
const std::experimental::optional<CVertexMorphEffect>& morphEffect,
|
const rstl::optional<CVertexMorphEffect>& morphEffect,
|
||||||
const float* morphMagnitudes) {
|
const float* morphMagnitudes) {
|
||||||
if (!x220_30_poseBuilt) {
|
if (!x220_30_poseBuilt) {
|
||||||
x2fc_poseBuilder.BuildNoScale(x224_pose);
|
x2fc_poseBuilder.BuildNoScale(x224_pose);
|
||||||
|
@ -741,7 +741,7 @@ SAdvancementDeltas CAnimData::AdvanceIgnoreParticles(float dt, CRandom16& random
|
||||||
|
|
||||||
void CAnimData::AdvanceAnim(CCharAnimTime& time, zeus::CVector3f& offset, zeus::CQuaternion& quat) {
|
void CAnimData::AdvanceAnim(CCharAnimTime& time, zeus::CVector3f& offset, zeus::CQuaternion& quat) {
|
||||||
SAdvancementResults results;
|
SAdvancementResults results;
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> simplified;
|
rstl::optional<std::unique_ptr<IAnimReader>> simplified;
|
||||||
|
|
||||||
if (x104_animDir == EAnimDir::Forward) {
|
if (x104_animDir == EAnimDir::Forward) {
|
||||||
results = x1f8_animRoot->VAdvanceView(time);
|
results = x1f8_animRoot->VAdvanceView(time);
|
||||||
|
@ -798,7 +798,7 @@ void CAnimData::SetInfraModel(const TLockedToken<CModel>& model, const TLockedTo
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAnimData::PoseSkinnedModel(CSkinnedModel& model, const CPoseAsTransforms& pose, const CModelFlags& drawFlags,
|
void CAnimData::PoseSkinnedModel(CSkinnedModel& model, const CPoseAsTransforms& pose, const CModelFlags& drawFlags,
|
||||||
const std::experimental::optional<CVertexMorphEffect>& morphEffect,
|
const rstl::optional<CVertexMorphEffect>& morphEffect,
|
||||||
const float* morphMagnitudes) {
|
const float* morphMagnitudes) {
|
||||||
model.Calculate(pose, drawFlags, morphEffect, morphMagnitudes);
|
model.Calculate(pose, drawFlags, morphEffect, morphMagnitudes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ private:
|
||||||
public:
|
public:
|
||||||
CAnimData(CAssetId, const CCharacterInfo& character, int defaultAnim, int charIdx, bool loop,
|
CAnimData(CAssetId, const CCharacterInfo& character, int defaultAnim, int charIdx, bool loop,
|
||||||
const TLockedToken<CCharLayoutInfo>& layout, const TToken<CSkinnedModel>& model,
|
const TLockedToken<CCharLayoutInfo>& layout, const TToken<CSkinnedModel>& model,
|
||||||
const std::experimental::optional<TToken<CMorphableSkinnedModel>>& iceModel,
|
const rstl::optional<TToken<CMorphableSkinnedModel>>& iceModel,
|
||||||
const std::weak_ptr<CAnimSysContext>& ctx, const std::shared_ptr<CAnimationManager>& animMgr,
|
const std::weak_ptr<CAnimSysContext>& ctx, const std::shared_ptr<CAnimationManager>& animMgr,
|
||||||
const std::shared_ptr<CTransitionManager>& transMgr, const TLockedToken<CCharacterFactory>& charFactory,
|
const std::shared_ptr<CTransitionManager>& transMgr, const TLockedToken<CCharacterFactory>& charFactory,
|
||||||
int drawInstCount);
|
int drawInstCount);
|
||||||
|
@ -195,9 +195,9 @@ public:
|
||||||
void RecalcPoseBuilder(const CCharAnimTime*);
|
void RecalcPoseBuilder(const CCharAnimTime*);
|
||||||
void RenderAuxiliary(const zeus::CFrustum& frustum) const;
|
void RenderAuxiliary(const zeus::CFrustum& frustum) const;
|
||||||
void Render(CSkinnedModel& model, const CModelFlags& drawFlags,
|
void Render(CSkinnedModel& model, const CModelFlags& drawFlags,
|
||||||
const std::experimental::optional<CVertexMorphEffect>& morphEffect, const float* morphMagnitudes);
|
const rstl::optional<CVertexMorphEffect>& morphEffect, const float* morphMagnitudes);
|
||||||
void SetupRender(CSkinnedModel& model, const CModelFlags& drawFlags,
|
void SetupRender(CSkinnedModel& model, const CModelFlags& drawFlags,
|
||||||
const std::experimental::optional<CVertexMorphEffect>& morphEffect, const float* morphMagnitudes);
|
const rstl::optional<CVertexMorphEffect>& morphEffect, const float* morphMagnitudes);
|
||||||
static void DrawSkinnedModel(CSkinnedModel& model, const CModelFlags& flags);
|
static void DrawSkinnedModel(CSkinnedModel& model, const CModelFlags& flags);
|
||||||
void PreRender();
|
void PreRender();
|
||||||
void BuildPose();
|
void BuildPose();
|
||||||
|
@ -217,7 +217,7 @@ public:
|
||||||
const TLockedToken<CSkinnedModel>& GetModelData() const { return xd8_modelData; }
|
const TLockedToken<CSkinnedModel>& GetModelData() const { return xd8_modelData; }
|
||||||
|
|
||||||
static void PoseSkinnedModel(CSkinnedModel& model, const CPoseAsTransforms& pose, const CModelFlags& drawFlags,
|
static void PoseSkinnedModel(CSkinnedModel& model, const CPoseAsTransforms& pose, const CModelFlags& drawFlags,
|
||||||
const std::experimental::optional<CVertexMorphEffect>& morphEffect,
|
const rstl::optional<CVertexMorphEffect>& morphEffect,
|
||||||
const float* morphMagnitudes);
|
const float* morphMagnitudes);
|
||||||
void AdvanceParticles(const zeus::CTransform& xf, float dt, const zeus::CVector3f&, CStateManager& stateMgr);
|
void AdvanceParticles(const zeus::CTransform& xf, float dt, const zeus::CVector3f&, CStateManager& stateMgr);
|
||||||
float GetAverageVelocity(int animIn) const;
|
float GetAverageVelocity(int animIn) const;
|
||||||
|
|
|
@ -82,7 +82,7 @@ std::unique_ptr<IAnimReader> CAnimTreeAnimReaderContainer::VClone() const {
|
||||||
return std::make_unique<CAnimTreeAnimReaderContainer>(x4_name, x14_reader->Clone(), x1c_animDbIdx);
|
return std::make_unique<CAnimTreeAnimReaderContainer>(x4_name, x14_reader->Clone(), x1c_animDbIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> CAnimTreeAnimReaderContainer::VSimplified() { return {}; }
|
rstl::optional<std::unique_ptr<IAnimReader>> CAnimTreeAnimReaderContainer::VSimplified() { return {}; }
|
||||||
|
|
||||||
void CAnimTreeAnimReaderContainer::VSetPhase(float ph) { x14_reader->VSetPhase(ph); }
|
void CAnimTreeAnimReaderContainer::VSetPhase(float ph) { x14_reader->VSetPhase(ph); }
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const;
|
void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut) const;
|
||||||
void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const;
|
void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut, const CCharAnimTime& time) const;
|
||||||
std::unique_ptr<IAnimReader> VClone() const;
|
std::unique_ptr<IAnimReader> VClone() const;
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
rstl::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
||||||
void VSetPhase(float);
|
void VSetPhase(float);
|
||||||
SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const;
|
SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,7 @@ CAnimTreeEffectiveContribution CAnimTreeLoopIn::VGetContributionOfHighestInfluen
|
||||||
return x14_child->GetContributionOfHighestInfluence();
|
return x14_child->GetContributionOfHighestInfluence();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> CAnimTreeLoopIn::VSimplified() {
|
rstl::optional<std::unique_ptr<IAnimReader>> CAnimTreeLoopIn::VSimplified() {
|
||||||
CCharAnimTime remTime = x14_child->VGetTimeRemaining();
|
CCharAnimTime remTime = x14_child->VGetTimeRemaining();
|
||||||
if (remTime.GreaterThanZero() && !remTime.EpsilonZero()) {
|
if (remTime.GreaterThanZero() && !remTime.EpsilonZero()) {
|
||||||
auto simp = x14_child->Simplified();
|
auto simp = x14_child->Simplified();
|
||||||
|
|
|
@ -23,7 +23,7 @@ public:
|
||||||
const CCharAnimTime& time);
|
const CCharAnimTime& time);
|
||||||
CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const;
|
CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const;
|
||||||
bool VSupportsReverseView() const { return false; }
|
bool VSupportsReverseView() const { return false; }
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
rstl::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
||||||
std::shared_ptr<IAnimReader> VGetBestUnblendedChild() const;
|
std::shared_ptr<IAnimReader> VGetBestUnblendedChild() const;
|
||||||
std::unique_ptr<IAnimReader> VClone() const;
|
std::unique_ptr<IAnimReader> VClone() const;
|
||||||
u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
|
|
|
@ -43,7 +43,7 @@ CCharAnimTime CAnimTreeTimeScale::GetRealLifeTime(const CCharAnimTime& time) con
|
||||||
|
|
||||||
void CAnimTreeTimeScale::VSetPhase(float phase) { x14_child->VSetPhase(phase); }
|
void CAnimTreeTimeScale::VSetPhase(float phase) { x14_child->VSetPhase(phase); }
|
||||||
|
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> CAnimTreeTimeScale::VSimplified() {
|
rstl::optional<std::unique_ptr<IAnimReader>> CAnimTreeTimeScale::VSimplified() {
|
||||||
if (auto simp = x14_child->Simplified()) {
|
if (auto simp = x14_child->Simplified()) {
|
||||||
CAnimTreeTimeScale* newNode = new CAnimTreeTimeScale(CAnimTreeNode::Cast(std::move(*simp)), x18_timeScale->Clone(),
|
CAnimTreeTimeScale* newNode = new CAnimTreeTimeScale(CAnimTreeNode::Cast(std::move(*simp)), x18_timeScale->Clone(),
|
||||||
x28_targetAccelTime, x4_name);
|
x28_targetAccelTime, x4_name);
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
|
|
||||||
CCharAnimTime GetRealLifeTime(const CCharAnimTime&) const;
|
CCharAnimTime GetRealLifeTime(const CCharAnimTime&) const;
|
||||||
void VSetPhase(float);
|
void VSetPhase(float);
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
rstl::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
||||||
|
|
||||||
u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
u32 VGetBoolPOIList(const CCharAnimTime& time, CBoolPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const;
|
u32 VGetInt32POIList(const CCharAnimTime& time, CInt32POINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
|
|
|
@ -52,7 +52,7 @@ std::unique_ptr<IAnimReader> CAnimTreeTransition::VClone() const {
|
||||||
x2c_timeInTrans, x34_runA, x35_loopA, x1c_flags, x4_name, x36_initialized);
|
x2c_timeInTrans, x34_runA, x35_loopA, x1c_flags, x4_name, x36_initialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> CAnimTreeTransition::VSimplified() {
|
rstl::optional<std::unique_ptr<IAnimReader>> CAnimTreeTransition::VSimplified() {
|
||||||
if (zeus::close_enough(GetBlendingWeight(), 1.f)) {
|
if (zeus::close_enough(GetBlendingWeight(), 1.f)) {
|
||||||
if (auto simp = x18_b->Simplified())
|
if (auto simp = x18_b->Simplified())
|
||||||
return simp;
|
return simp;
|
||||||
|
@ -61,7 +61,7 @@ std::experimental::optional<std::unique_ptr<IAnimReader>> CAnimTreeTransition::V
|
||||||
return CAnimTreeTweenBase::VSimplified();
|
return CAnimTreeTweenBase::VSimplified();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> CAnimTreeTransition::VReverseSimplified() {
|
rstl::optional<std::unique_ptr<IAnimReader>> CAnimTreeTransition::VReverseSimplified() {
|
||||||
if (zeus::close_enough(GetBlendingWeight(), 0.f))
|
if (zeus::close_enough(GetBlendingWeight(), 0.f))
|
||||||
return {x14_a->Clone()};
|
return {x14_a->Clone()};
|
||||||
return CAnimTreeTweenBase::VReverseSimplified();
|
return CAnimTreeTweenBase::VReverseSimplified();
|
||||||
|
|
|
@ -27,8 +27,8 @@ public:
|
||||||
CCharAnimTime VGetTimeRemaining() const;
|
CCharAnimTime VGetTimeRemaining() const;
|
||||||
CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const;
|
CSteadyStateAnimInfo VGetSteadyStateAnimInfo() const;
|
||||||
std::unique_ptr<IAnimReader> VClone() const;
|
std::unique_ptr<IAnimReader> VClone() const;
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
rstl::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> VReverseSimplified();
|
rstl::optional<std::unique_ptr<IAnimReader>> VReverseSimplified();
|
||||||
SAdvancementResults VAdvanceView(const CCharAnimTime& a);
|
SAdvancementResults VAdvanceView(const CCharAnimTime& a);
|
||||||
void SetBlendingWeight(float w);
|
void SetBlendingWeight(float w);
|
||||||
float VGetBlendingWeight() const;
|
float VGetBlendingWeight() const;
|
||||||
|
|
|
@ -104,7 +104,7 @@ zeus::CQuaternion CAnimTreeTweenBase::VGetRotation(const CSegId& seg) const {
|
||||||
return zeus::CQuaternion::slerp(qA, qB, weight);
|
return zeus::CQuaternion::slerp(qA, qB, weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> CAnimTreeTweenBase::VSimplified() {
|
rstl::optional<std::unique_ptr<IAnimReader>> CAnimTreeTweenBase::VSimplified() {
|
||||||
if (x20_25_cullSelector == 0) {
|
if (x20_25_cullSelector == 0) {
|
||||||
auto simpA = x14_a->Simplified();
|
auto simpA = x14_a->Simplified();
|
||||||
auto simpB = x18_b->Simplified();
|
auto simpB = x18_b->Simplified();
|
||||||
|
|
|
@ -30,8 +30,8 @@ public:
|
||||||
zeus::CVector3f VGetOffset(const CSegId& seg) const;
|
zeus::CVector3f VGetOffset(const CSegId& seg) const;
|
||||||
zeus::CQuaternion VGetRotation(const CSegId& seg) const;
|
zeus::CQuaternion VGetRotation(const CSegId& seg) const;
|
||||||
|
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
rstl::optional<std::unique_ptr<IAnimReader>> VSimplified();
|
||||||
virtual std::experimental::optional<std::unique_ptr<IAnimReader>> VReverseSimplified() {
|
virtual rstl::optional<std::unique_ptr<IAnimReader>> VReverseSimplified() {
|
||||||
return CAnimTreeTweenBase::VSimplified();
|
return CAnimTreeTweenBase::VSimplified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ class CBoneTracking {
|
||||||
float x18_time = 0.f;
|
float x18_time = 0.f;
|
||||||
float x1c_maxTrackingAngle;
|
float x1c_maxTrackingAngle;
|
||||||
float x20_angSpeed;
|
float x20_angSpeed;
|
||||||
std::experimental::optional<zeus::CVector3f> x24_targetPosition;
|
rstl::optional<zeus::CVector3f> x24_targetPosition;
|
||||||
TUniqueId x34_target = kInvalidUniqueId;
|
TUniqueId x34_target = kInvalidUniqueId;
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -82,7 +82,7 @@ std::unique_ptr<CAnimData> CCharacterFactory::CreateCharacter(int charIdx, bool
|
||||||
TToken<CSkinnedModel> skinnedModel = const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj(
|
TToken<CSkinnedModel> skinnedModel = const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj(
|
||||||
{FourCC(drawInsts << 16), charInfo.GetModelId()}, charParm);
|
{FourCC(drawInsts << 16), charInfo.GetModelId()}, charParm);
|
||||||
|
|
||||||
std::experimental::optional<TToken<CMorphableSkinnedModel>> iceModel;
|
rstl::optional<TToken<CMorphableSkinnedModel>> iceModel;
|
||||||
if (charInfo.GetIceModelId().IsValid() && charInfo.GetIceSkinRulesId().IsValid())
|
if (charInfo.GetIceModelId().IsValid() && charInfo.GetIceSkinRulesId().IsValid())
|
||||||
iceModel.emplace(const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj(
|
iceModel.emplace(const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj(
|
||||||
{FourCC((drawInsts << 16) | 1), charInfo.GetIceModelId()}, charParm));
|
{FourCC((drawInsts << 16) | 1), charInfo.GetIceModelId()}, charParm));
|
||||||
|
|
|
@ -30,12 +30,12 @@ public:
|
||||||
float x30_wallElasticConstant;
|
float x30_wallElasticConstant;
|
||||||
float x34_wallElasticLinear;
|
float x34_wallElasticLinear;
|
||||||
float x38_maxPositiveVerticalVelocity;
|
float x38_maxPositiveVerticalVelocity;
|
||||||
std::experimental::optional<zeus::CVector3f> x3c_floorPlaneNormal;
|
rstl::optional<zeus::CVector3f> x3c_floorPlaneNormal;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SMoveObjectResult {
|
struct SMoveObjectResult {
|
||||||
std::experimental::optional<TUniqueId> x0_id;
|
rstl::optional<TUniqueId> x0_id;
|
||||||
std::experimental::optional<CCollisionInfo> x8_collision;
|
rstl::optional<CCollisionInfo> x8_collision;
|
||||||
u32 x6c_processedCollisions;
|
u32 x6c_processedCollisions;
|
||||||
float x70_processedDt;
|
float x70_processedDt;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,22 +12,22 @@ public:
|
||||||
class CScaledLayoutDescription {
|
class CScaledLayoutDescription {
|
||||||
TLockedToken<CCharLayoutInfo> x0_layoutToken;
|
TLockedToken<CCharLayoutInfo> x0_layoutToken;
|
||||||
float xc_scale;
|
float xc_scale;
|
||||||
std::experimental::optional<zeus::CVector3f> x10_scaleVec;
|
rstl::optional<zeus::CVector3f> x10_scaleVec;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const TLockedToken<CCharLayoutInfo>& ScaledLayout() const { return x0_layoutToken; }
|
const TLockedToken<CCharLayoutInfo>& ScaledLayout() const { return x0_layoutToken; }
|
||||||
float GlobalScale() const { return xc_scale; }
|
float GlobalScale() const { return xc_scale; }
|
||||||
const std::experimental::optional<zeus::CVector3f>& GetScaleVec() const { return x10_scaleVec; }
|
const rstl::optional<zeus::CVector3f>& GetScaleVec() const { return x10_scaleVec; }
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TLockedToken<CCharLayoutInfo> x0_layoutToken;
|
TLockedToken<CCharLayoutInfo> x0_layoutToken;
|
||||||
std::experimental::optional<CScaledLayoutDescription> xc_scaled;
|
rstl::optional<CScaledLayoutDescription> xc_scaled;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CLayoutDescription(const TLockedToken<CCharLayoutInfo>& token) : x0_layoutToken(token) {}
|
CLayoutDescription(const TLockedToken<CCharLayoutInfo>& token) : x0_layoutToken(token) {}
|
||||||
|
|
||||||
const std::experimental::optional<CScaledLayoutDescription>& GetScaledLayoutDescription() const { return xc_scaled; }
|
const rstl::optional<CScaledLayoutDescription>& GetScaledLayoutDescription() const { return xc_scaled; }
|
||||||
|
|
||||||
const TLockedToken<CCharLayoutInfo>& GetCharLayoutInfo() const { return x0_layoutToken; }
|
const TLockedToken<CCharLayoutInfo>& GetCharLayoutInfo() const { return x0_layoutToken; }
|
||||||
bool UsesScale() const { return bool(xc_scaled); }
|
bool UsesScale() const { return bool(xc_scaled); }
|
||||||
|
|
|
@ -113,7 +113,7 @@ void CParticleGenInfoGeneric::SetParticleEmission(bool emission, CStateManager&
|
||||||
|
|
||||||
bool CParticleGenInfoGeneric::IsSystemDeletable() const { return x84_system->IsSystemDeletable(); }
|
bool CParticleGenInfoGeneric::IsSystemDeletable() const { return x84_system->IsSystemDeletable(); }
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CParticleGenInfoGeneric::GetBounds() const { return x84_system->GetBounds(); }
|
rstl::optional<zeus::CAABox> CParticleGenInfoGeneric::GetBounds() const { return x84_system->GetBounds(); }
|
||||||
|
|
||||||
bool CParticleGenInfoGeneric::HasActiveParticles() const { return x84_system->GetParticleCount() != 0; }
|
bool CParticleGenInfoGeneric::HasActiveParticles() const { return x84_system->GetParticleCount() != 0; }
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
virtual void SetGlobalScale(const zeus::CVector3f& scale) = 0;
|
virtual void SetGlobalScale(const zeus::CVector3f& scale) = 0;
|
||||||
virtual void SetParticleEmission(bool, CStateManager& stateMgr) = 0;
|
virtual void SetParticleEmission(bool, CStateManager& stateMgr) = 0;
|
||||||
virtual bool IsSystemDeletable() const = 0;
|
virtual bool IsSystemDeletable() const = 0;
|
||||||
virtual std::experimental::optional<zeus::CAABox> GetBounds() const = 0;
|
virtual rstl::optional<zeus::CAABox> GetBounds() const = 0;
|
||||||
virtual bool HasActiveParticles() const = 0;
|
virtual bool HasActiveParticles() const = 0;
|
||||||
virtual void DestroyParticles() = 0;
|
virtual void DestroyParticles() = 0;
|
||||||
virtual bool HasLight() const = 0;
|
virtual bool HasLight() const = 0;
|
||||||
|
@ -95,7 +95,7 @@ public:
|
||||||
void SetGlobalScale(const zeus::CVector3f& scale);
|
void SetGlobalScale(const zeus::CVector3f& scale);
|
||||||
void SetParticleEmission(bool, CStateManager& stateMgr);
|
void SetParticleEmission(bool, CStateManager& stateMgr);
|
||||||
bool IsSystemDeletable() const;
|
bool IsSystemDeletable() const;
|
||||||
std::experimental::optional<zeus::CAABox> GetBounds() const;
|
rstl::optional<zeus::CAABox> GetBounds() const;
|
||||||
bool HasActiveParticles() const;
|
bool HasActiveParticles() const;
|
||||||
void DestroyParticles();
|
void DestroyParticles();
|
||||||
bool HasLight() const;
|
bool HasLight() const;
|
||||||
|
|
|
@ -119,7 +119,7 @@ public:
|
||||||
virtual void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut,
|
virtual void VGetSegStatementSet(const CSegIdList& list, CSegStatementSet& setOut,
|
||||||
const CCharAnimTime& time) const = 0;
|
const CCharAnimTime& time) const = 0;
|
||||||
virtual std::unique_ptr<IAnimReader> VClone() const = 0;
|
virtual std::unique_ptr<IAnimReader> VClone() const = 0;
|
||||||
virtual std::experimental::optional<std::unique_ptr<IAnimReader>> VSimplified() { return {}; }
|
virtual rstl::optional<std::unique_ptr<IAnimReader>> VSimplified() { return {}; }
|
||||||
virtual void VSetPhase(float) = 0;
|
virtual void VSetPhase(float) = 0;
|
||||||
virtual SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const;
|
virtual SAdvancementResults VGetAdvancementResults(const CCharAnimTime& a, const CCharAnimTime& b) const;
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ public:
|
||||||
u32 GetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
u32 GetParticlePOIList(const CCharAnimTime& time, CParticlePOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
u32 GetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
u32 GetSoundPOIList(const CCharAnimTime& time, CSoundPOINode* listOut, u32 capacity, u32 iterator, u32) const;
|
||||||
|
|
||||||
std::experimental::optional<std::unique_ptr<IAnimReader>> Simplified() { return VSimplified(); }
|
rstl::optional<std::unique_ptr<IAnimReader>> Simplified() { return VSimplified(); }
|
||||||
|
|
||||||
std::unique_ptr<IAnimReader> Clone() const { return VClone(); }
|
std::unique_ptr<IAnimReader> Clone() const { return VClone(); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,8 +41,8 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CMetaAnimTreeBuildOrders {
|
struct CMetaAnimTreeBuildOrders {
|
||||||
std::experimental::optional<CPreAdvanceIndicator> x0_recursiveAdvance;
|
rstl::optional<CPreAdvanceIndicator> x0_recursiveAdvance;
|
||||||
std::experimental::optional<CPreAdvanceIndicator> x44_singleAdvance;
|
rstl::optional<CPreAdvanceIndicator> x44_singleAdvance;
|
||||||
static CMetaAnimTreeBuildOrders NoSpecialOrders() { return {}; }
|
static CMetaAnimTreeBuildOrders NoSpecialOrders() { return {}; }
|
||||||
static CMetaAnimTreeBuildOrders PreAdvanceForAll(const CPreAdvanceIndicator& ind) {
|
static CMetaAnimTreeBuildOrders PreAdvanceForAll(const CPreAdvanceIndicator& ind) {
|
||||||
CMetaAnimTreeBuildOrders ret;
|
CMetaAnimTreeBuildOrders ret;
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CAreaOctTree {
|
||||||
public:
|
public:
|
||||||
struct SRayResult {
|
struct SRayResult {
|
||||||
zeus::CPlane x0_plane;
|
zeus::CPlane x0_plane;
|
||||||
std::experimental::optional<CCollisionSurface> x10_surface;
|
rstl::optional<CCollisionSurface> x10_surface;
|
||||||
float x3c_t;
|
float x3c_t;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -139,8 +139,8 @@ zeus::CTransform CCollisionActor::GetPrimitiveTransform() const {
|
||||||
return xf;
|
return xf;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CCollisionActor::GetTouchBounds() const {
|
rstl::optional<zeus::CAABox> CCollisionActor::GetTouchBounds() const {
|
||||||
std::experimental::optional<zeus::CAABox> aabox;
|
rstl::optional<zeus::CAABox> aabox;
|
||||||
if (x258_primitiveType == EPrimitiveType::OBBTreeGroup)
|
if (x258_primitiveType == EPrimitiveType::OBBTreeGroup)
|
||||||
aabox = {x27c_obbTreeGroupPrimitive->CalculateAABox(x34_transform)};
|
aabox = {x27c_obbTreeGroupPrimitive->CalculateAABox(x34_transform)};
|
||||||
else if (x258_primitiveType == EPrimitiveType::AABox)
|
else if (x258_primitiveType == EPrimitiveType::AABox)
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
||||||
const CWeaponMode&, EProjectileAttrib) const;
|
const CWeaponMode&, EProjectileAttrib) const;
|
||||||
zeus::CTransform GetPrimitiveTransform() const;
|
zeus::CTransform GetPrimitiveTransform() const;
|
||||||
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
rstl::optional<zeus::CAABox> GetTouchBounds() const;
|
||||||
void SetDamageVulnerability(const CDamageVulnerability& vuln);
|
void SetDamageVulnerability(const CDamageVulnerability& vuln);
|
||||||
const zeus::CVector3f& GetBoxSize() const { return x260_boxSize; }
|
const zeus::CVector3f& GetBoxSize() const { return x260_boxSize; }
|
||||||
TUniqueId GetOwnerId() const { return x25c_owner; }
|
TUniqueId GetOwnerId() const { return x25c_owner; }
|
||||||
|
|
|
@ -190,7 +190,7 @@ zeus::CTransform CCollisionActorManager::GetWRLocatorTransform(const CAnimData&
|
||||||
return locXf;
|
return locXf;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<zeus::CVector3f> CCollisionActorManager::GetDeviation(const CStateManager& mgr, CSegId seg) {
|
rstl::optional<zeus::CVector3f> CCollisionActorManager::GetDeviation(const CStateManager& mgr, CSegId seg) {
|
||||||
for (const CJointCollisionDescription& desc : x0_jointDescriptions) {
|
for (const CJointCollisionDescription& desc : x0_jointDescriptions) {
|
||||||
if (desc.GetPivotId() != seg)
|
if (desc.GetPivotId() != seg)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
void SetMovable(CStateManager& mgr, bool movable);
|
void SetMovable(CStateManager& mgr, bool movable);
|
||||||
|
|
||||||
u32 GetNumCollisionActors() const { return x0_jointDescriptions.size(); }
|
u32 GetNumCollisionActors() const { return x0_jointDescriptions.size(); }
|
||||||
std::optional<zeus::CVector3f> GetDeviation(const CStateManager&, CSegId);
|
rstl::optional<zeus::CVector3f> GetDeviation(const CStateManager&, CSegId);
|
||||||
const CJointCollisionDescription& GetCollisionDescFromIndex(u32 i) const { return x0_jointDescriptions[i]; }
|
const CJointCollisionDescription& GetCollisionDescFromIndex(u32 i) const { return x0_jointDescriptions[i]; }
|
||||||
static zeus::CTransform GetWRLocatorTransform(const CAnimData& animData, CSegId id, const zeus::CTransform& worldXf,
|
static zeus::CTransform GetWRLocatorTransform(const CAnimData& animData, CSegId id, const zeus::CTransform& worldXf,
|
||||||
const zeus::CTransform& localXf);
|
const zeus::CTransform& localXf);
|
||||||
|
|
|
@ -162,7 +162,7 @@ CCollisionResponseData::CCollisionResponseData(CInputStream& in, CSimplePool* re
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::experimental::optional<TLockedToken<CGenDescription>>&
|
const rstl::optional<TLockedToken<CGenDescription>>&
|
||||||
CCollisionResponseData::GetParticleDescription(EWeaponCollisionResponseTypes type) const {
|
CCollisionResponseData::GetParticleDescription(EWeaponCollisionResponseTypes type) const {
|
||||||
if (x0_generators[u32(type)])
|
if (x0_generators[u32(type)])
|
||||||
return x0_generators[u32(type)];
|
return x0_generators[u32(type)];
|
||||||
|
@ -188,7 +188,7 @@ CCollisionResponseData::GetParticleDescription(EWeaponCollisionResponseTypes typ
|
||||||
return x0_generators[u32(type)];
|
return x0_generators[u32(type)];
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::experimental::optional<TLockedToken<CDecalDescription>>&
|
const rstl::optional<TLockedToken<CDecalDescription>>&
|
||||||
CCollisionResponseData::GetDecalDescription(EWeaponCollisionResponseTypes type) const {
|
CCollisionResponseData::GetDecalDescription(EWeaponCollisionResponseTypes type) const {
|
||||||
return x20_decals[u32(type)];
|
return x20_decals[u32(type)];
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,9 +112,9 @@ enum class EWeaponCollisionResponseTypes {
|
||||||
class CCollisionResponseData {
|
class CCollisionResponseData {
|
||||||
static const EWeaponCollisionResponseTypes skWorldMaterialTable[32];
|
static const EWeaponCollisionResponseTypes skWorldMaterialTable[32];
|
||||||
static const s32 kInvalidSFX;
|
static const s32 kInvalidSFX;
|
||||||
std::vector<std::experimental::optional<TLockedToken<CGenDescription>>> x0_generators;
|
std::vector<rstl::optional<TLockedToken<CGenDescription>>> x0_generators;
|
||||||
std::vector<s32> x10_sfx;
|
std::vector<s32> x10_sfx;
|
||||||
std::vector<std::experimental::optional<TLockedToken<CDecalDescription>>> x20_decals;
|
std::vector<rstl::optional<TLockedToken<CDecalDescription>>> x20_decals;
|
||||||
float x30_RNGE;
|
float x30_RNGE;
|
||||||
float x34_FOFF;
|
float x34_FOFF;
|
||||||
|
|
||||||
|
@ -126,9 +126,9 @@ class CCollisionResponseData {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CCollisionResponseData(CInputStream& in, CSimplePool* resPool);
|
CCollisionResponseData(CInputStream& in, CSimplePool* resPool);
|
||||||
const std::experimental::optional<TLockedToken<CGenDescription>>&
|
const rstl::optional<TLockedToken<CGenDescription>>&
|
||||||
GetParticleDescription(EWeaponCollisionResponseTypes) const;
|
GetParticleDescription(EWeaponCollisionResponseTypes) const;
|
||||||
const std::experimental::optional<TLockedToken<CDecalDescription>>&
|
const rstl::optional<TLockedToken<CDecalDescription>>&
|
||||||
GetDecalDescription(EWeaponCollisionResponseTypes type) const;
|
GetDecalDescription(EWeaponCollisionResponseTypes type) const;
|
||||||
s32 GetSoundEffectId(EWeaponCollisionResponseTypes) const;
|
s32 GetSoundEffectId(EWeaponCollisionResponseTypes) const;
|
||||||
static EWeaponCollisionResponseTypes GetWorldCollisionResponseType(s32);
|
static EWeaponCollisionResponseTypes GetWorldCollisionResponseType(s32);
|
||||||
|
|
|
@ -857,7 +857,7 @@ void CGameCollision::CollisionFailsafe(const CStateManager& mgr, CAreaCollisionC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CVector3f> CGameCollision::FindNonIntersectingVector(
|
rstl::optional<zeus::CVector3f> CGameCollision::FindNonIntersectingVector(
|
||||||
const CStateManager& mgr, CAreaCollisionCache& cache, CPhysicsActor& actor, const CCollisionPrimitive& prim,
|
const CStateManager& mgr, CAreaCollisionCache& cache, CPhysicsActor& actor, const CCollisionPrimitive& prim,
|
||||||
const rstl::reserved_vector<TUniqueId, 1024>& nearList) {
|
const rstl::reserved_vector<TUniqueId, 1024>& nearList) {
|
||||||
zeus::CTransform xf = actor.GetPrimitiveTransform();
|
zeus::CTransform xf = actor.GetPrimitiveTransform();
|
||||||
|
|
|
@ -112,7 +112,7 @@ public:
|
||||||
static void CollisionFailsafe(const CStateManager& mgr, CAreaCollisionCache& cache, CPhysicsActor& actor,
|
static void CollisionFailsafe(const CStateManager& mgr, CAreaCollisionCache& cache, CPhysicsActor& actor,
|
||||||
const CCollisionPrimitive& prim, const rstl::reserved_vector<TUniqueId, 1024>& nearList,
|
const CCollisionPrimitive& prim, const rstl::reserved_vector<TUniqueId, 1024>& nearList,
|
||||||
float, u32 failsafeTicks);
|
float, u32 failsafeTicks);
|
||||||
static std::experimental::optional<zeus::CVector3f>
|
static rstl::optional<zeus::CVector3f>
|
||||||
FindNonIntersectingVector(const CStateManager& mgr, CAreaCollisionCache& cache, CPhysicsActor& actor,
|
FindNonIntersectingVector(const CStateManager& mgr, CAreaCollisionCache& cache, CPhysicsActor& actor,
|
||||||
const CCollisionPrimitive& prim, const rstl::reserved_vector<TUniqueId, 1024>& nearList);
|
const CCollisionPrimitive& prim, const rstl::reserved_vector<TUniqueId, 1024>& nearList);
|
||||||
};
|
};
|
||||||
|
|
|
@ -687,7 +687,7 @@ void CBooRenderer::EnablePVS(const CPVSVisSet& set, u32 areaIdx) {
|
||||||
xe0_pvsAreaIdx = areaIdx;
|
xe0_pvsAreaIdx = areaIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBooRenderer::DisablePVS() { xc8_pvs = std::experimental::nullopt; }
|
void CBooRenderer::DisablePVS() { xc8_pvs = rstl::nullopt; }
|
||||||
|
|
||||||
void CBooRenderer::UpdateAreaUniforms(int areaIdx, bool shadowRender, bool activateLights) {
|
void CBooRenderer::UpdateAreaUniforms(int areaIdx, bool shadowRender, bool activateLights) {
|
||||||
SetupRendererStates();
|
SetupRendererStates();
|
||||||
|
|
|
@ -100,7 +100,7 @@ class CBooRenderer final : public IRenderer {
|
||||||
zeus::CPlane xb0_viewPlane = {0.f, 1.f, 0.f, 0.f};
|
zeus::CPlane xb0_viewPlane = {0.f, 1.f, 0.f, 0.f};
|
||||||
|
|
||||||
enum class EPVSMode { Mask, PVS, PVSAndMask } xc4_pvsMode = EPVSMode::Mask;
|
enum class EPVSMode { Mask, PVS, PVSAndMask } xc4_pvsMode = EPVSMode::Mask;
|
||||||
std::experimental::optional<CPVSVisSet> xc8_pvs;
|
rstl::optional<CPVSVisSet> xc8_pvs;
|
||||||
u32 xe0_pvsAreaIdx = 0;
|
u32 xe0_pvsAreaIdx = 0;
|
||||||
|
|
||||||
// boo::ITextureS* xe4_blackTex = nullptr;
|
// boo::ITextureS* xe4_blackTex = nullptr;
|
||||||
|
@ -142,7 +142,7 @@ class CBooRenderer final : public IRenderer {
|
||||||
float x2f8_thermColdScale = 0.f;
|
float x2f8_thermColdScale = 0.f;
|
||||||
zeus::CColor x2fc_tevReg1Color = {1.f, 0.f, 1.f, 1.f};
|
zeus::CColor x2fc_tevReg1Color = {1.f, 0.f, 1.f, 1.f};
|
||||||
CThermalColdFilter m_thermColdFilter;
|
CThermalColdFilter m_thermColdFilter;
|
||||||
std::experimental::optional<CThermalHotFilter> m_thermHotFilter;
|
rstl::optional<CThermalHotFilter> m_thermHotFilter;
|
||||||
|
|
||||||
std::vector<CLight> x300_dynamicLights;
|
std::vector<CLight> x300_dynamicLights;
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ struct SShader {
|
||||||
std::vector<TCachedToken<CTexture>> x0_textures;
|
std::vector<TCachedToken<CTexture>> x0_textures;
|
||||||
std::unordered_map<int, CModelShaders::ShaderPipelines> m_shaders;
|
std::unordered_map<int, CModelShaders::ShaderPipelines> m_shaders;
|
||||||
MaterialSet m_matSet;
|
MaterialSet m_matSet;
|
||||||
std::experimental::optional<GeometryUniformLayout> m_geomLayout;
|
rstl::optional<GeometryUniformLayout> m_geomLayout;
|
||||||
int m_matSetIdx;
|
int m_matSetIdx;
|
||||||
SShader(int idx) : m_matSetIdx(idx) {
|
SShader(int idx) : m_matSetIdx(idx) {
|
||||||
x0_textures.clear();
|
x0_textures.clear();
|
||||||
|
|
|
@ -765,7 +765,7 @@ void CBooModel::UVAnimationBuffer::Update(u8*& bufOut, const MaterialSet* matSet
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<std::array<zeus::CMatrix4f, 2>> specialMtxOut;
|
rstl::optional<std::array<zeus::CMatrix4f, 2>> specialMtxOut;
|
||||||
if (flags.m_extendedShader == EExtendedShader::Thermal) {
|
if (flags.m_extendedShader == EExtendedShader::Thermal) {
|
||||||
/* Special Mode0 matrix for exclusive Thermal Visor use */
|
/* Special Mode0 matrix for exclusive Thermal Visor use */
|
||||||
specialMtxOut.emplace();
|
specialMtxOut.emplace();
|
||||||
|
|
|
@ -18,7 +18,7 @@ class CSimpleShadow {
|
||||||
bool x48_24_collision : 1;
|
bool x48_24_collision : 1;
|
||||||
bool x48_25_alwaysCalculateRadius : 1;
|
bool x48_25_alwaysCalculateRadius : 1;
|
||||||
bool x48_26_radiusCalculated : 1;
|
bool x48_26_radiusCalculated : 1;
|
||||||
mutable std::experimental::optional<CTexturedQuadFilter> m_filter;
|
mutable rstl::optional<CTexturedQuadFilter> m_filter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CSimpleShadow(float scale, float userAlpha, float maxObjHeight, float displacement);
|
CSimpleShadow(float scale, float userAlpha, float maxObjHeight, float displacement);
|
||||||
|
|
|
@ -23,7 +23,7 @@ CSkinnedModel::CSkinnedModel(IObjectStore& store, CAssetId model, CAssetId skinR
|
||||||
store.GetObj(SObjectTag{FOURCC('CINF'), layoutInfo}), shaderIdx, drawInsts) {}
|
store.GetObj(SObjectTag{FOURCC('CINF'), layoutInfo}), shaderIdx, drawInsts) {}
|
||||||
|
|
||||||
void CSkinnedModel::Calculate(const CPoseAsTransforms& pose, const CModelFlags& drawFlags,
|
void CSkinnedModel::Calculate(const CPoseAsTransforms& pose, const CModelFlags& drawFlags,
|
||||||
const std::experimental::optional<CVertexMorphEffect>& morphEffect,
|
const rstl::optional<CVertexMorphEffect>& morphEffect,
|
||||||
const float* morphMagnitudes) {
|
const float* morphMagnitudes) {
|
||||||
if (morphEffect || g_PointGenFunc) {
|
if (morphEffect || g_PointGenFunc) {
|
||||||
if (boo::ObjToken<boo::IGraphicsBufferD> vertBuf = m_modelInst->UpdateUniformData(drawFlags, nullptr, nullptr)) {
|
if (boo::ObjToken<boo::IGraphicsBufferD> vertBuf = m_modelInst->UpdateUniformData(drawFlags, nullptr, nullptr)) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ public:
|
||||||
const TLockedToken<CCharLayoutInfo>& GetLayoutInfo() const { return x1c_layoutInfo; }
|
const TLockedToken<CCharLayoutInfo>& GetLayoutInfo() const { return x1c_layoutInfo; }
|
||||||
|
|
||||||
void Calculate(const CPoseAsTransforms& pose, const CModelFlags& drawFlags,
|
void Calculate(const CPoseAsTransforms& pose, const CModelFlags& drawFlags,
|
||||||
const std::experimental::optional<CVertexMorphEffect>& morphEffect, const float* morphMagnitudes);
|
const rstl::optional<CVertexMorphEffect>& morphEffect, const float* morphMagnitudes);
|
||||||
void Draw(const CModelFlags& drawFlags) const;
|
void Draw(const CModelFlags& drawFlags) const;
|
||||||
|
|
||||||
typedef void (*FPointGenerator)(void* item, const std::vector<std::pair<zeus::CVector3f, zeus::CVector3f>>& vn);
|
typedef void (*FPointGenerator)(void* item, const std::vector<std::pair<zeus::CVector3f, zeus::CVector3f>>& vn);
|
||||||
|
|
|
@ -204,11 +204,11 @@ static std::string_view DisintegratePostHLSL = FOG_STRUCT_HLSL
|
||||||
" float4 addColor;\n"
|
" float4 addColor;\n"
|
||||||
" Fog fog;\n"
|
" Fog fog;\n"
|
||||||
"};\n"
|
"};\n"
|
||||||
"float4 DisintegratePostFunc(float4 colorIn)\n"
|
"static float4 DisintegratePostFunc(in VertToFrag vtf, float4 colorIn)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" float4 texel0 = extTex7.Sample(samp, vtf.extTcgs[0]);\n"
|
" float4 texel0 = extTex7.Sample(samp, vtf.extTcgs[0]);\n"
|
||||||
" float4 texel1 = extTex7.Sample(samp, vtf.extTcgs[1]);\n"
|
" float4 texel1 = extTex7.Sample(samp, vtf.extTcgs[1]);\n"
|
||||||
" colorIn = mix(float4(0.0), texel1, texel0);\n"
|
" colorIn = lerp(float4(0.0,0.0,0.0,0.0), texel1, texel0);\n"
|
||||||
" colorIn.rgb += addColor.rgb;\n" FOG_ALGORITHM_HLSL
|
" colorIn.rgb += addColor.rgb;\n" FOG_ALGORITHM_HLSL
|
||||||
"}\n"
|
"}\n"
|
||||||
"\n"sv;
|
"\n"sv;
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace urde {
|
||||||
|
|
||||||
class CWorldShadowShader {
|
class CWorldShadowShader {
|
||||||
boo::ObjToken<boo::ITextureR> m_tex;
|
boo::ObjToken<boo::ITextureR> m_tex;
|
||||||
std::experimental::optional<CTexturedQuadFilter> m_prevQuad;
|
rstl::optional<CTexturedQuadFilter> m_prevQuad;
|
||||||
u32 m_w, m_h;
|
u32 m_w, m_h;
|
||||||
|
|
||||||
struct Uniform {
|
struct Uniform {
|
||||||
|
|
|
@ -30,7 +30,7 @@ class CAuiImagePane : public CGuiWidget {
|
||||||
CTexturedQuadFilterAlpha m_addQuad[2];
|
CTexturedQuadFilterAlpha m_addQuad[2];
|
||||||
Filters(TLockedToken<CTexture>& tex);
|
Filters(TLockedToken<CTexture>& tex);
|
||||||
};
|
};
|
||||||
std::experimental::optional<Filters> m_filters;
|
rstl::optional<Filters> m_filters;
|
||||||
void DoDrawImagePane(const zeus::CColor& color, const CTexture& tex, int frame, float blurAmt, bool noBlur,
|
void DoDrawImagePane(const zeus::CColor& color, const CTexture& tex, int frame, float blurAmt, bool noBlur,
|
||||||
CTexturedQuadFilterAlpha& quad) const;
|
CTexturedQuadFilterAlpha& quad) const;
|
||||||
|
|
||||||
|
|
|
@ -137,8 +137,8 @@ private:
|
||||||
u32 x228_;
|
u32 x228_;
|
||||||
|
|
||||||
struct SScanReticuleRenderer {
|
struct SScanReticuleRenderer {
|
||||||
std::experimental::optional<CLineRenderer> m_lineRenderers[2];
|
rstl::optional<CLineRenderer> m_lineRenderers[2];
|
||||||
std::experimental::optional<CLineRenderer> m_stripRenderers[2][4];
|
rstl::optional<CLineRenderer> m_stripRenderers[2][4];
|
||||||
SScanReticuleRenderer();
|
SScanReticuleRenderer();
|
||||||
};
|
};
|
||||||
mutable SScanReticuleRenderer m_scanRetRenderer;
|
mutable SScanReticuleRenderer m_scanRetRenderer;
|
||||||
|
|
|
@ -126,7 +126,7 @@ void CGuiTextSupport::Update(float dt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuiTextSupport::ClearRenderBuffer() {
|
void CGuiTextSupport::ClearRenderBuffer() {
|
||||||
x60_renderBuf = std::experimental::nullopt;
|
x60_renderBuf = rstl::nullopt;
|
||||||
x2ec_renderBufferPages.clear();
|
x2ec_renderBufferPages.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ class CGuiTextSupport {
|
||||||
float x58_chRate = 10.0f;
|
float x58_chRate = 10.0f;
|
||||||
CAssetId x5c_fontId;
|
CAssetId x5c_fontId;
|
||||||
CGuiWidget::EGuiModelDrawFlags m_drawFlags;
|
CGuiWidget::EGuiModelDrawFlags m_drawFlags;
|
||||||
std::experimental::optional<CTextRenderBuffer> x60_renderBuf;
|
rstl::optional<CTextRenderBuffer> x60_renderBuf;
|
||||||
std::vector<CToken> x2bc_assets;
|
std::vector<CToken> x2bc_assets;
|
||||||
TLockedToken<CRasterFont> x2cc_font;
|
TLockedToken<CRasterFont> x2cc_font;
|
||||||
std::pair<zeus::CVector2i, zeus::CVector2i> x2dc_oneBufBounds;
|
std::pair<zeus::CVector2i, zeus::CVector2i> x2dc_oneBufBounds;
|
||||||
|
|
|
@ -71,7 +71,7 @@ protected:
|
||||||
bool xb7_25_ : 1;
|
bool xb7_25_ : 1;
|
||||||
bool m_mouseActive : 1;
|
bool m_mouseActive : 1;
|
||||||
|
|
||||||
std::experimental::optional<boo::SScrollDelta> m_lastScroll;
|
rstl::optional<boo::SScrollDelta> m_lastScroll;
|
||||||
boo::SScrollDelta m_integerScroll;
|
boo::SScrollDelta m_integerScroll;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -391,7 +391,7 @@ void CScanDisplay::Update(float dt, float scanningTime) {
|
||||||
if (!active) {
|
if (!active) {
|
||||||
xc_state = EScanState::Inactive;
|
xc_state = EScanState::Inactive;
|
||||||
x10_objId = kInvalidUniqueId;
|
x10_objId = kInvalidUniqueId;
|
||||||
x14_scannableInfo = std::experimental::nullopt;
|
x14_scannableInfo = rstl::nullopt;
|
||||||
xa8_message->TextSupport().SetText(u"");
|
xa8_message->TextSupport().SetText(u"");
|
||||||
xac_scrollMessage->TextSupport().SetText(u"");
|
xac_scrollMessage->TextSupport().SetText(u"");
|
||||||
xa4_textGroup->SetVisibility(false, ETraversalMode::Children);
|
xa4_textGroup->SetVisibility(false, ETraversalMode::Children);
|
||||||
|
|
|
@ -56,7 +56,7 @@ private:
|
||||||
TLockedToken<CTexture> x0_dataDot;
|
TLockedToken<CTexture> x0_dataDot;
|
||||||
EScanState xc_state = EScanState::Inactive;
|
EScanState xc_state = EScanState::Inactive;
|
||||||
TUniqueId x10_objId = kInvalidUniqueId;
|
TUniqueId x10_objId = kInvalidUniqueId;
|
||||||
std::experimental::optional<CScannableObjectInfo> x14_scannableInfo;
|
rstl::optional<CScannableObjectInfo> x14_scannableInfo;
|
||||||
const CGuiFrame& xa0_selHud;
|
const CGuiFrame& xa0_selHud;
|
||||||
CGuiWidget* xa4_textGroup = nullptr;
|
CGuiWidget* xa4_textGroup = nullptr;
|
||||||
CGuiTextPane* xa8_message = nullptr;
|
CGuiTextPane* xa8_message = nullptr;
|
||||||
|
|
|
@ -59,7 +59,7 @@ struct CFinalInput {
|
||||||
bool x2e_b30_PDPLeft : 1;
|
bool x2e_b30_PDPLeft : 1;
|
||||||
bool x2e_b31_PStart : 1;
|
bool x2e_b31_PStart : 1;
|
||||||
|
|
||||||
std::experimental::optional<CKeyboardMouseControllerData> m_kbm;
|
rstl::optional<CKeyboardMouseControllerData> m_kbm;
|
||||||
|
|
||||||
bool m_PCharKeys[256] = {};
|
bool m_PCharKeys[256] = {};
|
||||||
bool m_PSpecialKeys[26] = {};
|
bool m_PSpecialKeys[26] = {};
|
||||||
|
@ -163,7 +163,7 @@ struct CFinalInput {
|
||||||
bool ASpecialKey(boo::ESpecialKey k) const { return DSpecialKey(k) ? 1.f : 0.f; }
|
bool ASpecialKey(boo::ESpecialKey k) const { return DSpecialKey(k) ? 1.f : 0.f; }
|
||||||
bool AMouseButton(boo::EMouseButton k) const { return DMouseButton(k) ? 1.f : 0.f; }
|
bool AMouseButton(boo::EMouseButton k) const { return DMouseButton(k) ? 1.f : 0.f; }
|
||||||
|
|
||||||
const std::experimental::optional<CKeyboardMouseControllerData>& GetKBM() const { return m_kbm; }
|
const rstl::optional<CKeyboardMouseControllerData>& GetKBM() const { return m_kbm; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
|
@ -16,13 +16,13 @@ void CFaceplateDecoration::Update(float dt, CStateManager& stateMgr) {
|
||||||
x4_tex.Unlock();
|
x4_tex.Unlock();
|
||||||
x0_id = txtrId;
|
x0_id = txtrId;
|
||||||
if (m_texFilter)
|
if (m_texFilter)
|
||||||
m_texFilter = std::experimental::nullopt;
|
m_texFilter = rstl::nullopt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x0_id != txtrId && txtrId.IsValid()) {
|
if (x0_id != txtrId && txtrId.IsValid()) {
|
||||||
if (m_texFilter)
|
if (m_texFilter)
|
||||||
m_texFilter = std::experimental::nullopt;
|
m_texFilter = rstl::nullopt;
|
||||||
x0_id = txtrId;
|
x0_id = txtrId;
|
||||||
x4_tex = g_SimplePool->GetObj(SObjectTag{FOURCC('TXTR'), txtrId});
|
x4_tex = g_SimplePool->GetObj(SObjectTag{FOURCC('TXTR'), txtrId});
|
||||||
xc_ready = true;
|
xc_ready = true;
|
||||||
|
|
|
@ -12,7 +12,7 @@ class CFaceplateDecoration {
|
||||||
CAssetId x0_id;
|
CAssetId x0_id;
|
||||||
TToken<CTexture> x4_tex;
|
TToken<CTexture> x4_tex;
|
||||||
bool xc_ready = false;
|
bool xc_ready = false;
|
||||||
std::experimental::optional<CTexturedQuadFilter> m_texFilter;
|
rstl::optional<CTexturedQuadFilter> m_texFilter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CFaceplateDecoration(CStateManager& stateMgr);
|
CFaceplateDecoration(CStateManager& stateMgr);
|
||||||
|
|
|
@ -349,7 +349,7 @@ private:
|
||||||
CStaticAudioPlayer* xf4_curAudio = nullptr;
|
CStaticAudioPlayer* xf4_curAudio = nullptr;
|
||||||
|
|
||||||
CColoredQuadFilter m_fadeToBlack = {EFilterType::Blend};
|
CColoredQuadFilter m_fadeToBlack = {EFilterType::Blend};
|
||||||
std::experimental::optional<CTexturedQuadFilterAlpha> m_pressStartQuad;
|
rstl::optional<CTexturedQuadFilterAlpha> m_pressStartQuad;
|
||||||
|
|
||||||
std::unique_ptr<CFrontEndUITouchBar> m_touchBar;
|
std::unique_ptr<CFrontEndUITouchBar> m_touchBar;
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ private:
|
||||||
SOnScreenTex x1c4_onScreenTex;
|
SOnScreenTex x1c4_onScreenTex;
|
||||||
float x1d8_onScreenTexAlpha = 0.f;
|
float x1d8_onScreenTexAlpha = 0.f;
|
||||||
TLockedToken<CTexture> x1dc_onScreenTexTok; // Used to be heap-allocated
|
TLockedToken<CTexture> x1dc_onScreenTexTok; // Used to be heap-allocated
|
||||||
std::experimental::optional<CTexturedQuadFilterAlpha> m_onScreenQuad;
|
rstl::optional<CTexturedQuadFilterAlpha> m_onScreenQuad;
|
||||||
EHelmetVisMode x1e0_helmetVisMode;
|
EHelmetVisMode x1e0_helmetVisMode;
|
||||||
bool x1e4_enableTargetingManager;
|
bool x1e4_enableTargetingManager;
|
||||||
bool x1e8_enableAutoMapper;
|
bool x1e8_enableAutoMapper;
|
||||||
|
@ -86,8 +86,8 @@ private:
|
||||||
u32 x1f0_enablePlayerVisor;
|
u32 x1f0_enablePlayerVisor;
|
||||||
float x1f4_visorStaticAlpha;
|
float x1f4_visorStaticAlpha;
|
||||||
|
|
||||||
std::experimental::optional<CTexturedQuadFilter> m_deathRenderTexQuad;
|
rstl::optional<CTexturedQuadFilter> m_deathRenderTexQuad;
|
||||||
std::experimental::optional<CTexturedQuadFilter> m_deathDotQuad;
|
rstl::optional<CTexturedQuadFilter> m_deathDotQuad;
|
||||||
CRandomStaticFilter m_randomStatic = {EFilterType::Blend};
|
CRandomStaticFilter m_randomStatic = {EFilterType::Blend};
|
||||||
CColoredQuadFilter m_deathWhiteout = {EFilterType::Blend};
|
CColoredQuadFilter m_deathWhiteout = {EFilterType::Blend};
|
||||||
CColoredQuadFilter m_deathBlackout = {EFilterType::Blend};
|
CColoredQuadFilter m_deathBlackout = {EFilterType::Blend};
|
||||||
|
|
|
@ -23,7 +23,7 @@ class CQuitGameScreen {
|
||||||
CGuiFrame* x10_loadedFrame = nullptr;
|
CGuiFrame* x10_loadedFrame = nullptr;
|
||||||
CGuiTableGroup* x14_tablegroup_quitgame = nullptr;
|
CGuiTableGroup* x14_tablegroup_quitgame = nullptr;
|
||||||
EQuitAction x18_action = EQuitAction::None;
|
EQuitAction x18_action = EQuitAction::None;
|
||||||
std::experimental::optional<CColoredQuadFilter> m_blackScreen;
|
rstl::optional<CColoredQuadFilter> m_blackScreen;
|
||||||
void SetColors();
|
void SetColors();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -37,10 +37,10 @@ class CSamusDoll {
|
||||||
zeus::CQuaternion xb0_userRot;
|
zeus::CQuaternion xb0_userRot;
|
||||||
float xc0_userZoom = -3.6f;
|
float xc0_userZoom = -3.6f;
|
||||||
float xc4_viewInterp = 0.f;
|
float xc4_viewInterp = 0.f;
|
||||||
std::experimental::optional<CModelData> xc8_suitModel0;
|
rstl::optional<CModelData> xc8_suitModel0;
|
||||||
rstl::reserved_vector<TCachedToken<CSkinnedModel>, 2> x118_suitModel1and2;
|
rstl::reserved_vector<TCachedToken<CSkinnedModel>, 2> x118_suitModel1and2;
|
||||||
std::experimental::optional<CModelData> x134_suitModelBoots;
|
rstl::optional<CModelData> x134_suitModelBoots;
|
||||||
std::experimental::optional<CModelData> x184_ballModelData;
|
rstl::optional<CModelData> x184_ballModelData;
|
||||||
TLockedToken<CModel> x1d4_spiderBallGlass;
|
TLockedToken<CModel> x1d4_spiderBallGlass;
|
||||||
u32 x1e0_ballMatIdx;
|
u32 x1e0_ballMatIdx;
|
||||||
u32 x1e4_glassMatIdx;
|
u32 x1e4_glassMatIdx;
|
||||||
|
|
|
@ -516,7 +516,7 @@ void CSamusHud::UpdateThreatAssessment(float dt, const CStateManager& mgr) {
|
||||||
|
|
||||||
CPlayer& player = mgr.GetPlayer();
|
CPlayer& player = mgr.GetPlayer();
|
||||||
zeus::CAABox playerAABB = zeus::CAABox::skNullBox;
|
zeus::CAABox playerAABB = zeus::CAABox::skNullBox;
|
||||||
if (std::experimental::optional<zeus::CAABox> aabb = player.GetTouchBounds())
|
if (rstl::optional<zeus::CAABox> aabb = player.GetTouchBounds())
|
||||||
playerAABB = *aabb;
|
playerAABB = *aabb;
|
||||||
|
|
||||||
zeus::CAABox aabb;
|
zeus::CAABox aabb;
|
||||||
|
@ -533,7 +533,7 @@ void CSamusHud::UpdateThreatAssessment(float dt, const CStateManager& mgr) {
|
||||||
continue;
|
continue;
|
||||||
if (trigger->GetDamageInfo().GetDamage() == 0.f)
|
if (trigger->GetDamageInfo().GetDamage() == 0.f)
|
||||||
continue;
|
continue;
|
||||||
if (std::experimental::optional<zeus::CAABox> aabb = trigger->GetTouchBounds()) {
|
if (rstl::optional<zeus::CAABox> aabb = trigger->GetTouchBounds()) {
|
||||||
float dist = playerAABB.distanceBetween(*aabb);
|
float dist = playerAABB.distanceBetween(*aabb);
|
||||||
if (dist < threatDist)
|
if (dist < threatDist)
|
||||||
threatDist = dist;
|
threatDist = dist;
|
||||||
|
|
|
@ -19,7 +19,7 @@ public:
|
||||||
u32 x4_ = -1;
|
u32 x4_ = -1;
|
||||||
u32 x8_ = -1;
|
u32 x8_ = -1;
|
||||||
|
|
||||||
std::experimental::optional<CTexturedQuadFilterAlpha> m_texQuad;
|
rstl::optional<CTexturedQuadFilterAlpha> m_texQuad;
|
||||||
zeus::CVector2f x18_vpOffset;
|
zeus::CVector2f x18_vpOffset;
|
||||||
zeus::CVector2f x20_vpSize;
|
zeus::CVector2f x20_vpSize;
|
||||||
zeus::CVector2f x28_canvasSize;
|
zeus::CVector2f x28_canvasSize;
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace MP1 {
|
||||||
static logvisor::Module Log("MP1::CTweaks");
|
static logvisor::Module Log("MP1::CTweaks");
|
||||||
|
|
||||||
void CTweaks::RegisterTweaks(hecl::CVarManager* cvarMgr) {
|
void CTweaks::RegisterTweaks(hecl::CVarManager* cvarMgr) {
|
||||||
std::experimental::optional<CMemoryInStream> strm;
|
rstl::optional<CMemoryInStream> strm;
|
||||||
const SObjectTag* tag;
|
const SObjectTag* tag;
|
||||||
|
|
||||||
/* Particle */
|
/* Particle */
|
||||||
|
@ -110,7 +110,7 @@ void CTweaks::RegisterTweaks(hecl::CVarManager* cvarMgr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTweaks::RegisterResourceTweaks(hecl::CVarManager* cvarMgr) {
|
void CTweaks::RegisterResourceTweaks(hecl::CVarManager* cvarMgr) {
|
||||||
std::experimental::optional<CMemoryInStream> strm;
|
rstl::optional<CMemoryInStream> strm;
|
||||||
|
|
||||||
const SObjectTag* tag = g_ResFactory->GetResourceIdByName("GunRes");
|
const SObjectTag* tag = g_ResFactory->GetResourceIdByName("GunRes");
|
||||||
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
strm.emplace(g_ResFactory->LoadResourceSync(*tag).release(), g_ResFactory->ResourceSize(*tag), true);
|
||||||
|
|
|
@ -683,7 +683,7 @@ void CMain::Init(const hecl::Runtime::FileStoreManager& storeMgr, hecl::CVarMana
|
||||||
if (layerStr[0] == _SYS_STR('0') || layerStr[0] == _SYS_STR('1'))
|
if (layerStr[0] == _SYS_STR('0') || layerStr[0] == _SYS_STR('1'))
|
||||||
for (const auto* cur = layerStr; *cur != _SYS_STR('\0'); ++cur)
|
for (const auto* cur = layerStr; *cur != _SYS_STR('\0'); ++cur)
|
||||||
if (*cur == _SYS_STR('1'))
|
if (*cur == _SYS_STR('1'))
|
||||||
m_warpLayerBits |= 1 << (cur - layerStr);
|
m_warpLayerBits |= u64(1) << (cur - layerStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFlowState(EFlowState::StateSetter);
|
SetFlowState(EFlowState::StateSetter);
|
||||||
|
|
|
@ -18,15 +18,15 @@ CBeetle::CBeetle(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||||
const CDamageVulnerability& platingVuln, const zeus::CVector3f& tailAimReference,
|
const CDamageVulnerability& platingVuln, const zeus::CVector3f& tailAimReference,
|
||||||
float initialAttackDelay, float retreatTime, float f3,
|
float initialAttackDelay, float retreatTime, float f3,
|
||||||
const CDamageVulnerability& tailVuln, const CActorParameters& aParams,
|
const CDamageVulnerability& tailVuln, const CActorParameters& aParams,
|
||||||
const std::experimental::optional<CStaticRes>& tailModel)
|
const rstl::optional<CStaticRes>& tailModel)
|
||||||
: CPatterned(ECharacter::Beetle, uid, name, flavor, info, xf, std::move(mData), pInfo, EMovementType::Ground,
|
: CPatterned(ECharacter::Beetle, uid, name, flavor, info, xf, std::move(mData), pInfo, EMovementType::Ground,
|
||||||
EColliderType::One, EBodyType::BiPedal, aParams, EKnockBackVariant(flavor))
|
EColliderType::One, EBodyType::BiPedal, aParams, EKnockBackVariant(flavor))
|
||||||
, x56c_entranceType(entranceType)
|
, x56c_entranceType(entranceType)
|
||||||
, x574_tailAimReference(tailAimReference)
|
, x574_tailAimReference(tailAimReference)
|
||||||
, x580_f3(f3)
|
, x580_f3(f3)
|
||||||
, x584_touchDamage(touchDamage)
|
, x584_touchDamage(touchDamage)
|
||||||
, x5ac_tailModel(tailModel ? std::experimental::optional<CModelData>(CModelData(*tailModel)) :
|
, x5ac_tailModel(tailModel ? rstl::optional<CModelData>(CModelData(*tailModel)) :
|
||||||
std::experimental::optional<CModelData>())
|
rstl::optional<CModelData>())
|
||||||
, x5fc_pathFindSearch(nullptr, 1, pInfo.GetPathfindingIndex(), 1.f, 1.f)
|
, x5fc_pathFindSearch(nullptr, 1, pInfo.GetPathfindingIndex(), 1.f, 1.f)
|
||||||
, x744_platingVuln(platingVuln)
|
, x744_platingVuln(platingVuln)
|
||||||
, x7ac_tailVuln(tailVuln)
|
, x7ac_tailVuln(tailVuln)
|
||||||
|
|
|
@ -21,7 +21,7 @@ private:
|
||||||
float x5a0_headbuttDist = FLT_MAX;
|
float x5a0_headbuttDist = FLT_MAX;
|
||||||
float x5a4_jumpBackwardDist = FLT_MAX;
|
float x5a4_jumpBackwardDist = FLT_MAX;
|
||||||
float x5a8_animTimeRem = 0.f;
|
float x5a8_animTimeRem = 0.f;
|
||||||
std::experimental::optional<CModelData> x5ac_tailModel;
|
rstl::optional<CModelData> x5ac_tailModel;
|
||||||
CPathFindSearch x5fc_pathFindSearch;
|
CPathFindSearch x5fc_pathFindSearch;
|
||||||
rstl::reserved_vector<zeus::CVector3f, 8> x6e0_retreatPoints;
|
rstl::reserved_vector<zeus::CVector3f, 8> x6e0_retreatPoints;
|
||||||
CDamageVulnerability x744_platingVuln;
|
CDamageVulnerability x744_platingVuln;
|
||||||
|
@ -57,7 +57,7 @@ public:
|
||||||
const CDamageVulnerability& platingVuln, const zeus::CVector3f& tailAimReference,
|
const CDamageVulnerability& platingVuln, const zeus::CVector3f& tailAimReference,
|
||||||
float initialAttackDelay, float retreatTime, float f3,
|
float initialAttackDelay, float retreatTime, float f3,
|
||||||
const CDamageVulnerability& tailVuln, const CActorParameters& aParams,
|
const CDamageVulnerability& tailVuln, const CActorParameters& aParams,
|
||||||
const std::experimental::optional<CStaticRes>& tailModel);
|
const rstl::optional<CStaticRes>& tailModel);
|
||||||
|
|
||||||
void Accept(IVisitor& visitor);
|
void Accept(IVisitor& visitor);
|
||||||
void Think(float dt, CStateManager& mgr);
|
void Think(float dt, CStateManager& mgr);
|
||||||
|
|
|
@ -14,10 +14,10 @@ class CMetroidData {
|
||||||
float xdc_;
|
float xdc_;
|
||||||
float xe0_;
|
float xe0_;
|
||||||
float xe4_;
|
float xe4_;
|
||||||
std::experimental::optional<CAnimationParameters> xe8_animParms1;
|
rstl::optional<CAnimationParameters> xe8_animParms1;
|
||||||
std::experimental::optional<CAnimationParameters> xf8_animParms2;
|
rstl::optional<CAnimationParameters> xf8_animParms2;
|
||||||
std::experimental::optional<CAnimationParameters> x108_animParms3;
|
rstl::optional<CAnimationParameters> x108_animParms3;
|
||||||
std::experimental::optional<CAnimationParameters> x118_animParms4;
|
rstl::optional<CAnimationParameters> x118_animParms4;
|
||||||
bool x128_24_ : 1;
|
bool x128_24_ : 1;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -22,7 +22,7 @@ CMetroidPrimeProjectile::CMetroidPrimeProjectile(
|
||||||
bool active, const TToken<CWeaponDescription>& desc, EWeaponType type, const zeus::CTransform& xf,
|
bool active, const TToken<CWeaponDescription>& desc, EWeaponType type, const zeus::CTransform& xf,
|
||||||
EMaterialTypes materials, const CDamageInfo& damage, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
EMaterialTypes materials, const CDamageInfo& damage, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||||
const SPrimeProjectileInfo& auxData, TUniqueId homingTarget, EProjectileAttrib attribs,
|
const SPrimeProjectileInfo& auxData, TUniqueId homingTarget, EProjectileAttrib attribs,
|
||||||
const zeus::CVector3f& scale, const std::experimental::optional<TLockedToken<CGenDescription>>& visorParticle,
|
const zeus::CVector3f& scale, const rstl::optional<TLockedToken<CGenDescription>>& visorParticle,
|
||||||
u16 visorSfx, bool sendCollideMsg)
|
u16 visorSfx, bool sendCollideMsg)
|
||||||
: CEnergyProjectile(active, desc, type, xf, materials, damage, uid, aid, owner, homingTarget, attribs, false, scale,
|
: CEnergyProjectile(active, desc, type, xf, materials, damage, uid, aid, owner, homingTarget, attribs, false, scale,
|
||||||
visorParticle, visorSfx, sendCollideMsg)
|
visorParticle, visorSfx, sendCollideMsg)
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
const zeus::CTransform& xf, EMaterialTypes materials, const CDamageInfo& damage,
|
const zeus::CTransform& xf, EMaterialTypes materials, const CDamageInfo& damage,
|
||||||
TUniqueId uid, TAreaId aid, TUniqueId owner, const SPrimeProjectileInfo& auxData,
|
TUniqueId uid, TAreaId aid, TUniqueId owner, const SPrimeProjectileInfo& auxData,
|
||||||
TUniqueId homingTarget, EProjectileAttrib attribs, const zeus::CVector3f& scale,
|
TUniqueId homingTarget, EProjectileAttrib attribs, const zeus::CVector3f& scale,
|
||||||
const std::experimental::optional<TLockedToken<CGenDescription>>& visorParticle, u16 visorSfx,
|
const rstl::optional<TLockedToken<CGenDescription>>& visorParticle, u16 visorSfx,
|
||||||
bool sendCollideMsg);
|
bool sendCollideMsg);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
return zeus::CAABox({-0.5f, -0.5f, box.min.z()}, {0.5f, 0.5f, box.max.z()}).getTransformedAABox(x34_transform);
|
return zeus::CAABox({-0.5f, -0.5f, box.min.z()}, {0.5f, 0.5f, box.max.z()}).getTransformedAABox(x34_transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> GetTouchBounds() const { return {}; }
|
rstl::optional<zeus::CAABox> GetTouchBounds() const { return {}; }
|
||||||
void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt);
|
void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt);
|
||||||
void Generate(CStateManager&, EStateMsg, float);
|
void Generate(CStateManager&, EStateMsg, float);
|
||||||
void Attack(CStateManager&, EStateMsg, float);
|
void Attack(CStateManager&, EStateMsg, float);
|
||||||
|
|
|
@ -83,7 +83,7 @@ void CPuddleToadGamma::Think(float dt, CStateManager& mgr) {
|
||||||
x56c_ += dt;
|
x56c_ += dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CPuddleToadGamma::GetTouchBounds() const {
|
rstl::optional<zeus::CAABox> CPuddleToadGamma::GetTouchBounds() const {
|
||||||
if (!GetActive())
|
if (!GetActive())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
||||||
void Think(float dt, CStateManager& mgr);
|
void Think(float dt, CStateManager& mgr);
|
||||||
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt);
|
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt);
|
||||||
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
rstl::optional<zeus::CAABox> GetTouchBounds() const;
|
||||||
|
|
||||||
const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&,
|
const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&,
|
||||||
const CDamageInfo&) const;
|
const CDamageInfo&) const;
|
||||||
|
|
|
@ -69,7 +69,7 @@ void CPuffer::Think(float dt, CStateManager& mgr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CPuffer::GetTouchBounds() const {
|
rstl::optional<zeus::CAABox> CPuffer::GetTouchBounds() const {
|
||||||
auto touchBounds = CPatterned::GetTouchBounds();
|
auto touchBounds = CPatterned::GetTouchBounds();
|
||||||
if (touchBounds) {
|
if (touchBounds) {
|
||||||
touchBounds->accumulateBounds(touchBounds->min - 0.5f);
|
touchBounds->accumulateBounds(touchBounds->min - 0.5f);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
void Accept(IVisitor&);
|
void Accept(IVisitor&);
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
||||||
void Think(float, CStateManager&);
|
void Think(float, CStateManager&);
|
||||||
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
rstl::optional<zeus::CAABox> GetTouchBounds() const;
|
||||||
void Touch(CActor&, CStateManager&);
|
void Touch(CActor&, CStateManager&);
|
||||||
void Death(CStateManager&, zeus::CVector3f&, EScriptObjectState);
|
void Death(CStateManager&, zeus::CVector3f&, EScriptObjectState);
|
||||||
};
|
};
|
||||||
|
|
|
@ -124,7 +124,7 @@ void CSeedling::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, E
|
||||||
CPatterned::DoUserAnimEvent(mgr, node, type, dt);
|
CPatterned::DoUserAnimEvent(mgr, node, type, dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CSeedling::GetTouchBounds() const {
|
rstl::optional<zeus::CAABox> CSeedling::GetTouchBounds() const {
|
||||||
return x704_modelBounds.getTransformedAABox(GetTransform());
|
return x704_modelBounds.getTransformedAABox(GetTransform());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
void Render(const CStateManager&) const;
|
void Render(const CStateManager&) const;
|
||||||
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt);
|
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt);
|
||||||
CProjectileInfo* GetProjectileInfo() { return &x6c0_projectileInfo; }
|
CProjectileInfo* GetProjectileInfo() { return &x6c0_projectileInfo; }
|
||||||
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
rstl::optional<zeus::CAABox> GetTouchBounds() const;
|
||||||
void Touch(CActor&, CStateManager&);
|
void Touch(CActor&, CStateManager&);
|
||||||
CPathFindSearch* GetSearchPath() { return &x5d8_searchPath; }
|
CPathFindSearch* GetSearchPath() { return &x5d8_searchPath; }
|
||||||
void Patrol(CStateManager&, EStateMsg, float);
|
void Patrol(CStateManager&, EStateMsg, float);
|
||||||
|
|
|
@ -118,7 +118,7 @@ void CWarWasp::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CWarWasp::GetTouchBounds() const {
|
rstl::optional<zeus::CAABox> CWarWasp::GetTouchBounds() const {
|
||||||
return {x570_cSphere.CalculateAABox(GetTransform())};
|
return {x570_cSphere.CalculateAABox(GetTransform())};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ public:
|
||||||
void Think(float dt, CStateManager& mgr);
|
void Think(float dt, CStateManager& mgr);
|
||||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr);
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr);
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
rstl::optional<zeus::CAABox> GetTouchBounds() const;
|
||||||
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt);
|
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt);
|
||||||
const CCollisionPrimitive* GetCollisionPrimitive() const;
|
const CCollisionPrimitive* GetCollisionPrimitive() const;
|
||||||
void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state);
|
void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state);
|
||||||
|
|
|
@ -21,7 +21,7 @@ void CDecalManager::Initialize() {
|
||||||
|
|
||||||
m_DecalPool.clear();
|
m_DecalPool.clear();
|
||||||
for (int i = 0; i < 64; ++i)
|
for (int i = 0; i < 64; ++i)
|
||||||
m_DecalPool.emplace_back(std::experimental::optional<CDecal>{}, 0, i - 1, false);
|
m_DecalPool.emplace_back(rstl::optional<CDecal>{}, 0, i - 1, false);
|
||||||
|
|
||||||
m_FreeIndex = 63;
|
m_FreeIndex = 63;
|
||||||
m_PoolInitialized = true;
|
m_PoolInitialized = true;
|
||||||
|
@ -39,7 +39,7 @@ void CDecalManager::Reinitialize() {
|
||||||
|
|
||||||
m_DecalPool.clear();
|
m_DecalPool.clear();
|
||||||
for (int i = 0; i < 64; ++i)
|
for (int i = 0; i < 64; ++i)
|
||||||
m_DecalPool.emplace_back(std::experimental::optional<CDecal>{}, 0, i - 1, false);
|
m_DecalPool.emplace_back(rstl::optional<CDecal>{}, 0, i - 1, false);
|
||||||
|
|
||||||
m_ActiveIndexList.clear();
|
m_ActiveIndexList.clear();
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,11 @@ class CStateManager;
|
||||||
|
|
||||||
class CDecalManager {
|
class CDecalManager {
|
||||||
struct SDecal {
|
struct SDecal {
|
||||||
std::experimental::optional<CDecal> x0_decal;
|
rstl::optional<CDecal> x0_decal;
|
||||||
TAreaId x70_areaId;
|
TAreaId x70_areaId;
|
||||||
s8 x74_index;
|
s8 x74_index;
|
||||||
bool x75_24_notIce : 1;
|
bool x75_24_notIce : 1;
|
||||||
SDecal(const std::experimental::optional<CDecal>& decal, TAreaId aid, s8 idx, bool notIce)
|
SDecal(const rstl::optional<CDecal>& decal, TAreaId aid, s8 idx, bool notIce)
|
||||||
: x0_decal(decal), x70_areaId(aid), x74_index(idx) {
|
: x0_decal(decal), x70_areaId(aid), x74_index(idx) {
|
||||||
x75_24_notIce = notIce;
|
x75_24_notIce = notIce;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1846,9 +1846,9 @@ bool CElementGen::IsSystemDeletable() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CElementGen::GetBounds() const {
|
rstl::optional<zeus::CAABox> CElementGen::GetBounds() const {
|
||||||
if (GetParticleCountAll() == 0)
|
if (GetParticleCountAll() == 0)
|
||||||
return std::experimental::nullopt;
|
return rstl::nullopt;
|
||||||
else
|
else
|
||||||
return {x2f0_systemBounds};
|
return {x2f0_systemBounds};
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,7 +211,7 @@ public:
|
||||||
const zeus::CColor& GetModulationColor() const;
|
const zeus::CColor& GetModulationColor() const;
|
||||||
float GetGeneratorRate() const { return x98_generatorRate; }
|
float GetGeneratorRate() const { return x98_generatorRate; }
|
||||||
bool IsSystemDeletable() const;
|
bool IsSystemDeletable() const;
|
||||||
std::experimental::optional<zeus::CAABox> GetBounds() const;
|
rstl::optional<zeus::CAABox> GetBounds() const;
|
||||||
u32 GetParticleCount() const;
|
u32 GetParticleCount() const;
|
||||||
bool SystemHasLight() const;
|
bool SystemHasLight() const;
|
||||||
CLight GetLight() const;
|
CLight GetLight() const;
|
||||||
|
|
|
@ -684,7 +684,7 @@ bool CParticleElectric::IsSystemDeletable() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CParticleElectric::GetBounds() const {
|
rstl::optional<zeus::CAABox> CParticleElectric::GetBounds() const {
|
||||||
if (GetParticleCount() <= 0)
|
if (GetParticleCount() <= 0)
|
||||||
return {};
|
return {};
|
||||||
else
|
else
|
||||||
|
|
|
@ -59,10 +59,10 @@ private:
|
||||||
int x158 = 0;
|
int x158 = 0;
|
||||||
float x15c_genRem = 0.f;
|
float x15c_genRem = 0.f;
|
||||||
zeus::CAABox x160_systemBounds = zeus::CAABox::skInvertedBox;
|
zeus::CAABox x160_systemBounds = zeus::CAABox::skInvertedBox;
|
||||||
std::experimental::optional<zeus::CVector3f> x178_overrideIPos;
|
rstl::optional<zeus::CVector3f> x178_overrideIPos;
|
||||||
std::experimental::optional<zeus::CVector3f> x188_overrideIVel;
|
rstl::optional<zeus::CVector3f> x188_overrideIVel;
|
||||||
std::experimental::optional<zeus::CVector3f> x198_overrideFPos;
|
rstl::optional<zeus::CVector3f> x198_overrideFPos;
|
||||||
std::experimental::optional<zeus::CVector3f> x1a8_overrideFVel;
|
rstl::optional<zeus::CVector3f> x1a8_overrideFVel;
|
||||||
zeus::CColor x1b8_moduColor;
|
zeus::CColor x1b8_moduColor;
|
||||||
rstl::reserved_vector<bool, 32> x1bc_allocated;
|
rstl::reserved_vector<bool, 32> x1bc_allocated;
|
||||||
rstl::reserved_vector<std::unique_ptr<CParticleSwoosh>, 32> x1e0_swooshGenerators;
|
rstl::reserved_vector<std::unique_ptr<CParticleSwoosh>, 32> x1e0_swooshGenerators;
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
const zeus::CVector3f& GetGlobalScale() const;
|
const zeus::CVector3f& GetGlobalScale() const;
|
||||||
const zeus::CColor& GetModulationColor() const;
|
const zeus::CColor& GetModulationColor() const;
|
||||||
bool IsSystemDeletable() const;
|
bool IsSystemDeletable() const;
|
||||||
std::experimental::optional<zeus::CAABox> GetBounds() const;
|
rstl::optional<zeus::CAABox> GetBounds() const;
|
||||||
u32 GetParticleCount() const;
|
u32 GetParticleCount() const;
|
||||||
bool SystemHasLight() const;
|
bool SystemHasLight() const;
|
||||||
CLight GetLight() const;
|
CLight GetLight() const;
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
virtual const zeus::CColor& GetModulationColor() const = 0;
|
virtual const zeus::CColor& GetModulationColor() const = 0;
|
||||||
virtual float GetGeneratorRate() const { return 1.f; }
|
virtual float GetGeneratorRate() const { return 1.f; }
|
||||||
virtual bool IsSystemDeletable() const = 0;
|
virtual bool IsSystemDeletable() const = 0;
|
||||||
virtual std::experimental::optional<zeus::CAABox> GetBounds() const = 0;
|
virtual rstl::optional<zeus::CAABox> GetBounds() const = 0;
|
||||||
virtual u32 GetParticleCount() const = 0;
|
virtual u32 GetParticleCount() const = 0;
|
||||||
virtual bool SystemHasLight() const = 0;
|
virtual bool SystemHasLight() const = 0;
|
||||||
virtual CLight GetLight() const = 0;
|
virtual CLight GetLight() const = 0;
|
||||||
|
|
|
@ -987,7 +987,7 @@ bool CParticleSwoosh::IsSystemDeletable() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CParticleSwoosh::GetBounds() const {
|
rstl::optional<zeus::CAABox> CParticleSwoosh::GetBounds() const {
|
||||||
if (GetParticleCount() <= 1) {
|
if (GetParticleCount() <= 1) {
|
||||||
zeus::CVector3f trans = x38_translation + xa4_globalTranslation;
|
zeus::CVector3f trans = x38_translation + xa4_globalTranslation;
|
||||||
return zeus::CAABox(trans, trans);
|
return zeus::CAABox(trans, trans);
|
||||||
|
|
|
@ -150,7 +150,7 @@ public:
|
||||||
const zeus::CVector3f& GetGlobalScale() const;
|
const zeus::CVector3f& GetGlobalScale() const;
|
||||||
const zeus::CColor& GetModulationColor() const;
|
const zeus::CColor& GetModulationColor() const;
|
||||||
bool IsSystemDeletable() const;
|
bool IsSystemDeletable() const;
|
||||||
std::experimental::optional<zeus::CAABox> GetBounds() const;
|
rstl::optional<zeus::CAABox> GetBounds() const;
|
||||||
u32 GetParticleCount() const;
|
u32 GetParticleCount() const;
|
||||||
bool SystemHasLight() const;
|
bool SystemHasLight() const;
|
||||||
CLight GetLight() const;
|
CLight GetLight() const;
|
||||||
|
|
|
@ -134,14 +134,14 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<T> GetAverage() const {
|
rstl::optional<T> GetAverage() const {
|
||||||
if (this->empty())
|
if (this->empty())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
return {urde::GetAverage<T>(this->data(), this->size())};
|
return {urde::GetAverage<T>(this->data(), this->size())};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<T> GetEntry(int i) const {
|
rstl::optional<T> GetEntry(int i) const {
|
||||||
if (i >= this->size())
|
if (i >= this->size())
|
||||||
return {};
|
return {};
|
||||||
return this->operator[](i);
|
return this->operator[](i);
|
||||||
|
|
|
@ -23,7 +23,7 @@ CBeamProjectile::CBeamProjectile(const TToken<CWeaponDescription>& wDesc, std::s
|
||||||
x400_pointCache.resize(8);
|
x400_pointCache.resize(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CBeamProjectile::GetTouchBounds() const {
|
rstl::optional<zeus::CAABox> CBeamProjectile::GetTouchBounds() const {
|
||||||
if (!GetActive())
|
if (!GetActive())
|
||||||
return {};
|
return {};
|
||||||
if (x464_25_enableTouchDamage) {
|
if (x464_25_enableTouchDamage) {
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
s32 GetIntMaxLength() const { return x2e8_intMaxLength; }
|
s32 GetIntMaxLength() const { return x2e8_intMaxLength; }
|
||||||
TUniqueId GetCollisionActorId() const { return x2fe_collisionActorId; }
|
TUniqueId GetCollisionActorId() const { return x2fe_collisionActorId; }
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
rstl::optional<zeus::CAABox> GetTouchBounds() const;
|
||||||
void CalculateRenderBounds();
|
void CalculateRenderBounds();
|
||||||
virtual void ResetBeam(CStateManager&, bool);
|
virtual void ResetBeam(CStateManager&, bool);
|
||||||
virtual void UpdateFx(const zeus::CTransform&, float, CStateManager&);
|
virtual void UpdateFx(const zeus::CTransform&, float, CStateManager&);
|
||||||
|
|
|
@ -130,7 +130,7 @@ void CBomb::Touch(CActor&, urde::CStateManager&) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CBomb::GetTouchBounds() const {
|
rstl::optional<zeus::CAABox> CBomb::GetTouchBounds() const {
|
||||||
float radius = (x190_24_isNotDetonated ? 0.2f : x12c_curDamageInfo.GetRadius());
|
float radius = (x190_24_isNotDetonated ? 0.2f : x12c_curDamageInfo.GetRadius());
|
||||||
float minX = (x170_prevLocation.x() >= GetTranslation().x() ? x170_prevLocation.x() : GetTranslation().x()) - radius;
|
float minX = (x170_prevLocation.x() >= GetTranslation().x() ? x170_prevLocation.x() : GetTranslation().x()) - radius;
|
||||||
float minY = (x170_prevLocation.y() >= GetTranslation().y() ? x170_prevLocation.y() : GetTranslation().y()) - radius;
|
float minY = (x170_prevLocation.y() >= GetTranslation().y() ? x170_prevLocation.y() : GetTranslation().y()) - radius;
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
void Touch(CActor&, CStateManager&);
|
void Touch(CActor&, CStateManager&);
|
||||||
void Explode(const zeus::CVector3f&, CStateManager&);
|
void Explode(const zeus::CVector3f&, CStateManager&);
|
||||||
void UpdateLight(float, CStateManager&);
|
void UpdateLight(float, CStateManager&);
|
||||||
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
rstl::optional<zeus::CAABox> GetTouchBounds() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
|
@ -18,7 +18,7 @@ CEnergyProjectile::CEnergyProjectile(bool active, const TToken<CWeaponDescriptio
|
||||||
const zeus::CTransform& xf, EMaterialTypes excludeMat, const CDamageInfo& damage,
|
const zeus::CTransform& xf, EMaterialTypes excludeMat, const CDamageInfo& damage,
|
||||||
TUniqueId uid, TAreaId aid, TUniqueId owner, TUniqueId homingTarget,
|
TUniqueId uid, TAreaId aid, TUniqueId owner, TUniqueId homingTarget,
|
||||||
EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,
|
EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,
|
||||||
const std::experimental::optional<TLockedToken<CGenDescription>>& visorParticle,
|
const rstl::optional<TLockedToken<CGenDescription>>& visorParticle,
|
||||||
u16 visorSfx, bool sendCollideMsg)
|
u16 visorSfx, bool sendCollideMsg)
|
||||||
: CGameProjectile(active, desc, "GameProjectile", type, xf, excludeMat, damage, uid, aid, owner, homingTarget, attribs,
|
: CGameProjectile(active, desc, "GameProjectile", type, xf, excludeMat, damage, uid, aid, owner, homingTarget, attribs,
|
||||||
underwater, scale, visorParticle, visorSfx, sendCollideMsg)
|
underwater, scale, visorParticle, visorSfx, sendCollideMsg)
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
CEnergyProjectile(bool active, const TToken<CWeaponDescription>& desc, EWeaponType type, const zeus::CTransform& xf,
|
CEnergyProjectile(bool active, const TToken<CWeaponDescription>& desc, EWeaponType type, const zeus::CTransform& xf,
|
||||||
EMaterialTypes excludeMat, const CDamageInfo& damage, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
EMaterialTypes excludeMat, const CDamageInfo& damage, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||||
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,
|
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,
|
||||||
const std::experimental::optional<TLockedToken<CGenDescription>>& visorParticle, u16 visorSfx,
|
const rstl::optional<TLockedToken<CGenDescription>>& visorParticle, u16 visorSfx,
|
||||||
bool sendCollideMsg);
|
bool sendCollideMsg);
|
||||||
void SetCameraShake(const CCameraShakeData& data) {
|
void SetCameraShake(const CCameraShakeData& data) {
|
||||||
x2fc_camShake = data;
|
x2fc_camShake = data;
|
||||||
|
|
|
@ -17,7 +17,7 @@ CGameProjectile::CGameProjectile(bool active, const TToken<CWeaponDescription>&
|
||||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||||
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater,
|
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater,
|
||||||
const zeus::CVector3f& scale,
|
const zeus::CVector3f& scale,
|
||||||
const std::experimental::optional<TLockedToken<CGenDescription>>& visorParticle,
|
const rstl::optional<TLockedToken<CGenDescription>>& visorParticle,
|
||||||
u16 visorSfx, bool sendCollideMsg)
|
u16 visorSfx, bool sendCollideMsg)
|
||||||
: CWeapon(uid, aid, active, owner, wType, name, xf,
|
: CWeapon(uid, aid, active, owner, wType, name, xf,
|
||||||
CMaterialFilter::MakeIncludeExclude(
|
CMaterialFilter::MakeIncludeExclude(
|
||||||
|
@ -49,7 +49,7 @@ void CGameProjectile::ResolveCollisionWithActor(const CRayCastResult& res, CActo
|
||||||
if (zeus::radToDeg(std::acos(
|
if (zeus::radToDeg(std::acos(
|
||||||
mgr.GetCameraManager()->GetCurrentCameraTransform(mgr).basis[1].normalized().dot(revDir))) <= 45.f) {
|
mgr.GetCameraManager()->GetCurrentCameraTransform(mgr).basis[1].normalized().dot(revDir))) <= 45.f) {
|
||||||
/* Hit us head on! Draw Billboard! */
|
/* Hit us head on! Draw Billboard! */
|
||||||
std::experimental::optional<TToken<CGenDescription>> bb = {*x158_visorParticle};
|
rstl::optional<TToken<CGenDescription>> bb = {*x158_visorParticle};
|
||||||
CHUDBillboardEffect* effect = new CHUDBillboardEffect(
|
CHUDBillboardEffect* effect = new CHUDBillboardEffect(
|
||||||
bb, {}, mgr.AllocateUniqueId(), true, "VisorAcid", CHUDBillboardEffect::GetNearClipDistance(mgr),
|
bb, {}, mgr.AllocateUniqueId(), true, "VisorAcid", CHUDBillboardEffect::GetNearClipDistance(mgr),
|
||||||
CHUDBillboardEffect::GetScaleForPOV(mgr), zeus::CColor::skWhite, zeus::CVector3f::skOne,
|
CHUDBillboardEffect::GetScaleForPOV(mgr), zeus::CColor::skWhite, zeus::CVector3f::skOne,
|
||||||
|
@ -423,7 +423,7 @@ zeus::CAABox CGameProjectile::GetProjectileBounds() const {
|
||||||
std::max(x298_previousPos.z(), GetTranslation().z()) + x2a4_projExtent}};
|
std::max(x298_previousPos.z(), GetTranslation().z()) + x2a4_projExtent}};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::experimental::optional<zeus::CAABox> CGameProjectile::GetTouchBounds() const {
|
rstl::optional<zeus::CAABox> CGameProjectile::GetTouchBounds() const {
|
||||||
if (x2e4_24_active)
|
if (x2e4_24_active)
|
||||||
return {GetProjectileBounds()};
|
return {GetProjectileBounds()};
|
||||||
return {};
|
return {};
|
||||||
|
|
|
@ -15,10 +15,10 @@ class CWeaponDescription;
|
||||||
|
|
||||||
class CProjectileTouchResult {
|
class CProjectileTouchResult {
|
||||||
TUniqueId x0_id;
|
TUniqueId x0_id;
|
||||||
std::experimental::optional<CRayCastResult> x4_result;
|
rstl::optional<CRayCastResult> x4_result;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CProjectileTouchResult(TUniqueId id, const std::experimental::optional<CRayCastResult>& result)
|
CProjectileTouchResult(TUniqueId id, const rstl::optional<CRayCastResult>& result)
|
||||||
: x0_id(id), x4_result(result) {}
|
: x0_id(id), x4_result(result) {}
|
||||||
TUniqueId GetActorId() const { return x0_id; }
|
TUniqueId GetActorId() const { return x0_id; }
|
||||||
bool HasRayCastResult() const { return x4_result.operator bool(); }
|
bool HasRayCastResult() const { return x4_result.operator bool(); }
|
||||||
|
@ -27,7 +27,7 @@ public:
|
||||||
|
|
||||||
class CGameProjectile : public CWeapon {
|
class CGameProjectile : public CWeapon {
|
||||||
protected:
|
protected:
|
||||||
std::experimental::optional<TLockedToken<CGenDescription>> x158_visorParticle;
|
rstl::optional<TLockedToken<CGenDescription>> x158_visorParticle;
|
||||||
u16 x168_visorSfx;
|
u16 x168_visorSfx;
|
||||||
CProjectileWeapon x170_projectile;
|
CProjectileWeapon x170_projectile;
|
||||||
zeus::CVector3f x298_previousPos;
|
zeus::CVector3f x298_previousPos;
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
const zeus::CTransform& xf, EMaterialTypes excludeMat, const CDamageInfo& dInfo, TUniqueId uid,
|
const zeus::CTransform& xf, EMaterialTypes excludeMat, const CDamageInfo& dInfo, TUniqueId uid,
|
||||||
TAreaId aid, TUniqueId owner, TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater,
|
TAreaId aid, TUniqueId owner, TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater,
|
||||||
const zeus::CVector3f& scale,
|
const zeus::CVector3f& scale,
|
||||||
const std::experimental::optional<TLockedToken<CGenDescription>>& visorParticle, u16 visorSfx,
|
const rstl::optional<TLockedToken<CGenDescription>>& visorParticle, u16 visorSfx,
|
||||||
bool sendCollideMsg);
|
bool sendCollideMsg);
|
||||||
|
|
||||||
virtual void Accept(IVisitor& visitor);
|
virtual void Accept(IVisitor& visitor);
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
CProjectileTouchResult CanCollideWithGameObject(CActor& act, CStateManager& mgr);
|
CProjectileTouchResult CanCollideWithGameObject(CActor& act, CStateManager& mgr);
|
||||||
CProjectileTouchResult CanCollideWithTrigger(CActor& act, CStateManager& mgr);
|
CProjectileTouchResult CanCollideWithTrigger(CActor& act, CStateManager& mgr);
|
||||||
zeus::CAABox GetProjectileBounds() const;
|
zeus::CAABox GetProjectileBounds() const;
|
||||||
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
rstl::optional<zeus::CAABox> GetTouchBounds() const;
|
||||||
TUniqueId GetHomingTargetId() const { return x2c0_homingTargetId; }
|
TUniqueId GetHomingTargetId() const { return x2c0_homingTargetId; }
|
||||||
zeus::CVector3f GetPreviousPos() const { return x298_previousPos; }
|
zeus::CVector3f GetPreviousPos() const { return x298_previousPos; }
|
||||||
};
|
};
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue