mirror of
https://github.com/n64decomp/mk64
synced 2026-08-17 12:59:29 -04:00
wip decomp of 80040E50, documentation of dma code, and other (#215)
* Math decomp and more.
This commit is contained in:
+23
-26
@@ -290,40 +290,42 @@ uintptr_t ***gKartTextureTable1[] = {
|
||||
gKartBowserTable1,
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Place DMA mio0 compressed character textures in a buffer.
|
||||
* Later, this data becomes decompressed.
|
||||
*
|
||||
* The player struct tracks the texture indices to load.
|
||||
*
|
||||
* @param player
|
||||
* @param arg1 Appears to be character index; 0-7.
|
||||
* @param arg2 Rom buffer index appears to always be 0-3. Sometimes subtracted by 2.
|
||||
* @param arg3 Second buffer index appears to always be 0-3.
|
||||
* @param arg4 First buffer index always zero.
|
||||
**/
|
||||
void func_80027040(Player *player, s8 arg1, s8 arg2, s8 arg3, s8 arg4) {
|
||||
|
||||
//s32 tmp = player->unk_0BC;
|
||||
//void *buf; // = &D_802DFB80[arg4][arg3][arg1 * 0x920];
|
||||
s32 temp;
|
||||
if (((((((player->unk_0BC & 0x80) == 0x80) || ((player->unk_0BC & 0x40) == 0x40)) || ((player->unk_0BC & 0x80000) == 0x80000)) ||
|
||||
((player->unk_0BC & 0x800000) == 0x800000)) || ((player->unk_0BC & 0x20000) == 0x20000)) || ((player->unk_044 & 0x800) != 0))
|
||||
((player->unk_0BC & 0x800000) == 0x800000)) || ((player->unk_0BC & 0x20000) == 0x20000)) || ((player->unk_044 & 0x800) != 0))
|
||||
{
|
||||
// temp_v1 = player + (arg2 * 2);
|
||||
|
||||
if (player->unk_244[arg2] != 0) {
|
||||
//buf = &D_802DFB80[arg2][arg1 * 0x920];
|
||||
//buf = &D_802DFB80[arg4][arg3][arg1 * 0x920];
|
||||
// temp_s0 = &D_802DFB80[0][0][(arg4 * 0x9200) + (arg3 * 0x4900) + (arg1 * 0x920)];
|
||||
//temp = 0x30;
|
||||
//if (temp);
|
||||
osInvalDCache(&D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId]);
|
||||
//temp = player->characterId;
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(gKartTextureTable1[player->characterId][player->unk_24C[arg2]][player->unk_244[arg2]])], &D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId], &gDmaMesgQueue);
|
||||
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
|
||||
} else {
|
||||
//buf = &D_802DFB80[arg4][arg3][arg1 * 0x920];
|
||||
osInvalDCache(&D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId]);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(gKartTextureTable0[player->characterId][player->unk_24C[arg2]][player->unk_244[arg2]])], &D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId], &gDmaMesgQueue);
|
||||
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
|
||||
}
|
||||
} else if (((((player->unk_0BC & 0x400) == 0x400) || ((player->unk_0BC & 0x1000000) == 0x1000000)) || ((player->unk_0BC & 0x2000000) == 0x2000000)) || ((player->unk_0BC & 0x10000) == 0x10000))
|
||||
} else if (((((player->unk_0BC & 0x400) == 0x400) || ((player->unk_0BC & 0x1000000) == 0x1000000)) ||
|
||||
((player->unk_0BC & 0x2000000) == 0x2000000)) || ((player->unk_0BC & 0x10000) == 0x10000))
|
||||
{
|
||||
//temp = player->unk_0A8 >> 8;
|
||||
//buf = &D_802DFB80[arg4][arg3][arg1 * 0x920];
|
||||
|
||||
osInvalDCache(&D_802DFB80[arg4][arg3][arg1 * 0x920], 0x780U);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(gKartTextureGroup18s[player->characterId][player->unk_0A8 >> 8])], &D_802DFB80[arg4][arg3][arg1 * 0x920], 0x900U, &gDmaMesgQueue);
|
||||
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
|
||||
} else {
|
||||
//buf = &D_802DFB80[arg4][arg3][arg1 * 0x920];
|
||||
osInvalDCache(&D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId]);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(gKartTextureTable0[player->characterId][player->unk_24C[arg2]][player->unk_244[arg2]])], &D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId], &gDmaMesgQueue);
|
||||
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
|
||||
@@ -331,38 +333,33 @@ void func_80027040(Player *player, s8 arg1, s8 arg2, s8 arg3, s8 arg4) {
|
||||
}
|
||||
|
||||
void func_80027560(Player *player, s8 arg1, s8 arg2, s8 arg3, s8 arg4) {
|
||||
//s32 temp_v0;
|
||||
s32 temp = player->unk_0BC;
|
||||
|
||||
//temp_v0 = player->unk_0BC;
|
||||
if (((temp & 0x80) == 0x80) || ((temp & 0x40) == 0x40) || ((temp & 0x80000) == 0x80000) || ((temp & 0x800000) == 0x800000) || ((temp & 0x20000) == 0x20000) || ((player->unk_044 & 0x800) != 0))
|
||||
if (((temp & 0x80) == 0x80) || ((temp & 0x40) == 0x40) || ((temp & 0x80000) == 0x80000) ||
|
||||
((temp & 0x800000) == 0x800000) || ((temp & 0x20000) == 0x20000) || ((player->unk_044 & 0x800) != 0))
|
||||
{
|
||||
//temp_v1_2 = player + (arg2 * 2);
|
||||
|
||||
if (player->unk_244[arg2] != 0) {
|
||||
//temp_s0 = D_802DFB80[arg4][arg3][arg1 * 0x920];
|
||||
osInvalDCache(&D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId]);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(gKartTextureTable1[player->characterId][player->unk_24C[arg2]][player->unk_244[arg2]])], &D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId], &gDmaMesgQueue);
|
||||
} else {
|
||||
//temp_s0 = D_802DFB80[arg4][arg3][arg1 * 0x920];
|
||||
osInvalDCache(&D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId]);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(gKartTextureTable0[player->characterId][player->unk_24C[arg2]][player->unk_244[arg2]])], &D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId], &gDmaMesgQueue);
|
||||
}
|
||||
} else if (((temp & 0x400) == 0x400) || ((temp & 0x01000000) == 0x01000000) || ((temp & 0x02000000) == 0x02000000) || ((temp & 0x10000) == 0x10000))
|
||||
} else if (((temp & 0x400) == 0x400) || ((temp & 0x01000000) == 0x01000000) ||
|
||||
((temp & 0x02000000) == 0x02000000) || ((temp & 0x10000) == 0x10000))
|
||||
{
|
||||
// temp_s0 = D_802DFB80[arg4][arg3][arg1 * 0x920];
|
||||
osInvalDCache(&D_802DFB80[arg4][arg3][arg1 * 0x920], 0x780);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(gKartTextureGroup18s[player->characterId][player->unk_0A8 >> 8])], &D_802DFB80[arg4][arg3][arg1 * 0x920], 0x900, &gDmaMesgQueue);
|
||||
} else {
|
||||
//temp_s0 = D_802DFB80[arg4][arg3][arg1 * 0x920];
|
||||
osInvalDCache(&D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId]);
|
||||
//temp_v1 = player + (arg2 * 2);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(gKartTextureTable0[player->characterId][player->unk_24C[arg2]][player->unk_244[arg2]])], &D_802DFB80[arg4][arg3][arg1 * 0x920], D_800DDEB0[player->characterId], &gDmaMesgQueue);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80027A20(Player *player, s8 arg1, s8 arg2, s8 arg3) {
|
||||
// @bug: Undefined Behaviour UB
|
||||
// untested fix
|
||||
// untested fix. [arg1 << 8] may be a fake match.
|
||||
#ifdef AVOID_UB
|
||||
void *temp_s0 = &D_802F1F80[arg3][arg2][0];
|
||||
#else
|
||||
|
||||
+235
-205
@@ -5,6 +5,7 @@
|
||||
#include "main.h"
|
||||
#include "variables.h"
|
||||
#include "math_util.h"
|
||||
|
||||
#include "memory.h"
|
||||
|
||||
#pragma intrinsic (sqrtf)
|
||||
@@ -339,13 +340,12 @@ s32 vec3f_set_dupe_2_electric_boogaloo(Vec3f arg0, f32 arg1, f32 arg2, f32 arg3)
|
||||
}
|
||||
|
||||
Vec3f *func_80041530(Vec3f dest) {
|
||||
f32 temp_f16;
|
||||
f32 invsqrt = 1.0f / sqrtf(dest[0] * dest[0] + dest[1] * dest[1] + dest[2] * dest[2]);
|
||||
|
||||
temp_f16 = 1.0f / sqrtf((dest[0] * dest[0]) + (dest[1] * dest[1]) + (dest[2] * dest[2]));
|
||||
dest[0] = dest[0] * temp_f16;
|
||||
dest[1] = dest[1] * temp_f16;
|
||||
dest[2] = dest[2] * temp_f16;
|
||||
return &dest;
|
||||
dest[0] = dest[0] * invsqrt;
|
||||
dest[1] = dest[1] * invsqrt;
|
||||
dest[2] = dest[2] * invsqrt;
|
||||
return &dest;
|
||||
}
|
||||
|
||||
Vec3f *func_80041594(Vec3f arg0, Vec3f arg1, Vec3f arg2) {
|
||||
@@ -459,130 +459,145 @@ s32 func_80041980(Vec3f arg0, Camera *arg1, u16 arg2) {
|
||||
}
|
||||
|
||||
void func_800419F8(void) {
|
||||
Vec3f sp24;
|
||||
Vec3f sp18;
|
||||
Vec3f sp24;
|
||||
|
||||
sp24[0] = 0.0f;
|
||||
sp24[1] = 0.0f;
|
||||
sp24[2] = 120.0f;
|
||||
func_80042D14(sp18, sp24, D_80165834);
|
||||
D_80165840[0] = sp18[0];
|
||||
D_80165840[1] = sp18[1];
|
||||
D_80165840[2] = sp18[2];
|
||||
sp18[0] = 0.0f;
|
||||
sp18[1] = 0.0f;
|
||||
sp18[2] = 120.0f;
|
||||
func_80042D14(sp24, sp18, D_80165834);
|
||||
D_80165840[0] = sp24[0];
|
||||
D_80165840[1] = sp24[1];
|
||||
D_80165840[2] = sp24[2];
|
||||
}
|
||||
|
||||
UNUSED void func_80041A70(void){
|
||||
return;
|
||||
UNUSED func_80041A70(void) {
|
||||
|
||||
}
|
||||
|
||||
void func_80041A78(Mat4 arg0, s32 arg1, s32 arg2) {
|
||||
arg0[0][0] = 1.0f;
|
||||
arg0[1][1] = 1.0f;
|
||||
arg0[2][2] = 1.0f;
|
||||
arg0[1][0] = 0.0f;
|
||||
arg0[2][0] = 0.0f;
|
||||
arg0[3][0] = arg1;
|
||||
arg0[0][1] = 0.0f;
|
||||
arg0[1][1] = 1.0f;
|
||||
arg0[3][0] = arg1;
|
||||
arg0[2][1] = 0.0f;
|
||||
arg0[3][1] = arg2;
|
||||
arg0[0][2] = 0.0f;
|
||||
arg0[1][2] = 0.0f;
|
||||
arg0[2][2] = 1.0f;
|
||||
arg0[3][2] = 0.0f;
|
||||
arg0[3][1] = arg2;
|
||||
arg0[0][3] = 0.0f;
|
||||
arg0[1][3] = 0.0f;
|
||||
arg0[2][3] = 0.0f;
|
||||
arg0[3][3] = 1.0f;
|
||||
}
|
||||
|
||||
void func_80041AD8(Mat4 arg0, u16 angle) {
|
||||
f32 sine = sins(angle);
|
||||
f32 cosine = coss(angle);
|
||||
|
||||
arg0[0][0] = cosine;
|
||||
arg0[1][0] = -sine;
|
||||
void func_80041AD8(Mat4 arg0, u16 arg1) {
|
||||
f32 sp1C = sins(arg1);
|
||||
f32 temp_f0 = coss(arg1);
|
||||
|
||||
arg0[0][0] = temp_f0;
|
||||
arg0[1][0] = -sp1C;
|
||||
arg0[1][1] = temp_f0;
|
||||
arg0[0][1] = sp1C;
|
||||
arg0[2][0] = 0.0f;
|
||||
arg0[3][0] = 0.0f;
|
||||
arg0[0][1] = sine;
|
||||
arg0[1][1] = cosine;
|
||||
arg0[2][1] = 0.0f;
|
||||
arg0[3][1] = 0.0f;
|
||||
arg0[0][2] = 0.0f;
|
||||
arg0[1][2] = 0.0f;
|
||||
arg0[2][2] = 1.0f;
|
||||
arg0[3][2] = 0.0f;
|
||||
arg0[0][3] = 0.0f;
|
||||
arg0[1][3] = 0.0f;
|
||||
arg0[2][3] = 0.0f;
|
||||
arg0[2][2] = 1.0f;
|
||||
arg0[3][3] = 1.0f;
|
||||
}
|
||||
|
||||
void func_80041B68(Mat4 arg0, f32 arg1) {
|
||||
arg0[0][0] = arg1;
|
||||
arg0[1][0] = 0.0f;
|
||||
arg0[2][0] = 0.0f;
|
||||
arg0[3][0] = 0.0f;
|
||||
arg0[0][1] = 0.0f;
|
||||
arg0[1][1] = arg1;
|
||||
arg0[2][1] = 0.0f;
|
||||
arg0[3][1] = 0.0f;
|
||||
arg0[0][2] = 0.0f;
|
||||
arg0[1][2] = 0.0f;
|
||||
arg0[2][2] = 1.0f;
|
||||
arg0[3][2] = 0.0f;
|
||||
arg0[0][3] = 0.0f;
|
||||
arg0[1][3] = 0.0f;
|
||||
arg0[2][3] = 0.0f;
|
||||
arg0[2][2] = 1.0f;
|
||||
arg0[3][3] = 1.0f;
|
||||
arg0[0][0] = arg1;
|
||||
arg0[1][1] = arg1;
|
||||
}
|
||||
|
||||
void func_80041BBC(Mat4 arg0, u16 angle, f32 arg2) {
|
||||
f32 sine = sins(angle);
|
||||
f32 cosine = coss(angle) * arg2;
|
||||
void func_80041BBC(Mat4 arg0, u16 arg1, f32 arg2) {
|
||||
f32 sp1C = sins(arg1);
|
||||
f32 temp_f12 = coss(arg1) * arg2;
|
||||
|
||||
arg0[0][0] = cosine;
|
||||
arg0[1][0] = -sine * arg2;
|
||||
arg0[2][0] = 0.0f;
|
||||
arg0[0][0] = temp_f12;
|
||||
arg0[1][1] = temp_f12;
|
||||
arg0[2][1] = 0.0f;
|
||||
arg0[1][0] = -sp1C * arg2;
|
||||
arg0[0][2] = 0.0f;
|
||||
arg0[1][2] = 0.0f;
|
||||
arg0[0][1] = sp1C * arg2;
|
||||
arg0[3][2] = 0.0f;
|
||||
arg0[0][3] = 0.0f;
|
||||
arg0[1][3] = 0.0f;
|
||||
arg0[2][3] = 0.0f;
|
||||
arg0[3][0] = 1.0f;
|
||||
arg0[0][1] = sine * arg2;
|
||||
arg0[1][1] = cosine;
|
||||
arg0[2][1] = 0.0f;
|
||||
arg0[3][1] = 1.0f;
|
||||
arg0[0][2] = 0.0f;
|
||||
arg0[1][2] = 0.0f;
|
||||
arg0[2][2] = 1.0f;
|
||||
arg0[3][2] = 0.0f;
|
||||
arg0[0][3] = 0.0f;
|
||||
arg0[1][3] = 0.0f;
|
||||
arg0[2][3] = 0.0f;
|
||||
arg0[3][3] = 1.0f;
|
||||
}
|
||||
|
||||
void func_80041C64(Mat4 arg0, s32 arg1, s32 arg2, u16 angle, f32 arg4) {
|
||||
f32 sine = sins(angle);
|
||||
f32 cosine = coss(angle) * arg4;
|
||||
/**
|
||||
* @brief arg1 and arg2 are s32's into floats?!?
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
* @param arg3
|
||||
* @param arg4
|
||||
*/
|
||||
void func_80041C64(Mat4 arg0, s32 arg1, s32 arg2, u16 arg3, f32 arg4) {
|
||||
f32 sp24 = sins(arg3);
|
||||
f32 temp_f12 = coss(arg3) * arg4;
|
||||
|
||||
arg0[0][0] = cosine;
|
||||
arg0[1][0] = -sine * arg4;
|
||||
arg0[2][0] = 0.0f;
|
||||
arg0[3][0] = arg1;
|
||||
arg0[0][1] = sine * arg4;
|
||||
arg0[1][1] = cosine;
|
||||
arg0[2][1] = 0.0f;
|
||||
arg0[3][1] = arg2;
|
||||
arg0[0][2] = 0.0f;
|
||||
arg0[1][2] = 0.0f;
|
||||
arg0[2][2] = 1.0f;
|
||||
arg0[3][2] = 0.0f;
|
||||
arg0[0][3] = 0.0f;
|
||||
arg0[1][3] = 0.0f;
|
||||
arg0[2][3] = 0.0f;
|
||||
arg0[3][3] = 1.0f;
|
||||
arg0[2][0] = 0.0f;
|
||||
arg0[0][0] = temp_f12;
|
||||
arg0[1][0] = (-sp24) * arg4;
|
||||
arg0[3][0] = (f32) arg1;
|
||||
arg0[1][1] = temp_f12;
|
||||
arg0[0][1] = sp24 * arg4;
|
||||
arg0[2][1] = 0.0f;
|
||||
arg0[3][1] = (f32) arg2;
|
||||
arg0[0][2] = 0.0f;
|
||||
arg0[1][2] = 0.0f;
|
||||
arg0[2][2] = 1.0f;
|
||||
arg0[3][3] = 1.0f;
|
||||
arg0[3][2] = 0.0f;
|
||||
arg0[0][3] = 0.0f;
|
||||
arg0[1][3] = 0.0f;
|
||||
arg0[2][3] = 0.0f;
|
||||
}
|
||||
|
||||
// Likely D_801658**[index] = 1; * denotes wildcard
|
||||
void func_80041D24(void) {
|
||||
D_801658FE = 1;
|
||||
}
|
||||
|
||||
void guOrtho(Mtx *, f32, f32, f32, f32, f32, f32, f32); /* extern */
|
||||
extern s32 gActiveScreenMode;
|
||||
extern s8 D_801658FE;
|
||||
extern Mtx D_80183D60[];
|
||||
|
||||
void func_80041D34(void) {
|
||||
guOrtho(&D_80183D60, 0.0f, 320.0f, 240.0f, 0.0f, -1.0f, 1.0f, 1.0f);
|
||||
switch (gActiveScreenMode) {
|
||||
@@ -611,89 +626,101 @@ void func_80041EF4(void) {
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[5]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
}
|
||||
|
||||
UNUSED void func_80041F54(s32 arg0, s32 arg1) {
|
||||
Mat4 someMatrix;
|
||||
extern s32 D_8018D120;
|
||||
void func_80022180(Mtx*, Mat4);
|
||||
|
||||
UNUSED void func_80041F54(s32 arg0, s32 arg1) {
|
||||
Mat4 matrix;
|
||||
|
||||
func_80041A78(matrix, arg0, arg1);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
|
||||
func_80041A78(someMatrix, arg0, arg1);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
UNUSED void func_80042000(u16 arg0) {
|
||||
Mat4 someMatrix;
|
||||
Mat4 matrix;
|
||||
|
||||
func_80041AD8(matrix, arg0);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], &matrix);
|
||||
|
||||
func_80041AD8(someMatrix, arg0);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
UNUSED void func_800420A8(f32 arg0) {
|
||||
Mat4 someMatrix;
|
||||
Mat4 matrix;
|
||||
|
||||
func_80041B68(matrix, arg0);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
|
||||
func_80041B68(someMatrix, arg0);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
|
||||
}
|
||||
|
||||
UNUSED void func_8004214C(u16 arg0, f32 arg1) {
|
||||
Mat4 someMatrix;
|
||||
UNUSED void func_8004214C(u16 arg1, f32 arg2) {
|
||||
Mat4 matrix;
|
||||
|
||||
func_80041BBC(matrix, arg1, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
|
||||
func_80041BBC(someMatrix, arg0, arg1);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
UNUSED void func_800421FC(s32 arg0, s32 arg1, f32 arg2) {
|
||||
Mat4 someMatrix;
|
||||
Mat4 matrix;
|
||||
|
||||
func_80041A78(matrix, arg0, arg1);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
|
||||
func_80041A78(someMatrix, arg0, arg1);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
func_80041B68(someMatrix, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
D_8018D120++;
|
||||
|
||||
func_80041B68(matrix, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
void func_80042330(s32 arg0, s32 arg1, u16 arg2, f32 arg3) {
|
||||
Mat4 someMatrix;
|
||||
|
||||
func_80041C64(someMatrix, arg0, arg1, arg2, arg3);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
Mat4 matrix;
|
||||
func_80041C64(matrix, arg0, arg1, arg2, arg3);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
UNUSED void func_800423F0(Mat4 arg0, u16 arg1, u16 arg2, u16 arg3) {
|
||||
f32 sine1;
|
||||
f32 cosine1;
|
||||
f32 sine2;
|
||||
f32 cosine2;
|
||||
f32 sine3;
|
||||
f32 cosine3;
|
||||
sine1 = sins(arg1);
|
||||
cosine1 = coss(arg1);
|
||||
sine2 = sins(arg2);
|
||||
cosine2 = coss(arg2);
|
||||
sine3 = sins(arg3);
|
||||
cosine3 = coss(arg3);
|
||||
f32 sp3C;
|
||||
f32 temp_f20;
|
||||
f32 sp34;
|
||||
f32 sp30;
|
||||
f32 sp2C;
|
||||
f32 temp_f0;
|
||||
|
||||
arg0[0][0] = (cosine2 * cosine3) + ((sine1 * sine2) * sine3);
|
||||
arg0[1][0] = ((-cosine2) * sine3) + ((sine1 * sine2) * cosine3);
|
||||
arg0[2][0] = cosine1 * sine2;
|
||||
|
||||
sp3C = sins(arg1);
|
||||
temp_f20 = coss(arg1);
|
||||
sp34 = sins(arg2);
|
||||
sp30 = coss(arg2);
|
||||
sp2C = sins(arg3);
|
||||
temp_f0 = coss(arg3);
|
||||
|
||||
|
||||
arg0[0][0] = (f32) (sp30 * temp_f0 + (sp3C * sp34 * sp2C));
|
||||
arg0[1][0] = (f32) ((-sp30 * sp2C) + (sp3C * sp34 * temp_f0));
|
||||
arg0[2][0] = (f32) (temp_f20 * sp34);
|
||||
arg0[3][0] = 0.0f;
|
||||
arg0[0][1] = cosine1 * sine3;
|
||||
arg0[1][1] = cosine1 * cosine3;
|
||||
arg0[2][1] = -sine1;
|
||||
arg0[0][1] = (f32) (temp_f20 * sp2C);
|
||||
arg0[1][1] = (f32) (temp_f20 * temp_f0);
|
||||
arg0[2][1] = (f32) -sp3C;
|
||||
arg0[3][1] = 0.0f;
|
||||
arg0[0][2] = ((-sine2) * cosine3) + ((sine1 * cosine2) * sine3);
|
||||
arg0[1][2] = (sine2 * sine3) + ((sine1 * cosine2) * cosine3);
|
||||
arg0[2][2] = cosine1 * cosine2;
|
||||
arg0[0][2] = (f32) ((-sp34 * temp_f0) + (sp3C * sp30 * sp2C));
|
||||
arg0[1][2] = (f32) ((sp34 * sp2C) + (sp3C * sp30 * temp_f0));
|
||||
arg0[2][2] = (f32) (temp_f20 * sp30);
|
||||
arg0[3][2] = 0.0f;
|
||||
arg0[0][3] = 0.0f;
|
||||
arg0[1][3] = 0.0f;
|
||||
@@ -702,51 +729,41 @@ UNUSED void func_800423F0(Mat4 arg0, u16 arg1, u16 arg2, u16 arg3) {
|
||||
}
|
||||
|
||||
UNUSED void func_8004252C(Mat4 arg0, u16 arg1, u16 arg2) {
|
||||
f32 sine1;
|
||||
f32 cosine1;
|
||||
f32 sine2;
|
||||
f32 cosine2;
|
||||
f32 sp2C = sins(arg1);
|
||||
f32 sp28 = coss(arg1);
|
||||
f32 sp24 = sins(arg2);
|
||||
f32 temp_f0 = coss(arg2);
|
||||
|
||||
sine1 = sins(arg1);
|
||||
cosine1 = coss(arg1);
|
||||
sine2 = sins(arg2);
|
||||
cosine2 = coss(arg2);
|
||||
arg0[0][0] = cosine2;
|
||||
arg0[1][0] = sine1 * sine2;
|
||||
arg0[2][0] = cosine1 * sine2;
|
||||
arg0[1][0] = sp2C * sp24;
|
||||
arg0[2][0] = sp28 * sp24;
|
||||
arg0[0][1] = 0.0f;
|
||||
arg0[1][1] = cosine1;
|
||||
arg0[2][1] = -sine1;
|
||||
arg0[0][2] = -sine2;
|
||||
arg0[1][2] = sine1 * cosine2;
|
||||
arg0[2][2] = cosine1 * cosine2;
|
||||
arg0[0][0] = temp_f0;
|
||||
arg0[2][1] = -sp2C;
|
||||
arg0[0][2] = -sp24;
|
||||
arg0[1][1] = sp28;
|
||||
arg0[1][2] = sp2C * temp_f0;
|
||||
arg0[2][2] = sp28 * temp_f0;
|
||||
}
|
||||
|
||||
void func_800425D0(Mat4 arg0, Vec3f arg1, Vec3s arg2, f32 arg3) {
|
||||
f32 sine1;
|
||||
f32 cosine1;
|
||||
f32 sine2;
|
||||
f32 cosine2;
|
||||
f32 sine3;
|
||||
f32 cosine3;
|
||||
f32 sp44 = sins(arg2[0]);
|
||||
f32 temp_f22 = coss(arg2[0]);
|
||||
f32 sp3C = sins(arg2[1]);
|
||||
f32 sp38 = coss(arg2[1]);
|
||||
f32 sp34 = sins(arg2[2]);
|
||||
f32 temp_f0 = coss(arg2[2]);
|
||||
|
||||
sine1 = sins(arg2[0]);
|
||||
cosine1 = coss(arg2[0]);
|
||||
sine2 = sins(arg2[1]);
|
||||
cosine2 = coss(arg2[1]);
|
||||
sine3 = sins(arg2[2]);
|
||||
cosine3 = coss(arg2[2]);
|
||||
arg0[0][0] = ((cosine2 * cosine3) + ((sine1 * sine2) * sine3)) * arg3;
|
||||
arg0[1][0] = ((-cosine2 * sine3) + ((sine1 * sine2) * cosine3)) * arg3;
|
||||
arg0[2][0] = cosine1 * sine2 * arg3;
|
||||
arg0[0][0] = ((sp38 * temp_f0) + (sp44 * sp3C * sp34)) * arg3;
|
||||
arg0[1][0] = ((-sp38 * sp34) + (sp44 * sp3C * temp_f0)) * arg3;
|
||||
arg0[2][0] = (temp_f22 * sp3C) * arg3;
|
||||
arg0[3][0] = arg1[0];
|
||||
arg0[0][1] = cosine1 * sine3 * arg3;
|
||||
arg0[1][1] = cosine1 * cosine3 * arg3;
|
||||
arg0[2][1] = -sine1 * arg3;
|
||||
arg0[0][1] = temp_f22 * sp34 * arg3;
|
||||
arg0[1][1] = temp_f22 * temp_f0 * arg3;
|
||||
arg0[2][1] = -sp44 * arg3;
|
||||
arg0[3][1] = arg1[1];
|
||||
arg0[0][2] = ((-sine2 * cosine3) + ((sine1 * cosine2) * sine3)) * arg3;
|
||||
arg0[1][2] = ((sine2 * sine3) + ((sine1 * cosine2) * cosine3)) * arg3;
|
||||
arg0[2][2] = cosine1 * cosine2 * arg3;
|
||||
arg0[0][2] = ((-sp3C * temp_f0) + (sp44 * sp38 * sp34)) * arg3;
|
||||
arg0[1][2] = ((sp3C * sp34) + (sp44 * sp38 * temp_f0)) * arg3;
|
||||
arg0[2][2] = temp_f22 * sp38 * arg3;
|
||||
arg0[3][2] = arg1[2];
|
||||
arg0[0][3] = 0.0f;
|
||||
arg0[1][3] = 0.0f;
|
||||
@@ -773,32 +790,44 @@ void func_80042760(Mat4 arg0, Vec3f arg1, Vec3f arg2, f32 arg3) {
|
||||
arg0[3][3] = 1.0f;
|
||||
}
|
||||
|
||||
void func_800427DC(s32 arg0, Mat4 arg1) {
|
||||
f32 sine1;
|
||||
f32 cosine1;
|
||||
f32 sine2;
|
||||
f32 cosine2;
|
||||
f32 sine3;
|
||||
f32 cosine3;
|
||||
extern struct_80165C18_entry D_80165C18[];
|
||||
|
||||
sine1 = sins(D_80165C18[arg0].unk_0B2);
|
||||
cosine1 = coss(D_80165C18[arg0].unk_0B2);
|
||||
sine2 = sins(D_80165C18[arg0].unk_0B4);
|
||||
cosine2 = coss(D_80165C18[arg0].unk_0B4);
|
||||
sine3 = sins(D_80165C18[arg0].unk_0B6);
|
||||
cosine3 = coss(D_80165C18[arg0].unk_0B6);
|
||||
arg1[0][0] = D_80165C18[arg0].unk_000 * ((cosine2 * cosine3) + ((sine1 * sine2) * sine3));
|
||||
arg1[1][0] = (D_80165C18[arg0].unk_000 * ((-cosine2 * sine3) + ((sine1 * sine2) * cosine3)));
|
||||
arg1[2][0] = (D_80165C18[arg0].unk_000 * (cosine1 * sine2));
|
||||
arg1[3][0] = D_80165C18[arg0].unk_004[0];
|
||||
arg1[0][1] = D_80165C18[arg0].unk_000 * (cosine1 * sine3);
|
||||
arg1[1][1] = (D_80165C18[arg0].unk_000 * (cosine1 * cosine3));
|
||||
arg1[2][1] = (D_80165C18[arg0].unk_000 * -sine1);
|
||||
arg1[3][1] = D_80165C18[arg0].unk_004[1];
|
||||
arg1[0][2] = D_80165C18[arg0].unk_000 * ((-sine2 * cosine3) + ((sine1 * cosine2) * sine3));
|
||||
arg1[1][2] = (D_80165C18[arg0].unk_000 * ((sine2 * sine3) + ((sine1 * cosine2) * cosine3)));
|
||||
arg1[2][2] = (D_80165C18[arg0].unk_000 * (cosine1 * cosine2));
|
||||
arg1[3][2] = D_80165C18[arg0].unk_004[2];
|
||||
/**
|
||||
* @brief Tried to put the definitions in the declares. However, sp3C wants to be at the top.
|
||||
* Something may be possible with some padding. Couldn't find a way though. So we get big mess.
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
**/
|
||||
|
||||
void func_800427DC(s32 arg0, Mat4 arg1) {
|
||||
f32 sp3C;
|
||||
struct_80165C18_entry *temp_s0 = &D_80165C18[arg0];
|
||||
f32 sp34;
|
||||
f32 sp30;
|
||||
f32 sp2C;
|
||||
f32 temp_f0;
|
||||
f32 temp_f20;
|
||||
|
||||
sp3C = sins(temp_s0->unk_0B2);
|
||||
temp_f20 = coss(temp_s0->unk_0B2);
|
||||
sp34 = sins(temp_s0->unk_0B4);
|
||||
sp30 = coss(temp_s0->unk_0B4);
|
||||
sp2C = sins(temp_s0->unk_0B6);
|
||||
temp_f0 = coss(temp_s0->unk_0B6);
|
||||
|
||||
arg1[0][0] = temp_s0->unk_000 * ((sp30 * temp_f0) + (sp3C * sp34 * sp2C));
|
||||
arg1[1][0] = temp_s0->unk_000 * ((-sp30 * sp2C) + sp3C * sp34 * temp_f0);
|
||||
arg1[2][0] = temp_s0->unk_000 * (temp_f20 * sp34);
|
||||
arg1[3][0] = temp_s0->unk_004[0];
|
||||
arg1[0][1] = temp_s0->unk_000 * (temp_f20 * sp2C);
|
||||
arg1[1][1] = temp_s0->unk_000 * (temp_f20 * temp_f0);
|
||||
arg1[2][1] = temp_s0->unk_000 * -sp3C;
|
||||
arg1[3][1] = temp_s0->unk_004[1];
|
||||
arg1[0][2] = temp_s0->unk_000 * ((-sp34 * temp_f0) + (sp3C * sp30 * sp2C));
|
||||
arg1[1][2] = temp_s0->unk_000 * ((sp34 * sp2C) + (sp3C * sp30 * temp_f0));
|
||||
arg1[2][2] = temp_s0->unk_000 * (temp_f20 * sp30);
|
||||
arg1[3][2] = temp_s0->unk_004[2];
|
||||
arg1[0][3] = 0.0f;
|
||||
arg1[1][3] = 0.0f;
|
||||
arg1[2][3] = 0.0f;
|
||||
@@ -834,7 +863,6 @@ void func_80042A20(Mat4 arg0, Vec3f arg1, Vec3f arg2, u16 arg3, f32 arg4) {
|
||||
func_80041530(sp38);
|
||||
func_80041594(sp2C, sp38, arg1);
|
||||
func_80041530(sp2C);
|
||||
|
||||
arg0[0][0] = sp38[0] * arg4;
|
||||
arg0[0][1] = sp38[1] * arg4;
|
||||
arg0[0][2] = sp38[2] * arg4;
|
||||
@@ -912,51 +940,53 @@ void func_80042D14(Vec3f arg0, Vec3f arg1, Vec3s arg2) {
|
||||
}
|
||||
|
||||
void func_80042E00(Vec3f arg0, Vec3s arg1, f32 arg2) {
|
||||
Mat4 someMatrix;
|
||||
Mat4 matrix;
|
||||
|
||||
func_800425D0(someMatrix, arg0, arg1, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
func_800425D0(matrix, arg0, arg1, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
UNUSED void func_80042EB8(Vec3f arg0, Vec3f arg1, f32 arg2) {
|
||||
Mat4 someMatrix;
|
||||
Mat4 matrix;
|
||||
|
||||
func_80042760(someMatrix, arg0, arg1, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
func_80042760(matrix, arg0, arg1, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
void func_80042F70(Vec3f arg0, Vec3s arg1, f32 arg2) {
|
||||
Mat4 someMatrix;
|
||||
Vec3s sp20;
|
||||
|
||||
sp20[0] = (u16)arg1[0] + 0x8000;
|
||||
sp20[1] = (u16)arg1[1] + 0x8000;
|
||||
// * 1 done here to force the compiler to respect the u16 typecast
|
||||
sp20[2] = (u16)arg1[2] * 1;
|
||||
func_800425D0(someMatrix, arg0, sp20, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
void func_80042F70(Vec3f arg0, Vec3su arg1, f32 arg2) {
|
||||
Mat4 matrix;
|
||||
Vec3su sp20;
|
||||
|
||||
sp20[0] = arg1[0] + 0x8000;
|
||||
sp20[1] = arg1[1] + 0x8000;
|
||||
sp20[2] = arg1[2];
|
||||
func_800425D0(matrix, arg0, sp20, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
void func_80043050(Vec3f arg0,Vec3f arg1, f32 arg2) {
|
||||
Mat4 someMatrix;
|
||||
Mat4 matrix;
|
||||
|
||||
func_80042A20(someMatrix, arg1, arg0, 0, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
func_80042A20(matrix, arg1, arg0, 0, arg2);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
void func_80043104(s32 arg0) {
|
||||
Mat4 someMatrix;
|
||||
Mat4 sp20;
|
||||
|
||||
func_800427DC(arg0, sp20);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], sp20);
|
||||
|
||||
func_800427DC(arg0, someMatrix);
|
||||
func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
D_8018D120 += 1;
|
||||
D_8018D120++;
|
||||
}
|
||||
|
||||
+1
-2
@@ -22,7 +22,6 @@ s32 s32_step_towards(s32*, s32, s32);
|
||||
s32 func_80041608(f32, f32, f32, f32, f32);
|
||||
s32 func_80041680(f32, f32);
|
||||
s32 func_800416AC(f32, f32);
|
||||
void func_80041A70();
|
||||
void func_80041F54(s32, s32);
|
||||
void func_80042000(u16);
|
||||
void func_800420A8(f32);
|
||||
@@ -77,7 +76,7 @@ void func_800427DC(s32, Mat4);
|
||||
void func_80042A20(Mat4, Vec3f, Vec3f, u16, f32);
|
||||
void func_80042D14(Vec3f, Vec3f, Vec3s);
|
||||
void func_80042E00(Vec3f, Vec3s, f32);
|
||||
void func_80042F70(Vec3f, Vec3s, f32);
|
||||
void func_80042F70(Vec3f, Vec3su, f32);
|
||||
void func_80043050(Vec3f, Vec3f, f32);
|
||||
void func_80043104(s32);
|
||||
|
||||
|
||||
+55
-33
@@ -1,6 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
#include <common_structs.h>
|
||||
#include <actor_types.h>
|
||||
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern void func_80042E00(s32, s32, f32); // extern
|
||||
@@ -72,23 +74,24 @@ void func_80043500(s32 arg0, s32 arg1, f32 arg2, s32 arg3) {
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_80042F70(?, ?); // extern
|
||||
extern ? D_0D007878;
|
||||
extern void *gDisplayListHead;
|
||||
//? func_80042F70(?, ?); // extern
|
||||
extern s8 D_0D007878[];
|
||||
//extern void *gDisplayListHead;
|
||||
|
||||
void func_800435A0(? arg2, s32 arg3, s32 arg4) {
|
||||
void *temp_v0;
|
||||
void *temp_v0_2;
|
||||
void *temp_v0_3;
|
||||
void *temp_v0_4;
|
||||
void *temp_v0_5;
|
||||
void func_80042F70(s32 arg0, Vec3su arg1, f32 arg2);
|
||||
|
||||
void func_800435A0(s32 arg0, Vec3su arg1, f32 arg2, s32 arg3, s32 arg4) {
|
||||
|
||||
arg4 &= 0xFF;
|
||||
func_80042F70(arg0, arg1, arg2);
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, D_0D007878);
|
||||
gDPSetPrimColor(gDisplayListHead++, 0, 0, arg4, 0xFF, 0xFF, 0xFF);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH);
|
||||
gSPDisplayList(gDisplayListHead++, arg3);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
/*
|
||||
|
||||
func_80042F70(arg2, arg2);
|
||||
temp_v0 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0 + 8;
|
||||
temp_v0->unk4 = &D_0D007878;
|
||||
temp_v0->unk0 = 0x6000000;
|
||||
temp_v0_2 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v0_2 + 8;
|
||||
temp_v0_2->unk0 = 0xFA000000;
|
||||
temp_v0_2->unk4 = (arg4 & 0xFF) | ~0xFF;
|
||||
@@ -104,6 +107,7 @@ void func_800435A0(? arg2, s32 arg3, s32 arg4) {
|
||||
gDisplayListHead = temp_v0_5 + 8;
|
||||
temp_v0_5->unk4 = 0x2000;
|
||||
temp_v0_5->unk0 = 0xB7000000;
|
||||
*/
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800435A0.s")
|
||||
@@ -3488,27 +3492,45 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004A414.s")
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 func_80041924(); // extern
|
||||
? func_80043050(? *, void *, s32); // extern
|
||||
f32 func_802ABE30(f32, ?, ? *, ?32, u16); // extern
|
||||
extern ? D_0D007B98;
|
||||
//s32 func_80041924(); // extern
|
||||
//? func_80043050(? *, void *, s32); // extern
|
||||
//f32 func_802ABE30(f32, ?, ? *, ?32, u16); // extern
|
||||
//extern ? D_0D007B98;
|
||||
//extern f64 D_800EE030;
|
||||
//extern ? D_80183E50;
|
||||
//extern void *gDisplayListHead;
|
||||
extern s8 D_0D007B98[];
|
||||
extern f64 D_800EE030;
|
||||
extern ? D_80183E50;
|
||||
extern void *gDisplayListHead;
|
||||
extern Vec3f D_80183E50;
|
||||
|
||||
void func_8004A630(void *arg0, void *arg1, s32 arg2) {
|
||||
void *temp_v1;
|
||||
s32 func_80041924(UnkActorInner*, Vec3f, s32);
|
||||
|
||||
if (func_80041924() != 0) {
|
||||
D_80183E50.unk0 = arg1->unk0;
|
||||
D_80183E50.unk4 = func_802ABE30(arg1->unk0, 0, &D_80183E50, arg1->unk8, arg0->unkA) + D_800EE030;
|
||||
D_80183E50.unk8 = arg1->unk8;
|
||||
func_80043050(&D_80183E50, arg0 + 0x30, arg2);
|
||||
temp_v1 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v1 + 8;
|
||||
temp_v1->unk0 = 0x6000000;
|
||||
temp_v1->unk4 = &D_0D007B98;
|
||||
}
|
||||
|
||||
f32 func_802ABE30(f32, f32, f32, u16);
|
||||
void func_80043050(Vec3f, Vec3f, f32);
|
||||
|
||||
struct UnknownStruct8004A630 {
|
||||
Vec3f unk0;
|
||||
f32 unk4;
|
||||
};
|
||||
|
||||
void func_8004A630(struct UnknownStruct8004A630 *arg0, Vec3f arg1, f32 arg2) {
|
||||
//void *temp_v1;
|
||||
|
||||
if (func_80041924((UnkActorInner *) &arg0->unk0, arg1, arg2) == 0) { return; }
|
||||
|
||||
D_80183E50[0] = arg1[0];
|
||||
D_80183E50[1] = func_802ABE30(arg1[0], 0.0f, D_80183E50[0], arg0->unk4) + D_800EE030;
|
||||
D_80183E50[2] = arg1[2];
|
||||
func_80043050(D_80183E50, arg0->unk0, arg2);
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, D_0D007B98);
|
||||
/*
|
||||
temp_v1 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v1 + 8;
|
||||
temp_v1->unk0 = 0x6000000;
|
||||
temp_v1->unk4 = &D_0D007B98;
|
||||
*/
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004A630.s")
|
||||
|
||||
+15
-32
@@ -30,24 +30,27 @@ s32 find_unused_obj_index(s32* arg0) {
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_80072428(s32, s32 *); // extern
|
||||
extern ? D_80165CE2;
|
||||
//? func_80072428(s32, s32 *); // extern
|
||||
extern s8 D_80165CE2[];
|
||||
|
||||
void func_80071F6C(s32 *arg0) {
|
||||
s32 *temp_a1;
|
||||
void func_80071F6C(s32 arg0, s32 arg1) {
|
||||
s32 temp_a0;
|
||||
s32 temp_a1;
|
||||
|
||||
temp_a1 = arg0;
|
||||
temp_a0 = *arg0;
|
||||
temp_a0 = arg0;
|
||||
arg0 = temp_a1;
|
||||
func_80072428(temp_a0, temp_a1);
|
||||
*(&D_80165CE2 + (*arg0 * 0xE0)) = 0;
|
||||
*arg0 = -1;
|
||||
func_80072428(arg0);
|
||||
D_80165CE2[0xE0] = 0;
|
||||
arg0 = -1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80071F6C.s")
|
||||
#endif
|
||||
|
||||
// UNUSED FUNC
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80071FBC.s")
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 find_unused_obj_index(s32 *, s32); // extern
|
||||
@@ -115,8 +118,8 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80072044.s")
|
||||
|
||||
void func_80071F6C(); // extern
|
||||
|
||||
void func_80072100(void) {
|
||||
func_80071F6C();
|
||||
void func_80072100(s32 arg0, s32 arg1) {
|
||||
func_80071F6C(arg0, arg1);
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
@@ -3122,37 +3125,17 @@ void func_80077138(s32 arg0, void *arg1, s32 arg2) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80077138.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 func_80072044(? *, ? *, ?); // extern
|
||||
? func_80077138(s32, s32, s32); // extern
|
||||
extern ? D_80183E5C;
|
||||
extern ? D_8018C630;
|
||||
|
||||
void func_800773D8(s32 arg0, s32 arg1) {
|
||||
s32 temp_v0;
|
||||
|
||||
temp_v0 = func_80072044(&D_8018C630, &D_80183E5C, 0x80);
|
||||
s32 temp_v0 = func_80072044(&D_8018C630, &D_80183E5C, 0x80);
|
||||
if (temp_v0 != -1) {
|
||||
func_80077138(temp_v0, arg0, arg1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800773D8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_80072488(); // extern
|
||||
? func_80086E70(s32); // extern
|
||||
|
||||
void func_80077428(s32 arg0) {
|
||||
func_80072488();
|
||||
func_80072488(arg0);
|
||||
func_80086E70(arg0);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80077428.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
|
||||
Reference in New Issue
Block a user