mirror of https://github.com/AxioDL/metaforce.git
Big fixes and big memory leak refactor (linux only for now)
This commit is contained in:
parent
5f03362149
commit
f60af632b3
|
@ -28,7 +28,7 @@ void InitializeBadging(specter::ViewResources& viewRes)
|
||||||
if (uncompress(texels.get(), &destSz, URDE_BADGE + pos, URDE_BADGE_SZ - pos) != Z_OK)
|
if (uncompress(texels.get(), &destSz, URDE_BADGE + pos, URDE_BADGE_SZ - pos) != Z_OK)
|
||||||
Log.report(logvisor::Fatal, "unable to decompress badge");
|
Log.report(logvisor::Fatal, "unable to decompress badge");
|
||||||
|
|
||||||
viewRes.m_factory->commitTransaction([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
viewRes.m_factory->BooCommitTransaction([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
specter::IconAtlas<1, 1> atlas;
|
specter::IconAtlas<1, 1> atlas;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ void InitializeIcons(specter::ViewResources& viewRes)
|
||||||
if (uncompress(texels.get(), &destSz, URDE_ICONS + pos, URDE_ICONS_SZ - pos) != Z_OK)
|
if (uncompress(texels.get(), &destSz, URDE_ICONS + pos, URDE_ICONS_SZ - pos) != Z_OK)
|
||||||
Log.report(logvisor::Fatal, "unable to decompress icons");
|
Log.report(logvisor::Fatal, "unable to decompress icons");
|
||||||
|
|
||||||
viewRes.m_factory->commitTransaction([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
viewRes.m_factory->BooCommitTransaction([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
g_IconAtlas.initializeAtlas(ctx.newStaticTexture(width, height, mips,
|
g_IconAtlas.initializeAtlas(ctx.newStaticTexture(width, height, mips,
|
||||||
boo::TextureFormat::RGBA8,
|
boo::TextureFormat::RGBA8,
|
||||||
|
|
|
@ -252,7 +252,7 @@ void CNESEmulator::InitializeEmulator()
|
||||||
//mainLoopRuns *= ppuLinesTotal;
|
//mainLoopRuns *= ppuLinesTotal;
|
||||||
mainLoopPos = mainLoopRuns;
|
mainLoopPos = mainLoopRuns;
|
||||||
|
|
||||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
// Nearest-neighbor FTW!
|
// Nearest-neighbor FTW!
|
||||||
m_texture = ctx.newDynamicTexture(VISIBLE_DOTS, linesToDraw,
|
m_texture = ctx.newDynamicTexture(VISIBLE_DOTS, linesToDraw,
|
||||||
|
|
|
@ -295,8 +295,8 @@ void CNESShader::Initialize()
|
||||||
if (!CGraphics::g_BooFactory)
|
if (!CGraphics::g_BooFactory)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CGraphics::CommitResources(
|
CGraphicsCommitResources(
|
||||||
[&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
[&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
switch (ctx.platform())
|
switch (ctx.platform())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1607,7 +1607,8 @@ void CAutoMapper::Draw(const CStateManager& mgr, const zeus::CTransform& xf, flo
|
||||||
alpha *= mapAlpha;
|
alpha *= mapAlpha;
|
||||||
zeus::CColor modColor = g_tweakAutoMapper->GetMiniMapSamusModColor();
|
zeus::CColor modColor = g_tweakAutoMapper->GetMiniMapSamusModColor();
|
||||||
modColor.a *= alpha;
|
modColor.a *= alpha;
|
||||||
CModelFlags flags(5, 0, 3 | 8 | 1, modColor);
|
CModelFlags flags(5, 0, 8 | 1, modColor); /* Depth GEqual */
|
||||||
|
flags.m_extendedShader = EExtendedShader::DepthGEqualNoZWrite;
|
||||||
x30_miniMapSamus->Draw(flags);
|
x30_miniMapSamus->Draw(flags);
|
||||||
}
|
}
|
||||||
if (IsInMapperState(EAutoMapperState::MapScreen))
|
if (IsInMapperState(EAutoMapperState::MapScreen))
|
||||||
|
|
|
@ -54,7 +54,7 @@ void CMapArea::PostConstruct()
|
||||||
m_surfaces.back().PostConstruct(x44_buf.get(), index);
|
m_surfaces.back().PostConstruct(x44_buf.get(), index);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([this, &index](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([this, &index](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, m_verts.data(), 16, m_verts.size());
|
m_vbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, m_verts.data(), 16, m_verts.size());
|
||||||
m_ibo = ctx.newStaticBuffer(boo::BufferUse::Index, index.data(), 4, index.size());
|
m_ibo = ctx.newStaticBuffer(boo::BufferUse::Index, index.data(), 4, index.size());
|
||||||
|
@ -84,7 +84,8 @@ void CMapArea::PostConstruct()
|
||||||
u32 count = r.readUint32Big();
|
u32 count = r.readUint32Big();
|
||||||
r.seek(count);
|
r.seek(count);
|
||||||
r.seekAlign4();
|
r.seekAlign4();
|
||||||
linePrims.emplace_back(ctx, CLineRenderer::EPrimitiveMode::LineStrip, count, nullptr, false);
|
linePrims.emplace_back(ctx, CLineRenderer::EPrimitiveMode::LineStrip, count,
|
||||||
|
nullptr, false, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,7 @@ void CMappableObject::ReadAutoMapperTweaks(const ITweakAutoMapper& tweaks)
|
||||||
doorVerts[6].assign(.2f * -center.z, center.y, 0.f);
|
doorVerts[6].assign(.2f * -center.z, center.y, 0.f);
|
||||||
doorVerts[7].assign(.2f * -center.z, center.y, 2.f * center.x);
|
doorVerts[7].assign(.2f * -center.z, center.y, 2.f * center.x);
|
||||||
|
|
||||||
CGraphics::CommitResources([](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
g_doorVbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, skDoorVerts, 16, 8);
|
g_doorVbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, skDoorVerts, 16, 8);
|
||||||
g_doorIbo = ctx.newStaticBuffer(boo::BufferUse::Index, DoorIndices, 4, 24);
|
g_doorIbo = ctx.newStaticBuffer(boo::BufferUse::Index, DoorIndices, 4, 24);
|
||||||
|
|
|
@ -74,7 +74,7 @@ private:
|
||||||
CLineRenderer m_outline;
|
CLineRenderer m_outline;
|
||||||
DoorSurface(boo::IGraphicsDataFactory::Context& ctx)
|
DoorSurface(boo::IGraphicsDataFactory::Context& ctx)
|
||||||
: m_surface(ctx, g_doorVbo, g_doorIbo),
|
: m_surface(ctx, g_doorVbo, g_doorIbo),
|
||||||
m_outline(ctx, CLineRenderer::EPrimitiveMode::LineLoop, 5, nullptr, false)
|
m_outline(ctx, CLineRenderer::EPrimitiveMode::LineLoop, 5, nullptr, false, false, true)
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
std::experimental::optional<DoorSurface> m_doorSurface;
|
std::experimental::optional<DoorSurface> m_doorSurface;
|
||||||
|
|
|
@ -9,6 +9,11 @@ CSimplePool::CSimplePool(IFactory& factory)
|
||||||
: x18_factory(factory), x1c_paramXfer(new TObjOwnerParam<IObjectStore*>(this))
|
: x18_factory(factory), x1c_paramXfer(new TObjOwnerParam<IObjectStore*>(this))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
CSimplePool::~CSimplePool()
|
||||||
|
{
|
||||||
|
assert(x8_resources.empty() && "Dangling CSimplePool resources detected");
|
||||||
|
}
|
||||||
|
|
||||||
CToken CSimplePool::GetObj(const SObjectTag& tag, const CVParamTransfer& paramXfer)
|
CToken CSimplePool::GetObj(const SObjectTag& tag, const CVParamTransfer& paramXfer)
|
||||||
{
|
{
|
||||||
if (!tag)
|
if (!tag)
|
||||||
|
|
|
@ -21,6 +21,7 @@ protected:
|
||||||
CVParamTransfer x1c_paramXfer;
|
CVParamTransfer x1c_paramXfer;
|
||||||
public:
|
public:
|
||||||
CSimplePool(IFactory& factory);
|
CSimplePool(IFactory& factory);
|
||||||
|
~CSimplePool();
|
||||||
CToken GetObj(const SObjectTag&, const CVParamTransfer&);
|
CToken GetObj(const SObjectTag&, const CVParamTransfer&);
|
||||||
CToken GetObj(const SObjectTag&);
|
CToken GetObj(const SObjectTag&);
|
||||||
CToken GetObj(std::string_view);
|
CToken GetObj(std::string_view);
|
||||||
|
|
|
@ -217,6 +217,25 @@ CStateManager::CStateManager(const std::weak_ptr<CRelayTracker>& relayTracker,
|
||||||
|
|
||||||
CStateManager::~CStateManager()
|
CStateManager::~CStateManager()
|
||||||
{
|
{
|
||||||
|
x88c_rumbleManager->HardStopAll();
|
||||||
|
x880_envFxManager->Cleanup();
|
||||||
|
x900_activeRandom = &x8fc_random;
|
||||||
|
ClearGraveyard();
|
||||||
|
for (auto it = x808_objLists[0]->begin() ; it != x808_objLists[0]->end() ;)
|
||||||
|
{
|
||||||
|
CEntity* ent = *it;
|
||||||
|
++it;
|
||||||
|
if (ent == x84c_player.get())
|
||||||
|
continue;
|
||||||
|
ent->AcceptScriptMsg(EScriptObjectMessage::Deleted, kInvalidUniqueId, *this);
|
||||||
|
RemoveObject(ent->GetUniqueId());
|
||||||
|
std::default_delete<CEntity>()(ent);
|
||||||
|
}
|
||||||
|
ClearGraveyard();
|
||||||
|
x84c_player->AcceptScriptMsg(EScriptObjectMessage::Deleted, kInvalidUniqueId, *this);
|
||||||
|
RemoveObject(x84c_player->GetUniqueId());
|
||||||
|
x84c_player.reset();
|
||||||
|
CCollisionPrimitive::Uninitialize();
|
||||||
g_StateManager = nullptr;
|
g_StateManager = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2207,8 +2226,7 @@ void CStateManager::ClearGraveyard()
|
||||||
{
|
{
|
||||||
CEntity* ent = GetAllObjectList().GetValidObjectById(id);
|
CEntity* ent = GetAllObjectList().GetValidObjectById(id);
|
||||||
RemoveObject(id);
|
RemoveObject(id);
|
||||||
if (ent)
|
std::default_delete<CEntity>()(ent);
|
||||||
std::default_delete<CEntity>()(ent);
|
|
||||||
}
|
}
|
||||||
x854_objectGraveyard.clear();
|
x854_objectGraveyard.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,12 +53,9 @@ class CObjectReference
|
||||||
/** Synchronous object-fetch, guaranteed to return complete object on-demand, blocking build if not ready */
|
/** Synchronous object-fetch, guaranteed to return complete object on-demand, blocking build if not ready */
|
||||||
IObj* GetObject();
|
IObj* GetObject();
|
||||||
|
|
||||||
const SObjectTag& GetObjectTag() const
|
|
||||||
{
|
|
||||||
return x4_objTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
const SObjectTag& GetObjectTag() const { return x4_objTag; }
|
||||||
|
|
||||||
~CObjectReference();
|
~CObjectReference();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -712,7 +712,7 @@ CBooRenderer::CBooRenderer(IObjectStore& store, IFactory& resFac)
|
||||||
|
|
||||||
m_staticEntropy = store.GetObj("RandomStaticEntropy");
|
m_staticEntropy = store.GetObj("RandomStaticEntropy");
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
GenerateFogVolumeRampTex(ctx);
|
GenerateFogVolumeRampTex(ctx);
|
||||||
GenerateSphereRampTex(ctx);
|
GenerateSphereRampTex(ctx);
|
||||||
|
|
|
@ -334,10 +334,17 @@ public:
|
||||||
return g_BooPlatformName;
|
return g_BooPlatformName;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CommitResources(const boo::FactoryCommitFunc& commitFunc)
|
static void CommitResources(const boo::FactoryCommitFunc& commitFunc __BooTraceArgs)
|
||||||
{
|
{
|
||||||
g_BooFactory->commitTransaction(commitFunc);
|
g_BooFactory->commitTransaction(commitFunc __BooTraceArgsUse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
#define CGraphicsCommitResources(...) CGraphics::CommitResources(__VA_ARGS__, __FILE__, __LINE__)
|
||||||
|
#else
|
||||||
|
#define CGraphicsCommitResources(...) CGraphics::CommitResources(__VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
|
||||||
static void SetShaderDataBinding(const boo::ObjToken<boo::IShaderDataBinding>& binding)
|
static void SetShaderDataBinding(const boo::ObjToken<boo::IShaderDataBinding>& binding)
|
||||||
{
|
{
|
||||||
g_BooMainCommandQueue->setShaderDataBinding(binding);
|
g_BooMainCommandQueue->setShaderDataBinding(binding);
|
||||||
|
|
|
@ -25,7 +25,7 @@ hecl::UniformBufferPool<CLineRenderer::SDrawUniform> CLineRenderer::s_uniformPoo
|
||||||
CLineRenderer::CLineRenderer(boo::IGraphicsDataFactory::Context& ctx,
|
CLineRenderer::CLineRenderer(boo::IGraphicsDataFactory::Context& ctx,
|
||||||
EPrimitiveMode mode, u32 maxVerts,
|
EPrimitiveMode mode, u32 maxVerts,
|
||||||
const boo::ObjToken<boo::ITexture>& texture,
|
const boo::ObjToken<boo::ITexture>& texture,
|
||||||
bool additive, bool zTest)
|
bool additive, bool zTest, bool zGEqual)
|
||||||
: m_mode(mode), m_maxVerts(maxVerts)
|
: m_mode(mode), m_maxVerts(maxVerts)
|
||||||
{
|
{
|
||||||
if (maxVerts < 2)
|
if (maxVerts < 2)
|
||||||
|
@ -56,12 +56,12 @@ CLineRenderer::CLineRenderer(boo::IGraphicsDataFactory::Context& ctx,
|
||||||
|
|
||||||
m_uniformBuf = s_uniformPool.allocateBlock(CGraphics::g_BooFactory);
|
m_uniformBuf = s_uniformPool.allocateBlock(CGraphics::g_BooFactory);
|
||||||
|
|
||||||
CLineRendererShaders::BuildShaderDataBinding(ctx, *this, texture, additive, zTest);
|
CLineRendererShaders::BuildShaderDataBinding(ctx, *this, texture, additive, zTest, zGEqual);
|
||||||
}
|
}
|
||||||
|
|
||||||
CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts,
|
CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts,
|
||||||
const boo::ObjToken<boo::ITexture>& texture,
|
const boo::ObjToken<boo::ITexture>& texture,
|
||||||
bool additive, bool zTest)
|
bool additive, bool zTest, bool zGEqual)
|
||||||
: m_mode(mode), m_maxVerts(maxVerts)
|
: m_mode(mode), m_maxVerts(maxVerts)
|
||||||
{
|
{
|
||||||
if (maxVerts < 2)
|
if (maxVerts < 2)
|
||||||
|
@ -92,9 +92,9 @@ CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts,
|
||||||
|
|
||||||
m_uniformBuf = s_uniformPool.allocateBlock(CGraphics::g_BooFactory);
|
m_uniformBuf = s_uniformPool.allocateBlock(CGraphics::g_BooFactory);
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
CLineRendererShaders::BuildShaderDataBinding(ctx, *this, texture, additive, zTest);
|
CLineRendererShaders::BuildShaderDataBinding(ctx, *this, texture, additive, zTest, zGEqual);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,9 +74,9 @@ public:
|
||||||
|
|
||||||
CLineRenderer(boo::IGraphicsDataFactory::Context& ctx,
|
CLineRenderer(boo::IGraphicsDataFactory::Context& ctx,
|
||||||
EPrimitiveMode mode, u32 maxVerts, const boo::ObjToken<boo::ITexture>& texture,
|
EPrimitiveMode mode, u32 maxVerts, const boo::ObjToken<boo::ITexture>& texture,
|
||||||
bool additive, bool zTest = false);
|
bool additive, bool zTest = false, bool zGEqual = false);
|
||||||
CLineRenderer(EPrimitiveMode mode, u32 maxVerts, const boo::ObjToken<boo::ITexture>& texture,
|
CLineRenderer(EPrimitiveMode mode, u32 maxVerts, const boo::ObjToken<boo::ITexture>& texture,
|
||||||
bool additive, bool zTest = false);
|
bool additive, bool zTest = false, bool zGEqual = false);
|
||||||
CLineRenderer(CLineRenderer&&) = default;
|
CLineRenderer(CLineRenderer&&) = default;
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
|
@ -271,6 +271,8 @@ public:
|
||||||
|
|
||||||
static void SetDummyTextures(bool b) { g_DummyTextures = b; }
|
static void SetDummyTextures(bool b) { g_DummyTextures = b; }
|
||||||
static void SetRenderModelBlack(bool b) { g_RenderModelBlack = b; }
|
static void SetRenderModelBlack(bool b) { g_RenderModelBlack = b; }
|
||||||
|
|
||||||
|
static void AssertAllFreed();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CModel
|
class CModel
|
||||||
|
@ -285,8 +287,8 @@ class CModel
|
||||||
std::vector<CBooSurface> x8_surfaces;
|
std::vector<CBooSurface> x8_surfaces;
|
||||||
std::vector<SShader> x18_matSets;
|
std::vector<SShader> x18_matSets;
|
||||||
std::unique_ptr<CBooModel> x28_modelInst;
|
std::unique_ptr<CBooModel> x28_modelInst;
|
||||||
CModel* x30_next = nullptr;
|
//CModel* x30_next = nullptr;
|
||||||
CModel* x34_prev = nullptr;
|
//CModel* x34_prev = nullptr;
|
||||||
int x38_lastFrame;
|
int x38_lastFrame;
|
||||||
|
|
||||||
/* urde addition: boo! */
|
/* urde addition: boo! */
|
||||||
|
|
|
@ -19,6 +19,11 @@ bool CBooModel::g_DrawingOccluders = false;
|
||||||
|
|
||||||
static CBooModel* g_FirstModel = nullptr;
|
static CBooModel* g_FirstModel = nullptr;
|
||||||
|
|
||||||
|
void CBooModel::AssertAllFreed()
|
||||||
|
{
|
||||||
|
assert(g_FirstModel == nullptr && "Dangling CBooModels detected");
|
||||||
|
}
|
||||||
|
|
||||||
void CBooModel::ClearModelUniformCounters()
|
void CBooModel::ClearModelUniformCounters()
|
||||||
{
|
{
|
||||||
for (CBooModel* model = g_FirstModel ; model ; model = model->m_next)
|
for (CBooModel* model = g_FirstModel ; model ; model = model->m_next)
|
||||||
|
@ -281,7 +286,7 @@ CBooModel::ModelInstance* CBooModel::PushNewModelInstance(int sharedLayoutBuf)
|
||||||
m_instances.emplace_back();
|
m_instances.emplace_back();
|
||||||
ModelInstance& newInst = m_instances.back();
|
ModelInstance& newInst = m_instances.back();
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
/* Build geometry uniform buffer if shared not available */
|
/* Build geometry uniform buffer if shared not available */
|
||||||
boo::ObjToken<boo::IGraphicsBufferD> geomUniformBuf;
|
boo::ObjToken<boo::IGraphicsBufferD> geomUniformBuf;
|
||||||
|
@ -1197,8 +1202,8 @@ std::unique_ptr<CBooModel> CModel::MakeNewInstance(int shaderIdx, int subInsts,
|
||||||
if (shaderIdx >= x18_matSets.size())
|
if (shaderIdx >= x18_matSets.size())
|
||||||
shaderIdx = 0;
|
shaderIdx = 0;
|
||||||
auto ret = std::make_unique<CBooModel>(m_selfToken, this, &x8_surfaces, x18_matSets[shaderIdx],
|
auto ret = std::make_unique<CBooModel>(m_selfToken, this, &x8_surfaces, x18_matSets[shaderIdx],
|
||||||
m_staticVtxFmt, m_staticVbo, m_ibo,
|
m_staticVtxFmt, m_staticVbo, m_ibo,
|
||||||
m_aabb, (m_flags & 0x2) != 0, subInsts, txtrOverrides);
|
m_aabb, (m_flags & 0x2) != 0, subInsts, txtrOverrides);
|
||||||
if (lockParent)
|
if (lockParent)
|
||||||
ret->LockParent();
|
ret->LockParent();
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1275,7 +1280,7 @@ CModel::CModel(std::unique_ptr<u8[]>&& in, u32 /* dataLen */, IObjectStore* stor
|
||||||
matSet.BuildShaders(m_hmdlMeta);
|
matSet.BuildShaders(m_hmdlMeta);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
/* Index buffer is always static */
|
/* Index buffer is always static */
|
||||||
if (m_hmdlMeta.indexCount)
|
if (m_hmdlMeta.indexCount)
|
||||||
|
|
|
@ -198,7 +198,7 @@ static const char* TexNames[] = {"texY", "texU", "texV"};
|
||||||
|
|
||||||
void CMoviePlayer::Initialize()
|
void CMoviePlayer::Initialize()
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
if (!ctx.bindingNeedsVertexFormat())
|
if (!ctx.bindingNeedsVertexFormat())
|
||||||
{
|
{
|
||||||
|
@ -426,7 +426,7 @@ CMoviePlayer::CMoviePlayer(const char* path, float preLoadSeconds, bool loop, bo
|
||||||
xa0_bufferQueue.reserve(xf0_preLoadFrames);
|
xa0_bufferQueue.reserve(xf0_preLoadFrames);
|
||||||
|
|
||||||
/* All set for GPU resources */
|
/* All set for GPU resources */
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_blockBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(m_viewVertBlock), 1);
|
m_blockBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(m_viewVertBlock), 1);
|
||||||
m_vertBuf = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(specter::View::TexShaderVert), 4);
|
m_vertBuf = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(specter::View::TexShaderVert), 4);
|
||||||
|
|
|
@ -14,7 +14,7 @@ CRainSplashGenerator::CRainSplashGenerator(const zeus::CVector3f& scale, u32 max
|
||||||
x48_24 = false;
|
x48_24 = false;
|
||||||
x48_25_raining = true;
|
x48_25_raining = true;
|
||||||
x0_rainSplashes.reserve(maxSplashes);
|
x0_rainSplashes.reserve(maxSplashes);
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
for (int i=0 ; i<maxSplashes ; ++i)
|
for (int i=0 ; i<maxSplashes ; ++i)
|
||||||
x0_rainSplashes.emplace_back(ctx);
|
x0_rainSplashes.emplace_back(ctx);
|
||||||
|
|
|
@ -112,7 +112,7 @@ void CTexture::BuildI4FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
||||||
|
@ -160,7 +160,7 @@ void CTexture::BuildI8FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
||||||
|
@ -209,7 +209,7 @@ void CTexture::BuildIA4FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
||||||
|
@ -258,7 +258,7 @@ void CTexture::BuildIA8FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
||||||
|
@ -366,7 +366,7 @@ void CTexture::BuildC4FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
||||||
|
@ -410,7 +410,7 @@ void CTexture::BuildC8FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
||||||
|
@ -462,7 +462,7 @@ void CTexture::BuildRGB565FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
||||||
|
@ -519,7 +519,7 @@ void CTexture::BuildRGB5A3FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
||||||
|
@ -576,7 +576,7 @@ void CTexture::BuildRGBA8FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * 4).get();
|
||||||
|
@ -640,7 +640,7 @@ void CTexture::BuildDXT1FromGCN(CInputStream& in)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::DXT1,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::DXT1,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), blockCount * 8).get();
|
boo::TextureClampMode::Repeat, buf.get(), blockCount * 8).get();
|
||||||
|
@ -656,7 +656,7 @@ void CTexture::BuildRGBA8(const void* data, size_t length)
|
||||||
Log.report(logvisor::Fatal, "insufficient TXTR length (%" PRISize "/%" PRISize ")",
|
Log.report(logvisor::Fatal, "insufficient TXTR length (%" PRISize "/%" PRISize ")",
|
||||||
length, expectedSize);
|
length, expectedSize);
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, data, expectedSize).get();
|
boo::TextureClampMode::Repeat, data, expectedSize).get();
|
||||||
|
@ -671,7 +671,7 @@ void CTexture::BuildC8(const void* data, size_t length)
|
||||||
Log.report(logvisor::Fatal, "insufficient TXTR length (%" PRISize "/%" PRISize ")",
|
Log.report(logvisor::Fatal, "insufficient TXTR length (%" PRISize "/%" PRISize ")",
|
||||||
length, texelCount);
|
length, texelCount);
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
uint32_t nentries = hecl::SBig(*reinterpret_cast<const uint32_t*>(data));
|
uint32_t nentries = hecl::SBig(*reinterpret_cast<const uint32_t*>(data));
|
||||||
const u8* paletteTexels = reinterpret_cast<const u8*>(data) + 4;
|
const u8* paletteTexels = reinterpret_cast<const u8*>(data) + 4;
|
||||||
|
@ -778,7 +778,7 @@ void CTexture::BuildC8Font(const void* data, EFontType ftype)
|
||||||
h /= 2;
|
h /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticArrayTexture(x4_w, x6_h, layerCount, x8_mips, boo::TextureFormat::RGBA8,
|
m_booTex = ctx.newStaticArrayTexture(x4_w, x6_h, layerCount, x8_mips, boo::TextureFormat::RGBA8,
|
||||||
boo::TextureClampMode::Repeat, buf.get(), texelCount * layerCount * 4).get();
|
boo::TextureClampMode::Repeat, buf.get(), texelCount * layerCount * 4).get();
|
||||||
|
@ -788,7 +788,7 @@ void CTexture::BuildC8Font(const void* data, EFontType ftype)
|
||||||
|
|
||||||
void CTexture::BuildDXT1(const void* data, size_t length)
|
void CTexture::BuildDXT1(const void* data, size_t length)
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::DXT1,
|
m_booTex = ctx.newStaticTexture(x4_w, x6_h, x8_mips, boo::TextureFormat::DXT1,
|
||||||
boo::TextureClampMode::Repeat, data, length).get();
|
boo::TextureClampMode::Repeat, data, length).get();
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace urde
|
||||||
CAABoxShader::CAABoxShader(bool zOnly)
|
CAABoxShader::CAABoxShader(bool zOnly)
|
||||||
: m_zOnly(zOnly)
|
: m_zOnly(zOnly)
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(zeus::CVector3f), 34);
|
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(zeus::CVector3f), 34);
|
||||||
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace urde
|
||||||
|
|
||||||
CCameraBlurFilter::CCameraBlurFilter()
|
CCameraBlurFilter::CCameraBlurFilter()
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 32, 4);
|
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 32, 4);
|
||||||
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace urde
|
||||||
|
|
||||||
CColoredQuadFilter::CColoredQuadFilter(EFilterType type)
|
CColoredQuadFilter::CColoredQuadFilter(EFilterType type)
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
struct Vert
|
struct Vert
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@ void CEnergyBarShader::draw(const zeus::CColor& color0, const std::vector<Vertex
|
||||||
{
|
{
|
||||||
m_maxVerts = totalVerts;
|
m_maxVerts = totalVerts;
|
||||||
m_tex = tex;
|
m_tex = tex;
|
||||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(Vertex), m_maxVerts);
|
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(Vertex), m_maxVerts);
|
||||||
for (int i=0 ; i<3 ; ++i)
|
for (int i=0 ; i<3 ; ++i)
|
||||||
|
|
|
@ -99,7 +99,7 @@ boo::ObjToken<boo::IShaderPipeline> CFluidPlaneShader::Cache::GetOrBuildShader(c
|
||||||
if (CGraphics::g_BooFactory == nullptr)
|
if (CGraphics::g_BooFactory == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
CGraphics::CommitResources(
|
CGraphicsCommitResources(
|
||||||
[&](boo::IGraphicsDataFactory::Context& ctx)
|
[&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
switch (ctx.platform())
|
switch (ctx.platform())
|
||||||
|
@ -148,7 +148,7 @@ void CFluidPlaneShader::Cache::Clear()
|
||||||
|
|
||||||
void CFluidPlaneShader::PrepareBinding(const boo::ObjToken<boo::IShaderPipeline>& pipeline, u32 maxVertCount, bool door)
|
void CFluidPlaneShader::PrepareBinding(const boo::ObjToken<boo::IShaderPipeline>& pipeline, u32 maxVertCount, bool door)
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources(
|
CGraphicsCommitResources(
|
||||||
[&](boo::IGraphicsDataFactory::Context& ctx)
|
[&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(Vertex), maxVertCount);
|
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(Vertex), maxVertCount);
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace urde
|
||||||
|
|
||||||
CFogVolumeFilter::CFogVolumeFilter()
|
CFogVolumeFilter::CFogVolumeFilter()
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
struct Vert
|
struct Vert
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace urde
|
||||||
void CFogVolumePlaneShader::CommitResources(size_t capacity)
|
void CFogVolumePlaneShader::CommitResources(size_t capacity)
|
||||||
{
|
{
|
||||||
m_vertCapacity = capacity;
|
m_vertCapacity = capacity;
|
||||||
CGraphics::CommitResources([this, capacity](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([this, capacity](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(zeus::CVector4f), capacity);
|
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(zeus::CVector4f), capacity);
|
||||||
TShader<CFogVolumePlaneShader>::BuildShaderDataBinding(ctx, *this);
|
TShader<CFogVolumePlaneShader>::BuildShaderDataBinding(ctx, *this);
|
||||||
|
|
|
@ -15,6 +15,8 @@ boo::ObjToken<boo::IShaderPipeline> CLineRendererShaders::m_texAdditiveZ;
|
||||||
boo::ObjToken<boo::IShaderPipeline> CLineRendererShaders::m_noTexAlphaZ;
|
boo::ObjToken<boo::IShaderPipeline> CLineRendererShaders::m_noTexAlphaZ;
|
||||||
boo::ObjToken<boo::IShaderPipeline> CLineRendererShaders::m_noTexAdditiveZ;
|
boo::ObjToken<boo::IShaderPipeline> CLineRendererShaders::m_noTexAdditiveZ;
|
||||||
|
|
||||||
|
boo::ObjToken<boo::IShaderPipeline> CLineRendererShaders::m_noTexAlphaZGEqual;
|
||||||
|
|
||||||
boo::ObjToken<boo::IVertexFormat> CLineRendererShaders::m_texVtxFmt;
|
boo::ObjToken<boo::IVertexFormat> CLineRendererShaders::m_texVtxFmt;
|
||||||
boo::ObjToken<boo::IVertexFormat> CLineRendererShaders::m_noTexVtxFmt;
|
boo::ObjToken<boo::IVertexFormat> CLineRendererShaders::m_noTexVtxFmt;
|
||||||
|
|
||||||
|
@ -25,8 +27,8 @@ void CLineRendererShaders::Initialize()
|
||||||
if (!CGraphics::g_BooFactory)
|
if (!CGraphics::g_BooFactory)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CGraphics::CommitResources(
|
CGraphicsCommitResources(
|
||||||
[&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
[&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
switch (ctx.platform())
|
switch (ctx.platform())
|
||||||
{
|
{
|
||||||
|
@ -67,6 +69,7 @@ void CLineRendererShaders::Shutdown()
|
||||||
m_texAdditiveZ.reset();
|
m_texAdditiveZ.reset();
|
||||||
m_noTexAlphaZ.reset();
|
m_noTexAlphaZ.reset();
|
||||||
m_noTexAdditiveZ.reset();
|
m_noTexAdditiveZ.reset();
|
||||||
|
m_noTexAlphaZGEqual.reset();
|
||||||
m_texVtxFmt.reset();
|
m_texVtxFmt.reset();
|
||||||
m_noTexVtxFmt.reset();
|
m_noTexVtxFmt.reset();
|
||||||
}
|
}
|
||||||
|
@ -74,10 +77,15 @@ void CLineRendererShaders::Shutdown()
|
||||||
void CLineRendererShaders::BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
|
void CLineRendererShaders::BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
|
||||||
CLineRenderer& renderer,
|
CLineRenderer& renderer,
|
||||||
const boo::ObjToken<boo::ITexture>& texture,
|
const boo::ObjToken<boo::ITexture>& texture,
|
||||||
bool additive, bool zTest)
|
bool additive, bool zTest, bool zGEqual)
|
||||||
{
|
{
|
||||||
boo::ObjToken<boo::IShaderPipeline> pipeline;
|
boo::ObjToken<boo::IShaderPipeline> pipeline;
|
||||||
if (zTest)
|
|
||||||
|
if (zGEqual)
|
||||||
|
{
|
||||||
|
pipeline = m_noTexAlphaZGEqual;
|
||||||
|
}
|
||||||
|
else if (zTest)
|
||||||
{
|
{
|
||||||
if (texture)
|
if (texture)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,8 @@ private:
|
||||||
static boo::ObjToken<boo::IShaderPipeline> m_noTexAlphaZ;
|
static boo::ObjToken<boo::IShaderPipeline> m_noTexAlphaZ;
|
||||||
static boo::ObjToken<boo::IShaderPipeline> m_noTexAdditiveZ;
|
static boo::ObjToken<boo::IShaderPipeline> m_noTexAdditiveZ;
|
||||||
|
|
||||||
|
static boo::ObjToken<boo::IShaderPipeline> m_noTexAlphaZGEqual;
|
||||||
|
|
||||||
static boo::ObjToken<boo::IVertexFormat> m_texVtxFmt;
|
static boo::ObjToken<boo::IVertexFormat> m_texVtxFmt;
|
||||||
static boo::ObjToken<boo::IVertexFormat> m_noTexVtxFmt;
|
static boo::ObjToken<boo::IVertexFormat> m_noTexVtxFmt;
|
||||||
|
|
||||||
|
@ -58,7 +60,8 @@ public:
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
static void Shutdown();
|
static void Shutdown();
|
||||||
static void BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, CLineRenderer& renderer,
|
static void BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, CLineRenderer& renderer,
|
||||||
const boo::ObjToken<boo::ITexture>& texture, bool additive, bool zTest);
|
const boo::ObjToken<boo::ITexture>& texture, bool additive, bool zTest,
|
||||||
|
bool zGEqual);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,11 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||||
boo::Primitive::TriStrips, boo::ZTest::LEqual,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual,
|
||||||
false, true, false, boo::CullMode::None);
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
|
m_noTexAlphaZGEqual = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 0, nullptr, 1, UniNames,
|
||||||
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
|
boo::Primitive::TriStrips, boo::ZTest::GEqual,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return new struct OGLLineDataBindingFactory;
|
return new struct OGLLineDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,6 +274,11 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||||
boo::Primitive::TriStrips, boo::ZTest::LEqual,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual,
|
||||||
false, true, false, boo::CullMode::None);
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
|
m_noTexAlphaZGEqual = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt,
|
||||||
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
|
boo::Primitive::TriStrips, boo::ZTest::GEqual,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return new struct VulkanLineDataBindingFactory;
|
return new struct VulkanLineDataBindingFactory;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -182,6 +182,12 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||||
boo::Primitive::TriStrips, boo::ZTest::LEqual,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual,
|
||||||
false, true, false, boo::CullMode::None);
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
|
m_noTexAlphaZGEqual = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||||
|
nullptr, m_noTexVtxFmt,
|
||||||
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
|
boo::Primitive::TriStrips, boo::ZTest::GEqual,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return new struct HLSLLineDataBindingFactory;
|
return new struct HLSLLineDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -190,6 +190,11 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||||
boo::Primitive::TriStrips, boo::ZTest::LEqual,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual,
|
||||||
false, true, false, boo::CullMode::None);
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
|
m_noTexAlphaZGEqual = ctx.newShaderPipeline(VS_METAL_NOTEX, FS_METAL_NOTEX, nullptr, nullptr, m_noTexVtxFmt,
|
||||||
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
|
boo::Primitive::TriStrips, boo::ZTest::GEqual,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return new struct MetalLineDataBindingFactory;
|
return new struct MetalLineDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ CMapSurfaceShader::Initialize(boo::GLDataFactory::Context& ctx)
|
||||||
const char* uniNames[] = {"MapSurfaceUniform"};
|
const char* uniNames[] = {"MapSurfaceUniform"};
|
||||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, 0, nullptr, 1, uniNames,
|
s_Pipeline = ctx.newShaderPipeline(VS, FS, 0, nullptr, 1, uniNames,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, boo::ZTest::None, false, true,
|
boo::Primitive::TriStrips, boo::ZTest::GEqual, false, true,
|
||||||
false, boo::CullMode::Backface);
|
false, boo::CullMode::Backface);
|
||||||
return new CMapSurfaceShaderGLDataBindingFactory;
|
return new CMapSurfaceShaderGLDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ CMapSurfaceShader::Initialize(boo::VulkanDataFactory::Context& ctx)
|
||||||
s_VtxFmt = ctx.newVertexFormat(1, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(1, VtxVmt);
|
||||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
||||||
boo::ZTest::None, false, true, false, boo::CullMode::Backface);
|
boo::ZTest::GEqual, false, true, false, boo::CullMode::Backface);
|
||||||
return new CMapSurfaceShaderVulkanDataBindingFactory;
|
return new CMapSurfaceShaderVulkanDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,8 @@ enum EExtendedShader : uint8_t
|
||||||
ForcedAlphaNoZWrite,
|
ForcedAlphaNoZWrite,
|
||||||
ForcedAdditiveNoZWrite,
|
ForcedAdditiveNoZWrite,
|
||||||
ForcedAlphaNoCullNoZWrite,
|
ForcedAlphaNoCullNoZWrite,
|
||||||
ForcedAdditiveNoCullNoZWrite
|
ForcedAdditiveNoCullNoZWrite,
|
||||||
|
DepthGEqualNoZWrite
|
||||||
};
|
};
|
||||||
|
|
||||||
class CModelShaders
|
class CModelShaders
|
||||||
|
|
|
@ -295,6 +295,12 @@ CModelShaders::GetShaderExtensionsGLSL(boo::IGraphicsDataFactory::Platform plat)
|
||||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
||||||
hecl::Backend::CullMode::None, true, false, true);
|
hecl::Backend::CullMode::None, true, false, true);
|
||||||
|
|
||||||
|
/* Depth GEqual no Z-write */
|
||||||
|
ext.registerExtensionSlot({LightingGLSL, "LightingFunc"}, {MainPostGLSL, "MainPostFunc"},
|
||||||
|
3, BlockNames, 0, nullptr, hecl::Backend::BlendFactor::Original,
|
||||||
|
hecl::Backend::BlendFactor::Original, hecl::Backend::ZTest::GEqual,
|
||||||
|
hecl::Backend::CullMode::Backface, true, false, true);
|
||||||
|
|
||||||
return ext;
|
return ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -275,6 +275,12 @@ CModelShaders::GetShaderExtensionsHLSL(boo::IGraphicsDataFactory::Platform plat)
|
||||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
||||||
hecl::Backend::CullMode::None, true, false, true);
|
hecl::Backend::CullMode::None, true, false, true);
|
||||||
|
|
||||||
|
/* Depth GEqual no Z-write */
|
||||||
|
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
|
||||||
|
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::Original,
|
||||||
|
hecl::Backend::BlendFactor::Original, hecl::Backend::ZTest::GEqual,
|
||||||
|
hecl::Backend::CullMode::Backface, true, false, true);
|
||||||
|
|
||||||
return ext;
|
return ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -285,6 +285,12 @@ CModelShaders::GetShaderExtensionsMetal(boo::IGraphicsDataFactory::Platform plat
|
||||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
||||||
hecl::Backend::CullMode::None, true, false, true);
|
hecl::Backend::CullMode::None, true, false, true);
|
||||||
|
|
||||||
|
/* Depth GEqual no Z-write */
|
||||||
|
ext.registerExtensionSlot({LightingMetal, "LightingFunc"}, {MainPostMetal, "MainPostFunc"},
|
||||||
|
1, BlockNames, 0, nullptr, hecl::Backend::BlendFactor::Original,
|
||||||
|
hecl::Backend::BlendFactor::Original, hecl::Backend::ZTest::GEqual,
|
||||||
|
hecl::Backend::CullMode::Backface, true, false, true);
|
||||||
|
|
||||||
return ext;
|
return ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ void CPhazonSuitFilter::drawBlurPasses(float radius, const CTexture* indTex)
|
||||||
if (!m_dataBind || indTex != m_indTex)
|
if (!m_dataBind || indTex != m_indTex)
|
||||||
{
|
{
|
||||||
m_indTex = indTex;
|
m_indTex = indTex;
|
||||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_uniBufBlurX = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(zeus::CVector4f), 1);
|
m_uniBufBlurX = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(zeus::CVector4f), 1);
|
||||||
m_uniBufBlurY = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(zeus::CVector4f), 1);
|
m_uniBufBlurY = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(zeus::CVector4f), 1);
|
||||||
|
|
|
@ -12,7 +12,7 @@ void CRadarPaintShader::draw(const std::vector<Instance>& instances, const CText
|
||||||
{
|
{
|
||||||
m_maxInsts = instances.size();
|
m_maxInsts = instances.size();
|
||||||
m_tex = tex;
|
m_tex = tex;
|
||||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(Instance), m_maxInsts);
|
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(Instance), m_maxInsts);
|
||||||
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(zeus::CMatrix4f), 1);
|
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(zeus::CMatrix4f), 1);
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace urde
|
||||||
CRandomStaticFilter::CRandomStaticFilter(EFilterType type, bool cookieCutter)
|
CRandomStaticFilter::CRandomStaticFilter(EFilterType type, bool cookieCutter)
|
||||||
: m_cookieCutter(cookieCutter)
|
: m_cookieCutter(cookieCutter)
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
struct Vert
|
struct Vert
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace urde
|
||||||
CScanLinesFilter::CScanLinesFilter(EFilterType type, bool even)
|
CScanLinesFilter::CScanLinesFilter(EFilterType type, bool even)
|
||||||
: m_even(even)
|
: m_even(even)
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
||||||
m_dataBind = TMultiBlendShader<CScanLinesFilter>::BuildShaderDataBinding(ctx, type, *this);
|
m_dataBind = TMultiBlendShader<CScanLinesFilter>::BuildShaderDataBinding(ctx, type, *this);
|
||||||
|
|
|
@ -33,7 +33,7 @@ void CSpaceWarpFilter::GenerateWarpRampTex(boo::IGraphicsDataFactory::Context& c
|
||||||
|
|
||||||
CSpaceWarpFilter::CSpaceWarpFilter()
|
CSpaceWarpFilter::CSpaceWarpFilter()
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
GenerateWarpRampTex(ctx);
|
GenerateWarpRampTex(ctx);
|
||||||
struct Vert
|
struct Vert
|
||||||
|
|
|
@ -15,7 +15,7 @@ CTexturedQuadFilter::CTexturedQuadFilter(EFilterType type, const boo::ObjToken<b
|
||||||
{
|
{
|
||||||
m_flipRect = CGraphics::g_BooFactory->platform() == boo::IGraphicsDataFactory::Platform::Vulkan;
|
m_flipRect = CGraphics::g_BooFactory->platform() == boo::IGraphicsDataFactory::Platform::Vulkan;
|
||||||
tex->setClampMode(boo::TextureClampMode::ClampToEdge);
|
tex->setClampMode(boo::TextureClampMode::ClampToEdge);
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 32, 16);
|
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 32, 16);
|
||||||
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
||||||
|
@ -157,7 +157,7 @@ URDE_SPECIALIZE_MULTI_BLEND_SHADER(CTexturedQuadFilter)
|
||||||
CTexturedQuadFilterAlpha::CTexturedQuadFilterAlpha(EFilterType type, const boo::ObjToken<boo::ITexture>& tex)
|
CTexturedQuadFilterAlpha::CTexturedQuadFilterAlpha(EFilterType type, const boo::ObjToken<boo::ITexture>& tex)
|
||||||
: CTexturedQuadFilter(tex)
|
: CTexturedQuadFilter(tex)
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 32, 4);
|
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 32, 4);
|
||||||
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace urde
|
||||||
|
|
||||||
CThermalColdFilter::CThermalColdFilter()
|
CThermalColdFilter::CThermalColdFilter()
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_shiftTex = ctx.newDynamicTexture(8, 4, boo::TextureFormat::RGBA8, boo::TextureClampMode::Repeat);
|
m_shiftTex = ctx.newDynamicTexture(8, 4, boo::TextureFormat::RGBA8, boo::TextureClampMode::Repeat);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace urde
|
||||||
|
|
||||||
CThermalHotFilter::CThermalHotFilter()
|
CThermalHotFilter::CThermalHotFilter()
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
struct Vert
|
struct Vert
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace urde
|
||||||
CWorldShadowShader::CWorldShadowShader(u32 w, u32 h)
|
CWorldShadowShader::CWorldShadowShader(u32 w, u32 h)
|
||||||
: m_w(w), m_h(h)
|
: m_w(w), m_h(h)
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 16, 4);
|
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 16, 4);
|
||||||
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace urde
|
||||||
CXRayBlurFilter::CXRayBlurFilter(TLockedToken<CTexture>& tex)
|
CXRayBlurFilter::CXRayBlurFilter(TLockedToken<CTexture>& tex)
|
||||||
: m_paletteTex(tex), m_booTex(tex->GetPaletteTexture())
|
: m_paletteTex(tex), m_booTex(tex->GetPaletteTexture())
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
struct Vert
|
struct Vert
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,8 +29,8 @@ public:
|
||||||
if (!CGraphics::g_BooFactory)
|
if (!CGraphics::g_BooFactory)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CGraphics::CommitResources(
|
CGraphicsCommitResources(
|
||||||
[&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
[&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
switch (ctx.platform())
|
switch (ctx.platform())
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,8 +28,8 @@ public:
|
||||||
if (!CGraphics::g_BooFactory)
|
if (!CGraphics::g_BooFactory)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CGraphics::CommitResources(
|
CGraphicsCommitResources(
|
||||||
[&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
[&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
switch (ctx.platform())
|
switch (ctx.platform())
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ CCompoundTargetReticle::CCompoundTargetReticle(const CStateManager& mgr)
|
||||||
|
|
||||||
CCompoundTargetReticle::SScanReticuleRenderer::SScanReticuleRenderer()
|
CCompoundTargetReticle::SScanReticuleRenderer::SScanReticuleRenderer()
|
||||||
{
|
{
|
||||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
for (int i=0 ; i<2 ; ++i)
|
for (int i=0 ; i<2 ; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,7 +54,7 @@ void CTextRenderBuffer::CommitResources()
|
||||||
for (BooFontCharacters& chs : m_fontCharacters)
|
for (BooFontCharacters& chs : m_fontCharacters)
|
||||||
chs.m_font->GetTexture();
|
chs.m_font->GetTexture();
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_uniBuf = CTextSupportShader::s_Uniforms.allocateBlock(CGraphics::g_BooFactory);
|
m_uniBuf = CTextSupportShader::s_Uniforms.allocateBlock(CGraphics::g_BooFactory);
|
||||||
auto uBufInfo = m_uniBuf.getBufferInfo();
|
auto uBufInfo = m_uniBuf.getBufferInfo();
|
||||||
|
|
|
@ -20,6 +20,7 @@ public:
|
||||||
return;
|
return;
|
||||||
x0_rumbleGenerator.Stop(id, EIOPort::Zero);
|
x0_rumbleGenerator.Stop(id, EIOPort::Zero);
|
||||||
}
|
}
|
||||||
|
void HardStopAll() { x0_rumbleGenerator.HardStopAll(); }
|
||||||
s16 Rumble(CStateManager& mgr, const zeus::CVector3f& pos, ERumbleFxId fx, float dist, ERumblePriority priority);
|
s16 Rumble(CStateManager& mgr, const zeus::CVector3f& pos, ERumbleFxId fx, float dist, ERumblePriority priority);
|
||||||
s16 Rumble(CStateManager& mgr, ERumbleFxId fx, float gain, ERumblePriority priority);
|
s16 Rumble(CStateManager& mgr, ERumbleFxId fx, float gain, ERumblePriority priority);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2006,7 +2006,7 @@ CFrontEndUI::CFrontEndUI()
|
||||||
|
|
||||||
m->ResetGameState();
|
m->ResetGameState();
|
||||||
g_GameState->SetCurrentWorldId(g_ResFactory->TranslateOriginalToNew(g_DefaultWorldTag.id));
|
g_GameState->SetCurrentWorldId(g_ResFactory->TranslateOriginalToNew(g_DefaultWorldTag.id));
|
||||||
g_GameState->CurrentWorldState().SetAreaId(0);
|
g_GameState->CurrentWorldState().SetAreaId(1);
|
||||||
g_GameState->GameOptions().ResetToDefaults();
|
g_GameState->GameOptions().ResetToDefaults();
|
||||||
g_GameState->WriteBackupBuf();
|
g_GameState->WriteBackupBuf();
|
||||||
|
|
||||||
|
|
|
@ -319,6 +319,8 @@ CMFGameLoader::CMFGameLoader() : CMFGameLoaderBase("CMFGameLoader")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CMFGameLoader::~CMFGameLoader() {}
|
||||||
|
|
||||||
static const char* LoadDepPAKs[] =
|
static const char* LoadDepPAKs[] =
|
||||||
{
|
{
|
||||||
"TestAnim",
|
"TestAnim",
|
||||||
|
|
|
@ -83,6 +83,7 @@ class CMFGameLoader : public CMFGameLoaderBase
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMFGameLoader();
|
CMFGameLoader();
|
||||||
|
~CMFGameLoader();
|
||||||
EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue);
|
EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue);
|
||||||
void Draw() const;
|
void Draw() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -785,6 +785,7 @@ void CMain::Shutdown()
|
||||||
CNESShader::Shutdown();
|
CNESShader::Shutdown();
|
||||||
CGraphics::ShutdownBoo();
|
CGraphics::ShutdownBoo();
|
||||||
ShutdownDiscord();
|
ShutdownDiscord();
|
||||||
|
CBooModel::AssertAllFreed();
|
||||||
}
|
}
|
||||||
|
|
||||||
boo::IWindow* CMain::GetMainWindow() const
|
boo::IWindow* CMain::GetMainWindow() const
|
||||||
|
|
|
@ -29,8 +29,9 @@ class CCEConstant : public CColorElement
|
||||||
std::unique_ptr<CRealElement> xc_c;
|
std::unique_ptr<CRealElement> xc_c;
|
||||||
std::unique_ptr<CRealElement> x10_d;
|
std::unique_ptr<CRealElement> x10_d;
|
||||||
public:
|
public:
|
||||||
CCEConstant(CRealElement* a, CRealElement* b, CRealElement* c, CRealElement* d)
|
CCEConstant(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_a(a), x8_b(b), xc_c(c), x10_d(d) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d)
|
||||||
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_c(std::move(c)), x10_d(std::move(d)) {}
|
||||||
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,8 +50,9 @@ class CCETimeChain : public CColorElement
|
||||||
std::unique_ptr<CColorElement> x8_b;
|
std::unique_ptr<CColorElement> x8_b;
|
||||||
std::unique_ptr<CIntElement> xc_swFrame;
|
std::unique_ptr<CIntElement> xc_swFrame;
|
||||||
public:
|
public:
|
||||||
CCETimeChain(CColorElement* a, CColorElement* b, CIntElement* c)
|
CCETimeChain(std::unique_ptr<CColorElement>&& a, std::unique_ptr<CColorElement>&& b,
|
||||||
: x4_a(a), x8_b(b), xc_swFrame(c) {}
|
std::unique_ptr<CIntElement>&& c)
|
||||||
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {}
|
||||||
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,8 +63,9 @@ class CCEFadeEnd : public CColorElement
|
||||||
std::unique_ptr<CRealElement> xc_startFrame;
|
std::unique_ptr<CRealElement> xc_startFrame;
|
||||||
std::unique_ptr<CRealElement> x10_endFrame;
|
std::unique_ptr<CRealElement> x10_endFrame;
|
||||||
public:
|
public:
|
||||||
CCEFadeEnd(CColorElement* a, CColorElement* b, CRealElement* c, CRealElement* d)
|
CCEFadeEnd(std::unique_ptr<CColorElement>&& a, std::unique_ptr<CColorElement>&& b,
|
||||||
: x4_a(a), x8_b(b), xc_startFrame(c), x10_endFrame(d) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d)
|
||||||
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_startFrame(std::move(c)), x10_endFrame(std::move(d)) {}
|
||||||
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,8 +75,9 @@ class CCEFade : public CColorElement
|
||||||
std::unique_ptr<CColorElement> x8_b;
|
std::unique_ptr<CColorElement> x8_b;
|
||||||
std::unique_ptr<CRealElement> xc_endFrame;
|
std::unique_ptr<CRealElement> xc_endFrame;
|
||||||
public:
|
public:
|
||||||
CCEFade(CColorElement* a, CColorElement* b, CRealElement* c)
|
CCEFade(std::unique_ptr<CColorElement>&& a, std::unique_ptr<CColorElement>&& b,
|
||||||
: x4_a(a), x8_b(b), xc_endFrame(c) {}
|
std::unique_ptr<CRealElement>&& c)
|
||||||
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_endFrame(std::move(c)) {}
|
||||||
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,8 +88,9 @@ class CCEPulse : public CColorElement
|
||||||
std::unique_ptr<CColorElement> xc_aVal;
|
std::unique_ptr<CColorElement> xc_aVal;
|
||||||
std::unique_ptr<CColorElement> x10_bVal;
|
std::unique_ptr<CColorElement> x10_bVal;
|
||||||
public:
|
public:
|
||||||
CCEPulse(CIntElement* a, CIntElement* b, CColorElement* c, CColorElement* d)
|
CCEPulse(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b,
|
||||||
: x4_aDuration(a), x8_bDuration(b), xc_aVal(c), x10_bVal(d) {}
|
std::unique_ptr<CColorElement>&& c, std::unique_ptr<CColorElement>&& d)
|
||||||
|
: x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_aVal(std::move(c)), x10_bVal(std::move(d)) {}
|
||||||
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
bool GetValue(int frame, zeus::CColor& colorOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ CDecal::CDecal(const TToken<CDecalDescription>& desc, const zeus::CTransform& xf
|
||||||
else
|
else
|
||||||
x5c_29_modelInvalid = true;
|
x5c_29_modelInvalid = true;
|
||||||
|
|
||||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
CGraphicsCommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
for (int i=0 ; i<2 ; ++i)
|
for (int i=0 ; i<2 ; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,19 +67,19 @@ bool CDecalDataFactory::CreateDPSM(CDecalDescription* desc, CInputStream& in, CS
|
||||||
desc->x38_DMDL = CPF::GetModel(in, resPool);
|
desc->x38_DMDL = CPF::GetModel(in, resPool);
|
||||||
break;
|
break;
|
||||||
case SBIG('DLFT'):
|
case SBIG('DLFT'):
|
||||||
desc->x48_DLFT.reset(CPF::GetIntElement(in));
|
desc->x48_DLFT = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('DMOP'):
|
case SBIG('DMOP'):
|
||||||
desc->x4c_DMOP.reset(CPF::GetVectorElement(in));
|
desc->x4c_DMOP = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('DMRT'):
|
case SBIG('DMRT'):
|
||||||
desc->x50_DMRT.reset(CPF::GetVectorElement(in));
|
desc->x50_DMRT = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('DMSC'):
|
case SBIG('DMSC'):
|
||||||
desc->x54_DMSC.reset(CPF::GetVectorElement(in));
|
desc->x54_DMSC = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('DMCL'):
|
case SBIG('DMCL'):
|
||||||
desc->x58_DMCL.reset(CPF::GetColorElement(in));
|
desc->x58_DMCL = CPF::GetColorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('DMAB'):
|
case SBIG('DMAB'):
|
||||||
desc->x5c_24_DMAB = CPF::GetBool(in);
|
desc->x5c_24_DMAB = CPF::GetBool(in);
|
||||||
|
@ -106,27 +106,27 @@ void CDecalDataFactory::GetQuadDecalInfo(CInputStream& in, CSimplePool* resPool,
|
||||||
{
|
{
|
||||||
case SBIG('1LFT'):
|
case SBIG('1LFT'):
|
||||||
case SBIG('2LFT'):
|
case SBIG('2LFT'):
|
||||||
quad.x0_LFT.reset(CPF::GetIntElement(in));
|
quad.x0_LFT = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('1SZE'):
|
case SBIG('1SZE'):
|
||||||
case SBIG('2SZE'):
|
case SBIG('2SZE'):
|
||||||
quad.x4_SZE.reset(CPF::GetRealElement(in));
|
quad.x4_SZE = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('1ROT'):
|
case SBIG('1ROT'):
|
||||||
case SBIG('2ROT'):
|
case SBIG('2ROT'):
|
||||||
quad.x8_ROT.reset(CPF::GetRealElement(in));
|
quad.x8_ROT = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('1OFF'):
|
case SBIG('1OFF'):
|
||||||
case SBIG('2OFF'):
|
case SBIG('2OFF'):
|
||||||
quad.xc_OFF.reset(CPF::GetVectorElement(in));
|
quad.xc_OFF = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('1CLR'):
|
case SBIG('1CLR'):
|
||||||
case SBIG('2CLR'):
|
case SBIG('2CLR'):
|
||||||
quad.x10_CLR.reset(CPF::GetColorElement(in));
|
quad.x10_CLR = CPF::GetColorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('1TEX'):
|
case SBIG('1TEX'):
|
||||||
case SBIG('2TEX'):
|
case SBIG('2TEX'):
|
||||||
quad.x14_TEX.reset(CPF::GetTextureElement(in, resPool));
|
quad.x14_TEX = CPF::GetTextureElement(in, resPool);
|
||||||
break;
|
break;
|
||||||
case SBIG('1ADD'):
|
case SBIG('1ADD'):
|
||||||
case SBIG('2ADD'):
|
case SBIG('2ADD'):
|
||||||
|
|
|
@ -234,7 +234,7 @@ CElementGen::CElementGen(const TToken<CGenDescription>& gen,
|
||||||
size_t maxInsts = x26c_30_MBLR ? (m_maxMBSP * x90_MAXP) : x90_MAXP;
|
size_t maxInsts = x26c_30_MBLR ? (m_maxMBSP * x90_MAXP) : x90_MAXP;
|
||||||
maxInsts = (maxInsts == 0 ? 256 : maxInsts);
|
maxInsts = (maxInsts == 0 ? 256 : maxInsts);
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
if (!x26c_31_LINE)
|
if (!x26c_31_LINE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,8 +13,8 @@ class CEESimpleEmitter : public CEmitterElement
|
||||||
std::unique_ptr<CVectorElement> x4_loc;
|
std::unique_ptr<CVectorElement> x4_loc;
|
||||||
std::unique_ptr<CVectorElement> x8_vec;
|
std::unique_ptr<CVectorElement> x8_vec;
|
||||||
public:
|
public:
|
||||||
CEESimpleEmitter(CVectorElement* a, CVectorElement* b)
|
CEESimpleEmitter(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b)
|
||||||
: x4_loc(a), x8_vec(b) {}
|
: x4_loc(std::move(a)), x8_vec(std::move(b)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const;
|
bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,8 +24,9 @@ class CVESphere : public CEmitterElement
|
||||||
std::unique_ptr<CRealElement> x8_sphereRadius;
|
std::unique_ptr<CRealElement> x8_sphereRadius;
|
||||||
std::unique_ptr<CRealElement> xc_velocityMag;
|
std::unique_ptr<CRealElement> xc_velocityMag;
|
||||||
public:
|
public:
|
||||||
CVESphere(CVectorElement* a, CRealElement* b, CRealElement* c)
|
CVESphere(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_sphereOrigin(a), x8_sphereRadius(b), xc_velocityMag(c) {}
|
std::unique_ptr<CRealElement>&& c)
|
||||||
|
: x4_sphereOrigin(std::move(a)), x8_sphereRadius(std::move(b)), xc_velocityMag(std::move(c)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const;
|
bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,9 +40,13 @@ class CVEAngleSphere : public CEmitterElement
|
||||||
std::unique_ptr<CRealElement> x18_angleXRange;
|
std::unique_ptr<CRealElement> x18_angleXRange;
|
||||||
std::unique_ptr<CRealElement> x1c_angleYRange;
|
std::unique_ptr<CRealElement> x1c_angleYRange;
|
||||||
public:
|
public:
|
||||||
CVEAngleSphere(CVectorElement* a, CRealElement* b, CRealElement* c, CRealElement* d,
|
CVEAngleSphere(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
CRealElement* e, CRealElement* f, CRealElement* g)
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d,
|
||||||
: x4_sphereOrigin(a), x8_sphereRadius(b), xc_velocityMag(c), x10_angleXBias(d), x14_angleYBias(e), x18_angleXRange(f), x1c_angleYRange(g) {}
|
std::unique_ptr<CRealElement>&& e, std::unique_ptr<CRealElement>&& f,
|
||||||
|
std::unique_ptr<CRealElement>&& g)
|
||||||
|
: x4_sphereOrigin(std::move(a)), x8_sphereRadius(std::move(b)), xc_velocityMag(std::move(c)),
|
||||||
|
x10_angleXBias(std::move(d)), x14_angleYBias(std::move(e)), x18_angleXRange(std::move(f)),
|
||||||
|
x1c_angleYRange(std::move(g)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const;
|
bool GetValue(int frame, zeus::CVector3f& pPos, zeus::CVector3f& pVel) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ class CIEDeath : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x4_a;
|
std::unique_ptr<CIntElement> x4_a;
|
||||||
std::unique_ptr<CIntElement> x8_b;
|
std::unique_ptr<CIntElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CIEDeath(CIntElement* a, CIntElement* b)
|
CIEDeath(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ class CIEClamp : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x8_max;
|
std::unique_ptr<CIntElement> x8_max;
|
||||||
std::unique_ptr<CIntElement> xc_val;
|
std::unique_ptr<CIntElement> xc_val;
|
||||||
public:
|
public:
|
||||||
CIEClamp(CIntElement* a, CIntElement* b, CIntElement* c)
|
CIEClamp(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b, std::unique_ptr<CIntElement>&& c)
|
||||||
: x4_min(a), x8_max(b), xc_val(c) {}
|
: x4_min(std::move(a)), x8_max(std::move(b)), xc_val(std::move(c)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@ class CIETimeChain : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x8_b;
|
std::unique_ptr<CIntElement> x8_b;
|
||||||
std::unique_ptr<CIntElement> xc_swFrame;
|
std::unique_ptr<CIntElement> xc_swFrame;
|
||||||
public:
|
public:
|
||||||
CIETimeChain(CIntElement* a, CIntElement* b, CIntElement* c)
|
CIETimeChain(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b, std::unique_ptr<CIntElement>&& c)
|
||||||
: x4_a(a), x8_b(b), xc_swFrame(c) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,8 +59,8 @@ class CIEAdd : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x4_a;
|
std::unique_ptr<CIntElement> x4_a;
|
||||||
std::unique_ptr<CIntElement> x8_b;
|
std::unique_ptr<CIntElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CIEAdd(CIntElement* a, CIntElement* b)
|
CIEAdd(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@ class CIEImpulse : public CIntElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CIntElement> x4_a;
|
std::unique_ptr<CIntElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CIEImpulse(CIntElement* a)
|
CIEImpulse(std::unique_ptr<CIntElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -85,8 +85,8 @@ class CIELifetimePercent : public CIntElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CIntElement> x4_percentVal;
|
std::unique_ptr<CIntElement> x4_percentVal;
|
||||||
public:
|
public:
|
||||||
CIELifetimePercent(CIntElement* a)
|
CIELifetimePercent(std::unique_ptr<CIntElement>&& a)
|
||||||
: x4_percentVal(a) {}
|
: x4_percentVal(std::move(a)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -95,8 +95,8 @@ class CIEInitialRandom : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x4_a;
|
std::unique_ptr<CIntElement> x4_a;
|
||||||
std::unique_ptr<CIntElement> x8_b;
|
std::unique_ptr<CIntElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CIEInitialRandom(CIntElement* a, CIntElement* b)
|
CIEInitialRandom(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -107,8 +107,9 @@ class CIEPulse : public CIntElement
|
||||||
std::unique_ptr<CIntElement> xc_aVal;
|
std::unique_ptr<CIntElement> xc_aVal;
|
||||||
std::unique_ptr<CIntElement> x10_bVal;
|
std::unique_ptr<CIntElement> x10_bVal;
|
||||||
public:
|
public:
|
||||||
CIEPulse(CIntElement* a, CIntElement* b, CIntElement* c, CIntElement* d)
|
CIEPulse(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b,
|
||||||
: x4_aDuration(a), x8_bDuration(b), xc_aVal(c), x10_bVal(d) {}
|
std::unique_ptr<CIntElement>&& c, std::unique_ptr<CIntElement>&& d)
|
||||||
|
: x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_aVal(std::move(c)), x10_bVal(std::move(d)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -117,8 +118,8 @@ class CIEMultiply : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x4_a;
|
std::unique_ptr<CIntElement> x4_a;
|
||||||
std::unique_ptr<CIntElement> x8_b;
|
std::unique_ptr<CIntElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CIEMultiply(CIntElement* a, CIntElement* b)
|
CIEMultiply(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -130,8 +131,9 @@ class CIESampleAndHold : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x10_waitFramesMax;
|
std::unique_ptr<CIntElement> x10_waitFramesMax;
|
||||||
int x14_holdVal;
|
int x14_holdVal;
|
||||||
public:
|
public:
|
||||||
CIESampleAndHold(CIntElement* a, CIntElement* b, CIntElement* c)
|
CIESampleAndHold(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b,
|
||||||
: x4_sampleSource(a), xc_waitFramesMin(b), x10_waitFramesMax(c) {}
|
std::unique_ptr<CIntElement>&& c)
|
||||||
|
: x4_sampleSource(std::move(a)), xc_waitFramesMin(std::move(b)), x10_waitFramesMax(std::move(c)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -140,8 +142,8 @@ class CIERandom : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x4_min;
|
std::unique_ptr<CIntElement> x4_min;
|
||||||
std::unique_ptr<CIntElement> x8_max;
|
std::unique_ptr<CIntElement> x8_max;
|
||||||
public:
|
public:
|
||||||
CIERandom(CIntElement* a, CIntElement* b)
|
CIERandom(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b)
|
||||||
: x4_min(a), x8_max(b) {}
|
: x4_min(std::move(a)), x8_max(std::move(b)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -149,8 +151,8 @@ class CIETimeScale : public CIntElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CRealElement> x4_a;
|
std::unique_ptr<CRealElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CIETimeScale(CRealElement* a)
|
CIETimeScale(std::unique_ptr<CRealElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -177,8 +179,8 @@ class CIEModulo : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x4_a;
|
std::unique_ptr<CIntElement> x4_a;
|
||||||
std::unique_ptr<CIntElement> x8_b;
|
std::unique_ptr<CIntElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CIEModulo(CIntElement* a, CIntElement* b)
|
CIEModulo(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -187,8 +189,8 @@ class CIESubtract : public CIntElement
|
||||||
std::unique_ptr<CIntElement> x4_a;
|
std::unique_ptr<CIntElement> x4_a;
|
||||||
std::unique_ptr<CIntElement> x8_b;
|
std::unique_ptr<CIntElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CIESubtract(CIntElement* a, CIntElement* b)
|
CIESubtract(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, int& valOut) const;
|
bool GetValue(int frame, int& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -99,8 +99,10 @@ bool CMVETimeChain::GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f&
|
||||||
return x4_a->GetValue(frame, pVel, pPos);
|
return x4_a->GetValue(frame, pVel, pPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
CMVEBounce::CMVEBounce(CVectorElement* a, CVectorElement* b, CRealElement* c, CRealElement* d, bool f)
|
CMVEBounce::CMVEBounce(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||||
: x4_planePoint(a), x8_planeNormal(b), xc_friction(c), x10_restitution(d), x14_planePrecomputed(false), x15_dieOnPenetrate(f), x24_planeD(0.0)
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e)
|
||||||
|
: x4_planePoint(std::move(a)), x8_planeNormal(std::move(b)), xc_friction(std::move(c)),
|
||||||
|
x10_restitution(std::move(d)), x14_planePrecomputed(false), x15_dieOnPenetrate(e), x24_planeD(0.0)
|
||||||
{
|
{
|
||||||
if (x4_planePoint && x8_planeNormal && x4_planePoint->IsFastConstant() && x8_planeNormal->IsFastConstant())
|
if (x4_planePoint && x8_planeNormal && x4_planePoint->IsFastConstant() && x8_planeNormal->IsFastConstant())
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,8 +16,10 @@ class CMVEImplosion : public CModVectorElement
|
||||||
std::unique_ptr<CRealElement> x10_minMag;
|
std::unique_ptr<CRealElement> x10_minMag;
|
||||||
bool x14_enableMinMag;
|
bool x14_enableMinMag;
|
||||||
public:
|
public:
|
||||||
CMVEImplosion(CVectorElement* a, CRealElement* b, CRealElement* c, CRealElement* d, bool e)
|
CMVEImplosion(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_implPoint(a), x8_magScale(b), xc_maxMag(c), x10_minMag(d), x14_enableMinMag(e) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e)
|
||||||
|
: x4_implPoint(std::move(a)), x8_magScale(std::move(b)), xc_maxMag(std::move(c)), x10_minMag(std::move(d)),
|
||||||
|
x14_enableMinMag(std::move(e)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,8 +31,10 @@ class CMVEExponentialImplosion : public CModVectorElement
|
||||||
std::unique_ptr<CRealElement> x10_minMag;
|
std::unique_ptr<CRealElement> x10_minMag;
|
||||||
bool x14_enableMinMag;
|
bool x14_enableMinMag;
|
||||||
public:
|
public:
|
||||||
CMVEExponentialImplosion(CVectorElement* a, CRealElement* b, CRealElement* c, CRealElement* d, bool e)
|
CMVEExponentialImplosion(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_implPoint(a), x8_magScale(b), xc_maxMag(c), x10_minMag(d), x14_enableMinMag(e) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e)
|
||||||
|
: x4_implPoint(std::move(a)), x8_magScale(std::move(b)), xc_maxMag(std::move(c)), x10_minMag(std::move(d)),
|
||||||
|
x14_enableMinMag(std::move(e)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -42,8 +46,10 @@ class CMVELinearImplosion : public CModVectorElement
|
||||||
std::unique_ptr<CRealElement> x10_minMag;
|
std::unique_ptr<CRealElement> x10_minMag;
|
||||||
bool x14_enableMinMag;
|
bool x14_enableMinMag;
|
||||||
public:
|
public:
|
||||||
CMVELinearImplosion(CVectorElement* a, CRealElement* b, CRealElement* c, CRealElement* d, bool e)
|
CMVELinearImplosion(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_implPoint(a), x8_magScale(b), xc_maxMag(c), x10_minMag(d), x14_enableMinMag(e) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e)
|
||||||
|
: x4_implPoint(std::move(a)), x8_magScale(std::move(b)), xc_maxMag(std::move(c)), x10_minMag(std::move(d)),
|
||||||
|
x14_enableMinMag(std::move(e)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,8 +59,9 @@ class CMVETimeChain : public CModVectorElement
|
||||||
std::unique_ptr<CModVectorElement> x8_b;
|
std::unique_ptr<CModVectorElement> x8_b;
|
||||||
std::unique_ptr<CIntElement> xc_swFrame;
|
std::unique_ptr<CIntElement> xc_swFrame;
|
||||||
public:
|
public:
|
||||||
CMVETimeChain(CModVectorElement* a, CModVectorElement* b, CIntElement* c)
|
CMVETimeChain(std::unique_ptr<CModVectorElement>&& a, std::unique_ptr<CModVectorElement>&& b,
|
||||||
: x4_a(a), x8_b(b), xc_swFrame(c) {}
|
std::unique_ptr<CIntElement>&& c)
|
||||||
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,7 +76,8 @@ class CMVEBounce : public CModVectorElement
|
||||||
zeus::CVector3f x18_planeValidatedNormal;
|
zeus::CVector3f x18_planeValidatedNormal;
|
||||||
float x24_planeD;
|
float x24_planeD;
|
||||||
public:
|
public:
|
||||||
CMVEBounce(CVectorElement* a, CVectorElement* b, CRealElement* c, CRealElement* d, bool e);
|
CMVEBounce(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||||
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d, bool e);
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,8 +87,9 @@ class CMVEConstant : public CModVectorElement
|
||||||
std::unique_ptr<CRealElement> x8_y;
|
std::unique_ptr<CRealElement> x8_y;
|
||||||
std::unique_ptr<CRealElement> xc_z;
|
std::unique_ptr<CRealElement> xc_z;
|
||||||
public:
|
public:
|
||||||
CMVEConstant(CRealElement* a, CRealElement* b, CRealElement* c)
|
CMVEConstant(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_x(a), x8_y(b), xc_z(c) {}
|
std::unique_ptr<CRealElement>&& c)
|
||||||
|
: x4_x(std::move(a)), x8_y(std::move(b)), xc_z(std::move(c)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -97,8 +106,8 @@ class CMVEGravity : public CModVectorElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CMVEGravity(CVectorElement* a)
|
CMVEGravity(std::unique_ptr<CVectorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -107,8 +116,8 @@ class CMVEExplode : public CModVectorElement
|
||||||
std::unique_ptr<CRealElement> x4_a;
|
std::unique_ptr<CRealElement> x4_a;
|
||||||
std::unique_ptr<CRealElement> x8_b;
|
std::unique_ptr<CRealElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CMVEExplode(CRealElement* a, CRealElement* b)
|
CMVEExplode(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,8 +125,8 @@ class CMVESetPosition : public CModVectorElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CMVESetPosition(CVectorElement* a)
|
CMVESetPosition(std::unique_ptr<CVectorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -128,8 +137,9 @@ class CMVEPulse : public CModVectorElement
|
||||||
std::unique_ptr<CModVectorElement> xc_aVal;
|
std::unique_ptr<CModVectorElement> xc_aVal;
|
||||||
std::unique_ptr<CModVectorElement> x10_bVal;
|
std::unique_ptr<CModVectorElement> x10_bVal;
|
||||||
public:
|
public:
|
||||||
CMVEPulse(CIntElement* a, CIntElement* b, CModVectorElement* c, CModVectorElement* d)
|
CMVEPulse(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b,
|
||||||
: x4_aDuration(a), x8_bDuration(b), xc_aVal(c), x10_bVal(d) {}
|
std::unique_ptr<CModVectorElement>&& c, std::unique_ptr<CModVectorElement>&& d)
|
||||||
|
: x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_aVal(std::move(c)), x10_bVal(std::move(d)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -138,8 +148,8 @@ class CMVEWind : public CModVectorElement
|
||||||
std::unique_ptr<CVectorElement> x4_velocity;
|
std::unique_ptr<CVectorElement> x4_velocity;
|
||||||
std::unique_ptr<CRealElement> x8_factor;
|
std::unique_ptr<CRealElement> x8_factor;
|
||||||
public:
|
public:
|
||||||
CMVEWind(CVectorElement* a, CRealElement* b)
|
CMVEWind(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_velocity(a), x8_factor(b) {}
|
: x4_velocity(std::move(a)), x8_factor(std::move(b)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -150,8 +160,10 @@ class CMVESwirl : public CModVectorElement
|
||||||
std::unique_ptr<CRealElement> xc_targetRadius;
|
std::unique_ptr<CRealElement> xc_targetRadius;
|
||||||
std::unique_ptr<CRealElement> x10_tangentialVelocity;
|
std::unique_ptr<CRealElement> x10_tangentialVelocity;
|
||||||
public:
|
public:
|
||||||
CMVESwirl(CVectorElement* a, CVectorElement* b, CRealElement* c, CRealElement* d)
|
CMVESwirl(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||||
: x4_helixPoint(a), x8_curveBinormal(b), xc_targetRadius(c), x10_tangentialVelocity(d) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d)
|
||||||
|
: x4_helixPoint(std::move(a)), x8_curveBinormal(std::move(b)),
|
||||||
|
xc_targetRadius(std::move(c)), x10_tangentialVelocity(std::move(d)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
bool GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f& pPos) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -80,13 +80,13 @@ class CParticleDataFactory
|
||||||
static SChildGeneratorDesc GetChildGeneratorDesc(CInputStream& in, CSimplePool* resPool, const std::vector<CAssetId>& tracker);
|
static SChildGeneratorDesc GetChildGeneratorDesc(CInputStream& in, CSimplePool* resPool, const std::vector<CAssetId>& tracker);
|
||||||
static SSwooshGeneratorDesc GetSwooshGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
static SSwooshGeneratorDesc GetSwooshGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
||||||
static SElectricGeneratorDesc GetElectricGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
static SElectricGeneratorDesc GetElectricGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
||||||
static CUVElement* GetTextureElement(CInputStream& in, CSimplePool* resPool);
|
static std::unique_ptr<CUVElement> GetTextureElement(CInputStream& in, CSimplePool* resPool);
|
||||||
static CColorElement* GetColorElement(CInputStream& in);
|
static std::unique_ptr<CColorElement> GetColorElement(CInputStream& in);
|
||||||
static CModVectorElement* GetModVectorElement(CInputStream& in);
|
static std::unique_ptr<CModVectorElement> GetModVectorElement(CInputStream& in);
|
||||||
static CEmitterElement* GetEmitterElement(CInputStream& in);
|
static std::unique_ptr<CEmitterElement> GetEmitterElement(CInputStream& in);
|
||||||
static CVectorElement* GetVectorElement(CInputStream& in);
|
static std::unique_ptr<CVectorElement> GetVectorElement(CInputStream& in);
|
||||||
static CRealElement* GetRealElement(CInputStream& in);
|
static std::unique_ptr<CRealElement> GetRealElement(CInputStream& in);
|
||||||
static CIntElement* GetIntElement(CInputStream& in);
|
static std::unique_ptr<CIntElement> GetIntElement(CInputStream& in);
|
||||||
|
|
||||||
static float GetReal(CInputStream& in);
|
static float GetReal(CInputStream& in);
|
||||||
static s32 GetInt(CInputStream& in);
|
static s32 GetInt(CInputStream& in);
|
||||||
|
|
|
@ -43,52 +43,52 @@ bool CParticleElectricDataFactory::CreateELSM(CElectricDescription* desc, CInput
|
||||||
switch (clsId)
|
switch (clsId)
|
||||||
{
|
{
|
||||||
case SBIG('LIFE'):
|
case SBIG('LIFE'):
|
||||||
desc->x0_LIFE.reset(CPF::GetIntElement(in));
|
desc->x0_LIFE = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('SLIF'):
|
case SBIG('SLIF'):
|
||||||
desc->x4_SLIF.reset(CPF::GetIntElement(in));
|
desc->x4_SLIF = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('GRAT'):
|
case SBIG('GRAT'):
|
||||||
desc->x8_GRAT.reset(CPF::GetRealElement(in));
|
desc->x8_GRAT = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('SCNT'):
|
case SBIG('SCNT'):
|
||||||
desc->xc_SCNT.reset(CPF::GetIntElement(in));
|
desc->xc_SCNT = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('SSEG'):
|
case SBIG('SSEG'):
|
||||||
desc->x10_SSEG.reset(CPF::GetIntElement(in));
|
desc->x10_SSEG = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('COLR'):
|
case SBIG('COLR'):
|
||||||
desc->x14_COLR.reset(CPF::GetColorElement(in));
|
desc->x14_COLR = CPF::GetColorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('IEMT'):
|
case SBIG('IEMT'):
|
||||||
desc->x18_IEMT.reset(CPF::GetEmitterElement(in));
|
desc->x18_IEMT = CPF::GetEmitterElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('FEMT'):
|
case SBIG('FEMT'):
|
||||||
desc->x1c_FEMT.reset(CPF::GetEmitterElement(in));
|
desc->x1c_FEMT = CPF::GetEmitterElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('AMPL'):
|
case SBIG('AMPL'):
|
||||||
desc->x20_AMPL.reset(CPF::GetRealElement(in));
|
desc->x20_AMPL = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('AMPD'):
|
case SBIG('AMPD'):
|
||||||
desc->x24_AMPD.reset(CPF::GetRealElement(in));
|
desc->x24_AMPD = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('LWD1'):
|
case SBIG('LWD1'):
|
||||||
desc->x28_LWD1.reset(CPF::GetRealElement(in));
|
desc->x28_LWD1 = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('LWD2'):
|
case SBIG('LWD2'):
|
||||||
desc->x2c_LWD2.reset(CPF::GetRealElement(in));
|
desc->x2c_LWD2 = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('LWD3'):
|
case SBIG('LWD3'):
|
||||||
desc->x30_LWD3.reset(CPF::GetRealElement(in));
|
desc->x30_LWD3 = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('LCL1'):
|
case SBIG('LCL1'):
|
||||||
desc->x34_LCL1.reset(CPF::GetColorElement(in));
|
desc->x34_LCL1 = CPF::GetColorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('LCL2'):
|
case SBIG('LCL2'):
|
||||||
desc->x38_LCL2.reset(CPF::GetColorElement(in));
|
desc->x38_LCL2 = CPF::GetColorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('LCL3'):
|
case SBIG('LCL3'):
|
||||||
desc->x3c_LCL3.reset(CPF::GetColorElement(in));
|
desc->x3c_LCL3 = CPF::GetColorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('SSWH'):
|
case SBIG('SSWH'):
|
||||||
desc->x40_SSWH = CPF::GetSwooshGeneratorDesc(in, resPool);
|
desc->x40_SSWH = CPF::GetSwooshGeneratorDesc(in, resPool);
|
||||||
|
|
|
@ -69,7 +69,7 @@ CParticleSwoosh::CParticleSwoosh(const TToken<CSwooshDescription>& desc, int len
|
||||||
{
|
{
|
||||||
int maxVerts = x1b4_LENG * (x1b0_SPLN+1) * x1b8_SIDE * 4;
|
int maxVerts = x1b4_LENG * (x1b0_SPLN+1) * x1b8_SIDE * 4;
|
||||||
m_cachedVerts.reserve(maxVerts);
|
m_cachedVerts.reserve(maxVerts);
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
m_vertBuf = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(CParticleSwooshShaders::Vert), maxVerts);
|
m_vertBuf = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(CParticleSwooshShaders::Vert), maxVerts);
|
||||||
m_uniformBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(zeus::CMatrix4f), 1);
|
m_uniformBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(zeus::CMatrix4f), 1);
|
||||||
|
|
|
@ -41,55 +41,55 @@ bool CParticleSwooshDataFactory::CreateWPSM(CSwooshDescription* desc, CInputStre
|
||||||
switch (clsId)
|
switch (clsId)
|
||||||
{
|
{
|
||||||
case SBIG('PSLT'):
|
case SBIG('PSLT'):
|
||||||
desc->x0_PSLT.reset(CPF::GetIntElement(in));
|
desc->x0_PSLT = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('TIME'):
|
case SBIG('TIME'):
|
||||||
desc->x4_TIME.reset(CPF::GetRealElement(in));
|
desc->x4_TIME = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('LRAD'):
|
case SBIG('LRAD'):
|
||||||
desc->x8_LRAD.reset(CPF::GetRealElement(in));
|
desc->x8_LRAD = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('RRAD'):
|
case SBIG('RRAD'):
|
||||||
desc->xc_RRAD.reset(CPF::GetRealElement(in));
|
desc->xc_RRAD = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('LENG'):
|
case SBIG('LENG'):
|
||||||
desc->x10_LENG.reset(CPF::GetIntElement(in));
|
desc->x10_LENG = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('COLR'):
|
case SBIG('COLR'):
|
||||||
desc->x14_COLR.reset(CPF::GetColorElement(in));
|
desc->x14_COLR = CPF::GetColorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('SIDE'):
|
case SBIG('SIDE'):
|
||||||
desc->x18_SIDE.reset(CPF::GetIntElement(in));
|
desc->x18_SIDE = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('IROT'):
|
case SBIG('IROT'):
|
||||||
desc->x1c_IROT.reset(CPF::GetRealElement(in));
|
desc->x1c_IROT = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('ROTM'):
|
case SBIG('ROTM'):
|
||||||
desc->x20_ROTM.reset(CPF::GetRealElement(in));
|
desc->x20_ROTM = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('POFS'):
|
case SBIG('POFS'):
|
||||||
desc->x24_POFS.reset(CPF::GetVectorElement(in));
|
desc->x24_POFS = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('IVEL'):
|
case SBIG('IVEL'):
|
||||||
desc->x28_IVEL.reset(CPF::GetVectorElement(in));
|
desc->x28_IVEL = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('NPOS'):
|
case SBIG('NPOS'):
|
||||||
desc->x2c_NPOS.reset(CPF::GetVectorElement(in));
|
desc->x2c_NPOS = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('VELM'):
|
case SBIG('VELM'):
|
||||||
desc->x30_VELM.reset(CPF::GetModVectorElement(in));
|
desc->x30_VELM = CPF::GetModVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('VLM2'):
|
case SBIG('VLM2'):
|
||||||
desc->x34_VLM2.reset(CPF::GetModVectorElement(in));
|
desc->x34_VLM2 = CPF::GetModVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('SPLN'):
|
case SBIG('SPLN'):
|
||||||
desc->x38_SPLN.reset(CPF::GetIntElement(in));
|
desc->x38_SPLN = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('TEXR'):
|
case SBIG('TEXR'):
|
||||||
desc->x3c_TEXR.reset(CPF::GetTextureElement(in, resPool));
|
desc->x3c_TEXR = CPF::GetTextureElement(in, resPool);
|
||||||
break;
|
break;
|
||||||
case SBIG('TSPN'):
|
case SBIG('TSPN'):
|
||||||
desc->x40_TSPN.reset(CPF::GetIntElement(in));
|
desc->x40_TSPN = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('LLRD'):
|
case SBIG('LLRD'):
|
||||||
desc->x44_24_LLRD = CPF::GetBool(in);
|
desc->x44_24_LLRD = CPF::GetBool(in);
|
||||||
|
|
|
@ -43,34 +43,34 @@ bool CProjectileWeaponDataFactory::CreateWPSM(CWeaponDescription* desc, CInputSt
|
||||||
switch (clsId)
|
switch (clsId)
|
||||||
{
|
{
|
||||||
case SBIG('IORN'):
|
case SBIG('IORN'):
|
||||||
desc->x0_IORN.reset(CPF::GetVectorElement(in));
|
desc->x0_IORN = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('IVEC'):
|
case SBIG('IVEC'):
|
||||||
desc->x4_IVEC.reset(CPF::GetVectorElement(in));
|
desc->x4_IVEC = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('PSOV'):
|
case SBIG('PSOV'):
|
||||||
desc->x8_PSOV.reset(CPF::GetVectorElement(in));
|
desc->x8_PSOV = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('PSVM'):
|
case SBIG('PSVM'):
|
||||||
desc->xc_PSVM.reset(CPF::GetModVectorElement(in));
|
desc->xc_PSVM = CPF::GetModVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('VMD2'):
|
case SBIG('VMD2'):
|
||||||
desc->x10_VMD2 = CPF::GetBool(in);
|
desc->x10_VMD2 = CPF::GetBool(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('PSLT'):
|
case SBIG('PSLT'):
|
||||||
desc->x14_PSLT.reset(CPF::GetIntElement(in));
|
desc->x14_PSLT = CPF::GetIntElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('PSCL'):
|
case SBIG('PSCL'):
|
||||||
desc->x18_PSCL.reset(CPF::GetVectorElement(in));
|
desc->x18_PSCL = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('PCOL'):
|
case SBIG('PCOL'):
|
||||||
desc->x1c_PCOL.reset(CPF::GetColorElement(in));
|
desc->x1c_PCOL = CPF::GetColorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('POFS'):
|
case SBIG('POFS'):
|
||||||
desc->x20_POFS.reset(CPF::GetVectorElement(in));
|
desc->x20_POFS = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('OFST'):
|
case SBIG('OFST'):
|
||||||
desc->x24_OFST.reset(CPF::GetVectorElement(in));
|
desc->x24_OFST = CPF::GetVectorElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('APSO'):
|
case SBIG('APSO'):
|
||||||
desc->x28_APSO = CPF::GetBool(in);
|
desc->x28_APSO = CPF::GetBool(in);
|
||||||
|
@ -94,7 +94,7 @@ bool CProjectileWeaponDataFactory::CreateWPSM(CWeaponDescription* desc, CInputSt
|
||||||
desc->x2e_AS13 = CPF::GetBool(in);
|
desc->x2e_AS13 = CPF::GetBool(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('TRAT'):
|
case SBIG('TRAT'):
|
||||||
desc->x30_TRAT.reset(CPF::GetRealElement(in));
|
desc->x30_TRAT = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('APSM'):
|
case SBIG('APSM'):
|
||||||
{
|
{
|
||||||
|
@ -151,10 +151,10 @@ bool CProjectileWeaponDataFactory::CreateWPSM(CWeaponDescription* desc, CInputSt
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SBIG('RNGE'):
|
case SBIG('RNGE'):
|
||||||
desc->xac_RNGE.reset(CPF::GetRealElement(in));
|
desc->xac_RNGE = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
case SBIG('FOFF'):
|
case SBIG('FOFF'):
|
||||||
desc->xb0_FOFF.reset(CPF::GetRealElement(in));
|
desc->xb0_FOFF = CPF::GetRealElement(in);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,8 +27,8 @@ class CRELifetimeTween : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x4_a;
|
std::unique_ptr<CRealElement> x4_a;
|
||||||
std::unique_ptr<CRealElement> x8_b;
|
std::unique_ptr<CRealElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CRELifetimeTween(CRealElement* a, CRealElement* b)
|
CRELifetimeTween(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,8 +47,8 @@ class CRETimeChain : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x8_b;
|
std::unique_ptr<CRealElement> x8_b;
|
||||||
std::unique_ptr<CIntElement> xc_swFrame;
|
std::unique_ptr<CIntElement> xc_swFrame;
|
||||||
public:
|
public:
|
||||||
CRETimeChain(CRealElement* a, CRealElement* b, CIntElement* c)
|
CRETimeChain(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b, std::unique_ptr<CIntElement>&& c)
|
||||||
: x4_a(a), x8_b(b), xc_swFrame(c) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,8 +57,8 @@ class CREAdd : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x4_a;
|
std::unique_ptr<CRealElement> x4_a;
|
||||||
std::unique_ptr<CRealElement> x8_b;
|
std::unique_ptr<CRealElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CREAdd(CRealElement* a, CRealElement* b)
|
CREAdd(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,8 +68,8 @@ class CREClamp : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x8_max;
|
std::unique_ptr<CRealElement> x8_max;
|
||||||
std::unique_ptr<CRealElement> xc_val;
|
std::unique_ptr<CRealElement> xc_val;
|
||||||
public:
|
public:
|
||||||
CREClamp(CRealElement* a, CRealElement* b, CRealElement* c)
|
CREClamp(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b, std::unique_ptr<CRealElement>&& c)
|
||||||
: x4_min(a), x8_max(b), xc_val(c) {}
|
: x4_min(std::move(a)), x8_max(std::move(b)), xc_val(std::move(c)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -78,8 +78,8 @@ class CREInitialRandom : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x4_min;
|
std::unique_ptr<CRealElement> x4_min;
|
||||||
std::unique_ptr<CRealElement> x8_max;
|
std::unique_ptr<CRealElement> x8_max;
|
||||||
public:
|
public:
|
||||||
CREInitialRandom(CRealElement* a, CRealElement* b)
|
CREInitialRandom(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_min(a), x8_max(b) {}
|
: x4_min(std::move(a)), x8_max(std::move(b)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
bool IsConstant() const {return true;}
|
bool IsConstant() const {return true;}
|
||||||
};
|
};
|
||||||
|
@ -89,8 +89,8 @@ class CRERandom : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x4_min;
|
std::unique_ptr<CRealElement> x4_min;
|
||||||
std::unique_ptr<CRealElement> x8_max;
|
std::unique_ptr<CRealElement> x8_max;
|
||||||
public:
|
public:
|
||||||
CRERandom(CRealElement* a, CRealElement* b)
|
CRERandom(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_min(a), x8_max(b) {}
|
: x4_min(std::move(a)), x8_max(std::move(b)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -99,8 +99,8 @@ class CREDotProduct : public CRealElement
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
std::unique_ptr<CVectorElement> x8_b;
|
std::unique_ptr<CVectorElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CREDotProduct(CVectorElement* a, CVectorElement* b)
|
CREDotProduct(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,8 +109,8 @@ class CREMultiply : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x4_a;
|
std::unique_ptr<CRealElement> x4_a;
|
||||||
std::unique_ptr<CRealElement> x8_b;
|
std::unique_ptr<CRealElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CREMultiply(CRealElement* a, CRealElement* b)
|
CREMultiply(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -121,8 +121,9 @@ class CREPulse : public CRealElement
|
||||||
std::unique_ptr<CRealElement> xc_valA;
|
std::unique_ptr<CRealElement> xc_valA;
|
||||||
std::unique_ptr<CRealElement> x10_valB;
|
std::unique_ptr<CRealElement> x10_valB;
|
||||||
public:
|
public:
|
||||||
CREPulse(CIntElement* a, CIntElement* b, CRealElement* c, CRealElement* d)
|
CREPulse(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b,
|
||||||
: x4_aDuration(a), x8_bDuration(b), xc_valA(c), x10_valB(d) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d)
|
||||||
|
: x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_valA(std::move(c)), x10_valB(std::move(d)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -130,8 +131,8 @@ class CRETimeScale : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CRealElement> x4_a;
|
std::unique_ptr<CRealElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CRETimeScale(CRealElement* a)
|
CRETimeScale(std::unique_ptr<CRealElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -139,8 +140,8 @@ class CRELifetimePercent : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CRealElement> x4_percentVal;
|
std::unique_ptr<CRealElement> x4_percentVal;
|
||||||
public:
|
public:
|
||||||
CRELifetimePercent(CRealElement* a)
|
CRELifetimePercent(std::unique_ptr<CRealElement>&& a)
|
||||||
: x4_percentVal(a) {}
|
: x4_percentVal(std::move(a)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -150,8 +151,9 @@ class CRESineWave : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x8_linearFrame;
|
std::unique_ptr<CRealElement> x8_linearFrame;
|
||||||
std::unique_ptr<CRealElement> xc_constantFrame;
|
std::unique_ptr<CRealElement> xc_constantFrame;
|
||||||
public:
|
public:
|
||||||
CRESineWave(CRealElement* a, CRealElement* b, CRealElement* c)
|
CRESineWave(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_magnitude(a), x8_linearFrame(b), xc_constantFrame(c) {}
|
std::unique_ptr<CRealElement>&& c)
|
||||||
|
: x4_magnitude(std::move(a)), x8_linearFrame(std::move(b)), xc_constantFrame(std::move(c)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -160,8 +162,8 @@ class CREInitialSwitch : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x4_a;
|
std::unique_ptr<CRealElement> x4_a;
|
||||||
std::unique_ptr<CRealElement> x8_b;
|
std::unique_ptr<CRealElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CREInitialSwitch(CRealElement* a, CRealElement* b)
|
CREInitialSwitch(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -172,8 +174,9 @@ class CRECompareLessThan : public CRealElement
|
||||||
std::unique_ptr<CRealElement> xc_c;
|
std::unique_ptr<CRealElement> xc_c;
|
||||||
std::unique_ptr<CRealElement> x10_d;
|
std::unique_ptr<CRealElement> x10_d;
|
||||||
public:
|
public:
|
||||||
CRECompareLessThan(CRealElement* a, CRealElement* b, CRealElement* c, CRealElement* d)
|
CRECompareLessThan(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_a(a), x8_b(b), xc_c(c), x10_d(d) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d)
|
||||||
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_c(std::move(c)), x10_d(std::move(d)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -184,8 +187,9 @@ class CRECompareEquals : public CRealElement
|
||||||
std::unique_ptr<CRealElement> xc_c;
|
std::unique_ptr<CRealElement> xc_c;
|
||||||
std::unique_ptr<CRealElement> x10_d;
|
std::unique_ptr<CRealElement> x10_d;
|
||||||
public:
|
public:
|
||||||
CRECompareEquals(CRealElement* a, CRealElement* b, CRealElement* c, CRealElement* d)
|
CRECompareEquals(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_a(a), x8_b(b), xc_c(c), x10_d(d) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d)
|
||||||
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_c(std::move(c)), x10_d(std::move(d)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -254,8 +258,8 @@ class CRESubtract : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x4_a;
|
std::unique_ptr<CRealElement> x4_a;
|
||||||
std::unique_ptr<CRealElement> x8_b;
|
std::unique_ptr<CRealElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CRESubtract(CRealElement* a, CRealElement* b)
|
CRESubtract(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -263,8 +267,8 @@ class CREVectorMagnitude : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CREVectorMagnitude(CVectorElement* a)
|
CREVectorMagnitude(std::unique_ptr<CVectorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -272,8 +276,8 @@ class CREVectorXToReal : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CREVectorXToReal(CVectorElement* a)
|
CREVectorXToReal(std::unique_ptr<CVectorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -281,8 +285,8 @@ class CREVectorYToReal : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CREVectorYToReal(CVectorElement* a)
|
CREVectorYToReal(std::unique_ptr<CVectorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -290,8 +294,8 @@ class CREVectorZToReal : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CREVectorZToReal(CVectorElement* a)
|
CREVectorZToReal(std::unique_ptr<CVectorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -299,8 +303,8 @@ class CRECEXT : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CIntElement> x4_a;
|
std::unique_ptr<CIntElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CRECEXT(CIntElement* a)
|
CRECEXT(std::unique_ptr<CIntElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -309,8 +313,8 @@ class CREIntTimesReal : public CRealElement
|
||||||
std::unique_ptr<CIntElement> x4_a;
|
std::unique_ptr<CIntElement> x4_a;
|
||||||
std::unique_ptr<CRealElement> x8_b;
|
std::unique_ptr<CRealElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CREIntTimesReal(CIntElement* a, CRealElement* b)
|
CREIntTimesReal(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -322,8 +326,11 @@ class CREConstantRange : public CRealElement
|
||||||
std::unique_ptr<CRealElement> x10_inRange;
|
std::unique_ptr<CRealElement> x10_inRange;
|
||||||
std::unique_ptr<CRealElement> x14_outOfRange;
|
std::unique_ptr<CRealElement> x14_outOfRange;
|
||||||
public:
|
public:
|
||||||
CREConstantRange(CRealElement* a, CRealElement* b, CRealElement* c, CRealElement* d, CRealElement* e)
|
CREConstantRange(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_val(a), x8_min(b), xc_max(c), x10_inRange(d), x14_outOfRange(e) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d,
|
||||||
|
std::unique_ptr<CRealElement>&& e)
|
||||||
|
: x4_val(std::move(a)), x8_min(std::move(b)), xc_max(std::move(c)),
|
||||||
|
x10_inRange(std::move(d)), x14_outOfRange(std::move(e)) {}
|
||||||
|
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
@ -332,8 +339,8 @@ class CREGetComponentRed : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CColorElement> x4_a;
|
std::unique_ptr<CColorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CREGetComponentRed(CColorElement* a)
|
CREGetComponentRed(std::unique_ptr<CColorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
|
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
@ -342,8 +349,8 @@ class CREGetComponentGreen : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CColorElement> x4_a;
|
std::unique_ptr<CColorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CREGetComponentGreen(CColorElement* a)
|
CREGetComponentGreen(std::unique_ptr<CColorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
|
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
@ -352,8 +359,8 @@ class CREGetComponentBlue : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CColorElement> x4_a;
|
std::unique_ptr<CColorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CREGetComponentBlue(CColorElement* a)
|
CREGetComponentBlue(std::unique_ptr<CColorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
|
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
@ -362,8 +369,8 @@ class CREGetComponentAlpha : public CRealElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CColorElement> x4_a;
|
std::unique_ptr<CColorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CREGetComponentAlpha(CColorElement* a)
|
CREGetComponentAlpha(std::unique_ptr<CColorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
|
|
||||||
bool GetValue(int frame, float& valOut) const;
|
bool GetValue(int frame, float& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,18 +5,15 @@
|
||||||
namespace urde
|
namespace urde
|
||||||
{
|
{
|
||||||
|
|
||||||
CUVEAnimTexture::CUVEAnimTexture(TToken<CTexture>&& tex, CIntElement* a, CIntElement* b,
|
CUVEAnimTexture::CUVEAnimTexture(TToken<CTexture>&& tex, std::unique_ptr<CIntElement>&& a,
|
||||||
CIntElement* c, CIntElement* d, CIntElement* e, bool f)
|
std::unique_ptr<CIntElement>&& b, std::unique_ptr<CIntElement>&& c,
|
||||||
: x4_tex(std::move(tex)), x24_loop(f), x28_cycleFrames(e)
|
std::unique_ptr<CIntElement>&& d, std::unique_ptr<CIntElement>&& e, bool f)
|
||||||
|
: x4_tex(std::move(tex)), x24_loop(f), x28_cycleFrames(std::move(e))
|
||||||
{
|
{
|
||||||
a->GetValue(0, x10_tileW);
|
a->GetValue(0, x10_tileW);
|
||||||
delete a;
|
|
||||||
b->GetValue(0, x14_tileH);
|
b->GetValue(0, x14_tileH);
|
||||||
delete b;
|
|
||||||
c->GetValue(0, x18_strideW);
|
c->GetValue(0, x18_strideW);
|
||||||
delete c;
|
|
||||||
d->GetValue(0, x1c_strideH);
|
d->GetValue(0, x1c_strideH);
|
||||||
delete d;
|
|
||||||
|
|
||||||
int width = x4_tex.GetObj()->GetWidth();
|
int width = x4_tex.GetObj()->GetWidth();
|
||||||
int height = x4_tex.GetObj()->GetHeight();
|
int height = x4_tex.GetObj()->GetHeight();
|
||||||
|
|
|
@ -55,8 +55,9 @@ struct CUVEAnimTexture : public CUVElement
|
||||||
std::unique_ptr<CIntElement> x28_cycleFrames;
|
std::unique_ptr<CIntElement> x28_cycleFrames;
|
||||||
std::vector<SUVElementSet> x2c_uvElems;
|
std::vector<SUVElementSet> x2c_uvElems;
|
||||||
public:
|
public:
|
||||||
CUVEAnimTexture(TToken<CTexture>&& tex, CIntElement* a, CIntElement* b,
|
CUVEAnimTexture(TToken<CTexture>&& tex, std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b,
|
||||||
CIntElement* c, CIntElement* d, CIntElement* e, bool f);
|
std::unique_ptr<CIntElement>&& c, std::unique_ptr<CIntElement>&& d,
|
||||||
|
std::unique_ptr<CIntElement>&& e, bool f);
|
||||||
TLockedToken<CTexture> GetValueTexture(int frame) const
|
TLockedToken<CTexture> GetValueTexture(int frame) const
|
||||||
{
|
{
|
||||||
return TLockedToken<CTexture>(x4_tex);
|
return TLockedToken<CTexture>(x4_tex);
|
||||||
|
|
|
@ -61,8 +61,8 @@ bool CVEKeyframeEmitter::GetValue(int frame, zeus::CVector3f& valOut) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CVECone::CVECone(CVectorElement* a, CRealElement* b)
|
CVECone::CVECone(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b)
|
||||||
: x4_direction(a), x8_magnitude(b)
|
: x4_direction(std::move(a)), x8_magnitude(std::move(b))
|
||||||
{
|
{
|
||||||
zeus::CVector3f av;
|
zeus::CVector3f av;
|
||||||
x4_direction->GetValue(0, av);
|
x4_direction->GetValue(0, av);
|
||||||
|
@ -136,8 +136,9 @@ bool CVEAdd::GetValue(int frame, zeus::CVector3f& valOut) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CVECircleCluster::CVECircleCluster(CVectorElement* a, CVectorElement* b, CIntElement* c, CRealElement* d)
|
CVECircleCluster::CVECircleCluster(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||||
: x4_a(a), x24_magnitude(d)
|
std::unique_ptr<CIntElement>&& c, std::unique_ptr<CRealElement>&& d)
|
||||||
|
: x4_a(std::move(a)), x24_magnitude(std::move(d))
|
||||||
{
|
{
|
||||||
int cv;
|
int cv;
|
||||||
c->GetValue(0, cv);
|
c->GetValue(0, cv);
|
||||||
|
@ -151,9 +152,6 @@ CVECircleCluster::CVECircleCluster(CVectorElement* a, CVectorElement* b, CIntEle
|
||||||
else
|
else
|
||||||
x8_xVec = bv.cross(zeus::CVector3f(1.f, 0.f, 0.f));
|
x8_xVec = bv.cross(zeus::CVector3f(1.f, 0.f, 0.f));
|
||||||
x14_yVec = bv.cross(x8_xVec);
|
x14_yVec = bv.cross(x8_xVec);
|
||||||
|
|
||||||
delete b;
|
|
||||||
delete c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CVECircleCluster::GetValue(int frame, zeus::CVector3f& valOut) const
|
bool CVECircleCluster::GetValue(int frame, zeus::CVector3f& valOut) const
|
||||||
|
@ -194,8 +192,11 @@ bool CVEFastConstant::GetValue(int frame, zeus::CVector3f& valOut) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CVECircle::CVECircle(CVectorElement* a, CVectorElement* b, CRealElement* c, CRealElement* d, CRealElement* e)
|
CVECircle::CVECircle(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||||
: x4_direction(a), x20_angleConstant(c), x24_angleLinear(d), x28_radius(e)
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d,
|
||||||
|
std::unique_ptr<CRealElement>&& e)
|
||||||
|
: x4_direction(std::move(a)), x20_angleConstant(std::move(c)),
|
||||||
|
x24_angleLinear(std::move(d)), x28_radius(std::move(e))
|
||||||
{
|
{
|
||||||
zeus::CVector3f bv;
|
zeus::CVector3f bv;
|
||||||
b->GetValue(0, bv);
|
b->GetValue(0, bv);
|
||||||
|
@ -205,7 +206,6 @@ CVECircle::CVECircle(CVectorElement* a, CVectorElement* b, CRealElement* c, CRea
|
||||||
else
|
else
|
||||||
x8_xVec = bv.cross(zeus::CVector3f(1.f, 0.f, 0.f));
|
x8_xVec = bv.cross(zeus::CVector3f(1.f, 0.f, 0.f));
|
||||||
x14_yVec = bv.cross(x8_xVec);
|
x14_yVec = bv.cross(x8_xVec);
|
||||||
delete b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CVECircle::GetValue(int frame, zeus::CVector3f& valOut) const
|
bool CVECircle::GetValue(int frame, zeus::CVector3f& valOut) const
|
||||||
|
|
|
@ -29,7 +29,7 @@ class CVECone : public CVectorElement
|
||||||
zeus::CVector3f xc_xVec;
|
zeus::CVector3f xc_xVec;
|
||||||
zeus::CVector3f x18_yVec;
|
zeus::CVector3f x18_yVec;
|
||||||
public:
|
public:
|
||||||
CVECone(CVectorElement* a, CRealElement* b);
|
CVECone(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CRealElement>&& b);
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,8 +39,9 @@ class CVETimeChain : public CVectorElement
|
||||||
std::unique_ptr<CVectorElement> x8_b;
|
std::unique_ptr<CVectorElement> x8_b;
|
||||||
std::unique_ptr<CIntElement> xc_swFrame;
|
std::unique_ptr<CIntElement> xc_swFrame;
|
||||||
public:
|
public:
|
||||||
CVETimeChain(CVectorElement* a, CVectorElement* b, CIntElement* c)
|
CVETimeChain(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||||
: x4_a(a), x8_b(b), xc_swFrame(c) {}
|
std::unique_ptr<CIntElement>&& c)
|
||||||
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_swFrame(std::move(c)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,8 +53,11 @@ class CVEAngleCone : public CVectorElement
|
||||||
std::unique_ptr<CRealElement> x10_angleYRange;
|
std::unique_ptr<CRealElement> x10_angleYRange;
|
||||||
std::unique_ptr<CRealElement> x14_magnitude;
|
std::unique_ptr<CRealElement> x14_magnitude;
|
||||||
public:
|
public:
|
||||||
CVEAngleCone(CRealElement* a, CRealElement* b, CRealElement* c, CRealElement* d, CRealElement* e)
|
CVEAngleCone(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b,
|
||||||
: x4_angleXConstant(a), x8_angleYConstant(b), xc_angleXRange(c), x10_angleYRange(d), x14_magnitude(e) {}
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d,
|
||||||
|
std::unique_ptr<CRealElement>&& e)
|
||||||
|
: x4_angleXConstant(std::move(a)), x8_angleYConstant(std::move(b)),
|
||||||
|
xc_angleXRange(std::move(c)), x10_angleYRange(std::move(d)), x14_magnitude(std::move(e)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -62,8 +66,8 @@ class CVEAdd : public CVectorElement
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
std::unique_ptr<CVectorElement> x8_b;
|
std::unique_ptr<CVectorElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CVEAdd(CVectorElement* a, CVectorElement* b)
|
CVEAdd(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,7 +79,8 @@ class CVECircleCluster : public CVectorElement
|
||||||
float x20_deltaAngle;
|
float x20_deltaAngle;
|
||||||
std::unique_ptr<CRealElement> x24_magnitude;
|
std::unique_ptr<CRealElement> x24_magnitude;
|
||||||
public:
|
public:
|
||||||
CVECircleCluster(CVectorElement* a, CVectorElement* b, CIntElement* c, CRealElement* d);
|
CVECircleCluster(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||||
|
std::unique_ptr<CIntElement>&& c, std::unique_ptr<CRealElement>&& d);
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -85,8 +90,8 @@ class CVEConstant : public CVectorElement
|
||||||
std::unique_ptr<CRealElement> x8_b;
|
std::unique_ptr<CRealElement> x8_b;
|
||||||
std::unique_ptr<CRealElement> xc_c;
|
std::unique_ptr<CRealElement> xc_c;
|
||||||
public:
|
public:
|
||||||
CVEConstant(CRealElement* a, CRealElement* b, CRealElement* c)
|
CVEConstant(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b, std::unique_ptr<CRealElement>&& c)
|
||||||
: x4_a(a), x8_b(b), xc_c(c) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)), xc_c(std::move(c)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -108,7 +113,9 @@ class CVECircle : public CVectorElement
|
||||||
std::unique_ptr<CRealElement> x24_angleLinear;
|
std::unique_ptr<CRealElement> x24_angleLinear;
|
||||||
std::unique_ptr<CRealElement> x28_radius;
|
std::unique_ptr<CRealElement> x28_radius;
|
||||||
public:
|
public:
|
||||||
CVECircle(CVectorElement* a, CVectorElement* b, CRealElement* c, CRealElement* d, CRealElement* e);
|
CVECircle(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b,
|
||||||
|
std::unique_ptr<CRealElement>&& c, std::unique_ptr<CRealElement>&& d,
|
||||||
|
std::unique_ptr<CRealElement>&& e);
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -117,8 +124,8 @@ class CVEMultiply : public CVectorElement
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
std::unique_ptr<CVectorElement> x8_b;
|
std::unique_ptr<CVectorElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CVEMultiply(CVectorElement* a, CVectorElement* b)
|
CVEMultiply(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b)
|
||||||
: x4_a(a), x8_b(b) {}
|
: x4_a(std::move(a)), x8_b(std::move(b)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -126,8 +133,8 @@ class CVERealToVector : public CVectorElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CRealElement> x4_a;
|
std::unique_ptr<CRealElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CVERealToVector(CRealElement* a)
|
CVERealToVector(std::unique_ptr<CRealElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -138,8 +145,9 @@ class CVEPulse : public CVectorElement
|
||||||
std::unique_ptr<CVectorElement> xc_aVal;
|
std::unique_ptr<CVectorElement> xc_aVal;
|
||||||
std::unique_ptr<CVectorElement> x10_bVal;
|
std::unique_ptr<CVectorElement> x10_bVal;
|
||||||
public:
|
public:
|
||||||
CVEPulse(CIntElement* a, CIntElement* b, CVectorElement* c, CVectorElement* d)
|
CVEPulse(std::unique_ptr<CIntElement>&& a, std::unique_ptr<CIntElement>&& b,
|
||||||
: x4_aDuration(a), x8_bDuration(b), xc_aVal(c), x10_bVal(d) {}
|
std::unique_ptr<CVectorElement>&& c, std::unique_ptr<CVectorElement>&& d)
|
||||||
|
: x4_aDuration(std::move(a)), x8_bDuration(std::move(b)), xc_aVal(std::move(c)), x10_bVal(std::move(d)) {}
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -190,8 +198,8 @@ class CVESubtract : public CVectorElement
|
||||||
std::unique_ptr<CVectorElement> x4_a;
|
std::unique_ptr<CVectorElement> x4_a;
|
||||||
std::unique_ptr<CVectorElement> x8_b;
|
std::unique_ptr<CVectorElement> x8_b;
|
||||||
public:
|
public:
|
||||||
CVESubtract(CVectorElement* a, CVectorElement* b)
|
CVESubtract(std::unique_ptr<CVectorElement>&& a, std::unique_ptr<CVectorElement>&& b)
|
||||||
: x4_a(a), x8_b(b)
|
: x4_a(std::move(a)), x8_b(std::move(b))
|
||||||
{}
|
{}
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
@ -200,8 +208,8 @@ class CVEColorToVector : public CVectorElement
|
||||||
{
|
{
|
||||||
std::unique_ptr<CColorElement> x4_a;
|
std::unique_ptr<CColorElement> x4_a;
|
||||||
public:
|
public:
|
||||||
CVEColorToVector(CColorElement* a)
|
CVEColorToVector(std::unique_ptr<CColorElement>&& a)
|
||||||
: x4_a(a) {}
|
: x4_a(std::move(a)) {}
|
||||||
|
|
||||||
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
bool GetValue(int frame, zeus::CVector3f& valOut) const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,4 +35,12 @@ void CEnvFxManager::AreaLoaded()
|
||||||
grid.x0_24_ = true;
|
grid.x0_24_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CEnvFxManager::Cleanup()
|
||||||
|
{
|
||||||
|
xb68_envRainSplashId = kInvalidUniqueId;
|
||||||
|
xb6a_ = false;
|
||||||
|
xb6c_ = 0;
|
||||||
|
xb70_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,10 @@ class CEnvFxManager
|
||||||
float xb54_;
|
float xb54_;
|
||||||
TLockedToken<CGenDescription> xb58_envRainSplash;
|
TLockedToken<CGenDescription> xb58_envRainSplash;
|
||||||
bool xb64_ = true;
|
bool xb64_ = true;
|
||||||
|
TUniqueId xb68_envRainSplashId = kInvalidUniqueId;
|
||||||
|
bool xb6a_ = false;
|
||||||
|
u32 xb6c_ = 0;
|
||||||
|
u32 xb70_ = 0;
|
||||||
|
|
||||||
void SetupSnowTevs();
|
void SetupSnowTevs();
|
||||||
void SetupRainTevs();
|
void SetupRainTevs();
|
||||||
|
@ -80,6 +84,7 @@ public:
|
||||||
void SetXB54(float f) { xb54_ = f; }
|
void SetXB54(float f) { xb54_ = f; }
|
||||||
bool GetX24() const { return x24_; }
|
bool GetX24() const { return x24_; }
|
||||||
float GetRainMagnitude() const { return x30_rainMagnitude; }
|
float GetRainMagnitude() const { return x30_rainMagnitude; }
|
||||||
|
void Cleanup();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1230,7 +1230,7 @@ void CGameArea::FillInStaticGeometry(bool textures)
|
||||||
++secIt;
|
++secIt;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
CGraphicsCommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
|
||||||
{
|
{
|
||||||
/* Shared geometry uniform buffer - one for normal render, one for shadow render */
|
/* Shared geometry uniform buffer - one for normal render, one for shadow render */
|
||||||
for (int i=0 ; i<2 ; ++i)
|
for (int i=0 ; i<2 ; ++i)
|
||||||
|
|
|
@ -60,7 +60,7 @@ void CScriptDock::Think(float dt, CStateManager& mgr)
|
||||||
else if (x264_dockState == EDockState::EnterNextArea)
|
else if (x264_dockState == EDockState::EnterNextArea)
|
||||||
{
|
{
|
||||||
CPlayer& player = mgr.GetPlayer();
|
CPlayer& player = mgr.GetPlayer();
|
||||||
if (HasPointCrossedDock(mgr, player.GetTransform().origin))
|
if (HasPointCrossedDock(mgr, player.GetTranslation()))
|
||||||
{
|
{
|
||||||
IGameArea::Dock* dock = mgr.WorldNC()->GetArea(mgr.GetNextAreaId())->DockNC(x25c_dock);
|
IGameArea::Dock* dock = mgr.WorldNC()->GetArea(mgr.GetNextAreaId())->DockNC(x25c_dock);
|
||||||
TAreaId aid = dock->GetConnectedAreaId(dock->GetReferenceCount());
|
TAreaId aid = dock->GetConnectedAreaId(dock->GetReferenceCount());
|
||||||
|
@ -237,7 +237,7 @@ void CScriptDock::UpdateAreaActivateFlags(CStateManager& mgr)
|
||||||
bool CScriptDock::HasPointCrossedDock(const CStateManager& mgr, const zeus::CVector3f& point) const
|
bool CScriptDock::HasPointCrossedDock(const CStateManager& mgr, const zeus::CVector3f& point) const
|
||||||
{
|
{
|
||||||
const zeus::CPlane plane = GetPlane(mgr);
|
const zeus::CPlane plane = GetPlane(mgr);
|
||||||
return (point.dot(plane.vec) < plane.d);
|
return (point.dot(plane.vec) >= plane.d);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScriptDock::AreaLoaded(CStateManager& mgr) { SetLoadConnected(mgr, x268_25_loadConnected); }
|
void CScriptDock::AreaLoaded(CStateManager& mgr) { SetLoadConnected(mgr, x268_25_loadConnected); }
|
||||||
|
|
|
@ -79,7 +79,14 @@ void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStat
|
||||||
{
|
{
|
||||||
if (x27e_partner2 != kInvalidUniqueId)
|
if (x27e_partner2 != kInvalidUniqueId)
|
||||||
if (CEntity* ent = mgr.ObjectById(x27e_partner2))
|
if (CEntity* ent = mgr.ObjectById(x27e_partner2))
|
||||||
|
{
|
||||||
|
static int RecDepth = 0;
|
||||||
|
if (RecDepth > 9)
|
||||||
|
printf("");
|
||||||
|
++RecDepth;
|
||||||
mgr.SendScriptMsg(ent, GetUniqueId(), EScriptObjectMessage::Close);
|
mgr.SendScriptMsg(ent, GetUniqueId(), EScriptObjectMessage::Close);
|
||||||
|
--RecDepth;
|
||||||
|
}
|
||||||
x2a8_26_isOpen = false;
|
x2a8_26_isOpen = false;
|
||||||
SetDoorAnimation(EDoorAnimType::Close);
|
SetDoorAnimation(EDoorAnimType::Close);
|
||||||
mgr.GetCameraManager()->GetBallCamera()->DoorClosing(GetUniqueId());
|
mgr.GetCameraManager()->GetBallCamera()->DoorClosing(GetUniqueId());
|
||||||
|
@ -277,6 +284,8 @@ void CScriptDoor::OpenDoor(TUniqueId uid, CStateManager& mgr)
|
||||||
x2a8_26_isOpen = true;
|
x2a8_26_isOpen = true;
|
||||||
x2a8_25_wasOpen = true;
|
x2a8_25_wasOpen = true;
|
||||||
x2a8_27_conditionsMet = false;
|
x2a8_27_conditionsMet = false;
|
||||||
|
x27c_partner1 = kInvalidUniqueId;
|
||||||
|
x27e_partner2 = kInvalidUniqueId;
|
||||||
|
|
||||||
if (const CScriptDoor* door = TCastToConstPtr<CScriptDoor>(mgr.GetObjectById(uid)))
|
if (const CScriptDoor* door = TCastToConstPtr<CScriptDoor>(mgr.GetObjectById(uid)))
|
||||||
x27c_partner1 = door->GetUniqueId();
|
x27c_partner1 = door->GetUniqueId();
|
||||||
|
@ -292,12 +301,13 @@ void CScriptDoor::OpenDoor(TUniqueId uid, CStateManager& mgr)
|
||||||
for (CEntity* ent : mgr.GetPlatformAndDoorObjectList())
|
for (CEntity* ent : mgr.GetPlatformAndDoorObjectList())
|
||||||
{
|
{
|
||||||
TCastToConstPtr<CScriptDoor> door = ent;
|
TCastToConstPtr<CScriptDoor> door = ent;
|
||||||
if (!door || door->GetUniqueId() == GetUniqueId())
|
if (!door || door->GetUniqueId() == uid)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(TCastToConstPtr<CScriptDock> dock2 = mgr.GetObjectById(door->x282_dockId))
|
if (TCastToConstPtr<CScriptDock> dock2 = mgr.GetObjectById(door->x282_dockId))
|
||||||
{
|
{
|
||||||
if (dock1->GetCurrentConnectedAreaId(mgr) == dock2->GetAreaId() && dock2->GetCurrentConnectedAreaId(mgr) == dock1->GetAreaId())
|
if (dock1->GetCurrentConnectedAreaId(mgr) == dock2->GetAreaId() &&
|
||||||
|
dock2->GetCurrentConnectedAreaId(mgr) == dock1->GetAreaId())
|
||||||
{
|
{
|
||||||
x27e_partner2 = door->GetUniqueId();
|
x27e_partner2 = door->GetUniqueId();
|
||||||
mgr.SendScriptMsg(ent, GetUniqueId(), EScriptObjectMessage::Open);
|
mgr.SendScriptMsg(ent, GetUniqueId(), EScriptObjectMessage::Open);
|
||||||
|
|
|
@ -176,9 +176,6 @@ void CScriptSound::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CSta
|
||||||
break;
|
break;
|
||||||
case EScriptObjectMessage::Play:
|
case EScriptObjectMessage::Play:
|
||||||
{
|
{
|
||||||
if (xc_editorId.id == 0x00000223)
|
|
||||||
printf("");
|
|
||||||
|
|
||||||
if (GetActive())
|
if (GetActive())
|
||||||
PlaySound(mgr);
|
PlaySound(mgr);
|
||||||
}
|
}
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit dc5348ad25f5dc7264fde4319e8cd4505fe23af1
|
Subproject commit c26f24fb90da308ef6428b3198522d13569df50d
|
2
specter
2
specter
|
@ -1 +1 @@
|
||||||
Subproject commit 326b5b4d2ff727f4836ca0a4467ab311cd239889
|
Subproject commit a709031d36f5556b5ef3646673fba5c984d1d45a
|
Loading…
Reference in New Issue