mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 14:24:56 +00:00
Changes to support boo object tracker API
This commit is contained in:
@@ -11,7 +11,7 @@ static logvisor::Module Log("URDE::icons");
|
||||
|
||||
specter::IconAtlas<8,8> g_IconAtlas;
|
||||
|
||||
boo::GraphicsDataToken InitializeIcons(specter::ViewResources& viewRes)
|
||||
void InitializeIcons(specter::ViewResources& viewRes)
|
||||
{
|
||||
athena::io::MemoryReader r(URDE_ICONS, URDE_ICONS_SZ);
|
||||
size_t fmt = r.readUint32Big();
|
||||
@@ -28,7 +28,7 @@ boo::GraphicsDataToken InitializeIcons(specter::ViewResources& viewRes)
|
||||
if (uncompress(texels.get(), &destSz, URDE_ICONS + pos, URDE_ICONS_SZ - pos) != Z_OK)
|
||||
Log.report(logvisor::Fatal, "unable to decompress icons");
|
||||
|
||||
return viewRes.m_factory->commitTransaction([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
||||
viewRes.m_factory->commitTransaction([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
|
||||
{
|
||||
g_IconAtlas.initializeAtlas(ctx.newStaticTexture(width, height, mips,
|
||||
boo::TextureFormat::RGBA8,
|
||||
@@ -38,6 +38,11 @@ boo::GraphicsDataToken InitializeIcons(specter::ViewResources& viewRes)
|
||||
});
|
||||
}
|
||||
|
||||
void DestroyIcons()
|
||||
{
|
||||
g_IconAtlas.destroyAtlas();
|
||||
}
|
||||
|
||||
specter::Icon& GetIcon(SpaceIcon icon)
|
||||
{
|
||||
switch (icon)
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
namespace urde
|
||||
{
|
||||
boo::GraphicsDataToken InitializeIcons(specter::ViewResources& viewRes);
|
||||
void InitializeIcons(specter::ViewResources& viewRes);
|
||||
void DestroyIcons();
|
||||
|
||||
enum class SpaceIcon
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user