Assorted, unrelated matches (#267)

* Assorted matches

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran
2022-11-01 17:07:35 -04:00
committed by GitHub
parent 1483ddaa03
commit 4647cdcd7e
34 changed files with 1877 additions and 3697 deletions
+25 -91
View File
@@ -4,7 +4,9 @@
#include <common_structs.h>
#include "main.h"
#include "variables.h"
#include "common_textures.h"
#include "code_8001F980.h"
#include "code_800431B0.h"
#include "code_80280650.h"
void func_80280650(void) {
@@ -177,100 +179,32 @@ void func_80280A28(Vec3f arg0, Vec3s arg1, f32 arg2) {
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_80164AF0 + 0x3EB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
//void func_8004B35C(s16, s16, s16, s16); // extern
//void func_80280A28(?, f32 *, s16 *, ?); // extern
extern u8 D_0D008DB8;
extern u8 D_0D008E48;
extern s16 D_80164AF0;
extern s32 D_8018D48C;
#ifdef NON_MATCHING
extern u32 D_8018D48C;
struct UnkStruct80280B50 {
s32 unk0;
s32 unk4;
s32 unk8;
};
extern Camera *camera1;
void func_80280B50(struct UnkStruct80280B50 *arg0, s32 arg1, s32 arg2, s16 arg3) {
f32 sp54 = arg0->unk8;
f32 sp50 = arg0->unk4;
f32 sp4C = arg0->unk0;
s16 sp48 = 0;
s32 sp46 = camera1->unk26;
s16 sp44 = 0;
void *sp1C;
//s16 *temp_a1 = &sp44;
//sp4C = arg0->unk0;
//temp_a1 = &sp44;
//sp50 = arg0->unk4;
//sp44 = 0;
//sp54 = arg0->unk8;
//sp48 = 0;
//sp46 = camera1->unk26;
func_80280A28(arg1, &sp4C, &sp44, arg1);
void func_80280B50(Vec3f arg0, f32 arg1, s32 rgb, s16 alpha) {
Vec3f sp4C;
Vec3s sp44;
s16 red;
s16 green;
s16 blue;
sp4C[0] = arg0[0];
sp4C[1] = arg0[1];
sp4C[2] = arg0[2];
sp44[0] = 0;
sp44[1] = camera1->rot[1];
sp44[2] = 0;
func_80280A28(sp4C, sp44, arg1);
gSPDisplayList(gDisplayListHead++, D_0D008DB8);
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, D_8018D48C);
gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPLoadSync(gDisplayListHead++);
gDPLoadBlock(gDisplayListHead++, 1, 0, 0, 4082, 0);
gDPPipeSync(gDisplayListHead++);
gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, 4, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0x7C0, 0x7C0);
func_8004B35C((arg2 >> 0x10) & 0xFF, (arg2 >> 8) & 0xFF, arg2 & 0xFF, arg3);
gSPDisplayList(gDisplayListHead, D_0D008E48);
D_80164AF0++;
/*
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->unk0 = 0x6000000;
temp_v0->unk4 = &D_0D008DB8;
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0xFD700000;
temp_v0_2->unk4 = D_8018D48C;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk4 = 0x7000000;
temp_v0_3->unk0 = 0xF5700000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk4 = 0;
temp_v0_4->unk0 = 0xE6000000;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk4 = 0x71FF200;
temp_v0_5->unk0 = 0xF3000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk4 = 0;
temp_v0_6->unk0 = 0xE7000000;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk4 = 0;
temp_v0_7->unk0 = 0xF5680800;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
sp1C = temp_v0_8;
temp_v0_8->unk4 = 0x7C07C;
temp_v0_8->unk0 = 0xF2000000;
func_8004B35C((arg2 >> 0x10) & 0xFF, (arg2 >> 8) & 0xFF, arg2 & 0xFF, arg3);
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
temp_v0_9->unk0 = 0x6000000;
temp_v0_9->unk4 = &D_0D008E48;
*/;
gDPLoadTextureBlock(gDisplayListHead++, D_8018D48C, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
// The exact order of operations for red/green/blue is slightly wrong...
red = (rgb >> 0x10) & 0xFF;
green = (rgb >> 0x08) & 0xFF;
blue = (rgb >> 0x00) & 0xFF;
func_8004B35C(red, green, blue, alpha);
gSPDisplayList(gDisplayListHead++, D_0D008E48);
D_80164AF0 += 1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80280650/func_80280B50.s")