mirror of https://github.com/AxioDL/metaforce.git
CMaterialList: Fix BitPosition with matching implementation
CAuiImagePane: Fix animated scans... again
This commit is contained in:
parent
e2f2635757
commit
a85eebe496
|
@ -102,11 +102,13 @@ public:
|
||||||
|
|
||||||
constexpr u64 GetValue() const noexcept { return x0_list; }
|
constexpr u64 GetValue() const noexcept { return x0_list; }
|
||||||
|
|
||||||
static constexpr s32 BitPosition(u64 flag) noexcept {
|
static constexpr s32 BitPosition(u64 flags) noexcept {
|
||||||
for (u32 i = 0; i < 64; ++i) {
|
for (s32 ret = 0, i = 0; i < 32; ++i) {
|
||||||
if ((flag & (u64{1} << i)) != 0) {
|
if ((flags & 1) != 0u) {
|
||||||
return static_cast<s32>(i);
|
return ret;
|
||||||
}
|
}
|
||||||
|
flags >>= 1;
|
||||||
|
++ret;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,13 +103,13 @@ void CAuiImagePane::DoDrawImagePane(const zeus::CColor& color, CTexture& tex, in
|
||||||
float rgba2 = 1.f - rgba1;
|
float rgba2 = 1.f - rgba1;
|
||||||
tex.LoadMipLevel(mip1, GX::TexMapID::TEXMAP0, EClampMode::Repeat);
|
tex.LoadMipLevel(mip1, GX::TexMapID::TEXMAP0, EClampMode::Repeat);
|
||||||
tex.LoadMipLevel(mip2, GX::TexMapID::TEXMAP1, EClampMode::Repeat);
|
tex.LoadMipLevel(mip2, GX::TexMapID::TEXMAP1, EClampMode::Repeat);
|
||||||
const GX::VtxDescList list[3]{
|
std::array<GX::VtxDescList, 3> list{{
|
||||||
{GX::VA_POS, GX::DIRECT},
|
{GX::VA_POS, GX::DIRECT},
|
||||||
{GX::VA_TEX0, GX::DIRECT},
|
{GX::VA_TEX0, GX::DIRECT},
|
||||||
{GX::VA_NULL, GX::NONE},
|
GX::VtxDescList{},
|
||||||
};
|
}};
|
||||||
|
|
||||||
CGX::SetVtxDescv(reinterpret_cast<const GX::VtxDescList*>(&list));
|
CGX::SetVtxDescv(list.data());
|
||||||
CGX::SetNumChans(0);
|
CGX::SetNumChans(0);
|
||||||
CGX::SetNumTexGens(2);
|
CGX::SetNumTexGens(2);
|
||||||
CGX::SetNumTevStages(2);
|
CGX::SetNumTevStages(2);
|
||||||
|
|
Loading…
Reference in New Issue