mirror of
https://github.com/n64decomp/mk64
synced 2026-07-29 15:32:53 -04:00
Update some attempts, got a couple matches (#591)
* Update some attempts, got a couple matches * More matches and updates Signed-off-by: Taggerung <tyler.taggerung@email.com>
This commit is contained in:
@@ -930,10 +930,6 @@ s32 func_80007BF8(u16 arg0, u16 arg1, u16 arg2, u16 arg3, u16 arg4) {
|
||||
#ifdef NON_MATCHING // Likely func equiv
|
||||
// https://decomp.me/scratch/Te4u1
|
||||
|
||||
extern u16 D_80163344[];
|
||||
extern s16 D_80163478;
|
||||
extern s16 D_801634C0[];
|
||||
|
||||
void func_80007D04(s32 playerId, Player *player) {
|
||||
s16 temp_t1;
|
||||
s16 temp_t2;
|
||||
|
||||
+3
-3
@@ -942,12 +942,12 @@ void init_course_object(void) {
|
||||
D_8018D1B8[i] = 0;
|
||||
find_unused_obj_index(&indexObjectList1[i]);
|
||||
}
|
||||
for (i = 0; i < NUM_MAX_MOLES; i++) {
|
||||
for (i = 0; i < NUM_TOTAL_MOLES; i++) {
|
||||
find_unused_obj_index(&gObjectParticle1[i]);
|
||||
objectId = gObjectParticle1[i];
|
||||
init_object(objectId, 0);
|
||||
gObjectList[objectId].pos[0] = gMoleSpawns[i][0] * xOrientation;
|
||||
gObjectList[objectId].pos[2] = gMoleSpawns[i][2];
|
||||
gObjectList[objectId].pos[0] = gMoleSpawns.asVec3sList[i][0] * xOrientation;
|
||||
gObjectList[objectId].pos[2] = gMoleSpawns.asVec3sList[i][2];
|
||||
func_800887C0(objectId);
|
||||
gObjectList[objectId].sizeScaling = 0.7f;
|
||||
}
|
||||
|
||||
+295
-776
File diff suppressed because it is too large
Load Diff
+17
-4
@@ -9,6 +9,18 @@ extern u32 _course_mario_raceway_dl_mio0SegmentRomStart[];
|
||||
|
||||
/* File specific types */
|
||||
|
||||
/*
|
||||
Known `types` for `struct_8018D9E0_entry`
|
||||
0x53: "Mushroom Cup" box on the cup selection screen
|
||||
0x54: "Flower Cup" box on the cup selection screen
|
||||
0x55: "Star Cup" box on the cup selection screen
|
||||
0x56: "Special Cup" box on the cup selection screen
|
||||
0x5E: A box of static over the course images as the cup selection screen loads in.
|
||||
It is near unnoticeable though as in practice it doesn't last long enough to be seen.
|
||||
Try locking the word at `8018DC80` to see something like 0x20 just before confirming character selection to make it last longer
|
||||
See `func_80096CD8` for the actual drawing of the static
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 type; // id maybe?
|
||||
/* 0x04 */ s32 cursor; // sound mode, maybe some other stuff
|
||||
@@ -151,8 +163,9 @@ Gfx *func_80096CD8(Gfx*, s32, s32, u32, u32);
|
||||
Gfx *func_80097274(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, s32, s32, u32, u32, u32);
|
||||
Gfx *func_80097A14(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, u32, u32);
|
||||
Gfx *func_80097AE4(Gfx*, s8, s32, s32, u8*, s32);
|
||||
Gfx *func_80097E58(Gfx*, s8, s32, u32, u32, s32, s32, s32, s32, s32, s32, u32);
|
||||
Gfx *func_800987D0(Gfx*, u32, u32, u32, u32, s32, s32, s32, s32, s32);
|
||||
Gfx *func_80097E58(Gfx*, s8, s32, s32, s32, s32, s32, s32, u8*, u32, s32, u32);
|
||||
Gfx *func_80098558(Gfx*, u32, u32, u32, u32, u32, u32, s32, s32);
|
||||
Gfx *func_800987D0(Gfx*, u32, u32, u32, u32, s32, s32, s32, u32, s32);
|
||||
Gfx *draw_box_fill(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32);
|
||||
Gfx *draw_box(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32);
|
||||
Gfx *func_80098FC8(Gfx*, s32, s32, s32, s32);
|
||||
@@ -431,7 +444,7 @@ extern struct_8018E768_entry D_8018E768[D_8018E768_SIZE];
|
||||
extern s32 gCycleFlashMenu;
|
||||
extern s8 D_8018E7AC[];
|
||||
extern s8 D_8018E7B0;
|
||||
extern s32 D_8018E7B8[];
|
||||
extern u32 D_8018E7B8[];
|
||||
extern u32 D_8018E7C8;
|
||||
extern u32 D_8018E7D0[];
|
||||
extern s32 D_8018E7E0;
|
||||
@@ -570,7 +583,7 @@ extern MkTexture *D_800E8254[];
|
||||
extern MkTexture *D_800E8274[];
|
||||
extern MkTexture *D_800E8294[];
|
||||
extern MkTexture *D_800E82B4[];
|
||||
extern MkTexture *D_800E82C8[];
|
||||
extern MkTexture *D_800E82C4[];
|
||||
extern MkTexture *D_800E82F4[];
|
||||
extern MkAnimation *D_800E8320[];
|
||||
extern MkAnimation *D_800E8340[];
|
||||
|
||||
+35
-33
@@ -351,7 +351,7 @@ f32 D_800E594C[][2] = {
|
||||
{ -0.0, 0.0 },
|
||||
};
|
||||
|
||||
u16 D_800E597C[] = { 0x0000, 0x0000, 0x4000, 0x8000, 0x8000, 0xc000 };
|
||||
s16 D_800E597C[] = { 0x0000, 0x0000, 0x4000, 0x8000, 0x8000, 0xc000 };
|
||||
|
||||
// Seems to be related to the Boos in Banshee Boardwalk
|
||||
SplineData23 D_800E5988 = {
|
||||
@@ -766,38 +766,40 @@ Vec3s D_800E634C[] = {
|
||||
{ 0xf380, 0x0013, 0xfe14 },
|
||||
};
|
||||
|
||||
Vec3s gMoleSpawns[] = {
|
||||
{ 0x0303, 0x0014, 0xf81a },
|
||||
{ 0x0327, 0x000f, 0xf7f1 },
|
||||
{ 0x034f, 0x0012, 0xf808 },
|
||||
{ 0x0391, 0x000e, 0xf7fa },
|
||||
{ 0x03ab, 0x0015, 0xf833 },
|
||||
{ 0x03ad, 0x0011, 0xf818 },
|
||||
{ 0x03e2, 0x0011, 0xf836 },
|
||||
{ 0x035f, 0x0016, 0xf826 },
|
||||
{ 0x05dc, 0x0002, 0x0474 },
|
||||
{ 0x05e6, 0x000f, 0x041a },
|
||||
{ 0x0649, 0x0015, 0x03a7 },
|
||||
{ 0x0509, 0x0003, 0x04f5 },
|
||||
{ 0x05bc, 0x0016, 0x0416 },
|
||||
{ 0x0564, 0x000c, 0x0482 },
|
||||
{ 0x0511, 0x0013, 0x0492 },
|
||||
{ 0x0635, 0x000b, 0x03ec },
|
||||
{ 0x0586, 0x0003, 0x04a1 },
|
||||
{ 0x057d, 0x0004, 0x04e6 },
|
||||
{ 0x05b7, 0x0008, 0x045e },
|
||||
{ 0x02bd, 0x0002, 0x04ff },
|
||||
{ 0x032b, 0x0008, 0x04fe },
|
||||
{ 0x0317, 0x0010, 0x04cd },
|
||||
{ 0x036c, 0x000f, 0x04f2 },
|
||||
{ 0x03d8, 0x0017, 0x04e0 },
|
||||
{ 0x037b, 0x0014, 0x04da },
|
||||
{ 0x0398, 0x000f, 0x0518 },
|
||||
{ 0x0337, 0x0006, 0x052f },
|
||||
{ 0x02cd, 0x0008, 0x04d7 },
|
||||
{ 0x02b7, 0x0013, 0x0498 },
|
||||
{ 0x0274, 0x0008, 0x04a7 },
|
||||
{ 0x02d4, 0x0004, 0x053b },
|
||||
MoleSpawnUnion gMoleSpawns = {
|
||||
{
|
||||
{ 0x0303, 0x0014, 0xf81a },
|
||||
{ 0x0327, 0x000f, 0xf7f1 },
|
||||
{ 0x034f, 0x0012, 0xf808 },
|
||||
{ 0x0391, 0x000e, 0xf7fa },
|
||||
{ 0x03ab, 0x0015, 0xf833 },
|
||||
{ 0x03ad, 0x0011, 0xf818 },
|
||||
{ 0x03e2, 0x0011, 0xf836 },
|
||||
{ 0x035f, 0x0016, 0xf826 },
|
||||
{ 0x05dc, 0x0002, 0x0474 },
|
||||
{ 0x05e6, 0x000f, 0x041a },
|
||||
{ 0x0649, 0x0015, 0x03a7 },
|
||||
{ 0x0509, 0x0003, 0x04f5 },
|
||||
{ 0x05bc, 0x0016, 0x0416 },
|
||||
{ 0x0564, 0x000c, 0x0482 },
|
||||
{ 0x0511, 0x0013, 0x0492 },
|
||||
{ 0x0635, 0x000b, 0x03ec },
|
||||
{ 0x0586, 0x0003, 0x04a1 },
|
||||
{ 0x057d, 0x0004, 0x04e6 },
|
||||
{ 0x05b7, 0x0008, 0x045e },
|
||||
{ 0x02bd, 0x0002, 0x04ff },
|
||||
{ 0x032b, 0x0008, 0x04fe },
|
||||
{ 0x0317, 0x0010, 0x04cd },
|
||||
{ 0x036c, 0x000f, 0x04f2 },
|
||||
{ 0x03d8, 0x0017, 0x04e0 },
|
||||
{ 0x037b, 0x0014, 0x04da },
|
||||
{ 0x0398, 0x000f, 0x0518 },
|
||||
{ 0x0337, 0x0006, 0x052f },
|
||||
{ 0x02cd, 0x0008, 0x04d7 },
|
||||
{ 0x02b7, 0x0013, 0x0498 },
|
||||
{ 0x0274, 0x0008, 0x04a7 },
|
||||
{ 0x02d4, 0x0004, 0x053b },
|
||||
}
|
||||
};
|
||||
|
||||
// Referenced by D_800E6724, which is unused
|
||||
|
||||
@@ -37,7 +37,7 @@ extern ThwompSpawn gThwompSpawns100CCExtra[];
|
||||
extern ThwompSpawn gThomwpSpawns150CC[];
|
||||
extern f32 D_800E594C[][2];
|
||||
extern u64 D_800E5974;
|
||||
extern u16 D_800E597C[];
|
||||
extern s16 D_800E597C[];
|
||||
extern SplineData23 D_800E5988;
|
||||
extern SplineData24 D_800E5A44;
|
||||
extern SplineData25 D_800E5B08;
|
||||
@@ -60,7 +60,7 @@ extern SplineData25 D_800E61B4;
|
||||
extern SplineData23 D_800E6280;
|
||||
extern SplineData *D_800E633C[];
|
||||
extern Vec3s D_800E634C[];
|
||||
extern Vec3s gMoleSpawns[];
|
||||
extern MoleSpawnUnion gMoleSpawns;
|
||||
extern SplineData23 D_800E641C;
|
||||
extern SplineData24 D_800E64D8;
|
||||
extern SplineData25 D_800E659C;
|
||||
|
||||
+69
-70
@@ -1642,52 +1642,47 @@ void func_8004C628(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) {
|
||||
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
void func_8004C6FC(s16 arg0, s16 arg1, s8 *arg2, u32 arg3, u32 arg4) {
|
||||
Gfx *temp_v0;
|
||||
Gfx *temp_v0_2;
|
||||
Gfx *temp_v0_4;
|
||||
s32 temp_t5;
|
||||
#ifdef NON_MATCHING
|
||||
// https://decomp.me/scratch/TqXqn
|
||||
// There's a weird fakematch concerning `athing`, don't know that to make of. Can't quite get it over the finish line though
|
||||
void func_8004C6FC(s16 arg0, s16 arg1, u8 *texture, u32 width, u32 arg4) {
|
||||
s32 temp_v0_3;
|
||||
s32 var_s3;
|
||||
s32 var_s4;
|
||||
s8 *var_s5;
|
||||
u32 temp_t3;
|
||||
s32 athing;
|
||||
s32 temp_t3;
|
||||
u32 temp_t8;
|
||||
u32 var_s0;
|
||||
u32 var_s6;
|
||||
u32 var_t2;
|
||||
s32 heigth;
|
||||
s32 var_s6;
|
||||
u8 *textureCopy;
|
||||
|
||||
var_s4 = arg1 - (arg4 >> 1);
|
||||
athing = arg0 - (width / 2);
|
||||
var_s4 = arg1 - (arg4 / 2);
|
||||
textureCopy = texture;
|
||||
gSPDisplayList(gDisplayListHead++, D_0D007EF8);
|
||||
temp_t8 = arg3 * arg4 * 4;
|
||||
temp_t3 = temp_t8 >> 0xC;
|
||||
var_s5 = arg2;
|
||||
var_s6 = temp_t8;
|
||||
var_t2 = temp_t3;
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||
if (temp_t8 & 0xFFF) {
|
||||
var_t2 = temp_t3 + 1;
|
||||
temp_t8 = width * arg4 * 4;
|
||||
temp_t3 = temp_t8 / 4096;
|
||||
if (temp_t8 % 4096) {
|
||||
temp_t3++;
|
||||
}
|
||||
var_s0 = arg4 / var_t2;
|
||||
var_s3 = 0;
|
||||
if ((s32) var_t2 > 0) {
|
||||
do {
|
||||
temp_t5 = arg3 * var_s0 * 4;
|
||||
load_texture_tile_rgba32_nomirror(var_s5, (s32) arg3, (s32) var_s0);
|
||||
func_8004B950(arg0 - (arg3 >> 1), var_s4, (s32) arg3, (s32) var_s0, 1);
|
||||
temp_v0_3 = var_s6 - temp_t5;
|
||||
var_s5 += temp_t5;
|
||||
if (temp_v0_3 < 0) {
|
||||
var_s0 = var_s6 / arg3;
|
||||
} else {
|
||||
var_s6 = (u32) temp_v0_3;
|
||||
}
|
||||
var_s3 += 1;
|
||||
var_s4 += var_s0;
|
||||
} while (var_s3 < (s32) var_t2);
|
||||
heigth = arg4 / temp_t3;
|
||||
var_s6 = temp_t3;
|
||||
for (var_s3 = 0; var_s3 < var_s6; var_s3++) {
|
||||
load_texture_tile_rgba32_nomirror(textureCopy, width, heigth);
|
||||
func_8004B950(athing, var_s4, width, heigth, 1);
|
||||
temp_v0_3 = temp_t8 - (width * heigth * 4);
|
||||
textureCopy += (width * heigth * 4);
|
||||
if (temp_v0_3 < 0) {
|
||||
heigth = temp_t8 / width;
|
||||
} else {
|
||||
temp_t8 = temp_v0_3;
|
||||
}
|
||||
// Weird fakematch that is a HUGE improvement
|
||||
athing += var_s4 * 0;
|
||||
var_s4 += heigth;
|
||||
}
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
|
||||
}
|
||||
#else
|
||||
@@ -1893,30 +1888,22 @@ void func_8004D4E8(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
|
||||
//? func_80044F34(s8 *, s32, s32); /* extern */
|
||||
|
||||
UNUSED void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 width, s32 arg9, UNUSED s32 argA, s32 height) {
|
||||
u8 *img;
|
||||
s32 var_s3;
|
||||
void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 width, s32 arg9, s32 argA, s32 height) {
|
||||
s32 i;
|
||||
// Something weird with (width / 2).
|
||||
var_s3 = arg1 - (width / 2);
|
||||
img = texture;
|
||||
s32 var_s3;
|
||||
u8 *textureCopy;
|
||||
|
||||
var_s3 = arg1 - (arg9 / 2);
|
||||
textureCopy = texture;
|
||||
gSPDisplayList(gDisplayListHead++, D_0D008000);
|
||||
func_8004B480(arg4, arg5, arg6);
|
||||
|
||||
for (i = 0; i < arg9 / height; i++) {
|
||||
func_80044F34(img, width, height);
|
||||
func_8004BB3C(arg0, var_s3, width, arg9, arg3);
|
||||
img += (width * height) / 2;
|
||||
for (i = 0; i < (arg9 / height); i++) {
|
||||
func_80044F34(textureCopy, width, height);
|
||||
func_8004BB3C(arg0, arg1, width, arg9, arg3);
|
||||
textureCopy += (width * height) / 2;
|
||||
var_s3 += height;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/render_objects/func_8004D654.s")
|
||||
#endif
|
||||
|
||||
void func_8004D7B4(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) {
|
||||
s32 sp5C;
|
||||
@@ -2331,36 +2318,47 @@ void func_8004F020(s32 arg0) {
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Dec-20-2023
|
||||
// https://decomp.me/scratch/FxA1w
|
||||
/**
|
||||
* characterId of 8 appears to be a type of null check or control flow alteration.
|
||||
*/
|
||||
#define EXPLICIT_AND 1
|
||||
void func_8004F168(s32 arg0, s32 playerId, s32 characterId) {
|
||||
f32 thing0;
|
||||
f32 thing1;
|
||||
s16 temp_a0;
|
||||
s16 temp_a1;
|
||||
Player *player = &gPlayerOne[playerId];
|
||||
s32 temp_a0;
|
||||
s32 temp_a1;
|
||||
|
||||
if (gPlayerOne->type & PLAYER_EXISTS) {
|
||||
temp_a0 = ((D_8018D2C0[arg0] + D_8018D2F0) - ((s16) D_8018D2B0 / 2)) + D_8018D2E0 + (s32) (player->pos[0] * D_8018D2A0);
|
||||
temp_a1 = ((D_8018D2D8[arg0] + D_8018D2F8) - ((s16) D_8018D2B8 / 2)) + D_8018D2E8 + (s32) (player->pos[2] * D_8018D2A0);
|
||||
if (player->type & (1 << 15)) {
|
||||
thing0 = player->pos[0] * D_8018D2A0;
|
||||
thing1 = player->pos[2] * D_8018D2A0;
|
||||
temp_a0 = ((D_8018D2C0[arg0] + D_8018D2F0) - (D_8018D2B0 / 2)) + D_8018D2E0 + (s16)(thing0);
|
||||
temp_a1 = ((D_8018D2D8[arg0] + D_8018D2F8) - (D_8018D2B8 / 2)) + D_8018D2E8 + (s16)(thing1);
|
||||
if (characterId != 8) {
|
||||
if ((gGPCurrentRaceRankByPlayerId[playerId] == 0) && (gModeSelection != BATTLE) && (gModeSelection != TIME_TRIALS)) {
|
||||
func_80046424((s32) temp_a0, (s32) temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, (u8 *) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
||||
// return;
|
||||
if ((gGPCurrentRaceRankByPlayerId[playerId] == 0) && (gModeSelection != 3) && (gModeSelection != 1)) {
|
||||
#if EXPLICIT_AND == 1
|
||||
func_80046424(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
||||
#else
|
||||
func_80046424(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
||||
#endif
|
||||
} else {
|
||||
func_800463B0((s32) temp_a0, (s32) temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, (u8 *) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
||||
#if EXPLICIT_AND == 1
|
||||
func_800463B0(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
||||
#else
|
||||
func_800463B0(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
||||
#endif
|
||||
}
|
||||
//return;
|
||||
} else {
|
||||
if (gGPCurrentRaceRankByPlayerId[playerId] == 0) {
|
||||
func_8004C450((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot);
|
||||
//return;
|
||||
func_8004C450(temp_a0, temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot);
|
||||
} else {
|
||||
draw_hud_2d_texture((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot);
|
||||
func_8004C364(temp_a0, temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef EXPLICIT_AND
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/render_objects/func_8004F168.s")
|
||||
#endif
|
||||
@@ -2798,6 +2796,7 @@ void func_80050C68(void) {
|
||||
|
||||
// Something about the handling of the `player` variable is weird.
|
||||
// All commands are present and correct, 2 of them are out of position
|
||||
// https://decomp.me/scratch/PvJ5D
|
||||
void func_80050E34(s32 playerId, s32 arg1) {
|
||||
s32 objectIndex;
|
||||
s32 spD0;
|
||||
@@ -3802,7 +3801,7 @@ void func_80054E10(s32 objectIndex) {
|
||||
void func_80054EB8(UNUSED s32 unused) {
|
||||
s32 someIndex;
|
||||
|
||||
for (someIndex = 0; someIndex < NUM_MAX_MOLES; someIndex++) {
|
||||
for (someIndex = 0; someIndex < NUM_TOTAL_MOLES; someIndex++) {
|
||||
func_80054E10(gObjectParticle1[someIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
+52
-75
@@ -3669,10 +3669,6 @@ s16 func_8007AFB0(s32 objectIndex, s32 arg1) {
|
||||
return randomItem;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// https://decomp.me/scratch/yWKlx
|
||||
// More stupid register allocation nonsense
|
||||
|
||||
s32 func_8007B040(s32 objectIndex, s32 playerId) {
|
||||
s16 stackPadding;
|
||||
s32 temp_v1;
|
||||
@@ -3696,8 +3692,7 @@ s32 func_8007B040(s32 objectIndex, s32 playerId) {
|
||||
func_800C9060(playerId, 0x1900A058U);
|
||||
}
|
||||
var_t3 = 1;
|
||||
gObjectList[objectIndex].unk_0A2 = var_v1;
|
||||
gObjectList[objectIndex].itemDisplay = var_v1;
|
||||
gObjectList[objectIndex].itemDisplay = gObjectList[objectIndex].unk_0A2 = var_v1;
|
||||
} else {
|
||||
for (var_v1_2 = 0; var_v1_2 < gPlayerCountSelection1; var_v1_2++) {
|
||||
temp_a0 = gItemWindowObjectByPlayerId[var_v1_2];
|
||||
@@ -3711,11 +3706,11 @@ s32 func_8007B040(s32 objectIndex, s32 playerId) {
|
||||
}
|
||||
if (var_a3 != 0) {
|
||||
var_v1 = random_int(var_a3);
|
||||
temp_v1 = sp50[var_v1];
|
||||
gObjectList[objectIndex].unk_0D1 = temp_v1;
|
||||
temp_a1 = sp40[var_v1];
|
||||
gObjectList[objectIndex].unk_0A2 = temp_a1;
|
||||
gObjectList[objectIndex].itemDisplay = temp_a1;
|
||||
temp_v1 = sp50[var_v1];
|
||||
gObjectList[objectIndex].unk_0D1 = temp_v1;
|
||||
temp_a0 = gItemWindowObjectByPlayerId[temp_v1];
|
||||
sp38 = &gPlayerOne[temp_v1];
|
||||
func_800722A4(temp_a0, 1);
|
||||
@@ -3730,9 +3725,6 @@ s32 func_8007B040(s32 objectIndex, s32 playerId) {
|
||||
}
|
||||
return var_t3;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/update_objects/func_8007B040.s")
|
||||
#endif
|
||||
|
||||
void func_8007B254(s32 objectIndex, s32 arg1) {
|
||||
s8 test; // why?
|
||||
@@ -4163,34 +4155,30 @@ void wrapper_update_boos(void) {
|
||||
update_boos();
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit d9d3d6575355663122de59f6b2882d8f174e2355 on Dec-27-2022
|
||||
#ifdef NON_MATCHING
|
||||
// https://decomp.me/scratch/9JBIl
|
||||
// No idea what the source of the diff is
|
||||
void func_8007C360(s32 objectIndex, Camera *camera) {
|
||||
Objects *sp20;
|
||||
s32 sp1C;
|
||||
s32 temp_t0;
|
||||
s32 temp_t2;
|
||||
s32 var_t1;
|
||||
Objects *temp_a2;
|
||||
|
||||
temp_a2 = &gObjectList[objectIndex];
|
||||
temp_t0 = (((temp_a2->unk_0BE[1] - (u16) camera->rot[1]) + 0x8000) & 0xFFFF) * 0x24;
|
||||
temp_t0 = (u16)camera->rot[1];
|
||||
temp_t0 = (((temp_a2->direction_angle[1] - temp_t0) + 0x8000) & 0xFFFF) * 0x24;
|
||||
var_t1 = temp_t0 >> 0x10;
|
||||
if (temp_t0 < 0) {
|
||||
var_t1 = (s32) (temp_t0 + 0xFFFF) >> 0x10;
|
||||
var_t1 = temp_t0 + 0xFFFF;
|
||||
var_t1 >>= 0x10;
|
||||
}
|
||||
temp_t2 = var_t1 & 0xFFFF;
|
||||
if (temp_t2 < 0x13) {
|
||||
sp20 = temp_a2;
|
||||
sp1C = temp_t2;
|
||||
set_object_flag_status_false(objectIndex, 0x00000080);
|
||||
temp_a2->itemDisplay = (s8) sp1C;
|
||||
return;
|
||||
var_t1 &= 0xFFFF;
|
||||
if (var_t1 < 0x13) {
|
||||
set_object_flag_status_false(objectIndex, 0x80);
|
||||
temp_a2->itemDisplay = var_t1;
|
||||
} else {
|
||||
set_object_flag_status_true(objectIndex, 0x80);
|
||||
temp_a2->itemDisplay = 0x24 - var_t1;
|
||||
}
|
||||
sp20 = temp_a2;
|
||||
sp1C = temp_t2;
|
||||
set_object_flag_status_true(objectIndex, 0x00000080);
|
||||
temp_a2->itemDisplay = 0x24 - temp_t2;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/update_objects/func_8007C360.s")
|
||||
@@ -4210,34 +4198,28 @@ UNUSED void func_8007C49C(void) {
|
||||
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f
|
||||
#ifdef NON_MATCHING
|
||||
// https://decomp.me/scratch/IH8Vx
|
||||
// No idea what the source of the diff is
|
||||
void func_8007C4A4(s32 objectIndex) {
|
||||
Objects *sp20;
|
||||
s32 sp1C;
|
||||
s32 temp_t0;
|
||||
s32 temp_t8;
|
||||
s32 var_t9;
|
||||
Objects *temp_v1;
|
||||
s32 var_t1;
|
||||
|
||||
temp_v1 = &gObjectList[objectIndex];
|
||||
temp_t8 = temp_v1->unk_0BE[1] * 0x24;
|
||||
var_t9 = temp_t8 >> 0x10;
|
||||
temp_t8 = gObjectList[objectIndex].direction_angle[1] * 0x24;
|
||||
var_t1 = temp_t8 >> 0x10;
|
||||
if (temp_t8 < 0) {
|
||||
var_t9 = (s32) (temp_t8 + 0xFFFF) >> 0x10;
|
||||
var_t1 = temp_t8 + 0xFFFF;
|
||||
var_t1 >>= 0x10;
|
||||
}
|
||||
temp_t0 = var_t9 & 0xFFFF;
|
||||
if (temp_t0 < 0x13) {
|
||||
sp20 = temp_v1;
|
||||
sp1C = temp_t0;
|
||||
set_object_flag_status_false(objectIndex, 0x00000080);
|
||||
temp_v1->itemDisplay = (s8) sp1C;
|
||||
return;
|
||||
var_t1 &= 0xFFFF;
|
||||
if (var_t1 < 0x13) {
|
||||
set_object_flag_status_false(objectIndex, 0x80);
|
||||
gObjectList[objectIndex].itemDisplay = var_t1;
|
||||
}
|
||||
else {
|
||||
set_object_flag_status_true(objectIndex, 0x80);
|
||||
gObjectList[objectIndex].itemDisplay = 0x24 - var_t1;
|
||||
}
|
||||
sp20 = temp_v1;
|
||||
sp1C = temp_t0;
|
||||
set_object_flag_status_true(objectIndex, 0x00000080);
|
||||
temp_v1->itemDisplay = 0x24 - temp_t0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/update_objects/func_8007C4A4.s")
|
||||
@@ -5966,9 +5948,8 @@ void func_80080DE4(s32 arg0) {
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
extern f32 D_800E594C[][2];
|
||||
extern u16 D_800E597C[6];
|
||||
|
||||
// https://decomp.me/scratch/YMJDJ
|
||||
// No idea what the problem is
|
||||
void func_80080E8C(s32 objectIndex1, s32 objectIndex2, s32 arg2) {
|
||||
u16 anAngle;
|
||||
f32 thing0;
|
||||
@@ -6347,17 +6328,6 @@ void func_80081D34(s32 objectIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
/**
|
||||
* Nonmatching due to regalloc stuff
|
||||
* The use of the `offset` variable is really really weird
|
||||
* The intent of the function appears to be choose a random mole from a given
|
||||
* group of moles (decided by arg1)
|
||||
* `offset` then would then be offsetting the indexing into gMoleSpawns
|
||||
* so that we choose the appropriate spawn location for that mole
|
||||
* But as its written, `offset` is triple what it ought to be.
|
||||
* So there' something kind of fucky happening
|
||||
**/
|
||||
void func_80081FF4(s32 objectIndex, s32 arg1) {
|
||||
UNUSED s32 stackPadding0;
|
||||
UNUSED s32 stackPadding1;
|
||||
@@ -6401,13 +6371,17 @@ void func_80081FF4(s32 objectIndex, s32 arg1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
gObjectList[objectIndex].origin_pos[0] = gMoleSpawns[var_v1][offset + 0] * xOrientation;
|
||||
gObjectList[objectIndex].origin_pos[1] = gMoleSpawns[var_v1][offset + 1] - 9.0;
|
||||
gObjectList[objectIndex].origin_pos[2] = gMoleSpawns[var_v1][offset + 2];
|
||||
/*
|
||||
Ideally `gMoleSpawns` wouldn't be a union at all and its just be a list of Vec3s
|
||||
Even more ideally each mole group would have its own array for its spawns
|
||||
gObjectList[objectIndex].origin_pos[0] = gMoleSpawns.asVec3sList[offset + var_v1][0] * xOrientation;
|
||||
gObjectList[objectIndex].origin_pos[1] = gMoleSpawns.asVec3sList[offset + var_v1][1] - 9.0;
|
||||
gObjectList[objectIndex].origin_pos[2] = gMoleSpawns.asVec3sList[offset + var_v1][2];
|
||||
*/
|
||||
gObjectList[objectIndex].origin_pos[0] = gMoleSpawns.asFlatList[offset + (var_v1 * 3) + 0] * xOrientation;
|
||||
gObjectList[objectIndex].origin_pos[1] = gMoleSpawns.asFlatList[offset + (var_v1 * 3) + 1] - 9.0;
|
||||
gObjectList[objectIndex].origin_pos[2] = gMoleSpawns.asFlatList[offset + (var_v1 * 3) + 2];
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/update_objects/func_80081FF4.s")
|
||||
#endif
|
||||
|
||||
void func_800821AC(s32 objectIndex, s32 arg1) {
|
||||
if (gObjectList[objectIndex].state != 0) {
|
||||
@@ -6671,16 +6645,19 @@ void update_crabs(void) {
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// https://decomp.me/scratch/RquH0
|
||||
// Gollygee I sure love register allocation :^)
|
||||
// https://decomp.me/scratch/PYAg4
|
||||
// Stack issue caused by the `test` variable, but removing it causes much, much larger differences
|
||||
void func_80082F1C(s32 objectIndex, s32 arg1) {
|
||||
YVFlagPoleSpawn *test;
|
||||
gObjectList[objectIndex].model = (Gfx *) d_course_yoshi_valley_unk5;
|
||||
gObjectList[objectIndex].vertex = (Vtx *) d_course_yoshi_valley_unk4;
|
||||
gObjectList[objectIndex].sizeScaling = 0.027f;
|
||||
if (test->rot && test->rot) {}
|
||||
test = &D_800E5DF4[arg1];
|
||||
func_80072488(objectIndex);
|
||||
set_obj_origin_pos(objectIndex, D_800E5DF4[arg1].pos[0] * xOrientation, D_800E5DF4[arg1].pos[1], D_800E5DF4[arg1].pos[2]);
|
||||
set_obj_origin_pos(objectIndex, test->pos[0] * xOrientation, test->pos[1], test->pos[2]);
|
||||
set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
|
||||
set_obj_direction_angle(objectIndex, 0U, D_800E5DF4[arg1].rot, 0U);
|
||||
set_obj_direction_angle(objectIndex, 0U, test->rot, 0U);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/update_objects/func_80082F1C.s")
|
||||
|
||||
Reference in New Issue
Block a user