2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 02:27:43 +00:00

TLockedToken cached pointer

This commit is contained in:
Jack Andersen
2016-02-07 19:10:17 -10:00
parent 259eb89b00
commit 718436d2a6
6 changed files with 77 additions and 31 deletions

View File

@@ -5,7 +5,7 @@ namespace Retro
CUVEAnimTexture::CUVEAnimTexture(TToken<CTexture>&& tex, CIntElement* a, CIntElement* b,
CIntElement* c, CIntElement* d, CIntElement* e, bool f)
: x4_tex(std::move(tex)), xc_directTex(x4_tex.GetObj()), x24_loop(f), x28_cycleFrameRate(e)
: x4_tex(std::move(tex)), x24_loop(f), x28_cycleFrameRate(e)
{
a->GetValue(0, x10_tileW);
delete a;
@@ -16,8 +16,8 @@ CUVEAnimTexture::CUVEAnimTexture(TToken<CTexture>&& tex, CIntElement* a, CIntEle
d->GetValue(0, x1c_strideH);
delete d;
int width = xc_directTex->GetWidth();
int height = xc_directTex->GetHeight();
int width = x4_tex.GetObj()->GetWidth();
int height = x4_tex.GetObj()->GetHeight();
float widthF = width;
float heightF = height;
int xTiles = std::max(1, width / x18_strideW);