Link AnalizeDL with a fakematch (?)

This commit is contained in:
robojumper
2025-03-28 10:23:57 +01:00
parent 5477b7b547
commit 0766801142
2 changed files with 9 additions and 15 deletions
+1 -1
View File
@@ -868,7 +868,7 @@ config.libs = [
Object(Matching, "egg/gfx/eggCamera.cpp"),
Object(Matching, "egg/gfx/eggPalette.cpp"),
Object(Matching, "egg/gfx/eggTexture.cpp"),
Object(NonMatching, "egg/gfx/eggAnalizeDL.cpp"),
Object(Matching, "egg/gfx/eggAnalizeDL.cpp"),
Object(Matching, "egg/gfx/eggCapTexture.cpp"),
Object(NonMatching, "egg/gfx/eggCpuTexture.cpp"),
Object(NonMatching, "egg/gfx/eggDrawGX.cpp"),
+8 -14
View File
@@ -149,22 +149,18 @@ static const s8 sArr1[] = {0, -1, 1, 2};
static const u8 sArr2[] = {1, 1, 2, 2, 4, 0};
void AnalizeDL::init() {
// TODO
int k = 0;
const u8 *pArr2 = sArr2;
const s8 *pArr1 = sArr1;
for (int i = 0; mVtxDescList[i].attr != GX_VA_NULL; i++) {
int x = pArr1[mVtxDescList[i].type];
pArr1++;
for (int k = 0, i = 0; mVtxDescList[i].attr != GX_VA_NULL; k++, i++) {
// Likely a fakematch
int x = sArr1[mVtxDescList[i++, --i].type];
if (x == -1) {
if (k >= 0 && k <= 8) {
x = 1;
} else {
int j = -1;
while (k != mAttrFmtList[++j].attr) {}
x = sArr2[mAttrFmtList[j].compType];
}
} else {
int j = 1;
for (; k != mAttrFmtList[j].attr; j++) {}
x = pArr2[mAttrFmtList[j - 1].compType];
}
if (k == 9) {
@@ -175,8 +171,6 @@ void AnalizeDL::init() {
if (x != 0) {
field_0x010 |= (1 << k);
}
k++;
}
}