Turn D_802BFB80 into a union (#582)

* Turn D_802BFB80 into a union

As much as I hate it, it does make more matches possible

Got a few more, unrelated matches

Signed-off-by: Taggerung <tyler.taggerung@email.com>

* Update based on comment

Signed-off-by: Taggerung <tyler.taggerung@email.com>

* Update to address comment

Signed-off-by: Taggerung <tyler.taggerung@email.com>

---------

Signed-off-by: Taggerung <tyler.taggerung@email.com>
Co-authored-by: Taggerung <tyler.taggerung@email.com>
This commit is contained in:
Tyler McGavran
2024-03-25 13:25:13 -04:00
committed by GitHub
parent 65f03934bb
commit 893ecbe838
15 changed files with 268 additions and 1587 deletions
+16 -2
View File
@@ -15,7 +15,21 @@
*/
typedef struct {
u8 pixel_index_array[0x1000];
} struct_D_802BFB80; // size = 0x1000
} struct_D_802BFB80_8; // size = 0x1000
typedef struct {
u8 pixel_index_array[0x2000];
} struct_D_802BFB80_4; // size = 0x1000
/*
* In render_player, spawn_players, and staff_ghosts D_802BFB80 is the arraySize8 entry
* But in code_80091750 its the arraySize4 entry
* The only way to unify those 2 things is to use a union
*/
typedef union {
struct_D_802BFB80_4 arraySize4[2][2][4];
struct_D_802BFB80_8 arraySize8[2][2][8];
} union_D_802BFB80;
/*
* Texture prior to be being decoded via mio0decode
@@ -55,7 +69,7 @@ typedef struct {
extern u16 gRandomSeed16;
extern u8 randomSeedPadding[216];
extern struct_D_802BFB80 D_802BFB80[][2][8];
extern union_D_802BFB80 D_802BFB80;
extern struct_D_802DFB80 D_802DFB80[][2][8];
/**
+210 -243
View File
@@ -95,10 +95,11 @@ SaveData gSaveData;
u8 D_8018ED90;
u8 D_8018ED91;
s32 s8018ED94;
f32 D_8018ED98; // Rotation
f32 D_8018ED9C; // Rotation
f32 D_8018EDA0; // Rotation
f32 D_8018EDA4;
f32 D_8018EDA8;
f32 D_8018EDAC;
@@ -4867,13 +4868,6 @@ void func_800996BC(MkTexture *arg0, s32 arg1) {
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800996BC.s")
#endif
#ifdef MIPS_TO_C
// Note that as it stands this function is NOT functionally identical
// However the diff is tiny and there's not really much left to be done
// A potential match found by Vetri: https://decomp.me/scratch/fnW6S
// The only problem with it is that it requires modifying D_802BFB80's dimesnions
// and that seems really really wrong. But a match is a match, so it demands
// more investigation.
void func_80099958(MkTexture *arg0, s32 arg1, s32 arg2) {
u16 var_a1;
u8 *thing;
@@ -4891,14 +4885,10 @@ void func_80099958(MkTexture *arg0, s32 arg1, s32 arg2) {
var_a1 = ((var_a1 / 8) * 8) + 8;
}
dma_copy_base_729a30(temp_v0->textureData, var_a1, D_8018D9B4);
// `arg1 % 2` needs to be multiplied by 2, but doing that causes a large diff
mio0decode(D_8018D9B4, D_802BFB80[arg2][arg1 / 2][(arg1 % 2) + 4].pixel_index_array);
mio0decode(D_8018D9B4, D_802BFB80.arraySize4[arg2][arg1 / 2][(arg1 % 2) + 2].pixel_index_array);
temp_v0++;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099958.s")
#endif
// Possibly a debug print function?
void func_80099A70(void) {
@@ -4918,94 +4908,89 @@ void func_80099A94(MkTexture *arg0, s32 arg1) {
var_v1->unk_4 = arg1;
}
#ifdef MIPS_TO_C
//generated by m2c commit a39b70e85329b0bcaeb4350510ddb23dc9840dce on Feb-04-2024
#ifdef NON_MATCHING
// https://decomp.me/scratch/rxEoi
// Something's up with the handling of `_textures_0aSegmentRomStart`, I don't know how to fix it
void func_80099AEC(void) {
OSIoMesg sp6C;
void *sp68;
s8 var_s4;
s32 var_s0;
s32 stackPadding0;
s32 stackPadding1;
s32 huh;
OSIoMesg sp68;
OSMesg sp64;
u8 *test;
s32 sp60;
u8 *sp58;
MkTexture *temp_s2;
s32 temp_t7;
s8 var_s5;
struct_8018E060_entry *temp_s1;
struct_8018E060_entry *var_s1;
u16 temp_v1;
u16 temp_v1_2;
u16 temp_v1_3;
u16 var_s0;
u16 var_s0_2;
u16 var_s0_3;
void *temp_v0;
void *temp_v0_2;
if (gGamestate == 4) {
sp60 = 0x00000500;
} else {
sp60 = 0x00001000;
}
var_s4 = 0;
var_s1 = D_8018E060;
temp_s2 = D_8018E060->texture;
var_s5 = 0;
if (temp_s2 != NULL) {
temp_v1 = temp_s2->size;
temp_s2 = var_s1->texture;
if (temp_s2 == NULL) return;
huh = temp_s2->size;
if (huh != 0) {
var_s0 = huh;
} else {
var_s0 = 0x1400;
if (temp_v1 != 0) {
var_s0 = temp_v1;
}
if (((s32) var_s0 % 8) != 0) {
var_s0 = (((s32) var_s0 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4, (u32) var_s0);
sp58 = _textures_0aSegmentRomStart;
osPiStartDma(&sp6C, 0, 0, (u32) &_textures_0aSegmentRomStart[(s32) temp_s2->textureData & 0xFFFFFF], D_8018D9B4, (u32) var_s0, &gDmaMesgQueue);
osRecvMesg(&gDmaMesgQueue, &sp68, 1);
loop_9:
temp_v0 = var_s1->unk8;
if (temp_v0 == NULL) {
var_s5 += 1;
}
if (var_s0 % 8) {
var_s0 = ((var_s0 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4, var_s0);
osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue);
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
while (1) {
if ((var_s1 + 1)->texture == NULL) {
var_s4 += 1;
} else {
temp_v1_2 = temp_v0->unk10;
temp_t7 = sp60 * 4;
if (temp_v1_2 != 0) {
var_s0_2 = temp_v1_2;
temp_s2 = (var_s1 + 1)->texture;
huh = (var_s1 + 1)->texture->size;
if (huh != 0) {
var_s0 = huh;
} else {
var_s0_2 = 0x1400;
var_s0 = 0x1400;
}
if (((s32) var_s0_2 % 8) != 0) {
var_s0_2 = (((s32) var_s0_2 / 8) * 8) + 8;
if (var_s0 % 8) {
var_s0 = ((var_s0 / 8) * 8) + 8;
}
osInvalDCache(temp_t7 + D_8018D9B4, (u32) var_s0_2);
osPiStartDma(&sp6C, 0, 0, (u32) &sp58[temp_v0->unk4 & 0xFFFFFF], temp_t7 + D_8018D9B4, (u32) var_s0_2, &gDmaMesgQueue);
osInvalDCache(D_8018D9B4 + sp60*4, var_s0);
osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4 + sp60*4, var_s0, &gDmaMesgQueue);
}
mio0decode(D_8018D9B4, (u8 *) &D_8018D9B0[D_8018E118[var_s1->unk_4].offset]);
mio0decode(D_8018D9B4, &D_8018D9B0[D_8018E118[var_s1->unk_4].offset]);
var_s1->texture = NULL;
temp_s1 = var_s1 + 8;
if (var_s5 == 0) {
osRecvMesg(&gDmaMesgQueue, &sp68, 1);
temp_v0_2 = temp_s1->unk8;
if (temp_v0_2 == NULL) {
var_s5 += 1;
var_s1++;
if (var_s4 != 0) break;
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
if ((var_s1 + 1)->texture == NULL) {
var_s4 += 1;
} else {
temp_s2 = (var_s1 + 1)->texture;
huh = (var_s1 + 1)->texture->size;
if (huh != 0) {
var_s0 = huh;
} else {
temp_v1_3 = temp_v0_2->unk10;
var_s0_3 = 0x1400;
if (temp_v1_3 != 0) {
var_s0_3 = temp_v1_3;
}
if (((s32) var_s0_3 % 8) != 0) {
var_s0_3 = (((s32) var_s0_3 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4, (u32) var_s0_3);
osPiStartDma(&sp6C, 0, 0, (u32) &sp58[temp_v0_2->unk4 & 0xFFFFFF], D_8018D9B4, (u32) var_s0_3, &gDmaMesgQueue);
var_s0 = 0x1400;
}
mio0decode((sp60 * 4) + D_8018D9B4, (u8 *) &D_8018D9B0[D_8018E118[temp_s1->unk_4].offset]);
temp_s1->texture = NULL;
var_s1 = temp_s1 + 8;
if (var_s5 == 0) {
osRecvMesg(&gDmaMesgQueue, &sp68, 1);
goto loop_9;
if (var_s0 % 8) {
var_s0 = ((var_s0 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4, var_s0);
osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue);
}
mio0decode(D_8018D9B4 + sp60*4, &D_8018D9B0[D_8018E118[var_s1->unk_4].offset]);
var_s1->texture = NULL;
var_s1++;
if (var_s4 != 0) break;
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
}
}
#else
@@ -5028,93 +5013,124 @@ void func_80099E60(MkTexture *arg0, s32 arg1, s32 arg2) {
var_v1->unk6 = arg2;
}
#ifdef MIPS_TO_C
//generated by m2c commit a39b70e85329b0bcaeb4350510ddb23dc9840dce on Feb-04-2024
#ifdef NON_MATCHING
// https://decomp.me/scratch/rUXbD
// Some fakematch nonsense, may or may not be necessary
// Issue is with instruction ordering near the first `osPiStartDma` call
void func_80099EC4(void) {
OSIoMesg sp68;
void *sp64;
MkTexture *temp_s2;
s16 temp_v0_2;
s16 temp_v0_4;
s8 var_s4;
struct_8018E0E8_entry *temp_s1;
s32 var_s0;
s32 stackPadding0;
s32 stackPadding1;
OSIoMesg sp68;
OSMesg sp64;
s32 huh;
u8 *test;
MkTexture *temp_s2;
struct_8018E0E8_entry *var_s1;
u16 temp_v1;
u16 temp_v1_2;
u16 temp_v1_3;
u16 var_s0;
u16 var_s0_2;
u16 var_s0_3;
void *temp_v0;
void *temp_v0_3;
var_s1 = D_8018E0E8;
temp_s2 = D_8018E0E8->mk64Texture;
var_s4 = 0;
if (temp_s2 != NULL) {
temp_v1 = temp_s2->size;
var_s1 = D_8018E0E8;
temp_s2 = var_s1->mk64Texture;
if (temp_s2 == NULL) return;
huh = temp_s2->size;
if (huh != 0) {
var_s0 = huh;
} else {
var_s0 = 0x1400;
if (temp_v1 != 0) {
var_s0 = temp_v1;
}
if (((s32) var_s0 % 8) != 0) {
var_s0 = (((s32) var_s0 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4, (u32) var_s0);
osPiStartDma(&sp68, 0, 0, (u32) &_textures_0aSegmentRomStart[(s32) temp_s2->textureData & 0xFFFFFF], D_8018D9B4, (u32) var_s0, &gDmaMesgQueue);
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
loop_6:
temp_v0 = var_s1->unk8;
if (temp_v0 == NULL) {
}
if (var_s0 % 8) {
var_s0 = ((var_s0 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4, var_s0);
test = &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)];
osPiStartDma(&sp68, 0, 0, test, D_8018D9B4, var_s0, &gDmaMesgQueue);
if ((var_s0 && var_s0) && var_s0) {}
// osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue);
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
while (1) {
if ((var_s1 + 1)->mk64Texture == NULL) {
var_s4 += 1;
} else {
temp_v1_2 = temp_v0->unk10;
var_s0_2 = 0x1400;
if (temp_v1_2 != 0) {
var_s0_2 = temp_v1_2;
}
if (((s32) var_s0_2 % 8) != 0) {
var_s0_2 = (((s32) var_s0_2 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4 + 0x1400, (u32) var_s0_2);
osPiStartDma(&sp68, 0, 0, (u32) &_textures_0aSegmentRomStart[temp_v0->unk4 & 0xFFFFFF], D_8018D9B4 + 0x1400, (u32) var_s0_2, &gDmaMesgQueue);
}
temp_v0_2 = var_s1->unk4;
mio0decode(D_8018D9B4, D_802BFB80[var_s1->unk6][temp_v0_2 / 2] + ((temp_v0_2 % 2) << 0xD) + 0x4000);
var_s1->mk64Texture = NULL;
temp_s1 = var_s1 + 8;
if (var_s4 == 0) {
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
temp_v0_3 = temp_s1->unk8;
if (temp_v0_3 == NULL) {
var_s4 += 1;
temp_s2 = (var_s1 + 1)->mk64Texture;
huh = (var_s1 + 1)->mk64Texture->size;
if (huh != 0) {
var_s0 = huh;
} else {
temp_v1_3 = temp_v0_3->unk10;
var_s0_3 = 0x1400;
if (temp_v1_3 != 0) {
var_s0_3 = temp_v1_3;
}
if (((s32) var_s0_3 % 8) != 0) {
var_s0_3 = (((s32) var_s0_3 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4, (u32) var_s0_3);
osPiStartDma(&sp68, 0, 0, (u32) &_textures_0aSegmentRomStart[temp_v0_3->unk4 & 0xFFFFFF], D_8018D9B4, (u32) var_s0_3, &gDmaMesgQueue);
var_s0 = 0x1400;
}
temp_v0_4 = temp_s1->unk4;
mio0decode(D_8018D9B4 + 0x1400, D_802BFB80[temp_s1->unk6][temp_v0_4 / 2] + ((temp_v0_4 % 2) << 0xD) + 0x4000);
temp_s1->mk64Texture = NULL;
var_s1 = temp_s1 + 8;
if (var_s4 == 0) {
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
goto loop_6;
if (var_s0 % 8) {
var_s0 = ((var_s0 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4 + 0x1400, var_s0);
osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4 + 0x1400, var_s0, &gDmaMesgQueue);
}
mio0decode(D_8018D9B4, D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array);
var_s1->mk64Texture = NULL;
var_s1++;
if (var_s4 != 0) break;
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
if ((var_s1 + 1)->mk64Texture == NULL) {
var_s4 += 1;
} else {
temp_s2 = (var_s1 + 1)->mk64Texture;
huh = (var_s1 + 1)->mk64Texture->size;
if (huh != 0) {
var_s0 = huh;
} else {
var_s0 = 0x1400;
}
if (var_s0 % 8) {
var_s0 = ((var_s0 / 8) * 8) + 8;
}
osInvalDCache(D_8018D9B4, var_s0);
osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue);
}
mio0decode(D_8018D9B4 + 0x1400, D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array);
var_s1->mk64Texture = NULL;
var_s1++;
if (var_s4 != 0) break;
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099EC4.s")
#endif
void func_8009A238(MkTexture *arg0, s32 arg1) {
s32 var_a3;
s32 temp_v1;
u64 *sp24;
struct_8018E118_entry *temp_v0;
temp_v1 = D_8018E118[arg1].offset;
sp24 = arg0->textureData;
var_a3 = arg0->size;
if (var_a3 % 8) {
var_a3 = ((var_a3 / 8) * 8) + 8;
}
dma_copy_base_7fa3c0(sp24, var_a3, D_8018D9B4);
tkmk00decode(D_8018D9B4, D_8018D9B8, &D_8018D9B0[temp_v1], 1);
D_8018E118[arg1].textureData = sp24;
}
void func_8009A2F0(struct_8018E0E8_entry *arg0) {
MkTexture *var_a0;
struct_8018E0E8_entry *temp_v0;
temp_v0 = segmented_to_virtual_dupe_2(arg0);
var_a0 = temp_v0->mk64Texture;
while (var_a0 != NULL) {
if (var_a0 == NULL) break;
func_800996BC(var_a0, 0);
if (1) {}
temp_v0++;
var_a0 = temp_v0->mk64Texture;
}
}
void func_8009A344(void) {
s32 index;
for(index = 0; index < D_8018DEE0_SIZE; index++) {
@@ -5732,9 +5748,6 @@ Gfx *func_8009C434(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s
return arg0;
}
#ifdef NON_MATCHING
// https://decomp.me/scratch/TK1UV
// Some register allocation differences when accessing `D_802BFB80`
Gfx *func_8009C708(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) {
s32 var_t0;
s32 thing;
@@ -5764,15 +5777,12 @@ Gfx *func_8009C708(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s
break;
}
if (arg5 >= 0) {
arg0 = func_80097E58(arg0, var_t0, 0, 0U, var_s1->width, var_s1->height, var_s1->dX + arg2, var_s1->dY + arg3, D_802BFB80[arg1->unk14][arg4 / 2][((arg4 % 2) + 2) * 2].pixel_index_array, var_s1->width, var_s1->height, (u32) arg5);
arg0 = func_80097E58(arg0, var_t0, 0, 0U, var_s1->width, var_s1->height, var_s1->dX + arg2, var_s1->dY + arg3, D_802BFB80.arraySize4[arg1->unk14][arg4 / 2][(arg4 % 2) + 2].pixel_index_array, var_s1->width, var_s1->height, (u32) arg5);
}
var_s1++;
}
return arg0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009C708.s")
#endif
void func_8009C918(void) {
s32 someIndex;
@@ -7596,10 +7606,6 @@ void func_800A0AD0(UNUSED struct_8018D9E0_entry *arg0) {
}
}
#ifdef NON_MATCHING
// There's something going on with the accessing of D_800E86C4 that's causing lots of issues
// Also, the `(D_800E86C4[var_s5] % 10) + 0x10` stuff is doing something weird with the %,
// lots of instruction ordering issues
void func_800A0B80(struct_8018D9E0_entry *arg0) {
s32 temp_a2;
s32 temp_s1;
@@ -7614,19 +7620,21 @@ void func_800A0B80(struct_8018D9E0_entry *arg0) {
if (D_800E86C4[var_s5] == 0) continue;
temp_s1 = var_s5 * 0xA;
if (D_800E86C4[var_s5] < 0xA) {
func_800A08D8((D_800E86C4[var_s5] + 0x10), 0x00000032, arg0->row + temp_s1 + 1);
var_s0 = D_800E86C4[var_s5];
if (var_s0 < 0xA) {
func_800A08D8(var_s0 + 0x10, 0x00000032, arg0->row + temp_s1 + 1);
} else {
func_800A08D8(((D_800E86C4[var_s5] % 10) + 0x10), 0x00000035, arg0->row + temp_s1 + 1);
var_s0 %= 10;
func_800A08D8(var_s0 + 0x10, 0x00000035, arg0->row + temp_s1 + 1);
func_800A08D8(0x11U, 0x0000002F, arg0->row + temp_s1 + 1);
}
temp_s2 = arg0->row + temp_s1 + 1;
if (pfsError[D_800E86C4[var_s5] - 1] == 0) {
temp_s4 = &pfsState[D_800E86C4[var_s5] - 1];
temp_s1 = func_800A095C(temp_s4->game_name, 0x00000010, 0x0000004F, temp_s2) * 8;
var_s0 = func_800A095C(temp_s4->game_name, 0x00000010, 0x0000004F, temp_s2);
if (temp_s4->ext_name[0] != 0) {
func_800A08D8(0x3CU, temp_s1 + 0x4F, temp_s2);
func_800A08D8(temp_s4->ext_name[0], temp_s1 + 0x57, temp_s2);
func_800A08D8(0x3CU, (var_s0 * 8) + 0x4F, temp_s2);
func_800A08D8(temp_s4->ext_name[0], (var_s0 * 8) + 0x57, temp_s2);
}
var_s1 = 0x10;
var_s0 = (temp_s4->file_size + 0xFF) >> 8;
@@ -7640,9 +7648,6 @@ void func_800A0B80(struct_8018D9E0_entry *arg0) {
}
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, 319, 239);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A0B80.s")
#endif
void func_800A0DFC(void) {
s32 temp_t6;
@@ -8918,20 +8923,19 @@ void render_pause_battle(struct_8018D9E0_entry *arg0) {
}
}
#ifdef NON_MATCHING
// Pretty big diff honestly. Mostly register allocation stuff though
void func_800A54EC(void) {
Unk_D_800E70A0 sp50;
s32 why;
s32 whyTheSequel;
Unk_D_800E70A0 *huh;
Unk_D_800E70A0 *var_v1;
struct_8018D9E0_entry *sp48;
s32 whyTheSequel;
s32 why;
Unk_D_800E70A0 *huh;
if (gIsGamePaused == 0) return;
why = gModeSelection;
sp48 = find_8018D9E0_entry(0x000000C7);
if (why) {} // ?????
gSPViewport(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(D_802B8880));
guOrtho(&gGfxPool->mtxEffect[gMatrixEffectCount], 0.0f, 319.0f, 239.0f, 0.0f, -100.0f, 100.0f, 1.0f);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxEffect[gMatrixEffectCount++]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
@@ -8942,13 +8946,13 @@ void func_800A54EC(void) {
var_v1 = &D_800E8538[0];
break;
case 2:
var_v1 = &D_800E8540[(gIsGamePaused - 1) + (gScreenModeSelection * 4)];
var_v1 = &D_800E8540[(gScreenModeSelection * 4) + (gIsGamePaused - 1)];
break;
case 0:
var_v1 = &D_800E85C0[(gIsGamePaused - 1) + (gScreenModeSelection * 4)];
var_v1 = &D_800E85C0[(gScreenModeSelection * 4) + (gIsGamePaused - 1)];
break;
case 3:
var_v1 = &D_800E8600[(gIsGamePaused - 1) + (gScreenModeSelection * 4)];
var_v1 = &D_800E8600[(gScreenModeSelection * 4) + (gIsGamePaused - 1)];
break;
}
whyTheSequel = D_800F0B50[why];
@@ -8956,39 +8960,34 @@ void func_800A54EC(void) {
sp50.row = (var_v1->row + ((sp48->cursor - whyTheSequel) * 0xD)) - 8;
func_800A66A8(sp48, &sp50);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A54EC.s")
#endif
#ifdef NON_MATCHING
// https://decomp.me/scratch/esKnl
// `var_v1` is ending up in `v0` instead of `v1`. For some reason :(
void func_800A5738(struct_8018D9E0_entry *arg0) {
Unk_D_800E70A0 sp98;
char **stackPadding0;
s32 stackPadding0;
s32 stackPadding1;
s32 stackPadding2;
s32 stackPadding3;
f32 why;
char sp84[3];
s32 stackPadding3;
s32 stackPadding4;
Unk_D_800E70A0 *var_v0_9;
s32 temp_a0;
s32 var_v1;
s32 var_s1;
s32 var_s2;
s32 temp_v0;
s32 zero = 0;
Unk_D_800E70A0 *var_v0_9;
char sp5C[3];
var_v1 = arg0->cursor;
if (var_v1 == 0) {
if (arg0->cursor == 0) {
if ((arg0->unk1C >= 0x1E) && ((gGlobalTimer / 16) % 2)) {
gDisplayListHead = draw_box(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (get_string_width(gTextPauseButton[5]) * 0.8f) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096);
why = get_string_width(gTextPauseButton[5]) * 0.8f;
gDisplayListHead = draw_box(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (why) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096);
set_text_color(1);
func_80093324(0x000000BF, 0x00000030, gTextPauseButton[5], 0, 0.8f, 0.8f);
}
} else {
if (var_v1 == 1) {
if (arg0->cursor == 1) {
var_s1 = arg0->unk1C;
var_s2 = (s32) (arg0->unk1C * 0xFF) / 140;
} else {
@@ -9109,6 +9108,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
break;
case 35: /* switch 2 */
case 36: /* switch 2 */
if (0) { } // wtf?
var_v0_9 = &D_800E7420[arg0->cursor - 35];
break;
default:
@@ -9119,9 +9119,6 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
func_800A66A8(arg0, &sp98);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A5738.s")
#endif
void func_800A6034(struct_8018D9E0_entry *arg0) {
char *text;
@@ -9223,77 +9220,47 @@ void func_800A638C(struct_8018D9E0_entry *arg0) {
}
}
#ifdef MIPS_TO_C
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023
// ? guMtxCatL(Mtx *, Mtx *, Mtx *); /* extern */
void func_800A66A8(struct_8018D9E0_entry *arg0, s16 *arg1) {
Gfx *temp_v0;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
#ifdef NON_MATCHING
// https://decomp.me/scratch/GUqCE
// All the math stuff at the top is messed up
void func_800A66A8(struct_8018D9E0_entry *arg0, Unk_D_800E70A0 *arg1) {
Mtx *temp_s0;
Mtx *temp_s1;
f32 temp_f0_2;
f32 temp_f2;
f32 temp_f12;
f32 temp_f14;
f32 temp_f2;
f64 temp_f0;
temp_s1 = &gGfxPool->mtxEffect[gMatrixEffectCount];
temp_f0 = (f64) arg0->unk24;
if (temp_f0 > 1.5) {
arg0->unk24 = (f32) (temp_f0 * 0.95);
if (arg0->unk24 > 1.5) {
arg0->unk24 *= 0.95;
} else {
arg0->unk24 = 1.5f;
}
temp_f0_2 = arg0->unk24;
temp_f2 = temp_f0_2 * 3.0f * (f32) arg0->unk8;
temp_f12 = temp_f0_2 * 4.0f;
temp_f14 = temp_f0_2 * 2.0f;
D_8018EDA0 += temp_f14;
temp_f2 = arg0->unk24 * 3.0f * arg0->unk8;
temp_f12 = arg0->unk24 * 4.0f;
temp_f14 = arg0->unk24 * 2.0f;
D_8018EDA4 = temp_f2;
D_8018EDA8 = temp_f12;
D_8018EDAC = temp_f14;
D_8018ED98 += temp_f2;
D_8018ED9C += temp_f12;
D_8018ED98 += D_8018EDA4;
D_8018ED9C += D_8018EDA8;
D_8018EDA0 += D_8018EDAC;
guScale(temp_s1, 1.2f, 1.2f, 1.2f);
temp_s0 = temp_s1 + 0x40;
temp_s0 = temp_s1 + 1;
guRotate(temp_s0, D_8018ED9C, 0.0f, 1.0f, 0.0f);
guMtxCatL(temp_s1, temp_s0, temp_s1);
guRotate(temp_s0, D_8018EDA0, 0.0f, 0.0f, 1.0f);
guMtxCatL(temp_s1, temp_s0, temp_s1);
guRotate(temp_s0, D_8018ED98, 1.0f, 0.0f, 0.0f);
guMtxCatL(temp_s1, temp_s0, temp_s1);
guTranslate(temp_s0, (f32) arg1->unk0, (f32) arg1->unk2, 0.0f);
guTranslate(temp_s0, arg1->column, arg1->row, 0.0f);
guMtxCatL(temp_s1, temp_s0, temp_s1);
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->words.w0 = 0x01020040;
temp_v0->words.w1 = (s32) (&gGfxPool->mtxEffect[gMatrixEffectCount]) & 0x1FFFFFFF;
temp_v0_2 = gDisplayListHead;
gMatrixEffectCount += 1;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->words.w0 = 0xB6000000;
temp_v0_2->words.w1 = 0x00020000;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w1 = 0xFF33FFFF;
temp_v0_3->words.w0 = 0xFC121824;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w1 = 0;
temp_v0_4->words.w0 = 0xC0000000;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w1 = 0x00504340;
temp_v0_5->words.w0 = 0xB900031D;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->words.w0 = 0x06000000;
temp_v0_6->words.w1 = (u32) D_0D003090;
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxEffect[gMatrixEffectCount]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
gDPNoOp(gDisplayListHead++);
gDPSetRenderMode(gDisplayListHead++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
gSPDisplayList(gDisplayListHead++, D_0D003090);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A66A8.s")
+10
View File
@@ -171,6 +171,8 @@ void func_80099EC4(void);
void func_80099A70(void);
void func_80099A94(MkTexture *, s32);
void func_80099AEC(void);
void func_8009A238(MkTexture*, s32);
void func_8009A2F0(struct_8018E0E8_entry*);
void func_8009A344(void);
s32 func_8009A374(MkAnimation*);
s32 func_8009A478(MkAnimation*, s32);
@@ -599,4 +601,12 @@ extern s32 gControllerPak1NumPagesFree;
extern s32 gControllerPak1FileNote;
extern s32 gControllerPak2FileNote;
extern f32 D_8018ED98;
extern f32 D_8018ED9C;
extern f32 D_8018EDA0;
extern f32 D_8018EDA4;
extern f32 D_8018EDA8;
extern f32 D_8018EDAC;
#endif
+1 -1
View File
@@ -13,7 +13,7 @@ u8 frameBufferPadding[0x5750];
u8 frameBufferPadding[0x5810];
#endif
struct_D_802BFB80 D_802BFB80[2][2][8];
union_D_802BFB80 D_802BFB80;
struct_D_802DFB80 D_802DFB80[2][2][8];
#ifdef AVOID_UB
struct_D_802F1F80 D_802F1F80[2][4][8];
+16 -16
View File
@@ -265,12 +265,12 @@ void func_80020524(void) {
func_80027560(D_80164AD0[i], D_80164AB0[i], D_80164AC0[i], D_80164AC0[i], D_801651D0[D_80164AC0[i]][D_80164AB0[i]]);
mio0decode(D_802DFB80[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1]].unk_00,
D_802BFB80[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1]].pixel_index_array);
D_802BFB80.arraySize8[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1]].pixel_index_array);
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
}
mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].unk_00,
D_802BFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array);
D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array);
}
void func_8002088C(void) {
@@ -291,11 +291,11 @@ void func_8002088C(void) {
for (var_s0 = 1; var_s0 < gPlayersToRenderCount; var_s0++) {
func_80027560(D_80164AD0[var_s0], D_80164AB0[var_s0], D_80164AC0[var_s0], D_80164AC0[var_s0], D_801651D0[D_80164AC0[var_s0]][D_80164AB0[var_s0]]);
mio0decode(D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]].unk_00,
D_802BFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]].pixel_index_array);
D_802BFB80.arraySize8[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]].pixel_index_array);
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
}
mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].unk_00,
D_802BFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array);
D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array);
}
void func_80020BF4(void) {
@@ -310,11 +310,11 @@ void func_80020BF4(void) {
for (var_s0 = 1; var_s0 < gPlayersToRenderCount; var_s0++) {
func_80027560(D_80164AD0[var_s0], D_80164AB0[var_s0] + 4, D_80164AC0[var_s0], D_80164AC0[var_s0] - 2, D_801651D0[D_80164AC0[var_s0]][D_80164AB0[var_s0]]);
mio0decode(D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].unk_00,
D_802BFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array);
D_802BFB80.arraySize8[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array);
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
}
mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].unk_00,
D_802BFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array);
D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array);
}
void func_80020F1C(void) {
@@ -329,11 +329,11 @@ void func_80020F1C(void) {
for (var_s0 = 1; var_s0 < gPlayersToRenderCount; var_s0++) {
func_80027560(D_80164AD0[var_s0], D_80164AB0[var_s0] + 4, D_80164AC0[var_s0], D_80164AC0[var_s0] - 2, D_801651D0[D_80164AC0[var_s0]][D_80164AB0[var_s0]]);
mio0decode(D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].unk_00,
D_802BFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array);
D_802BFB80.arraySize8[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array);
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
}
mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].unk_00,
D_802BFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array);
D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array);
}
void try_render_player(Player *player, s8 playerId, s8 arg2) {
@@ -1392,11 +1392,11 @@ void kart_render(Player *player, s8 playerId, s8 arg2, s8 arg3) {
gPlayerPalette = &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId * 0x100];
#endif
if ((arg2 == 0) || (arg2 == 1)) {
D_80164B08 = &D_802BFB80[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0];
D_80164B0C = &D_802BFB80[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0x7C0];
D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0];
D_80164B0C = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0x7C0];
} else {
D_80164B08 = &D_802BFB80[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0];
D_80164B0C = &D_802BFB80[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0x7C0];
D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0];
D_80164B0C = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0x7C0];
}
mtxf_translate_rotate(sp1A4, sp154, sp14C);
mtxf_scale2(sp1A4, gCharacterSize[player->characterId] * player->size);
@@ -1510,11 +1510,11 @@ void ghost_render(Player *player, s8 playerId, s8 arg2, s8 arg3) {
gPlayerPalette = &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId * 0x100];
#endif
if ((arg2 == 0) || (arg2 == 1)) {
D_80164B08 = &D_802BFB80[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0];
D_80164B0C = &D_802BFB80[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0x7C0];
D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0];
D_80164B0C = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0x7C0];
} else {
D_80164B08 = &D_802BFB80[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0];
D_80164B0C = &D_802BFB80[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0x7C0];
D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0];
D_80164B0C = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0x7C0];
}
mtxf_translate_rotate(sp12C, spDC, spD4);
+2 -2
View File
@@ -1078,12 +1078,12 @@ void func_8003CD98(Player *player, Camera *camera, s8 playerId, s8 arg3) {
load_kart_palette(player, playerId, arg3, 0);
load_kart_palette(player, playerId, arg3, 1);
load_kart_texture(player, playerId, arg3, arg3, 0);
mio0decode((u8 *) &D_802DFB80[0][arg3][playerId], (u8 *) &D_802BFB80[0][arg3][playerId]);
mio0decode((u8 *) &D_802DFB80[0][arg3][playerId], (u8 *) &D_802BFB80.arraySize8[0][arg3][playerId]);
} else {
load_kart_palette(player, playerId, arg3, 0);
load_kart_palette(player, playerId, arg3, 1);
load_kart_texture(player, (s8) (playerId + 4), arg3, (s8) (arg3 - 2), 0);
mio0decode((u8 *) &D_802DFB80[0][arg3 - 2][playerId + 4], (u8 *) &D_802BFB80[0][arg3 - 2][playerId + 4]);
mio0decode((u8 *) &D_802DFB80[0][arg3 - 2][playerId + 4], (u8 *) &D_802BFB80.arraySize8[0][arg3 - 2][playerId + 4]);
}
D_801650D0[arg3][playerId] = player->animFrameSelector[arg3];
+10 -10
View File
@@ -58,8 +58,8 @@ s32 D_80162DFC;
s32 D_80162E00;
u32 *D_800DC710 = (u32 *) &D_802BFB80[0][2][3];
u32 *D_800DC714 = (u32 *) &D_802BFB80[1][1][3];
u32 *D_800DC710 = (u32 *) &D_802BFB80.arraySize8[0][2][3];
u32 *D_800DC714 = (u32 *) &D_802BFB80.arraySize8[1][1][3];
extern u8 _kart_texturesSegmentRomStart;
@@ -70,7 +70,7 @@ extern StaffGhost *d_royal_raceway_staff_ghost;
extern StaffGhost *d_luigi_raceway_staff_ghost;
void func_80004EF0(void) {
D_80162DA4 = (u32 *) &D_802BFB80[0][2][3];
D_80162DA4 = (u32 *) &D_802BFB80.arraySize8[0][2][3];
osInvalDCache(&D_80162DA4[0], 0x4000);
osPiStartDma(&gDmaIoMesg, 0, 0, (uintptr_t) ((D_80162DC4 & 0xFFFFFF) + &_kart_texturesSegmentRomStart), D_80162DA4, 0x4000, &gDmaMesgQueue);
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
@@ -79,13 +79,13 @@ void func_80004EF0(void) {
}
void func_80004FB0(void) {
D_80162DB4 = (u32 *) &D_802BFB80[0][D_80162DD0][3];
D_80162DB4 = (u32 *) &D_802BFB80.arraySize8[0][D_80162DD0][3];
D_80162DAC = *D_80162DB4 & 0xFF0000;
D_80162DB0 = 0;
}
void func_80004FF8(void) {
D_80162D94 = (u32 *) &D_802BFB80[0][D_80162DC8][3];
D_80162D94 = (u32 *) &D_802BFB80.arraySize8[0][D_80162DC8][3];
D_80162D8C = (s32) *D_80162D94 & 0xFF0000;
D_80162D90 = 0;
}
@@ -162,7 +162,7 @@ s32 func_800051C4(void) {
}
void func_8000522C(void) {
D_80162D94 = (u32 *) &D_802BFB80[0][D_80162DC8][3];
D_80162D94 = (u32 *) &D_802BFB80.arraySize8[0][D_80162DC8][3];
mio0decode((u8 *) D_800DC714, (u8 *) D_80162D94);
D_80162D8C = (s32) (*D_80162D94 & 0xFF0000);
D_80162D90 = 0;
@@ -180,7 +180,7 @@ void func_800052A4(void) {
D_80162DCC = 0;
}
temp_v0 = D_80162DB8;
D_80162D80 = (void *) &D_802BFB80[0][D_80162DC8][3];
D_80162D80 = (void *) &D_802BFB80.arraySize8[0][D_80162DC8][3];
D_80162D84 = temp_v0;
D_80162D86 = temp_v0;
}
@@ -213,7 +213,7 @@ void func_80005310(void) {
} else {
D_80162DD8 = 1U;
D_80162DBC = (u32 *) &D_802BFB80[0][D_80162DCC][3];
D_80162DBC = (u32 *) &D_802BFB80.arraySize8[0][D_80162DCC][3];
D_80162DBC[0] = -1;
D_80162DB8 = 0;
D_80162DDC = 0;
@@ -498,7 +498,7 @@ void func_80005B18(void) {
func_80005AE8(gPlayerTwo);
func_80005AE8(gPlayerThree);
} else {
D_80162D80 = D_802BFB80[0][D_80162DC8][3].pixel_index_array;
D_80162D80 = D_802BFB80.arraySize8[0][D_80162DC8][3].pixel_index_array;
D_80162D84 = D_80162D86;
D_80162DD0 = D_80162DCC;
D_80162DE8 = gPlayerOne->characterId;
@@ -510,7 +510,7 @@ void func_80005B18(void) {
}
} else {
if ((gLapCountByPlayerId[0] == 3) && (D_80162DDC == 0) && (D_80162DF8 == 1)) {
D_80162D80 = D_802BFB80[0][D_80162DC8][3].pixel_index_array;
D_80162D80 = D_802BFB80.arraySize8[0][D_80162DC8][3].pixel_index_array;
D_80162D84 = D_80162D86;
D_80162DDC = 1;
}