Various Naming (#445)

* Mass renames
This commit is contained in:
coco875
2023-10-08 00:31:48 +02:00
committed by GitHub
parent 2b74bbbcef
commit d8cfed9491
135 changed files with 6015 additions and 5760 deletions
+94 -95
View File
@@ -16,23 +16,23 @@
#include "main.h"
#include "menus.h"
void func_8006E9C0(void) {
void init_object_list(void) {
func_8006EA5C();
func_8006FA94();
switch (gScreenModeSelection) {
case SCREEN_MODE_1P:
func_80071428();
init_hud_one_player();
break;
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
func_80071818();
init_hud_two_player_vertical();
break;
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
func_80071A20();
init_hud_two_player_horizontal();
break;
case SCREEN_MODE_3P_4P_SPLITSCREEN:
func_80071C28();
init_hud_three_four_player();
break;
}
func_80070148();
@@ -193,7 +193,7 @@ GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EB10.s")
#endif
void func_8006ED60() {
bzero(D_80165C18, OBJECT_LIST_SIZE * sizeof(struct_80165C18_entry));
bzero(gObjectList, OBJECT_LIST_SIZE * sizeof(Objects));
D_80183D5C = -1;
}
@@ -217,12 +217,12 @@ void func_8006EE44(void) {
}
// Some kind of initalization for the Item Window part of the HUD
void func_8006EE7C(s32 objectIndex) {
struct_80165C18_entry *temp_v0;
void init_item_window(s32 objectIndex) {
ItemWindowObjects *temp_v0;
temp_v0 = &D_80165C18[objectIndex];
temp_v0->unk_0A4 = 0;
temp_v0->unk_0D2 = temp_v0->unk_0A4;
temp_v0 = &gObjectList[objectIndex];
temp_v0->currentItem = ITEM_NONE;
temp_v0->itemDisplay = temp_v0->currentItem;
temp_v0->tlutList = (s32 *) gTLUTItemWindowNone;
temp_v0->activeTLUT = (s32 *) gTLUTItemWindowNone;
temp_v0->textureList = gTextureItemWindowNone;
@@ -565,7 +565,7 @@ block_26:
if (gIsMirrorMode != 0) {
D_8018D2E0 = D_8018D2B0 - D_8018D2E0;
}
temp_v0 = D_8018EDF3;
temp_v0 = gPlayerCount;
if (temp_v0 == 4) {
D_8018D2C0.unk0 = 0x00A0;
D_8018D2D8.unk0 = 0x0078;
@@ -594,13 +594,13 @@ GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006F008.s")
extern u16 gIsGamePaused;
extern s8 D_801657E4;
extern s8 D_801657E6;
extern s8 D_801657E8;
extern s8 D_801657F0;
extern bool8 D_801657E6;
extern bool8 D_801657E8;
extern bool8 D_801657F0;
extern s8 D_801657F8;
extern s8 D_80165808;
extern s8 D_80165810;
extern s8 D_80165818;
extern bool8 D_80165810;
extern bool8 D_80165818;
extern s8 D_80165820;
extern s8 D_80165828;
@@ -629,14 +629,14 @@ void func_8006F824(s32 arg0) {
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_8006F824(?, s8 *, s8 *, s32); // extern
extern s8 D_801657E4;
extern s8 D_801657E6;
extern s8 D_801657E8;
extern s8 D_801657F0;
extern bool8 D_801657E6;
extern bool8 D_801657E8;
extern bool8 D_801657F0;
extern s8 D_801657F8;
extern s8 D_80165800;
extern s8 D_80165808;
extern s8 D_80165810;
extern s8 D_80165818;
extern bool8 D_80165810;
extern bool8 D_80165818;
extern s8 D_80165820;
extern s8 D_80165828;
extern ? D_80165832;
@@ -649,12 +649,12 @@ void func_8006F8CC(void) {
if (D_8018EDFC == 0) {
D_8018EDFC = 1;
D_801657E4 = 0;
D_801657E6 = 0;
D_801657E6 = FALSE;
D_80165800.unk1 = 1;
D_801657F0 = 0;
D_801657E8 = 1;
D_801657E8 = TRUE;
D_80165800.unk0 = D_80165800.unk1;
temp_a0 = D_8018EDF3;
temp_a0 = gPlayerCount;
if (temp_a0 == FOUR_PLAYERS_SELECTED) {
if (gModeSelection != BATTLE) {
D_801657E4 = 1;
@@ -667,7 +667,7 @@ void func_8006F8CC(void) {
D_80165800.unk0 = D_80165800.unk1;
}
} else if (temp_a0 == THREE_PLAYERS_SELECTED) {
D_801657E8 = 0;
D_801657E8 = FALSE;
D_801657F8 = 1;
} else if (temp_a0 == TWO_PLAYERS_SELECTED) {
if (gModeSelection != BATTLE) {
@@ -771,7 +771,7 @@ extern s32 D_8018D1F8;
extern s32 D_8018D1FC;
extern s32 D_8018D204;
extern s32 D_8018D20C;
extern s32 D_8018D214;
extern bool D_8018D214;
extern s32 D_8018D224;
extern s8 D_8018D228;
extern s32 D_8018D2A4;
@@ -828,7 +828,7 @@ void func_8006FA94(void) {
D_80165658.unk8 = 0;
D_80165658.unk4 = 0;
D_80165658.unk0 = 0;
temp_ra = D_8018EDF3;
temp_ra = gPlayerCount;
D_801658BC = D_801658C6;
switch (temp_ra) { /* irregular */
case 1:
@@ -941,9 +941,9 @@ void func_8006FA94(void) {
D_8018D168 = 0;
D_801656F0 = 0;
D_801657B2 = 0;
D_801657D8 = D_801657B2;
D_8018D214 = (s32) D_801657D8;
D_801657B0 = (s8) D_8018D214;
D_801657D8 = D_801657B2; // put all to 0
D_8018D214 = (s32) D_801657D8; // put all to 0
D_801657B0 = (s8) D_8018D214; // put all to 0
D_801657AE = D_801657B0;
D_8018D20C = 0;
D_8018D2F8 = 0;
@@ -1047,12 +1047,12 @@ void func_80070190(void) {
}
void func_80070250(s32 objectIndex, s32 arg1, StarSpawn *arg2) {
struct_80165C18_entry *temp_v0;
ItemWindowObjects *temp_v0;
func_800723A4(objectIndex, arg1);
temp_v0 = &D_80165C18[objectIndex];
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_0D5 = arg2->id;
temp_v0->unk_0A4 = 0;
temp_v0->currentItem = ITEM_NONE;
temp_v0->unk_0BE[1] = arg2->pos[0];
temp_v0->unk_09E = arg2->pos[1];
temp_v0->sizeScaling = (f32) arg2->pos[2] / 100.0;
@@ -1090,17 +1090,17 @@ void func_80070328(StarSpawn *arg0) {
* unk_0A2 is an alpha value, used to make the star twinkle.
**/
void func_800703E0(s32 objectIndex, s32 arg1, StarSpawn *arg2) {
struct_80165C18_entry *temp_v0;
ItemWindowObjects *temp_v0;
func_800723A4(objectIndex, arg1);
temp_v0 = &D_80165C18[objectIndex];
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_0D5 = arg2->id; // No idea, all 0's for stars
temp_v0->unk_0A4 = 1;
temp_v0->currentItem = ITEM_BANANA;
temp_v0->unk_0BE[1] = arg2->pos[0]; // No idea
temp_v0->unk_09E = arg2->pos[1]; // screen Y position
temp_v0->sizeScaling = (f32)arg2->pos[2] / 100.0; // some type of scaling on the texture
temp_v0->activeTexture = D_0D0293D8;
func_80073404(objectIndex, 0x10U, 0x10U, D_0D005770);
func_80073404(objectIndex, 0x10U, 0x10U, common_vtx_rectangle);
}
void func_800704A0(StarSpawn *arg0) {
@@ -1122,14 +1122,14 @@ void func_8007055C(void) {
s32 var_s4;
switch (gCurrentCourseId) {
case 0:
case COURSE_MARIO_RACEWAY:
func_80070328(&D_800E6C10);
break;
case 4:
case COURSE_YOSHI_VALLEY:
func_80070328(&D_800E6AA8);
break;
case 5:
if (D_8018EDF3 == 1) {
case COURSE_FRAPPE_SNOWLAND:
if (gPlayerCount == 1) {
var_s4 = 0x32;
} else {
var_s4 = 0x19;
@@ -1140,31 +1140,31 @@ void func_8007055C(void) {
D_8018D1F8 += var_s0;
D_8018D1F0 = var_s0;
break;
case 6:
case COURSE_KOOPA_BEACH:
func_80070328(D_800E6B00);
break;
case 7:
case COURSE_ROYAL_RACEWAY:
func_80070328(D_800E6B38);
break;
case 8:
case COURSE_LUIGI_RACEWAY:
func_80070328(D_800E6A38);
break;
case 9:
case COURSE_MOO_MOO_FARM:
func_80070328(D_800E6AA8);
break;
case 10:
case COURSE_TOADS_TURNPIKE:
func_800704A0(D_800E6C80);
break;
case 11:
case COURSE_KALAMARI_DESERT:
func_80070328(D_800E6C10);
break;
case 12:
case COURSE_SHERBET_LAND:
func_80070328(D_800E6BA8);
break;
case 13:
case COURSE_RAINBOW_ROAD:
func_800704A0(D_800E6C80);
break;
case 14:
case COURSE_WARIO_STADIUM:
func_800704A0(D_800E6DE0);
break;
}
@@ -1173,7 +1173,7 @@ void func_8007055C(void) {
void func_80070714(void) {
D_80165730 = 1;
if (D_8018EDF3 == ONE_PLAYERS_SELECTED) {
if (gPlayerCount == ONE_PLAYERS_SELECTED) {
D_80165738 = 0x64;
D_80165740 = 0x3C;
D_80165748 = 0x1E;
@@ -1223,7 +1223,7 @@ static ? D_800E6360; /* unable to generate initia
static ? D_800E641A; /* unable to generate initializer */
void func_80070780(void) {
struct_80165C18_entry *sp4C;
Objects *sp4C;
? *sp48;
? *sp44;
? *var_s1_2;
@@ -1294,15 +1294,15 @@ void func_80070780(void) {
s8 *var_s0_5;
s8 *var_s0_6;
s8 *var_s0_7;
struct_80165C18_entry *temp_v0;
struct_80165C18_entry *temp_v0_2;
struct_80165C18_entry *temp_v0_3;
struct_80165C18_entry *temp_v0_4;
struct_80165C18_entry *temp_v0_5;
struct_80165C18_entry *temp_v0_6;
struct_80165C18_entry *temp_v0_7;
struct_80165C18_entry *temp_v0_8;
struct_80165C18_entry *temp_v0_9;
Objects *temp_v0;
Objects *temp_v0_2;
Objects *temp_v0_3;
Objects *temp_v0_4;
Objects *temp_v0_5;
Objects *temp_v0_6;
Objects *temp_v0_7;
Objects *temp_v0_8;
Objects *temp_v0_9;
switch ((u16) gCurrentCourseId) {
case 0:
@@ -1352,7 +1352,7 @@ void func_80070780(void) {
temp_v1 = D_80165758 + var_s2;
var_s3_2 += 1;
temp_f6 = (f32) temp_v1->unk0;
temp_v0 = &D_80165C18[temp_s0];
temp_v0 = &gObjectList[temp_s0];
var_s2 += 8;
var_s1 += 4;
temp_v0->unk_010[0] = temp_f6 * D_8018D01C;
@@ -1365,7 +1365,7 @@ void func_80070780(void) {
temp_s0_2 = *D_80183F28;
func_800723A4(temp_s0_2, 0);
var_s1_2 = &D_800E5728;
temp_v0_2 = &D_80165C18[temp_s0_2];
temp_v0_2 = &gObjectList[temp_s0_2];
var_s2_2 = D_8018BFA8;
temp_v0_2->pos[1] = 80.0f;
temp_v0_2->pos[0] = (f32) ((f64) D_8018D01C * -68.0);
@@ -1374,7 +1374,7 @@ void func_80070780(void) {
temp_s0_3 = *var_s2_2;
func_800723A4(temp_s0_3, 0);
temp_t9 = var_s3_2 & 1;
temp_v0_3 = &D_80165C18[temp_s0_3];
temp_v0_3 = &gObjectList[temp_s0_3];
var_s3_2 += 1;
var_s2_2 += 4;
temp_v0_3->pos[1] = (f32) var_s1_2->unk2;
@@ -1388,15 +1388,15 @@ void func_80070780(void) {
} while (var_s3_2 < 4);
var_s0_2 = D_8018C030;
do {
func_80071F6C(var_s0_2);
delete_object(var_s0_2);
var_s0_2 += 4;
} while (var_s0_2 != D_8018C0B0);
return;
case 3:
if (gGamestate != 9) {
temp_s0_4 = D_80183EA0->unk0;
func_80073444(temp_s0_4, &d_course_banshee_boardwalk_bat_tlut, &d_course_banshee_boardwalk_bat, 0x20U, (u16) 0x00000040);
temp_v0_4 = &D_80165C18[temp_s0_4];
init_texture_object(temp_s0_4, &d_course_banshee_boardwalk_bat_tlut, &d_course_banshee_boardwalk_bat, 0x20U, (u16) 0x00000040);
temp_v0_4 = &gObjectList[temp_s0_4];
temp_v0_4->unk_0B2[0] = 0;
temp_v0_4->unk_0B2[1] = 0;
temp_v0_4->unk_0B2[2] = 0x8000;
@@ -1420,7 +1420,7 @@ void func_80070780(void) {
sp44 = var_v1;
func_800723A4(temp_s0_5, 0);
temp_f0 = (f32) var_s1_4->unk0 * D_8018D01C;
temp_v0_5 = &D_80165C18[temp_s0_5];
temp_v0_5 = &gObjectList[temp_s0_5];
temp_v0_5->unk_010[0] = temp_f0;
temp_v0_5->pos[0] = temp_f0;
temp_f10 = var_s1_4->unk4;
@@ -1457,14 +1457,14 @@ void func_80070780(void) {
temp_s0_6 = *var_s2_4;
sp44 = var_v1_2;
func_800723A4(temp_s0_6, 0);
temp_v0_6 = &D_80165C18[temp_s0_6];
temp_v0_6 = &gObjectList[temp_s0_6];
temp_s0_7 = *var_s1_6;
temp_v0_6->unk_010[0] = (f32) var_v1_2->unk0 * D_8018D01C;
temp_v0_6->unk_010[2] = (f32) var_v1_2->unk4;
temp_v0_6->unk_010[1] = (f32) ((f64) var_v1_2->unk2 + 5.0 + 3.0);
func_800723A4(temp_s0_7, 0);
temp_t4 = var_v1_2->unk4;
temp_v0_7 = &D_80165C18[temp_s0_7];
temp_v0_7 = &gObjectList[temp_s0_7];
temp_f8 = (f64) var_v1_2->unk2;
temp_f4_2 = (f32) var_v1_2->unk0 * D_8018D01C;
temp_t5_2 = var_v1_2->unk6;
@@ -1488,7 +1488,7 @@ void func_80070780(void) {
sp48 = var_v1_3;
func_800723A4(temp_s0_8, 0);
temp_f6_2 = var_v1_3->unk4;
temp_v0_8 = &D_80165C18[temp_s0_8];
temp_v0_8 = &gObjectList[temp_s0_8];
temp_f8_2 = var_v1_3->unk6;
temp_f18 = (f32) var_v1_3->unk2;
temp_f0_4 = (f32) var_v1_3->unk0 * D_8018D01C;
@@ -1509,9 +1509,9 @@ void func_80070780(void) {
func_800723A4(temp_s0_9, 0);
var_s2_5 += 4;
if ((u32) var_s2_5 < (u32) &D_80183F3C) {
D_80165C18[temp_s0_9].unk_0D5 = 0;
gObjectList[temp_s0_9].unk_0D5 = 0;
} else {
D_80165C18[temp_s0_9].unk_0D5 = 1;
gObjectList[temp_s0_9].unk_0D5 = 1;
}
} while (var_s2_5 != &D_80183F50);
return;
@@ -1556,7 +1556,7 @@ void func_80070780(void) {
case 9:
if (gGamestate != 9) {
var_s1_8 = D_80183EA0;
if ((D_8018EDF3 == 1) || ((D_8018EDF3 == 2) && (gModeSelection == (s32) 2))) {
if ((gPlayerCount == 1) || ((gPlayerCount == 2) && (gModeSelection == (s32) 2))) {
switch (gCCSelection) { /* switch 2; irregular */
case 0: /* switch 2 */
D_8018D1C8 = 4;
@@ -1613,7 +1613,7 @@ block_75:
find_unused_obj_index(var_s1_11);
temp_s0_10 = *var_s1_11;
func_800723A4(temp_s0_10, 0);
temp_v0_9 = &D_80165C18[temp_s0_10];
temp_v0_9 = &gObjectList[temp_s0_10];
sp4C = temp_v0_9;
temp_v0_9->pos[2] = (f32) var_s2_6->unk4;
temp_v0_9->pos[0] = (f32) var_s2_6->unk0 * D_8018D01C;
@@ -1725,7 +1725,7 @@ extern s32 D_8018D3DC;
extern s32 D_8018D3F0;
extern s32 D_8018D3F4;
void func_80071428(void) {
void init_hud_one_player(void) {
? *var_a0;
? *var_a1;
? *var_a2;
@@ -1771,7 +1771,7 @@ void func_80071428(void) {
D_8018CA70->slideItemBoxX = 0;
D_8018CA70->slideItemBoxY = 0;
D_8018CA70->stagingPosition = (s16) *gGPCurrentRaceRankByPlayerId;
func_8006EE7C(*gItemWindowObjectByPlayerId);
init_item_window(gItemWindowObjectByPlayerId[0]);
var_f0 = 35.0f;
var_v0 = &D_8018D078;
var_a3 = &D_8018D0A0;
@@ -1852,21 +1852,20 @@ void func_80071428(void) {
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071428.s")
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/init_hud_one_player.s")
#endif
extern void func_8006EE7C(s32); /* extern */
extern void func_80070190(); /* extern */
extern void func_8007055C(); /* extern */
extern void func_80070780(); /* extern */
extern s32 D_80183DA0;
extern s32 D_80183DBC;
void func_80071818(void) {
void init_hud_two_player_vertical(void) {
find_unused_obj_index(&D_80183DA0);
find_unused_obj_index(D_80183DB8);
find_unused_obj_index(&D_80183DBC);
find_unused_obj_index(gItemWindowObjectByPlayerId);
find_unused_obj_index(&gItemWindowObjectByPlayerId[0]);
find_unused_obj_index(&gItemWindowObjectByPlayerId[1]);
func_80070190();
func_8007055C();
@@ -1886,7 +1885,7 @@ void func_80071818(void) {
D_8018CA70[0].timerY = 0x10;
D_8018CA70[0].lapX = 0x67;
D_8018CA70[0].lapY = 0x28;
func_8006EE7C(*gItemWindowObjectByPlayerId);
init_item_window(gItemWindowObjectByPlayerId[0]);
D_8018CA70[1].itemBoxX = 0x43;
D_8018CA70[1].itemBoxY = 0x32;
D_8018CA70[1].slideItemBoxX = 0;
@@ -1901,7 +1900,7 @@ void func_80071818(void) {
D_8018CA70[1].timerY = 0x10;
D_8018CA70[1].lapX = 0xF7;
D_8018CA70[1].lapY = 0x28;
func_8006EE7C((gItemWindowObjectByPlayerId[1]));
init_item_window(gItemWindowObjectByPlayerId[1]);
D_8018CA70[1].rankScaling = 0.5f;
D_8018CA70[0].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[0];
D_8018CA70[1].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[1];
@@ -1925,11 +1924,11 @@ void func_80071818(void) {
void func_80071A20() {
void init_hud_two_player_horizontal() {
find_unused_obj_index(&D_80183DA0);
find_unused_obj_index(D_80183DB8);
find_unused_obj_index(&D_80183DBC);
find_unused_obj_index(gItemWindowObjectByPlayerId);
find_unused_obj_index(&gItemWindowObjectByPlayerId[0]);
find_unused_obj_index(&gItemWindowObjectByPlayerId[1]);
func_80070190();
func_8007055C();
@@ -1973,8 +1972,8 @@ void func_80071A20() {
D_8018CA70[0].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[0];
D_8018CA70[1].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[1];
D_8018CA70[0].rankScaling = D_8018CA70[1].rankScaling;
func_8006EE7C(gItemWindowObjectByPlayerId[0]);
func_8006EE7C((gItemWindowObjectByPlayerId[1]));
init_item_window(gItemWindowObjectByPlayerId[0]);
init_item_window((gItemWindowObjectByPlayerId[1]));
D_8018D3C4 = 0x1E;
D_8018D3BC = 0x18;
D_8018D3C0 = 0x28;
@@ -2006,7 +2005,7 @@ extern s32 D_8018D3BC;
extern s32 D_8018D3C0;
extern s32 D_8018D3C4;
void func_80071C28(void) {
void init_hud_three_four_player(void) {
find_unused_obj_index(&D_80183DA0);
find_unused_obj_index(D_80183DB8);
find_unused_obj_index(&D_80183DBC);
@@ -2088,20 +2087,20 @@ void func_80071C28(void) {
D_8018CA70->unkEE = (s16) gGPCurrentRaceRankByPlayerId->unk4;
D_8018CA70->unk172 = (s16) gGPCurrentRaceRankByPlayerId->unk8;
D_8018CA70->unk1F6 = (s16) gGPCurrentRaceRankByPlayerId->unkC;
func_8006EE7C(*gItemWindowObjectByPlayerId);
func_8006EE7C(*(gItemWindowObjectByPlayerId + 4));
func_8006EE7C(*(gItemWindowObjectByPlayerId + 8));
func_8006EE7C(*(gItemWindowObjectByPlayerId + 0xC));
init_item_window(*gItemWindowObjectByPlayerId);
init_item_window(*(gItemWindowObjectByPlayerId + 4));
init_item_window(*(gItemWindowObjectByPlayerId + 8));
init_item_window(*(gItemWindowObjectByPlayerId + 0xC));
D_8018CA70->unk18C = 1.5f;
D_8018CA70->unk108 = (f32) D_8018CA70->unk18C;
D_8018CA70->unk84 = (f32) D_8018CA70->unk18C;
D_8018CA70->unknownScaling = D_8018CA70->unk18C;
D_8018D158 = (s32) D_8018EDF3;
D_8018D158 = (s32) gPlayerCount;
D_8018D3C4 = 0x00000014;
D_8018D3BC = 0x00000010;
D_8018D3C0 = 0x0000001E;
D_801657A2 = 0x0888;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071C28.s")
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/init_hud_three_four_player.s")
#endif