summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2024-03-04 17:02:45 +0100
committerGitHub <noreply@github.com>2024-03-04 09:02:45 -0700
commitf99e242d97602a67ddcb107627f56effc4afd065 (patch)
tree0859f2747159d82cc57f79495d6df30198819715 /src
parent1aa6824d3340fc6fb6eca917f8c3ed7c9259af06 (diff)
Document render/update objects (#565)
* Document objects related code. * Including render/update objects code * Various renamings
Diffstat (limited to 'src')
-rw-r--r--src/actors/boat.inc.c3
-rw-r--r--src/actors/paddle_boat/render.inc.c45
-rw-r--r--src/actors/paddle_boat/update.inc.c11
-rw-r--r--src/code_800029B0.c8
-rw-r--r--src/code_80004740.c24
-rw-r--r--src/code_80005FD0.c204
-rw-r--r--src/code_80005FD0.h8
-rw-r--r--src/code_80057C60.c533
-rw-r--r--src/code_80057C60.h62
-rw-r--r--src/code_8006E9C0.c38
-rw-r--r--src/code_8006E9C0.h6
-rw-r--r--src/code_80086E70.c440
-rw-r--r--src/code_80086E70.h32
-rw-r--r--src/code_80091750.c855
-rw-r--r--src/code_80091750.h20
-rw-r--r--src/common_textures.h194
-rw-r--r--src/data/common_textures.inc.c188
-rw-r--r--src/debug/all_variables.h4
-rw-r--r--src/effects.c4
-rw-r--r--src/ending/ceremony_and_credits.c2
-rw-r--r--src/ending/code_80280000.c6
-rw-r--r--src/ending/code_80281780.c2
-rw-r--r--src/ending/code_80281C40.c5
-rw-r--r--src/ending/podium_ceremony_actors.c4
-rw-r--r--src/ending/podium_ceremony_actors.h2
-rw-r--r--src/main.c52
-rw-r--r--src/math_util_2.c14
-rw-r--r--src/math_util_2.h6
-rw-r--r--src/menus.c28
-rw-r--r--src/player_controller.c6
-rw-r--r--src/racing/actors.c202
-rw-r--r--src/racing/actors.h17
-rw-r--r--src/racing/actors_extended.c2
-rw-r--r--src/racing/math_util.c52
-rw-r--r--src/racing/math_util.h4
-rw-r--r--src/racing/race_logic.c4
-rw-r--r--src/racing/render_courses.c34
-rw-r--r--src/racing/skybox_and_splitscreen.c130
-rw-r--r--src/racing/skybox_and_splitscreen.h18
-rw-r--r--src/render_objects.c (renamed from src/hud_renderer.c)648
-rw-r--r--src/render_objects.h (renamed from src/hud_renderer.h)117
-rw-r--r--src/render_player.c2
-rw-r--r--src/update_objects.c (renamed from src/code_80071F00.c)951
-rw-r--r--src/update_objects.h (renamed from src/code_80071F00.h)68
44 files changed, 2546 insertions, 2509 deletions
diff --git a/src/actors/boat.inc.c b/src/actors/boat.inc.c
deleted file mode 100644
index 99ccb609a..000000000
--- a/src/actors/boat.inc.c
+++ /dev/null
@@ -1,3 +0,0 @@
-void update_actor_paddle_wheel(struct PaddleWheelBoat *boat) {
- boat->wheelRot += 0x38E;
-}
diff --git a/src/actors/paddle_boat/render.inc.c b/src/actors/paddle_boat/render.inc.c
new file mode 100644
index 000000000..bfb20dcb4
--- /dev/null
+++ b/src/actors/paddle_boat/render.inc.c
@@ -0,0 +1,45 @@
+#include <ultra64.h>
+#include <macros.h>
+#include <actor_types.h>
+#include "camera.h"
+#include "main.h"
+#include "actors.h"
+#include "courses/all_course_data.h"
+#include <PR/gbi.h>
+
+// This likely attaches the paddle wheel to the boat
+void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED Mat4 arg2, u16 pathCounter) {
+ UNUSED s32 pad[3];
+ Vec3f sp120;
+ Mat4 spE0;
+ Mat4 spA0;
+ Mat4 sp60;
+ f32 temp;
+
+ if ((pathCounter > 20) && (pathCounter < 25)) { return; }
+
+ temp = is_within_render_distance(arg0->pos, boat->pos, arg0->rot[1], 90000.0f, gCameraZoom[arg0 - camera1], 9000000.0f);
+
+ if (temp < 0.0f) { return; }
+
+ gSPSetLights1(gDisplayListHead++, D_800DC610[1]);
+ gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
+
+ mtxf_pos_rotation_xyz(spE0, boat->pos, boat->boatRot);
+ if (render_set_position(spE0, 1) != 0) {
+
+ gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E730);
+ gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E058);
+
+ mtxf_rotate_x(spE0, boat->wheelRot);
+ vec3f_set(sp120, 0, 16.0f, -255.0f);
+ mtxf_translate(spA0, sp120);
+ mtxf_multiplication(sp60, spE0, spA0);
+ if (render_set_position(sp60, 3) != 0) {
+ gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
+ gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_FC28);
+ gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
+ gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
+ }
+ }
+} \ No newline at end of file
diff --git a/src/actors/paddle_boat/update.inc.c b/src/actors/paddle_boat/update.inc.c
new file mode 100644
index 000000000..ddb1f720e
--- /dev/null
+++ b/src/actors/paddle_boat/update.inc.c
@@ -0,0 +1,11 @@
+#include <ultra64.h>
+#include <actor_types.h>
+
+/**
+ * @brief Rotates paddle boat's wheel.
+ *
+ * @param boat
+ */
+void update_actor_paddle_boat(struct PaddleWheelBoat *boat) {
+ boat->wheelRot += 0x38E;
+}
diff --git a/src/code_800029B0.c b/src/code_800029B0.c
index fcbbc4094..ec8cc038e 100644
--- a/src/code_800029B0.c
+++ b/src/code_800029B0.c
@@ -200,7 +200,7 @@ void setup_race(void) {
func_802969F8();
func_80005310();
func_8003D080();
- init_object_list();
+ init_hud();
D_800DC510 = 0;
gNumSpawnedShells = 0;
D_800DC5B8 = 0;
@@ -353,11 +353,11 @@ void func_80003040(void) {
break;
case COURSE_WARIO_STADIUM:
vec3f_set(position, -131.0f, 83.0f, 286.0f);
- addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN);
+ addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN);
vec3f_set(position, -2353.0f, 72.0f, -1608.0f);
- addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN);
+ addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN);
vec3f_set(position, -2622.0f, 79.0f, 739.0f);
- addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN);
+ addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN);
// d_course_wario_stadium_packed_dl_C50
find_vtx_and_set_colours(0x07000C50, 0x64, 0xFF, 0xFF, 0xFF);
// d_course_wario_stadium_packed_dl_BD8
diff --git a/src/code_80004740.c b/src/code_80004740.c
index 135461e61..c94a681f5 100644
--- a/src/code_80004740.c
+++ b/src/code_80004740.c
@@ -103,7 +103,7 @@ void func_80004A1C(animation_type_1 *arg0, s16 *arg1, animation_type_3_triplet a
}
}
-void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 arg2) {
+void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 timeCycle) {
UNUSED u32 *temp;
s16 *sp40;
s32 some_offset;
@@ -116,8 +116,8 @@ void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 arg2) {
D_80162D7A = 0;
D_80162D76 = 0;
for (someIndex = 0; someIndex < 3; someIndex++) {
- if (arg2 < (*temp_v0)[someIndex].some_limiter) {
- some_offset = arg2;
+ if (timeCycle < (*temp_v0)[someIndex].some_limiter) {
+ some_offset = timeCycle;
} else {
some_offset = 0;
}
@@ -142,7 +142,7 @@ void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 arg2) {
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
D_80162D7A -= 1;
}
- func_80004A1C(arg0, sp40, *temp_v0, (s32) arg2);
+ func_80004A1C(arg0, sp40, *temp_v0, (s32) timeCycle);
D_80162D78 = 0;
temp_v0++;
break;
@@ -151,7 +151,7 @@ void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 arg2) {
} while (new_var != 3);
}
-s16 func_80004DFC(animation_type_1 *arg0, animation_type_2 **arg1, s16 arg2, s16 arg3) {
+s16 func_80004DFC(animation_type_1 *arg0, animation_type_2 **arg1, s16 arg2, s16 timeCycle) {
animation_type_1 *sp24;
animation_type_2 *temp_v0;
animation_type_2 **sp20;
@@ -159,15 +159,15 @@ s16 func_80004DFC(animation_type_1 *arg0, animation_type_2 **arg1, s16 arg2, s16
sp24 = segmented_to_virtual(arg0);
sp20 = segmented_to_virtual(arg1); // Convert the array's address
temp_v0 = segmented_to_virtual(sp20[arg2]); // Convert an array element's address
- if (arg3 >= temp_v0->animation_length) {
- arg3 = 0;
+ if (timeCycle >= temp_v0->animation_length) {
+ timeCycle = 0;
}
- func_80004C30(sp24, temp_v0, arg3);
- arg3++;
- if (arg3 >= temp_v0->animation_length) {
- arg3 = 0;
+ func_80004C30(sp24, temp_v0, timeCycle);
+ timeCycle++;
+ if (timeCycle >= temp_v0->animation_length) {
+ timeCycle = 0;
}
- return arg3;
+ return timeCycle;
}
s16 func_80004EAC(void *addr, s16 offset) {
diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c
index fab1074ad..5edf1ca7b 100644
--- a/src/code_80005FD0.c
+++ b/src/code_80005FD0.c
@@ -12,11 +12,11 @@
#include "actors_extended.h"
#include "render_player.h"
#include "player_controller.h"
-#include "code_80071F00.h"
+#include "update_objects.h"
#include "collision.h"
#include <actor_types.h>
#include "vehicles.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "code_80057C60.h"
#include "bomb_kart.h"
#include "courses/all_course_data.h"
@@ -139,7 +139,7 @@ s32 D_8016359C;
TrainStuff gTrainList[NUM_TRAINS];
u16 isCrossingTriggeredByIndex[2];
u16 D_801637BC[2];
-PaddleWheelBoatStuff gFerries[NUM_PADDLE_WHEEL_BOATS];
+PaddleBoatStuff gPaddleBoats[NUM_PADDLE_BOATS];
VehicleStuff gBoxTruckList[NUM_RACE_BOX_TRUCKS];
VehicleStuff gSchoolBusList[NUM_RACE_SCHOOL_BUSES];
VehicleStuff gTankerTruckList[NUM_RACE_TANKER_TRUCKS];
@@ -551,7 +551,7 @@ s16 func_80005FD0(Vec3f arg0, Vec3f arg1) {
s16 temp_ret;
s16 phi_v1;
- temp_ret = get_angle_between_points(arg0, arg1);
+ temp_ret = get_angle_between_two_vectors(arg0, arg1);
phi_v1 = temp_ret;
if (gIsMirrorMode != 0) {
phi_v1 = -temp_ret;
@@ -1608,9 +1608,9 @@ block_25:
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000929C.s")
#endif
-void func_800097E0(void) {
+void update_vehicles(void) {
s32 i;
- func_8000EF20();
+ generate_player_smoke();
D_8016337C++;
if (gCurrentCourseId == COURSE_AWARD_CEREMONY) {
@@ -1629,10 +1629,10 @@ void func_800097E0(void) {
switch(gCurrentCourseId) {
case COURSE_KALAMARI_DESERT:
- func_80012AC0();
+ update_vehicle_trains();
break;
case COURSE_DK_JUNGLE:
- func_800133C4();
+ update_vehicle_paddle_boats();
break;
case COURSE_TOADS_TURNPIKE:
func_8001487C();
@@ -1876,7 +1876,7 @@ void func_80009B60(s32 playerId) {
func_8000BBD8(stackPadding1A, D_80163090[playerId], D_80163448);
}
}
- player->rotation[1] = -get_angle_between_points(player->pos, D_80162FA0);
+ player->rotation[1] = -get_angle_between_two_vectors(player->pos, D_80162FA0);
} else {
player->rotation[1] = D_80164590[D_80163448][(D_801630E0 + 4) % D_80164430];
}
@@ -1889,7 +1889,7 @@ void func_80009B60(s32 playerId) {
player->effects |= 0x10;
}
if (D_801630E8[playerId] != 0) {
- D_80163300[playerId] = -get_angle_between_points(&player->copy_rotation_x, player->pos);
+ D_80163300[playerId] = -get_angle_between_two_vectors(&player->copy_rotation_x, player->pos);
var_a0_2 = (D_801631DC[(D_80162FCE + 2) % D_80164430] * 0x168) / 65535;
var_a1 = (D_80163300[playerId] * 0x168) / 65535;
if (var_a0_2 < -0xB4) {
@@ -1995,8 +1995,8 @@ void func_80009B60(s32 playerId) {
// MISMATCH2
// This fixes part of the register allocation problems, makes fixing others
// harder though. Needs more investigation
- // var_a2 = (-get_angle_between_points(player->pos, D_80162FA0)) - (var_a1 = player->rotation[1]);
- stackPadding19 = -get_angle_between_points(player->pos, D_80162FA0) - player->rotation[1];
+ // var_a2 = (-get_angle_between_two_vectors(player->pos, D_80162FA0)) - (var_a1 = player->rotation[1]);
+ stackPadding19 = -get_angle_between_two_vectors(player->pos, D_80162FA0) - player->rotation[1];
var_a1 = stackPadding19;
var_a2 = var_a1;
if ((s16) temp_f2 < var_a1) {
@@ -3174,7 +3174,7 @@ void func_8000DF8C(s32 bombKartId) {
D_80162FC0[0] = temp_v0_2->posX + sp118;
D_80162FC0[1] = temp_v0_2->posY;
D_80162FC0[2] = temp_v0_2->posZ + temp_f0_3;
- spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
+ spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
break;
case 2:
var_s1 = (var_s1 + 4) % 360;
@@ -3194,7 +3194,7 @@ void func_8000DF8C(s32 bombKartId) {
D_80162FC0[0] = temp_v0_2->posX + sp118;
D_80162FC0[1] = temp_v0_2->posY;
D_80162FC0[2] = temp_v0_2->posZ + temp_f0_3;
- spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
+ spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
break;
case 3:
var_f20 = bombKart->yPos + 3.5f;
@@ -3218,7 +3218,7 @@ void func_8000DF8C(s32 bombKartId) {
D_80162FC0[0] = temp_v0_4->posX;
D_80162FC0[1] = temp_v0_4->posY;
D_80162FC0[2] = temp_v0_4->posZ;
- spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
+ spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
} else {
D_80162FB0[0] = var_f22;
D_80162FB0[1] = var_f20;
@@ -3226,7 +3226,7 @@ void func_8000DF8C(s32 bombKartId) {
D_80162FC0[0] = -2409.197f;
D_80162FC0[1] = 0.0f;
D_80162FC0[2] = -355.254f;
- spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
+ spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
}
temp_f14 = ((D_80162FB0[0] + D_80162FC0[0]) * 0.5f) - var_f22;
temp_f16 = ((D_80162FB0[2] + D_80162FC0[2]) * 0.5f) - var_f24;
@@ -3256,7 +3256,7 @@ void func_8000DF8C(s32 bombKartId) {
D_80162FC0[1] = temp_v0_4->posY;
D_80162FC0[2] = temp_v0_4->posZ;
var_f20 += 3.0f - (var_s1 * 0.3f);
- spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
+ spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520;
break;
default:
break;
@@ -3383,7 +3383,7 @@ void func_8000EEDC(void) {
}
}
-void func_8000EF20(void) {
+void generate_player_smoke(void) {
s32 someIndex;
f32 var_f20;
struct Actor *temp_s1;
@@ -3395,33 +3395,33 @@ void func_8000EF20(void) {
temp_s1 = &gActorList[var_s0->actorIndex];
var_s0->unk14++;
switch (var_s0->unk10) {
- case 0:
- if (var_s0->unk14 < 0xA) {
- var_f20 = 0.3f;
- } else {
- var_f20 = 0.9f;
- }
- break;
- case 1:
- if (var_s0->unk14 < 0xA) {
- var_f20 = 0.15f;
- } else {
- var_f20 = 0.45f;
- }
- break;
- case 2:
- if (var_s0->unk14 < 0xA) {
- var_f20 = 0.15f;
- } else {
- var_f20 = 0.45f;
- }
- break;
- default:
- var_f20 = 1.0f;
- break;
+ case 0:
+ if (var_s0->unk14 < 0xA) {
+ var_f20 = 0.3f;
+ } else {
+ var_f20 = 0.9f;
+ }
+ break;
+ case 1:
+ if (var_s0->unk14 < 0xA) {
+ var_f20 = 0.15f;
+ } else {
+ var_f20 = 0.45f;
+ }
+ break;
+ case 2:
+ if (var_s0->unk14 < 0xA) {
+ var_f20 = 0.15f;
+ } else {
+ var_f20 = 0.45f;
+ }
+ break;
+ default:
+ var_f20 = 1.0f;
+ break;
}
if (!(var_s0->unk14 & 1)) {
- func_80076D70(temp_s1->pos, ((random_int(30) + 20) * var_f20) / 50.0f, var_s0->unk10);
+ init_smoke_particle(temp_s1->pos, ((random_int(30) + 20) * var_f20) / 50.0f, var_s0->unk10);
}
}
}
@@ -3930,7 +3930,7 @@ s16 func_80010CB0(s32 pathIndex, s32 waypointIndex) {
sp24[0] = temp_v0->posX;
sp24[1] = temp_v0->posY;
sp24[2] = temp_v0->posZ;
- ret = get_angle_between_points(sp30, sp24);
+ ret = get_angle_between_two_vectors(sp30, sp24);
return -ret;
}
@@ -4452,7 +4452,7 @@ void init_course_vehicles(void) {
VehicleStuff *tempSchoolBus;
VehicleStuff *tempTankerTruck;
VehicleStuff *tempCar;
- PaddleWheelBoatStuff *tempPaddleWheelBoat;
+ PaddleBoatStuff *tempPaddleWheelBoat;
Vec3s paddleWheelBoatRot;
s32 loopIndex;
s32 loopIndex2;
@@ -4497,8 +4497,8 @@ void init_course_vehicles(void) {
}
break;
case COURSE_DK_JUNGLE:
- for(loopIndex = 0; loopIndex < NUM_ACTIVE_PADDLE_WHEEL_BOATS; loopIndex++) {
- tempPaddleWheelBoat = &gFerries[loopIndex];
+ for(loopIndex = 0; loopIndex < NUM_ACTIVE_PADDLE_BOATS; loopIndex++) {
+ tempPaddleWheelBoat = &gPaddleBoats[loopIndex];
if(tempPaddleWheelBoat->isActive == 1) {
origXPos = tempPaddleWheelBoat->position[0];
origZPos = tempPaddleWheelBoat->position[2];
@@ -4506,7 +4506,7 @@ void init_course_vehicles(void) {
tempPaddleWheelBoat->velocity[0] = tempPaddleWheelBoat->position[0] - origXPos;
tempPaddleWheelBoat->velocity[2] = tempPaddleWheelBoat->position[2] - origZPos;
vec3s_set(paddleWheelBoatRot, 0, tempPaddleWheelBoat->rotY, 0);
- tempPaddleWheelBoat->actorIndex = addActorToEmptySlot(tempPaddleWheelBoat->position, paddleWheelBoatRot, tempPaddleWheelBoat->velocity, ACTOR_PADDLE_WHEEL_BOAT);
+ tempPaddleWheelBoat->actorIndex = addActorToEmptySlot(tempPaddleWheelBoat->position, paddleWheelBoatRot, tempPaddleWheelBoat->velocity, ACTOR_PADDLE_BOAT);
}
}
break;
@@ -4632,7 +4632,7 @@ void func_80012A48(TrainCarStuff *trainCar, s16 arg1) {
trainCarActor->velocity[2] = trainCar->velocity[2];
}
-void func_80012AC0(void) {
+void update_vehicle_trains(void) {
UNUSED s32 pad[3];
f32 temp_f20;
TrainCarStuff *car;
@@ -4812,13 +4812,13 @@ void func_800131DC(s32 playerId) {
}
void func_800132F4(void) {
- PaddleWheelBoatStuff *var_a1;
+ PaddleBoatStuff *var_a1;
s32 i;
PathNoY *temp_a2;
u16 temp;
- for (i = 0; i < NUM_ACTIVE_PADDLE_WHEEL_BOATS; i++) {
+ for (i = 0; i < NUM_ACTIVE_PADDLE_BOATS; i++) {
temp = i * 0xB4;
- var_a1 = &gFerries[i];
+ var_a1 = &gPaddleBoats[i];
temp_a2 = &D_80163598[temp];
var_a1->position[0] = temp_a2->x;
var_a1->position[1] = D_80162EB2;
@@ -4840,11 +4840,11 @@ void func_800132F4(void) {
D_801630FC = 0;
}
-void func_800133C4(void) {
- PaddleWheelBoatStuff *ferry;
+void update_vehicle_paddle_boats(void) {
+ PaddleBoatStuff *paddleBoat;
PathNoY *waypoint;
s32 i;
- struct Actor *ferryActor;
+ struct Actor *paddleBoatActor;
f32 temp_f26;
f32 temp_f28;
f32 temp_f30;
@@ -4857,92 +4857,92 @@ void func_800133C4(void) {
Vec3f sp78;
s32 pad2;
D_801630FC += 1;
- for (i = 0; i < NUM_ACTIVE_PADDLE_WHEEL_BOATS; i++) {
- ferry = &gFerries[i];
- if (ferry->isActive == 1) {
- temp_f26 = ferry->position[0];
- temp_f28 = ferry->position[1];
- temp_f30 = ferry->position[2];
- func_8000DBAC(ferry->position, &ferry->waypointIndex, ferry->someMultiplier);
- ferry->someFlags = func_800061DC(ferry->position, 2000.0f, ferry->someFlags);
- if ((((s16) D_801630FC % 10) == 0) && (ferry->someFlags != 0)) {
- sp78[0] = (f32) ((f64) ferry->position[0] - 30.0);
- sp78[1] = (f32) ((f64) ferry->position[1] + 180.0);
- sp78[2] = (f32) ((f64) ferry->position[2] + 45.0);
- func_80006114(sp78, ferry->position, ferry->rotY);
+ for (i = 0; i < NUM_ACTIVE_PADDLE_BOATS; i++) {
+ paddleBoat = &gPaddleBoats[i];
+ if (paddleBoat->isActive == 1) {
+ temp_f26 = paddleBoat->position[0];
+ temp_f28 = paddleBoat->position[1];
+ temp_f30 = paddleBoat->position[2];
+ func_8000DBAC(paddleBoat->position, &paddleBoat->waypointIndex, paddleBoat->someMultiplier);
+ paddleBoat->someFlags = func_800061DC(paddleBoat->position, 2000.0f, paddleBoat->someFlags);
+ if ((((s16) D_801630FC % 10) == 0) && (paddleBoat->someFlags != 0)) {
+ sp78[0] = (f32) ((f64) paddleBoat->position[0] - 30.0);
+ sp78[1] = (f32) ((f64) paddleBoat->position[1] + 180.0);
+ sp78[2] = (f32) ((f64) paddleBoat->position[2] + 45.0);
+ func_80006114(sp78, paddleBoat->position, paddleBoat->rotY);
func_80075A6C(i, sp78, 1.1f);
- sp78[0] = (f32) ((f64) ferry->position[0] + 30.0);
- sp78[1] = (f32) ((f64) ferry->position[1] + 180.0);
- sp78[2] = (f32) ((f64) ferry->position[2] + 45.0);
- func_80006114(sp78, ferry->position, ferry->rotY);
+ sp78[0] = (f32) ((f64) paddleBoat->position[0] + 30.0);
+ sp78[1] = (f32) ((f64) paddleBoat->position[1] + 180.0);
+ sp78[2] = (f32) ((f64) paddleBoat->position[2] + 45.0);
+ func_80006114(sp78, paddleBoat->position, paddleBoat->rotY);
func_80075A6C(i, sp78, 1.1f);
}
if (random_int(100) == 0) {
if (random_int(2) == 0) {
- func_800C98B8(ferry->position, ferry->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x47));
+ func_800C98B8(paddleBoat->position, paddleBoat->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x47));
} else {
- func_800C98B8(ferry->position, ferry->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x48));
+ func_800C98B8(paddleBoat->position, paddleBoat->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x48));
}
}
sp94[0] = temp_f26;
sp94[1] = temp_f28;
sp94[2] = temp_f30;
- waypoint = &D_80163598[(ferry->waypointIndex + 5) % D_8016359C];
+ waypoint = &D_80163598[(paddleBoat->waypointIndex + 5) % D_8016359C];
sp88[0] = (f32) waypoint->x;
sp88[1] = (f32) D_80162EB0;
sp88[2] = (f32) waypoint->z;
temp_a1 = func_80005FD0(sp94, sp88);
- temp = temp_a1 - ferry->rotY;
+ temp = temp_a1 - paddleBoat->rotY;
var_v1 = temp;
if (var_v1 < 0) {
var_v1 = -var_v1;
}
if (var_v1 >= 0x1771) {
- if (ferry->someMultiplier > 0.2) {
- ferry->someMultiplier -= 0.04;
+ if (paddleBoat->someMultiplier > 0.2) {
+ paddleBoat->someMultiplier -= 0.04;
}
if (var_v1 >= 0x3D) {
var_v1 = 0x003C;
}
} else {
- if (ferry->someMultiplier < 2.0) {
- ferry->someMultiplier += 0.02;
+ if (paddleBoat->someMultiplier < 2.0) {
+ paddleBoat->someMultiplier += 0.02;
}
if (var_v1 >= 0x1F) {
var_v1 = 0x001E;
}
}
if (temp >= 0x8000) {
- ferry->rotY -= var_v1;
+ paddleBoat->rotY -= var_v1;
} else if (temp > 0) {
- ferry->rotY += var_v1;
+ paddleBoat->rotY += var_v1;
} else if (temp < -0x7FFF) {
- ferry->rotY += var_v1;
+ paddleBoat->rotY += var_v1;
} else if (temp < 0) {
- ferry->rotY -= var_v1;
- }
- ferry->velocity[0] = ferry->position[0] - temp_f26;
- ferry->velocity[1] = ferry->position[1] - temp_f28;
- ferry->velocity[2] = ferry->position[2] - temp_f30;
- ferryActor = &gActorList[ferry->actorIndex];
- ferryActor->pos[0] = ferry->position[0];
- ferryActor->pos[1] = ferry->position[1];
- ferryActor->pos[2] = ferry->position[2];
+ paddleBoat->rotY -= var_v1;
+ }
+ paddleBoat->velocity[0] = paddleBoat->position[0] - temp_f26;
+ paddleBoat->velocity[1] = paddleBoat->position[1] - temp_f28;
+ paddleBoat->velocity[2] = paddleBoat->position[2] - temp_f30;
+ paddleBoatActor = &gActorList[paddleBoat->actorIndex];
+ paddleBoatActor->pos[0] = paddleBoat->position[0];
+ paddleBoatActor->pos[1] = paddleBoat->position[1];
+ paddleBoatActor->pos[2] = paddleBoat->position[2];
if (gIsMirrorMode != 0) {
- ferryActor->rot[1] = -ferry->rotY;
+ paddleBoatActor->rot[1] = -paddleBoat->rotY;
} else {
- ferryActor->rot[1] = ferry->rotY;
+ paddleBoatActor->rot[1] = paddleBoat->rotY;
}
- ferryActor->velocity[0] = ferry->velocity[0];
- ferryActor->velocity[1] = ferry->velocity[1];
- ferryActor->velocity[2] = ferry->velocity[2];
+ paddleBoatActor->velocity[0] = paddleBoat->velocity[0];
+ paddleBoatActor->velocity[1] = paddleBoat->velocity[1];
+ paddleBoatActor->velocity[2] = paddleBoat->velocity[2];
}
}
}
void func_80013854(Player *player) {
s32 someIndex;
- PaddleWheelBoatStuff *tempPaddleWheelBoat;
+ PaddleBoatStuff *tempPaddleWheelBoat;
f32 x_diff;
f32 y_diff;
f32 z_diff;
@@ -4954,8 +4954,8 @@ void func_80013854(Player *player) {
playerX = player->pos[0];
playerY = player->pos[1];
playerZ = player->pos[2];
- for (someIndex = 0; someIndex < NUM_ACTIVE_PADDLE_WHEEL_BOATS; someIndex++) {
- tempPaddleWheelBoat = &gFerries[someIndex];
+ for (someIndex = 0; someIndex < NUM_ACTIVE_PADDLE_BOATS; someIndex++) {
+ tempPaddleWheelBoat = &gPaddleBoats[someIndex];
if (tempPaddleWheelBoat->isActive == 1) {
x_diff = playerX - tempPaddleWheelBoat->position[0];
y_diff = playerY - tempPaddleWheelBoat->position[1];
@@ -5091,7 +5091,7 @@ void func_80013D20(VehicleStuff *vehicle) {
sp34[0] = vehicle->position[1];
sp34[1] = 0.0f;
sp34[2] = sqrtf((temp_f0_3 * temp_f0_3) + (temp_f2_2 * temp_f2_2));
- thing = get_angle_between_points(sp40, sp34);
+ thing = get_angle_between_two_vectors(sp40, sp34);
adjust_angle(&vehicle->rotation[0], -thing, 100);
vehicle->velocity[0] = vehicle->position[0] - sp5C;
vehicle->velocity[1] = vehicle->position[1] - sp58;
@@ -8176,7 +8176,7 @@ void func_8001C14C(void) {
void func_8001C3C4(s32 cameraId) {
if (gCurrentCourseId == COURSE_AWARD_CEREMONY) {
if (gBombKarts[0].waypointIndex >= 16) {
- func_80057114(3);
+ func_80057114(PLAYER_FOUR);
}
} else {
if (gModeSelection == VERSUS) {
diff --git a/src/code_80005FD0.h b/src/code_80005FD0.h
index 228b0e6c8..15b6db5d1 100644
--- a/src/code_80005FD0.h
+++ b/src/code_80005FD0.h
@@ -83,7 +83,7 @@ void func_80009000(s32);
void func_800090F0(s32, Player*);
f32 func_80009258(s32, f32, f32);
void func_8000929C(s32, Player*);
-void func_800097E0(void);
+void update_vehicles(void);
void func_800098FC(s32, Player*);
void func_800099EC(s32, Player*);
void func_80009B60(s32);
@@ -123,7 +123,7 @@ s32 func_8000EDC8(s32);
s32 func_8000EE10(s32);
void func_8000EE58(s32);
void func_8000EEDC(void);
-void func_8000EF20(void);
+void generate_player_smoke(void);
void func_8000F0E0(void);
void func_8000F124(void);
@@ -159,13 +159,13 @@ void init_course_vehicles(void);
void func_80012780(TrainCarStuff*, s16*, u16);
void func_800127E0(void);
void func_80012A48(TrainCarStuff*, s16);
-void func_80012AC0(void);
+void update_vehicle_trains(void);
void func_80012DC0(s32, Player*);
void func_80013054(void);
void func_800131DC(s32);
void func_800132F4(void);
-void func_800133C4(void);
+void update_vehicle_paddle_boats(void);
void func_80013854(Player*);
void func_800139E4(f32, f32, s32, s32, VehicleStuff*, TrackWaypoint*);
f32 func_80013C74(s16, s16);
diff --git a/src/code_80057C60.c b/src/code_80057C60.c
index 6d0a77c14..c2063d198 100644
--- a/src/code_80057C60.c
+++ b/src/code_80057C60.c
@@ -18,9 +18,9 @@
#include "math_util_2.h"
#include "code_80005FD0.h"
#include "render_player.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "code_8006E9C0.h"
-#include "code_80071F00.h"
+#include "update_objects.h"
#include "code_80086E70.h"
#include "effects.h"
#include "src/data/data_800E8700.h"
@@ -33,7 +33,6 @@
#include "data/other_textures.h"
#include "spawn_players.h"
#include "sounds.h"
-#include "code_80071F00.h"
#include "data/some_data.h"
@@ -135,7 +134,7 @@ UNUSED s16 D_801657A8[3];
s8 D_801657AE;
UNUSED s8 D_801657AF;
//! HUD related
-s8 D_801657B0;
+s8 gHUDDisable;
UNUSED s8 D_801657B1;
s8 D_801657B2;
UNUSED s8 D_801657B3;
@@ -238,7 +237,7 @@ f32 D_80183DA8[4];
s32 gIndexLakituList[4];
f32 D_80183DC8[4];
//! Indexes for the objects associated with the Bomb Karts
-s32 D_80183DD8[NUM_BOMB_KARTS_MAX];
+s32 gIndexObjectBombKart[NUM_BOMB_KARTS_MAX];
UNUSED s32 D_80183DF8[16];
//! Next free spot in gObjectParticle1? Wraps back around to 0 if it gets bigger than gObjectParticle1_SIZE
s32 gNextFreeObjectParticle1;
@@ -490,11 +489,11 @@ void func_80057FC4(u32 arg0) {
UNUSED Gfx *temp_v1;
- if ((D_801657B0 != 0)) {
+ if ((gHUDDisable != 0)) {
return;
}
gSPDisplayList(gDisplayListHead++, &D_0D0076F8);
- func_80041EF4();
+ set_matrix_hud_screen();
if ((D_801657C8 != 0)){
return;
@@ -520,10 +519,10 @@ void func_80057FC4(u32 arg0) {
}
-void func_80058090(u32 arg0) {
+void render_object(u32 arg0) {
UNUSED Gfx *temp_v1;
- if (D_801657B0 != 0) {
+ if (gHUDDisable != 0) {
return;
}
@@ -535,104 +534,104 @@ void func_80058090(u32 arg0) {
switch (arg0) {
- case 0:
- func_800581C8();
+ case RENDER_SCREEN_MODE_1P_PLAYER_ONE:
+ render_object_p1();
break;
- case 1:
- func_800581C8();
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE:
+ render_object_p1();
break;
- case 2:
- func_800582CC();
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO:
+ render_object_p2();
break;
- case 3:
- func_800581C8();
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE:
+ render_object_p1();
break;
- case 4:
- func_800582CC();
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO:
+ render_object_p2();
break;
case 5:
- func_800581C8();
+ render_object_p1();
break;
case 6:
- func_800582CC();
+ render_object_p2();
break;
case 7:
- func_80058394();
+ render_object_p3();
break;
- case 8:
- func_800581C8();
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE:
+ render_object_p1();
break;
- case 9:
- func_800582CC();
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO:
+ render_object_p2();
break;
- case 10:
- func_80058394();
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE:
+ render_object_p3();
break;
- case 11:
- func_8005845C();
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR:
+ render_object_p4();
break;
}
}
-void func_800581C8(void) {
+void render_object_p1(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- func_8001C3C4(0);
+ func_8001C3C4(PLAYER_ONE);
if (gGamestate == ENDING) {
- func_80055F48(0);
- func_80056160(0);
- func_8005217C(0);
- func_80054BE8(0);
+ func_80055F48(PLAYER_ONE);
+ func_80056160(PLAYER_ONE);
+ func_8005217C(PLAYER_ONE);
+ func_80054BE8(PLAYER_ONE);
return;
}
if (!gDemoMode) {
- func_800532A4(0);
+ render_lakitu(PLAYER_ONE);
}
- func_800588F4(0);
+ render_object_for_player(PLAYER_ONE);
}
-void func_800582CC(void) {
+void render_object_p2(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[1]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- func_8001C3C4(1);
+ func_8001C3C4(PLAYER_TWO);
if (!gDemoMode) {
- func_800532A4(1);
+ render_lakitu(PLAYER_TWO);
}
- func_800588F4(1);
+ render_object_for_player(PLAYER_TWO);
}
-void func_80058394(void) {
+void render_object_p3(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[2]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- func_8001C3C4(2);
+ func_8001C3C4(PLAYER_THREE);
if (!gDemoMode) {
- func_800532A4(2);
+ render_lakitu(PLAYER_THREE);
}
- func_800588F4(2);
+ render_object_for_player(PLAYER_THREE);
}
-void func_8005845C(void) {
+void render_object_p4(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[3]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[3]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- func_8001C3C4(3);
+ func_8001C3C4(PLAYER_FOUR);
if ((!gDemoMode) && (gPlayerCountSelection1 == 4)) {
- func_800532A4(3);
+ render_lakitu(PLAYER_FOUR);
}
- func_800588F4(3);
+ render_object_for_player(PLAYER_FOUR);
}
-void func_80058538(u32 arg0) {
+void render_player_snow_effect(u32 arg0) {
UNUSED Gfx *temp_v1;
- if (D_801657B0 != 0) {
+ if (gHUDDisable != 0) {
return;
}
@@ -642,67 +641,67 @@ void func_80058538(u32 arg0) {
return;
}
switch (arg0) {
- case 0:
- func_80058640();
+ case RENDER_SCREEN_MODE_1P_PLAYER_ONE:
+ render_player_snow_effect_one();
break;
- case 1:
- func_80058640();
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE:
+ render_player_snow_effect_one();
break;
- case 2:
- func_800586FC();
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO:
+ render_player_snow_effect_two();
break;
- case 3:
- func_80058640();
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE:
+ render_player_snow_effect_one();
break;
- case 4:
- func_800586FC();
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO:
+ render_player_snow_effect_two();
break;
- case 8:
- func_80058640();
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE:
+ render_player_snow_effect_one();
break;
- case 9:
- func_800586FC();
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO:
+ render_player_snow_effect_two();
break;
- case 10:
- func_800587A4();
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE:
+ render_player_snow_effect_three();
break;
- case 11:
- func_8005884C();
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR:
+ render_player_snow_effect_four();
break;
}
}
-void func_80058640(void) {
+void render_player_snow_effect_one(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
if (gGamestate != ENDING) {
- func_80058B58(0);
+ render_snowing_effect(PLAYER_ONE);
}
}
-void func_800586FC(void) {
+void render_player_snow_effect_two(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[1]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- func_80058B58(1);
+ render_snowing_effect(PLAYER_TWO);
}
-void func_800587A4(void) {
+void render_player_snow_effect_three(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[2]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- func_80058B58(2);
+ render_snowing_effect(PLAYER_THREE);
}
-void func_8005884C(void) {
+void render_player_snow_effect_four(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[3]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[3]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- func_80058B58(3);
+ render_snowing_effect(PLAYER_FOUR);
}
-void func_800588F4(s32 cameraId) {
+void render_object_for_player(s32 cameraId) {
switch (gCurrentCourseId) {
case COURSE_MARIO_RACEWAY:
@@ -710,68 +709,68 @@ void func_800588F4(s32 cameraId) {
case COURSE_CHOCO_MOUNTAIN:
break;
case COURSE_BOWSER_CASTLE:
- func_80053870(cameraId);
- func_80054664(cameraId);
+ render_object_thwomps(cameraId);
+ render_object_bowser_flame(cameraId);
break;
case COURSE_BANSHEE_BOARDWALK:
if (gGamestate != CREDITS_SEQUENCE) {
- func_800527D8(cameraId);
- func_80052590(cameraId);
+ render_object_trash_bin(cameraId);
+ render_object_bat(cameraId);
func_8005217C(cameraId);
- func_800524B4(cameraId);
+ render_object_boos(cameraId);
}
break;
case COURSE_YOSHI_VALLEY:
func_80055228(cameraId);
if (gGamestate != CREDITS_SEQUENCE) {
- func_8005568C(cameraId);
+ render_object_hedgehogs(cameraId);
}
break;
case COURSE_FRAPPE_SNOWLAND:
if (gGamestate != CREDITS_SEQUENCE) {
- func_8005327C(cameraId);
+ render_object_snowmans(cameraId);
}
break;
case COURSE_KOOPA_BEACH:
if (gGamestate != CREDITS_SEQUENCE) {
- func_80055528(cameraId);
+ render_object_crabs(cameraId);
}
if (gGamestate != CREDITS_SEQUENCE) {
if ((gPlayerCount == 1) || (gPlayerCount == 2)) {
- func_80055380(cameraId);
+ render_object_seagulls(cameraId);
}
} else {
- func_80055380(cameraId);
+ render_object_seagulls(cameraId);
}
break;
case COURSE_ROYAL_RACEWAY:
break;
case COURSE_LUIGI_RACEWAY:
if (D_80165898 != 0) {
- func_80055E68(cameraId);
+ render_object_hot_air_balloon(cameraId);
}
break;
case COURSE_MOO_MOO_FARM:
if (gGamestate != CREDITS_SEQUENCE) {
- func_800550A4(cameraId);
+ render_object_moles(cameraId);
}
break;
case COURSE_TOADS_TURNPIKE:
break;
case COURSE_KALAMARI_DESERT:
- func_800541BC(cameraId);
+ render_object_train_smoke_particles(cameraId);
break;
case COURSE_SHERBET_LAND:
if (gGamestate != CREDITS_SEQUENCE) {
func_80052E30(cameraId);
}
- func_8005592C(cameraId);
+ render_object_train_penguins(cameraId);
break;
case COURSE_RAINBOW_ROAD:
if (gGamestate != CREDITS_SEQUENCE) {
- func_80056188(cameraId);
- func_80055C38(cameraId);
+ render_object_neon(cameraId);
+ render_object_chain_chomps(cameraId);
}
break;
case COURSE_WARIO_STADIUM:
@@ -784,35 +783,35 @@ void func_800588F4(s32 cameraId) {
break;
case COURSE_DK_JUNGLE:
if (gGamestate != CREDITS_SEQUENCE) {
- func_80054414(cameraId);
+ render_object_paddle_boat_smoke_particles(cameraId);
}
break;
}
- func_80054938(cameraId);
- func_80051638(cameraId);
+ render_object_smoke_particles(cameraId);
+ render_object_leaf_particle(cameraId);
if (D_80165730 != 0) {
func_80053E6C(cameraId);
}
if (gModeSelection == BATTLE) {
- func_80056AC0(cameraId);
+ render_object_bomb_kart(cameraId);
}
}
-void func_80058B58(s32 arg0) {
+void render_snowing_effect(s32 arg0) {
switch(gCurrentCourseId) {
case COURSE_FRAPPE_SNOWLAND:
if (gGamestate != 9) {
if ((D_8015F894 == 0) && (gPlayerCountSelection1 == 1)) {
- func_800517C8();
+ render_object_snowflakes_particles();
}
} else {
- func_800517C8();
+ render_object_snowflakes_particles();
}
break;
case COURSE_SHERBET_LAND:
- func_80052C60(arg0);
+ render_ice_block(arg0);
break;
}
}
@@ -828,59 +827,59 @@ void func_80058C20(u32 arg0) {
if (D_8018D22C == 0) {
switch (arg0) {
- case 0:
+ case RENDER_SCREEN_MODE_1P_PLAYER_ONE:
func_80058F48();
break;
- case 1:
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE:
if (!gDemoMode) {
func_80059358();
break;
}
break;
- case 2:
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO:
if (!gDemoMode) {
func_800593F0();
break;
}
break;
- case 3:
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE:
if (!gDemoMode) {
func_800594F0();
break;
}
break;
- case 4:
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO:
if (!gDemoMode) {
func_80059528();
break;
}
break;
- case 8:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE:
if (!gDemoMode) {
func_800596A8();
break;
}
break;
- case 9:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO:
if (!gDemoMode) {
func_80059710();
break;
}
break;
- case 10:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE:
if (!gDemoMode) {
func_80059750();
break;
}
break;
- case 11:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR:
if ((!gDemoMode) && (gPlayerCountSelection1 == 4)) {
func_800597B8();
}
@@ -889,67 +888,67 @@ void func_80058C20(u32 arg0) {
}
}
-void func_80058DB4(u32 arg0) {
+void render_hud(u32 arg0) {
D_8018D21C = arg0;
gSPDisplayList(gDisplayListHead++, &D_0D0076F8);
if (D_8018D22C == 0) {
switch (arg0) {
- case 0:
+ case RENDER_SCREEN_MODE_1P_PLAYER_ONE:
func_80058F78();
break;
- case 1:
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE:
if (!gDemoMode) {
- func_80059360();
+ render_hud_2p_horizontal_player_two_horizontal_player_one();
break;
}
break;
- case 2:
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO:
if (!gDemoMode) {
- func_800593F8();
+ render_hud_2p_horizontal_player_two();
break;
}
break;
- case 3:
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE:
if (!gDemoMode) {
- func_800594F8();
+ render_hud_2p_vertical_player_one();
break;
}
break;
- case 4:
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO:
if (!gDemoMode) {
- func_80059530();
+ render_hud_2p_vertical_player_two();
break;
}
break;
- case 8:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE:
if (!gDemoMode) {
- func_800596D8();
+ render_hud_1p_multi();
break;
}
break;
- case 9:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO:
if (!gDemoMode) {
- func_80059718();
+ render_hud_2p_multi();
break;
}
break;
- case 10:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE:
if (!gDemoMode) {
- func_80059780();
+ render_hud_3p_multi();
break;
}
break;
- case 11:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR:
if ((!gDemoMode) && (gPlayerCountSelection1 == 4)) {
- func_800597E8();
+ render_hud_4p_multi();
}
break;
}
@@ -957,19 +956,19 @@ void func_80058DB4(u32 arg0) {
}
void func_80058F48(void) {
- if (D_801657B0 == 0) {
- func_80041EF4();
+ if (gHUDDisable == 0) {
+ set_matrix_hud_screen();
}
}
void func_80058F78(void) {
- if (D_801657B0 == 0) {
- func_80041EF4();
+ if (gHUDDisable == 0) {
+ set_matrix_hud_screen();
if ((!gDemoMode) && (gIsHUDVisible != 0) && (D_801657D8 == 0)) {
- func_8004E638(0);
+ draw_item_window(PLAYER_ONE);
if (D_801657E4 != 2) {
- func_8004FA78(0);
- func_8004E78C(0);
+ render_hud_timer(PLAYER_ONE);
+ draw_simplified_lap_count(PLAYER_ONE);
func_8004EB38(0);
if (D_801657E6 != FALSE) {
func_8004ED40(0);
@@ -1038,7 +1037,7 @@ void func_800590D4(void) {
void func_800591B4(void) {
- if ((D_801657B0 == 0) && (D_800DC5B8 != 0)) {
+ if ((gHUDDisable == 0) && (D_800DC5B8 != 0)) {
func_80057C60();
gSPDisplayList(gDisplayListHead++, &D_0D0076F8);
@@ -1079,13 +1078,13 @@ void func_80059358(void) {
}
-void func_80059360(void) {
- if (D_801657B0 == 0) {
- func_8004FA78(0);
+void render_hud_2p_horizontal_player_two_horizontal_player_one(void) {
+ if (gHUDDisable == 0) {
+ render_hud_timer(PLAYER_ONE);
if (playerHUD[PLAYER_ONE].lapCount != 3) {
- func_8004CB60(playerHUD[PLAYER_ONE].lapX, playerHUD[PLAYER_ONE].lapY, (u8*) common_texture_hud_lap);
- func_8004FC78(playerHUD[PLAYER_ONE].lapX + 0xC, playerHUD[PLAYER_ONE].lapY - 4, playerHUD[PLAYER_ONE].alsoLapCount);
- func_8004E638(0);
+ draw_hud_2d_texture_32x8(playerHUD[PLAYER_ONE].lapX, playerHUD[PLAYER_ONE].lapY, common_texture_hud_lap); // draw the lap word
+ draw_lap_count(playerHUD[PLAYER_ONE].lapX + 0xC, playerHUD[PLAYER_ONE].lapY - 4, playerHUD[PLAYER_ONE].alsoLapCount);
+ draw_item_window(PLAYER_ONE);
}
}
}
@@ -1094,32 +1093,32 @@ void func_800593F0(void) {
}
-void func_800593F8(void) {
- if (D_801657B0 == 0) {
- func_8004FA78(1);
+void render_hud_2p_horizontal_player_two(void) {
+ if (gHUDDisable == 0) {
+ render_hud_timer(PLAYER_TWO);
if (playerHUD[PLAYER_TWO].lapCount != 3) {
- func_8004CB60(playerHUD[PLAYER_TWO].lapX, playerHUD[PLAYER_TWO].lapY, (u8*) common_texture_hud_lap);
- func_8004FC78(playerHUD[PLAYER_TWO].lapX + 0xC, playerHUD[PLAYER_TWO].lapY - 4, playerHUD[PLAYER_TWO].alsoLapCount);
- func_8004E638(1);
+ draw_hud_2d_texture_32x8(playerHUD[PLAYER_TWO].lapX, playerHUD[PLAYER_TWO].lapY, common_texture_hud_lap);
+ draw_lap_count(playerHUD[PLAYER_TWO].lapX + 0xC, playerHUD[PLAYER_TWO].lapY - 4, playerHUD[PLAYER_TWO].alsoLapCount);
+ draw_item_window(PLAYER_TWO);
}
}
}
-void func_80059488(s32 arg0) {
- if ((gModeSelection != BATTLE) && (D_80165800[arg0] == 0) && (gIsHUDVisible != 0)) {
- func_8004FA78(arg0);
- func_8004E78C(arg0);
+void draw_simplified_hud(s32 playerId) {
+ if ((gModeSelection != BATTLE) && (D_80165800[playerId] == 0) && (gIsHUDVisible != 0)) {
+ render_hud_timer(playerId);
+ draw_simplified_lap_count(playerId);
}
- func_8004E638(arg0);
+ draw_item_window(playerId);
}
void func_800594F0(void) {
}
-void func_800594F8(void) {
- if (D_801657B0 == 0) {
- func_80059488(0);
+void render_hud_2p_vertical_player_one(void) {
+ if (gHUDDisable == 0) {
+ draw_simplified_hud(PLAYER_ONE);
}
}
@@ -1127,17 +1126,17 @@ void func_80059528(void) {
}
-void func_80059530(void) {
- if (D_801657B0 == 0) {
- func_80059488(1);
+void render_hud_2p_vertical_player_two(void) {
+ if (gHUDDisable == 0) {
+ draw_simplified_hud(PLAYER_TWO);
}
}
-void func_80059560(s32 playerId) {
+void render_hud_lap_3p_4p(s32 playerId) {
if (gModeSelection != BATTLE) {
if (D_801657F8 && gIsHUDVisible) {
- func_8004CB60(playerHUD[playerId].lapX, playerHUD[playerId].lapY, (u8*) common_texture_hud_lap);
- func_8004FC78(playerHUD[playerId].lapX - 12, playerHUD[playerId].lapY + 4, playerHUD[playerId].alsoLapCount);
+ draw_hud_2d_texture_32x8(playerHUD[playerId].lapX, playerHUD[playerId].lapY, (u8*) common_texture_hud_lap);
+ draw_lap_count(playerHUD[playerId].lapX - 12, playerHUD[playerId].lapY + 4, playerHUD[playerId].alsoLapCount);
}
if (D_801657E4 == 2) {
if (playerHUD[playerId].unk_74 && D_80165608) {
@@ -1149,15 +1148,15 @@ void func_80059560(s32 playerId) {
}
void func_800596A8(void) {
- if (D_801657B0 == 0) {
- func_80041EF4();
+ if (gHUDDisable == 0) {
+ set_matrix_hud_screen();
}
}
-void func_800596D8(void) {
- if (D_801657B0 == 0) {
- func_80041EF4();
- func_80059560(0);
+void render_hud_1p_multi(void) {
+ if (gHUDDisable == 0) {
+ set_matrix_hud_screen();
+ render_hud_lap_3p_4p(PLAYER_ONE);
}
}
@@ -1165,36 +1164,36 @@ void func_80059710(void) {
}
-void func_80059718(void) {
- if (D_801657B0 == 0) {
- func_80041EF4();
- func_80059560(1);
+void render_hud_2p_multi(void) {
+ if (gHUDDisable == 0) {
+ set_matrix_hud_screen();
+ render_hud_lap_3p_4p(PLAYER_TWO);
}
}
void func_80059750(void) {
- if (D_801657B0 == 0) {
- func_80041EF4();
+ if (gHUDDisable == 0) {
+ set_matrix_hud_screen();
}
}
-void func_80059780(void) {
- if (D_801657B0 == 0) {
- func_80041EF4();
- func_80059560(2);
+void render_hud_3p_multi(void) {
+ if (gHUDDisable == 0) {
+ set_matrix_hud_screen();
+ render_hud_lap_3p_4p(PLAYER_THREE);
}
}
void func_800597B8(void) {
- if (D_801657B0 == 0) {
- func_80041EF4();
+ if (gHUDDisable == 0) {
+ set_matrix_hud_screen();
}
}
-void func_800597E8(void) {
- if (D_801657B0 == 0) {
- func_80041EF4();
- func_80059560(3);
+void render_hud_4p_multi(void) {
+ if (gHUDDisable == 0) {
+ set_matrix_hud_screen();
+ render_hud_lap_3p_4p(PLAYER_FOUR);
}
}
@@ -1250,7 +1249,7 @@ void func_8005995C(void) {
void func_80059A88(s32 playerId) {
func_80059820(playerId);
if (!gDemoMode) {
- update_obj_laikitu(playerId);
+ update_object_lakitu(playerId);
func_8007BB9C(playerId);
}
}
@@ -1337,7 +1336,7 @@ void func_80059D00(void) {
func_80059820(PLAYER_TWO);
func_80078C70(2);
}
- update_obj();
+ update_object();
break;
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
randomize_seed_from_controller(PLAYER_ONE);
@@ -1356,7 +1355,7 @@ void func_80059D00(void) {
}
func_80078C70(2);
func_8005D1F4(1);
- update_obj();
+ update_object();
break;
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
randomize_seed_from_controller(PLAYER_ONE);
@@ -1375,7 +1374,7 @@ void func_80059D00(void) {
}
func_80078C70(4);
func_8005D1F4(1);
- update_obj();
+ update_object();
break;
case SCREEN_MODE_3P_4P_SPLITSCREEN:
randomize_seed_from_controller(PLAYER_ONE);
@@ -1408,7 +1407,7 @@ void func_80059D00(void) {
}
func_8005D1F4(3);
}
- update_obj();
+ update_object();
break;
}
func_800744CC();
@@ -1425,12 +1424,12 @@ void func_8005A070(void) {
if (gGamestate == ENDING) {
func_80086604();
func_80086D80();
- func_8007C2F8(1);
+ update_cheep_cheep(1);
func_80077640();
} else if (gGamestate == CREDITS_SEQUENCE) {
func_80059820(PLAYER_ONE);
func_80078C70(0);
- update_obj();
+ update_object();
} else {
func_80059D00();
}
@@ -1469,22 +1468,22 @@ void func_8005A14C(s32 playerId) {
if (player->effects & 0x03000000) {
func_80087D24(objectIndex, 6.0f, 1.5f, 0.0f);
} else {
- f32_step_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 1.0f);
+ f32_step_towards(&gObjectList[objectIndex].offset[1], 0.0f, 1.0f);
}
if ((player->type & PLAYER_INVISIBLE_OR_BOMB) || (player->effects & BOO_EFFECT)) {
- gObjectList[objectIndex].unk_0A0 = 0x0050;
+ gObjectList[objectIndex].primAlpha = 0x0050;
} else {
- gObjectList[objectIndex].unk_0A0 = 0x00FF;
+ gObjectList[objectIndex].primAlpha = 0x00FF;
}
if (lapCount >= 3) {
gObjectList[objectIndex].direction_angle[2] = 0;
gObjectList[objectIndex].direction_angle[1] = 0;
gObjectList[objectIndex].direction_angle[0] = 0;
- gObjectList[objectIndex].unk_028[2] = 0.0f;
- gObjectList[objectIndex].unk_028[1] = 0.0f;
- gObjectList[objectIndex].unk_028[0] = 0.0f;
+ gObjectList[objectIndex].offset[2] = 0.0f;
+ gObjectList[objectIndex].offset[1] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
gObjectList[objectIndex].sizeScaling = 0.6f;
- gObjectList[objectIndex].unk_0A0 = 0x00FF;
+ gObjectList[objectIndex].primAlpha = 0x00FF;
}
}
}
@@ -1579,81 +1578,81 @@ void func_8005A71C(void) {
}
}
-void update_obj(void) {
+void update_object(void) {
switch (gCurrentCourseId) {
- case COURSE_MARIO_RACEWAY:
- case COURSE_CHOCO_MOUNTAIN:
- break;
- case COURSE_BOWSER_CASTLE:
- func_80081208();
- update_particle_bowser_castle();
- break;
- case COURSE_BANSHEE_BOARDWALK:
- if (gGamestate != CREDITS_SEQUENCE) {
- func_8007E1AC();
- func_8007E4C4();
- if (gModeSelection != TIME_TRIALS) {
- func_8007DB44();
+ case COURSE_MARIO_RACEWAY:
+ case COURSE_CHOCO_MOUNTAIN:
+ break;
+ case COURSE_BOWSER_CASTLE:
+ func_80081208();
+ update_flame_particle();
+ break;
+ case COURSE_BANSHEE_BOARDWALK:
+ if (gGamestate != CREDITS_SEQUENCE) {
+ update_trash_bin();
+ func_8007E4C4();
+ if (gModeSelection != TIME_TRIALS) {
+ update_bat();
+ }
+ wrapper_update_boos();
+ update_cheep_cheep(0);
}
- func_8007C340();
- func_8007C2F8(0);
- }
- break;
- case COURSE_YOSHI_VALLEY:
- func_80083080();
- if (gGamestate != CREDITS_SEQUENCE) {
- func_800834B8();
- }
- break;
- case COURSE_FRAPPE_SNOWLAND:
- if (gGamestate != CREDITS_SEQUENCE) {
- func_80083D60();
- }
- func_80078838();
- break;
- case COURSE_KOOPA_BEACH:
- if (gGamestate != CREDITS_SEQUENCE) {
- func_80082E5C();
- }
- if ((gPlayerCount == 1) || (gPlayerCount == 2) || (gGamestate == CREDITS_SEQUENCE)) {
- func_80082870();
- }
- break;
- case COURSE_LUIGI_RACEWAY:
- if (D_80165898 != 0) {
- func_800857C0();
- }
- break;
- case COURSE_MOO_MOO_FARM:
- if (gGamestate != CREDITS_SEQUENCE) {
- func_800821FC();
- }
- break;
- case COURSE_KALAMARI_DESERT:
- func_80075838();
- break;
- case COURSE_SHERBET_LAND:
- if (gGamestate != CREDITS_SEQUENCE) {
- func_800842C8();
- }
- func_80085214();
- break;
- case COURSE_RAINBOW_ROAD:
- if (gGamestate != CREDITS_SEQUENCE) {
- update_neon();
- func_80085AA8();
- }
- break;
- case COURSE_DK_JUNGLE:
- func_80075CA8();
- break;
+ break;
+ case COURSE_YOSHI_VALLEY:
+ func_80083080();
+ if (gGamestate != CREDITS_SEQUENCE) {
+ update_hedgehogs();
+ }
+ break;
+ case COURSE_FRAPPE_SNOWLAND:
+ if (gGamestate != CREDITS_SEQUENCE) {
+ update_snowmen();
+ }
+ update_snowflakes();
+ break;
+ case COURSE_KOOPA_BEACH:
+ if (gGamestate != CREDITS_SEQUENCE) {
+ update_crabs();
+ }
+ if ((gPlayerCount == 1) || (gPlayerCount == 2) || (gGamestate == CREDITS_SEQUENCE)) {
+ update_seagulls();
+ }
+ break;
+ case COURSE_LUIGI_RACEWAY:
+ if (D_80165898 != 0) {
+ update_hot_air_balloon();
+ }
+ break;
+ case COURSE_MOO_MOO_FARM:
+ if (gGamestate != CREDITS_SEQUENCE) {
+ update_moles();
+ }
+ break;
+ case COURSE_KALAMARI_DESERT:
+ update_train_smoke();
+ break;
+ case COURSE_SHERBET_LAND:
+ if (gGamestate != CREDITS_SEQUENCE) {
+ func_800842C8();
+ }
+ update_penguins();
+ break;
+ case COURSE_RAINBOW_ROAD:
+ if (gGamestate != CREDITS_SEQUENCE) {
+ update_neon();
+ update_chain_chomps();
+ }
+ break;
+ case COURSE_DK_JUNGLE:
+ update_ferries_smoke_particle();
+ break;
}
if (D_80165730 != 0) {
func_80074EE8();
}
func_80076F2C();
if ((s16) gCurrentCourseId != COURSE_FRAPPE_SNOWLAND) {
- func_80077C9C();
+ update_leaf();
}
}
diff --git a/src/code_80057C60.h b/src/code_80057C60.h
index 09dc7e935..adec3a860 100644
--- a/src/code_80057C60.h
+++ b/src/code_80057C60.h
@@ -7,6 +7,16 @@
// code_80057C60
+#define RENDER_SCREEN_MODE_1P_PLAYER_ONE PLAYER_ONE+SCREEN_MODE_1P
+#define RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE PLAYER_ONE+SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL
+#define RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO PLAYER_TWO+SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL
+#define RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE PLAYER_ONE+SCREEN_MODE_2P_SPLITSCREEN_VERTICAL+1
+#define RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO PLAYER_TWO+SCREEN_MODE_2P_SPLITSCREEN_VERTICAL+1
+#define RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE PLAYER_ONE+SCREEN_MODE_3P_4P_SPLITSCREEN+5
+#define RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO PLAYER_TWO+SCREEN_MODE_3P_4P_SPLITSCREEN+5
+#define RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE PLAYER_THREE+SCREEN_MODE_3P_4P_SPLITSCREEN+5
+#define RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR PLAYER_FOUR+SCREEN_MODE_3P_4P_SPLITSCREEN+5
+
typedef struct {
char unk_00[0x4];
Vec3f unk_04;
@@ -23,21 +33,21 @@ void func_80057CE4(void);
void func_80057DD0(void);
void func_80057FC4(u32);
-void func_80058090(u32);
-void func_800581C8(void);
-void func_800582CC(void);
-void func_80058394(void);
-void func_8005845C(void);
-void func_80058538(u32);
-void func_80058640(void);
-void func_800586FC(void);
-void func_800587A4(void);
-void func_8005884C(void);
-void func_800588F4(s32);
-void func_80058B58(s32);
+void render_object(u32);
+void render_object_p1(void);
+void render_object_p2(void);
+void render_object_p3(void);
+void render_object_p4(void);
+void render_player_snow_effect(u32);
+void render_player_snow_effect_one(void);
+void render_player_snow_effect_two(void);
+void render_player_snow_effect_three(void);
+void render_player_snow_effect_four(void);
+void render_object_for_player(s32);
+void render_snowing_effect(s32);
void func_80058BF4(void);
void func_80058C20(u32);
-void func_80058DB4(u32);
+void render_hud(u32);
void func_80058F48(void);
void func_80058F78(void);
void func_80059AC8(void);
@@ -47,23 +57,23 @@ void func_8005902C(void);
void func_800590D4(void);
void func_800591B4(void);
void func_80059358(void);
-void func_80059360(void);
+void render_hud_2p_horizontal_player_two_horizontal_player_one(void);
void func_800593F0(void);
-void func_800593F8(void);
-void func_80059488(s32);
+void render_hud_2p_horizontal_player_two(void);
+void draw_simplified_hud(s32);
void func_800594F0(void);
-void func_800594F8(void);
+void render_hud_2p_vertical_player_one(void);
void func_80059528(void);
-void func_80059530(void);
-void func_80059560(s32);
+void render_hud_2p_vertical_player_two(void);
+void render_hud_lap_3p_4p(s32);
void func_800596A8(void);
-void func_800596D8(void);
+void render_hud_1p_multi(void);
void func_80059710(void);
-void func_80059718(void);
+void render_hud_2p_multi(void);
void func_80059750(void);
-void func_80059780(void);
+void render_hud_3p_multi(void);
void func_800597B8(void);
-void func_800597E8(void);
+void render_hud_4p_multi(void);
void func_80059820(s32);
void randomize_seed_from_controller(s32);
void func_8005994C(void);
@@ -77,7 +87,7 @@ void func_8005A14C(s32);
void func_8005A380(void);
void func_8005A3C0(void);
void func_8005A71C(void);
-void update_obj(void);
+void update_object(void);
void func_8005A99C(void);
void func_8005AA34(void);
void func_8005AA4C(void);
@@ -311,7 +321,7 @@ extern s8 D_8016579C;
extern u16 D_8016579E;
extern u16 D_801657A2;
extern s8 D_801657AE;
-extern s8 D_801657B0;
+extern s8 gHUDDisable;
extern s8 D_801657B2;
extern s8 D_801657B4;
extern s8 D_801657B8[];
@@ -380,7 +390,7 @@ extern f32 D_80183DA8[];
// extern s32 gIndexLakituList[]; -> objects.h
extern f32 D_80183DC8[];
-// extern s32 D_80183DD8[]; -> bomb_kart.h
+// extern s32 gIndexObjectBombKart[]; -> bomb_kart.h
// extern s32 gNextFreeObjectParticle1; -> objects.h
extern Vec3f D_80183E40;
diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c
index 6168b681c..bbbb9b036 100644
--- a/src/code_8006E9C0.c
+++ b/src/code_8006E9C0.c
@@ -8,7 +8,7 @@
#include "code_80057C60.h"
#include "code_8006E9C0.h"
#include "code_80086E70.h"
-#include "code_80071F00.h"
+#include "update_objects.h"
#include "objects.h"
#include "bomb_kart.h"
#include "save.h"
@@ -20,10 +20,10 @@
#include "main.h"
#include "menus.h"
#include "data/other_textures.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "code_80091750.h"
-void init_object_list(void) {
+void init_hud(void) {
reset_object_variable();
func_8006FA94();
@@ -543,8 +543,8 @@ void func_8006FA94(void) {
D_801657B2 = 0;
D_801657D8 = D_801657B2;
D_8018D214 = D_801657D8;
- D_801657B0 = D_8018D214;
- D_801657AE = D_801657B0;
+ gHUDDisable = D_8018D214;
+ D_801657AE = gHUDDisable;
D_8018D20C = 0;
D_8018D2F8 = 0;
D_8018D2F0 = D_8018D2F8;
@@ -600,7 +600,7 @@ void init_object_list_index(void) {
}
for(loopIndex = 0; loopIndex < NUM_BOMB_KARTS_VERSUS; loopIndex++) {
- find_unused_obj_index(&D_80183DD8[loopIndex]);
+ find_unused_obj_index(&gIndexObjectBombKart[loopIndex]);
}
}
@@ -616,7 +616,7 @@ void func_80070250(s32 objectIndex, s32 arg1, StarSpawn *arg2) {
temp_v0->sizeScaling = (f32) arg2->pos[2] / 100.0;
temp_v0->activeTexture = &D_8018D220[arg2->id];
func_80073404(objectIndex, 0x40U, 0x20U, &D_0D005FB0);
- temp_v0->unk_0A0 = 0x00FF;
+ temp_v0->primAlpha = 0x00FF;
}
void func_80070328(StarSpawn *arg0) {
@@ -780,7 +780,7 @@ void init_course_object(void) {
gObjectList[objectId].origin_pos[0] = gThowmpSpawnList[i].startX * xOrientation;
gObjectList[objectId].origin_pos[2] = gThowmpSpawnList[i].startZ;
gObjectList[objectId].unk_0D5 = gThowmpSpawnList[i].unk_4;
- gObjectList[objectId].unk_0A0 = gThowmpSpawnList[i].unk_6;
+ gObjectList[objectId].primAlpha = gThowmpSpawnList[i].unk_6;
}
// Handle the big statue's fire breath
objectId = indexObjectList2[0];
@@ -805,7 +805,7 @@ void init_course_object(void) {
}
break;
case COURSE_BANSHEE_BOARDWALK:
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
objectId = indexObjectList1[0];
init_texture_object(objectId, d_course_banshee_boardwalk_bat_tlut, *d_course_banshee_boardwalk_bat, 0x20U, (u16) 0x00000040);
gObjectList[objectId].orientation[0] = 0;
@@ -816,10 +816,10 @@ void init_course_object(void) {
}
break;
case COURSE_YOSHI_VALLEY:
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < NUM_YV_FLAG_POLES; i++) {
init_object(indexObjectList1[i], 0);
}
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
for (i = 0; i < NUM_HEDGEHOGS; i++) {
objectId = indexObjectList2[i];
init_object(objectId, 0);
@@ -836,7 +836,7 @@ void init_course_object(void) {
for (i = 0; i < NUM_SNOWFLAKES; i++) {
find_unused_obj_index(&gObjectParticle1[i]);
}
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
for (i = 0; i < NUM_SNOWMEN; i++) {
objectId = indexObjectList2[i];
init_object(objectId, 0);
@@ -853,7 +853,7 @@ void init_course_object(void) {
}
break;
case COURSE_KOOPA_BEACH:
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
for (i = 0; i < NUM_CRABS; i++) {
objectId = indexObjectList1[i];
init_object(objectId, 0);
@@ -875,7 +875,7 @@ void init_course_object(void) {
}
break;
case COURSE_ROYAL_RACEWAY:
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
if (gModeSelection == GRAND_PRIX) {
func_80070714();
}
@@ -886,7 +886,7 @@ void init_course_object(void) {
}
break;
case COURSE_LUIGI_RACEWAY:
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
if (gModeSelection == GRAND_PRIX) {
func_80070714();
}
@@ -899,7 +899,7 @@ void init_course_object(void) {
}
break;
case COURSE_MOO_MOO_FARM:
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
if ((gPlayerCount == 1) || ((gPlayerCount == 2) && (gModeSelection == VERSUS))) {
switch (gCCSelection) { /* switch 2; irregular */
case CC_50: /* switch 2 */
@@ -955,7 +955,7 @@ void init_course_object(void) {
}
break;
case COURSE_KALAMARI_DESERT:
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
find_unused_obj_index(&D_8018CF10);
init_object(D_8018CF10, 0);
for (i = 0; i < 50; i++) {
@@ -975,7 +975,7 @@ void init_course_object(void) {
}
break;
case COURSE_RAINBOW_ROAD:
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
for (i = 0; i < NUM_NEON_SIGNS; i++) {
init_object(indexObjectList1[i], 0);
}
@@ -986,7 +986,7 @@ void init_course_object(void) {
break;
case COURSE_DK_JUNGLE:
for (i = 0; i < NUM_TORCHES; i++) {
- func_800770F0(i);
+ init_smoke_particles(i);
// wtf?
if (D_8018CF10){}
}
diff --git a/src/code_8006E9C0.h b/src/code_8006E9C0.h
index d6b646cd9..f948e1145 100644
--- a/src/code_8006E9C0.h
+++ b/src/code_8006E9C0.h
@@ -2,9 +2,9 @@
#define CODE_8006E9C0_H
#include "common_structs.h"
-#include "code_80071F00.h"
+#include "update_objects.h"
-void init_object_list(void);
+void init_hud(void);
void reset_object_variable(void);
void func_8006EB10(void);
void clear_object_list(void);
@@ -35,7 +35,7 @@ extern s16 D_800E5520[];
extern s16 D_800E5548[];
extern u8 *gCourseOutlineTextures[0x14]; // 800e54d0
-// These are found in data_code_80071F00
+// These are found in data_update_objects
extern StarSpawn D_800E6A38[]; /* unable to generate initializer */
extern StarSpawn D_800E6AA8[]; /* unable to generate initializer */
extern StarSpawn D_800E6B00[]; /* unable to generate initializer */
diff --git a/src/code_80086E70.c b/src/code_80086E70.c
index a542edf54..869fd78d1 100644
--- a/src/code_80086E70.c
+++ b/src/code_80086E70.c
@@ -9,7 +9,7 @@
#include "math_util.h"
#include "math_util_2.h"
#include "racing/memory.h"
-#include "code_80071F00.h"
+#include "update_objects.h"
#include "collision.h"
#include "audio/external.h"
#include "main.h"
@@ -18,13 +18,13 @@
void func_80086E70(s32 objectIndex) {
gObjectList[objectIndex].unk_0AE = 1;// * 0xE0)) = 1;
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
}
void func_80086EAC(s32 objectIndex, s32 arg1, s16 arg2) {
gObjectList[objectIndex].unk_0DD = arg1;
gObjectList[objectIndex].unk_0AE = arg2;
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
}
void func_80086EF0(s32 objectIndex) {
@@ -41,7 +41,7 @@ void func_80086F60(s32 objectIndex) {
gObjectList[objectIndex].unk_0AE = 0;
gObjectList[objectIndex].unk_0DD = 0;
gObjectList[objectIndex].unk_0DE = 0;
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
}
bool func_80086FA4(s32 objectIndex) {
@@ -53,12 +53,12 @@ bool func_80086FA4(s32 objectIndex) {
}
void func_80086FD4(s32 objectIndex) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
gObjectList[objectIndex].unk_0AE += 1;
}
void func_8008701C(s32 objectIndex, s32 arg1) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
gObjectList[objectIndex].unk_0AE = arg1;
}
@@ -66,13 +66,13 @@ s32 func_80087060(s32 objectIndex, s32 arg1) {
s32 sp1C;
sp1C = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) {
- set_object_flag_unk_054_true(objectIndex, 8);
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
+ set_object_flag_status_true(objectIndex, 8);
gObjectList[objectIndex].unk_0B0 = arg1;
}
gObjectList[objectIndex].unk_0B0--;
if (gObjectList[objectIndex].unk_0B0 < 0) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
sp1C = 1;
}
return sp1C;
@@ -82,13 +82,13 @@ s32 func_80087104(s32 objectIndex, u16 arg1) {
s32 sp24;
sp24 = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) {
- set_object_flag_unk_054_true(objectIndex, 8);
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
+ set_object_flag_status_true(objectIndex, 8);
gObjectList[objectIndex].unk_0B0 = random_int(arg1);
}
gObjectList[objectIndex].unk_0B0--;
if (gObjectList[objectIndex].unk_0B0 < 0) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
sp24 = 1;
}
return sp24;
@@ -98,13 +98,13 @@ s32 func_800871AC(s32 objectIndex, s32 arg1) {
s32 sp24;
sp24 = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) {
- set_object_flag_unk_054_true(objectIndex, 8);
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
+ set_object_flag_status_true(objectIndex, 8);
gObjectList[objectIndex].unk_0B0 = (s16) arg1;
}
gObjectList[objectIndex].unk_0B0--;
if (gObjectList[objectIndex].unk_0B0 < 0) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
func_80086FD4(objectIndex);
sp24 = 1;
}
@@ -112,12 +112,12 @@ s32 func_800871AC(s32 objectIndex, s32 arg1) {
}
UNUSED void func_80087258(s32 objectIndex, UNUSED s32 arg1, f32 arg2) {
- gObjectList[objectIndex].unk_028[1] += arg2;
- gObjectList[objectIndex].unk_028[2] -= arg2;
+ gObjectList[objectIndex].offset[1] += arg2;
+ gObjectList[objectIndex].offset[2] -= arg2;
}
-UNUSED s32 func_80087294(s32 objectIndex, Player *player) {
- return func_80041770(player->pos[0], gObjectList[objectIndex].pos[0], player->pos[2], gObjectList[objectIndex].pos[2]);
+UNUSED s32 get_angle_between_player_object(s32 objectIndex, Player *player) {
+ return get_angle_between_xy(player->pos[0], gObjectList[objectIndex].pos[0], player->pos[2], gObjectList[objectIndex].pos[2]);
}
s32 angle_between_object_camera(s32 objectIndex, Camera *camera) {
@@ -173,41 +173,41 @@ void func_80087620(s32 objectIndex) {
}
void func_800876A0(s32 objectIndex) {
- gObjectList[objectIndex].unk_028[0] += gObjectList[objectIndex].unk_034 * sins(gObjectList[objectIndex].direction_angle[1]);
- gObjectList[objectIndex].unk_028[2] += gObjectList[objectIndex].unk_034 * coss(gObjectList[objectIndex].direction_angle[1]);
+ gObjectList[objectIndex].offset[0] += gObjectList[objectIndex].unk_034 * sins(gObjectList[objectIndex].direction_angle[1]);
+ gObjectList[objectIndex].offset[2] += gObjectList[objectIndex].unk_034 * coss(gObjectList[objectIndex].direction_angle[1]);
}
-void func_80087710(s32 objectIndex) {
- gObjectList[objectIndex].unk_028[0] += gObjectList[objectIndex].velocity[0];
- gObjectList[objectIndex].unk_028[1] += gObjectList[objectIndex].velocity[1];
- gObjectList[objectIndex].unk_028[2] += gObjectList[objectIndex].velocity[2];
+void object_add_velocity_offset_xyz(s32 objectIndex) {
+ gObjectList[objectIndex].offset[0] += gObjectList[objectIndex].velocity[0];
+ gObjectList[objectIndex].offset[1] += gObjectList[objectIndex].velocity[1];
+ gObjectList[objectIndex].offset[2] += gObjectList[objectIndex].velocity[2];
}
-void func_8008775C(s32 objectIndex) {
- gObjectList[objectIndex].unk_028[0] += gObjectList[objectIndex].velocity[0];
- gObjectList[objectIndex].unk_028[2] += gObjectList[objectIndex].velocity[2];
+void object_add_velocity_offset_xz(s32 objectIndex) {
+ gObjectList[objectIndex].offset[0] += gObjectList[objectIndex].velocity[0];
+ gObjectList[objectIndex].offset[2] += gObjectList[objectIndex].velocity[2];
}
-UNUSED void func_80087798(s32 objectIndex) {
- gObjectList[objectIndex].unk_028[0] += gObjectList[objectIndex].velocity[0];
+UNUSED void object_add_velocity_offset_x(s32 objectIndex) {
+ gObjectList[objectIndex].offset[0] += gObjectList[objectIndex].velocity[0];
}
-void func_800877C4(s32 objectIndex) {
- gObjectList[objectIndex].unk_028[1] += gObjectList[objectIndex].velocity[1];
+void object_add_velocity_offset_y(s32 objectIndex) {
+ gObjectList[objectIndex].offset[1] += gObjectList[objectIndex].velocity[1];
}
-UNUSED void func_800877F0(s32 objectIndex) {
- gObjectList[objectIndex].unk_028[2] += gObjectList[objectIndex].velocity[2];
+UNUSED void object_add_velocity_offset_z(s32 objectIndex) {
+ gObjectList[objectIndex].offset[2] += gObjectList[objectIndex].velocity[2];
}
void func_8008781C(s32 arg0) {
func_8008751C(arg0);
- func_8008775C(arg0);
+ object_add_velocity_offset_xz(arg0);
}
void func_80087844(s32 arg0) {
func_8008757C(arg0);
- func_80087710(arg0);
+ object_add_velocity_offset_xyz(arg0);
}
f32 func_8008786C(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
@@ -218,17 +218,17 @@ s32 func_8008789C(s32 objectIndex, s32 arg1) {
s32 sp24;
sp24 = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) {
- set_object_flag_unk_054_true(objectIndex, 8);
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
+ set_object_flag_status_true(objectIndex, 8);
func_8008751C(objectIndex);
gObjectList[objectIndex].unk_0B0 = arg1;
}
gObjectList[objectIndex].unk_0B0--;
if (gObjectList[objectIndex].unk_0B0 < 0) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
sp24 = 1;
} else {
- func_8008775C(objectIndex);
+ object_add_velocity_offset_xz(objectIndex);
}
return sp24;
}
@@ -237,17 +237,17 @@ s32 func_80087954(s32 objectIndex, s32 arg1) {
s32 sp24;
sp24 = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) {
- set_object_flag_unk_054_true(objectIndex, 8);
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
+ set_object_flag_status_true(objectIndex, 8);
func_80087620(objectIndex);
gObjectList[objectIndex].unk_0B0 = arg1;
}
gObjectList[objectIndex].unk_0B0--;
if (gObjectList[objectIndex].unk_0B0 < 0) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
sp24 = 1;
} else {
- func_8008775C(objectIndex);
+ object_add_velocity_offset_xz(objectIndex);
}
return sp24;
}
@@ -259,8 +259,8 @@ bool func_80087A0C(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, s16 arg4) {
bool sp2C;
sp2C = FALSE;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) {
- set_object_flag_unk_054_true(objectIndex, 8);
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
+ set_object_flag_status_true(objectIndex, 8);
temp_v0 = arg2 - arg1;
temp_a0 = arg4 - arg3;
dist = sqrtf((temp_v0 * temp_v0) + (temp_a0 * temp_a0));
@@ -271,10 +271,10 @@ bool func_80087A0C(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, s16 arg4) {
}
gObjectList[objectIndex].unk_0B0--;
if (gObjectList[objectIndex].unk_0B0 < 0) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
sp2C = TRUE;
} else {
- func_8008775C(objectIndex);
+ object_add_velocity_offset_xz(objectIndex);
}
return sp2C;
}
@@ -283,13 +283,13 @@ s32 func_80087B84(s32 objectIndex, f32 arg1, f32 arg2) {
s32 sp24;
sp24 = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) {
- set_object_flag_unk_054_true(objectIndex, 8);
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
+ set_object_flag_status_true(objectIndex, 8);
gObjectList[objectIndex].velocity[1] = -arg1;
}
- func_800877C4(objectIndex);
+ object_add_velocity_offset_y(objectIndex);
if (gObjectList[objectIndex].pos[1] <= arg2) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
func_80086FD4(objectIndex);
sp24 = 1;
}
@@ -300,19 +300,19 @@ s32 func_80087C48(s32 objectIndex, f32 arg1, f32 arg2, s32 arg3) {
s32 sp24;
sp24 = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) {
- set_object_flag_unk_054_true(objectIndex, 8);
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) {
+ set_object_flag_status_true(objectIndex, 8);
gObjectList[objectIndex].velocity[1] = arg1;
gObjectList[objectIndex].unk_0B0 = (s16) arg3;
}
gObjectList[objectIndex].unk_0B0--;
if (gObjectList[objectIndex].unk_0B0 < 0) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
func_80086FD4(objectIndex);
sp24 = 1;
} else {
gObjectList[objectIndex].velocity[1] -= arg2;
- func_800877C4(objectIndex);
+ object_add_velocity_offset_y(objectIndex);
}
return sp24;
}
@@ -321,15 +321,15 @@ s32 func_80087D24(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3) {
s32 sp24;
sp24 = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != 0) {
- set_object_flag_unk_054_true(objectIndex, 8);
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) {
+ set_object_flag_status_true(objectIndex, 8);
gObjectList[objectIndex].velocity[1] = arg1;
}
gObjectList[objectIndex].velocity[1] -= arg2;
- func_800877C4(objectIndex);
- if (gObjectList[objectIndex].unk_028[1] <= arg3) {
- set_object_flag_unk_054_false(objectIndex, 8);
- gObjectList[objectIndex].unk_028[1] = arg3;
+ object_add_velocity_offset_y(objectIndex);
+ if (gObjectList[objectIndex].offset[1] <= arg3) {
+ set_object_flag_status_false(objectIndex, 8);
+ gObjectList[objectIndex].offset[1] = arg3;
func_80086FD4(objectIndex);
sp24 = 1;
}
@@ -341,11 +341,11 @@ bool func_80087E08(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s32
UNUSED s32 pad;
sp2C = FALSE;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != 0) {
- set_object_flag_unk_054_true(objectIndex, 8);
- gObjectList[objectIndex].unk_028[2] = 0.0f;
- gObjectList[objectIndex].unk_028[1] = 0.0f;
- gObjectList[objectIndex].unk_028[0] = 0.0f;
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) {
+ set_object_flag_status_true(objectIndex, 8);
+ gObjectList[objectIndex].offset[2] = 0.0f;
+ gObjectList[objectIndex].offset[1] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
gObjectList[objectIndex].unk_034 = arg3;
gObjectList[objectIndex].velocity[1] = arg1;
gObjectList[objectIndex].direction_angle[1] = arg4;
@@ -354,12 +354,12 @@ bool func_80087E08(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s32
}
gObjectList[objectIndex].unk_0B0--;
if (gObjectList[objectIndex].unk_0B0 < 0) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
func_80086FD4(objectIndex);
sp2C = TRUE;
} else {
gObjectList[objectIndex].velocity[1] -= arg2;
- func_80087710(objectIndex);
+ object_add_velocity_offset_xyz(objectIndex);
}
return sp2C;
}
@@ -369,24 +369,24 @@ UNUSED s32 func_80087F14(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4
UNUSED s32 stackPadding;
sp2C = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != 0) {
- set_object_flag_unk_054_true(objectIndex, 8);
- gObjectList[objectIndex].unk_028[2] = 0.0f;
- gObjectList[objectIndex].unk_028[1] = 0.0f;
- gObjectList[objectIndex].unk_028[0] = 0.0f;
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) {
+ set_object_flag_status_true(objectIndex, 8);
+ gObjectList[objectIndex].offset[2] = 0.0f;
+ gObjectList[objectIndex].offset[1] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
gObjectList[objectIndex].unk_034 = arg3;
gObjectList[objectIndex].velocity[1] = arg1;
gObjectList[objectIndex].direction_angle[1] = arg4;
func_8008751C(objectIndex);
gObjectList[objectIndex].unk_0B0 = gVBlankTimer;
}
- if (gObjectList[objectIndex].unk_028[1] <= arg5) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ if (gObjectList[objectIndex].offset[1] <= arg5) {
+ set_object_flag_status_false(objectIndex, 8);
func_80086FD4(objectIndex);
sp2C = 1;
} else {
gObjectList[objectIndex].velocity[1] -= arg2;
- func_80087710(objectIndex);
+ object_add_velocity_offset_xyz(objectIndex);
}
return sp2C;
}
@@ -395,13 +395,13 @@ void func_80088038(s32 objectIndex, f32 arg1, u16 arg2) {
f32 temp_f4;
f32 sp20;
- temp_f4 = gObjectList[objectIndex].unk_028[0];
- sp20 = gObjectList[objectIndex].unk_028[2];
+ temp_f4 = gObjectList[objectIndex].offset[0];
+ sp20 = gObjectList[objectIndex].offset[2];
gObjectList[objectIndex].unk_0C4 += arg2;
- gObjectList[objectIndex].unk_028[0] = sins(gObjectList[objectIndex].unk_0C4) * arg1;
- gObjectList[objectIndex].unk_028[2] = coss(gObjectList[objectIndex].unk_0C4) * arg1;
- gObjectList[objectIndex].velocity[0] = gObjectList[objectIndex].unk_028[0] - temp_f4;
- gObjectList[objectIndex].velocity[2] = gObjectList[objectIndex].unk_028[2] - sp20;
+ gObjectList[objectIndex].offset[0] = sins(gObjectList[objectIndex].unk_0C4) * arg1;
+ gObjectList[objectIndex].offset[2] = coss(gObjectList[objectIndex].unk_0C4) * arg1;
+ gObjectList[objectIndex].velocity[0] = gObjectList[objectIndex].offset[0] - temp_f4;
+ gObjectList[objectIndex].velocity[2] = gObjectList[objectIndex].offset[2] - sp20;
}
UNUSED void func_800880DC(void) {
@@ -449,9 +449,9 @@ void func_80088228(s32 objectIndex) {
but for some unholy reason that doesn't match
*/
temp_v0->unk_084[8] = *((s16*)temp_v0->controlPoints - 1);
- temp_v0->unk_028[0] = temp_v0->controlPoints[0].pos[0];
- temp_v0->unk_028[1] = temp_v0->controlPoints[0].pos[1];
- temp_v0->unk_028[2] = temp_v0->controlPoints[0].pos[2];
+ temp_v0->offset[0] = temp_v0->controlPoints[0].pos[0];
+ temp_v0->offset[1] = temp_v0->controlPoints[0].pos[1];
+ temp_v0->offset[2] = temp_v0->controlPoints[0].pos[2];
func_80086FD4(objectIndex);
}
@@ -463,9 +463,9 @@ s32 func_800882B0(s32 objectIndex, s32 arg1) {
s32 var_v1;
var_v1 = 0;
- temp_f0 = (s32)((D_80165760[1] - gObjectList[objectIndex].unk_028[0]) * (D_80165760[1] - gObjectList[objectIndex].unk_028[0]));
- temp_f12 = (s32)((D_80165770[1] - gObjectList[objectIndex].unk_028[1]) * (D_80165770[1] - gObjectList[objectIndex].unk_028[1]));
- temp_f2 = (s32)((D_80165780[1] - gObjectList[objectIndex].unk_028[2]) * (D_80165780[1] - gObjectList[objectIndex].unk_028[2]));
+ temp_f0 = (s32)((D_80165760[1] - gObjectList[objectIndex].offset[0]) * (D_80165760[1] - gObjectList[objectIndex].offset[0]));
+ temp_f12 = (s32)((D_80165770[1] - gObjectList[objectIndex].offset[1]) * (D_80165770[1] - gObjectList[objectIndex].offset[1]));
+ temp_f2 = (s32)((D_80165780[1] - gObjectList[objectIndex].offset[2]) * (D_80165780[1] - gObjectList[objectIndex].offset[2]));
if ((temp_f0 + temp_f12 + temp_f2 - (arg1 * arg1)) <= 0) {
var_v1 = 1;
}
@@ -509,12 +509,12 @@ s32 func_8008847C(s32 objectIndex) {
s32 sp2C;
sp2C = 0;
- set_object_flag_unk_054_false(objectIndex, 0x00800000);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000400) != 0) {
+ set_object_flag_status_false(objectIndex, 0x00800000);
+ if (is_obj_flag_status_active(objectIndex, 0x00000400) != 0) {
func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]);
if (D_8018C3B0.unk34 == 1) {
sp2C = 1;
- set_object_flag_unk_054_true(objectIndex, 0x00800000);
+ set_object_flag_status_true(objectIndex, 0x00800000);
}
gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A);
}
@@ -525,12 +525,12 @@ s32 func_80088538(s32 objectIndex) {
s32 sp2C;
sp2C = 0;
- set_object_flag_unk_054_false(objectIndex, 0x00800000);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000400) != 0) {
+ set_object_flag_status_false(objectIndex, 0x00800000);
+ if (is_obj_flag_status_active(objectIndex, 0x00000400) != 0) {
func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]);
if (D_8018C3B0.unk34 == 1) {
sp2C = 1;
- set_object_flag_unk_054_true(objectIndex, 0x00800000);
+ set_object_flag_status_true(objectIndex, 0x00800000);
}
gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A);
gObjectList[objectIndex].unk_0B8[0] = atan2s(D_8018C3B0.orientationVector[2], D_8018C3B0.orientationVector[1]) + 0x4000;
@@ -543,12 +543,12 @@ s32 func_8008861C(s32 objectIndex) {
s32 sp2C;
sp2C = 0;
- set_object_flag_unk_054_false(objectIndex, 0x00800000);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000400) != 0) {
+ set_object_flag_status_false(objectIndex, 0x00800000);
+ if (is_obj_flag_status_active(objectIndex, 0x00000400) != 0) {
func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]);
if (D_8018C3B0.unk34 == 1) {
sp2C = 1;
- set_object_flag_unk_054_true(objectIndex, 0x00800000);
+ set_object_flag_status_true(objectIndex, 0x00800000);
}
gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A);
gObjectList[objectIndex].unk_01C[0] = D_8018C3B0.orientationVector[0];
@@ -561,26 +561,26 @@ s32 func_8008861C(s32 objectIndex) {
void func_800886F4(s32 objectIndex) {
func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]);
if (D_8018C3B0.unk34 == 1) {
- set_object_flag_unk_054_true(objectIndex, 0x00800000);
+ set_object_flag_status_true(objectIndex, 0x00800000);
gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A);
gObjectList[objectIndex].unk_0B8[0] = atan2s(D_8018C3B0.orientationVector[2], D_8018C3B0.orientationVector[1]) + 0x4000;
gObjectList[objectIndex].unk_0B8[2] = atan2s(D_8018C3B0.orientationVector[0], D_8018C3B0.orientationVector[1]);
return;
}
- set_object_flag_unk_054_false(objectIndex, 0x00800000);
+ set_object_flag_status_false(objectIndex, 0x00800000);
}
void func_800887C0(s32 objectIndex) {
func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]);
if (D_8018C3B0.unk34 == 1) {
- set_object_flag_unk_054_true(objectIndex, 0x00800000);
+ set_object_flag_status_true(objectIndex, 0x00800000);
gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A);
gObjectList[objectIndex].velocity[0] = D_8018C3B0.orientationVector[0];
gObjectList[objectIndex].velocity[1] = D_8018C3B0.orientationVector[1];
gObjectList[objectIndex].velocity[2] = D_8018C3B0.orientationVector[2];
return;
}
- set_object_flag_unk_054_false(objectIndex, 0x00800000);
+ set_object_flag_status_false(objectIndex, 0x00800000);
}
/**
@@ -1038,7 +1038,7 @@ void func_80089474(s32 objectIndex, s32 playerId, f32 arg2, f32 arg3, u32 soundB
Player *player;
player = &gPlayerOne[playerId];
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
if ((func_8008933C(player, objectIndex, arg2, arg3) >= 4.0) && ((player->type & PLAYER_CPU) != PLAYER_CPU)) {
@@ -1063,10 +1063,10 @@ s32 func_800895E4(s32 objectIndex) {
var_s6 = 0;
player = gPlayerOne;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
if ((gObjectList[objectIndex].state != 0) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
var_s6 = 1;
@@ -1081,11 +1081,11 @@ void func_800896D4(s32 objectIndex, f32 arg1, f32 arg2) {
s32 var_s1;
player = gPlayerOne;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
if ((gObjectList[objectIndex].state != 0) && !(player->effects & (STAR_EFFECT | BOO_EFFECT)) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
func_8008933C(player, objectIndex, arg1, arg2 * 1.1);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
}
@@ -1098,15 +1098,15 @@ void func_80089820(s32 objectIndex, f32 arg1, f32 arg2, u32 arg3) {
s32 var_s1;
player = gPlayerOne;
- set_object_flag_unk_054_false(objectIndex, 0x02000000);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
+ set_object_flag_status_false(objectIndex, 0x02000000);
+ if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
if ((gObjectList[objectIndex].state != 0) && !(player->effects & BOO_EFFECT)) {
if ((player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
if (player->effects & STAR_EFFECT) {
- set_object_flag_unk_054_true(objectIndex, 0x02000000);
+ set_object_flag_status_true(objectIndex, 0x02000000);
} else {
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
if ((func_8008933C(player, objectIndex, arg1, arg2 * 1.1) >= 4.0) && ((player->type & PLAYER_CPU) != PLAYER_CPU)) {
@@ -1124,11 +1124,11 @@ void func_80089A04(s32 objectIndex, f32 arg1, f32 arg2) {
s32 var_s1;
player = gPlayerOne;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
if ((gObjectList[objectIndex].state != 0) && !(player->effects & (BOO_EFFECT | STAR_EFFECT)) && (has_collided_with_player(objectIndex, player) != 0)) {
func_8008933C(player, objectIndex, arg1, arg2 * 1.1);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
}
@@ -1145,12 +1145,12 @@ s32 func_80089B50(s32 objectIndex) {
test = 0;
sp40 = 0;
player = gPlayerOne;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++, test++) {
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x81000000) && (player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
if (!(player->effects & STAR_EFFECT)) {
player->soundEffects |= REVERSE_SOUND_EFFECT;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
} else {
@@ -1170,13 +1170,13 @@ s32 func_80089CBC(s32 objectIndex, f32 arg1) {
var_s7 = 0;
player = gPlayerOne;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x81000000)) {
if ((player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_with_player_and_within_height(objectIndex, player, arg1) != 0)) {
if (!(player->effects & STAR_EFFECT)) {
player->soundEffects |= REVERSE_SOUND_EFFECT;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
}
@@ -1195,7 +1195,7 @@ s32 func_80089E18(s32 objectIndex) {
var_s6 = 0;
player = gPlayerOne;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x800000C0) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
if (player->effects & STAR_EFFECT) {
@@ -1216,12 +1216,12 @@ s32 func_80089F24(s32 objectIndex) {
var_s7 = 0;
player = gPlayerOne;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) {
if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x800002C0)) {
if ((player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) {
var_s7 = 1;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
player->soundEffects |= 0x200000;
@@ -1262,14 +1262,14 @@ s32 func_8008A0B4(s32 objectIndex, Player *player, Camera *camera, u16 arg3) {
return var_t0;
}
-s32 func_8008A140(s32 objectIndex, Camera *camera, u16 arg2) {
+bool is_object_visible_on_camera(s32 objectIndex, Camera *camera, u16 angle) {
u16 temp_t2;
s32 var_t0;
- var_t0 = 0;
- temp_t2 = (func_80041770(camera->pos[0], gObjectList[objectIndex].pos[0], camera->pos[2], gObjectList[objectIndex].pos[2]) + ((s32) arg2 / 2)) - camera->rot[1];
- if ((temp_t2 >= 0) && (arg2 >= temp_t2)) {
- var_t0 = 1;
+ var_t0 = FALSE;
+ temp_t2 = (get_angle_between_xy(camera->pos[0], gObjectList[objectIndex].pos[0], camera->pos[2], gObjectList[objectIndex].pos[2]) + ((s32) angle / 2)) - camera->rot[1];
+ if ((temp_t2 >= 0) && (angle >= temp_t2)) {
+ var_t0 = TRUE;
}
return var_t0;
}
@@ -1280,7 +1280,7 @@ void func_8008A1D0(s32 objectIndex, s32 cameraId, s32 arg2, s32 arg3) {
Camera *camera;
camera = &camera1[cameraId];
- set_object_flag_unk_054_false(objectIndex, 0x00140000);
+ set_object_flag_status_false(objectIndex, 0x00100000 | VISIBLE);
temp_v0 = get_horizontal_distance_to_camera(objectIndex, camera);
if (temp_v0 < 0x2711U) {
var_a2 = 0x5555;
@@ -1289,10 +1289,10 @@ void func_8008A1D0(s32 objectIndex, s32 cameraId, s32 arg2, s32 arg3) {
} else {
var_a2 = 0x2AAB;
}
- if ((func_8008A140(objectIndex, camera, var_a2) != 0) && ((u32) (arg3 * arg3) >= temp_v0)) {
- set_object_flag_unk_054_true(objectIndex, 0x00040000);
+ if ((is_object_visible_on_camera(objectIndex, camera, var_a2) != 0) && ((u32) (arg3 * arg3) >= temp_v0)) {
+ set_object_flag_status_true(objectIndex, VISIBLE);
if (temp_v0 >= (u32) (arg2 * arg2)) {
- set_object_flag_unk_054_true(objectIndex, 0x00100000);
+ set_object_flag_status_true(objectIndex, 0x00100000);
}
}
}
@@ -1304,7 +1304,7 @@ UNUSED void func_8008A2CC(s32 objectIndex, s32 cameraId, u16 arg2) {
u16 var_a2;
camera = &camera1[cameraId];
- set_object_flag_unk_054_false(objectIndex, 0x00040000);
+ set_object_flag_status_false(objectIndex, VISIBLE);
if (no_init < 0x2711U) {
var_a2 = 0x5555;
} else if (no_init < 0x9C41U) {
@@ -1312,40 +1312,40 @@ UNUSED void func_8008A2CC(s32 objectIndex, s32 cameraId, u16 arg2) {
} else {
var_a2 = arg2;
}
- if (func_8008A140(objectIndex, camera, var_a2) != 0) {
- set_object_flag_unk_054_true(objectIndex, 0x00040000);
+ if (is_object_visible_on_camera(objectIndex, camera, var_a2) != 0) {
+ set_object_flag_status_true(objectIndex, VISIBLE);
}
}
s32 func_8008A364(s32 objectIndex, s32 cameraId, u16 arg2, s32 arg3) {
Camera *camera;
- u32 var_v1;
+ u32 dist;
u16 var_a2;
camera = &camera1[cameraId];
- set_object_flag_unk_054_false(objectIndex, 0x00060000);
- var_v1 = get_horizontal_distance_to_camera(objectIndex, camera);
- if (var_v1 < (arg3 * arg3)) {
- set_object_flag_unk_054_true(objectIndex, 0x00020000);
- if (var_v1 < 0x2711U) {
+ set_object_flag_status_false(objectIndex, 0x00020000 | VISIBLE);
+ dist = get_horizontal_distance_to_camera(objectIndex, camera);
+ if (dist < (arg3 * arg3)) {
+ set_object_flag_status_true(objectIndex, 0x00020000);
+ if (dist < 0x2711U) {
var_a2 = 0x5555;
- } else if (var_v1 < 0x9C41U) {
+ } else if (dist < 0x9C41U) {
var_a2 = 0x4000;
} else {
var_a2 = arg2;
}
- if (func_8008A140(objectIndex, camera, var_a2) != 0) {
- set_object_flag_unk_054_true(objectIndex, 0x00040000);
+ if (is_object_visible_on_camera(objectIndex, camera, var_a2) != 0) {
+ set_object_flag_status_true(objectIndex, VISIBLE);
}
}
- return var_v1;
+ return dist;
}
void func_8008A454(s32 objectIndex, s32 cameraId, s32 arg2) {
if (get_horizontal_distance_to_camera(objectIndex, &camera1[cameraId]) < (u32) (arg2 * arg2)) {
- set_object_flag_unk_054_true(objectIndex, 0x00000020);
+ set_object_flag_status_true(objectIndex, 0x00000020);
} else {
- set_object_flag_unk_054_false(objectIndex, 0x00000020);
+ set_object_flag_status_false(objectIndex, 0x00000020);
}
}
@@ -1353,16 +1353,16 @@ void func_8008A4CC(s32 objectIndex) {
s32 loopIndex;
Camera *camera;
- set_object_flag_unk_054_false(objectIndex, 0x00070000);
+ set_object_flag_status_false(objectIndex, 0x00070000);
for (loopIndex = 0, camera = camera1; loopIndex < gPlayerCountSelection1; loopIndex++, camera++) {
if (gObjectList[objectIndex].state != 0) {
if ((D_8018CF68[loopIndex] >= (gObjectList[objectIndex].unk_0DF - 1)) && ((gObjectList[objectIndex].unk_0DF + 1) >= D_8018CF68[loopIndex])) {
- set_object_flag_unk_054_true(objectIndex, 0x00010000);
+ set_object_flag_status_true(objectIndex, 0x00010000);
if (D_8018CF68[loopIndex] == gObjectList[objectIndex].unk_0DF) {
- set_object_flag_unk_054_true(objectIndex, 0x00020000);
+ set_object_flag_status_true(objectIndex, 0x00020000);
}
- if (func_8008A140(objectIndex, camera, 0x2AABU) != 0) {
- set_object_flag_unk_054_true(objectIndex, 0x00040000);
+ if (is_object_visible_on_camera(objectIndex, camera, 0x2AABU) != 0) {
+ set_object_flag_status_true(objectIndex, VISIBLE);
}
}
}
@@ -1373,10 +1373,10 @@ UNUSED void func_8008A610(s32 objectIndex) {
s32 loopIndex;
Camera *camera;
- set_object_flag_unk_054_false(objectIndex, 0x00040000);
+ set_object_flag_status_false(objectIndex, VISIBLE);
for (camera = camera1, loopIndex = 0; loopIndex < gPlayerCountSelection1; loopIndex++, camera++) {
- if ((gObjectList[objectIndex].state != 0) && (func_8008A140(objectIndex, camera, 0x2AABU) != 0)) {
- set_object_flag_unk_054_true(objectIndex, 0x00040000);
+ if ((gObjectList[objectIndex].state != 0) && (is_object_visible_on_camera(objectIndex, camera, 0x2AABU) != 0)) {
+ set_object_flag_status_true(objectIndex, VISIBLE);
}
}
}
@@ -1386,17 +1386,17 @@ void func_8008A6DC(s32 objectIndex, f32 arg1) {
s32 loopIndex;
Camera *camera;
- set_object_flag_unk_054_false(objectIndex, 0x00060000);
+ set_object_flag_status_false(objectIndex, 0x00060000);
for (camera = camera1, loopIndex = 0; loopIndex < gPlayerCountSelection1; loopIndex++, camera++) {
if ((gObjectList[objectIndex].state != 0) && (is_within_horizontal_distance_to_camera(objectIndex, camera, arg1) != 0)) {
- set_object_flag_unk_054_true(objectIndex, 0x00020000);
+ set_object_flag_status_true(objectIndex, 0x00020000);
if (arg1 <= 500.0) {
var_a2 = 0x4000;
} else {
var_a2 = 0x2AAB;
}
- if (func_8008A140(objectIndex, camera, var_a2) != 0) {
- set_object_flag_unk_054_true(objectIndex, 0x00040000);
+ if (is_object_visible_on_camera(objectIndex, camera, var_a2) != 0) {
+ set_object_flag_status_true(objectIndex, VISIBLE);
}
}
}
@@ -1468,9 +1468,9 @@ void func_8008AA3C(s32 objectIndex) {
but for some unholy reason that doesn't match
*/
temp_v0->unk_084[8] = *((s16*)temp_v0->controlPoints - 1);
- temp_v0->unk_028[0] = temp_v0->controlPoints[0].pos[0];
- temp_v0->unk_028[1] = temp_v0->controlPoints[0].pos[1];
- temp_v0->unk_028[2] = temp_v0->controlPoints[0].pos[2];
+ temp_v0->offset[0] = temp_v0->controlPoints[0].pos[0];
+ temp_v0->offset[1] = temp_v0->controlPoints[0].pos[1];
+ temp_v0->offset[2] = temp_v0->controlPoints[0].pos[2];
temp_v0->unk_09A = (s16) (10000 / temp_v0->controlPoints[0].velocity);
func_8008A920(objectIndex);
func_80086FD4(objectIndex);
@@ -1481,9 +1481,9 @@ void func_8008AB10(s32 objectIndex) {
Objects *temp_v0;
temp_v0 = &gObjectList[objectIndex];
- temp_v0->unk_028[0] += temp_v0->velocity[0];
- temp_v0->unk_028[1] += temp_v0->velocity[1];
- temp_v0->unk_028[2] += temp_v0->velocity[2];
+ temp_v0->offset[0] += temp_v0->velocity[0];
+ temp_v0->offset[1] += temp_v0->velocity[1];
+ temp_v0->offset[2] += temp_v0->velocity[2];
temp_v0->timer += (u16)temp_v0->unk_09A;
if (temp_v0->timer >= 0x2710) {
temp_v0->unk_084[9] = (u16)temp_v0->unk_084[9] + 1;
@@ -1611,9 +1611,9 @@ void func_8008B038(s32 objectIndex) {
Objects *temp_v0;
temp_v0 = &gObjectList[objectIndex];
- temp_v0->unk_028[0] = (D_80183DA8[0] * D_80165760[0]) + (D_80183DA8[1] * D_80165760[1]) + (D_80183DA8[2] * D_80165760[2]) + (D_80183DA8[3] * D_80165760[3]);
- temp_v0->unk_028[1] = (D_80183DA8[0] * D_80165770[0]) + (D_80183DA8[1] * D_80165770[1]) + (D_80183DA8[2] * D_80165770[2]) + (D_80183DA8[3] * D_80165770[3]);
- temp_v0->unk_028[2] = (D_80183DA8[0] * D_80165780[0]) + (D_80183DA8[1] * D_80165780[1]) + (D_80183DA8[2] * D_80165780[2]) + (D_80183DA8[3] * D_80165780[3]);
+ temp_v0->offset[0] = (D_80183DA8[0] * D_80165760[0]) + (D_80183DA8[1] * D_80165760[1]) + (D_80183DA8[2] * D_80165760[2]) + (D_80183DA8[3] * D_80165760[3]);
+ temp_v0->offset[1] = (D_80183DA8[0] * D_80165770[0]) + (D_80183DA8[1] * D_80165770[1]) + (D_80183DA8[2] * D_80165770[2]) + (D_80183DA8[3] * D_80165770[3]);
+ temp_v0->offset[2] = (D_80183DA8[0] * D_80165780[0]) + (D_80183DA8[1] * D_80165780[1]) + (D_80183DA8[2] * D_80165780[2]) + (D_80183DA8[3] * D_80165780[3]);
}
void func_8008B17C(s32 objectIndex, f32 arg1) {
@@ -1686,7 +1686,7 @@ void func_8008B3E4(s32 objectIndex) {
Objects *temp_v0;
SplineData *spline;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) {
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_084[9] = 0;
temp_v0->timer = 0;
@@ -1698,7 +1698,7 @@ void func_8008B3E4(s32 objectIndex) {
*/
temp_v0->unk_084[8] = *(((s16*)temp_v0->controlPoints) - 1);
- set_object_flag_unk_054_true(objectIndex, 8);
+ set_object_flag_status_true(objectIndex, 8);
}
}
@@ -1726,7 +1726,7 @@ void func_8008B478(s32 objectIndex, s32 arg1) {
sp34 = ((f32)gObjectList[objectIndex].timer / 10000.0);
// Calculate the curve at `t`
func_8008B17C(objectIndex, sp34);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x800) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x800) != 0) {
// Calculate the curve's derivative at `t`
func_8008AFE0(objectIndex, sp34);
}
@@ -1765,7 +1765,7 @@ void func_8008B6A4(s32 objectIndex) {
// Have to do it this way due to the u16 cast
temp_v0->unk_084[9] = (u16) temp_v0->unk_084[9] + 1;
if ((u16)temp_v0->unk_084[9] == (u16)temp_v0->unk_084[8]) {
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 8);
} else {
func_8008B44C(objectIndex);
}
@@ -1801,18 +1801,18 @@ void set_obj_origin_pos(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3) {
gObjectList[objectIndex].origin_pos[2] = arg3;
}
-void func_8008B80C(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3) {
- gObjectList[objectIndex].unk_028[0] = arg1;
- gObjectList[objectIndex].unk_028[1] = arg2;
- gObjectList[objectIndex].unk_028[2] = arg3;
+void set_obj_origin_offset(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3) {
+ gObjectList[objectIndex].offset[0] = arg1;
+ gObjectList[objectIndex].offset[1] = arg2;
+ gObjectList[objectIndex].offset[2] = arg3;
}
void func_8008B844(s32 objectIndex) {
f32 temp_f0 = gObjectList[objectIndex].origin_pos[0];
- gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].unk_028[0] + temp_f0;
- gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].unk_028[1] + temp_f0;
- gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].unk_028[2] + temp_f0;
+ gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].offset[0] + temp_f0;
+ gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].offset[1] + temp_f0;
+ gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].offset[2] + temp_f0;
}
void set_obj_direction_angle(s32 objectIndex, u16 arg1, u16 arg2, u16 arg3) {
@@ -1849,63 +1849,63 @@ void func_8008B928(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, SplineData *sp
temp_s0->direction_angle[0] = get_x_direction_angle(objectIndex);
}
-UNUSED void func_8008BA40(s32 objectIndex, s16 arg1, u16 arg2) {
- s16 test;
+UNUSED void object_origin_pos_randomize_around_x(s32 objectIndex, s16 x, u16 arg2) {
+ s16 offset_x;
- test = random_int(arg2) - (arg2 / 2);
- gObjectList[objectIndex].origin_pos[0] = arg1 + test;
+ offset_x = random_int(arg2) - (arg2 / 2);
+ gObjectList[objectIndex].origin_pos[0] = x + offset_x;
}
-void func_8008BAB4(s32 objectIndex, s16 arg1, u16 arg2) {
- s16 test;
+void object_origin_pos_randomize_around_y(s32 objectIndex, s16 y, u16 arg2) {
+ s16 offset_y;
- test = random_int(arg2) - (arg2 / 2);
- gObjectList[objectIndex].origin_pos[1] = arg1 + test;
+ offset_y = random_int(arg2) - (arg2 / 2);
+ gObjectList[objectIndex].origin_pos[1] = y + offset_y;
}
-UNUSED void func_8008BB28(s32 objectIndex, s16 arg1, u16 arg2) {
- s16 test;
+UNUSED void object_origin_pos_randomize_around_z(s32 objectIndex, s16 z, u16 arg2) {
+ s16 offset_z;
- test = random_int(arg2) - (arg2 / 2);
- gObjectList[objectIndex].origin_pos[2] = arg1 + test;
+ offset_z = random_int(arg2) - (arg2 / 2);
+ gObjectList[objectIndex].origin_pos[2] = z + offset_z;
}
-UNUSED void func_8008BB9C(s32 objectIndex, s16 arg1, s16 arg2, u16 arg3, u16 arg4) {
- s16 sp1E;
- s16 temp_v0;
+UNUSED void object_origin_pos_randomize_around_xy(s32 objectIndex, s16 x, s16 y, u16 arg3, u16 arg4) {
+ s16 offset_x;
+ s16 offset_y;
- sp1E = random_int(arg3) - ((s32) arg3 / 2);
- temp_v0 = random_int(arg4) - ((s32) arg4 / 2);
- gObjectList[objectIndex].origin_pos[0] = arg1 + sp1E;
- gObjectList[objectIndex].origin_pos[1] = arg2 + temp_v0;
+ offset_x = random_int(arg3) - ((s32) arg3 / 2);
+ offset_y = random_int(arg4) - ((s32) arg4 / 2);
+ gObjectList[objectIndex].origin_pos[0] = x + offset_x;
+ gObjectList[objectIndex].origin_pos[1] = y + offset_y;
}
-UNUSED void func_8008BC58(s32 objectIndex, s16 arg1, s16 arg2, u16 arg3, u16 arg4) {
- s16 sp1E;
- s16 temp_v0;
+UNUSED void object_origin_pos_randomize_around_xz(s32 objectIndex, s16 x, s16 z, u16 arg3, u16 arg4) {
+ s16 offset_x;
+ s16 offset_z;
- sp1E = random_int(arg3) - ((s32) arg3 / 2);
- temp_v0 = random_int(arg4) - ((s32) arg4 / 2);
- gObjectList[objectIndex].origin_pos[0] = arg1 + sp1E;
- gObjectList[objectIndex].origin_pos[2] = arg2 + temp_v0;
+ offset_x = random_int(arg3) - ((s32) arg3 / 2);
+ offset_z = random_int(arg4) - ((s32) arg4 / 2);
+ gObjectList[objectIndex].origin_pos[0] = x + offset_x;
+ gObjectList[objectIndex].origin_pos[2] = z + offset_z;
}
-void func_8008BD14(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, u16 arg4, u16 arg5, u16 arg6) {
- s16 sp1E;
- s16 sp1C;
- s16 temp_v0;
+void object_origin_pos_randomize_around_xyz(s32 objectIndex, s16 x, s16 y, s16 z, u16 arg4, u16 arg5, u16 arg6) {
+ s16 offset_x;
+ s16 offset_y;
+ s16 offset_z;
- sp1E = random_int(arg4) - ((s32) arg4 / 2);
- sp1C = random_int(arg5) - ((s32) arg5 / 2);
- temp_v0 = random_int(arg6) - ((s32) arg6 / 2);
- gObjectList[objectIndex].origin_pos[0] = arg1 + sp1E;
- gObjectList[objectIndex].origin_pos[1] = arg2 + sp1C;
- gObjectList[objectIndex].origin_pos[2] = arg3 + temp_v0;
+ offset_x = random_int(arg4) - ((s32) arg4 / 2);
+ offset_y = random_int(arg5) - ((s32) arg5 / 2);
+ offset_z = random_int(arg6) - ((s32) arg6 / 2);
+ gObjectList[objectIndex].origin_pos[0] = x + offset_x;
+ gObjectList[objectIndex].origin_pos[1] = y + offset_y;
+ gObjectList[objectIndex].origin_pos[2] = z + offset_z;
}
-void func_8008BE0C(s32 objectIndex, s16 arg1, u16 arg2) {
- gObjectList[objectIndex].origin_pos[0] = gPlayerOneCopy->pos[0] + (sins(arg2) * arg1);
- gObjectList[objectIndex].origin_pos[2] = gPlayerOneCopy->pos[2] + (coss(arg2) * arg1);
+void object_origin_pos_around_player_one(s32 objectIndex, s16 dist, u16 angle) {
+ gObjectList[objectIndex].origin_pos[0] = gPlayerOneCopy->pos[0] + (sins(angle) * dist);
+ gObjectList[objectIndex].origin_pos[2] = gPlayerOneCopy->pos[2] + (coss(angle) * dist);
}
UNUSED void func_8008BEA4(s32 objectIndex, u16 arg1, u16 arg2) {
@@ -1914,13 +1914,13 @@ UNUSED void func_8008BEA4(s32 objectIndex, u16 arg1, u16 arg2) {
thing = random_int(arg1);
thing2 = camera1->rot[1] + random_int(arg2) - ((s32) arg2 / 2);
- func_8008BE0C(objectIndex, thing, thing2);
+ object_origin_pos_around_player_one(objectIndex, thing, thing2);
}
-void func_8008BF18(s32 objectIndex) {
- gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0];
- gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].unk_028[1];
- gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2];
+void object_calculate_new_pos_offset(s32 objectIndex) {
+ gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0];
+ gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].offset[1];
+ gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2];
}
void func_8008BF64(s32 objectIndex) {
diff --git a/src/code_80086E70.h b/src/code_80086E70.h
index 6e309c1b0..a68e01797 100644
--- a/src/code_80086E70.h
+++ b/src/code_80086E70.h
@@ -17,7 +17,7 @@ s32 func_80087060(s32, s32);
s32 func_80087104(s32, u16);
s32 func_800871AC(s32, s32);
void func_80087258(s32, s32, f32);
-s32 func_80087294(s32, Player*);
+s32 get_angle_between_player_object(s32, Player*);
s32 angle_between_object_camera(s32, Camera*);
u16 get_x_direction_angle(s32);
s32 get_y_direction_angle(s32);
@@ -30,11 +30,11 @@ void func_8008751C(s32);
void func_8008757C(s32);
void func_80087620(s32);
void func_800876A0(s32);
-void func_80087710(s32);
-void func_8008775C(s32);
-void func_80087798(s32);
-void func_800877C4(s32);
-void func_800877F0(s32);
+void object_add_velocity_offset_xyz(s32);
+void object_add_velocity_offset_xz(s32);
+void object_add_velocity_offset_x(s32);
+void object_add_velocity_offset_y(s32);
+void object_add_velocity_offset_z(s32);
void func_8008781C(s32);
void func_80087844(s32);
f32 func_8008786C(f32, f32, f32, f32, f32);
@@ -93,7 +93,7 @@ s32 func_80089E18(s32);
s32 func_80089F24(s32);
s32 func_8008A060(s32, Camera*, u16);
s32 func_8008A0B4(s32, Player*, Camera*, u16);
-s32 func_8008A140(s32, Camera*, u16);
+s32 is_object_visible_on_camera(s32, Camera*, u16);
void func_8008A1D0(s32, s32, s32, s32);
void func_8008A2CC(s32, s32, u16);
s32 func_8008A364(s32, s32, u16, s32);
@@ -145,22 +145,22 @@ void func_8008B6A4(s32);
void func_8008B724(s32);
void func_8008B78C(s32);
void set_obj_origin_pos(s32, f32, f32, f32);
-void func_8008B80C(s32, f32, f32, f32);
+void set_obj_origin_offset(s32, f32, f32, f32);
void func_8008B844(s32);
void set_obj_direction_angle(s32, u16, u16, u16);
void set_obj_orientation(s32, u16, u16, u16);
void set_obj_velocity(s32, f32, f32, f32);
void func_8008B928(s32, s16, s16, s16, SplineData*);
-void func_8008BA40(s32, s16, u16);
-void func_8008BAB4(s32, s16, u16);
-void func_8008BB28(s32, s16, u16);
-void func_8008BB9C(s32, s16, s16, u16, u16);
-void func_8008BC58(s32, s16, s16, u16, u16);
-void func_8008BD14(s32, s16, s16, s16, u16, u16, u16);
-void func_8008BE0C(s32, s16, u16);
+void object_origin_pos_randomize_around_x(s32, s16, u16);
+void object_origin_pos_randomize_around_y(s32, s16, u16);
+void object_origin_pos_randomize_around_z(s32, s16, u16);
+void object_origin_pos_randomize_around_xy(s32, s16, s16, u16, u16);
+void object_origin_pos_randomize_around_xz(s32, s16, s16, u16, u16);
+void object_origin_pos_randomize_around_xyz(s32, s16, s16, s16, u16, u16, u16);
+void object_origin_pos_around_player_one(s32, s16, u16);
void func_8008BEA4(s32, u16, u16);
void func_8008BFC0(s32);
-void func_8008BF18(s32);
+void object_calculate_new_pos_offset(s32);
void func_8008BF64(s32);
void func_8008BFFC(s32);
void func_8008C1B8(s32);
diff --git a/src/code_80091750.c b/src/code_80091750.c
index c95d14b3a..b03d86051 100644
--- a/src/code_80091750.c
+++ b/src/code_80091750.c
@@ -18,7 +18,7 @@
#include "code_80281780.h"
#include "memory.h"
#include "audio/external.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "staff_ghosts.h"
#include "common_textures.h"
#include "textures.h"
@@ -600,7 +600,7 @@ char *D_800E7744[] = {
" ",
};
-char *D_800E775C[] = {
+char *gTextPauseButton[] = {
"CONTINUE GAME",
"RETRY",
"COURSE CHANGE",
@@ -1666,7 +1666,8 @@ void func_800921B4(void) {
D_8018D9D9 = 0;
}
-void func_800921C0(s32 test, s32 target, s32 alternative_color) {
+// if selected and detect kind menu
+void text_rainbow_effect(s32 test, s32 target, s32 alternative_color) {
if (test == target) {
if (func_800B4520() != 0) {
set_text_color(gGlobalTimer % 3);
@@ -1678,7 +1679,7 @@ void func_800921C0(s32 test, s32 target, s32 alternative_color) {
}
}
-void func_80092224(s32 test, s32 target, s32 alternative_color) {
+void set_text_color_rainbow_if_selected(s32 test, s32 target, s32 alternative_color) {
if (test == target) {
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_2);
} else {
@@ -1800,8 +1801,8 @@ void func_800925A0(void) {
void func_800925CC(void) {
struct_8018D9E0_entry *temp = find_8018D9E0_entry_dupe(0xAF);
- if (temp->unk4 == 2) {
- temp->unk4 = 3;
+ if (temp->cursor == 2) {
+ temp->cursor = 3;
}
}
@@ -2177,7 +2178,7 @@ UNUSED void func_800930E4(s32 arg0, s32 arg1, char *arg2) {
}
// "tracking" is a uniform spacing between all characters in a given word
-void print_text0(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale, s32 arg6) {
+void print_text0(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY, s32 mode) {
s32 stringWidth = 0;
s32 glyphIndex;
@@ -2187,7 +2188,7 @@ void print_text0(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32
glyphIndex = char_to_glyph_index(text);
if (glyphIndex >= 0) {
func_80099184((MkTexture *)segmented_to_virtual_dupe((const void *) gGlyphTextureLUT[glyphIndex]));
- gDisplayListHead = func_8009BEF0(gDisplayListHead, (MkTexture *) segmented_to_virtual_dupe((const void *) gGlyphTextureLUT[glyphIndex]), column + (stringWidth * x_scale), row, arg6, x_scale, y_scale);
+ gDisplayListHead = print_letter(gDisplayListHead, (MkTexture *) segmented_to_virtual_dupe((const void *) gGlyphTextureLUT[glyphIndex]), column + (stringWidth * scaleX), row, mode, scaleX , scaleY);
stringWidth += gGlyphDisplayWidth[glyphIndex] + tracking;
}
else if ((glyphIndex != -2) && (glyphIndex == -1)) {
@@ -2207,16 +2208,16 @@ void print_text0(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32
gSPDisplayList(gDisplayListHead++, D_020077D8);
}
-void func_80093324(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) {
- print_text0(column, row, text, tracking, x_scale, y_scale, 1);
+void func_80093324(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) {
+ print_text0(column, row, text, tracking, scaleX , scaleY, 1);
}
-void func_80093358(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) {
- print_text0(column, row, text, tracking, x_scale, y_scale, 2);
+void func_80093358(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) {
+ print_text0(column, row, text, tracking, scaleX , scaleY, 2);
}
// "tracking" is a uniform spacing between all characters in a given word
-void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale, s32 arg6) {
+void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY, s32 arg6) {
char *temp_string = text;
s32 stringWidth = 0;
s32 glyphIndex;
@@ -2225,10 +2226,10 @@ void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32
while(*temp_string != 0) {
glyphIndex = char_to_glyph_index(temp_string);
if (glyphIndex >= 0) {
- stringWidth += ((gGlyphDisplayWidth[glyphIndex] + tracking) * x_scale);
+ stringWidth += ((gGlyphDisplayWidth[glyphIndex] + tracking) * scaleX);
}
else if ((glyphIndex != -2) && (glyphIndex == -1)) {
- stringWidth += ((tracking + 7) * x_scale);
+ stringWidth += ((tracking + 7) * scaleX);
}
else{
return;
@@ -2268,11 +2269,11 @@ void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32
glyphIndex = char_to_glyph_index(text);
if (glyphIndex >= 0) {
func_80099184(segmented_to_virtual_dupe(gGlyphTextureLUT[glyphIndex]));
- gDisplayListHead = func_8009BEF0(gDisplayListHead, segmented_to_virtual_dupe(gGlyphTextureLUT[glyphIndex]), column, row, sp60, x_scale, y_scale);
- column = column + (s32)((gGlyphDisplayWidth[glyphIndex] + tracking) * x_scale);
+ gDisplayListHead = print_letter(gDisplayListHead, segmented_to_virtual_dupe(gGlyphTextureLUT[glyphIndex]), column, row, sp60, scaleX, scaleY);
+ column = column + (s32)((gGlyphDisplayWidth[glyphIndex] + tracking) * scaleX);
}
else if ((glyphIndex != -2) && (glyphIndex == -1)) {
- column = column + (s32)((tracking + 7) * x_scale);
+ column = column + (s32)((tracking + 7) * scaleX);
}
else{
gSPDisplayList(gDisplayListHead++, D_020077D8);
@@ -2287,23 +2288,23 @@ void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32
gSPDisplayList(gDisplayListHead++, D_020077D8);
}
-void func_800936B8(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) {
- print_text1(column, row, text, tracking, x_scale, y_scale, 1);
+void func_800936B8(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) {
+ print_text1(column, row, text, tracking, scaleX, scaleY, 1);
}
-void draw_text(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) {
- print_text1(column, row, text, tracking, x_scale, y_scale, 2);
+void draw_text(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) {
+ print_text1(column, row, text, tracking, scaleX, scaleY, 2);
}
-void func_80093720(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) {
- print_text1(column, row, text, tracking, x_scale, y_scale, 3);
+void func_80093720(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) {
+ print_text1(column, row, text, tracking, scaleX, scaleY, 3);
}
-void func_80093754(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) {
- print_text1(column, row, text, tracking, x_scale, y_scale, 4);
+void func_80093754(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) {
+ print_text1(column, row, text, tracking, scaleX, scaleY, 4);
}
-void print_text2(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale, s32 arg6) {
+void print_text2(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY, s32 arg6) {
MkTexture *glyphTexture;
s32 characterWidth;
s32 glyphIndex;
@@ -2315,16 +2316,16 @@ void print_text2(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32
if (glyphIndex >= 0) {
glyphTexture = (MkTexture *) segmented_to_virtual_dupe((const void *)gGlyphTextureLUT[glyphIndex]);
func_80099184(glyphTexture);
- gDisplayListHead = func_8009BEF0(gDisplayListHead, glyphTexture, column - (gGlyphDisplayWidth[glyphIndex] / 2), row, arg6, x_scale, y_scale);
+ gDisplayListHead = print_letter(gDisplayListHead, glyphTexture, column - (gGlyphDisplayWidth[glyphIndex] / 2), row, arg6, scaleX, scaleY);
if ((glyphIndex >= 0xD5) && (glyphIndex < 0xE0)) {
characterWidth = 0x20;
} else {
characterWidth = 0xC;
}
- column = column + (s32)((characterWidth + tracking) * x_scale);
+ column = column + (s32)((characterWidth + tracking) * scaleX);
}
else if ((glyphIndex != -2) && (glyphIndex == -1)) {
- column = column + (s32)((tracking + 7) * x_scale);
+ column = column + (s32)((tracking + 7) * scaleX);
}
else{
gSPDisplayList(gDisplayListHead++, D_020077D8);
@@ -2341,12 +2342,12 @@ void print_text2(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32
gSPDisplayList(gDisplayListHead++, D_020077D8);
}
-void func_800939C8(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) {
- print_text2(column, row, text, tracking, x_scale, y_scale, 1);
+void func_800939C8(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) {
+ print_text2(column, row, text, tracking, scaleX, scaleY, 1);
}
-void text_draw(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) {
- print_text2(column, row, text, tracking, x_scale, y_scale, 2);
+void text_draw(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) {
+ print_text2(column, row, text, tracking, scaleX, scaleY, 2);
}
void func_80093A30(s32 arg0) {
@@ -2358,23 +2359,23 @@ void func_80093A5C(u32 arg0) {
func_8009C918();
}
switch (arg0) {
- case 0:
+ case RENDER_SCREEN_MODE_1P_PLAYER_ONE:
func_800940EC((s32) D_800F0B1C[arg0]);
break;
- case 1:
- case 2:
- case 3:
- case 4:
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE:
+ case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO:
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE:
+ case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO:
if (D_8015F788 == 0) {
func_80093C1C((s32) D_800F0B1C[arg0]);
} else {
func_800940EC((s32) D_800F0B1C[arg0]);
}
break;
- case 8:
- case 9:
- case 10:
- case 11:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE:
+ case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR:
if (D_8015F788 == 3) {
func_800940EC((s32) D_800F0B1C[arg0]);
} else {
@@ -5456,7 +5457,7 @@ void func_8009B538(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
u16 *func_8009B8C4(u64 *arg0) {
UNUSED s32 pad[2];
- s32 sp4;
+ s32 offset;
s32 found;
s32 someIndex;
@@ -5464,13 +5465,13 @@ u16 *func_8009B8C4(u64 *arg0) {
for (someIndex = 0; someIndex < gNumD_8018E118Entries; someIndex++) {
if (arg0 == D_8018E118[someIndex].textureData) {
found = 1;
- sp4 = D_8018E118[someIndex].offset;
+ offset = D_8018E118[someIndex].offset;
break;
}
}
if (found != 0) {
- return &D_8018D9B0[sp4];
+ return &D_8018D9B0[offset];
}
return NULL;
}
@@ -5596,14 +5597,14 @@ Gfx *func_8009BC9C(Gfx *arg0, MkTexture *arg1, s32 arg2, s32 arg3, s32 arg4, s32
return arg0;
}
-Gfx *func_8009BEF0(Gfx *arg0, MkTexture *arg1, f32 arg2, f32 arg3, s32 arg4, f32 arg5, f32 arg6) {
+Gfx *print_letter(Gfx *arg0, MkTexture *glyphTexture, f32 arg2, f32 arg3, s32 mode, f32 scaleX, f32 scaleY) {
s32 var_v0;
s32 temp_v0_2;
f32 thing0;
f32 thing1;
MkTexture *var_s0;
- var_s0 = segmented_to_virtual_dupe(arg1);
+ var_s0 = segmented_to_virtual_dupe(glyphTexture);
while (var_s0->textureData != NULL) {
var_v0 = 0;
@@ -5611,7 +5612,7 @@ Gfx *func_8009BEF0(Gfx *arg0, MkTexture *arg1, f32 arg2, f32 arg3, s32 arg4, f32
if (thing0 > 320.0f) {
var_v0 = 1;
}
- thing0 += var_s0->width * arg5;
+ thing0 += var_s0->width * scaleX;
if (thing0 < 0.0f) {
var_v0 += 1;
}
@@ -5619,7 +5620,7 @@ Gfx *func_8009BEF0(Gfx *arg0, MkTexture *arg1, f32 arg2, f32 arg3, s32 arg4, f32
if (thing1 < 0.0f) {
var_v0 += 1;
}
- thing1 -= var_s0->height * arg6;
+ thing1 -= var_s0->height * scaleY;
if (thing1 > 240.0f) {
var_v0 += 1;
}
@@ -5629,14 +5630,14 @@ Gfx *func_8009BEF0(Gfx *arg0, MkTexture *arg1, f32 arg2, f32 arg3, s32 arg4, f32
} else {
temp_v0_2 = func_8009B8C4(var_s0->textureData);
if (temp_v0_2 != 0) {
- switch (arg4) { /* irregular */
+ switch (mode) { /* irregular */
case 1:
gSPDisplayList(arg0++, D_020077F8);
- arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, arg5, arg6);
+ arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, scaleX, scaleY);
break;
case 2:
gSPDisplayList(arg0++, D_02007818);
- arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, arg5, arg6);
+ arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, scaleX, scaleY);
break;
}
}
@@ -5939,7 +5940,7 @@ func_8009CE64_label1:
var_a1 = 0;
temp_v0 = find_8018D9E0_entry(0x000000B0);
if (temp_v0 != NULL) {
- switch (temp_v0->unk4) { /* switch 8; irregular */
+ switch (temp_v0->cursor) { /* switch 8; irregular */
case 10: /* switch 8 */
func_802903B0();
break;
@@ -5958,7 +5959,7 @@ func_8009CE64_label1:
var_a1 = 0;
temp_v0 = find_8018D9E0_entry(0x000000AC);
if (temp_v0 != NULL) {
- switch (temp_v0->unk4) { /* switch 7; irregular */
+ switch (temp_v0->cursor) { /* switch 7; irregular */
case 11: /* switch 7 */
func_802903B0();
D_8016556E = 1;
@@ -5972,7 +5973,7 @@ func_8009CE64_label1:
var_a1 = 0;
temp_v0 = find_8018D9E0_entry(0x000000C7);
if (temp_v0 != NULL) {
- switch (temp_v0->unk4) { /* switch 1 */
+ switch (temp_v0->cursor) { /* switch 1 */
case 12: /* switch 1 */
func_802903B0();
var_a1 = 1;
@@ -6006,7 +6007,7 @@ func_8009CE64_label1:
}
temp_v0 = find_8018D9E0_entry(0x000000BD);
if (temp_v0 != NULL) {
- switch (temp_v0->unk4) { /* switch 2 */
+ switch (temp_v0->cursor) { /* switch 2 */
case 11: /* switch 2 */
D_8015F892 = 1;
D_8015F890 = 0;
@@ -6620,7 +6621,7 @@ void add_8018D9E0_entry(s32 type, s32 column, s32 row, s8 priority) {
var_ra++;
}
var_ra->type = type;
- var_ra->unk4 = 0;
+ var_ra->cursor = 0;
var_ra->unk8 = 0;
var_ra->column = column;
var_ra->row = row;
@@ -6923,7 +6924,7 @@ void add_8018D9E0_entry(s32 type, s32 column, s32 row, s8 priority) {
}
break;
case 0xF0:
- var_ra->unk4 = (s32) gSoundMode;
+ var_ra->cursor = (s32) gSoundMode;
break;
case 0xF1:
func_800996BC(segmented_to_virtual_dupe(D_02004638), 0);
@@ -7400,7 +7401,7 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) {
case 0xB2: /* switch 6 */
case 0xB3: /* switch 6 */
case 0xB4: /* switch 6 */
- if (arg0->unk4 != 0) {
+ if (arg0->cursor != 0) {
spA8 = arg0->type - 0xB1;
gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D54[D_800EFD64[gCharacterSelections[spA8]]]), arg0->column, arg0->row);
func_8009A7EC(arg0->D_8018DEE0_index, arg0->column, arg0->row, spA8, arg0->unk1C);
@@ -7417,7 +7418,7 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) {
func_800A4A24(arg0);
break;
case 0xC7: /* switch 6 */
- func_800A4B38(arg0);
+ render_pause_menu(arg0);
break;
case 0xBD: /* switch 6 */
func_800A5738(arg0);
@@ -7462,7 +7463,7 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) {
func_800A761C(arg0);
break;
case 0x130: /* switch 6 */
- if (arg0->unk4 != 0) {
+ if (arg0->cursor != 0) {
gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D54[D_800EFD64[D_802874D8.unk1E]]), arg0->column, arg0->row);
func_8009A7EC(arg0->D_8018DEE0_index, arg0->column, arg0->row, 0, arg0->unk1C);
}
@@ -7685,7 +7686,7 @@ void func_800A0EB8(struct_8018D9E0_entry *arg0, s32 arg1) {
}
void func_800A0FA4(struct_8018D9E0_entry *arg0, s32 arg1) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
case 2:
case 3:
@@ -7704,13 +7705,13 @@ void func_800A10CC(struct_8018D9E0_entry *arg0) {
s32 var_s1;
s32 index;
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 2:
case 3:
case 4:
case 5:
gDisplayListHead = draw_box_fill(gDisplayListHead, 0x0000001E, 0x00000032, 0x00000122, 0x0000006E, 0, 0, 0, 0x000000FF);
- index = arg0->unk4 - 2;
+ index = arg0->cursor - 2;
set_text_color(3);
for (var_s1 = 0; var_s1 < 4; var_s1++) {
// In a perfect world this would be `D_800E7940[index][var_s1]`
@@ -7732,7 +7733,7 @@ void func_800A11D0(struct_8018D9E0_entry *arg0, s32 arg1, s32 arg2) {
}
void func_800A12BC(struct_8018D9E0_entry *arg0, MkTexture *arg1) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
case 2:
case 4:
@@ -7748,7 +7749,7 @@ void func_800A12BC(struct_8018D9E0_entry *arg0, MkTexture *arg1) {
void func_800A1350(struct_8018D9E0_entry *arg0) {
s32 thing;
if (func_800AAFCC(arg0->type - 0x2B) < 0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
case 2:
case 4:
@@ -7764,7 +7765,7 @@ void func_800A1350(struct_8018D9E0_entry *arg0) {
}
void func_800A143C(struct_8018D9E0_entry *arg0, s32 arg1) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
case 2:
case 3:
@@ -7784,7 +7785,7 @@ void func_800A1500(struct_8018D9E0_entry *arg0) {
var_a1 = 0;
temp_v0 = find_8018D9E0_entry_dupe(0x00000064);
- switch (temp_v0->unk4) { /* irregular */
+ switch (temp_v0->cursor) { /* irregular */
case 0:
case 1:
break;
@@ -8001,7 +8002,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) {
case 0x17: /* switch 1 */
case 0x18: /* switch 1 */
for (var_s2 = 0; var_s2 < 4; var_s2++) {
- func_80092224(D_8018EDEC - 0x15, var_s2, 3);
+ set_text_color_rainbow_if_selected(D_8018EDEC - 0x15, var_s2, TEXT_YELLOW);
func_80093324(0x00000032, 0x55 + (0x23 * var_s2), D_800E7868[var_s2], 0, 0.9f, 1.0f);
if (var_s2 == (D_8018EDEC - 0x15)) {
spE0.column = 0x0032;
@@ -8018,7 +8019,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) {
func_80093324(0x00000028, 0x55 + (0x14 * var_s2), D_800E7878[var_s2], 0, 1.0f, 1.0f);
}
for (var_s2 = 0; var_s2 < 2; var_s2++) {
- func_80092224(D_8018EDEC - 0x1E, var_s2, 1);
+ set_text_color_rainbow_if_selected(D_8018EDEC - 0x1E, var_s2, TEXT_GREEN);
func_80093324(0x00000084, 0x96 + (0x19 * var_s2), D_800E7840[var_s2], 0, 1.0f, 1.0f);
if (var_s2 == (D_8018EDEC - 0x1E)) {
spE0.column = 0x0084;
@@ -8093,7 +8094,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) {
draw_text(0x5C + (0x82 * var_s1), 0x0000007D, D_800E7918[var_s1], 0, 0.75f, 0.75f);
for (var_s2 = 0; var_s2 < 2; var_s2++) {
if (var_s1 != var_s4) {
- func_800921C0(D_8018EDEC - var_s5, var_s2, 1);
+ text_rainbow_effect(D_8018EDEC - var_s5, var_s2, TEXT_GREEN);
if (var_s2 == (D_8018EDEC - var_s5)) {
spE0.column = 0x20 + (0x89 * var_s1);
spE0.row = 0x96 + (0x1E * var_s2);
@@ -8158,7 +8159,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) {
spE0.column = 0x6E + (0x32 * var_s2);
spE0.row = 0x00D2;
}
- func_800921C0((D_8018EDEC - 0x38), var_s2, 3);
+ text_rainbow_effect((D_8018EDEC - 0x38), var_s2, TEXT_YELLOW);
func_80093324(0x6E + (0x32 * var_s2), 0x000000D2, D_800E7930[var_s2], 0, 0.75f, 0.75f);
}
break;
@@ -8335,8 +8336,8 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) {
s32 rank;
s32 test;
- if (arg0->unk4 != 0) {
- if (arg0->unk4 < 9) {
+ if (arg0->cursor != 0) {
+ if (arg0->cursor < 9) {
for (rank = 0; rank < 8; rank++) {
sp80[rank] = gPlayers[gGPCurrentRacePlayerIdByRank[rank]].characterId;
}
@@ -8351,7 +8352,7 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) {
convert_number_to_ascii(gCupCourseSelection + 1, sp78);
func_80093324(arg0->column + 0x61, (0x28 & 0xFFFFFFFF) - arg0->row, &sp78[1], 0, 0.7f, 0.7f);
for (rank = 0; rank < 4; rank++) {
- test = arg0->unk4;
+ test = arg0->cursor;
if ((test != 8) && (test != 9)) {
var_v0 = 0;
} else {
@@ -8362,7 +8363,7 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) {
}
}
if (var_v0 == 0) {
- if (arg0->unk4 < 9) {
+ if (arg0->cursor < 9) {
var_v0 = gGPCurrentRacePlayerIdByRank[rank];
var_v1 = 0;
} else {
@@ -8379,7 +8380,7 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) {
}
}
for (rank = 4; rank < NUM_PLAYERS; rank++) {
- test = arg0->unk4;
+ test = arg0->cursor;
if ((test != 8) && (test != 9)) {
var_v0 = 0;
} else {
@@ -8390,7 +8391,7 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) {
}
}
if (var_v0 == 0) {
- if (arg0->unk4 < 9) {
+ if (arg0->cursor < 9) {
var_v0 = gGPCurrentRacePlayerIdByRank[rank];
} else {
var_v0 = D_80164478[sp80[rank]];
@@ -8449,7 +8450,7 @@ void func_800A3ADC(struct_8018D9E0_entry *arg0, s32 arg1, s32 arg2, s32 characte
char sp34[4];
s32 phi_v1;
- if (arg0->unk4 < 9) {
+ if (arg0->cursor < 9) {
convert_number_to_ascii(arg4 + 1, sp34);
} else {
for (phi_v1 = arg4; phi_v1 > 0; phi_v1--) {
@@ -8464,7 +8465,7 @@ void func_800A3ADC(struct_8018D9E0_entry *arg0, s32 arg1, s32 arg2, s32 characte
func_80093324(arg1 + 0xA, arg2, D_800E76A8[characterId], 0, 0.7f, 0.7f);
convert_number_to_ascii(gGPPointsByCharacterId[characterId], sp34);
func_800939C8(arg1 + 0x47, arg2, sp34, 0, 0.7f, 0.7f);
- if ((arg4 < 4) && (arg0->unk4 < 9)) {
+ if ((arg4 < 4) && (arg0->cursor < 9)) {
convert_number_to_ascii(D_8018D9BC[arg4], sp34);
sp34[0] = '+';
func_80093324(arg1 + 0x5A, arg2, sp34, 0, 0.7f, 0.7f);
@@ -8506,7 +8507,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) {
Unk_D_800E70A0 *var_v0_5;
char sp60[3];
- var_v0 = arg0->unk4;
+ var_v0 = arg0->cursor;
if (var_v0 == 0) return;
if (var_v0 == 0x0000001F) return;
@@ -8517,7 +8518,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) {
for (var_s1 = 0; var_s1 < 4; var_s1++) {
func_800A4550(var_s1, arg0->column + 0x26, ((0xF * var_s1) - arg0->row) + 0x37);
}
- switch (arg0->unk4) { /* switch 1 */
+ switch (arg0->cursor) { /* switch 1 */
case 1: /* switch 1 */
case 5: /* switch 1 */
case 6: /* switch 1 */
@@ -8528,7 +8529,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) {
case 30: /* switch 1 */
for (var_s1 = 0; var_s1 < 6; var_s1++) {
var_v1 = 0;
- func_800921C0(arg0->unk4 - 5, var_s1, 1);
+ text_rainbow_effect(arg0->cursor - 5, var_s1, 1);
switch (var_s1) { /* switch 3; irregular */
case 4: /* switch 3 */
if (D_80162DF8 == 1) {
@@ -8544,9 +8545,9 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) {
if (var_v1 != 0) {
set_text_color(0);
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, 0x96);
- func_80093358(0xB2 - arg0->column, arg0->row + (0xD * var_s1) + 0x93, D_800E775C[var_s1 + 1], 0, 0.75f, 0.75f);
+ func_80093358(0xB2 - arg0->column, arg0->row + (0xD * var_s1) + 0x93, gTextPauseButton[var_s1 + 1], 0, 0.75f, 0.75f);
} else {
- func_80093324(0xB2 - arg0->column, arg0->row + (0xD * var_s1) + 0x93, D_800E775C[var_s1 + 1], 0, 0.75f, 0.75f);
+ func_80093324(0xB2 - arg0->column, arg0->row + (0xD * var_s1) + 0x93, gTextPauseButton[var_s1 + 1], 0, 0.75f, 0.75f);
}
}
break;
@@ -8557,7 +8558,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) {
case 15: /* switch 1 */
case 16: /* switch 1 */
set_text_color(3);
- var_v1 = arg0->unk4 - 11;
+ var_v1 = arg0->cursor - 11;
for (var_s1 = 0; var_s1 < 7; var_s1++) {
func_80093324(0x000000A2, 0x8C + (0xD * var_s1), D_800E798C[(var_v1 * 7) + var_s1], 0, 0.6f, 0.6f);
}
@@ -8569,7 +8570,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) {
func_80093324(0x000000A5, arg0->row + (0xD * var_s1) + 0x8C, D_800E7A3C[var_s1], 0, 0.7f, 0.7f);
}
for (var_s1 = 0; var_s1 < 2; var_s1++) {
- func_800921C0(arg0->unk4 - 0x11, var_s1, 1);
+ text_rainbow_effect(arg0->cursor - 0x11, var_s1, 1);
convert_number_to_ascii(var_s1 + 1, sp60);
func_80093324(0xB1 - arg0->column, 0xAA + (0x1E * var_s1), &sp60[1], 0, 0.6f, 0.6f);
if (D_8018EE10[var_s1].ghostDataSaved == 0) {
@@ -8593,7 +8594,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) {
func_80093324(0x000000A3, arg0->row + (0xD * var_s1) + 0x8C, D_800E7A60[var_s1], 0, 0.67f, 0.67f);
}
for (var_s1 = 0; var_s1 < 2; var_s1++) {
- func_800921C0(arg0->unk4 - 0x14, var_s1, 1);
+ text_rainbow_effect(arg0->cursor - 0x14, var_s1, 1);
func_80093324(0xC8 - arg0->column, 0xB9 + (0xF * var_s1), D_800E7A6C[var_s1], 0, 0.75f, 0.75f);
}
break;
@@ -8610,22 +8611,22 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) {
}
break;
}
- switch (arg0->unk4) { /* switch 2 */
+ switch (arg0->cursor) { /* switch 2 */
case 5: /* switch 2 */
case 6: /* switch 2 */
case 7: /* switch 2 */
case 8: /* switch 2 */
case 9: /* switch 2 */
case 10: /* switch 2 */
- var_v0_5 = &D_800E7390[arg0->unk4 - 5];
+ var_v0_5 = &D_800E7390[arg0->cursor - 5];
break;
case 17: /* switch 2 */
case 18: /* switch 2 */
- var_v0_5 = &D_800E73C0[arg0->unk4 - 17];
+ var_v0_5 = &D_800E73C0[arg0->cursor - 17];
break;
case 20: /* switch 2 */
case 21: /* switch 2 */
- var_v0_5 = &D_800E73D0[arg0->unk4 - 20];
+ var_v0_5 = &D_800E73D0[arg0->cursor - 20];
break;
case 30: /* switch 2 */
var_v0_5 = &D_800E7390[arg0->unk1C - 5];
@@ -8768,26 +8769,26 @@ void func_800A4A24(struct_8018D9E0_entry *arg0) {
draw_text(arg0->column - 3, arg0->row, D_800E7780, 0, 0.85f, 0.85f);
}
-void func_800A4B38(struct_8018D9E0_entry *arg0) {
+void render_pause_menu(struct_8018D9E0_entry *arg0) {
if (gIsGamePaused != 0) {
switch (gModeSelection) {
case TIME_TRIALS:
- func_800A4BC8(arg0);
+ render_pause_menu_time_trials(arg0);
break;
case VERSUS:
- func_800A4EF8(arg0);
+ render_pause_menu_versus(arg0);
break;
case GRAND_PRIX:
- func_800A5084(arg0);
+ render_pause_grand_prix(arg0);
break;
case BATTLE:
- func_800A5360(arg0);
+ render_pause_battle(arg0);
break;
}
}
}
-void func_800A4BC8(struct_8018D9E0_entry *arg0) {
+void render_pause_menu_time_trials(struct_8018D9E0_entry *arg0) {
s32 stackPadding0;
s32 stackPadding1;
s32 stackPadding2;
@@ -8823,12 +8824,12 @@ void func_800A4BC8(struct_8018D9E0_entry *arg0) {
get_time_record_centiseconds(temp_a0, sp68);
func_800939C8(0x000000B3, 0x00000089, sp68, 0, 0.8f, 0.8f);
for (var_s0 = 0; var_s0 < 5; var_s0++) {
- func_800921C0(arg0->unk4 - 11, var_s0, 1);
- func_80093324(D_800E8538[zero].column, D_800E8538[zero].row + (13 * var_s0), D_800E775C[var_s0], 0, 0.75f, 0.75f);
+ text_rainbow_effect(arg0->cursor - 11, var_s0, TEXT_GREEN);
+ func_80093324(D_800E8538[zero].column, D_800E8538[zero].row + (13 * var_s0), gTextPauseButton[var_s0], 0, 0.75f, 0.75f);
}
}
-void func_800A4EF8(struct_8018D9E0_entry *arg0) {
+void render_pause_menu_versus(struct_8018D9E0_entry *arg0) {
s16 temp_t0;
s16 temp_v1;
s32 temp_t3;
@@ -8851,12 +8852,12 @@ void func_800A4EF8(struct_8018D9E0_entry *arg0) {
} else {
var_s1 = var_s0;
}
- func_800921C0(arg0->unk4 - 0x15, var_s0, 3);
- func_80093324(temp_s3->column - 2, temp_s3->row + (13 * var_s0), D_800E775C[var_s1], 0, 0.75f, 0.75f);
+ text_rainbow_effect(arg0->cursor - 0x15, var_s0, TEXT_YELLOW);
+ func_80093324(temp_s3->column - 2, temp_s3->row + (13 * var_s0), gTextPauseButton[var_s1], 0, 0.75f, 0.75f);
}
}
-void func_800A5084(struct_8018D9E0_entry *arg0) {
+void render_pause_grand_prix(struct_8018D9E0_entry *arg0) {
s32 temp_t0;
s32 temp_v1;
s32 temp_s0;
@@ -8884,12 +8885,12 @@ void func_800A5084(struct_8018D9E0_entry *arg0) {
set_text_color(TEXT_YELLOW);
draw_text(160, temp_s3->row - 30, D_800E7574[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0, 1.0f, 1.0f);
for (var_s0 = 0; var_s0 < 2; var_s0++) {
- func_800921C0(arg0->unk4 - 31, var_s0, 3);
- func_80093324(temp_s3->column, temp_s3->row + (var_s0 * 13), D_800E775C[var_s0 * 4], 0, 0.75f, 0.75f);
+ text_rainbow_effect(arg0->cursor - 31, var_s0, TEXT_YELLOW);
+ func_80093324(temp_s3->column, temp_s3->row + (var_s0 * 13), gTextPauseButton[var_s0 * 4], 0, 0.75f, 0.75f);
}
}
-void func_800A5360(struct_8018D9E0_entry *arg0) {
+void render_pause_battle(struct_8018D9E0_entry *arg0) {
struct UnkStruct_800DC5EC *temp_v0;
s16 temp_t0;
s16 temp_v1;
@@ -8912,8 +8913,8 @@ void func_800A5360(struct_8018D9E0_entry *arg0) {
} else {
var_s1 = var_a1;
}
- func_800921C0(arg0->unk4 - 0x29, var_a1, 3);
- func_80093324(temp_s3->column - 2, temp_s3->row + 13 * var_a1, D_800E775C[var_s1], 0, 0.75f, 0.75f);
+ text_rainbow_effect(arg0->cursor - 0x29, var_a1, TEXT_YELLOW);
+ func_80093324(temp_s3->column - 2, temp_s3->row + 13 * var_a1, gTextPauseButton[var_s1], 0, 0.75f, 0.75f);
}
}
@@ -8952,7 +8953,7 @@ void func_800A54EC(void) {
}
whyTheSequel = D_800F0B50[why];
sp50.column = var_v1->column - 8;
- sp50.row = (var_v1->row + ((sp48->unk4 - whyTheSequel) * 0xD)) - 8;
+ sp50.row = (var_v1->row + ((sp48->cursor - whyTheSequel) * 0xD)) - 8;
func_800A66A8(sp48, &sp50);
}
#else
@@ -8979,12 +8980,12 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
s32 zero = 0;
char sp5C[3];
- var_v1 = arg0->unk4;
+ var_v1 = arg0->cursor;
if (var_v1 == 0) {
if ((arg0->unk1C >= 0x1E) && ((gGlobalTimer / 16) % 2)) {
- gDisplayListHead = draw_box(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (get_string_width(D_800E775C[5]) * 0.8f) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096);
+ gDisplayListHead = draw_box(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (get_string_width(gTextPauseButton[5]) * 0.8f) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096);
set_text_color(1);
- func_80093324(0x000000BF, 0x00000030, D_800E775C[5], 0, 0.8f, 0.8f);
+ func_80093324(0x000000BF, 0x00000030, gTextPauseButton[5], 0, 0.8f, 0.8f);
}
} else {
if (var_v1 == 1) {
@@ -8998,7 +8999,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, var_s2);
set_text_color(3);
func_80093754(0x000000A0, 0x00000050, D_800E7574[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0, 1.0f, 1.0f);
- switch (arg0->unk4) { /* switch 1 */
+ switch (arg0->cursor) { /* switch 1 */
case 1: /* switch 1 */
case 11: /* switch 1 */
case 12: /* switch 1 */
@@ -9030,8 +9031,8 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
get_time_record_centiseconds(temp_a0, sp84);
text_draw(0x000000B3, 0x00000089, sp84, 0, 0.8f, 0.8f);
for (var_s1 = 0; var_s1 < 6; var_s1++) {
- func_800921C0(arg0->unk4 - 0xB, var_s1, 1);
- func_80093358(D_800E8538[zero].column, D_800E8538[zero].row + (0xD * var_s1), D_800E775C[var_s1 + 1], 0, 0.75f, 0.75f);
+ text_rainbow_effect(arg0->cursor - 0xB, var_s1, TEXT_GREEN);
+ func_80093358(D_800E8538[zero].column, D_800E8538[zero].row + (0xD * var_s1), gTextPauseButton[var_s1 + 1], 0, 0.75f, 0.75f);
}
break;
case 21: /* switch 1 */
@@ -9041,7 +9042,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
case 25: /* switch 1 */
case 26: /* switch 1 */
set_text_color(3);
- temp_v0 = arg0->unk4 - 0x15;
+ temp_v0 = arg0->cursor - 0x15;
for (var_s1 = 0; var_s1 < 7; var_s1++) {
func_80093324(0x0000004D, 0x6E + (0xD * var_s1), D_800E798C[(temp_v0 * 7) + var_s1], 0, 0.8f, 0.8f);
}
@@ -9053,7 +9054,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
func_80093324(0x0000005A, arg0->row + (0xD * var_s1) + 0x6E, D_800E7A3C[var_s1], 0, 0.8f, 0.8f);
}
for (var_s1 = 0; var_s1 < 2; var_s1++) {
- func_800921C0(arg0->unk4 - 0x1E, var_s1, 1);
+ text_rainbow_effect(arg0->cursor - 0x1E, var_s1, TEXT_GREEN);
convert_number_to_ascii(var_s1 + 1, sp5C);
func_80093324(0x5A - arg0->column, (0x96 + (0x14 * var_s1)), &sp5C[1], 0, 0.75f, 0.75f);
if (D_8018EE10[var_s1].ghostDataSaved == 0) {
@@ -9076,7 +9077,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
func_80093324(0x00000055, arg0->row + (0xD * var_s1) + 0x6E, D_800E7A60[var_s1], 0, 0.8f, 0.8f);
}
for (var_s1 = 0; var_s1 < 2; var_s1++) {
- func_800921C0(arg0->unk4 - 0x23, var_s1, 1);
+ text_rainbow_effect(arg0->cursor - 0x23, var_s1, TEXT_GREEN);
func_80093324(0x7D - arg0->column, 0x9B + (0xF * var_s1), D_800E7A6C[var_s1], 0, 0.8f, 0.8f);
}
break;
@@ -9093,22 +9094,22 @@ void func_800A5738(struct_8018D9E0_entry *arg0) {
}
break;
}
- switch (arg0->unk4) { /* switch 2 */
+ switch (arg0->cursor) { /* switch 2 */
case 11: /* switch 2 */
case 12: /* switch 2 */
case 13: /* switch 2 */
case 14: /* switch 2 */
case 15: /* switch 2 */
case 16: /* switch 2 */
- var_v0_9 = &D_800E73E0[arg0->unk4 - 11];
+ var_v0_9 = &D_800E73E0[arg0->cursor - 11];
break;
case 30: /* switch 2 */
case 31: /* switch 2 */
- var_v0_9 = &D_800E7410[arg0->unk4 - 30];
+ var_v0_9 = &D_800E7410[arg0->cursor - 30];
break;
case 35: /* switch 2 */
case 36: /* switch 2 */
- var_v0_9 = &D_800E7420[arg0->unk4 - 35];
+ var_v0_9 = &D_800E7420[arg0->cursor - 35];
break;
default:
return;
@@ -9145,23 +9146,23 @@ void func_800A6154(struct_8018D9E0_entry *arg0) {
s32 var_s0;
s32 var_s1;
- if (arg0->unk4 == 0) {
+ if (arg0->cursor == 0) {
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, arg0->unk1C);
set_text_color(3);
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, (arg0->unk1C * 0xFF) / 100);
for (var_s1 = 0, var_s0 = 0x96; var_s0 < 0xBE; var_s1++, var_s0 += 0x14) {
- func_80093358(0x0000008C, var_s0, D_800E775C[(var_s1 * 3) + 1], 0, 1.0f, 1.0f);
+ func_80093358(0x0000008C, var_s0, gTextPauseButton[(var_s1 * 3) + 1], 0, 1.0f, 1.0f);
}
} else {
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, 0x00000064);
for (var_s1 = 0, var_s0 = 0x96; var_s1 < 2; var_s1++, var_s0 += 0x14) {
- func_800921C0(arg0->unk4 - 0xB, var_s1, 3);
- func_80093324(0x0000008C, var_s0, D_800E775C[(var_s1 * 3) + 1], 0, 1.0f, 1.0f);
+ text_rainbow_effect(arg0->cursor - 0xB, var_s1, TEXT_YELLOW);
+ func_80093324(0x0000008C, var_s0, gTextPauseButton[(var_s1 * 3) + 1], 0, 1.0f, 1.0f);
}
}
- if (arg0->unk4 >= 0xB) {
+ if (arg0->cursor >= 0xB) {
sp6C.column = 0x0084;
- sp6C.row = (arg0->unk4 * 0x14) - 0x4E;
+ sp6C.row = (arg0->cursor * 0x14) - 0x4E;
func_800A66A8(arg0, &sp6C);
}
if (arg0->unk20 > 0) {
@@ -9177,7 +9178,7 @@ void func_800A638C(struct_8018D9E0_entry *arg0) {
s32 var_s1;
s8 **var_s2;
- if (arg0->unk4 == 0) {
+ if (arg0->cursor == 0) {
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, arg0->unk1C);
set_text_color(5);
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, (arg0->unk1C * 0xFF) / 100);
@@ -9187,7 +9188,7 @@ void func_800A638C(struct_8018D9E0_entry *arg0) {
set_text_color(5);
draw_text(0x000000A0, arg0->row + 0x1E, D_800E7778[gModeSelection / 3], 0, 1.0f, 1.0f);
}
- switch (arg0->unk4) { /* irregular */
+ switch (arg0->cursor) { /* irregular */
default:
var_a1 = 0x000000FF;
break;
@@ -9213,12 +9214,12 @@ void func_800A638C(struct_8018D9E0_entry *arg0) {
default:
break;
}
- if (arg0->unk4 >= 10) {
+ if (arg0->cursor >= 10) {
for (var_s1 = 0; var_s1 < 4; var_s1++) {
- func_800921C0(arg0->unk4 - 0xA, var_s1, 1);
- func_80093324(0x00000069, 0xAE + (0xF * var_s1), D_800E775C[var_s1 + 1], 0, 0.8f, 0.8f);
+ text_rainbow_effect(arg0->cursor - 0xA, var_s1, TEXT_GREEN);
+ func_80093324(0x00000069, 0xAE + (0xF * var_s1), gTextPauseButton[var_s1 + 1], 0, 0.8f, 0.8f);
}
- func_800A66A8(arg0, &D_800E7360[arg0->unk4 - 10]);
+ func_800A66A8(arg0, &D_800E7360[arg0->cursor - 10]);
}
}
@@ -9439,7 +9440,7 @@ void func_800A70E8(struct_8018D9E0_entry *arg0) {
s32 loopIndex;
s32 stringIndex;
- if (arg0->unk4 == 1) {
+ if (arg0->cursor == 1) {
var_s0 = get_string_width(D_800E7A34[0]) * 0.45f;
temp_f6 = get_string_width(D_800E7A34[1]) * 0.45f;
if (var_s0 < temp_f6) {
@@ -9460,7 +9461,7 @@ void func_800A70E8(struct_8018D9E0_entry *arg0) {
// Shading layer of the grand prix podium result screen
void func_800A7258(struct_8018D9E0_entry *arg0) {
- if (arg0->unk4 == 0) {
+ if (arg0->cursor == 0) {
// If shading layer is fading in
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x13F, 0xEF, 0, 0, 0, arg0->unk1C);
} else {
@@ -9677,10 +9678,10 @@ void func_800A7A4C(s32 arg0) {
func_800A97BC(var_s1);
break;
case 0x5: /* switch 8 */
- switch (var_s1->unk4) { /* switch 9; irregular */
+ switch (var_s1->cursor) { /* switch 9; irregular */
case 0: /* switch 9 */
if (gControllerFive->button & R_TRIG) {
- var_s1->unk4 = (s32) 1U;
+ var_s1->cursor = (s32) 1U;
play_sound2(SOUND_ACTION_PING);
} else {
var_s1->visible = 0;
@@ -10439,7 +10440,7 @@ void func_800A94C8(struct_8018D9E0_entry *arg0, s32 columnTarget, s32 arg2) {
void func_800A954C(struct_8018D9E0_entry *arg0) {
// Cycle lasts 26 (0x1A) frames
- if (arg0->unk4 == 0) {
+ if (arg0->cursor == 0) {
// Move highlight from yellow to red
arg0->unk20 = (s32) (u32) ((((f32) (0xC - arg0->unk1C) * 127.0f) / 12.0f) + 128.0f);
} else {
@@ -10450,7 +10451,7 @@ void func_800A954C(struct_8018D9E0_entry *arg0) {
if (arg0->unk1C >= 0xC) {
// Every 13 (0xC) frames reverse direction
arg0->unk1C = 0;
- arg0->unk4 ^= 1;
+ arg0->cursor ^= 1;
}
}
@@ -10479,8 +10480,8 @@ void func_800A9710(struct_8018D9E0_entry *arg0) {
phi_v0 = 0;
break;
}
- if (phi_v0 != arg0->unk4) {
- arg0->unk4 = phi_v0;
+ if (phi_v0 != arg0->cursor) {
+ arg0->cursor = phi_v0;
func_8009A594(arg0->D_8018DEE0_index, 0, segmented_to_virtual_dupe_2(D_800E7D34[phi_v0]));
}
}
@@ -10597,7 +10598,7 @@ void func_800A97BC(struct_8018D9E0_entry *arg0, u32 arg3) {
}
}
if ((u32) var_v1_2 < (u32) (D_800E86C4 + 4)) {
- var_v1_2->unk3 = (s8) var_v1_2->unk4;
+ var_v1_2->unk3 = (s8) var_v1_2->cursor;
} else {
temp_v0_8 = var_v1_2->unk2;
if ((temp_v0_8 == 0x10) || (temp_v0_8 == 0)) {
@@ -10672,13 +10673,13 @@ void func_800A9A98(struct_8018D9E0_entry *arg0) {
}
void func_800A9B9C(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
func_800AA280(arg0);
break;
case 1:
func_800AA280(arg0);
- arg0->unk4 = 4;
+ arg0->cursor = 4;
/* fallthrough */
case 4:
if (arg0->unk1C > 0) {
@@ -10688,11 +10689,11 @@ void func_800A9B9C(struct_8018D9E0_entry *arg0) {
}
} else {
arg0->unk1C = 0;
- arg0->unk4 = 0;
+ arg0->cursor = 0;
}
break;
case 2:
- arg0->unk4 = 3;
+ arg0->cursor = 3;
break;
case 3:
default:
@@ -10701,22 +10702,22 @@ void func_800A9B9C(struct_8018D9E0_entry *arg0) {
}
void func_800A9C40(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
func_800AA280(arg0);
if ((gPlayerCount + 0xA) == arg0->type) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
} else {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
}
break;
case 4:
if ((gPlayerCount + 0xA) == arg0->type) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk1C = 0;
break;
}
- arg0->unk4 = 1;
+ arg0->cursor = 1;
case 1:
func_800AA280(arg0);
if ((gMainMenuSelectionDepth == CONFIRM_OK_SELECTION_FROM_BACK_OUT) || (gMainMenuSelectionDepth == TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT)) {
@@ -10732,7 +10733,7 @@ void func_800A9C40(struct_8018D9E0_entry *arg0) {
break;
case 3:
if ((gPlayerCount + 0xA) == arg0->type) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
}
break;
case 2:
@@ -10750,7 +10751,7 @@ void func_800A9D5C(struct_8018D9E0_entry *arg0) {
arg0->priority = 6;
}
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 2:
if ((gMainMenuSelectionDepth == CONFIRM_OK_SELECTION_FROM_BACK_OUT) || (gMainMenuSelectionDepth == TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT)) {
arg0->column = 0x00000080;
@@ -10763,7 +10764,7 @@ void func_800A9D5C(struct_8018D9E0_entry *arg0) {
temp_v0 = &D_800E70A0[arg0->type - 0xA];
func_800A91D8(arg0, temp_v0->column, temp_v0->row);
if ((arg0->column == temp_v0->column) && (arg0->row == temp_v0->row)) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
}
/* fallthrough */
case 0:
@@ -10806,7 +10807,7 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) {
}
temp_a1 = gGameModeFromNumPlayersAndRowSelection[gPlayerCount][D_800E86AC[gPlayerCount - 1]];
- switch (arg0->unk4) { /* switch 5; irregular */
+ switch (arg0->cursor) { /* switch 5; irregular */
case 0: /* switch 5 */
if ((temp_a1 != sp20) && (temp_a1 != sp1C)) {
arg0->visible = 0;
@@ -10821,7 +10822,7 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) {
arg0->column = temp_v0->column;
arg0->row = (D_800E86AC[gPlayerCount - 1] * 0x12) + temp_v0->row + 0x41;
arg0->unk1C = 0;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
break;
case CONFIRM_OK_SELECTION_FROM_BACK_OUT: /* switch 2 */
case TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT: /* switch 2 */
@@ -10831,7 +10832,7 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) {
arg0->row = (D_800E86AC[gPlayerCount - 1] * 0x12) + temp_v0->row + temp_v1_2->row;
arg0->unk1C = arg0->row - temp_v0->row;
arg0->visible = 1;
- arg0->unk4 = 2;
+ arg0->cursor = 2;
break;
default: /* switch 2 */
arg0->visible = 0;
@@ -10848,10 +10849,10 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) {
case TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT: /* switch 3 */
if ((temp_a1 != sp20) && (temp_a1 != sp1C)) {
arg0->visible = 0;
- arg0->unk4 = 0;
+ arg0->cursor = 0;
} else {
if (arg0->unk20 != D_800E86AC[gPlayerCount - 1]) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
}
temp_v0 = func_800AAE68();
arg0->column = temp_v0->column + arg0->unk1C;
@@ -10859,14 +10860,14 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) {
func_800A92E8(arg0, temp_v0->column + temp_v1_2->column);
arg0->unk1C = arg0->column - temp_v0->column;
if (arg0->unk1C == temp_v1_2->column) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk1C = arg0->row - temp_v0->row;
}
}
break;
default: /* switch 3 */
arg0->visible = 0;
- arg0->unk4 = 0;
+ arg0->cursor = 0;
break;
}
break;
@@ -10879,10 +10880,10 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) {
case TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT: /* switch 4 */
if ((temp_a1 != sp20) && (temp_a1 != sp1C)) {
arg0->visible = 0;
- arg0->unk4 = 0;
+ arg0->cursor = 0;
} else {
if (arg0->unk20 != D_800E86AC[gPlayerCount - 1]) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
}
temp_v0 = func_800AAE68();
temp_v1_2 = &D_800E70E8[arg0->type - sp24];
@@ -10894,7 +10895,7 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) {
break;
default: /* switch 4 */
arg0->visible = 0;
- arg0->unk4 = 0;
+ arg0->cursor = 0;
break;
}
break;
@@ -10923,13 +10924,13 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) {
case DATA_SELECTION:
case PLAYER_NUM_SELECTION:
case GAME_MODE_SELECTION:
- arg0->unk4 = 0;
+ arg0->cursor = 0;
break;
case GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION:
case CONFIRM_OK_SELECTION:
case CONFIRM_OK_SELECTION_FROM_BACK_OUT:
case TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT:
- if (arg0->unk4 != 0) break;
+ if (arg0->cursor != 0) break;
if (gPlayerCount != 1) break;
if (D_800E86AC[gPlayerCount - 1] != 1) break;
@@ -10939,7 +10940,7 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) {
case 5: /* switch 1 */
break;
case 0: /* switch 1 */
- arg0->unk4 = 1;
+ arg0->cursor = 1;
var_t1 = 1;
break;
case 2: /* switch 1 */
@@ -10953,7 +10954,7 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) {
if (var_t1 == 0) {
if (gControllerPak1State == 0) {
if (check_for_controller_pak(0) == 0) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
break;
}
temp_v0 = osPfsInit(&gSIEventMesgQueue, &gControllerPak1FileHandle, 0);
@@ -10961,14 +10962,14 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) {
switch (temp_v0) {
case PFS_ERR_NOPACK:
case PFS_ERR_DEVICE:
- arg0->unk4 = 2;
+ arg0->cursor = 2;
break;
case PFS_ERR_ID_FATAL:
- arg0->unk4 = 3;
+ arg0->cursor = 3;
break;
case PFS_ERR_CONTRFAIL:
default:
- arg0->unk4 = 3;
+ arg0->cursor = 3;
break;
}
return;
@@ -10976,28 +10977,28 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) {
gControllerPak1State = 1;
}
if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
break;
}
if (osPfsNumFiles(&gControllerPak1FileHandle, &gControllerPak1NumFilesUsed, &gControllerPak1MaxWriteableFiles) != 0) {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
break;
}
if (osPfsFreeBlocks(&gControllerPak1FileHandle, &gControllerPak1NumPagesFree) != 0) {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
break;
}
gControllerPak1NumPagesFree = (s32) gControllerPak1NumPagesFree >> 8;
}
if (gControllerPak1MaxWriteableFiles >= gControllerPak1NumFilesUsed) {
- arg0->unk4 = 5;
+ arg0->cursor = 5;
break;
}
if (gControllerPak1NumPagesFree >= 0x79) {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
break;
}
- arg0->unk4 = 5;
+ arg0->cursor = 5;
}
break;
default:
@@ -11102,9 +11103,9 @@ void func_800AA69C(struct_8018D9E0_entry *arg0) {
}
void func_800AAA9C(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 3:
- arg0->unk4 = 1;
+ arg0->cursor = 1;
/* fallthrough */
case 1:
if (D_8018EDEE == 3) {
@@ -11120,15 +11121,15 @@ void func_800AAA9C(struct_8018D9E0_entry *arg0) {
/* fallthrough */
case 0:
if (func_800AAFCC(arg0->type - 0x2B) >= 0) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk1C = 0;
} else {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
}
break;
case 4:
if (func_800AAFCC(arg0->type - 0x2B) >= 0) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk1C = 0;
}
break;
@@ -11139,14 +11140,14 @@ void func_800AAA9C(struct_8018D9E0_entry *arg0) {
}
void func_800AAB90(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 1:
if (arg0->unk1C > 0) {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
}
break;
case 2:
- arg0->unk4 = 4;
+ arg0->cursor = 4;
break;
case 3:
if (arg0->unk1C > 0) {
@@ -11156,7 +11157,7 @@ void func_800AAB90(struct_8018D9E0_entry *arg0) {
}
} else {
arg0->unk1C = 0;
- arg0->unk4 = 0;
+ arg0->cursor = 0;
}
break;
case 0:
@@ -11175,7 +11176,7 @@ void func_800AAC18(struct_8018D9E0_entry *arg0) {
Unk_D_800E70A0 *var_t0;
temp_a1 = arg0->type - 0x2B;
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
if (D_8018EDEE == 3) {
temp_v0 = func_800AAFCC(temp_a1);
@@ -11183,7 +11184,7 @@ void func_800AAC18(struct_8018D9E0_entry *arg0) {
var_t0 = &D_800E7188[(gScreenModeSelection * 4) + temp_v0];
arg0->column = (s32) var_t0->column;
arg0->row = (s32) var_t0->row;
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk8 = 2;
func_8009A594(arg0->D_8018DEE0_index, 0, segmented_to_virtual_dupe_2(D_800E8340[temp_a1]));
}
@@ -11197,7 +11198,7 @@ void func_800AAC18(struct_8018D9E0_entry *arg0) {
break;
case 2:
case 4:
- if (arg0->unk4 == 2) {
+ if (arg0->cursor == 2) {
temp_v0 = func_800AAFCC(temp_a1);
if (temp_v0 >= 0) {
var_t0 = &D_800E7188[(gScreenModeSelection * 4) + temp_v0];
@@ -11205,11 +11206,11 @@ void func_800AAC18(struct_8018D9E0_entry *arg0) {
} else {
var_t0 = &D_800E7108[0][temp_a1];
if ((var_t0->column == arg0->column) && (var_t0->row == arg0->row)) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
return;
}
}
- if ((arg0->unk4 != 2) || (arg0->unk8 != 1)) {
+ if ((arg0->cursor != 2) || (arg0->unk8 != 1)) {
func_800A91D8(arg0, (s32) var_t0->column, (s32) var_t0->row);
}
break;
@@ -11321,7 +11322,7 @@ escape:
s32 func_800AAF70(s32 arg0) {
struct_8018D9E0_entry *temp;
temp = func_800AAEB4(arg0);
- return temp->unk4;
+ return temp->cursor;
}
void func_800AAF94(struct_8018D9E0_entry *arg0, s32 arg1) {
@@ -11351,9 +11352,9 @@ s32 func_800AAFCC(s32 arg0) {
}
void func_800AB020(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 1:
- arg0->unk4 = 4;
+ arg0->cursor = 4;
/* fallthrough */
case 4:
if (arg0->unk1C > 0) {
@@ -11363,11 +11364,11 @@ void func_800AB020(struct_8018D9E0_entry *arg0) {
}
} else {
arg0->unk1C = 0;
- arg0->unk4 = 0;
+ arg0->cursor = 0;
}
break;
case 2:
- arg0->unk4 = 3;
+ arg0->cursor = 3;
break;
case 0:
case 3:
@@ -11377,21 +11378,21 @@ void func_800AB020(struct_8018D9E0_entry *arg0) {
}
void func_800AB098(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
if ((gCupSelection + 0x53) == arg0->type) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
} else {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
}
break;
case 4:
if ((gCupSelection + 0x53) == arg0->type) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk1C = 0;
break;
} else {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
}
// Purposeful fallthrough
case 1:
@@ -11404,7 +11405,7 @@ void func_800AB098(struct_8018D9E0_entry *arg0) {
break;
case 3:
if ((gCupSelection + 0x53) == arg0->type) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
}
break;
case 2:
@@ -11422,7 +11423,7 @@ void func_800AB164(struct_8018D9E0_entry *arg0) {
arg0->priority = 4;
}
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
thing = &D_800E7148[arg0->type - 0x53];
arg0->column = thing->column;
@@ -11435,7 +11436,7 @@ void func_800AB164(struct_8018D9E0_entry *arg0) {
thing = &D_800E7148[arg0->type - 0x53];
func_800A91D8(arg0, thing->column, thing->row);
if ((arg0->column == thing->column) && (arg0->row == thing->row)) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
}
break;
case 1:
@@ -11476,7 +11477,7 @@ void func_800AB314(struct_8018D9E0_entry *arg0) {
}
if (gModeSelection != 0) {
if (D_8018EDEC != 1U) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
arg0->unk20 = 0;
for (var_a1 = 0; var_a1 < 4; var_a1++) {
if (gCupCourseSelection == var_a1) {
@@ -11490,20 +11491,20 @@ void func_800AB314(struct_8018D9E0_entry *arg0) {
}
}
} else {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
for (var_a1 = 0; var_a1 < 4; var_a1++) {
sp24[var_a1]->visible = 1;
sp24[var_a1]->priority = 6;
}
}
} else {
- var_v0 = arg0->unk4;
+ var_v0 = arg0->cursor;
switch (var_v0) { /* irregular */
case 0:
if ((arg0->unk1C / 4) == gCupSelection) {
arg0->unk20++;
if (arg0->unk20 >= 0x33) {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
arg0->unk20 = 0;
arg0->unk1C = (gCupSelection * 4);
arg0->unk1C++;
@@ -11513,14 +11514,14 @@ void func_800AB314(struct_8018D9E0_entry *arg0) {
arg0->unk1C = gCupSelection * 4;
}
if (D_8018EDEC == 3) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk20 = 0;
}
- var_v0 = arg0->unk4;
+ var_v0 = arg0->cursor;
break;
case 1:
if ((arg0->unk1C / 4) != gCupSelection) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
var_v0 = 0;
arg0->unk20 = 0;
arg0->unk1C = 0;
@@ -11529,32 +11530,32 @@ void func_800AB314(struct_8018D9E0_entry *arg0) {
if (arg0->unk20 >= 0x1F) {
arg0->unk20 = 0;
arg0->unk1C = (gCupSelection * 4) + (((arg0->unk1C % 4) + 1) % 4);
- var_v0 = arg0->unk4;
+ var_v0 = arg0->cursor;
} else {
if (D_8018EDEC == 3) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk20 = 0;
}
- var_v0 = arg0->unk4;
+ var_v0 = arg0->cursor;
}
}
break;
case 2:
arg0->unk20++;
if (arg0->unk20 >= 0x1A) {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
arg0->unk20 = 0;
}
if (D_8018EDEC != 3) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
arg0->unk20 = 0;
arg0->unk1C = 0;
}
- var_v0 = arg0->unk4;
+ var_v0 = arg0->cursor;
break;
case 3:
if (D_8018EDEC != 3) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
arg0->unk20 = 0;
arg0->unk1C = 0;
var_v0 = 0;
@@ -11630,18 +11631,18 @@ void func_800AB9B0(struct_8018D9E0_entry *arg0) {
arg0->column = (s32) D_800E7268->column;
arg0->row = D_800E7268->row;
}
- temp_v1 = &D_800E7268[arg0->unk4];
- switch (arg0->unk4) { /* irregular */
+ temp_v1 = &D_800E7268[arg0->cursor];
+ switch (arg0->cursor) { /* irregular */
case 0:
func_800A91D8(arg0, (s32) temp_v1->column, (s32) temp_v1->row);
if (D_8018EDEC == 3) {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
}
break;
case 1:
func_800A91D8(arg0, (s32) temp_v1->column, (s32) temp_v1->row);
if (D_8018EDEC == 1) {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
}
break;
}
@@ -11715,10 +11716,10 @@ void func_800ABC38(struct_8018D9E0_entry *arg0) {
void func_800ABCF4(struct_8018D9E0_entry *arg0) {
f64 temp_f0;
- switch (arg0->unk4) { /* irregular */
+ switch (arg0->cursor) { /* irregular */
case 0:
arg0->column = 0;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
arg0->unk20 = (get_string_width(gCupNames[D_800DC540]) / 2) + 0xA0;
/* fallthrough */
case 1:
@@ -11729,7 +11730,7 @@ void func_800ABCF4(struct_8018D9E0_entry *arg0) {
}
arg0->unk24 = (f32) (((f64) arg0->unk1C * 0.05) + 1.0);
if (arg0->column >= (arg0->unk20 - 0x14)) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->D_8018DEE0_index = 0;
}
break;
@@ -11775,10 +11776,10 @@ void func_800ABEAC(struct_8018D9E0_entry *arg0) {
}
void func_800ABF68(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->column = 0x140;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
arg0->unk20 = 0xA0 - (get_string_width(D_800E7524[gCurrentCourseId]) / 2);
/* fallthrough */
case 1:
@@ -11789,7 +11790,7 @@ void func_800ABF68(struct_8018D9E0_entry *arg0) {
}
arg0->unk24 = (arg0->unk1C * 0.05) + 1.0;
if ((arg0->unk20 + 0x14) >= arg0->column) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->D_8018DEE0_index = 0;
}
break;
@@ -11806,10 +11807,10 @@ void func_800ABF68(struct_8018D9E0_entry *arg0) {
}
void func_800AC128(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->column = 0x00000140;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
/* fallthrough */
case 1:
func_800A940C(arg0, 0x00000064);
@@ -11819,7 +11820,7 @@ void func_800AC128(struct_8018D9E0_entry *arg0) {
}
arg0->unk24 = (f32) (((f64) arg0->unk1C * 0.07) + 0.6);
if (arg0->column == 0x00000064) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->D_8018DEE0_index = 0;
}
break;
@@ -11828,7 +11829,7 @@ void func_800AC128(struct_8018D9E0_entry *arg0) {
arg0->unk1C = 0;
arg0->unk24 = (f32) (1.5 - ((arg0->D_8018DEE0_index - 0xF) * 0.004 * (arg0->D_8018DEE0_index - 0xF)));
if ((arg0->D_8018DEE0_index >= 0x10) && ((f64) arg0->unk24 < 0.8)) {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
arg0->D_8018DEE0_index = 0;
}
break;
@@ -11850,23 +11851,23 @@ void func_800AC300(struct_8018D9E0_entry *arg0) {
}
void func_800AC324(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->column = 0x14A;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
func_800921B4();
break;
case 1:
func_800A9208(arg0, 0xA0);
if (arg0->column == 0xA0) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk20 = 0;
}
break;
case 2:
arg0->unk20++;
if (((D_8018D9D8 != 0) || (arg0->unk20 >= 0x5B)) && (D_800DDB24 != 0)) {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
arg0->unk1C = arg0->column;
add_8018D9E0_entry(0xAB, 0, 0, 0);
}
@@ -11893,10 +11894,10 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
s32 var_a1;
s32 var_t1;
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->column = -0x000000A0;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
for (var_a1 = 0; var_a1 < 4; var_a1++) {
D_8018D9BC[var_a1] = gGPPointRewards[var_a1];
}
@@ -11916,7 +11917,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
} else {
arg0->unk20 = 0;
arg0->column = 0;
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk1C = 0;
D_800DC5EC->screenStartX = 0x00F0;
D_800DC5F0->screenStartX = 0x0050;
@@ -11926,7 +11927,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
arg0->column = 0;
arg0->unk1C++;
if (((D_8018D9D8 != 0) || (arg0->unk1C >= 0x1F)) && (D_800DDB24 != 0)) {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
arg0->unk1C = 0;
arg0->unk20 = 0;
}
@@ -11936,7 +11937,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
case 5:
case 6:
var_t1 = 0;
- var_a1 = arg0->unk4 - 3;
+ var_a1 = arg0->cursor - 3;
arg0->unk1C++;
if (((arg0->unk1C % 3) == 0) || (D_8018D9D8 != 0)) {
if (D_8018D9BC[var_a1] > 0) {
@@ -11956,17 +11957,17 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
if (var_t1 != 0) {
arg0->unk20 = 0;
arg0->unk1C = 0;
- if (arg0->unk4 < 6) {
- arg0->unk4++;
+ if (arg0->cursor < 6) {
+ arg0->cursor++;
} else {
- arg0->unk4 = 7;
+ arg0->cursor = 7;
}
}
break;
case 7:
arg0->unk1C++;
if ((((D_8018D9D8 != 0) && (arg0->unk1C >= 0xB)) || (arg0->unk1C >= 0x3D)) && (D_800DDB24 != 0)) {
- arg0->unk4 = 8;
+ arg0->cursor = 8;
arg0->unk1C = 0;
}
break;
@@ -11976,7 +11977,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
arg0->unk1C += 5;
}
if (arg0->unk1C >= 0x29) {
- arg0->unk4 = 9;
+ arg0->cursor = 9;
}
break;
case 9:
@@ -11985,7 +11986,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
arg0->unk1C -= 5;
}
if (arg0->unk1C <= 0) {
- arg0->unk4 = 0x0000000A;
+ arg0->cursor = 0x0000000A;
arg0->unk1C = 0;
if (gCupCourseSelection == 3) {
for (var_a1 = 0; var_a1 < 8; var_a1++) {
@@ -12000,14 +12001,14 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
case 10:
arg0->unk1C++;
if (arg0->unk1C > 0) {
- arg0->unk4 = 0x0000000B;
+ arg0->cursor = 0x0000000B;
arg0->unk1C = 0;
func_800921B4();
}
break;
case 11:
if ((D_8018D9D8 != 0) && (D_800DDB24 != 0)) {
- arg0->unk4 = 0x0000000C;
+ arg0->cursor = 0x0000000C;
arg0->unk20 = arg0->row;
play_sound2(SOUND_ACTION_NEXT_COURSE);
}
@@ -12020,7 +12021,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
D_800DC5F0->screenStartY -= 0x10;
} else {
arg0->unk20 = 0;
- arg0->unk4 = 0x0000000D;
+ arg0->cursor = 0x0000000D;
arg0->unk1C = 0;
D_800DC5EC->screenStartY = 0x012C;
D_800DC5F0->screenStartY = -0x003C;
@@ -12038,16 +12039,16 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AC458.s")
#endif
void func_800AC978(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) { /* irregular */
+ switch (arg0->cursor) { /* irregular */
case 0:
arg0->column = 0x14A;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
arg0->unk1C = 0xFF;
break;
case 1:
func_800A9208(arg0, 0xA0);
if (arg0->column == 0xA0) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
}
break;
case 2:
@@ -12061,13 +12062,13 @@ void func_800AC978(struct_8018D9E0_entry *arg0) {
}
void func_800ACA14(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) { /* irregular */
+ switch (arg0->cursor) { /* irregular */
case 0:
if (arg0->unk20 >= 0xB) {
arg0->unk1C += 3;
}
if (arg0->unk1C >= 0x65) {
- arg0->unk4 = 0x0000000B;
+ arg0->cursor = 0x0000000B;
arg0->unk1C = 0;
}
break;
@@ -12076,8 +12077,8 @@ void func_800ACA14(struct_8018D9E0_entry *arg0) {
if (func_800B4520()) break;
if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x800) {
- if (arg0->unk4 >= 0xC) {
- arg0->unk4--;
+ if (arg0->cursor >= 0xC) {
+ arg0->cursor--;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12086,8 +12087,8 @@ void func_800ACA14(struct_8018D9E0_entry *arg0) {
}
}
if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x400) {
- if (arg0->unk4 < 0xC) {
- arg0->unk4++;
+ if (arg0->cursor < 0xC) {
+ arg0->cursor++;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12115,11 +12116,11 @@ void func_800ACA14(struct_8018D9E0_entry *arg0) {
void func_800ACC50(struct_8018D9E0_entry *arg0) {
s32 var_s0;
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->unk1C += 3;
if (arg0->unk1C >= 0x65) {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
arg0->unk1C = 0;
for (var_s0 = 0; var_s0 < gPlayerCount; var_s0++) {
add_8018D9E0_entry(var_s0 + 0xB1, 0, 0, (s8) (5 - var_s0));
@@ -12127,17 +12128,17 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) {
}
break;
case 1:
- if (find_8018D9E0_entry_dupe(0x000000B1)->unk4 >= 2) {
- arg0->unk4 = 2;
+ if (find_8018D9E0_entry_dupe(0x000000B1)->cursor >= 2) {
+ arg0->cursor = 2;
}
break;
case 2:
arg0->unk1C += 0x20;
if (arg0->unk1C >= 0x100) {
if (gModeSelection == VERSUS) {
- arg0->unk4 = (s32) D_8018EDF4;
+ arg0->cursor = (s32) D_8018EDF4;
} else {
- arg0->unk4 = (s32) D_8018EDF6;
+ arg0->cursor = (s32) D_8018EDF6;
}
arg0->unk1C = 0;
}
@@ -12148,8 +12149,8 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) {
case 13:
if (func_800B4520() == 0) {
if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x800) {
- if (arg0->unk4 >= 0xB) {
- arg0->unk4--;
+ if (arg0->cursor >= 0xB) {
+ arg0->cursor--;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12158,8 +12159,8 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) {
}
}
if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x400) {
- if (arg0->unk4 < 0xD) {
- arg0->unk4++;
+ if (arg0->cursor < 0xD) {
+ arg0->cursor++;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12171,9 +12172,9 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) {
func_8009DFE0(0x0000001E);
play_sound2(SOUND_MENU_OK_CLICKED);
if (gModeSelection == VERSUS) {
- D_8018EDF4 = (s8) arg0->unk4;
+ D_8018EDF4 = (s8) arg0->cursor;
} else {
- D_8018EDF6 = (s8) arg0->unk4;
+ D_8018EDF6 = (s8) arg0->cursor;
}
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12195,18 +12196,18 @@ void func_800ACF40(struct_8018D9E0_entry *arg0) {
temp_a2 = arg0->type - 0xB1;
temp_a1 = D_800EFD64[gCharacterSelections[arg0->type - 0xB1]];
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->column = D_800E72F8.column;
arg0->row = D_800E72F8.row;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
break;
case 1:
temp_v0_2 = &D_800E7300[((gPlayerCount - 2) * 4) + temp_a2];
func_800A9208(arg0, temp_v0_2->column);
func_800A9278(arg0, temp_v0_2->row);
if (arg0->column == temp_v0_2->column) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk20 = 0;
}
break;
@@ -12227,9 +12228,9 @@ void func_800ACF40(struct_8018D9E0_entry *arg0) {
if (var_v1 == 0) {
arg0->unk20++;
if (arg0->unk20 >= 0x1F) {
- if (find_8018D9E0_entry_dupe(0x000000B0)->unk4 >= 2) {
+ if (find_8018D9E0_entry_dupe(0x000000B0)->cursor >= 2) {
func_8009A640(arg0->D_8018DEE0_index, 0, temp_a2, segmented_to_virtual_dupe_2(gCharacterCelebrateAnimation[temp_a1]));
- arg0->unk4 = 3;
+ arg0->cursor = 3;
func_800CA24C(temp_a2);
func_800C90F4(temp_a2, (gCharacterSelections[temp_a2] * 0x10) + 0x29008007);
}
@@ -12239,7 +12240,7 @@ void func_800ACF40(struct_8018D9E0_entry *arg0) {
case 3:
if (D_8018DEE0[arg0->D_8018DEE0_index].sequenceIndex >= D_800E8440[temp_a1]) {
func_8009A640(arg0->D_8018DEE0_index, 0, temp_a2, segmented_to_virtual_dupe_2(D_800E83A0[temp_a1]));
- arg0->unk4 = 4;
+ arg0->cursor = 4;
}
break;
case 4:
@@ -12249,30 +12250,30 @@ void func_800ACF40(struct_8018D9E0_entry *arg0) {
}
void func_800AD1A4(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->column = 0x0000014A;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
func_800921B4();
add_8018D9E0_entry(0x000000BB, 0, 0, 0);
break;
case 1:
func_800A9208(arg0, 0x000000A0);
if (arg0->column == 0x000000A0) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk20 = 0;
}
break;
case 2:
arg0->unk20++;
if (arg0->unk20 >= 0x15) {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
}
break;
case 3:
if (D_8018D9D8 != 0) {
func_800921B4();
- arg0->unk4 = 4;
+ arg0->cursor = 4;
arg0->unk1C = arg0->column;
add_8018D9E0_entry(0x000000BA, 0, 0, 0);
}
@@ -12300,10 +12301,10 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
s32 var_a1;
s32 index;
- switch (arg0->unk4) { /* switch 3; irregular */
+ switch (arg0->cursor) { /* switch 3; irregular */
case 0: /* switch 3 */
arg0->column = -0x000000A0;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
for (index = 0; index < 4; index++) {
D_8018D9BC[index] = gGPPointRewards[index];
}
@@ -12323,9 +12324,9 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
} else {
arg0->unk20 = 0;
arg0->column = 0;
- arg0->unk4 = D_8018EDF5;
- if ((arg0->unk4 == 9) && (D_80162DF8 == 1)) {
- arg0->unk4--;
+ arg0->cursor = D_8018EDF5;
+ if ((arg0->cursor == 9) && (D_80162DF8 == 1)) {
+ arg0->cursor--;
}
D_800DC5EC->screenStartX = 0x00F0;
D_800DC5F0->screenStartX = 0x0050;
@@ -12339,10 +12340,10 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
case 10: /* switch 3 */
if (func_800B4520() == 0) {
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) {
- if (arg0->unk4 >= 6) {
- arg0->unk4--;
- if ((D_80162DF8 == 1) && (arg0->unk4 == 9)) {
- arg0->unk4--;
+ if (arg0->cursor >= 6) {
+ arg0->cursor--;
+ if ((D_80162DF8 == 1) && (arg0->cursor == 9)) {
+ arg0->cursor--;
}
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
@@ -12352,13 +12353,13 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
}
}
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) {
- if (arg0->unk4 < 0xA) {
- arg0->unk4++;
- if ((D_80162DF8 == 1) && (arg0->unk4 == 9)) {
- arg0->unk4++;
+ if (arg0->cursor < 0xA) {
+ arg0->cursor++;
+ if ((D_80162DF8 == 1) && (arg0->cursor == 9)) {
+ arg0->cursor++;
}
- if ((arg0->unk4 == 0x0000000A) && (D_80162DD4 != 0)) {
- arg0->unk4 -= 2;
+ if ((arg0->cursor == 0x0000000A) && (D_80162DD4 != 0)) {
+ arg0->cursor -= 2;
} else {
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
@@ -12369,7 +12370,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
}
}
if (gControllerOne->buttonPressed & 0x9000) {
- if (arg0->unk4 == 0x0000000A) {
+ if (arg0->cursor == 0x0000000A) {
var_v1 = 0;
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12381,7 +12382,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
break;
case 0: /* switch 4 */
func_800B6708();
- arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11;
+ arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11;
var_v1 = 1;
play_sound2(SOUND_MENU_SELECT);
break;
@@ -12397,26 +12398,26 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
if (gControllerPak1State == 0) {
switch (func_800B5F30()) { /* switch 2 */
case -1: /* switch 2 */
- arg0->unk4 = 0x0000000B;
+ arg0->cursor = 0x0000000B;
var_v1 = 1;
break;
case -3: /* switch 2 */
case -2: /* switch 2 */
- arg0->unk4 = 0x0000000C;
+ arg0->cursor = 0x0000000C;
var_v1 = 1;
break;
case 1: /* switch 2 */
case 11: /* switch 2 */
- arg0->unk4 = 0x0000000B;
+ arg0->cursor = 0x0000000B;
var_v1 = 1;
break;
case 10: /* switch 2 */
- arg0->unk4 = 0x0000000C;
+ arg0->cursor = 0x0000000C;
var_v1 = 1;
break;
default: /* switch 2 */
var_v1 = 1;
- arg0->unk4 = 0x0000000C;
+ arg0->cursor = 0x0000000C;
break;
case 0:
break;
@@ -12427,29 +12428,29 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
}
if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) {
func_800B6708();
- arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11;
+ arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11;
play_sound2(SOUND_MENU_SELECT);
return;
}
}
if (gControllerPak1MaxWriteableFiles >= gControllerPak1NumFilesUsed) {
- arg0->unk4 = 0x0000000E;
+ arg0->cursor = 0x0000000E;
play_sound2(SOUND_MENU_FILE_NOT_FOUND);
return;
}
if (gControllerPak1NumPagesFree >= 0x79) {
- arg0->unk4 = 0x00000013;
+ arg0->cursor = 0x00000013;
arg0->unk1C = 0;
play_sound2(SOUND_MENU_SELECT);
return;
}
- arg0->unk4 = 0x0000000E;
+ arg0->cursor = 0x0000000E;
play_sound2(SOUND_MENU_FILE_NOT_FOUND);
}
} else {
- arg0->unk1C = arg0->unk4;
- D_8018EDF5 = arg0->unk4;
- arg0->unk4 = 0x0000001E;
+ arg0->unk1C = arg0->cursor;
+ D_8018EDF5 = arg0->cursor;
+ arg0->cursor = 0x0000001E;
arg0->unk20 = arg0->row;
play_sound2(SOUND_ACTION_NEXT_COURSE);
if (arg0->unk24 < 4.2) {
@@ -12467,7 +12468,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
case 16: /* switch 1 */
case 26: /* switch 1 */
if (gControllerOne->buttonPressed & 0xD000) {
- arg0->unk4 = 0x0000000A;
+ arg0->cursor = 0x0000000A;
play_sound2(SOUND_MENU_GO_BACK);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12476,11 +12477,11 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
break;
case 17: /* switch 1 */
case 18: /* switch 1 */
- arg0->unk20 = arg0->unk4 - 0x11;
+ arg0->unk20 = arg0->cursor - 0x11;
if (func_800B639C((gCupSelection * 4) + gCupCourseSelection) != arg0->unk20) {
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) {
- if (arg0->unk4 >= 0x12) {
- arg0->unk4--;
+ if (arg0->cursor >= 0x12) {
+ arg0->cursor--;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12489,8 +12490,8 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
}
}
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) {
- if (arg0->unk4 < 0x12) {
- arg0->unk4++;
+ if (arg0->cursor < 0x12) {
+ arg0->cursor++;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12500,19 +12501,19 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
}
}
if (gControllerOne->buttonPressed & 0x4000) {
- arg0->unk4 = 0x0000000A;
+ arg0->cursor = 0x0000000A;
play_sound2(SOUND_MENU_GO_BACK);
return;
}
if (gControllerOne->buttonPressed & 0x9000) {
thing = &D_8018EE10[arg0->unk20];
if (thing->ghostDataSaved == 0) {
- arg0->unk4 = 0x00000019;
+ arg0->cursor = 0x00000019;
arg0->unk1C = 0;
} else if (func_800B63F0(arg0->unk20) == 0) {
- arg0->unk4 = 0x00000010;
+ arg0->cursor = 0x00000010;
} else {
- arg0->unk4 = 0x00000014;
+ arg0->cursor = 0x00000014;
}
play_sound2(SOUND_MENU_SELECT);
if (arg0->unk24 < 4.2) {
@@ -12522,19 +12523,19 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
break;
case 19: /* switch 1 */
if ((arg0->unk1C == 1) && (func_800B6A68() != 0)) {
- arg0->unk4 = 0x0000000F;
+ arg0->cursor = 0x0000000F;
return;
} else {
arg0->unk1C++;
if (arg0->unk1C >= 2) {
- arg0->unk4 = 0x00000011;
+ arg0->cursor = 0x00000011;
}
}
break;
case 20: /* switch 1 */
case 21: /* switch 1 */
- if (((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) && (arg0->unk4 >= 0x15)) {
- arg0->unk4--;
+ if (((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) && (arg0->cursor >= 0x15)) {
+ arg0->cursor--;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12542,8 +12543,8 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
arg0->unk8 = -1;
}
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) {
- if (arg0->unk4 < 0x15) {
- arg0->unk4++;
+ if (arg0->cursor < 0x15) {
+ arg0->cursor++;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12552,20 +12553,20 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
}
}
if (gControllerOne->buttonPressed & 0x4000) {
- arg0->unk4 = arg0->unk20 + 0x11;
+ arg0->cursor = arg0->unk20 + 0x11;
play_sound2(SOUND_MENU_GO_BACK);
return;
}
if (gControllerOne->buttonPressed & 0x9000) {
- if (arg0->unk4 == 0x00000015) {
- arg0->unk4 = 0x00000019;
+ if (arg0->cursor == 0x00000015) {
+ arg0->cursor = 0x00000019;
arg0->unk1C = 0;
play_sound2(SOUND_MENU_SELECT);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
}
} else {
- arg0->unk4 = arg0->unk20 + 0x11;
+ arg0->cursor = arg0->unk20 + 0x11;
play_sound2(SOUND_MENU_GO_BACK);
return;
}
@@ -12574,19 +12575,19 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
case 25: /* switch 1 */
if (arg0->unk1C == 1) {
if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) != 0) {
- arg0->unk4 = 0x0000001A;
+ arg0->cursor = 0x0000001A;
play_sound2(SOUND_MENU_FILE_NOT_FOUND);
return;
}
if (func_800B6178(arg0->unk20) != 0) {
- arg0->unk4 = 0x0000001A;
+ arg0->cursor = 0x0000001A;
play_sound2(SOUND_MENU_FILE_NOT_FOUND);
return;
}
}
arg0->unk1C++;
if (arg0->unk1C >= 2) {
- arg0->unk4 = 0x0000000A;
+ arg0->cursor = 0x0000000A;
return;
}
break;
@@ -12620,7 +12621,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) {
break;
}
arg0->unk20 = 0;
- arg0->unk4 = 0x0000001F;
+ arg0->cursor = 0x0000001F;
D_800DC5EC->screenStartY = 0x012C;
D_800DC5F0->screenStartY = -0x003C;
D_8015F894 = 4;
@@ -12641,9 +12642,9 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) {
struct Controller *controller;
if (gIsGamePaused != 0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
- arg0->unk4 = D_800F0B50[gModeSelection];
+ arg0->cursor = D_800F0B50[gModeSelection];
break;
case 11:
case 12:
@@ -12663,8 +12664,8 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) {
if (func_800B4520() == 0) {
controller = &gControllers[gIsGamePaused - 1];
if ((controller->buttonPressed | controller->stickPressed) & 0x800) {
- if (D_800F0B50[gModeSelection] < arg0->unk4) {
- arg0->unk4--;
+ if (D_800F0B50[gModeSelection] < arg0->cursor) {
+ arg0->cursor--;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12673,8 +12674,8 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) {
}
}
if ((controller->buttonPressed | controller->stickPressed) & 0x400) {
- if (arg0->unk4 < D_800F0B54[gModeSelection]) {
- arg0->unk4++;
+ if (arg0->cursor < D_800F0B54[gModeSelection]) {
+ arg0->cursor++;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12683,15 +12684,15 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) {
}
}
if (controller->buttonPressed & B_BUTTON) {
- if (arg0->unk4 != D_800F0B50[gModeSelection]) {
- arg0->unk4 = D_800F0B50[gModeSelection];
+ if (arg0->cursor != D_800F0B50[gModeSelection]) {
+ arg0->cursor = D_800F0B50[gModeSelection];
play_sound2(SOUND_MENU_GO_BACK);
return;
}
}
if (controller->buttonPressed & (START_BUTTON | A_BUTTON)) {
- if (arg0->unk4 == D_800F0B50[gModeSelection]) {
- arg0->unk4 = 0;
+ if (arg0->cursor == D_800F0B50[gModeSelection]) {
+ arg0->cursor = 0;
gIsGamePaused = 0;
func_8028DF38();
func_800C9F90(0U);
@@ -12710,7 +12711,7 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) {
break;
}
} else {
- arg0->unk4 = 0;
+ arg0->cursor = 0;
}
}
@@ -12718,19 +12719,19 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
struct_8018EE10_entry *thing;
s32 var_v1;
- if (arg0->unk4 != 0) {
+ if (arg0->cursor != 0) {
D_800DC5B8 = 0;
}
- switch (arg0->unk4) { /* switch 1 */
+ switch (arg0->cursor) { /* switch 1 */
case 0: /* switch 1 */
if (arg0->unk1C < 0x1E) {
arg0->unk1C++;
}
if (gControllerOne->buttonPressed & 0x1000) {
- arg0->unk4 = 0x0000000F;
+ arg0->cursor = 0x0000000F;
play_sound2(SOUND_ACTION_GO_BACK_2);
} else if (playerHUD[PLAYER_ONE].raceCompleteBool != 0) {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
arg0->unk1C = 0;
}
break;
@@ -12739,7 +12740,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
case 1: /* switch 1 */
arg0->unk1C += 3;
if (arg0->unk1C >= 0x8D) {
- arg0->unk4 = 0x0000000F;
+ arg0->cursor = 0x0000000F;
}
break;
case 11: /* switch 1 */
@@ -12750,8 +12751,8 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
case 16: /* switch 1 */
if (func_800B4520() == 0) {
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) {
- if (arg0->unk4 >= 0xC) {
- arg0->unk4--;
+ if (arg0->cursor >= 0xC) {
+ arg0->cursor--;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12760,8 +12761,8 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
}
}
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) {
- if (arg0->unk4 < 0x10) {
- arg0->unk4++;
+ if (arg0->cursor < 0x10) {
+ arg0->cursor++;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12770,7 +12771,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
}
}
if (gControllerOne->buttonPressed & 0x9000) {
- if (arg0->unk4 == 0x00000010) {
+ if (arg0->cursor == 0x00000010) {
var_v1 = 0;
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12782,7 +12783,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
break;
case PFS_NO_ERROR: /* switch 3 */
func_800B6708();
- arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E;
+ arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E;
var_v1 = 1;
break;
case PFS_ERR_NEW_PACK: /* switch 3 */
@@ -12800,26 +12801,26 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
if (gControllerPak1State == 0) {
switch (func_800B5F30()) { /* switch 2 */
case PFS_INVALID_DATA: /* switch 2 */
- arg0->unk4 = 0x00000015;
+ arg0->cursor = 0x00000015;
var_v1 = 1;
break;
case PFS_FREE_BLOCKS_ERROR: /* switch 2 */
case PFS_NUM_FILES_ERROR: /* switch 2 */
- arg0->unk4 = 0x00000016;
+ arg0->cursor = 0x00000016;
var_v1 = 1;
break;
case PFS_ERR_NOPACK: /* switch 2 */
case PFS_ERR_DEVICE: /* switch 2 */
- arg0->unk4 = 0x00000015;
+ arg0->cursor = 0x00000015;
var_v1 = 1;
break;
case PFS_ERR_ID_FATAL: /* switch 2 */
- arg0->unk4 = 0x00000016;
+ arg0->cursor = 0x00000016;
var_v1 = 1;
break;
default: /* switch 2 */
var_v1 = 1;
- arg0->unk4 = 0x00000016;
+ arg0->cursor = 0x00000016;
break;
case 0:
break;
@@ -12830,20 +12831,20 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
}
if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) {
func_800B6708();
- arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E;
+ arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E;
play_sound2(SOUND_MENU_SELECT);
return;
}
}
if (gControllerPak1MaxWriteableFiles >= gControllerPak1NumFilesUsed) {
- arg0->unk4 = 0x00000018;
+ arg0->cursor = 0x00000018;
play_sound2(SOUND_MENU_FILE_NOT_FOUND);
} else if (gControllerPak1NumPagesFree >= 0x79) {
- arg0->unk4 = 0x00000020;
+ arg0->cursor = 0x00000020;
arg0->unk1C = 0;
play_sound2(SOUND_MENU_SELECT);
} else {
- arg0->unk4 = 0x00000018;
+ arg0->cursor = 0x00000018;
play_sound2(SOUND_MENU_FILE_NOT_FOUND);
}
} else {
@@ -12866,7 +12867,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
case 26: /* switch 1 */
case 41: /* switch 1 */
if (gControllerOne->buttonPressed & 0xD000) {
- arg0->unk4 = 0x00000010;
+ arg0->cursor = 0x00000010;
play_sound2(SOUND_MENU_GO_BACK);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12875,11 +12876,11 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
break;
case 30: /* switch 1 */
case 31: /* switch 1 */
- arg0->unk20 = (u32) arg0->unk4 - 0x1E;
+ arg0->unk20 = (u32) arg0->cursor - 0x1E;
if (func_800B639C((gCupSelection * 4) + gCupCourseSelection) != arg0->unk20) {
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) {
- if (arg0->unk4 >= 0x1F) {
- arg0->unk4--;
+ if (arg0->cursor >= 0x1F) {
+ arg0->cursor--;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12888,8 +12889,8 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
}
}
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) {
- if (arg0->unk4 < 0x1F) {
- arg0->unk4++;
+ if (arg0->cursor < 0x1F) {
+ arg0->cursor++;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12899,17 +12900,17 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
}
}
if (gControllerOne->buttonPressed & 0x4000) {
- arg0->unk4 = 0x00000010;
+ arg0->cursor = 0x00000010;
play_sound2(SOUND_MENU_GO_BACK);
} else if (gControllerOne->buttonPressed & 0x9000) {
thing = &D_8018EE10[arg0->unk20];
if (thing->ghostDataSaved == 0) {
- arg0->unk4 = 0x00000028;
+ arg0->cursor = 0x00000028;
arg0->unk1C = 0;
} else if (func_800B63F0(arg0->unk20) == 0) {
- arg0->unk4 = 0x0000001A;
+ arg0->cursor = 0x0000001A;
} else {
- arg0->unk4 = 0x00000023;
+ arg0->cursor = 0x00000023;
}
play_sound2(SOUND_MENU_SELECT);
if (arg0->unk24 < 4.2) {
@@ -12919,18 +12920,18 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
break;
case 32: /* switch 1 */
if ((arg0->unk1C == 1) && (func_800B6A68() != 0)) {
- arg0->unk4 = 0x00000019;
+ arg0->cursor = 0x00000019;
} else {
arg0->unk1C++;
if (arg0->unk1C >= 2) {
- arg0->unk4 = 0x0000001E;
+ arg0->cursor = 0x0000001E;
}
}
break;
case 35: /* switch 1 */
case 36: /* switch 1 */
- if (((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) && ((s32) (u32) arg0->unk4 >= 0x24)) {
- arg0->unk4--;
+ if (((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) && ((s32) (u32) arg0->cursor >= 0x24)) {
+ arg0->cursor--;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12938,8 +12939,8 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
arg0->unk8 = -1;
}
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) {
- if (arg0->unk4 < 0x24) {
- arg0->unk4++;
+ if (arg0->cursor < 0x24) {
+ arg0->cursor++;
play_sound2(SOUND_MENU_CURSOR_MOVE);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
@@ -12948,18 +12949,18 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
}
}
if (gControllerOne->buttonPressed & 0x4000) {
- arg0->unk4 = arg0->unk20 + 0x1E;
+ arg0->cursor = arg0->unk20 + 0x1E;
play_sound2(SOUND_MENU_GO_BACK);
} else if (gControllerOne->buttonPressed & 0x9000) {
- if (arg0->unk4 == 0x00000024) {
- arg0->unk4 = 0x00000028;
+ if (arg0->cursor == 0x00000024) {
+ arg0->cursor = 0x00000028;
arg0->unk1C = 0;
play_sound2(SOUND_MENU_SELECT);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
}
} else {
- arg0->unk4 = arg0->unk20 + 0x1E;
+ arg0->cursor = arg0->unk20 + 0x1E;
play_sound2(SOUND_MENU_GO_BACK);
}
}
@@ -12967,43 +12968,43 @@ void func_800AE218(struct_8018D9E0_entry *arg0) {
case 40: /* switch 1 */
if (arg0->unk1C == 1) {
if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) != 0) {
- arg0->unk4 = 0x00000029;
+ arg0->cursor = 0x00000029;
play_sound2(SOUND_MENU_FILE_NOT_FOUND);
return;
}
if (func_800B6178(arg0->unk20) != 0) {
- arg0->unk4 = 0x00000029;
+ arg0->cursor = 0x00000029;
play_sound2(SOUND_MENU_FILE_NOT_FOUND);
return;
}
}
arg0->unk1C++;
if (arg0->unk1C >= 2) {
- arg0->unk4 = 0x00000010;
+ arg0->cursor = 0x00000010;
}
break;
}
}
void func_800AEC54(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->column = (get_string_width(D_800E7780) / 2) + 0x140;
arg0->row = 0x000000DA;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
func_800C90F4(0U, (D_80162DE4 * 0x10) + 0x29008001);
break;
case 1:
func_800A9208(arg0, 0x000000A0);
if (arg0->column == 0x000000A0) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk1C = 0;
}
break;
case 2:
arg0->unk1C++;
if (arg0->unk1C >= 0x3D) {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
arg0->unk1C = 0;
}
break;
@@ -13016,8 +13017,8 @@ void func_800AEC54(struct_8018D9E0_entry *arg0) {
// Purposeful fallthrough
case 3:
func_800A94C8(arg0, 0x000000A0, -1);
- if (((arg0->column + 0x14) == -(get_string_width(D_800E7780) / 2)) && (arg0->unk4 == 3)) {
- arg0->unk4 = 4;
+ if (((arg0->column + 0x14) == -(get_string_width(D_800E7780) / 2)) && (arg0->cursor == 3)) {
+ arg0->cursor = 4;
}
break;
default:
@@ -13076,13 +13077,13 @@ void func_800AEF14(struct_8018D9E0_entry *arg0) {
void func_800AEF74(struct_8018D9E0_entry *arg0) {
- switch (arg0->unk4) { /* irregular */
+ switch (arg0->cursor) { /* irregular */
case 0:
if (D_80162DF8 == 1) {
- arg0->unk4 = 1;
+ arg0->cursor = 1;
arg0->unk1C = 0;
} else if (playerHUD[PLAYER_ONE].raceCompleteBool == (s8) 1) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
}
break;
case 2:
@@ -13090,7 +13091,7 @@ void func_800AEF74(struct_8018D9E0_entry *arg0) {
case 1:
arg0->unk1C += 1;
if (playerHUD[PLAYER_ONE].raceCompleteBool == 1) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
}
break;
}
@@ -13099,12 +13100,12 @@ void func_800AEF74(struct_8018D9E0_entry *arg0) {
void func_800AF004(struct_8018D9E0_entry *arg0) {
s32 temp_t1;
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->unk1C += 3;
if (arg0->unk1C >= 0x65) {
arg0->unk1C = 0;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
gCupSelection %= 4;
gCCSelection %= 4;
add_8018D9E0_entry(0x0000012C, 0, 0, 4);
@@ -13117,14 +13118,14 @@ void func_800AF004(struct_8018D9E0_entry *arg0) {
arg0->unk1C += 1;
if (arg0->unk1C >= 9) {
arg0->unk1C = 0;
- arg0->unk4++;
- add_8018D9E0_entry(arg0->unk4 + 0x12B, 0, 0, 4);
+ arg0->cursor++;
+ add_8018D9E0_entry(arg0->cursor + 0x12B, 0, 0, 4);
}
break;
case 5:
arg0->unk1C += 1;
if ((arg0->unk1C >= 0x65) && ((gControllerFive->buttonPressed != 0) || (gControllerFive->stickPressed != 0))) {
- arg0->unk4 = 6;
+ arg0->cursor = 6;
arg0->unk1C = 0;
if (D_802874D8.unk1D < 3) {
play_sound2(SOUND_MENU_OK_CLICKED);
@@ -13137,7 +13138,7 @@ void func_800AF004(struct_8018D9E0_entry *arg0) {
func_8009DFE0(0x0000001E);
func_800CA330(0x19U);
func_800CA388(0x19U);
- arg0->unk4 = 7;
+ arg0->cursor = 7;
break;
case 7:
default:
@@ -13149,18 +13150,18 @@ void func_800AF1AC(struct_8018D9E0_entry *arg0) {
Unk_D_800E70A0 *temp_v0_2;
s32 idx = arg0->type - 0x12C;
- switch (arg0->unk4) { /* irregular */
+ switch (arg0->cursor) { /* irregular */
case 0:
temp_v0_2 = &D_800E7458[idx];
arg0->column = temp_v0_2->column;
arg0->row = temp_v0_2->row;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
break;
case 1:
temp_v0_2 = &D_800E7480[idx];
func_800A91D8(arg0, temp_v0_2->column, temp_v0_2->row);
if ((arg0->column == temp_v0_2->column) && (arg0->row == temp_v0_2->row)) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
}
break;
case 2:
@@ -13177,18 +13178,18 @@ void func_800AF270(struct_8018D9E0_entry *arg0) {
temp_v1 = arg0->type - 0x12C;
sp30 = D_802874D8.unk1E;
temp_v0 = D_800EFD64[sp30];
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
thing = &D_800E7458[temp_v1];
arg0->column = thing->column;
arg0->row = thing->row;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
break;
case 1:
thing = &D_800E7480[temp_v1];
func_800A91D8(arg0, thing->column, thing->row);
if ((arg0->column == thing->column) && (arg0->row == thing->row)) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->unk20 = 0;
}
break;
@@ -13196,12 +13197,12 @@ void func_800AF270(struct_8018D9E0_entry *arg0) {
arg0->unk20++;
if (arg0->unk20 >= 0x1F) {
if (D_802874D8.unk1D >= 3) {
- arg0->unk4 = 4;
+ arg0->cursor = 4;
func_800CA0B8();
func_800C90F4(0U, (sp30 * 0x10) + 0x29008003);
func_800CA0A0();
} else {
- arg0->unk4 = 3;
+ arg0->cursor = 3;
func_8009A640(arg0->D_8018DEE0_index, 0, sp30, segmented_to_virtual_dupe_2(gCharacterCelebrateAnimation[temp_v0]));
func_800CA0B8();
func_800C90F4(0U, (sp30 * 0x10) + 0x29008007);
@@ -13212,7 +13213,7 @@ void func_800AF270(struct_8018D9E0_entry *arg0) {
case 3:
if (D_8018DEE0[arg0->D_8018DEE0_index].sequenceIndex >= D_800E8440[temp_v0]) {
func_8009A640(arg0->D_8018DEE0_index, 0, sp30, segmented_to_virtual_dupe_2(D_800E83A0[temp_v0]));
- arg0->unk4 = 4;
+ arg0->cursor = 4;
}
break;
case 4:
@@ -13238,10 +13239,10 @@ void func_800AF4DC(struct_8018D9E0_entry *arg0) {
temp_v0 = arg0->type - 0x190;
temp_v1 = &D_802850C0[temp_v0];
arg0->row = temp_v1->row;
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->column = temp_v1->startingColumn;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
arg0->unk20 = temp_v1->columnExtra + (get_string_width(D_802854B0[temp_v0]) * temp_v1->textScaling / 2);
/* fallthrough */
case 1:
@@ -13252,7 +13253,7 @@ void func_800AF4DC(struct_8018D9E0_entry *arg0) {
}
arg0->unk24 = (arg0->unk1C * 0.05) + 1.0;
if (arg0->column >= (arg0->unk20 - 0x14)) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->D_8018DEE0_index = 0;
}
break;
@@ -13263,12 +13264,12 @@ void func_800AF4DC(struct_8018D9E0_entry *arg0) {
arg0->unk24 = ((arg0->D_8018DEE0_index - 0xA) * 0.0085 * (arg0->D_8018DEE0_index - 0xA)) + 0.4;
if ((arg0->D_8018DEE0_index >= 9) && ((f64) arg0->unk24 > 1)) {
arg0->unk24 = 1.0f;
- arg0->unk4 = 3;
+ arg0->cursor = 3;
}
break;
case 3:
if ((u8) D_8018ED91 != 0) {
- arg0->unk4 = 4;
+ arg0->cursor = 4;
}
break;
case 4:
@@ -13290,10 +13291,10 @@ void func_800AF740(struct_8018D9E0_entry *arg0) {
temp_v0 = arg0->type - 0x190;
temp_v1 = &D_802850C0[temp_v0];
arg0->row = temp_v1->row;
- switch (arg0->unk4) {
+ switch (arg0->cursor) {
case 0:
arg0->column = temp_v1->startingColumn;
- arg0->unk4 = 1;
+ arg0->cursor = 1;
arg0->unk20 = temp_v1->columnExtra - (get_string_width(D_802854B0[temp_v0]) * temp_v1->textScaling / 2);
/* fallthrough */
case 1:
@@ -13304,7 +13305,7 @@ void func_800AF740(struct_8018D9E0_entry *arg0) {
}
arg0->unk24 = (arg0->unk1C * 0.05) + 1.0;
if ((arg0->unk20 + 0x14) >= arg0->column) {
- arg0->unk4 = 2;
+ arg0->cursor = 2;
arg0->D_8018DEE0_index = 0;
}
break;
@@ -13315,12 +13316,12 @@ void func_800AF740(struct_8018D9E0_entry *arg0) {
arg0->unk24 = ((arg0->D_8018DEE0_index - 0xA) * 0.0085 * (arg0->D_8018DEE0_index - 0xA)) + 0.4;
if ((arg0->D_8018DEE0_index >= 9) && ((f64) arg0->unk24 > 1)) {
arg0->unk24 = 1.0f;
- arg0->unk4 = 3;
+ arg0->cursor = 3;
}
break;
case 3:
if ((u8) D_8018ED91 != 0) {
- arg0->unk4 = 4;
+ arg0->cursor = 4;
}
break;
case 4:
diff --git a/src/code_80091750.h b/src/code_80091750.h
index 5f721756c..0ddc39ffb 100644
--- a/src/code_80091750.h
+++ b/src/code_80091750.h
@@ -11,7 +11,7 @@ extern u32 _course_mario_raceway_dl_mio0SegmentRomStart[];
typedef struct {
/* 0x00 */ s32 type; // id maybe?
- /* 0x04 */ s32 unk4; // sound mode, maybe some other stuff
+ /* 0x04 */ s32 cursor; // sound mode, maybe some other stuff
/* 0x08 */ s32 unk8; // This is used but I can't tell what for
/* 0x0C */ s32 column;
/* 0x10 */ s32 row;
@@ -90,8 +90,8 @@ void func_80091EE4(void);
void func_80091FA4(void);
void func_80092148(void);
void func_800921B4(void);
-void func_800921C0(s32, s32, s32);
-void func_80092224(s32, s32, s32);
+void text_rainbow_effect(s32, s32, s32);
+void set_text_color_rainbow_if_selected(s32, s32, s32);
void func_80092258(void);
void func_80092290(s32, s32*, s32*);
void func_80092500(void);
@@ -193,7 +193,7 @@ void func_8009B998(void);
Gfx *func_8009B9D0(Gfx*, MkTexture*);
Gfx *func_8009BA74(Gfx*, MkTexture*, s32, s32);
Gfx *func_8009BC9C(Gfx*, MkTexture*, s32, s32, s32, s32);
-Gfx *func_8009BEF0(Gfx*, MkTexture*, f32, f32, s32, f32,f32);
+Gfx *print_letter(Gfx*, MkTexture*, f32, f32, s32, f32,f32);
Gfx *func_8009C204(Gfx*, MkTexture*, s32, s32, s32);
Gfx *func_8009C434(Gfx*, struct_8018DEE0_entry*, s32, s32, s32);
Gfx *func_8009C708(Gfx*, struct_8018DEE0_entry *, s32, s32, s32, s32);
@@ -266,11 +266,11 @@ void func_800A3E60(struct_8018D9E0_entry*);
void func_800A4550(s32, s32, s32);
void func_800A474C(s32, s32, s32);
void func_800A4A24(struct_8018D9E0_entry*);
-void func_800A4B38(struct_8018D9E0_entry*);
-void func_800A4BC8(struct_8018D9E0_entry*);
-void func_800A4EF8(struct_8018D9E0_entry*);
-void func_800A5084(struct_8018D9E0_entry*);
-void func_800A5360(struct_8018D9E0_entry*);
+void render_pause_menu(struct_8018D9E0_entry*);
+void render_pause_menu_time_trials(struct_8018D9E0_entry*);
+void render_pause_menu_versus(struct_8018D9E0_entry*);
+void render_pause_grand_prix(struct_8018D9E0_entry*);
+void render_pause_battle(struct_8018D9E0_entry*);
void func_800A54EC(void);
void func_800A5738(struct_8018D9E0_entry*);
void func_800A6034(struct_8018D9E0_entry*);
@@ -498,7 +498,7 @@ extern char *D_800E7728[];
extern char *D_800E7730;
extern char *D_800E7734[];
extern char *D_800E7744[];
-extern char *D_800E775C[];
+extern char *gTextPauseButton[];
extern char *D_800E7778[];
extern char D_800E7780[];
extern char *D_800E77A0[];
diff --git a/src/common_textures.h b/src/common_textures.h
index ca306736e..469d6f01f 100644
--- a/src/common_textures.h
+++ b/src/common_textures.h
@@ -12,8 +12,8 @@ typedef struct {
/** @cond */
-extern s8 common_tlut_finish_line_banner[];
-extern s8 common_texture_particle_fire[];
+extern u8 common_tlut_finish_line_banner[];
+extern u8 common_texture_particle_fire[];
extern Vtx D_0D001200[];
extern Vtx D_0D001210[];
extern Vtx D_0D001240[];
@@ -52,7 +52,7 @@ extern Vtx D_0D001E28[];
extern Vtx D_0D001E58[];
extern Vtx D_0D001E88[];
extern Vtx D_0D001EB8[];
-extern s8 common_texture_item_box_question_mark[];
+extern u8 common_texture_item_box_question_mark[];
extern Gfx D_0D002EE8[];
extern Vtx common_fake_item_box_question_mark_vertices[];
extern Gfx common_model_fake_itembox[];
@@ -70,13 +70,13 @@ extern Gfx D_0D003278[];
extern Gfx D_0D003288[];
extern Vtx common_vtx_banana[];
extern Vtx common_vtx_flat_banana[];
-extern s8 common_texture_banana[];
-extern s8 common_texture_flat_banana[];
+extern u8 common_texture_banana[];
+extern u8 common_texture_flat_banana[];
extern Gfx common_model_banana[];
extern Gfx common_model_flat_banana[];
-extern s8 common_tlut_trees_import[];
-extern s8 common_tlut_green_shell[];
-extern s8 common_tlut_blue_shell[];
+extern u8 common_tlut_trees_import[];
+extern u8 common_tlut_green_shell[];
+extern u8 common_tlut_blue_shell[];
extern Vtx D_0D005238[];
extern Vtx D_0D005278[];
extern Gfx D_0D0052B8[];
@@ -141,10 +141,10 @@ extern Gfx D_0D0069F8[];
extern Gfx D_0D006A10[];
extern Gfx D_0D006A28[];
extern Gfx D_0D006A40[];
-extern s8 D_0D006A58[];
-extern s8 D_0D006AD8[];
-extern s8 common_tlut_debug_font[];
-extern s8 common_texture_debug_font[];
+extern u8 D_0D006A58[];
+extern u8 D_0D006AD8[];
+extern u8 common_tlut_debug_font[];
+extern u8 common_texture_debug_font[];
extern Gfx D_0D0076F8[];
extern Gfx D_0D007780[];
extern Gfx D_0D0077A0[];
@@ -254,29 +254,29 @@ extern f32 D_0D009568[][4];
extern f32 D_0D0096B8[][4];
extern f32 D_0D009808[][4];
extern s32 unkPad;
-extern s8 common_texture_speedometer[];
-extern s8 common_texture_speedometer_needle[];
-extern s8 common_texture_hud_lap[];
+extern u8 common_texture_speedometer[];
+extern u8 common_texture_speedometer_needle[];
+extern u8 common_texture_hud_lap[];
extern u8 common_texture_hud_123[];
-extern s8 common_texture_hud_lap_time[];
-extern s8 common_texture_hud_lap_1_on_3[];
-extern s8 common_texture_hud_lap_2_on_3[];
-extern s8 common_texture_hud_lap_3_on_3[];
-extern s8 common_texture_hud_total_time[];
-extern s8 common_texture_hud_time[];
+extern u8 common_texture_hud_lap_time[];
+extern u8 common_texture_hud_lap_1_on_3[];
+extern u8 common_texture_hud_lap_2_on_3[];
+extern u8 common_texture_hud_lap_3_on_3[];
+extern u8 common_texture_hud_total_time[];
+extern u8 common_texture_hud_time[];
extern u8 common_texture_hud_normal_digit[];
extern u8 common_texture_hud_place[][4096];
-extern s8 D_0D00E258[];
-extern s8 D_0D00F258[];
-extern s8 D_0D010258[];
-extern s8 D_0D011258[];
-extern s8 D_0D012258[];
-extern s8 D_0D013258[];
-extern s8 D_0D014258[];
+extern u8 D_0D00E258[];
+extern u8 D_0D00F258[];
+extern u8 D_0D010258[];
+extern u8 D_0D011258[];
+extern u8 D_0D012258[];
+extern u8 D_0D013258[];
+extern u8 D_0D014258[];
extern u8 D_0D015258[][2048];
-extern s8 D_0D015A58[];
-extern s8 D_0D016258[];
-extern s8 D_0D016A58[];
+extern u8 D_0D015A58[];
+extern u8 D_0D016258[];
+extern u8 D_0D016A58[];
extern u8 common_tlut_player_emblem[];
extern s16 tlutPad[];
extern u8 common_texture_player_emblem[][2048];
@@ -285,57 +285,57 @@ extern u8 common_texture_hud_type_C_rank_font[][256];
extern u8 common_tlut_hud_type_C_rank_tiny_font[];
extern u8 common_texture_hud_type_C_rank_tiny_font[][64];
extern u8 common_texture_character_portrait_border[];
-extern s8 common_tlut_portrait_mario[];
-extern s8 common_tlut_portrait_luigi[];
-extern s8 common_tlut_portrait_peach[];
-extern s8 common_tlut_portrait_toad[];
-extern s8 common_tlut_portrait_yoshi[];
-extern s8 common_tlut_portrait_donkey_kong[];
-extern s8 common_tlut_portrait_wario[];
-extern s8 common_tlut_portrait_bowser[];
-extern s8 common_tlut_portrait_bomb_kart_and_question_mark[];
-extern s8 common_texture_portrait_mario[];
-extern s8 common_texture_portrait_luigi[];
-extern s8 common_texture_portrait_peach[];
-extern s8 common_texture_portrait_toad[];
-extern s8 common_texture_portrait_yoshi[];
-extern s8 common_texture_portrait_donkey_kong[];
-extern s8 common_texture_portrait_wario[];
+extern u8 common_tlut_portrait_mario[];
+extern u8 common_tlut_portrait_luigi[];
+extern u8 common_tlut_portrait_peach[];
+extern u8 common_tlut_portrait_toad[];
+extern u8 common_tlut_portrait_yoshi[];
+extern u8 common_tlut_portrait_donkey_kong[];
+extern u8 common_tlut_portrait_wario[];
+extern u8 common_tlut_portrait_bowser[];
+extern u8 common_tlut_portrait_bomb_kart_and_question_mark[];
+extern u8 common_texture_portrait_mario[];
+extern u8 common_texture_portrait_luigi[];
+extern u8 common_texture_portrait_peach[];
+extern u8 common_texture_portrait_toad[];
+extern u8 common_texture_portrait_yoshi[];
+extern u8 common_texture_portrait_donkey_kong[];
+extern u8 common_texture_portrait_wario[];
extern u8 common_texture_portrait_bowser[];
extern u8 common_texture_portrait_bomb_kart[];
extern u8 common_texture_portrait_question_mark[];
-extern s8 common_tlut_item_window_none[];
-extern s8 common_tlut_item_window_banana[];
-extern s8 common_tlut_item_window_banana_bunch[];
-extern s8 common_tlut_item_window_mushroom[];
-extern s8 common_tlut_item_window_double_mushroom[];
-extern s8 common_tlut_item_window_triple_mushroom[];
-extern s8 common_tlut_item_window_super_mushroom[];
-extern s8 common_tlut_item_window_blue_shell[];
-extern s8 common_tlut_item_window_boo[];
-extern s8 common_tlut_item_window_green_shell[];
-extern s8 common_tlut_item_window_triple_green_shell[];
-extern s8 common_tlut_item_window_red_shell[];
-extern s8 common_tlut_item_window_triple_red_shell[];
-extern s8 common_tlut_item_window_star[];
-extern s8 common_tlut_item_window_thunder_bolt[];
-extern s8 common_tlut_item_window_fake_item_box[];
+extern u8 common_tlut_item_window_none[];
+extern u8 common_tlut_item_window_banana[];
+extern u8 common_tlut_item_window_banana_bunch[];
+extern u8 common_tlut_item_window_mushroom[];
+extern u8 common_tlut_item_window_double_mushroom[];
+extern u8 common_tlut_item_window_triple_mushroom[];
+extern u8 common_tlut_item_window_super_mushroom[];
+extern u8 common_tlut_item_window_blue_shell[];
+extern u8 common_tlut_item_window_boo[];
+extern u8 common_tlut_item_window_green_shell[];
+extern u8 common_tlut_item_window_triple_green_shell[];
+extern u8 common_tlut_item_window_red_shell[];
+extern u8 common_tlut_item_window_triple_red_shell[];
+extern u8 common_tlut_item_window_star[];
+extern u8 common_tlut_item_window_thunder_bolt[];
+extern u8 common_tlut_item_window_fake_item_box[];
extern u8 common_texture_item_window_none[];
-extern s8 common_texture_item_window_banana[];
-extern s8 common_texture_item_window_banana_bunch[];
-extern s8 common_texture_item_window_mushroom[];
-extern s8 common_texture_item_window_double_mushroom[];
-extern s8 common_texture_item_window_triple_mushroom[];
-extern s8 common_texture_item_window_super_mushroom[];
-extern s8 common_texture_item_window_blue_shell[];
-extern s8 common_texture_item_window_boo[];
-extern s8 common_texture_item_window_green_shell[];
-extern s8 common_texture_item_window_triple_green_shell[];
-extern s8 common_texture_item_window_red_shell[];
-extern s8 common_texture_item_window_triple_red_shell[];
-extern s8 common_texture_item_window_star[];
-extern s8 common_texture_item_window_thunder_bolt[];
-extern s8 common_texture_item_window_fake_item_box[];
+extern u8 common_texture_item_window_banana[];
+extern u8 common_texture_item_window_banana_bunch[];
+extern u8 common_texture_item_window_mushroom[];
+extern u8 common_texture_item_window_double_mushroom[];
+extern u8 common_texture_item_window_triple_mushroom[];
+extern u8 common_texture_item_window_super_mushroom[];
+extern u8 common_texture_item_window_blue_shell[];
+extern u8 common_texture_item_window_boo[];
+extern u8 common_texture_item_window_green_shell[];
+extern u8 common_texture_item_window_triple_green_shell[];
+extern u8 common_texture_item_window_red_shell[];
+extern u8 common_texture_item_window_triple_red_shell[];
+extern u8 common_texture_item_window_star[];
+extern u8 common_texture_item_window_thunder_bolt[];
+extern u8 common_texture_item_window_fake_item_box[];
extern u8 common_tlut_lakitu_countdown[][512];
extern u8 common_tlut_lakitu_checkered_flag[];
extern u8 common_tlut_lakitu_second_lap[];
@@ -344,31 +344,31 @@ extern u8 common_tlut_lakitu_reverse[];
extern u8 common_tlut_lakitu_fishing[];
extern u8 common_texture_particle_leaf[];
-extern s8 common_tlut_traffic_light[];
-extern s8 common_texture_traffic_light_01[];
-extern s8 common_texture_traffic_light_02[];
-extern s8 common_texture_traffic_light_03[];
-extern s8 common_texture_traffic_light_04[];
-extern s8 common_texture_traffic_light_05[];
-extern s8 common_texture_traffic_light_06[];
-extern s8 common_texture_traffic_light_07[];
-extern s8 common_texture_traffic_light_08[];
-extern s8 common_texture_traffic_light_09[];
-extern s8 common_texture_traffic_light_10[];
-extern s8 common_texture_unused_particle_leaf[];
+extern u8 common_tlut_traffic_light[];
+extern u8 common_texture_traffic_light_01[];
+extern u8 common_texture_traffic_light_02[];
+extern u8 common_texture_traffic_light_03[];
+extern u8 common_texture_traffic_light_04[];
+extern u8 common_texture_traffic_light_05[];
+extern u8 common_texture_traffic_light_06[];
+extern u8 common_texture_traffic_light_07[];
+extern u8 common_texture_traffic_light_08[];
+extern u8 common_texture_traffic_light_09[];
+extern u8 common_texture_traffic_light_10[];
+extern u8 common_texture_unused_particle_leaf[];
extern u8 D_0D0293D8[];
-extern s8 D_0D029458[];
+extern u8 D_0D029458[];
extern u8 common_texture_bomb[][1024];
-extern s8 D_0D029C58[];
-extern s8 D_0D02A058[];
-extern s8 D_0D02A458[];
+extern u8 D_0D029C58[];
+extern u8 D_0D02A058[];
+extern u8 D_0D02A458[];
extern u8 common_tlut_bomb[];
extern u8 D_0D02AA58[];
extern u8 common_texture_particle_spark[][1024];
extern u8 common_texture_particle_smoke[][1024];
-extern s8 common_texture_minimap_finish_line[];
-extern s8 common_texture_minimap_kart_character[][128];
-extern s8 common_texture_minimap_progress_dot[];
+extern u8 common_texture_minimap_finish_line[];
+extern u8 common_texture_minimap_kart_character[][128];
+extern u8 common_texture_minimap_progress_dot[];
/** @endcond */
diff --git a/src/data/common_textures.inc.c b/src/data/common_textures.inc.c
index 39c9389c5..086af810e 100644
--- a/src/data/common_textures.inc.c
+++ b/src/data/common_textures.inc.c
@@ -18,23 +18,23 @@
// Somehow these symbols need to be linked in. For now, raw addresses are used.
/*
-extern s8 D_03004000[];
-extern s8 D_03004800[];
-extern s8 D_03005000[];
-extern s8 D_03005800[];
-extern s8 D_03006000[];
-extern s8 D_03006800[];
-extern s8 D_03007000[];
-extern s8 D_03007800[];
-extern s8 D_03008000[];
-extern s8 D_03008800[];
+extern u8 D_03004000[];
+extern u8 D_03004800[];
+extern u8 D_03005000[];
+extern u8 D_03005800[];
+extern u8 D_03006000[];
+extern u8 D_03006800[];
+extern u8 D_03007000[];
+extern u8 D_03007800[];
+extern u8 D_03008000[];
+extern u8 D_03008800[];
*/
-s8 common_tlut_finish_line_banner[] = { // tlut
+u8 common_tlut_finish_line_banner[] = { // tlut
#include "assets/finish_line_banner/common_tlut_finish_line_banner.inc.c"
};
-s8 common_texture_particle_fire[] = { // tlut
+u8 common_texture_particle_fire[] = { // tlut
#include "textures/common/common_texture_particle_fire.rgba16.inc.c"
};
@@ -396,7 +396,7 @@ Vtx D_0D001EB8[] = {
};
// D_0D001EE8
-s8 common_texture_item_box_question_mark[] = {
+u8 common_texture_item_box_question_mark[] = {
#include "textures/common/common_texture_item_box_question_mark.rgba16.inc.c"
};
@@ -578,11 +578,11 @@ Vtx common_vtx_flat_banana[] = {
// D_0D003348
-s8 common_texture_banana[] = {
+u8 common_texture_banana[] = {
#include "textures/common/common_texture_banana.rgba16.inc.c"
};
-s8 common_texture_flat_banana[] = {
+u8 common_texture_flat_banana[] = {
#include "textures/common/common_texture_flat_banana.rgba16.inc.c"
};
@@ -632,15 +632,15 @@ Gfx common_model_flat_banana[] = {
// tlut size 8x29
//! @todo What is this?
-s8 common_tlut_trees_import[] = {
+u8 common_tlut_trees_import[] = {
#include "assets/trees/common_tlut_trees_import.inc.c"
};
-s8 common_tlut_green_shell[] = {
+u8 common_tlut_green_shell[] = {
#include "assets/greenshell/common_tlut_green_shell.inc.c"
};
// 5038
-s8 common_tlut_blue_shell[] = {
+u8 common_tlut_blue_shell[] = {
#include "assets/blueshell/common_tlut_blue_shell.inc.c"
};
@@ -1269,20 +1269,20 @@ Gfx D_0D006A40[] = {
// Texture Block shadow i4
-s8 D_0D006A58[] = {
+u8 D_0D006A58[] = {
#include "textures/common/132B50_06A58.i4.inc.c"
};
-s8 D_0D006AD8[] = {
+u8 D_0D006AD8[] = {
#include "textures/common/132B50_06AD8.ia8.inc.c"
};
// tlut
-s8 common_tlut_debug_font[] = {
+u8 common_tlut_debug_font[] = {
#include "assets/debug_font/common_tlut_debug_font.inc.c"
};
-s8 common_texture_debug_font[] = {
+u8 common_texture_debug_font[] = {
#include "assets/debug_font/common_texture_debug_font.inc.c"
};
@@ -2566,17 +2566,17 @@ f32 D_0D009808[][4] = {
};
// Odometer speedometer
-s8 common_texture_speedometer[] = {
+u8 common_texture_speedometer[] = {
#include "textures/common/common_texture_speedometer.i4.inc.c"
};
// i8? odometer needle
-s8 common_texture_speedometer_needle[] = {
+u8 common_texture_speedometer_needle[] = {
#include "textures/common/common_texture_speedometer_needle.i4.inc.c"
};
// Lap UI Texture
-s8 common_texture_hud_lap[] = {
+u8 common_texture_hud_lap[] = {
#include "textures/common/common_texture_hud_lap.rgba16.inc.c"
};
@@ -2586,32 +2586,32 @@ u8 common_texture_hud_123[] = {
};
// Lap
-s8 common_texture_hud_lap_time[] = {
+u8 common_texture_hud_lap_time[] = {
#include "textures/common/common_texture_hud_lap_time.rgba16.inc.c"
};
// 1/3
-s8 common_texture_hud_lap_1_on_3[] = {
+u8 common_texture_hud_lap_1_on_3[] = {
#include "textures/common/common_texture_hud_lap_1_on_3.rgba16.inc.c"
};
// 2/3
-s8 common_texture_hud_lap_2_on_3[] = {
+u8 common_texture_hud_lap_2_on_3[] = {
#include "textures/common/common_texture_hud_lap_2_on_3.rgba16.inc.c"
};
// 3/3
-s8 common_texture_hud_lap_3_on_3[] = {
+u8 common_texture_hud_lap_3_on_3[] = {
#include "textures/common/common_texture_hud_lap_3_on_3.rgba16.inc.c"
};
// total
-s8 common_texture_hud_total_time[] = {
+u8 common_texture_hud_total_time[] = {
#include "textures/common/common_texture_hud_total_time.rgba16.inc.c"
};
// time
-s8 common_texture_hud_time[] = {
+u8 common_texture_hud_time[] = {
#include "textures/common/common_texture_hud_time.rgba16.inc.c"
};
@@ -2773,83 +2773,83 @@ u8 common_texture_character_portrait_border[] = {
};
// 1A4D8 mario tlut
-s8 common_tlut_portrait_mario[] = {
+u8 common_tlut_portrait_mario[] = {
#include "assets/character_portraits/common_tlut_portrait_mario.inc.c"
};
// 1A6D8 luigi tlut
-s8 common_tlut_portrait_luigi[] = {
+u8 common_tlut_portrait_luigi[] = {
#include "assets/character_portraits/common_tlut_portrait_luigi.inc.c"
};
// 1A8D8 peach tlut
-s8 common_tlut_portrait_peach[] = {
+u8 common_tlut_portrait_peach[] = {
#include "assets/character_portraits/common_tlut_portrait_peach.inc.c"
};
// 1AAD8 toad tlut
-s8 common_tlut_portrait_toad[] = {
+u8 common_tlut_portrait_toad[] = {
#include "assets/character_portraits/common_tlut_portrait_toad.inc.c"
};
// 1ACD8 yoshi tlut
-s8 common_tlut_portrait_yoshi[] = {
+u8 common_tlut_portrait_yoshi[] = {
#include "assets/character_portraits/common_tlut_portrait_yoshi.inc.c"
};
// 1AED8 dk tlut
-s8 common_tlut_portrait_donkey_kong[] = {
+u8 common_tlut_portrait_donkey_kong[] = {
#include "assets/character_portraits/common_tlut_portrait_donkey_kong.inc.c"
};
// 1B0D8 wario tlut
-s8 common_tlut_portrait_wario[] = {
+u8 common_tlut_portrait_wario[] = {
#include "assets/character_portraits/common_tlut_portrait_wario.inc.c"
};
// 1B2D8 bowser tlut
-s8 common_tlut_portrait_bowser[] = {
+u8 common_tlut_portrait_bowser[] = {
#include "assets/character_portraits/common_tlut_portrait_bowser.inc.c"
};
// 1B4D8 bob-omb tlut and question mark?
-s8 common_tlut_portrait_bomb_kart_and_question_mark[] = {
+u8 common_tlut_portrait_bomb_kart_and_question_mark[] = {
#include "assets/character_portraits/common_tlut_portrait_bomb_kart_and_question_mark.inc.c"
};
// Mario
-s8 common_texture_portrait_mario[] = {
+u8 common_texture_portrait_mario[] = {
#include "assets/character_portraits/common_texture_portrait_mario.inc.c"
};
// Luigi
-s8 common_texture_portrait_luigi[] = {
+u8 common_texture_portrait_luigi[] = {
#include "assets/character_portraits/common_texture_portrait_luigi.inc.c"
};
// Peach
-s8 common_texture_portrait_peach[] = {
+u8 common_texture_portrait_peach[] = {
#include "assets/character_portraits/common_texture_portrait_peach.inc.c"
};
// Toad
-s8 common_texture_portrait_toad[] = {
+u8 common_texture_portrait_toad[] = {
#include "assets/character_portraits/common_texture_portrait_toad.inc.c"
};
// Yoshi
-s8 common_texture_portrait_yoshi[] = {
+u8 common_texture_portrait_yoshi[] = {
#include "assets/character_portraits/common_texture_portrait_yoshi.inc.c"
};
// Donkey Kong
-s8 common_texture_portrait_donkey_kong[] = {
+u8 common_texture_portrait_donkey_kong[] = {
#include "assets/character_portraits/common_texture_portrait_donkey_kong.inc.c"
};
// Wario
-s8 common_texture_portrait_wario[] = {
+u8 common_texture_portrait_wario[] = {
#include "assets/character_portraits/common_texture_portrait_wario.inc.c"
};
@@ -2869,67 +2869,67 @@ u8 common_texture_portrait_question_mark[] = {
};
// 1DED8 tlut item frames
-s8 common_tlut_item_window_none[] = {
+u8 common_tlut_item_window_none[] = {
#include "assets/item_window/common_tlut_item_window_none.inc.c"
};
-s8 common_tlut_item_window_banana[] = {
+u8 common_tlut_item_window_banana[] = {
#include "assets/item_window/common_tlut_item_window_banana.inc.c"
};
-s8 common_tlut_item_window_banana_bunch[] = {
+u8 common_tlut_item_window_banana_bunch[] = {
#include "assets/item_window/common_tlut_item_window_banana_bunch.inc.c"
};
-s8 common_tlut_item_window_mushroom[] = {
+u8 common_tlut_item_window_mushroom[] = {
#include "assets/item_window/common_tlut_item_window_mushroom.inc.c"
};
-s8 common_tlut_item_window_double_mushroom[] = {
+u8 common_tlut_item_window_double_mushroom[] = {
#include "assets/item_window/common_tlut_item_window_double_mushroom.inc.c"
};
-s8 common_tlut_item_window_triple_mushroom[] = {
+u8 common_tlut_item_window_triple_mushroom[] = {
#include "assets/item_window/common_tlut_item_window_triple_mushroom.inc.c"
};
-s8 common_tlut_item_window_super_mushroom[] = {
+u8 common_tlut_item_window_super_mushroom[] = {
#include "assets/item_window/common_tlut_item_window_super_mushroom.inc.c"
};
-s8 common_tlut_item_window_blue_shell[] = {
+u8 common_tlut_item_window_blue_shell[] = {
#include "assets/item_window/common_tlut_item_window_blue_shell.inc.c"
};
-s8 common_tlut_item_window_boo[] = {
+u8 common_tlut_item_window_boo[] = {
#include "assets/item_window/common_tlut_item_window_boo.inc.c"
};
-s8 common_tlut_item_window_green_shell[] = {
+u8 common_tlut_item_window_green_shell[] = {
#include "assets/item_window/common_tlut_item_window_green_shell.inc.c"
};
-s8 common_tlut_item_window_triple_green_shell[] = {
+u8 common_tlut_item_window_triple_green_shell[] = {
#include "assets/item_window/common_tlut_item_window_triple_green_shell.inc.c"
};
-s8 common_tlut_item_window_red_shell[] = {
+u8 common_tlut_item_window_red_shell[] = {
#include "assets/item_window/common_tlut_item_window_red_shell.inc.c"
};
-s8 common_tlut_item_window_triple_red_shell[] = {
+u8 common_tlut_item_window_triple_red_shell[] = {
#include "assets/item_window/common_tlut_item_window_triple_red_shell.inc.c"
};
-s8 common_tlut_item_window_star[] = {
+u8 common_tlut_item_window_star[] = {
#include "assets/item_window/common_tlut_item_window_star.inc.c"
};
-s8 common_tlut_item_window_thunder_bolt[] = {
+u8 common_tlut_item_window_thunder_bolt[] = {
#include "assets/item_window/common_tlut_item_window_thunder_bolt.inc.c"
};
-s8 common_tlut_item_window_fake_item_box[] = {
+u8 common_tlut_item_window_fake_item_box[] = {
#include "assets/item_window/common_tlut_item_window_fake_item_box.inc.c"
};
@@ -2938,63 +2938,63 @@ u8 common_texture_item_window_none[] = {
#include "assets/item_window/common_texture_item_window_none.inc.c"
};
-s8 common_texture_item_window_banana[] = {
+u8 common_texture_item_window_banana[] = {
#include "assets/item_window/common_texture_item_window_banana.inc.c"
};
-s8 common_texture_item_window_banana_bunch[] = {
+u8 common_texture_item_window_banana_bunch[] = {
#include "assets/item_window/common_texture_item_window_banana_bunch.inc.c"
};
-s8 common_texture_item_window_mushroom[] = {
+u8 common_texture_item_window_mushroom[] = {
#include "assets/item_window/common_texture_item_window_mushroom.inc.c"
};
-s8 common_texture_item_window_double_mushroom[] = {
+u8 common_texture_item_window_double_mushroom[] = {
#include "assets/item_window/common_texture_item_window_double_mushroom.inc.c"
};
-s8 common_texture_item_window_triple_mushroom[] = {
+u8 common_texture_item_window_triple_mushroom[] = {
#include "assets/item_window/common_texture_item_window_triple_mushroom.inc.c"
};
-s8 common_texture_item_window_super_mushroom[] = {
+u8 common_texture_item_window_super_mushroom[] = {
#include "assets/item_window/common_texture_item_window_super_mushroom.inc.c"
};
-s8 common_texture_item_window_blue_shell[] = {
+u8 common_texture_item_window_blue_shell[] = {
#include "assets/item_window/common_texture_item_window_blue_shell.inc.c"
};
-s8 common_texture_item_window_boo[] = {
+u8 common_texture_item_window_boo[] = {
#include "assets/item_window/common_texture_item_window_boo.inc.c"
};
-s8 common_texture_item_window_green_shell[] = {
+u8 common_texture_item_window_green_shell[] = {
#include "assets/item_window/common_texture_item_window_green_shell.inc.c"
};
-s8 common_texture_item_window_triple_green_shell[] = {
+u8 common_texture_item_window_triple_green_shell[] = {
#include "assets/item_window/common_texture_item_window_triple_green_shell.inc.c"
};
-s8 common_texture_item_window_red_shell[] = {
+u8 common_texture_item_window_red_shell[] = {
#include "assets/item_window/common_texture_item_window_red_shell.inc.c"
};
-s8 common_texture_item_window_triple_red_shell[] = {
+u8 common_texture_item_window_triple_red_shell[] = {
#include "assets/item_window/common_texture_item_window_triple_red_shell.inc.c"
};
-s8 common_texture_item_window_star[] = {
+u8 common_texture_item_window_star[] = {
#include "assets/item_window/common_texture_item_window_star.inc.c"
};
-s8 common_texture_item_window_thunder_bolt[] = {
+u8 common_texture_item_window_thunder_bolt[] = {
#include "assets/item_window/common_texture_item_window_thunder_bolt.inc.c"
};
-s8 common_texture_item_window_fake_item_box[] = {
+u8 common_texture_item_window_fake_item_box[] = {
#include "assets/item_window/common_texture_item_window_fake_item_box.inc.c"
};
@@ -3039,49 +3039,49 @@ u8 common_tlut_lakitu_fishing[] = {
};
// unused traffic light tlut
-UNUSED s8 common_tlut_traffic_light[] = {
+UNUSED u8 common_tlut_traffic_light[] = {
#include "assets/unused_traffic_light/common_tlut_traffic_light.inc.c"
};
// unused traffic light textures
-UNUSED s8 common_texture_traffic_light_01[] = {
+UNUSED u8 common_texture_traffic_light_01[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_01.inc.c"
};
-UNUSED s8 common_texture_traffic_light_02[] = {
+UNUSED u8 common_texture_traffic_light_02[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_02.inc.c"
};
-UNUSED s8 common_texture_traffic_light_03[] = {
+UNUSED u8 common_texture_traffic_light_03[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_03.inc.c"
};
-UNUSED s8 common_texture_traffic_light_04[] = {
+UNUSED u8 common_texture_traffic_light_04[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_04.inc.c"
};
-UNUSED s8 common_texture_traffic_light_05[] = {
+UNUSED u8 common_texture_traffic_light_05[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_05.inc.c"
};
-UNUSED s8 common_texture_traffic_light_06[] = {
+UNUSED u8 common_texture_traffic_light_06[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_06.inc.c"
};
-UNUSED s8 common_texture_traffic_light_07[] = {
+UNUSED u8 common_texture_traffic_light_07[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_07.inc.c"
};
-UNUSED s8 common_texture_traffic_light_08[] = {
+UNUSED u8 common_texture_traffic_light_08[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_08.inc.c"
};
-UNUSED s8 common_texture_traffic_light_09[] = {
+UNUSED u8 common_texture_traffic_light_09[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_09.inc.c"
};
-UNUSED s8 common_texture_traffic_light_10[] = {
+UNUSED u8 common_texture_traffic_light_10[] = {
#include "assets/unused_traffic_light/common_texture_traffic_light_10.inc.c"
};
@@ -3091,7 +3091,7 @@ u8 common_texture_particle_leaf[] = {
};
// leaf
-UNUSED s8 common_texture_unused_particle_leaf[] = {
+UNUSED u8 common_texture_unused_particle_leaf[] = {
#include "textures/common/common_texture_unused_particle_leaf.rgba16.inc.c"
};
@@ -3102,7 +3102,7 @@ u8 D_0D0293D8[] = {
};
// Smoke?
-s8 D_0D029458[] = {
+u8 D_0D029458[] = {
#include "textures/common/132B50_29458.i8.inc.c"
};
@@ -3163,11 +3163,11 @@ u8 common_texture_particle_smoke[][1024] = {
};
// minimap cars
-s8 common_texture_minimap_finish_line[] = {
+u8 common_texture_minimap_finish_line[] = {
#include "assets/minimap_icons/common_texture_minimap_finish_line.inc.c"
};
-s8 common_texture_minimap_kart_character[][128] = {
+u8 common_texture_minimap_kart_character[][128] = {
{ // Mario
#include "assets/minimap_icons/common_texture_minimap_kart_mario.inc.c"
},
@@ -3194,6 +3194,6 @@ s8 common_texture_minimap_kart_character[][128] = {
},
};
-s8 common_texture_minimap_progress_dot[] = {
+u8 common_texture_minimap_progress_dot[] = {
#include "assets/minimap_icons/common_texture_minimap_progress_dot.inc.c"
};
diff --git a/src/debug/all_variables.h b/src/debug/all_variables.h
index 4f01b72bc..5cbab34ac 100644
--- a/src/debug/all_variables.h
+++ b/src/debug/all_variables.h
@@ -18,7 +18,7 @@
#include <code_8003DC40.h>
#include <code_80057C60.h>
#include <code_8006E9C0.h>
-#include <code_80071F00.h>
+#include <update_objects.h>
#include <code_80086E70.h>
#include <effects.h>
#include <code_80091440.h>
@@ -34,7 +34,7 @@
#include <credits.h>
#include <data_segment2.h>
#include <buffers.h>
-#include <hud_renderer.h>
+#include <render_objects.h>
#include <kart_dma.h>
#include <main.h>
#include <math_util_2.h>
diff --git a/src/effects.c b/src/effects.c
index 280d61105..85aa3d44f 100644
--- a/src/effects.c
+++ b/src/effects.c
@@ -11,7 +11,7 @@
#include "code_80005FD0.h"
#include "render_player.h"
#include "player_controller.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "code_80057C60.h"
#include "effects.h"
#include "audio/external.h"
@@ -1908,7 +1908,7 @@ void func_80090970(Player *player, s8 playerId, s8 arg2) {
case 2:
func_80090178(player, playerId, sp44, sp38);
// Fakematch found by Verti, who knows what's going on here
- player->rotation[1] = (u16) -get_angle_between_points(sp44, sp38) & 0xFFFF;
+ player->rotation[1] = (u16) -get_angle_between_two_vectors(sp44, sp38) & 0xFFFF;
player->pos[0] = sp44[0];
player->pos[1] = sp44[1] + 40.0f;
player->pos[2] = sp44[2];
diff --git a/src/ending/ceremony_and_credits.c b/src/ending/ceremony_and_credits.c
index 2a80e20bb..05a4479d5 100644
--- a/src/ending/ceremony_and_credits.c
+++ b/src/ending/ceremony_and_credits.c
@@ -682,7 +682,7 @@ void play_sound_congratulation(UNUSED struct CinematicCamera *camera) {
}
/**
- * Played in ceremony opening with ballons.
+ * Played in ceremony opening with balloons.
*/
void play_sound_balloon_pop(UNUSED struct CinematicCamera *camera) {
play_sound2(SOUND_CEREMONY_BALLOON_POP);
diff --git a/src/ending/code_80280000.c b/src/ending/code_80280000.c
index d2053e62f..d3e7a1a8b 100644
--- a/src/ending/code_80280000.c
+++ b/src/ending/code_80280000.c
@@ -63,8 +63,8 @@ void func_80280038(void) {
render_set_position(matrix, 0);
render_course(D_800DC5EC);
render_course_actors(D_800DC5EC);
- func_80058090(0);
- func_80058538(0);
+ render_object(PLAYER_ONE+SCREEN_MODE_1P);
+ render_player_snow_effect(PLAYER_ONE+SCREEN_MODE_1P);
transition_sliding_borders();
func_80281C40();
init_rdp();
@@ -165,7 +165,7 @@ void load_credits(void) {
camera->up[2] = 0.0f;
init_cinematic_camera();
func_80003040();
- init_object_list();
+ init_hud();
func_80093E60();
func_80092688();
if (D_800DC5EC) {}
diff --git a/src/ending/code_80281780.c b/src/ending/code_80281780.c
index 7cb2db881..f95eb767f 100644
--- a/src/ending/code_80281780.c
+++ b/src/ending/code_80281780.c
@@ -157,7 +157,7 @@ void load_ceremony_cutscene(void) {
debug_switch_character_ceremony_cutscene();
func_802818BC();
func_8003D080();
- init_object_list();
+ init_hud();
func_8001C05C();
balloons_and_fireworks_init();
func_802816B8();
diff --git a/src/ending/code_80281C40.c b/src/ending/code_80281C40.c
index 19312c7ad..aa36464f1 100644
--- a/src/ending/code_80281C40.c
+++ b/src/ending/code_80281C40.c
@@ -6,13 +6,14 @@
#include "main.h"
#include "math_util.h"
#include "skybox_and_splitscreen.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "code_80057C60.h"
#include "code_80091750.h"
#include "podium_ceremony_actors.h"
#include "ceremony_and_credits.h"
#include "podium_ceremony_actors.h"
#include "render_player.h"
+#include "defines.h"
struct UnkStruct80287560 {
s16 unk0;
@@ -79,7 +80,7 @@ void func_80281D00(void) {
render_players_on_screen_one();
gSPDisplayList(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_80284EE0));
update_actors_loop();
- func_80058090(0);
+ render_object(PLAYER_ONE+SCREEN_MODE_1P);
func_80021B0C();
gSPDisplayList(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_80284EE0));
func_80093F10();
diff --git a/src/ending/podium_ceremony_actors.c b/src/ending/podium_ceremony_actors.c
index ce0e879d4..9c6421eb1 100644
--- a/src/ending/podium_ceremony_actors.c
+++ b/src/ending/podium_ceremony_actors.c
@@ -9,7 +9,7 @@
#include "memory.h"
#include "common_textures.h"
#include "render_player.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "podium_ceremony_actors.h"
#include "camera_junk.h"
#include "player_controller.h"
@@ -471,7 +471,7 @@ void podium_ceremony_loop(void) {
func_8005A070();
if (D_802874D8.unk1C != 0) {
func_8001C14C();
- func_800097E0();
+ update_vehicles();
}
func_80281D00();
func_80281540();
diff --git a/src/ending/podium_ceremony_actors.h b/src/ending/podium_ceremony_actors.h
index b21eb455e..85c3549e5 100644
--- a/src/ending/podium_ceremony_actors.h
+++ b/src/ending/podium_ceremony_actors.h
@@ -3,7 +3,7 @@
#include "common_structs.h"
-enum ActorType {
+enum CeremonyActorType {
Initial,
Balloon,
FireworkCone,
diff --git a/src/main.c b/src/main.c
index 044e050a7..007944509 100644
--- a/src/main.c
+++ b/src/main.c
@@ -18,7 +18,7 @@
#include "profiler.h"
#include "race_logic.h"
#include "skybox_and_splitscreen.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "effects.h"
#include "code_80281780.h"
#include "audio/external.h"
@@ -612,7 +612,7 @@ void race_logic_loop(void) {
sNumVBlanks = 0;
profiler_log_thread5_time(LEVEL_SCRIPT_EXECUTE);
D_8015F788 = 0;
- func_802A59A4();
+ render_player_one_1p_screen();
if (!gEnableDebugMode) {
D_800DC514 = FALSE;
} else {
@@ -684,11 +684,11 @@ void race_logic_loop(void) {
}
D_8015F788 = 0;
if (gPlayerWinningIndex == 0) {
- func_802A5FAC();
- func_802A5CB4();
+ render_player_two_2p_screen_vertical();
+ render_player_one_2p_screen_vertical();
} else {
- func_802A5CB4();
- func_802A5FAC();
+ render_player_one_2p_screen_vertical();
+ render_player_two_2p_screen_vertical();
}
break;
@@ -730,11 +730,11 @@ void race_logic_loop(void) {
}
D_8015F788 = 0;
if (gPlayerWinningIndex == 0) {
- func_802A65B8();
- func_802A62A4();
+ render_player_two_2p_screen_horizontal();
+ render_player_one_2p_screen_horizontal();
} else {
- func_802A62A4();
- func_802A65B8();
+ render_player_one_2p_screen_horizontal();
+ render_player_two_2p_screen_horizontal();
}
break;
@@ -802,25 +802,25 @@ void race_logic_loop(void) {
}
D_8015F788 = 0;
if (gPlayerWinningIndex == 0) {
- func_802A6BB0();
- func_802A6E94();
- func_802A7178();
- func_802A68CC();
+ render_player_two_3p_4p_screen();
+ render_player_three_3p_4p_screen();
+ render_player_four_3p_4p_screen();
+ render_player_one_3p_4p_screen();
} else if (gPlayerWinningIndex == 1) {
- func_802A68CC();
- func_802A6E94();
- func_802A7178();
- func_802A6BB0();
+ render_player_one_3p_4p_screen();
+ render_player_three_3p_4p_screen();
+ render_player_four_3p_4p_screen();
+ render_player_two_3p_4p_screen();
} else if (gPlayerWinningIndex == 2) {
- func_802A68CC();
- func_802A6BB0();
- func_802A7178();
- func_802A6E94();
+ render_player_one_3p_4p_screen();
+ render_player_two_3p_4p_screen();
+ render_player_four_3p_4p_screen();
+ render_player_three_3p_4p_screen();
} else {
- func_802A68CC();
- func_802A6BB0();
- func_802A6E94();
- func_802A7178();
+ render_player_one_3p_4p_screen();
+ render_player_two_3p_4p_screen();
+ render_player_three_3p_4p_screen();
+ render_player_four_3p_4p_screen();
}
break;
}
diff --git a/src/math_util_2.c b/src/math_util_2.c
index 314e9789c..1122b209c 100644
--- a/src/math_util_2.c
+++ b/src/math_util_2.c
@@ -400,8 +400,8 @@ f32 func_80041724(f32 x, f32 z, u16 angle) {
return (coss(angle) * z) + (sinAngle * x);
}
-s32 func_80041770(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
- return atan2s(arg1 - arg0, arg3 - arg2);
+s32 get_angle_between_xy(f32 x1, f32 x2, f32 y1, f32 y2) {
+ return atan2s(x2 - x1, y2 - y1);
}
u16 func_800417B4(u16 angle1, u16 angle2) {
@@ -450,14 +450,14 @@ s32 func_80041924(Collision *arg0, Vec3f arg1) {
return ret;
}
-s32 func_80041980(Vec3f arg0, Camera *arg1, u16 arg2) {
+bool is_particle_on_screen(Vec3f arg0, Camera *arg1, u16 arg2) {
u16 temp_t9;
s32 ret;
- ret = 0;
- temp_t9 = (func_80041770(arg1->pos[0], arg0[0], arg1->pos[2], arg0[2]) + (arg2 / 2)) - arg1->rot[1];
+ ret = FALSE;
+ temp_t9 = (get_angle_between_xy(arg1->pos[0], arg0[0], arg1->pos[2], arg0[2]) + (arg2 / 2)) - arg1->rot[1];
if ((temp_t9 >= 0) && (arg2 >= temp_t9)) {
- ret = 1;
+ ret = TRUE;
}
return ret;
}
@@ -630,7 +630,7 @@ void func_80041D34(void) {
}
}
-void func_80041EF4(void) {
+void set_matrix_hud_screen(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxOrtho), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
}
diff --git a/src/math_util_2.h b/src/math_util_2.h
index 3dca9e629..725fa7627 100644
--- a/src/math_util_2.h
+++ b/src/math_util_2.h
@@ -54,12 +54,12 @@ Vec3f *vec3f_cross_product(Vec3f, Vec3f, Vec3f);
s32 func_80041658(f32, f32);
f32 func_800416D8(f32, f32, u16);
f32 func_80041724(f32, f32, u16);
-s32 func_80041770(f32, f32, f32, f32);
+s32 get_angle_between_xy(f32, f32, f32, f32);
u16 func_800417B4(u16, u16);
s32 func_800418AC(f32, f32, Vec3f);
s32 func_800418E8(f32, f32, Vec3f);
s32 func_80041924(Collision*, Vec3f);
-s32 func_80041980(Vec3f, Camera*, u16);
+s32 is_particle_on_screen(Vec3f, Camera*, u16);
void func_800419F8(void);
void mtfx_translation_x_y(Mat4, s32, s32);
void mtxf_u16_rotate_z(Mat4, u16);
@@ -68,7 +68,7 @@ void mtxf_rotate_z_scale_x_y(Mat4, u16, f32);
void mtxf_translation_x_y_rotate_z_scale_x_y(Mat4, s32, s32, u16, f32);
void func_80041D24(void);
void func_80041D34(void);
-void func_80041EF4(void);
+void set_matrix_hud_screen(void);
void func_80042330(s32, s32, u16, f32);
void mtxf_set_matrix_transformation(Mat4, Vec3f, Vec3su, f32);
void mtxf_set_matrix_scale_transl(Mat4, Vec3f, Vec3f, f32);
diff --git a/src/menus.c b/src/menus.c
index 7f62f4433..79971632f 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -258,20 +258,20 @@ void options_menu_act(struct Controller *controller, u16 arg1) {
sp2C = TRUE;
sp38->unk8 = -1;
}
- if (sp2C && gSoundMode != sp38->unk4) {
+ if (sp2C && gSoundMode != sp38->cursor) {
gSaveData.main.soundMode = gSoundMode;
write_save_data_grand_prix_points_and_sound_mode();
update_save_data_backup();
- sp38->unk4 = gSoundMode;
+ sp38->cursor = gSoundMode;
}
if (btnAndStick & B_BUTTON) {
func_8009E280();
play_sound2(SOUND_MENU_GO_BACK);
- if (gSoundMode != sp38->unk4) {
+ if (gSoundMode != sp38->cursor) {
gSaveData.main.soundMode = gSoundMode;
write_save_data_grand_prix_points_and_sound_mode();
update_save_data_backup();
- sp38->unk4 = gSoundMode;
+ sp38->cursor = gSoundMode;
}
return;
}
@@ -305,7 +305,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) {
switch (sp2C) {
case PFS_INVALID_DATA:
D_8018EDEC = 0x46;
- sp38->unk4 = 0;
+ sp38->cursor = 0;
play_sound2(SOUND_MENU_SELECT);
break;
case PFS_NO_ERROR:
@@ -486,7 +486,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) {
D_8018EDEC = 0x38;
} else {
D_8018EDEC = 0x3A;
- sp38->unk4 = 0;
+ sp38->cursor = 0;
}
play_sound2(SOUND_MENU_SELECT);
}
@@ -540,7 +540,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) {
} else {
D_8018EDEC = 0x3A;
play_sound2(SOUND_MENU_SELECT);
- sp38->unk4 = 0;
+ sp38->cursor = 0;
}
}
// return?
@@ -549,9 +549,9 @@ void options_menu_act(struct Controller *controller, u16 arg1) {
case 0x3A:
{
if (arg1 == 0) {
- sp38->unk4 += 1;
+ sp38->cursor += 1;
}
- if (sp38->unk4 >= 3) {
+ if (sp38->cursor >= 3) {
D_8018EDEC = 0x3B;
}
break;
@@ -584,9 +584,9 @@ void options_menu_act(struct Controller *controller, u16 arg1) {
case 0x46:
{
if (arg1 == 0) {
- sp38->unk4 += 1;
+ sp38->cursor += 1;
}
- if (sp38->unk4 >= 3) {
+ if (sp38->cursor >= 3) {
D_8018EDEC = 0x47;
}
break;
@@ -1986,12 +1986,12 @@ void func_800B44BC(void) {
}
// Likely checks that the user is actually in the menus and not racing.
-s32 func_800B4520(void) {
+bool func_800B4520(void) {
if ((D_8018E7B0 == 2) || (D_8018E7B0 == 3) || (D_8018E7B0 == 4) || (D_8018E7B0 == 7)) {
- return 1;
+ return TRUE;
}
- return 0;
+ return FALSE;
}
UNUSED void func_800B4560(s32 arg0, s32 arg1) {
diff --git a/src/player_controller.c b/src/player_controller.c
index d3695f48c..e13ded918 100644
--- a/src/player_controller.c
+++ b/src/player_controller.c
@@ -1696,7 +1696,7 @@ void func_8002B9CC(Player *player, s8 arg1, UNUSED s32 arg2) {
func_8008C73C(player, arg1);
}
}
- temp = (-(s16)get_angle_between_points(player->pos, &player->copy_rotation_x));
+ temp = (-(s16)get_angle_between_two_vectors(player->pos, &player->copy_rotation_x));
temp2 = (player->rotation[1] - player->unk_0C0);
temp = temp - temp2;
player->unk_234 = temp / 182;
@@ -1739,7 +1739,7 @@ void func_8002BB9C(Player *player, f32 *arg1, f32 *arg2, UNUSED s8 arg3, UNUSED
mtxf_translate_vec3f_mat3(sp4C, sp64);
- var_v0 = -(s16)get_angle_between_points(sp58, sp4C);
+ var_v0 = -(s16)get_angle_between_two_vectors(sp58, sp4C);
t0 = player->rotation[1];
var_v0 = 0x10000 + (t0 - var_v0);
var_v0 /= 182;
@@ -2160,7 +2160,7 @@ void func_8002D028(Player *player, s8 arg1) {
sp4C[1] = 0;
sp4C[2] = D_80165230[D_80165270[arg1]];
- temp = -(s16)get_angle_between_points(player->pos, sp4C);
+ temp = -(s16)get_angle_between_two_vectors(player->pos, sp4C);
temp2 = player->rotation[1];
temp = (temp - temp2);
diff --git a/src/racing/actors.c b/src/racing/actors.c
index 34b7d9240..a64022cf2 100644
--- a/src/racing/actors.c
+++ b/src/racing/actors.c
@@ -17,7 +17,7 @@
#include "waypoints.h"
#include "macros.h"
#include "code_80005FD0.h"
-#include "code_80071F00.h"
+#include "update_objects.h"
#include "effects.h"
#include "collision.h"
#include "audio/external.h"
@@ -33,7 +33,7 @@ u8 *D_802BA054;
u8 *D_802BA058;
-struct Actor *D_802BA05C;
+struct Actor *gActorHotAirBalloonItemBox;
s8 gTLUTRedShell[512]; // tlut 256
u16 D_802BA260;
@@ -414,7 +414,7 @@ void func_8029794C(Vec3f arg0, Vec3s arg1, f32 arg2) {
Mat4 sp20;
arg0[1] += 2.0f;
- func_802B5F74(sp20, arg0, arg1);
+ mtxf_pos_rotation_xyz(sp20, arg0, arg1);
mtxf_scale(sp20, arg2);
if (render_set_position(sp20, 0) != 0) {
@@ -571,7 +571,7 @@ void update_actor_kiwano_fruit(struct KiwanoFruit *fruit) {
}
}
-#include "actors/boat.inc.c"
+#include "actors/paddle_boat/update.inc.c"
#include "actors/train.inc.c"
@@ -893,7 +893,7 @@ void func_80298D7C(Camera *camera, Mat4 arg1, UNUSED struct Actor *actor) {
test &= 0xF;
test = (s16)test;
if (test == 6) {
- func_802B5F74(sp90, spD4, sp88);
+ mtxf_pos_rotation_xyz(sp90, spD4, sp88);
if (!(gMatrixObjectCount < MTX_OBJECT_POOL_SIZE)) { break; }
render_set_position(sp90, 0);
goto dummylabel;
@@ -1302,12 +1302,12 @@ void render_actor_banana(Camera *camera, UNUSED Mat4 arg1, struct BananaActor *b
func_802972B8(camera, (struct Actor *) banana);
if (banana->state == 5) {
- func_802B5F74(sp3C, banana->pos, banana->rot);
+ mtxf_pos_rotation_xyz(sp3C, banana->pos, banana->rot);
} else {
sp7C[0] = 0;
sp7C[1] = 0;
sp7C[2] = 0;
- func_802B5F74(sp3C, banana->pos, sp7C);
+ mtxf_pos_rotation_xyz(sp3C, banana->pos, sp7C);
}
maxObjectsReached = render_set_position(sp3C, 0) == 0;
@@ -1405,41 +1405,7 @@ UNUSED void func_8029AE14() {
}
-// This likely attaches the paddle wheel to the boat
-void func_8029AE1C(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED Mat4 arg2, u16 arg3) {
- UNUSED s32 pad[3];
- Vec3f sp120;
- Mat4 spE0;
- Mat4 spA0;
- Mat4 sp60;
- f32 temp;
-
- if ((arg3 > 20) && (arg3 < 25)) { return; }
- temp = is_within_render_distance(arg0->pos, boat->pos, arg0->rot[1], 90000.0f, gCameraZoom[arg0 - camera1], 9000000.0f);
-
- if (temp < 0.0f) { return; }
-
- gSPSetLights1(gDisplayListHead++, D_800DC610[1]);
- gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
-
- func_802B5F74(spE0, boat->pos, boat->boatRot);
- if (render_set_position(spE0, 1) != 0) {
-
- gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E730);
- gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E058);
-
- mtxf_rotate_x(spE0, boat->wheelRot);
- vec3f_set(sp120, 0, 16.0f, -255.0f);
- mtxf_translate(spA0, sp120);
- mtxf_multiplication(sp60, spE0, spA0);
- if (render_set_position(sp60, 3) != 0) {
- gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
- gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_FC28);
- gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
- gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
- }
- }
-}
+#include "actors/paddle_boat/render.inc.c"
void func_8029B06C(Camera *arg0, struct Actor *arg1) {
UNUSED s32 pad[6];
@@ -1451,7 +1417,7 @@ void func_8029B06C(Camera *arg0, struct Actor *arg1) {
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- func_802B5F74(spD8, arg1->pos, arg1->rot);
+ mtxf_pos_rotation_xyz(spD8, arg1->pos, arg1->rot);
if (render_set_position(spD8, 0) != 0) {
switch(arg1->state) {
@@ -1495,7 +1461,7 @@ void func_8029B2E4(Camera *arg0, struct Actor *arg1) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- func_802B5F74(spC8, arg1->pos, arg1->rot);
+ mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot);
if (render_set_position(spC8, 0) != 0) {
if (gActiveScreenMode == SCREEN_MODE_1P) {
@@ -1526,7 +1492,7 @@ void func_8029B4E0(Camera *arg0, struct Actor *arg1) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- func_802B5F74(spC8, arg1->pos, arg1->rot);
+ mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot);
mtxf_scale(spC8, 0.1f);
if (render_set_position(spC8, 0) != 0) {
@@ -1558,7 +1524,7 @@ void func_8029B6EC(Camera *camera, struct Actor* arg1) {
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- func_802B5F74(spC8, arg1->pos, arg1->rot);
+ mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot);
if (render_set_position(spC8, 0) != 0) {
if (gActiveScreenMode == SCREEN_MODE_1P) {
@@ -1580,7 +1546,7 @@ void func_8029B6EC(Camera *camera, struct Actor* arg1) {
}
// Spins train wheels?
-void func_8029B8E8(Camera *camera, struct TrainCar *actor) {
+void render_actor_train_engine(Camera *camera, struct TrainCar *actor) {
UNUSED s32 pad[2];
s32 maxObjectsReached;
Vec3f sp160;
@@ -1594,7 +1560,7 @@ void func_8029B8E8(Camera *camera, struct TrainCar *actor) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- func_802B5F74(sp120, actor->pos, actor->rot);
+ mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot);
maxObjectsReached = render_set_position(sp120, 0) == 0;
if (maxObjectsReached) { return; }
@@ -1706,7 +1672,7 @@ void func_8029B8E8(Camera *camera, struct TrainCar *actor) {
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
}
-void func_8029BFB0(Camera *camera, struct TrainCar *actor) {
+void render_actor_train_tender(Camera *camera, struct TrainCar *actor) {
Mat4 sp120;
Vec3f sp160;
Mat4 spE0;
@@ -1718,7 +1684,7 @@ void func_8029BFB0(Camera *camera, struct TrainCar *actor) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- func_802B5F74(sp120, actor->pos, actor->rot);
+ mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot);
if (render_set_position(sp120, 0) == 0) { return; }
if (temp_f0 < 250000.0f) {
@@ -1776,7 +1742,7 @@ void func_8029BFB0(Camera *camera, struct TrainCar *actor) {
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
}
-void func_8029C3CC(Camera *camera, struct TrainCar *actor) {
+void render_actor_passenger_car(Camera *camera, struct TrainCar *actor) {
Mat4 sp120;
Vec3f sp160;
Mat4 spE0;
@@ -1788,7 +1754,7 @@ void func_8029C3CC(Camera *camera, struct TrainCar *actor) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- func_802B5F74(sp120, actor->pos, actor->rot);
+ mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot);
if (render_set_position(sp120, 0) == 0) { return; }
@@ -1915,14 +1881,14 @@ void render_actor_falling_rock(Camera *camera, struct FallingRock *rock) {
sp98[1] = 0;
sp98[2] = 0;
sp8C[1] = temp_f0 + 2.0f;
- func_802B5F74(sp4C, sp8C, sp98);
+ mtxf_pos_rotation_xyz(sp4C, sp8C, sp98);
if (render_set_position(sp4C, 0) == 0) {
return;
}
gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_dl_6F88);
}
}
- func_802B5F74(sp4C, rock->pos, rock->rot);
+ mtxf_pos_rotation_xyz(sp4C, rock->pos, rock->rot);
if (render_set_position(sp4C, 0) == 0) {
return;
}
@@ -2170,10 +2136,10 @@ void place_course_actors(void) {
place_all_item_boxes(d_course_mario_raceway_item_box_spawns);
vec3f_set(position, 150.0f, 40.0f, -1300.0f);
position[0] *= gCourseDirection;
- addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_RACEWAY_SIGN);
+ addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_SIGN);
vec3f_set(position, 2520.0f, 0.0f, 1240.0f);
position[0] *= gCourseDirection;
- actor = &gActorList[addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_RACEWAY_SIGN)];
+ actor = &gActorList[addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_SIGN)];
actor->flags |= 0x4000;
break;
case COURSE_CHOCO_MOUNTAIN:
@@ -2252,13 +2218,13 @@ void place_course_actors(void) {
place_all_item_boxes(d_course_wario_stadium_item_box_spawns);
vec3f_set(position, -131.0f, 83.0f, 286.0f);
position[0] *= gCourseDirection;
- addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN);
+ addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN);
vec3f_set(position, -2353.0f, 72.0f, -1608.0f);
position[0] *= gCourseDirection;
- addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN);
+ addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN);
vec3f_set(position, -2622.0f, 79.0f, 739.0f);
position[0] *= gCourseDirection;
- addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN);
+ addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN);
break;
case COURSE_BLOCK_FORT:
place_all_item_boxes(d_course_block_fort_item_box_spawns);
@@ -2696,7 +2662,7 @@ s32 func_8029F2FC(Player *player, struct PiranhaPlant *plant) {
return 0;
}
-s32 func_8029F408(Player *player, struct YoshiValleyEgg *egg) {
+bool func_8029F408(Player *player, struct YoshiValleyEgg *egg) {
UNUSED f32 pad[5];
f32 z_dist;
f32 xz_dist;
@@ -2708,31 +2674,36 @@ s32 func_8029F408(Player *player, struct YoshiValleyEgg *egg) {
x_dist = egg->pos[0] - player->pos[0];
if ((x_dist < thing2) && (x_dist < -thing)) {
- return 0;
+ return FALSE;
}
if (x_dist > thing) {
- return 0;
+ return FALSE;
}
+
z_dist = egg->pos[2] - player->pos[2];
if ((z_dist < thing2) && (z_dist < -thing)) {
- return 0;
+ return FALSE;
}
if (z_dist > thing) {
- return 0;
+ return FALSE;
}
+
xz_dist = sqrtf((x_dist * x_dist) + (z_dist * z_dist));
if (xz_dist > thing) {
- return 0;
+ return FALSE;
}
func_802977B0(player);
+
y_dist = player->pos[1] - egg->pos[1];
if (y_dist < thing2) {
- return 0;
+ return FALSE;
}
+
totalBox = player->boundingBoxSize + egg->boundingBoxSize;
if (totalBox < xz_dist) {
- return 0;
+ return FALSE;
}
+
if ((player->type & PLAYER_HUMAN) != 0) {
if ((player->effects & STAR_EFFECT) != 0) {
egg->flags |= 0x400;
@@ -2748,7 +2719,8 @@ s32 func_8029F408(Player *player, struct YoshiValleyEgg *egg) {
} else {
func_8008DABC(player, player - gPlayerOne);
}
- return 1;
+
+ return TRUE;
}
s32 func_8029F69C(Player *player, struct Actor *actor) {
@@ -2816,7 +2788,7 @@ s32 func_8029F69C(Player *player, struct Actor *actor) {
sp20[1] = actor->pos[1];
sp20[2] = actor->pos[2];
if (((gCurrentCourseId == COURSE_MARIO_RACEWAY) || (gCurrentCourseId == COURSE_YOSHI_VALLEY) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY) || (gCurrentCourseId == COURSE_LUIGI_RACEWAY)) && (player->unk_094 > 1.0f)) {
- func_80077AB0(sp20, 0);
+ spawn_leaf(sp20, 0);
}
if (xz_dist < 0.1f) {
sqrtf((sp48 * sp48) + (sp44 * sp44));
@@ -3156,7 +3128,7 @@ void func_802A0450(Player *player, struct Actor *actor) {
}
break;
case ACTOR_BANANA:
- if (player->effects & 0x800008C0) { break; }
+ if (player->effects & (BOO_EFFECT | 0x8C0)) { break; }
if (player->soundEffects & 1) { break; }
temp_v1 = actor->rot[0];
if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; }
@@ -3227,7 +3199,7 @@ void func_802A0450(Player *player, struct Actor *actor) {
func_8029F2FC(player, (struct PiranhaPlant *) actor);
}
break;
- case ACTOR_MARIO_RACEWAY_SIGN:
+ case ACTOR_MARIO_SIGN:
if (!(player->effects & BOO_EFFECT)) {
func_8029F1F8(player, actor);
}
@@ -3498,21 +3470,21 @@ void update_actor_fake_item_box(struct FakeItemBox *fake_item_box) {
}
}
-void func_802A14BC(f32 arg0, f32 arg1, f32 arg2) {
- Vec3f sp34;
- Vec3f sp28;
- Vec3s sp20;
- s16 temp_a0;
+void func_802A14BC(f32 x, f32 y, f32 z) {
+ Vec3f pos;
+ Vec3f velocity;
+ Vec3s rot;
+ s16 id;
if (gModeSelection == TIME_TRIALS) { return; }
- vec3s_set(sp20, 0, 0, 0);
- vec3f_set(sp28, 0, 0, 0);
- sp34[0] = arg0;
- sp34[1] = arg1;
- sp34[2] = arg2;
- temp_a0 = addActorToEmptySlot(sp34, sp20, sp28, 43);
- D_802BA05C = &gActorList[temp_a0];
+ vec3s_set(rot, 0, 0, 0);
+ vec3f_set(velocity, 0, 0, 0);
+ pos[0] = x;
+ pos[1] = y;
+ pos[2] = z;
+ id = addActorToEmptySlot(pos, rot, velocity, ACTOR_HOT_AIR_BALLOON_ITEM_BOX);
+ gActorHotAirBalloonItemBox = &gActorList[id];
}
void update_actor_item_box_hot_air_balloon(struct ItemBox *itemBox) {
@@ -3602,14 +3574,14 @@ void func_802A171C(Camera *camera, struct FakeItemBox *fakeItemBox) {
someRot[0] = 0;
someRot[1] = fakeItemBox->rot[1];
someRot[2] = 0;
- func_802B5F74(someMatrix2, fakeItemBox->pos, someRot);
+ mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, someRot);
mtxf_scale(someMatrix2, fakeItemBox->sizeScaling);
if (fakeItemBox->state != 2) {
if (!render_set_position(someMatrix2, 0)) { return; }
gSPDisplayList(gDisplayListHead++, common_model_fake_itembox);
- func_802B5F74(someMatrix2, fakeItemBox->pos, fakeItemBox->rot);
+ mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, fakeItemBox->rot);
mtxf_scale(someMatrix2, fakeItemBox->sizeScaling);
if (!render_set_position(someMatrix2, 0)) { return; }
@@ -3634,7 +3606,7 @@ void func_802A171C(Camera *camera, struct FakeItemBox *fakeItemBox) {
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
gDPSetBlendMask(gDisplayListHead++, 0xFF);
thing = fakeItemBox->someTimer;
- func_802B5F74(someMatrix2, fakeItemBox->pos, fakeItemBox->rot);
+ mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, fakeItemBox->rot);
if (thing < 10.0f) {
someMultiplier = 1.0f;
} else {
@@ -3736,28 +3708,28 @@ void func_802A1EA0(Camera *camera, struct ItemBox *item_box) {
someVec2[0] = item_box->pos[0];
someVec2[1] = item_box->resetDistance + 2.0f;
someVec2[2] = item_box->pos[2];
- func_802B5F74(someMatrix1, someVec2, someRot);
+ mtxf_pos_rotation_xyz(someMatrix1, someVec2, someRot);
if (!render_set_position(someMatrix1, 0)) { return; }
gSPDisplayList(gDisplayListHead++, D_0D002EE8);
someRot[1] = item_box->rot[1] * 2;
someVec2[1] = item_box->pos[1];
- func_802B5F74(someMatrix1, someVec2, someRot);
+ mtxf_pos_rotation_xyz(someMatrix1, someVec2, someRot);
if (!render_set_position(someMatrix1, 0)) { return; }
gSPDisplayList(gDisplayListHead++, itemBoxQuestionMarkModel);
}
if (item_box->state == 5) {
- func_802B5F74(someMatrix1, item_box->pos, item_box->rot);
+ mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot);
if (!render_set_position(someMatrix1, 0)) { return; }
gSPDisplayList(gDisplayListHead++, itemBoxQuestionMarkModel);
}
if (item_box->state != 3) {
- func_802B5F74(someMatrix1, item_box->pos, item_box->rot);
+ mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot);
if (!render_set_position(someMatrix1, 0)) { return; }
@@ -3782,7 +3754,7 @@ void func_802A1EA0(Camera *camera, struct ItemBox *item_box) {
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
gDPSetBlendMask(gDisplayListHead++, 0xFF);
thing = item_box->someTimer;
- func_802B5F74(someMatrix1, item_box->pos, item_box->rot);
+ mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot);
if (thing < 10.0f) {
someMultiplier = 1.0f;
} else {
@@ -3858,7 +3830,7 @@ void func_802A1EA0(Camera *camera, struct ItemBox *item_box) {
}
}
-void func_802A269C(Camera *arg0, struct Actor *arg1) {
+void render_actor_wario_sign(Camera *arg0, struct Actor *arg1) {
Mat4 sp38;
f32 unk = is_within_render_distance(arg0->pos, arg1->pos, arg0->rot[1], 0, gCameraZoom[arg0 - camera1], 16000000.0f);
@@ -3866,7 +3838,7 @@ void func_802A269C(Camera *arg0, struct Actor *arg1) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- func_802B5F74(sp38, arg1->pos, arg1->rot);
+ mtxf_pos_rotation_xyz(sp38, arg1->pos, arg1->rot);
if (render_set_position(sp38, 0) != 0) {
gSPDisplayList(gDisplayListHead++, d_course_wario_stadium_dl_sign);
@@ -3902,7 +3874,7 @@ void func_802A27A0(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3
sp5C[0] = 0;
sp5C[1] = egg->eggRot;
sp5C[2] = 0;
- func_802B5F74(sp60, egg->pos, sp5C);
+ mtxf_pos_rotation_xyz(sp60, egg->pos, sp5C);
if (render_set_position(sp60, 0) == 0) { return; }
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
@@ -3919,7 +3891,7 @@ void func_802A27A0(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3
}
}
-void func_802A29BC(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) {
+void render_actor_mario_sign(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) {
Mat4 sp40;
f32 unk;
s16 temp = arg2->flags;
@@ -3930,7 +3902,7 @@ void func_802A29BC(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) {
if (!(unk < 0.0f)) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- func_802B5F74(sp40, arg2->pos, arg2->rot);
+ mtxf_pos_rotation_xyz(sp40, arg2->pos, arg2->rot);
if (render_set_position(sp40, 0) != 0) {
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_dl_sign);
}
@@ -3943,7 +3915,7 @@ void func_802A2AD0(Camera *arg0, struct RailroadCrossing *rr_crossing) {
f32 unk = is_within_render_distance(arg0->pos, rr_crossing->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f);
if (!(unk < 0.0f)) {
- func_802B5F74(sp40, rr_crossing->pos, rr_crossing->rot);
+ mtxf_pos_rotation_xyz(sp40, rr_crossing->pos, rr_crossing->rot);
if (render_set_position(sp40, 0) != 0) {
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
@@ -3980,7 +3952,7 @@ void func_802A2C78(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) {
if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) {
func_8029794C(arg2->pos, arg2->rot, 2.0f);
}
- func_802B5F74(sp68, arg2->pos, spA8);
+ mtxf_pos_rotation_xyz(sp68, arg2->pos, spA8);
if (render_set_position(sp68, 0) != 0) {
gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE);
@@ -4014,7 +3986,7 @@ void func_802A2C78(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) {
}
void func_802A2F34(struct UnkStruct_800DC5EC *arg0) {
- Camera *temp_s1 = arg0->camera;
+ Camera *camera = arg0->camera;
struct Actor *actor;
s32 i;
D_8015F8DC = 0;
@@ -4028,13 +4000,13 @@ void func_802A2F34(struct UnkStruct_800DC5EC *arg0) {
switch(actor->type) {
case ACTOR_FAKE_ITEM_BOX:
- func_802A171C(temp_s1, (struct FakeItemBox *) actor);
+ func_802A171C(camera, (struct FakeItemBox *) actor);
break;
case ACTOR_ITEM_BOX:
- func_802A1EA0(temp_s1, (struct ItemBox *) actor);
+ func_802A1EA0(camera, (struct ItemBox *) actor);
break;
case ACTOR_HOT_AIR_BALLOON_ITEM_BOX:
- func_802A1EA0(temp_s1, (struct ItemBox *) actor);
+ func_802A1EA0(camera, (struct ItemBox *) actor);
break;
}
}
@@ -4138,13 +4110,13 @@ void render_course_actors(struct UnkStruct_800DC5EC *arg0) {
render_actor_piranha_plant(camera, D_801502C0, (struct PiranhaPlant *) actor);
break;
case ACTOR_TRAIN_ENGINE:
- func_8029B8E8(camera, (struct TrainCar *) actor);
+ render_actor_train_engine(camera, (struct TrainCar *) actor);
break;
case ACTOR_TRAIN_TENDER:
- func_8029BFB0(camera, (struct TrainCar *) actor);
+ render_actor_train_tender(camera, (struct TrainCar *) actor);
break;
case ACTOR_TRAIN_PASSENGER_CAR:
- func_8029C3CC(camera, (struct TrainCar *) actor);
+ render_actor_passenger_car(camera, (struct TrainCar *) actor);
break;
case ACTOR_COW:
render_actor_cow(camera, D_801502C0, actor);
@@ -4152,17 +4124,17 @@ void render_course_actors(struct UnkStruct_800DC5EC *arg0) {
case 0x14:
func_8029AC18(camera, D_801502C0, actor);
break;
- case ACTOR_MARIO_RACEWAY_SIGN:
- func_802A29BC(camera, D_801502C0, actor);
+ case ACTOR_MARIO_SIGN:
+ render_actor_mario_sign(camera, D_801502C0, actor);
break;
- case ACTOR_WARIO_STADIUM_SIGN:
- func_802A269C(camera, actor);
+ case ACTOR_WARIO_SIGN:
+ render_actor_wario_sign(camera, actor);
break;
case ACTOR_PALM_TREE:
func_802A2C78(camera, D_801502C0, actor);
break;
- case ACTOR_PADDLE_WHEEL_BOAT:
- func_8029AE1C(camera, (struct PaddleWheelBoat *) actor, D_801502C0, pathCounter);
+ case ACTOR_PADDLE_BOAT:
+ render_actor_paddle_boat(camera, (struct PaddleWheelBoat *) actor, D_801502C0, pathCounter);
break;
case ACTOR_BOX_TRUCK:
func_8029B06C(camera, actor);
@@ -4223,8 +4195,8 @@ void update_course_actors(void) {
case ACTOR_BANANA:
update_actor_banana((struct BananaActor *) actor);
break;
- case ACTOR_PADDLE_WHEEL_BOAT:
- update_actor_paddle_wheel((struct PaddleWheelBoat *) actor);
+ case ACTOR_PADDLE_BOAT:
+ update_actor_paddle_boat((struct PaddleWheelBoat *) actor);
break;
case ACTOR_TRAIN_ENGINE:
update_actor_train_engine((struct TrainCar *) actor);
@@ -4256,10 +4228,10 @@ void update_course_actors(void) {
case ACTOR_TRIPLE_RED_SHELL:
update_actor_triple_shell((TripleShellParent *) actor, ACTOR_RED_SHELL);
break;
- case ACTOR_MARIO_RACEWAY_SIGN:
+ case ACTOR_MARIO_SIGN:
update_actor_mario_raceway_sign(actor);
break;
- case ACTOR_WARIO_STADIUM_SIGN:
+ case ACTOR_WARIO_SIGN:
update_actor_wario_stadium_sign(actor);
break;
case ACTOR_RAILROAD_CROSSING:
diff --git a/src/racing/actors.h b/src/racing/actors.h
index 746ded6e6..bc7eca7cb 100644
--- a/src/racing/actors.h
+++ b/src/racing/actors.h
@@ -21,7 +21,7 @@ void render_actor_cow(Camera*, Mat4, struct Actor*);
void update_actor_yoshi_valley_egg(struct YoshiValleyEgg*);
void update_actor_trees_cacti_shrubs(struct Actor*);
void update_actor_kiwano_fruit(struct KiwanoFruit*);
-void update_actor_paddle_wheel(struct PaddleWheelBoat*);
+void update_actor_paddle_boat(struct PaddleWheelBoat*);
void update_actor_train_engine(struct TrainCar*);
void update_actor_train_car1(struct TrainCar*);
void update_actor_train_car2(struct TrainCar*);
@@ -53,14 +53,14 @@ void update_actor_wario_stadium_sign(struct Actor*);
void update_actor_railroad_crossing(struct RailroadCrossing*);
void update_actor_mario_raceway_sign(struct Actor*);
void func_8029AC18(Camera*, Mat4, struct Actor*);
-void func_8029AE1C(Camera*, struct PaddleWheelBoat*, Mat4, u16);
+void render_actor_paddle_boat(Camera*, struct PaddleWheelBoat*, Mat4, u16);
void func_8029B06C(Camera*, struct Actor*);
void func_8029B2E4(Camera*, struct Actor*);
void func_8029B4E0(Camera*, struct Actor*);
void func_8029B6EC(Camera*, struct Actor*);
-void func_8029B8E8(Camera*, struct TrainCar*);
-void func_8029BFB0(Camera*, struct TrainCar*);
-void func_8029C3CC(Camera*, struct TrainCar*);
+void render_actor_train_engine(Camera*, struct TrainCar*);
+void render_actor_train_tender(Camera*, struct TrainCar*);
+void render_actor_passenger_car(Camera*, struct TrainCar*);
void render_actor_falling_rock(Camera*, struct FallingRock*);
void place_piranha_plants(struct ActorSpawnData*);
void place_palm_trees(struct ActorSpawnData*);
@@ -98,9 +98,9 @@ void update_actor_item_box_hot_air_balloon(struct ItemBox*);
void update_actor_item_box(struct ItemBox*);
void func_802A171C(Camera*, struct FakeItemBox*);
void func_802A1EA0(Camera*, struct ItemBox*);
-void func_802A269C(Camera*, struct Actor*);
+void render_actor_wario_sign(Camera*, struct Actor*);
void func_802A27A0(Camera*, Mat4, struct YoshiValleyEgg*, u16);
-void func_802A29BC(Camera*, Mat4, struct Actor*);
+void render_actor_mario_sign(Camera*, Mat4, struct Actor*);
void func_802A2AD0(Camera*, struct RailroadCrossing*);
void func_802A2C78(Camera*, Mat4, struct Actor*);
void func_802A2F34(struct UnkStruct_800DC5EC*);
@@ -114,7 +114,7 @@ extern void func_800C99E0(Vec3f, s32);
extern u8 *D_802BA050;
extern u8 *D_802BA054;
extern u8 *D_802BA058;
-extern struct Actor *D_802BA05C;
+extern struct Actor *gActorHotAirBalloonItemBox;
extern s8 gTLUTRedShell[]; // tlut 256
extern u16 D_802BA260; // Box Truck sub-type?
@@ -124,7 +124,6 @@ extern s16 gCurrentCourseId;
extern u16 isCrossingTriggeredByIndex[];
extern Lights1 D_800DC610[];
-extern s8 common_tlut_trees_import[];
extern Gfx D_0D005338[];
extern Gfx D_0D005368[];
extern Gfx D_0D007B20[];
diff --git a/src/racing/actors_extended.c b/src/racing/actors_extended.c
index af5063bec..afc795e09 100644
--- a/src/racing/actors_extended.c
+++ b/src/racing/actors_extended.c
@@ -12,7 +12,7 @@
#include "actors.h"
#include "actors_extended.h"
#include "audio/external.h"
-#include "code_80071F00.h"
+#include "update_objects.h"
#include "effects.h"
#include "sounds.h"
diff --git a/src/racing/math_util.c b/src/racing/math_util.c
index d28aade3f..c4b6e3169 100644
--- a/src/racing/math_util.c
+++ b/src/racing/math_util.c
@@ -78,7 +78,7 @@ f32 func_802B51E8(Vec3f arg0, Vec3f arg1) {
return (sub_x * sub_x) + (sub_y * sub_y) + sub_z + sub_z;
}
-s32 get_angle_between_points(Vec3f arg0, Vec3f arg1) {
+s32 get_angle_between_two_vectors(Vec3f arg0, Vec3f arg1) {
f32 temp_v1;
f32 temp_v2;
temp_v1 = arg1[0] - arg0[0];
@@ -87,7 +87,7 @@ s32 get_angle_between_points(Vec3f arg0, Vec3f arg1) {
return atan2s(temp_v1, temp_v2);
}
-// get_angle_between_points
+// get_angle_between_two_vectors
u32 func_802B5258(Vec3f arg0, Vec3s arg1) {
f32 temp_v1;
f32 temp_v2;
@@ -483,7 +483,7 @@ void mtxf_scale(Mat4 mat, f32 coef) {
}
// look like create a translation and rotation matrix with arg1 position and arg2 rotation
-void func_802B5F74(Mat4 arg0, Vec3f arg1, Vec3s arg2) {
+void mtxf_pos_rotation_xyz(Mat4 out, Vec3f pos, Vec3s orientation) {
f32 sine1;
f32 cosine1;
f32 sine2;
@@ -491,28 +491,28 @@ void func_802B5F74(Mat4 arg0, Vec3f arg1, Vec3s arg2) {
f32 sine3;
f32 cosine3;
- 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);
- arg0[1][0] = (-cosine2 * sine3) + ((sine1 * sine2) * cosine3);
- arg0[2][0] = cosine1 * sine2;
- arg0[3][0] = arg1[0];
- arg0[0][1] = cosine1 * sine3;
- arg0[1][1] = cosine1 * cosine3;
- arg0[2][1] = -sine1;
- arg0[3][1] = arg1[1];
- arg0[0][2] = (-sine2 * cosine3) + ((sine1 * cosine2) * sine3);
- arg0[1][2] = (sine2 * sine3) + ((sine1 * cosine2) * cosine3);
- arg0[2][2] = cosine1 * cosine2;
- arg0[3][2] = arg1[2];
- arg0[0][3] = 0.0f;
- arg0[1][3] = 0.0f;
- arg0[2][3] = 0.0f;
- arg0[3][3] = 1.0f;
+ sine1 = sins(orientation[0]);
+ cosine1 = coss(orientation[0]);
+ sine2 = sins(orientation[1]);
+ cosine2 = coss(orientation[1]);
+ sine3 = sins(orientation[2]);
+ cosine3 = coss(orientation[2]);
+ out[0][0] = (cosine2 * cosine3) + ((sine1 * sine2) * sine3);
+ out[1][0] = (-cosine2 * sine3) + ((sine1 * sine2) * cosine3);
+ out[2][0] = cosine1 * sine2;
+ out[3][0] = pos[0];
+ out[0][1] = cosine1 * sine3;
+ out[1][1] = cosine1 * cosine3;
+ out[2][1] = -sine1;
+ out[3][1] = pos[1];
+ out[0][2] = (-sine2 * cosine3) + ((sine1 * cosine2) * sine3);
+ out[1][2] = (sine2 * sine3) + ((sine1 * cosine2) * cosine3);
+ out[2][2] = cosine1 * cosine2;
+ out[3][2] = pos[2];
+ out[0][3] = 0.0f;
+ out[1][3] = 0.0f;
+ out[2][3] = 0.0f;
+ out[3][3] = 1.0f;
}
UNUSED void func_802B60B4(Mat4 arg0, Vec3s arg1, Vec3s arg2) {
@@ -1143,7 +1143,7 @@ f32 is_within_render_distance(Vec3f cameraPos, Vec3f objectPos, u16 orientationY
return -1.0f;
}
- angleObject = get_angle_between_points(cameraPos, objectPos);
+ angleObject = get_angle_between_two_vectors(cameraPos, objectPos);
minus_fov_angle = (orientationY - extended_fov);
plus_fov_angle = (orientationY + extended_fov);
diff --git a/src/racing/math_util.h b/src/racing/math_util.h
index cdc27d5ad..06f76fc7d 100644
--- a/src/racing/math_util.h
+++ b/src/racing/math_util.h
@@ -19,7 +19,7 @@ double fabs(double x);
s32 func_802B4F60(s32, Vec3f, s32, f32, f32);
s32 render_set_position(Mat4, s32);
f32 func_802B51E8(Vec3f, Vec3f);
-s32 get_angle_between_points(Vec3f, Vec3f);
+s32 get_angle_between_two_vectors(Vec3f, Vec3f);
u32 func_802B5258(Vec3f, Vec3s);
void vec3f_set(Vec3f, f32, f32, f32);
void vec3s_set(Vec3s, s16, s16, s16);
@@ -40,7 +40,7 @@ void func_802B5CAC(s16, s16, Vec3f);
void func_802B5D30(s16, s16, s32);
void func_802B5D64(uintptr_t, s16, s16, s32);
void mtxf_scale(Mat4, f32);
-void func_802B5F74(Mat4, Vec3f, Vec3s);
+void mtxf_pos_rotation_xyz(Mat4, Vec3f, Vec3s);
void mtxf_translate_vec3f_mat3(Vec3f, Mat3);
void mtxf_translate_vec3f_mat4(Vec3f, Mat4);
void func_802B64C4(Vec3f, s16);
diff --git a/src/racing/race_logic.c b/src/racing/race_logic.c
index 1363ea806..c7d1fa35b 100644
--- a/src/racing/race_logic.c
+++ b/src/racing/race_logic.c
@@ -11,7 +11,7 @@
#include "main.h"
#include "code_800029B0.h"
#include "code_80057C60.h"
-#include "code_80071F00.h"
+#include "update_objects.h"
#include "code_80091750.h"
#include "code_80005FD0.h"
#include "spawn_players.h"
@@ -670,7 +670,7 @@ void func_8028F474(void) {
}
case 1:
case 2:
- func_800097E0();
+ update_vehicles();
break;
}
}
diff --git a/src/racing/render_courses.c b/src/racing/render_courses.c
index b0036359c..35781e821 100644
--- a/src/racing/render_courses.c
+++ b/src/racing/render_courses.c
@@ -199,7 +199,7 @@ void func_802911C4(void) {
}
}
-void func_8029122C(struct UnkStruct_800DC5EC *arg0, s32 arg1) {
+void func_8029122C(struct UnkStruct_800DC5EC *arg0, s32 playerId) {
UNUSED s32 pad;
Player *player = arg0->player;
Mat4 matrix;
@@ -212,22 +212,22 @@ void func_8029122C(struct UnkStruct_800DC5EC *arg0, s32 arg1) {
pathCounter = (u16) arg0->pathCounter;
cameraRot = (u16) arg0->camera->rot[1];
playerDirection = arg0->playerDirection;
- switch (arg1) {
- case 0:
- gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
- gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- break;
- case 1:
- gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
- gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[1]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- break;
- case 2:
- gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
- gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[2]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
- break;
- case 3:
- gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[3]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
- gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[3]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
+ switch (playerId) {
+ case PLAYER_ONE:
+ gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[PLAYER_ONE]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
+ gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[PLAYER_ONE]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
+ break;
+ case PLAYER_TWO:
+ gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[PLAYER_TWO]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
+ gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[PLAYER_TWO]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
+ break;
+ case PLAYER_THREE:
+ gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[PLAYER_THREE]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
+ gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[PLAYER_THREE]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
+ break;
+ case PLAYER_FOUR:
+ gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[PLAYER_FOUR]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
+ gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[PLAYER_FOUR]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
break;
}
mtxf_identity(matrix);
diff --git a/src/racing/skybox_and_splitscreen.c b/src/racing/skybox_and_splitscreen.c
index bdd56833a..d48899662 100644
--- a/src/racing/skybox_and_splitscreen.c
+++ b/src/racing/skybox_and_splitscreen.c
@@ -766,7 +766,7 @@ void func_802A5760(void) {
}
}
-void func_802A59A4(void) {
+void render_player_one_1p_screen(void) {
Camera *camera = &cameras[0];
UNUSED s32 pad[4];
u16 perspNorm;
@@ -810,23 +810,23 @@ void func_802A59A4(void) {
render_set_position(matrix, 0);
}
render_course_actors(D_800DC5EC);
- func_80058090(0);
+ render_object(RENDER_SCREEN_MODE_1P_PLAYER_ONE);
render_players_on_screen_one();
- func_8029122C(D_800DC5EC, 0);
+ func_8029122C(D_800DC5EC, PLAYER_ONE);
func_80021B0C();
func_802A2F34(D_800DC5EC);
- func_80058538(0);
+ render_player_snow_effect(RENDER_SCREEN_MODE_1P_PLAYER_ONE);
func_80058BF4();
if (D_800DC5B8 != 0) {
- func_80058C20(0);
+ func_80058C20(RENDER_SCREEN_MODE_1P_PLAYER_ONE);
}
- func_80093A5C(0);
+ func_80093A5C(RENDER_SCREEN_MODE_1P_PLAYER_ONE);
if (D_800DC5B8 != 0) {
- func_80058DB4(0);
+ render_hud(RENDER_SCREEN_MODE_1P_PLAYER_ONE);
}
}
-void func_802A5CB4(void) {
+void render_player_one_2p_screen_vertical(void) {
Camera *camera = &cameras[0];
UNUSED s32 pad[2];
u16 perspNorm;
@@ -866,24 +866,24 @@ void func_802A5CB4(void) {
render_set_position(matrix, 0);
}
render_course_actors(D_800DC5EC);
- func_80058090(1);
+ render_object(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE);
render_players_on_screen_one();
- func_8029122C(D_800DC5EC, 0);
+ func_8029122C(D_800DC5EC, PLAYER_ONE);
func_80021B0C();
func_802A2F34(D_800DC5EC);
- func_80058538(1);
+ render_player_snow_effect(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE);
func_80058BF4();
if (D_800DC5B8 != 0) {
- func_80058C20(1);
+ func_80058C20(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE);
}
- func_80093A5C(1);
+ func_80093A5C(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE);
if (D_800DC5B8 != 0) {
- func_80058DB4(1);
+ render_hud(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE);
}
D_8015F788 += 1;
}
-void func_802A5FAC(void) {
+void render_player_two_2p_screen_vertical(void) {
Camera *camera = &cameras[1];
UNUSED s32 pad[2];
u16 perspNorm;
@@ -920,24 +920,24 @@ void func_802A5FAC(void) {
render_set_position(matrix, 0);
}
render_course_actors(D_800DC5F0);
- func_80058090(2);
+ render_object(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO);
render_players_on_screen_two();
- func_8029122C(D_800DC5F0, 1);
+ func_8029122C(D_800DC5F0, PLAYER_TWO);
func_80021C78();
func_802A2F34(D_800DC5F0);
func_80058BF4();
- func_80058538(2);
+ render_player_snow_effect(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO);
if (D_800DC5B8 != 0) {
- func_80058C20(2);
+ func_80058C20(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO);
}
- func_80093A5C(2);
+ func_80093A5C(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO);
if (D_800DC5B8 != 0) {
- func_80058DB4(2);
+ render_hud(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO);
}
D_8015F788 += 1;
}
-void func_802A62A4(void) {
+void render_player_one_2p_screen_horizontal(void) {
Camera *camera = &cameras[0];
UNUSED s32 pad[2];
u16 perspNorm;
@@ -978,24 +978,24 @@ void func_802A62A4(void) {
render_set_position(matrix, 0);
}
render_course_actors(D_800DC5EC);
- func_80058090(3);
+ render_object(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE);
render_players_on_screen_one();
- func_8029122C(D_800DC5EC, 0);
+ func_8029122C(D_800DC5EC, PLAYER_ONE);
func_80021B0C();
func_802A2F34(D_800DC5EC);
- func_80058538(3);
+ render_player_snow_effect(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE);
func_80058BF4();
if (D_800DC5B8 != 0) {
- func_80058C20(3);
+ func_80058C20(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE);
}
- func_80093A5C(3);
+ func_80093A5C(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE);
if (D_800DC5B8 != 0) {
- func_80058DB4(3);
+ render_hud(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE);
}
D_8015F788 += 1;
}
-void func_802A65B8(void) {
+void render_player_two_2p_screen_horizontal(void) {
Camera *camera = &cameras[1];
UNUSED s32 pad[2];
u16 perspNorm;
@@ -1035,24 +1035,24 @@ void func_802A65B8(void) {
render_set_position(matrix, 0);
}
render_course_actors(D_800DC5F0);
- func_80058090(4);
+ render_object(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO);
render_players_on_screen_two();
- func_8029122C(D_800DC5F0, 1);
+ func_8029122C(D_800DC5F0, PLAYER_TWO);
func_80021C78();
func_802A2F34(D_800DC5F0);
- func_80058538(4);
+ render_player_snow_effect(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO);
func_80058BF4();
if (D_800DC5B8 != 0) {
- func_80058C20(4);
+ func_80058C20(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO);
}
- func_80093A5C(4);
+ func_80093A5C(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO);
if (D_800DC5B8 != 0) {
- func_80058DB4(4);
+ render_hud(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO);
}
D_8015F788 += 1;
}
-void func_802A68CC(void) {
+void render_player_one_3p_4p_screen(void) {
Camera *camera = camera1;
UNUSED s32 pad[2];
u16 perspNorm;
@@ -1089,24 +1089,24 @@ void func_802A68CC(void) {
render_set_position(matrix, 0);
}
render_course_actors(D_800DC5EC);
- func_80058090(8);
+ render_object(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE);
render_players_on_screen_one();
- func_8029122C(D_800DC5EC, 0);
+ func_8029122C(D_800DC5EC, PLAYER_ONE);
func_80021B0C();
func_802A2F34(D_800DC5EC);
- func_80058538(8);
+ render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE);
func_80058BF4();
if (D_800DC5B8 != 0) {
- func_80058C20(8);
+ func_80058C20(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE);
}
- func_80093A5C(8);
+ func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE);
if (D_800DC5B8 != 0) {
- func_80058DB4(8);
+ render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE);
}
D_8015F788 += 1;
}
-void func_802A6BB0(void) {
+void render_player_two_3p_4p_screen(void) {
Camera *camera = camera2;
UNUSED s32 pad[2];
u16 perspNorm;
@@ -1143,24 +1143,24 @@ void func_802A6BB0(void) {
render_set_position(matrix, 0);
}
render_course_actors(D_800DC5F0);
- func_80058090(9);
+ render_object(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO);
render_players_on_screen_two();
- func_8029122C(D_800DC5F0, 1);
+ func_8029122C(D_800DC5F0, PLAYER_TWO);
func_80021C78();
func_802A2F34(D_800DC5F0);
- func_80058538(9);
+ render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO);
func_80058BF4();
if (D_800DC5B8 != 0) {
- func_80058C20(9);
+ func_80058C20(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO);
}
- func_80093A5C(9);
+ func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO);
if (D_800DC5B8 != 0) {
- func_80058DB4(9);
+ render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO);
}
D_8015F788 += 1;
}
-void func_802A6E94(void) {
+void render_player_three_3p_4p_screen(void) {
Camera *camera = camera3;
UNUSED s32 pad[2];
u16 perspNorm;
@@ -1198,24 +1198,24 @@ void func_802A6E94(void) {
render_set_position(matrix, 0);
}
render_course_actors(D_800DC5F4);
- func_80058090(10);
+ render_object(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE);
render_players_on_screen_three();
- func_8029122C(D_800DC5F4, 2);
+ func_8029122C(D_800DC5F4, PLAYER_THREE);
func_80021D40();
func_802A2F34(D_800DC5F4);
- func_80058538(10);
+ render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE);
func_80058BF4();
if (D_800DC5B8 != 0) {
- func_80058C20(10);
+ func_80058C20(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE);
}
- func_80093A5C(10);
+ func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE);
if (D_800DC5B8 != 0) {
- func_80058DB4(10);
+ render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE);
}
D_8015F788 += 1;
}
-void func_802A7178(void) {
+void render_player_four_3p_4p_screen(void) {
Camera *camera = camera4;
UNUSED s32 pad[2];
u16 perspNorm;
@@ -1227,9 +1227,9 @@ void func_802A7178(void) {
func_802A5760();
if (gPlayerCountSelection1 == 3) {
- func_80093A5C(11);
+ func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR);
if (D_800DC5B8 != 0) {
- func_80058DB4(11);
+ render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR);
}
D_8015F788 += 1;
return;
@@ -1261,19 +1261,19 @@ void func_802A7178(void) {
render_set_position(matrix, 0);
}
render_course_actors(D_800DC5F8);
- func_80058090(11);
+ render_object(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR);
render_players_on_screen_four();
- func_8029122C(D_800DC5F8, 3);
+ func_8029122C(D_800DC5F8, PLAYER_FOUR);
func_80021DA8();
func_802A2F34(D_800DC5F8);
- func_80058538(11);
+ render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR);
func_80058BF4();
if (D_800DC5B8 != 0) {
- func_80058C20(11);
+ func_80058C20(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR);
}
- func_80093A5C(0xB);
+ func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR);
if (D_800DC5B8 != 0) {
- func_80058DB4(11);
+ render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR);
}
D_8015F788 += 1;
}
diff --git a/src/racing/skybox_and_splitscreen.h b/src/racing/skybox_and_splitscreen.h
index c3faffc11..ec2d7d8b3 100644
--- a/src/racing/skybox_and_splitscreen.h
+++ b/src/racing/skybox_and_splitscreen.h
@@ -40,15 +40,15 @@ void func_802A54A8(void);
void func_802A5590(void);
void func_802A5678(void);
void func_802A5760(void);
-void func_802A59A4(void);
-void func_802A5CB4(void);
-void func_802A5FAC(void);
-void func_802A62A4(void);
-void func_802A65B8(void);
-void func_802A68CC(void);
-void func_802A6BB0(void);
-void func_802A6E94(void);
-void func_802A7178(void);
+void render_player_one_1p_screen(void);
+void render_player_one_2p_screen_vertical(void);
+void render_player_two_2p_screen_vertical(void);
+void render_player_one_2p_screen_horizontal(void);
+void render_player_two_2p_screen_horizontal(void);
+void render_player_one_3p_4p_screen(void);
+void render_player_two_3p_4p_screen(void);
+void render_player_three_3p_4p_screen(void);
+void render_player_four_3p_4p_screen(void);
void func_802A74BC(void);
void copy_framebuffer(s32, s32, s32, s32, u16*, u16*);
void func_802A7728(void);
diff --git a/src/hud_renderer.c b/src/render_objects.c
index 021ab3792..8696dc912 100644
--- a/src/hud_renderer.c
+++ b/src/render_objects.c
@@ -1,5 +1,5 @@
/**
- * @file hud_renderer.c renders hud elements
+ * @file render_objects.c renders hud elements
* A more suitable name may be print.c
**/
@@ -22,8 +22,8 @@
#include "code_80005FD0.h"
#include "code_80057C60.h"
#include "code_8006E9C0.h"
-#include "hud_renderer.h"
-#include "code_80071F00.h"
+#include "render_objects.h"
+#include "update_objects.h"
#include "code_80091750.h"
#include "collision.h"
#include "main.h"
@@ -167,56 +167,56 @@ s32 func_80043A54(s32 arg0) {
return phi_v1;
}
-void func_80043A84(u8 *texture, s32 width, s32 height) {
+void load_texture_block_rgba32_nomirror(u8 *texture, s32 width, s32 height) {
gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
-void func_80043C28(u8 *texture, s32 width, s32 height) {
+void load_texture_tile_rgba32_nomirror(u8 *texture, s32 width, s32 height) {
gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height,
0, 0, width - 1, height - 1, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
-void func_80043D50(u8 *texture, s32 width, s32 height) {
+void load_texture_block_rgba16_mirror(u8 *texture, s32 width, s32 height) {
gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0,
G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
-void func_80043EF8(u8 *texture, s32 width, s32 height, s32 someMask) {
+void load_texture_block_rgba16_nomirror(u8 *texture, s32 width, s32 height, s32 someMask) {
gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0,
G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, someMask, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
-void func_800440B8(u8 *texture, s32 width, s32 height) {
+void load_texture_tile_rgba16_nomirror(u8 *texture, s32 width, s32 height) {
gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height,
0, 0, width - 1, height - 1, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
-void func_800441E0(u8 *texture, s32 width, s32 height) {
+void load_texture_block_ia16_nomirror(u8 *texture, s32 width, s32 height) {
gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
-void func_80044388(u8 *texture, s32 width, s32 height) {
+void load_texture_tile_ia16_nomirror(u8 *texture, s32 width, s32 height) {
gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height,
0, 0, width - 1, height - 1, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
-void func_800444B0(u8 *texture, s32 width, s32 height) {
+void load_texture_block_ia8_nomirror(u8 *texture, s32 width, s32 height) {
gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
-void func_80044658(u8 *texture, s32 width, s32 height) {
+void load_texture_tile_ia8_nomirror(u8 *texture, s32 width, s32 height) {
gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height,
0, 0, width - 1, height - 1, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
-void func_8004477C(u8 *texture, s32 width, s32 height) {
+void load_texture_block_i8_nomirror(u8 *texture, s32 width, s32 height) {
gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_I, G_IM_SIZ_8b, width, height, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
}
@@ -352,7 +352,7 @@ void func_80045D0C(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) {
u8 *img = texture;
for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) {
- func_80043D50(img, width, height);
+ load_texture_block_rgba16_mirror(img, width, height);
func_80045B2C(&arg1[vertexIndex]);
img += width * height * 2;
vertexIndex += 4;
@@ -366,7 +366,7 @@ void func_80045E10(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) {
u8 *img = texture;
for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) {
- func_80043D50(img, width, height);
+ load_texture_block_rgba16_mirror(img, width, height);
func_80045B2C(&arg1[vertexIndex]);
img += width * (height - 1) * 2;
vertexIndex += 4;
@@ -380,7 +380,7 @@ void func_80045F18(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height, s32
u8 *img = texture;
for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) {
- func_80043EF8(img, width, height, someMask);
+ load_texture_block_rgba16_nomirror(img, width, height, someMask);
func_80045B2C(&arg1[vertexIndex]);
img += width * (height - 1) * 2;
vertexIndex += 4;
@@ -419,7 +419,7 @@ void func_800461A4(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) {
u8 *img = texture;
for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) {
- func_80043A84(img, width, height);
+ load_texture_block_rgba32_nomirror(img, width, height);
func_80045B2C(&arg1[vertexIndex]);
img += width * height * 4;
vertexIndex += 4;
@@ -433,7 +433,7 @@ void func_800462A8(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) {
u8 *img = texture;
for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) {
- func_80043A84(img, width, height);
+ load_texture_block_rgba32_nomirror(img, width, height);
func_80045B2C(&arg1[vertexIndex]);
img += width * (height - 1) * 4;
vertexIndex += 4;
@@ -483,7 +483,7 @@ UNUSED void func_80046634(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *
void func_800466B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx* arg5, s32 arg6, s32 arg7) {
func_80042330(arg0, arg1, arg2, arg3);
gSPDisplayList(gDisplayListHead++, D_0D007948);
- func_80043D50(texture, arg6, arg7);
+ load_texture_block_rgba16_mirror(texture, arg6, arg7);
func_80045B74(arg5);
}
@@ -528,7 +528,7 @@ UNUSED void func_80046954(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *a
void func_80046A00(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6) {
rsp_set_matrix_transformation(arg0, arg1, arg2);
gSPDisplayList(gDisplayListHead++, D_0D007948);
- func_80043D50(texture, arg5, arg6);
+ load_texture_block_rgba16_mirror(texture, arg5, arg6);
func_80045B74(arg4);
}
@@ -578,7 +578,7 @@ UNUSED void func_80046DF4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *
func_800465B8(arg0, arg1, arg2, arg3, arg4, texture, D_0D0060B0, 64, 64, 64, 32);
}
-void func_80046E60(u8 *tlut, u8 *texture, s32 width, s32 height) {
+void load_texture_and_tlut(u8 *tlut, u8 *texture, s32 width, s32 height) {
gSPDisplayList(gDisplayListHead++, D_0D007D78);
gDPLoadTLUT_pal256(gDisplayListHead++, tlut);
rsp_load_texture(texture, width, height);
@@ -755,7 +755,7 @@ UNUSED void func_80048038(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *textu
func_80047068(tlut, texture, arg5, arg6, arg7, arg8, arg9);
}
-void func_800480B4(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) {
+void draw_2d_texture_at(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) {
rsp_set_matrix_transformation(arg0, arg1, arg2);
gSPDisplayList(gDisplayListHead++, D_0D007D78);
draw_rectangle_texture_overlap(tlut, texture, arg5, arg6, arg7, arg8, arg9);
@@ -891,7 +891,7 @@ UNUSED void func_80048BE8(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *textu
}
UNUSED void func_80048C3C(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5) {
- func_800480B4(arg0, arg1, arg2, tlut, texture, arg5, 64, 64, 64, 32);
+ draw_2d_texture_at(arg0, arg1, arg2, tlut, texture, arg5, 64, 64, 64, 32);
}
UNUSED void func_80048C90(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) {
@@ -923,7 +923,7 @@ UNUSED void func_80048ED0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *
}
UNUSED void func_80048F38(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5) {
- func_800480B4(arg0, arg1, arg2, tlut, texture, arg5, 72, 48, 72, 24);
+ draw_2d_texture_at(arg0, arg1, arg2, tlut, texture, arg5, 72, 48, 72, 24);
}
void func_80048F8C(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 height) {
@@ -934,7 +934,7 @@ void func_80048F8C(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he
for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) {
for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) {
- func_800441E0(img, width, height);
+ load_texture_block_ia16_nomirror(img, width, height);
gSPVertex(gDisplayListHead++, &arg1[vertexIndex], 4, 0);
gSPDisplayList(gDisplayListHead++, common_rectangle_display);
img += width * height * 2;
@@ -952,7 +952,7 @@ void func_80049130(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he
for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) {
for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) {
- func_80044388(img, width, height);
+ load_texture_tile_ia16_nomirror(img, width, height);
gSPVertex(gDisplayListHead++, &arg1[vertexIndex], 4, 0);
gSPDisplayList(gDisplayListHead++, common_rectangle_display);
img += width * height * 2;
@@ -970,7 +970,7 @@ void func_800492D4(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he
for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) {
for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) {
- func_800444B0(img, width, height);
+ load_texture_block_ia8_nomirror(img, width, height);
gSPVertex(gDisplayListHead++, &arg1[vertexIndex], 4, 0);
gSPDisplayList(gDisplayListHead++, common_rectangle_display);
img += width * height;
@@ -988,7 +988,7 @@ void func_80049478(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he
for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) {
for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) {
- func_80044658(img, width, height);
+ load_texture_tile_ia8_nomirror(img, width, height);
gSPVertex(gDisplayListHead++, &arg1[vertexIndex], 4, 0);
gSPDisplayList(gDisplayListHead++, common_rectangle_display);
img += width * height;
@@ -1204,7 +1204,7 @@ void func_8004A630(Collision *arg0, Vec3f arg1, f32 arg2) {
void func_8004A6EC(s32 objectIndex, f32 scale) {
Objects *temp_v0;
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) && (is_obj_index_flag_unk_054_active(objectIndex, 0x00800000) != 0)) {
+ if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && (is_obj_flag_status_active(objectIndex, 0x00800000) != 0)) {
temp_v0 = &gObjectList[objectIndex];
D_80183E50[0] = temp_v0->pos[0];
D_80183E50[1] = temp_v0->unk_044 + 0.8;
@@ -1217,7 +1217,7 @@ void func_8004A6EC(s32 objectIndex, f32 scale) {
void func_8004A7AC(s32 objectIndex, f32 arg1) {
Objects *temp_v0;
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000020) != 0) {
temp_v0 = &gObjectList[objectIndex];
D_80183E50[0] = temp_v0->pos[0];
D_80183E50[1] = temp_v0->unk_044 + 0.8;
@@ -1234,7 +1234,7 @@ void func_8004A870(s32 objectIndex, f32 arg1) {
Mat4 sp30;
Objects *temp_v0;
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) && (is_obj_index_flag_unk_054_active(objectIndex, 0x00800000) != 0)) {
+ if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && (is_obj_flag_status_active(objectIndex, 0x00800000) != 0)) {
temp_v0 = &gObjectList[objectIndex];
D_80183E50[0] = temp_v0->pos[0];
D_80183E50[1] = temp_v0->unk_044 + 0.8;
@@ -1336,7 +1336,7 @@ UNUSED void func_8004B180(s32 red, s32 green, s32 blue, s32 alpha) {
gDPSetEnvColor(gDisplayListHead++, red, green, blue, alpha);
}
-void func_8004B1C8(s32 primRed, s32 primGreen, s32 primBlue, s32 envRed, s32 envGreen, s32 envBlue, s32 primAlpha) {
+void set_color_render(s32 primRed, s32 primGreen, s32 primBlue, s32 envRed, s32 envGreen, s32 envBlue, s32 primAlpha) {
gDPSetPrimColor(gDisplayListHead++, 0, 0, primRed, primGreen, primBlue, primAlpha);
gDPSetEnvColor(gDisplayListHead++, envRed, envGreen, envBlue, 0xFF);
}
@@ -1520,8 +1520,8 @@ void func_8004BB3C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, f32 arg4) {
s32 var_t1;
s32 xl;
s32 yl;
- s32 thing0;
- s32 thing1;
+ UNUSED s32 thing0;
+ UNUSED s32 thing1;
var_t0 = (arg2 * 4 * arg4) + 0.5;
var_t1 = (arg3 * 4 * arg4) + 0.5;
@@ -1587,7 +1587,7 @@ void func_8004C268(u32 arg0, u32 arg1, u8 *texture, u32 width, u32 arg4, u32 hei
img2 = texture;
for (i = 0; (u32)i < (arg4 / height); i++) {
- func_80043D50(img2, width, height);
+ load_texture_block_rgba16_mirror(img2, width, height);
func_8004B97C(arg0, arg1, width, height, arg6);
//! @todo fakematch?
#ifdef AVOID_UB
@@ -1605,12 +1605,12 @@ UNUSED void func_8004C354() {
UNUSED void func_8004C35C() {
}
-void func_8004C364(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) {
+void draw_hud_2d_texture(s32 x, s32 y, u32 width, u32 height, u8 *texture) {
gSPDisplayList(gDisplayListHead++, D_0D008108);
gSPDisplayList(gDisplayListHead++, D_0D007EF8);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
- func_80043D50(texture, arg2, arg3);
- func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 0);
+ load_texture_block_rgba16_mirror(texture, width, height);
+ func_8004B97C(x - (width >> 1), y - (height >> 1), width, height, 0);
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -1618,7 +1618,7 @@ void func_8004C450(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) {
gSPDisplayList(gDisplayListHead++, D_0D007F38);
func_8004B614(D_801656C0, D_801656D0, D_801656E0, 0x80, 0x80, 0x80, 0xFF);
- func_80043D50(texture, arg2, arg3);
+ load_texture_block_rgba16_mirror(texture, arg2, arg3);
func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 1);
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -1628,7 +1628,7 @@ UNUSED void func_8004C53C(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) {
gSPDisplayList(gDisplayListHead++, D_0D008108);
gSPDisplayList(gDisplayListHead++, D_0D007EF8);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
- func_800440B8(texture, arg2, arg3);
+ load_texture_tile_rgba16_nomirror(texture, arg2, arg3);
func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 0);
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -1637,7 +1637,7 @@ void func_8004C628(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) {
gSPDisplayList(gDisplayListHead++, D_0D007EF8);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
- func_80043A84(texture, arg2, arg3);
+ load_texture_block_rgba32_nomirror(texture, arg2, arg3);
func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 1);
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -1675,7 +1675,7 @@ void func_8004C6FC(s16 arg0, s16 arg1, s8 *arg2, u32 arg3, u32 arg4) {
if ((s32) var_t2 > 0) {
do {
temp_t5 = arg3 * var_s0 * 4;
- func_80043C28(var_s5, (s32) arg3, (s32) var_s0);
+ 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;
@@ -1691,7 +1691,7 @@ void func_8004C6FC(s16 arg0, s16 arg1, s8 *arg2, u32 arg3, u32 arg4) {
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
#else
-GLOBAL_ASM("asm/non_matchings/hud_renderer/func_8004C6FC.s")
+GLOBAL_ASM("asm/non_matchings/render_objects/func_8004C6FC.s")
#endif
void func_8004C8D4(s16 arg0, s16 arg1) {
@@ -1714,52 +1714,52 @@ void func_8004C9D8(s32 arg0, s32 arg1, s32 arg2, u8 *texture, s32 arg4, s32 arg5
void func_8004CA58(s32 arg0, s32 arg1, f32 arg2, u8 *texture, s32 arg4, s32 arg5) {
gSPDisplayList(gDisplayListHead++, D_0D007F78);
- func_80043D50(texture, arg4, arg5);
+ load_texture_block_rgba16_mirror(texture, arg4, arg5);
func_8004BB3C(arg0, arg1, arg4, arg5, arg2);
}
-void func_8004CAD0(s32 arg0, s32 arg1, u8 *texture) {
- func_8004C364(arg0, arg1, 8, 8, texture);
+void draw_hud_2d_texture_8x8(s32 x, s32 y, u8 *texture) {
+ draw_hud_2d_texture(x, y, 8, 8, texture);
}
-UNUSED void func_8004CB00(s32 arg0, s32 arg1, u8 *texture) {
- func_8004C364(arg0, arg1, 8, 16, texture);
+UNUSED void draw_hud_2d_texture_8x16(s32 x, s32 y, u8 *texture) {
+ draw_hud_2d_texture(x, y, 8, 16, texture);
}
-UNUSED void func_8004CB30(s32 arg0, s32 arg1, u8 *texture) {
- func_8004C364(arg0, arg1, 16, 16, texture);
+UNUSED void draw_hud_2d_texture_16x16(s32 x, s32 y, u8 *texture) {
+ draw_hud_2d_texture(x, y, 16, 16, texture);
}
-void func_8004CB60(s32 arg0, s32 arg1, u8 *texture) {
- func_8004C364(arg0, arg1, 32, 8, texture);
+void draw_hud_2d_texture_32x8(s32 x, s32 y, u8 *texture) {
+ draw_hud_2d_texture(x, y, 32, 8, texture);
}
-void func_8004CB90(s32 arg0, s32 arg1, u8 *texture) {
- func_8004C364(arg0, arg1, 32, 16, texture);
+void draw_hud_2d_texture_32x16(s32 x, s32 y, u8 *texture) {
+ draw_hud_2d_texture(x, y, 32, 16, texture);
}
UNUSED void func_8004CBC0(s32 arg0, s32 arg1, f32 arg2, u8 *texture) {
func_8004CA58(arg0, arg1, arg2, texture, 32, 16);
}
-UNUSED void func_8004CBF4(s32 arg0, s32 arg1, u8 *texture) {
- func_8004C364(arg0, arg1, 32, 32, texture);
+UNUSED void draw_hud_2d_texture_32x32(s32 x, s32 y, u8 *texture) {
+ draw_hud_2d_texture(x, y, 32, 32, texture);
}
UNUSED void func_8004CC24(s32 arg0, s32 arg1, u8 *texture) {
func_8004C628(arg0, arg1, 32, 32, texture);
}
-UNUSED void func_8004CC54(s32 arg0, s32 arg1, u8 *texture) {
- func_8004C364(arg0, arg1, 40, 32, texture);
+UNUSED void draw_hud_2d_texture_40x32(s32 x, s32 y, u8 *texture) {
+ draw_hud_2d_texture(x, y, 40, 32, texture);
}
-UNUSED void func_8004CC84(s32 arg0, s32 arg1, u8 *texture) {
- func_8004C91C(arg0, arg1, texture, 48, 48, 24);
+UNUSED void func_8004CC84(s32 x, s32 y, u8 *texture) {
+ func_8004C91C(x, y, texture, 48, 48, 24);
}
-UNUSED void func_8004CCB4(s32 arg0, s32 arg1, u8 *texture) {
- func_8004C364(arg0, arg1, 64, 32, texture);
+UNUSED void func_8004CCB4(s32 x, s32 y, u8 *texture) {
+ draw_hud_2d_texture(x, y, 64, 32, texture);
}
UNUSED void func_8004CCE4(s32 arg0, s32 arg1, f32 arg2, u8 *texture) {
@@ -1780,7 +1780,7 @@ UNUSED void func_8004CD48(s32 arg0, s32 arg1, UNUSED u8 *texture, s32 width, s32
gSPDisplayList(gDisplayListHead++, D_0D007FE0);
for (i = 0; i < arg4 / height; i++) {
- func_800441E0(img, width, height);
+ load_texture_block_ia16_nomirror(img, width, height);
func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1);
img += width * height * 2;
var_s0 += height;
@@ -1793,7 +1793,7 @@ UNUSED void func_8004CE8C(s32 arg0, s32 arg1, u8 *texture, s32 width, s32 arg4,
u8 *img = texture;
for (i = 0; i < arg4 / height; i++) {
- func_800444B0(img, width, height);
+ load_texture_block_ia8_nomirror(img, width, height);
func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1);
img += width * height;
var_s0 += height;
@@ -1915,7 +1915,7 @@ UNUSED void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s
}
}
#else
-GLOBAL_ASM("asm/non_matchings/hud_renderer/func_8004D654.s")
+GLOBAL_ASM("asm/non_matchings/render_objects/func_8004D654.s")
#endif
void func_8004D7B4(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) {
@@ -1943,7 +1943,7 @@ void func_8004D7B4(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) {
temp_s0 = var_s1;
temp_s5 = (s32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - (arg3 / 2)));
sins(temp_s0);
- func_800441E0(img, arg3, 1);
+ load_texture_block_ia16_nomirror(img, arg3, 1);
func_8004B97C(temp_s5, var_s3, arg3, 1, 1);
var_s1 += temp_s7;
@@ -1978,7 +1978,7 @@ void func_8004D93C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) {
temp_s0 = var_s1;
temp_s6 = (s32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - (var)));
sins(temp_s0);
- func_800444B0(img, arg3, 1);
+ load_texture_block_ia8_nomirror(img, arg3, 1);
func_8004B97C(temp_s6, var_s4, arg3, 1, 1);
var_s1 += temp_s7;
img = &img[arg3];
@@ -2203,7 +2203,7 @@ UNUSED void func_8004E604(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) {
func_8004E240(arg0, arg1, tlut, texture, SCREEN_WIDTH, SCREEN_HEIGHT, 6);
}
-void func_8004E638(s32 playerId) {
+void draw_item_window(s32 playerId) {
s32 objectIndex;
Objects *temp_v1;
hud_player *temp_v0;
@@ -2229,9 +2229,9 @@ void func_8004E6C4(s32 playerId) {
}
}
-void func_8004E78C(s32 playerId) {
- func_8004CB60((s32) playerHUD[playerId].lapX, playerHUD[playerId].lapY + 3, (s32) common_texture_hud_lap);
- func_8004CB90(playerHUD[playerId].lapX + 0x1C, (s32) playerHUD[playerId].lapY, D_800E4570[playerHUD[playerId].alsoLapCount]);
+void draw_simplified_lap_count(s32 playerId) {
+ draw_hud_2d_texture_32x8((s32) playerHUD[playerId].lapX, playerHUD[playerId].lapY + 3, common_texture_hud_lap);
+ draw_hud_2d_texture_32x16(playerHUD[playerId].lapX + 0x1C, (s32) playerHUD[playerId].lapY, gHudLapTextures[playerHUD[playerId].alsoLapCount]);
}
void func_8004E800(s32 playerId) {
@@ -2271,26 +2271,26 @@ void func_8004EB38(s32 playerId) {
temp_s0 = &playerHUD[playerId];
if ((u8) temp_s0->unk_7B != 0) {
- func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000080, (s32) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010);
+ func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000080, common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010);
func_8004F950((s32) temp_s0->lap1CompletionTimeX, (s32) temp_s0->timerY, 0x00000080, (s32) temp_s0->someTimer);
}
if ((u8) temp_s0->unk_7C != 0) {
- func_8004C9D8(temp_s0->lap2CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000050, (s32) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010);
+ func_8004C9D8(temp_s0->lap2CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000050, common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010);
func_8004F950((s32) temp_s0->lap2CompletionTimeX, (s32) temp_s0->timerY, 0x00000050, (s32) temp_s0->someTimer);
}
if ((u8) temp_s0->unk_7E != 0) {
- func_8004C9D8((s32) temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x00000080, (s32) common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8);
- func_8004C9D8(temp_s0->lapAfterImage1X + 0x1C, (s32) temp_s0->lapY, 0x00000080, D_800E4570[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010);
+ func_8004C9D8((s32) temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x00000080, common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8);
+ func_8004C9D8(temp_s0->lapAfterImage1X + 0x1C, (s32) temp_s0->lapY, 0x00000080, gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010);
}
if ((u8) temp_s0->unk_7F != 0) {
- func_8004C9D8((s32) temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x00000050, (s32) common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8);
- func_8004C9D8(temp_s0->lapAfterImage2X + 0x1C, (s32) temp_s0->lapY, 0x00000050, D_800E4570[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010);
+ func_8004C9D8((s32) temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x00000050, common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8);
+ func_8004C9D8(temp_s0->lapAfterImage2X + 0x1C, (s32) temp_s0->lapY, 0x00000050, gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010);
}
}
void func_8004ED40(s32 arg0) {
- func_8004A2F4(playerHUD[arg0].speedometerX, playerHUD[arg0].speedometerY, 0U, 1.0f, D_8018D300, D_8018D308, D_8018D310, 0xFF, (u8* ) common_texture_speedometer, D_0D0064B0, 0x40, 0x60, 0x40, 0x30);
- func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, (u8* ) common_texture_speedometer_needle, &D_0D005FF0, 0x40, 0x20, 0x40, 0x20);
+ func_8004A2F4(playerHUD[arg0].speedometerX, playerHUD[arg0].speedometerY, 0U, 1.0f, D_8018D300, D_8018D308, D_8018D310, 0xFF, common_texture_speedometer, D_0D0064B0, 0x40, 0x60, 0x40, 0x30);
+ func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, common_texture_speedometer_needle, &D_0D005FF0, 0x40, 0x20, 0x40, 0x20);
}
void func_8004EE54(s32 arg0) {
@@ -2327,7 +2327,7 @@ void func_8004F020(s32 arg0) {
var_f0 = var_f0 + 4.0;
break;
}
- func_8004CAD0(var_f2, var_f0, common_texture_minimap_finish_line);
+ draw_hud_2d_texture_8x8(var_f2, var_f0, common_texture_minimap_finish_line);
}
#ifdef NON_MATCHING
@@ -2356,18 +2356,18 @@ void func_8004F168(s32 arg0, s32 playerId, s32 characterId) {
func_8004C450((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot);
//return;
} else {
- func_8004C364((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot);
+ draw_hud_2d_texture((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot);
}
}
}
}
#else
-GLOBAL_ASM("asm/non_matchings/hud_renderer/func_8004F168.s")
+GLOBAL_ASM("asm/non_matchings/render_objects/func_8004F168.s")
#endif
// WTF is up with the gPlayerOne access in this function?
void func_8004F3E4(s32 arg0) {
- Player *player;
+ UNUSED Player *player;
s32 playerId;
s32 idx;
@@ -2426,8 +2426,8 @@ s32 func_8004F674(s32 *arg0, s32 arg1) {
}
void func_8004F6D0(s32 arg0) {
- s32 stackPadding0;
- s32 stackPadding1;
+ UNUSED s32 stackPadding0;
+ UNUSED s32 stackPadding1;
s32 sp24;
sp24 = arg0;
@@ -2458,7 +2458,7 @@ void print_timer(s32 arg0, s32 arg1, s32 arg2) {
gSPDisplayList(gDisplayListHead++, D_0D008108);
gSPDisplayList(gDisplayListHead++, D_0D007EF8);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
- func_80043D50(common_texture_hud_normal_digit, 104, 16);
+ load_texture_block_rgba16_mirror(common_texture_hud_normal_digit, 104, 16);
func_8004F6D0(arg2);
func_8004F774(arg0, arg1);
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
@@ -2477,20 +2477,20 @@ void func_8004F8CC(s32 arg0, s32 arg1) {
void func_8004F950(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
gSPDisplayList(gDisplayListHead++, D_0D007F38);
set_transparency(arg2);
- func_80043D50(common_texture_hud_normal_digit, 104, 16);
+ load_texture_block_rgba16_mirror(common_texture_hud_normal_digit, 104, 16);
func_8004F6D0(arg3);
func_8004F8CC(arg0, arg1);
}
-void func_8004F9CC(s32 arg0, s32 arg1, s32 arg2) {
+void print_timer_rainbow(s32 arg0, s32 arg1, s32 arg2) {
gSPDisplayList(gDisplayListHead++, D_0D007F38);
func_8004B614(D_801656C0, D_801656D0, D_801656E0, 128, 128, 128, 255);
- func_80043D50(common_texture_hud_normal_digit, 104, 16);
+ load_texture_block_rgba16_mirror(common_texture_hud_normal_digit, 104, 16);
func_8004F6D0(arg2);
func_8004F8CC(arg0, arg1);
}
-void func_8004FA78(s32 playerId) {
+void render_hud_timer(s32 playerId) {
s32 var_s0;
if ((gModeSelection != 2) && (gModeSelection != 3)) {
@@ -2500,24 +2500,24 @@ void func_8004FA78(s32 playerId) {
if (D_80165658[var_s0] == 0) {
print_timer(playerHUD[playerId].lapCompletionTimeXs[var_s0], playerHUD[playerId].timerY + (var_s0*0x10), playerHUD[playerId].lapDurations[var_s0]);
} else {
- func_8004F9CC(playerHUD[playerId].lapCompletionTimeXs[var_s0], playerHUD[playerId].timerY + (var_s0*0x10), playerHUD[playerId].lapDurations[var_s0]);
+ print_timer_rainbow(playerHUD[playerId].lapCompletionTimeXs[var_s0], playerHUD[playerId].timerY + (var_s0*0x10), playerHUD[playerId].lapDurations[var_s0]);
}
}
- func_8004CB90(playerHUD[playerId].totalTimeX - 0x13, playerHUD[playerId].timerY + 0x38, common_texture_hud_total_time);
+ draw_hud_2d_texture_32x16(playerHUD[playerId].totalTimeX - 0x13, playerHUD[playerId].timerY + 0x38, common_texture_hud_total_time);
if (D_801657E5 != 0) {
- func_8004F9CC(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, playerHUD[playerId].someTimer);
+ print_timer_rainbow(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, playerHUD[playerId].someTimer);
} else {
print_timer(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, playerHUD[playerId].someTimer);
}
}
} else {
if (playerHUD[playerId].blinkTimer == 0) {
- func_8004CB90(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_time);
+ draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_time);
print_timer(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer);
} else {
- func_8004CB90(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_lap_time);
+ draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_lap_time);
if (D_801657E3 != 0) {
- func_8004F9CC(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer1);
+ print_timer_rainbow(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer1);
} else if (playerHUD[playerId].blinkState == 0) {
print_timer(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer1);
}
@@ -2526,14 +2526,15 @@ void func_8004FA78(s32 playerId) {
}
}
-void func_8004FC78(s16 arg0, s16 arg1, s8 arg2) {
+void draw_lap_count(s16 lapX, s16 lapY, s8 lap) {
gSPDisplayList(gDisplayListHead++, D_0D008108);
gSPDisplayList(gDisplayListHead++, D_0D007EF8);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
- func_80043D50(common_texture_hud_123, 32, 8);
- func_8004BA98(arg0, arg1, 8, 8, arg2 * 8, 0, 0);
- func_8004BA98(arg0 + 8, arg1, 8, 8, 24, 0, 0);
- func_8004BA98(arg0 + 16, arg1, 8, 8, 16, 0, 0);
+ load_texture_block_rgba16_mirror(common_texture_hud_123, 32, 8);
+ // Display current lap. Ex. 1/3
+ func_8004BA98(lapX , lapY, 8, 8, lap * 8, 0, 0); // display the digit
+ func_8004BA98(lapX + 8 , lapY, 8, 8, 24, 0, 0); // display the /
+ func_8004BA98(lapX + 16, lapY, 8, 8, 16, 0, 0); // display the 3
gSPDisplayList(gDisplayListHead++, D_0D007EB8);
}
@@ -2696,7 +2697,7 @@ void func_800508C0(void) {
s32 sp4C;
s32 temp_v1;
s16 var_s0;
- s16 stackPadding;
+ UNUSED s16 stackPadding;
u16 var_s0_2;
u16 var_s1;
u16 var_s2;
@@ -2775,10 +2776,10 @@ void func_800508C0(void) {
}
void func_80050C68(void) {
- s32 stackPadding0;
+ UNUSED s32 stackPadding0;
s32 sp88;
s32 sp84;
- s32 stackPadding1;
+ UNUSED s32 stackPadding1;
s32 var_s1;
for (var_s1 = 0; var_s1 < NUM_BOMB_KARTS_VERSUS; var_s1++) {
@@ -2801,7 +2802,7 @@ void func_80050E34(s32 playerId, s32 arg1) {
s32 objectIndex;
s32 spD0;
s32 spCC;
- s32 stackPadding;
+ UNUSED s32 stackPadding;
s32 spC4;
s32 lapCount;
s32 characterId;
@@ -2833,24 +2834,24 @@ void func_80050E34(s32 playerId, s32 arg1) {
gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_portrait_bomb_kart_and_question_mark);
rsp_load_texture(common_texture_portrait_question_mark, 0x00000020, 0x00000020);
object = &gObjectList[objectIndex];
- object->pos[0] = object->unk_028[0] + ((f32) (spD0 + 0x20));
- object->pos[1] = object->unk_028[1] + ((f32) (spC4 + spCC));
- object->pos[2] = object->unk_028[2];
+ object->pos[0] = object->offset[0] + ((f32) (spD0 + 0x20));
+ object->pos[1] = object->offset[1] + ((f32) (spC4 + spCC));
+ object->pos[2] = object->offset[2];
rsp_set_matrix_transformation(object->pos, object->direction_angle, object->sizeScaling);
gSPDisplayList(gDisplayListHead++, D_0D0069E0);
} else {
gDPLoadTLUT_pal256(gDisplayListHead++, gPortraitTLUTs[characterId]);
gSPDisplayList(gDisplayListHead++, D_0D007DB8);
if (player->effects & STAR_EFFECT) {
- func_8004B614((s32) D_801656C0, (s32) D_801656D0, (s32) D_801656E0, 0x00000080, 0x00000080, 0x00000080, (s32) gObjectList[objectIndex].unk_0A0);
+ func_8004B614((s32) D_801656C0, (s32) D_801656D0, (s32) D_801656E0, 0x00000080, 0x00000080, 0x00000080, (s32) gObjectList[objectIndex].primAlpha);
} else {
- set_transparency((s32) gObjectList[objectIndex].unk_0A0);
+ set_transparency((s32) gObjectList[objectIndex].primAlpha);
}
rsp_load_texture(gPortraitTextures[characterId], 0x00000020, 0x00000020);
object = &gObjectList[objectIndex];
- object->pos[0] = object->unk_028[0] + ((f32) (spD0 + 0x20));
- object->pos[1] = object->unk_028[1] + ((f32) (spC4 + spCC));
- object->pos[2] = object->unk_028[2];
+ object->pos[0] = object->offset[0] + ((f32) (spD0 + 0x20));
+ object->pos[1] = object->offset[1] + ((f32) (spC4 + spCC));
+ object->pos[2] = object->offset[2];
rsp_set_matrix_transformation(object->pos, object->direction_angle, object->sizeScaling);
if (spB8 != 0) {
gSPDisplayList(gDisplayListHead++, D_0D0069F8);
@@ -2875,7 +2876,7 @@ void func_80050E34(s32 playerId, s32 arg1) {
}
}
#else
-GLOBAL_ASM("asm/non_matchings/hud_renderer/func_80050E34.s")
+GLOBAL_ASM("asm/non_matchings/render_objects/func_80050E34.s")
#endif
void func_800514BC(void) {
@@ -2907,14 +2908,14 @@ void func_800514BC(void) {
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
}
-void func_80051638(UNUSED s32 arg0) {
+void render_object_leaf_particle(UNUSED s32 cameraId) {
s32 someIndex;
s32 leafIndex;
Objects *object;
gSPDisplayList(gDisplayListHead++, D_0D0079C8);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH);
- func_80043D50(common_texture_particle_leaf, 0x00000020, 0x00000010);
+ load_texture_block_rgba16_mirror(common_texture_particle_leaf, 0x00000020, 0x00000010);
for(someIndex = 0; someIndex < gLeafParticle_SIZE; someIndex++) {
leafIndex = gLeafParticle[someIndex];
if (leafIndex != -1) {
@@ -2929,7 +2930,7 @@ void func_80051638(UNUSED s32 arg0) {
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
}
-void func_800517C8(void) {
+void render_object_snowflakes_particles(void) {
s32 someIndex;
s32 snowflakeIndex;
@@ -2947,8 +2948,8 @@ void func_800517C8(void) {
}
void func_800518F8(s32 objectIndex, s16 arg1, s16 arg2) {
- s32 pad[1];
- if (gObjectList[objectIndex].unk_054 & 0x10) {
+ UNUSED s32 pad[1];
+ if (gObjectList[objectIndex].status & 0x10) {
if (D_8018D228 != gObjectList[objectIndex].unk_0D5) {
D_8018D228 = gObjectList[objectIndex].unk_0D5;
func_80044DA0(gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].textureWidth, gObjectList[objectIndex].textureHeight);
@@ -2960,12 +2961,12 @@ void func_800518F8(s32 objectIndex, s16 arg1, s16 arg2) {
}
void func_800519D4(s32 objectIndex, s16 arg1, s16 arg2) {
- if (gObjectList[objectIndex].unk_054 & 0x10) {
+ if (gObjectList[objectIndex].status & 0x10) {
if (D_8018D228 != gObjectList[objectIndex].unk_0D5) {
D_8018D228 = gObjectList[objectIndex].unk_0D5;
func_80044DA0(gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].textureWidth, gObjectList[objectIndex].textureHeight);
}
- func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, gObjectList[objectIndex].unk_0A0);
+ func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, gObjectList[objectIndex].primAlpha);
func_80042330(arg1, arg2, 0U, gObjectList[objectIndex].sizeScaling);
gSPVertex(gDisplayListHead++, gObjectList[objectIndex].vertex, 4, 0);
gSPDisplayList(gDisplayListHead++, common_rectangle_display);
@@ -3092,14 +3093,14 @@ void func_800520C0(s32 arg0) {
}
}
-void func_8005217C(s32 arg0) {
+void func_8005217C(UNUSED s32 arg0) {
Objects *object;
s32 temp_a3;
temp_a3 = indexObjectList2[0];
object = &gObjectList[temp_a3];
if (object->state >= 2) {
- if (is_obj_index_flag_unk_054_active(temp_a3, 0x00000010) != 0) {
+ if (is_obj_flag_status_active(temp_a3, 0x00000010) != 0) {
rsp_set_matrix_transformation(object->pos, object->direction_angle, object->sizeScaling);
func_800520C0(temp_a3);
@@ -3127,29 +3128,29 @@ void func_800523B8(s32 objectIndex, s32 arg1, u32 arg2) {
object = &gObjectList[objectIndex];
object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], camera->pos);
- func_800484BC(object->pos, object->orientation, object->sizeScaling, object->unk_0A0, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, 0x00000030, 0x00000028, 0x00000030, 0x00000028);
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) && (arg2 < 0x15F91U)) {
+ func_800484BC(object->pos, object->orientation, object->sizeScaling, object->primAlpha, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, 0x00000030, 0x00000028, 0x00000030, 0x00000028);
+ if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && (arg2 < 0x15F91U)) {
func_8004A630(&D_8018C830, object->pos, 0.4f);
}
}
-void func_800524B4(s32 arg0) {
+void render_object_boos(s32 arg0) {
u32 temp_s2;
s32 someIndex;
s32 objectIndex;
- for (someIndex = 0; someIndex < 10; someIndex++) {
+ for (someIndex = 0; someIndex < NUM_BOOS; someIndex++) {
objectIndex = indexObjectList3[someIndex];
if (gObjectList[objectIndex].state >= 2) {
temp_s2 = func_8008A364(objectIndex, arg0, 0x4000U, 0x00000320);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_800523B8(objectIndex, arg0, temp_s2);
}
}
}
}
-void func_80052590(s32 cameraId) {
+void render_object_bat(s32 cameraId) {
s32 var_s2;
s32 objectIndex;
Camera *temp_s7;
@@ -3184,13 +3185,13 @@ void func_80052590(s32 cameraId) {
gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF);
}
-void func_800527D8(s32 cameraId) {
+void render_object_trash_bin(s32 cameraId) {
s32 objectIndex;
Objects *object;
objectIndex = indexObjectList1[1];
func_8008A364(objectIndex, cameraId, 0x5555U, 0x00000320);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
object = &gObjectList[objectIndex];
if (object->state >= 2) {
func_80043220(object->pos, object->orientation, object->sizeScaling, object->model);
@@ -3226,11 +3227,11 @@ void func_800528EC(s32 arg0) {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH);
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
- func_800441E0(d_course_sherbet_land_ice, 0x00000020, 0x00000020);
+ load_texture_block_ia16_nomirror(d_course_sherbet_land_ice, 0x00000020, 0x00000020);
if (gPlayerCountSelection1 < 3) {
for (var_s3 = 0; var_s3 < gObjectParticle2_SIZE; var_s3++) {
objectIndex = gObjectParticle2[var_s3];
- if (objectIndex != -1) {
+ if (objectIndex != NULL_OBJECT_ID) {
object = &gObjectList[objectIndex];
if (object->state > 0) {
rsp_set_matrix_transformation(object->pos, D_80183E80, object->sizeScaling);
@@ -3242,7 +3243,7 @@ void func_800528EC(s32 arg0) {
} else {
for (var_s3 = 0; var_s3 < gObjectParticle2_SIZE; var_s3++) {
objectIndex = gObjectParticle2[var_s3];
- if (objectIndex != -1) {
+ if (objectIndex != NULL_OBJECT_ID) {
object = &gObjectList[objectIndex];
if ((object->state > 0) && (arg0 == object->unk_084[7]) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) {
rsp_set_matrix_transformation(object->pos, D_80183E80, object->sizeScaling);
@@ -3257,7 +3258,7 @@ void func_800528EC(s32 arg0) {
gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF);
}
-void func_80052C60(s32 arg0) {
+void render_ice_block(s32 arg0) {
s32 playerId;
s32 objectIndex;
@@ -3269,7 +3270,7 @@ void func_80052C60(s32 arg0) {
for (playerId = 0; playerId < gPlayerCountSelection1; playerId++) {
objectIndex = gIndexLakituList[playerId];
if (objectIndex) {}
- if (func_80072320(objectIndex, 4) != 0) {
+ if (func_80072320(objectIndex, 4) != FALSE) {
func_8005285C(playerId);
}
func_80072320(objectIndex, 0x00000010);
@@ -3291,7 +3292,7 @@ void func_80052D70(s32 playerId) {
}
}
-void func_80052E30(s32 arg0) {
+void func_80052E30(UNUSED s32 arg0) {
s32 var_s0;
D_800E4620.l[0].l.dir[0] = D_80165840[0];
@@ -3309,22 +3310,22 @@ void func_80052E30(s32 arg0) {
}
}
-void func_80052F20(s32 cameraId) {
- s32 stackPadding[2];
+void render_object_snowmans_list_2(s32 cameraId) {
+ UNUSED s32 stackPadding[2];
Camera *sp44;
s32 someIndex;
s32 objectIndex;
Objects *object;
sp44 = &camera1[cameraId];
- func_80046E60(d_course_frappe_snowland_snow_tlut, d_course_frappe_snowland_snow, 0x00000020, 0x00000020);
+ load_texture_and_tlut(d_course_frappe_snowland_snow_tlut, d_course_frappe_snowland_snow, 0x00000020, 0x00000020);
for (someIndex = 0; someIndex < gObjectParticle2_SIZE; someIndex++) {
objectIndex = gObjectParticle2[someIndex];
- if (objectIndex != -1) {
+ if (objectIndex != NULL_OBJECT_ID) {
object = &gObjectList[objectIndex];
if (object->state > 0) {
func_8008A364(objectIndex, cameraId, 0x2AABU, 0x000001F4);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], sp44->pos);
rsp_set_matrix_gObjectList(objectIndex);
gSPDisplayList(gDisplayListHead++, D_0D0069E0);
@@ -3335,39 +3336,39 @@ void func_80052F20(s32 cameraId) {
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
}
-void func_8005309C(s32 cameraId) {
+void render_object_snowmans_list_1(s32 cameraId) {
s32 var_s4;
s32 objectIndex;
Camera *camera;
camera = &camera1[cameraId];
- for (var_s4 = 0; var_s4 < 0x13; var_s4++) {
+ for (var_s4 = 0; var_s4 < NUM_SNOWMEN; var_s4++) {
objectIndex = indexObjectList1[var_s4];
if (gObjectList[objectIndex].state >= 2) {
func_8008A364(objectIndex, cameraId, 0x2AABU, 0x00000258);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
D_80183E80[0] = (s16) gObjectList[objectIndex].orientation[0];
D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos);
D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2];
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000010) != 0) {
- func_800480B4(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
+ if (is_obj_flag_status_active(objectIndex, 0x00000010) != 0) {
+ draw_2d_texture_at(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
}
objectIndex = indexObjectList2[var_s4];
D_80183E80[0] = (s16) gObjectList[objectIndex].orientation[0];
D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2];
- func_800480B4(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
+ draw_2d_texture_at(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
}
}
}
}
-void func_8005327C(s32 arg0) {
- func_8005309C(arg0);
- func_80052F20(arg0);
+void render_object_snowmans(s32 arg0) {
+ render_object_snowmans_list_1(arg0);
+ render_object_snowmans_list_2(arg0);
}
-void func_800532A4(s32 cameraId) {
- s32 stackPadding;
+void render_lakitu(s32 cameraId) {
+ UNUSED s32 stackPadding;
Camera *camera;
f32 var_f0;
f32 var_f2;
@@ -3376,15 +3377,15 @@ void func_800532A4(s32 cameraId) {
objectIndex = gIndexLakituList[cameraId];
camera = &camera1[cameraId];
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000010) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000010) != 0) {
object = &gObjectList[objectIndex];
object->orientation[0] = 0;
object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], camera->pos);
object->orientation[2] = 0x8000;
if (func_80072354(objectIndex, 2) != 0) {
- func_800480B4(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2);
+ draw_2d_texture_at(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2);
} else {
- func_800485C4(object->pos, object->orientation, object->sizeScaling, (s32) object->unk_0A0, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2);
+ func_800485C4(object->pos, object->orientation, object->sizeScaling, (s32) object->primAlpha, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2);
}
if (gScreenModeSelection == SCREEN_MODE_1P) {
var_f0 = object->pos[0] - D_8018CF14->pos[0];
@@ -3402,7 +3403,7 @@ void func_800532A4(s32 cameraId) {
}
}
-void func_800534A4(s32 arg0) {
+void func_800534A4(UNUSED s32 arg0) {
func_800419F8();
D_800E4638.l[0].l.dir[0] = D_80165840[0];
D_800E4638.l[0].l.dir[1] = D_80165840[1];
@@ -3437,7 +3438,7 @@ void func_800534E8(s32 objectIndex) {
}
}
-void func_800536C8(s32 objectIndex) {
+void render_object_thwomps_model(s32 objectIndex) {
if ((gObjectList[objectIndex].state >= 2) && (func_80072354(objectIndex, 0x00000040) != 0)) {
func_8004A7AC(objectIndex, 1.75f);
rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling);
@@ -3450,33 +3451,34 @@ void func_800536C8(s32 objectIndex) {
}
}
-void func_80053870(s32 cameraId) {
- s32 temp_s1;
- s32 var_s2;
- s32 stackPadding0;
+void render_object_thwomps(s32 cameraId) {
+ s32 objectIndex;
+ s32 i;
+ UNUSED s32 stackPadding0;
s16 minusone, plusone;
Camera *camera;
Objects *object;
camera = &camera1[cameraId];
- if (cameraId == 0) {
- for (var_s2 = 0; var_s2 < gNumActiveThwomps; var_s2++) {
- temp_s1 = indexObjectList1[var_s2];
- set_object_flag_unk_054_false(temp_s1, 0x00070000);
- func_800722CC(temp_s1, 0x00000110);
+ if (cameraId == PLAYER_ONE) {
+ for (i = 0; i < gNumActiveThwomps; i++) {
+ objectIndex = indexObjectList1[i];
+ set_object_flag_status_false(objectIndex, 0x00070000);
+ func_800722CC(objectIndex, 0x00000110);
}
}
- func_800534A4(temp_s1);
- for (var_s2 = 0; var_s2 < gNumActiveThwomps; var_s2++) {
- temp_s1 = indexObjectList1[var_s2];
- minusone = gObjectList[temp_s1].unk_0DF - 1;
- plusone = gObjectList[temp_s1].unk_0DF + 1;
+
+ func_800534A4(objectIndex);
+ for (i = 0; i < gNumActiveThwomps; i++) {
+ objectIndex = indexObjectList1[i];
+ minusone = gObjectList[objectIndex].unk_0DF - 1;
+ plusone = gObjectList[objectIndex].unk_0DF + 1;
if (gGamestate != 9) {
- if ((D_8018CF68[cameraId] >= minusone) && (plusone >= D_8018CF68[cameraId]) && (func_8008A140(temp_s1, camera, 0x8000U) != 0)) {
- func_800536C8(temp_s1);
+ if ((D_8018CF68[cameraId] >= minusone) && (plusone >= D_8018CF68[cameraId]) && (is_object_visible_on_camera(objectIndex, camera, 0x8000U) != 0)) {
+ render_object_thwomps_model(objectIndex);
}
} else {
- func_800536C8(temp_s1);
+ render_object_thwomps_model(objectIndex);
}
}
gSPDisplayList(gDisplayListHead++, D_0D0079C8);
@@ -3486,11 +3488,11 @@ void func_80053870(s32 cameraId) {
gSPLight(gDisplayListHead++, &D_800E4668.a, LIGHT_2);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH);
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
- func_80043D50(d_course_bowsers_castle_thwomp_side, 0x00000020, 0x00000020);
- for (var_s2 = 0; var_s2 < gObjectParticle3_SIZE; var_s2++) {
- temp_s1 = gObjectParticle3[var_s2];
- if (temp_s1 != -1) {
- object = &gObjectList[temp_s1];
+ load_texture_block_rgba16_mirror(d_course_bowsers_castle_thwomp_side, 0x00000020, 0x00000020);
+ for (i = 0; i < gObjectParticle3_SIZE; i++) {
+ objectIndex = gObjectParticle3[i];
+ if (objectIndex != NULL_OBJECT_ID) {
+ object = &gObjectList[objectIndex];
if ((object->state > 0) && (object->unk_0D5 == 3) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) {
rsp_set_matrix_transformation(object->pos, object->orientation, object->sizeScaling);
gSPVertex(gDisplayListHead++, D_0D005C00, 3, 0);
@@ -3502,16 +3504,16 @@ void func_80053870(s32 cameraId) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF);
gSPDisplayList(gDisplayListHead++, D_0D007AE0);
- func_800444B0(D_8018D490, 0x00000020, 0x00000020);
+ load_texture_block_ia8_nomirror(D_8018D490, 0x00000020, 0x00000020);
func_8004B3C8(0);
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;
- for (var_s2 = 0; var_s2 < gObjectParticle2_SIZE; var_s2++) {
- temp_s1 = gObjectParticle2[var_s2];
- if (temp_s1 != -1) {
- object = &gObjectList[temp_s1];
+ for (i = 0; i < gObjectParticle2_SIZE; i++) {
+ objectIndex = gObjectParticle2[i];
+ if (objectIndex != NULL_OBJECT_ID) {
+ object = &gObjectList[objectIndex];
if ((object->state >= 2) && (object->unk_0D5 == 2) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) {
- func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, (s32) object->unk_0A0);
+ func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, (s32) object->primAlpha);
D_80183E80[1] = func_800418AC(object->pos[0], object->pos[2], camera->pos);
func_800431B0(object->pos, D_80183E80, object->sizeScaling, D_0D005AE0);
}
@@ -3526,7 +3528,7 @@ void func_80053D74(s32 objectIndex, UNUSED s32 arg1, s32 vertexIndex) {
temp_v0 = &gObjectList[objectIndex];
D_80183E80[2] = (s16) (temp_v0->unk_084[6] + 0x8000);
rsp_set_matrix_transformation(temp_v0->pos, (u16 *) D_80183E80, temp_v0->sizeScaling);
- func_8004B1C8((s32) temp_v0->unk_084[0], (s32) temp_v0->unk_084[1], (s32) temp_v0->unk_084[2], (s32) temp_v0->unk_084[3], (s32) temp_v0->unk_084[4], (s32) temp_v0->unk_084[5], (s32) temp_v0->unk_0A0);
+ set_color_render((s32) temp_v0->unk_084[0], (s32) temp_v0->unk_084[1], (s32) temp_v0->unk_084[2], (s32) temp_v0->unk_084[3], (s32) temp_v0->unk_084[4], (s32) temp_v0->unk_084[5], (s32) temp_v0->primAlpha);
gSPVertex(gDisplayListHead++, &D_0D0060B0[vertexIndex], 4, 0);
gSPDisplayList(gDisplayListHead++, common_rectangle_display);
}
@@ -3544,27 +3546,27 @@ void func_80053E6C(s32 arg0) {
rsp_load_texture(D_8018D4BC, 0x40, 0x20);
for (var_s1 = 0; var_s1 < D_80165738; var_s1++) {
objectIndex = gObjectParticle3[var_s1];
- if ((objectIndex != -1) && (gObjectList[objectIndex].state >= 2)) {
+ if ((objectIndex != NULL_OBJECT_ID) && (gObjectList[objectIndex].state >= 2)) {
func_80053D74(objectIndex, arg0, 0);
}
}
rsp_load_texture(D_8018D4C0, 0x40, 0x20);
for (var_s1 = 0; var_s1 < D_80165738; var_s1++) {
objectIndex = gObjectParticle3[var_s1];
- if ((objectIndex != -1) && (gObjectList[objectIndex].state >= 2)) {
+ if ((objectIndex != NULL_OBJECT_ID) && (gObjectList[objectIndex].state >= 2)) {
func_80053D74(objectIndex, arg0, 4);
}
}
}
-void func_800540CC(s32 objectIndex, s32 cameraId) {
+void render_object_train_smoke_particle(s32 objectIndex, s32 cameraId) {
Camera *camera;
camera = &camera1[cameraId];
- if (objectIndex != -1) {
+ if (objectIndex != NULL_OBJECT_ID) {
if ((gObjectList[objectIndex].state >= 2) && (gObjectList[objectIndex].unk_0D5 == 1) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) {
- func_8004B1C8((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, 0, 0, 0, (s32) gObjectList[objectIndex].unk_0A0);
+ set_color_render((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, 0, 0, 0, (s32) gObjectList[objectIndex].primAlpha);
D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos);
func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D005AE0);
}
@@ -3572,15 +3574,15 @@ void func_800540CC(s32 objectIndex, s32 cameraId) {
}
// Train smoke?
-void func_800541BC(s32 cameraId) {
- s32 pad;
- s32 j;
+void render_object_train_smoke_particles(s32 cameraId) {
+ UNUSED s32 pad;
+ UNUSED s32 j;
Camera *camera;
s32 i;
camera = &camera1[cameraId];
gSPDisplayList(gDisplayListHead++, D_0D007AE0);
- func_8004477C(D_0D029458, 32, 32);
+ load_texture_block_i8_nomirror(D_0D029458, 32, 32);
func_8004B72C(255, 255, 255, 255, 255, 255, 255);
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;
@@ -3588,38 +3590,38 @@ void func_800541BC(s32 cameraId) {
// Render smoke for any number of trains. Don't know enough about these variables yet.
#ifdef AVOID_UB_WIP
for (j = 0; j < NUM_TRAINS; j++) {
- if ((gTrainList[j].someFlags != 0) && (func_80041980(&gTrainList[j].locomotive.position, camera, 0x4000U) != 0)) {
+ if ((gTrainList[j].someFlags != 0) && (is_particle_on_screen(&gTrainList[j].locomotive.position, camera, 0x4000U) != 0)) {
for (i = 0; i < 128; i++) {
// Need to make a way to increase this array for each train.
- func_800540CC(gObjectParticle2[i], cameraId);
+ render_object_train_smoke_particle(gObjectParticle2[i], cameraId);
}
}
}
#else
- if ((gTrainList[0].someFlags != 0) && (func_80041980(&gTrainList[0].locomotive.position, camera, 0x4000U) != 0)) {
+ if ((gTrainList[0].someFlags != 0) && (is_particle_on_screen(gTrainList[0].locomotive.position, camera, 0x4000U) != 0)) {
for (i = 0; i < gObjectParticle2_SIZE; i++) {
- func_800540CC(gObjectParticle2[i], cameraId);
+ render_object_train_smoke_particle(gObjectParticle2[i], cameraId);
}
}
- if ((gTrainList[1].someFlags != 0) && (func_80041980(&gTrainList[1].locomotive.position, camera, 0x4000U) != 0)) {
+ if ((gTrainList[1].someFlags != 0) && (is_particle_on_screen(gTrainList[1].locomotive.position, camera, 0x4000U) != 0)) {
for (i = 0; i < gObjectParticle3_SIZE; i++) {
- func_800540CC(gObjectParticle3[i], cameraId);
+ render_object_train_smoke_particle(gObjectParticle3[i], cameraId);
}
}
#endif
}
-void func_80054324(s32 objectIndex, s32 cameraId) {
+void render_object_paddle_boat_smoke_particle(s32 objectIndex, s32 cameraId) {
Camera *camera;
camera = &camera1[cameraId];
- if (objectIndex != -1) {
+ if (objectIndex != NULL_OBJECT_ID) {
if ((gObjectList[objectIndex].state >= 2) && (gObjectList[objectIndex].unk_0D5 == 6) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) {
- func_8004B1C8((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, (s32) gObjectList[objectIndex].unk_0A0);
+ set_color_render((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, (s32) gObjectList[objectIndex].primAlpha);
D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos);
func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D005AE0);
}
@@ -3627,31 +3629,31 @@ void func_80054324(s32 objectIndex, s32 cameraId) {
}
// Likely smoke related.
-void func_80054414(s32 cameraId) {
- s32 pad[2];
+void render_object_paddle_boat_smoke_particles(s32 cameraId) {
+ UNUSED s32 pad[2];
Camera *camera;
s32 i;
camera = &camera1[cameraId];
gSPDisplayList(gDisplayListHead++, D_0D007AE0);
- func_8004477C(D_0D029458, 32, 32);
+ load_texture_block_i8_nomirror(D_0D029458, 32, 32);
func_8004B72C(255, 255, 255, 255, 255, 255, 255);
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;
- if ((gFerries[0].someFlags != 0) && (func_80041980(gFerries[0].position, camera, 0x4000U) != 0)) {
+ if ((gPaddleBoats[0].someFlags != 0) && (is_particle_on_screen(gPaddleBoats[0].position, camera, 0x4000U) != 0)) {
for (i = 0; i < gObjectParticle2_SIZE; i++) {
- func_80054324(gObjectParticle2[i], cameraId);
+ render_object_paddle_boat_smoke_particle(gObjectParticle2[i], cameraId);
}
}
- if ((gFerries[1].someFlags != 0) && (func_80041980(gFerries[1].position, camera, 0x4000U) != 0)) {
+ if ((gPaddleBoats[1].someFlags != 0) && (is_particle_on_screen(gPaddleBoats[1].position, camera, 0x4000U) != 0)) {
for (i = 0; i < gObjectParticle3_SIZE; i++) {
- func_80054324(gObjectParticle3[i], cameraId);
+ render_object_paddle_boat_smoke_particle(gObjectParticle3[i], cameraId);
}
}
}
-void func_8005457C(s32 objectIndex, s32 cameraId) {
+void render_object_bowser_flame_particle(s32 objectIndex, s32 cameraId) {
Camera *camera;
Objects *temp_s0;
@@ -3659,28 +3661,28 @@ void func_8005457C(s32 objectIndex, s32 cameraId) {
if (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX) {
temp_s0 = &gObjectList[objectIndex];
if (temp_s0->unk_0D5 == 9) {
- func_8004B72C(255, (s32) temp_s0->type, 0, (s32) temp_s0->unk_0A2, 0, 0, (s32) temp_s0->unk_0A0);
+ func_8004B72C(0xFF, (s32) temp_s0->type, 0, (s32) temp_s0->unk_0A2, 0, 0, (s32) temp_s0->primAlpha);
} else {
- func_8004B138(255, (s32) temp_s0->type, 0, (s32) temp_s0->unk_0A0);
+ func_8004B138(0xFF, (s32) temp_s0->type, 0, (s32) temp_s0->primAlpha);
}
D_80183E80[1] = func_800418AC(temp_s0->pos[0], temp_s0->pos[2], camera->pos);
func_800431B0(temp_s0->pos, D_80183E80, temp_s0->sizeScaling, D_0D005AE0);
}
}
-void func_80054664(s32 cameraId) {
+void render_object_bowser_flame(s32 cameraId) {
s32 var_s0;
s32 objectIndex;
gSPDisplayList(gDisplayListHead++, D_0D007AE0);
- func_8004477C(common_texture_particle_smoke[D_80165598], 0x00000020, 0x00000020);
+ load_texture_block_i8_nomirror(common_texture_particle_smoke[D_80165598], 0x00000020, 0x00000020);
func_8004B414(0, 0, 0, 0x000000FF);
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;
for (var_s0 = 0; var_s0 < gObjectParticle1_SIZE; var_s0++) {
objectIndex = gObjectParticle1[var_s0];
- if ((objectIndex != -1) && (gObjectList[objectIndex].state >= 3)) {
- func_8005457C(objectIndex, cameraId);
+ if ((objectIndex != NULL_OBJECT_ID) && (gObjectList[objectIndex].state >= 3)) {
+ render_object_bowser_flame_particle(objectIndex, cameraId);
}
}
}
@@ -3688,28 +3690,28 @@ void func_80054664(s32 cameraId) {
void func_8005477C(s32 objectIndex, u8 arg1, Vec3f arg2) {
if (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX) {
switch (arg1) { /* irregular */
- case 0:
- func_8004B1C8(0x000000E6, 0x000000FF, 0x000000FF, 0, 0, 0x000000FF, (s32) gObjectList[objectIndex].unk_0A0);
- break;
- case 1:
- func_8004B1C8(0x000000FF, 0x000000FF, 0x00000096, 0x000000FF, 0, 0, (s32) gObjectList[objectIndex].unk_0A0);
- break;
- case 2:
- func_8004B1C8(0x000000FF, 0x000000E6, 0x000000FF, 0x000000FF, 0, 0x00000096, (s32) gObjectList[objectIndex].unk_0A0);
- break;
- case 3:
- func_8004B1C8(0x000000FF, 0x000000FF, 0x0000001E, 0x000000FF, 0, 0, (s32) gObjectList[objectIndex].unk_0A0);
- break;
- default:
- break;
+ case 0:
+ set_color_render(0xE6, 0xFF, 0xFF, 0x00, 0x00, 0xFF, (s32) gObjectList[objectIndex].primAlpha);
+ break;
+ case 1:
+ set_color_render(0xFF, 0xFF, 0x96, 0xFF, 0x00, 0x00, (s32) gObjectList[objectIndex].primAlpha);
+ break;
+ case 2:
+ set_color_render(0xFF, 0xE6, 0xFF, 0xFF, 0x00, 0x96, (s32) gObjectList[objectIndex].primAlpha);
+ break;
+ case 3:
+ set_color_render(0xFF, 0xFF, 0x1E, 0xFF, 0x00, 0x00, (s32) gObjectList[objectIndex].primAlpha);
+ break;
+ default:
+ break;
}
D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], arg2);
func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D005AE0);
}
}
-void func_80054938(s32 cameraId) {
- s32 stackPadding[2];
+void render_object_smoke_particles(s32 cameraId) {
+ UNUSED s32 stackPadding[2];
Camera *sp54;
s32 var_s0;
s32 objectIndex;
@@ -3717,13 +3719,13 @@ void func_80054938(s32 cameraId) {
sp54 = &camera1[cameraId];
gSPDisplayList(gDisplayListHead++, D_0D007AE0);
- func_8004477C(common_texture_particle_smoke[D_80165598], 32, 32);
+ load_texture_block_i8_nomirror(common_texture_particle_smoke[D_80165598], 32, 32);
func_8004B72C(255, 255, 255, 255, 255, 255, 255);
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;
for (var_s0 = 0; var_s0 < gObjectParticle4_SIZE; var_s0++) {
objectIndex = gObjectParticle4[var_s0];
- if (objectIndex != -1) {
+ if (objectIndex != NULL_OBJECT_ID) {
object = &gObjectList[objectIndex];
if (object->state >= 2) {
if (object->unk_0D8 == 3) {
@@ -3731,7 +3733,7 @@ void func_80054938(s32 cameraId) {
} else {
func_8008A364(objectIndex, cameraId, 0x4000U, 0x000001F4);
}
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_8005477C(objectIndex, object->unk_0D8, sp54->pos);
}
}
@@ -3743,7 +3745,7 @@ void func_80054AFC(s32 objectIndex, Vec3f arg1) {
D_80183E80[0] = func_800418E8(gObjectList[objectIndex].pos[2], gObjectList[objectIndex].pos[1], arg1);
D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], arg1);
D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2];
- func_8004B138((s32) gObjectList[objectIndex].unk_084[0], (s32) gObjectList[objectIndex].unk_084[1], (s32) gObjectList[objectIndex].unk_084[2], (s32) gObjectList[objectIndex].unk_0A0);
+ func_8004B138((s32) gObjectList[objectIndex].unk_084[0], (s32) gObjectList[objectIndex].unk_084[1], (s32) gObjectList[objectIndex].unk_084[2], (s32) gObjectList[objectIndex].primAlpha);
rsp_set_matrix_transformation(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling);
gSPVertex(gDisplayListHead++, D_0D005AE0, 4, 0);
gSPDisplayList(gDisplayListHead++, common_rectangle_display);
@@ -3756,7 +3758,7 @@ void func_80054BE8(s32 cameraId) {
camera = &camera1[cameraId];
gSPDisplayList(gDisplayListHead++, D_0D007AE0);
- func_800444B0(D_8018D488, 0x00000020, 0x00000020);
+ load_texture_block_ia8_nomirror(D_8018D488, 0x00000020, 0x00000020);
func_8004B35C(0x000000FF, 0x000000FF, 0, 0x000000FF);
D_80183E80[0] = 0;
for (var_s0 = 0; var_s0 < gObjectParticle3_SIZE; var_s0++) {
@@ -3773,7 +3775,7 @@ void func_80054D00(s32 objectIndex, s32 cameraId) {
camera = &camera1[cameraId];
if (gObjectList[objectIndex].state >= 3) {
func_8008A364(objectIndex, cameraId, 0x2AABU, 0x0000012C);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
D_80183E80[0] = (s16) gObjectList[objectIndex].orientation[0];
D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos);
D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2];
@@ -3784,7 +3786,7 @@ void func_80054D00(s32 objectIndex, s32 cameraId) {
void func_80054E10(s32 objectIndex) {
if (gObjectList[objectIndex].state > 0) {
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00800000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00800000) != 0) {
D_80183E50[0] = gObjectList[objectIndex].pos[0];
D_80183E50[1] = gObjectList[objectIndex].unk_044 + 0.8;
D_80183E50[2] = gObjectList[objectIndex].pos[2];
@@ -3813,13 +3815,13 @@ void func_80054F04(s32 cameraId) {
sp44 = &camera1[cameraId];
gSPDisplayList(gDisplayListHead++, D_0D0079C8);
- func_80043D50(d_course_moo_moo_farm_mole_dirt, 0x00000010, 0x00000010);
+ load_texture_block_rgba16_mirror(d_course_moo_moo_farm_mole_dirt, 0x00000010, 0x00000010);
for (var_s2 = 0; var_s2 < gObjectParticle2_SIZE; var_s2++) {
objectIndex = gObjectParticle2[var_s2];
object = &gObjectList[objectIndex];
if (object->state > 0) {
func_8008A364(objectIndex, cameraId, 0x2AABU, 0x000000C8);
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) {
+ if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) {
object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], sp44->pos);
rsp_set_matrix_gObjectList(objectIndex);
gSPDisplayList(gDisplayListHead++, D_0D006980);
@@ -3829,20 +3831,20 @@ void func_80054F04(s32 cameraId) {
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
}
-void func_800550A4(s32 arg0) {
- s32 var_s0;
+void render_object_moles(s32 cameraId) {
+ s32 i;
- for (var_s0 = 0; var_s0 < 8; var_s0++) {
- func_80054D00(indexObjectList1[var_s0], arg0);
+ for (i = 0; i < NUM_GROUP1_MOLES; i++) {
+ func_80054D00(indexObjectList1[i], cameraId);
}
- for (var_s0 = 0; var_s0 < 11; var_s0++) {
- func_80054D00(indexObjectList2[var_s0], arg0);
+ for (i = 0; i < NUM_GROUP2_MOLES; i++) {
+ func_80054D00(indexObjectList2[i], cameraId);
}
- for (var_s0 = 0; var_s0 < 12; var_s0++) {
- func_80054D00(indexObjectList3[var_s0], arg0);
+ for (i = 0; i < NUM_GROUP3_MOLES; i++) {
+ func_80054D00(indexObjectList3[i], cameraId);
}
- func_80054EB8(arg0);
- func_80054F04(arg0);
+ func_80054EB8(cameraId);
+ func_80054F04(cameraId);
}
void func_80055164(s32 objectIndex) {
@@ -3864,7 +3866,7 @@ void func_80055228(s32 cameraId) {
for (var_s1 = 0; var_s1 < 4; var_s1++) {
temp_s0 = indexObjectList1[var_s1];
func_8008A364(temp_s0, cameraId, 0x4000U, 0x000005DC);
- if (is_obj_index_flag_unk_054_active(temp_s0, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(temp_s0, VISIBLE) != 0) {
func_80055164(temp_s0);
}
}
@@ -3882,42 +3884,42 @@ void func_800552BC(s32 objectIndex) {
}
}
-void func_80055380(s32 arg0) {
+void render_object_seagulls(s32 arg0) {
s32 i;
s32 var_s1;
- for (i = 0; i < 10; i++) {
+ for (i = 0; i < NUM_SEAGULLS; i++) {
var_s1 = indexObjectList2[i];
if (func_8008A364(var_s1, arg0, 0x5555U, 0x000005DC) < 0x9C401) {
D_80165908 = 1;
func_800722A4(var_s1, 2);
}
- if (is_obj_index_flag_unk_054_active(var_s1, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(var_s1, VISIBLE) != 0) {
func_800552BC(var_s1);
}
}
}
-void func_80055458(s32 objectIndex, s32 cameraId) {
+void draw_crabs(s32 objectIndex, s32 cameraId) {
Camera *camera;
if (gObjectList[objectIndex].state >= 2) {
camera = &camera1[cameraId];
func_8004A6EC(objectIndex, 0.5f);
gObjectList[objectIndex].orientation[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos);
- func_800480B4(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, D_0D0060B0, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
+ draw_2d_texture_at(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, D_0D0060B0, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
}
}
-void func_80055528(s32 arg0) {
+void render_object_crabs(s32 arg0) {
s32 someIndex;
s32 test;
- for (someIndex = 0; someIndex < 10; someIndex++) {
+ for (someIndex = 0; someIndex < NUM_CRABS; someIndex++) {
test = indexObjectList1[someIndex];
func_8008A364(test, arg0, 0x2AABU, 0x00000320);
- if (is_obj_index_flag_unk_054_active(test, 0x00040000) != 0) {
- func_80055458(test, arg0);
+ if (is_obj_flag_status_active(test, VISIBLE) != 0) {
+ draw_crabs(test, arg0);
}
}
}
@@ -3929,27 +3931,27 @@ void func_800555BC(s32 objectIndex, s32 cameraId) {
camera = &camera1[cameraId];
func_8004A870(objectIndex, 0.7f);
gObjectList[objectIndex].orientation[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos);
- func_800480B4(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 64, 64, 64, 32);
+ draw_2d_texture_at(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 64, 64, 64, 32);
}
}
-void func_8005568C(s32 arg0) {
+void render_object_hedgehogs(s32 arg0) {
s32 test;
u32 something;
s32 someIndex;
- for (someIndex = 0; someIndex < 15; someIndex++) {
+ for (someIndex = 0; someIndex < NUM_HEDGEHOGS; someIndex++) {
test = indexObjectList2[someIndex];
something = func_8008A364(test, arg0, 0x4000U, 0x000003E8);
- if (is_obj_index_flag_unk_054_active(test, 0x00040000) != 0) {
- set_object_flag_unk_054_true(test, 0x00200000);
+ if (is_obj_flag_status_active(test, VISIBLE) != 0) {
+ set_object_flag_status_true(test, 0x00200000);
if (something < 0x2711U) {
- set_object_flag_unk_054_true(test, 0x00000020);
+ set_object_flag_status_true(test, 0x00000020);
} else {
- set_object_flag_unk_054_false(test, 0x00000020);
+ set_object_flag_status_false(test, 0x00000020);
}
if (something < 0x57E41U) {
- set_object_flag_unk_054_true(test, 0x00400000);
+ set_object_flag_status_true(test, 0x00400000);
}
if (something < 0x52211U) {
func_800555BC(test, arg0);
@@ -3968,7 +3970,7 @@ void func_800557B4(s32 objectIndex, u32 arg1, u32 arg2) {
object = &gObjectList[objectIndex];
if (object->state >= 2) {
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000020) != 0) {
if (func_80072320(objectIndex, 4) != 0) {
if (arg2 >= arg1) {
sp34[0] = object->pos[0];
@@ -3988,8 +3990,8 @@ void func_800557B4(s32 objectIndex, u32 arg1, u32 arg2) {
}
}
-void func_8005592C(s32 cameraId) {
- s32 var_s2;
+void render_object_train_penguins(s32 cameraId) {
+ s32 i;
s32 objectIndex;
s32 temp_s1;
s32 var_a3;
@@ -4003,12 +4005,12 @@ void func_8005592C(s32 cameraId) {
} else {
var_s3 = 0x00015F90;
}
- for (var_s2 = 0; var_s2 < 15; var_s2++) {
- objectIndex = indexObjectList1[var_s2];
+ for (i = 0; i < NUM_PENGUINS; i++) {
+ objectIndex = indexObjectList1[i];
if (gObjectList[objectIndex].state >= 2) {
if (gPlayerCountSelection1 == 1) {
var_s1 = 0x4000;
- if (var_s2 == 0) {
+ if (i == 0) {
var_a3 = 0x000005DC;
} else if (func_80072320(objectIndex, 8) != 0) {
var_a3 = 0x00000320;
@@ -4025,7 +4027,7 @@ void func_8005592C(s32 cameraId) {
}
}
temp_s1 = func_8008A364(objectIndex, cameraId, var_s1, var_a3);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_800557B4(objectIndex, (u32) temp_s1, var_s3);
}
}
@@ -4037,7 +4039,7 @@ void func_80055AB8(s32 objectIndex, s32 cameraId) {
camera = &camera1[cameraId];
if (gObjectList[objectIndex].state >= 2) {
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00100000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00100000) != 0) {
D_80183E40[0] = gObjectList[objectIndex].pos[0];
D_80183E40[1] = gObjectList[objectIndex].pos[1] + 16.0;
D_80183E40[2] = gObjectList[objectIndex].pos[2];
@@ -4053,14 +4055,14 @@ void func_80055AB8(s32 objectIndex, s32 cameraId) {
}
}
-void func_80055C38(s32 cameraId) {
+void render_object_chain_chomps(s32 cameraId) {
s32 var_s1;
s32 objectIndex;
for (var_s1 = 0; var_s1 < 3; var_s1++) {
objectIndex = indexObjectList2[var_s1];
func_8008A1D0(objectIndex, cameraId, 0x000005DC, 0x000009C4);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_80055AB8(objectIndex, cameraId);
}
}
@@ -4076,7 +4078,7 @@ void func_80055CCC(s32 objectIndex, s32 cameraId) {
func_8008A454(objectIndex, cameraId, 0x0000012C);
test = gObjectList[objectIndex].pos[1] - gObjectList[objectIndex].unk_044;
func_8004A6EC(objectIndex, (20.0 / test) + 0.5);
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x00100000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 0x00100000) != 0) {
func_80043328(gObjectList[objectIndex].pos, (u16 *) gObjectList[objectIndex].direction_angle, gObjectList[objectIndex].sizeScaling, d_course_luigi_raceway_dl_F960);
gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_dl_F650);
} else {
@@ -4092,16 +4094,16 @@ void func_80055CCC(s32 objectIndex, s32 cameraId) {
}
}
-void func_80055E68(s32 arg0) {
+void render_object_hot_air_balloon(s32 arg0) {
s32 objectIndex;
objectIndex = indexObjectList1[0];
if (gGamestate != 9) {
func_8008A1D0(objectIndex, arg0, 0x000005DC, 0x00000BB8);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_80055CCC(objectIndex, arg0);
}
} else {
- set_object_flag_unk_054_false(objectIndex, 0x00100000);
+ set_object_flag_status_false(objectIndex, 0x00100000);
func_80055CCC(objectIndex, arg0);
}
}
@@ -4147,7 +4149,7 @@ void func_80056160(s32 arg0) {
func_80055FA0(indexObjectList1[3], arg0);
}
-void func_80056188(s32 cameraId) {
+void render_object_neon(s32 cameraId) {
Camera *camera;
s32 var_s2;
s32 objectIndex;
@@ -4158,9 +4160,9 @@ void func_80056188(s32 cameraId) {
objectIndex = indexObjectList1[var_s2];
if (D_8018E838[cameraId] == 0) {
object = &gObjectList[objectIndex];
- if ((object->state >= 2) && (is_obj_index_flag_unk_054_inactive(objectIndex, 0x00080000) != 0) && (func_8008A140(objectIndex, camera, 0x2AABU) != 0)) {
+ if ((object->state >= 2) && (is_obj_index_flag_status_inactive(objectIndex, 0x00080000) != 0) && (is_object_visible_on_camera(objectIndex, camera, 0x2AABU) != 0)) {
object->orientation[1] = angle_between_object_camera(objectIndex, camera);
- func_800480B4(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, D_0D0060B0, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
+ draw_2d_texture_at(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, D_0D0060B0, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
}
}
}
@@ -4215,7 +4217,7 @@ void func_800563DC(s32 objectIndex, s32 cameraId, s32 arg2) {
void func_8005669C(s32 objectIndex, UNUSED s32 arg1, s32 arg2) {
gSPDisplayList(gDisplayListHead++, D_0D0079E8);
func_8004B310(arg2);
- func_80043D50(D_0D02AA58, 0x00000010, 0x00000010);
+ load_texture_block_rgba16_mirror(D_0D02AA58, 0x00000010, 0x00000010);
D_80183E40[1] = gObjectList[objectIndex].pos[1] - 2.0;
D_80183E40[0] = gObjectList[objectIndex].pos[0] + 2.0;
D_80183E40[2] = gObjectList[objectIndex].pos[2] + 2.0;
@@ -4246,27 +4248,27 @@ void func_800568A0(s32 objectIndex, s32 playerId) {
gSPDisplayList(gDisplayListHead++, D_0D007B98);
}
-void func_800569F4(s32 arg0) {
+void func_800569F4(s32 playerIndex) {
s32 objectIndex;
- objectIndex = D_80183DD8[arg0];
+ objectIndex = gIndexObjectBombKart[playerIndex];
init_object(objectIndex, 0);
- gObjectList[objectIndex].unk_0A0 = 0;
+ gObjectList[objectIndex].primAlpha = 0;
}
-void func_80056A40(s32 arg0, s32 arg1) {
+void func_80056A40(s32 playerIndex, s32 arg1) {
s32 objectIndex;
- objectIndex = D_80183DD8[arg0];
+ objectIndex = gIndexObjectBombKart[playerIndex];
init_object(objectIndex, 0);
- gObjectList[objectIndex].unk_0A0 = (s16) arg1;
+ gObjectList[objectIndex].primAlpha = (s16) arg1;
}
-void func_80056A94(s32 arg0) {
- func_80072428(D_80183DD8[arg0]);
+void func_80056A94(s32 playerIndex) {
+ func_80072428(gIndexObjectBombKart[playerIndex]);
}
-void func_80056AC0(s32 cameraId) {
+void render_object_bomb_kart(s32 cameraId) {
Player *temp_v0;
s32 temp_s1;
s32 temp_s0;
@@ -4274,10 +4276,10 @@ void func_80056AC0(s32 cameraId) {
Objects *temp_v1;
for (payerId = 0; payerId < NUM_BOMB_KARTS_BATTLE; payerId++) {
- temp_s0 = D_80183DD8[payerId];
+ temp_s0 = gIndexObjectBombKart[payerId];
temp_v1 = &gObjectList[temp_s0];
if (temp_v1->state != 0) {
- temp_s1 = temp_v1->unk_0A0;
+ temp_s1 = temp_v1->primAlpha;
temp_v0 = &gPlayerOne[payerId];
temp_v1->pos[0] = temp_v0->pos[0];
temp_v1->pos[1] = temp_v0->pos[1] - 2.0;
@@ -4291,7 +4293,7 @@ void func_80056AC0(s32 cameraId) {
}
void func_80056BF0(s32 bombIndex) {
- s32 stackPadding;
+ UNUSED s32 stackPadding;
u8 thing;
s32 temp_s0;
s32 temp_v0;
@@ -4304,7 +4306,7 @@ void func_80056BF0(s32 bombIndex) {
D_80183E40[0] = sp40.bombPos[0];
D_80183E40[1] = sp40.bombPos[1] + 1.0;
D_80183E40[2] = sp40.bombPos[2];
- func_800480B4(D_80183E40, D_80183E80, 0.25f, common_tlut_bomb, bombFrame, D_0D005AE0, 0x20, 0x20, 0x20, 0x20);
+ draw_2d_texture_at(D_80183E40, D_80183E80, 0.25f, common_tlut_bomb, bombFrame, D_0D005AE0, 0x20, 0x20, 0x20, 0x20);
temp_s0 = D_8018D400;
gSPDisplayList(gDisplayListHead++, D_0D007B00);
func_8004B414(0, 0, 0, 0xFF);
@@ -4320,13 +4322,13 @@ void func_80056BF0(s32 bombIndex) {
}
void func_80056E24(s32 bombIndex, Vec3f arg1) {
- s32 stackPadding[2];
+ UNUSED s32 stackPadding[2];
BombKart sp2C = gBombKarts[bombIndex];
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;
gSPDisplayList(gDisplayListHead++, D_0D0079C8);
- func_80043D50(D_0D02AA58, 0x00000010, 0x00000010);
+ load_texture_block_rgba16_mirror(D_0D02AA58, 0x00000010, 0x00000010);
D_80183E80[1] = func_800418AC(sp2C.wheel1Pos[0], sp2C.wheel1Pos[2], arg1);
func_800431B0(sp2C.wheel1Pos, D_80183E80, 0.15f, common_vtx_rectangle);
D_80183E80[1] = func_800418AC(sp2C.wheel2Pos[0], sp2C.wheel2Pos[2], arg1);
@@ -4353,48 +4355,48 @@ void func_80056FCC(s32 bombIndex) {
}
void func_80057114(s32 cameraId) {
- Camera *temp_s7;
+ Camera *camera;
s32 objectIndex;
s32 temp_s4;
- s32 var_s2;
+ s32 i;
s32 state;
BombKart *var_s1_2;
if (gGamestate == 5) {
cameraId = 0;
}
- temp_s7 = &camera1[cameraId];
- if (cameraId == 0) {
- for (var_s2 = 0; var_s2 < NUM_BOMB_KARTS_VERSUS; var_s2++) {
- objectIndex = D_80183DD8[var_s2];
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00200000) != 0) {
- gBombKarts[var_s2].unk_4A = 0;
+ camera = &camera1[cameraId];
+ if (cameraId == PLAYER_ONE) {
+ for (i = 0; i < NUM_BOMB_KARTS_VERSUS; i++) {
+ objectIndex = gIndexObjectBombKart[i];
+ if (is_obj_flag_status_active(objectIndex, 0x00200000) != 0) {
+ gBombKarts[i].unk_4A = 0;
} else if (gGamestate != 5) {
- gBombKarts[var_s2].unk_4A = 1;
+ gBombKarts[i].unk_4A = 1;
}
- set_object_flag_unk_054_false(objectIndex, 0x00200000);
+ set_object_flag_status_false(objectIndex, 0x00200000);
}
}
- for (var_s2 = 0; var_s2 < NUM_BOMB_KARTS_VERSUS; var_s2++) {
- var_s1_2 = &gBombKarts[var_s2];
+ for (i = 0; i < NUM_BOMB_KARTS_VERSUS; i++) {
+ var_s1_2 = &gBombKarts[i];
// huh???
state = var_s1_2->state;
if (var_s1_2->state != BOMB_STATE_INACTIVE) {
- objectIndex = D_80183DD8[var_s2];
+ objectIndex = gIndexObjectBombKart[i];
gObjectList[objectIndex].pos[0] = var_s1_2->bombPos[0];
gObjectList[objectIndex].pos[1] = var_s1_2->bombPos[1];
gObjectList[objectIndex].pos[2] = var_s1_2->bombPos[2];
temp_s4 = func_8008A364(objectIndex, cameraId, 0x31C4U, 0x000001F4);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
- set_object_flag_unk_054_true(objectIndex, 0x00200000);
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
+ set_object_flag_status_true(objectIndex, 0x00200000);
D_80183E80[0] = 0;
- D_80183E80[1] = func_800418AC(var_s1_2->bombPos[0], var_s1_2->bombPos[2], temp_s7->pos);
+ D_80183E80[1] = func_800418AC(var_s1_2->bombPos[0], var_s1_2->bombPos[2], camera->pos);
D_80183E80[2] = 0x8000;
func_800563DC(objectIndex, cameraId, 0x000000FF);
- func_80056E24(var_s2, temp_s7->pos);
+ func_80056E24(i, camera->pos);
if (((u32) temp_s4 < 0x4E21U) && (state != BOMB_STATE_EXPLODED)) {
- func_80056FCC(var_s2);
+ func_80056FCC(i);
}
}
}
diff --git a/src/hud_renderer.h b/src/render_objects.h
index 20c34f496..8eb66a754 100644
--- a/src/hud_renderer.h
+++ b/src/render_objects.h
@@ -1,5 +1,5 @@
-#ifndef hud_renderer_H
-#define hud_renderer_H
+#ifndef RENDER_OBJECTS_H
+#define RENDER_OBJECTS_H
#include "common_structs.h"
#include "main.h"
@@ -22,17 +22,17 @@ void func_800437F8(s32, s32, u16, f32, Vtx*, s32);
void func_800438C4(s32, s32, u16, f32, Vtx*, s32);
void func_8004398C(s32, s32, u16, f32, Vtx*, s32);
s32 func_80043A54(s32);
-void func_80043A84(u8*, s32, s32);
-void func_80043C28(u8*, s32, s32);
-void func_80043D50(u8*, s32, s32);
-void func_80043EF8(u8*, s32, s32, s32);
-
-void func_800440B8(u8*, s32, s32);
-void func_800441E0(u8*, s32, s32);
-void func_80044388(u8*, s32, s32);
-void func_800444B0(u8*, s32, s32);
-void func_80044658(u8*, s32, s32);
-void func_8004477C(u8*, s32, s32);
+void load_texture_block_rgba32_nomirror(u8*, s32, s32);
+void load_texture_tile_rgba32_nomirror(u8*, s32, s32);
+void load_texture_block_rgba16_mirror(u8*, s32, s32);
+void load_texture_block_rgba16_nomirror(u8*, s32, s32, s32);
+
+void load_texture_tile_rgba16_nomirror(u8*, s32, s32);
+void load_texture_block_ia16_nomirror(u8*, s32, s32);
+void load_texture_tile_ia16_nomirror(u8*, s32, s32);
+void load_texture_block_ia8_nomirror(u8*, s32, s32);
+void load_texture_tile_ia8_nomirror(u8*, s32, s32);
+void load_texture_block_i8_nomirror(u8*, s32, s32);
void func_80044AB8(u8*, s32, s32);
void func_80044BF8(u8*, s32, s32);
@@ -74,7 +74,7 @@ void func_80046CDC(s32, s32, u16, f32, u8*);
void func_80046D40(Vec3f, Vec3su, f32, u8*);
void func_80046D90(s32, s32, u16, f32, u8*);
void func_80046DF4(s32, s32, u16, f32, s32, u8*);
-void func_80046E60(u8*, u8*, s32, s32);
+void load_texture_and_tlut(u8*, u8*, s32, s32);
void func_80046F60(u8*, u8*, s32, s32, s32);
void func_80047068(u8*, u8*, Vtx*, s32, s32, s32, s32);
@@ -98,7 +98,7 @@ void func_80047F40(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32);
void func_80047FBC(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32);
void func_80048038(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32);
-void func_800480B4(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32);
+void draw_2d_texture_at(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32);
void func_80048130(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32, s32);
void func_800481B4(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32);
void func_80048228(Vec3f, Vec3su, f32, s32, u8*, u8*, Vtx*, s32, s32, s32, s32);
@@ -189,7 +189,7 @@ void func_8004B02C(void);
void func_8004B05C(u8*);
void func_8004B138(s32, s32, s32, s32);
void func_8004B180(s32, s32, s32, s32);
-void func_8004B1C8(s32, s32, s32, s32, s32, s32, s32);
+void set_color_render(s32, s32, s32, s32, s32, s32, s32);
void func_8004B254(s32, s32, s32);
void set_transparency(s32);
void func_8004B310(s32);
@@ -214,7 +214,7 @@ void func_8004C024(s16, s16, s16, u16, u16, u16, u16);
void func_8004C148(s16, s16, s16, u16, u16, u16, u16);
void func_8004C354(void);
void func_8004C35C(void);
-void func_8004C364(s32, s32, u32, u32, u8*);
+void draw_hud_2d_texture(s32, s32, u32, u32, u8*);
void func_8004C450(s32, s32, u32, u32, u8*);
void func_8004C53C(s32, s32, u32, u32, u8*);
void func_8004C628(s32, s32, u32, u32, u8*);
@@ -222,15 +222,15 @@ void func_8004C8D4(s16, s16);
void func_8004C91C(s32, s32, u8*, s32, s32, s32);
void func_8004C9D8(s32, s32, s32, u8*, s32, s32, s32, s32);
void func_8004CA58(s32, s32, f32, u8*, s32, s32);
-void func_8004CAD0(s32, s32, u8*);
-void func_8004CB00(s32, s32, u8*);
-void func_8004CB30(s32, s32, u8*);
-void func_8004CB60(s32, s32, u8*);
-void func_8004CB90(s32, s32, u8*);
+void draw_hud_2d_texture_8x8(s32, s32, u8*);
+void draw_hud_2d_texture_8x16(s32, s32, u8*);
+void draw_hud_2d_texture_16x16(s32, s32, u8*);
+void draw_hud_2d_texture_32x8(s32, s32, u8*);
+void draw_hud_2d_texture_32x16(s32, s32, u8*);
void func_8004CBC0(s32, s32, f32, u8*);
-void func_8004CBF4(s32, s32, u8*);
+void draw_hud_2d_texture_32x32(s32, s32, u8*);
void func_8004CC24(s32, s32, u8*);
-void func_8004CC54(s32, s32, u8*);
+void draw_hud_2d_texture_40x32(s32, s32, u8*);
void func_8004CC84(s32, s32, u8*);
void func_8004CCB4(s32, s32, u8*);
void func_8004CCE4(s32, s32, f32, u8*);
@@ -282,9 +282,9 @@ void func_8004E568(s32, s32, u8*, u8*);
void func_8004E59C(s32, s32, s32, u8*, u8*);
void func_8004E5D8(s32, s32, u8*, u8*);
void func_8004E604(s32, s32, u8*, u8*);
-void func_8004E638(s32);
+void draw_item_window(s32);
void func_8004E6C4(s32);
-void func_8004E78C(s32);
+void draw_simplified_lap_count(s32);
void func_8004E800(s32);
void func_8004E998(s32);
void func_8004EB30(s32);
@@ -300,9 +300,9 @@ void func_8004F3E4(s32);
s32 func_8004F674(s32*, s32);
void print_timer(s32, s32, s32);
void func_8004F950(s32, s32, s32, s32);
-void func_8004F9CC(s32, s32, s32);
-void func_8004FA78(s32);
-void func_8004FC78(s16, s16, s8);
+void print_timer_rainbow(s32, s32, s32);
+void render_hud_timer(s32);
+void draw_lap_count(s16, s16, s8);
void func_8004FDB4(f32, f32, s16, s16, s16, s32, s32, s32, s32);
void func_80050320(void);
@@ -313,8 +313,8 @@ void func_80050C68(void);
void func_80050E34(s32, s32);
void func_800514BC(void);
-void func_80051638(s32);
-void func_800517C8(void);
+void render_object_leaf_particle(s32);
+void render_object_snowflakes_particles(void);
void func_800518F8(s32, s16, s16);
void func_800519D4(s32, s16, s16);
void func_80051ABC(s16, s32);
@@ -328,35 +328,34 @@ void func_80052080(void);
void func_800520C0(s32);
void func_8005217C(s32);
void func_800523B8(s32, s32, u32);
-void func_800524B4(s32);
-void func_800524B4(s32);
-void func_80052590(s32);
-void func_800527D8(s32);
+void render_object_boos(s32);
+void render_object_bat(s32);
+void render_object_trash_bin(s32);
void func_8005285C(s32);
void func_800528EC(s32);
-void func_80052C60(s32);
+void render_ice_block(s32);
void func_80052D70(s32);
void func_80052E30(s32);
-void func_80052F20(s32);
+void render_object_snowmans_list_2(s32);
-void func_8005309C(s32);
-void func_8005327C(s32);
-void func_800532A4(s32);
+void render_object_snowmans_list_1(s32);
+void render_object_snowmans(s32);
+void render_lakitu(s32);
void func_800534A4(s32);
void func_800534E8(s32);
-void func_800536C8(s32);
-void func_80053870(s32);
+void render_object_thwomps_model(s32);
+void render_object_thwomps(s32);
void func_80053D74(s32, s32, s32);
void func_80053E6C(s32);
-void func_800540CC(s32, s32);
-void func_800541BC(s32);
-void func_80054324(s32, s32);
-void func_80054414(s32);
-void func_8005457C(s32, s32);
-void func_80054664(s32);
+void render_object_train_smoke_particle(s32, s32);
+void render_object_train_smoke_particles(s32);
+void render_object_paddle_boat_smoke_particle(s32, s32);
+void render_object_paddle_boat_smoke_particles(s32);
+void render_object_bowser_flame_particle(s32, s32);
+void render_object_bowser_flame(s32);
void func_8005477C(s32, u8, Vec3f);
-void func_80054938(s32);
+void render_object_smoke_particles(s32);
void func_80054AFC(s32, Vec3f);
void func_80054BE8(s32);
void func_80054D00(s32, s32);
@@ -364,28 +363,28 @@ void func_80054E10(s32);
void func_80054EB8(s32);
void func_80054F04(s32);
-void func_800550A4(s32);
+void render_object_moles(s32);
void func_80055164(s32);
void func_80055228(s32);
void func_800552BC(s32);
-void func_80055380(s32);
-void func_80055458(s32, s32);
-void func_80055528(s32);
+void render_object_seagulls(s32);
+void draw_crabs(s32, s32);
+void render_object_crabs(s32);
void func_800555BC(s32, s32);
-void func_8005568C(s32);
+void render_object_hedgehogs(s32);
void func_800557AC(void);
void func_800557B4(s32, u32, u32);
-void func_8005592C(s32);
+void render_object_train_penguins(s32);
void func_80055AB8(s32, s32);
-void func_80055C38(s32);
+void render_object_chain_chomps(s32);
void func_80055CCC(s32, s32);
-void func_80055E68(s32);
+void render_object_hot_air_balloon(s32);
void func_80055EF4(s32, s32);
void func_80055F48(s32);
void func_80055FA0(s32, s32);
void func_80056160(s32);
-void func_80056188(s32);
+void render_object_neon(s32);
void func_800562E4(s32, s32, s32);
void func_800563DC(s32, s32, s32);
void func_800568A0(s32, s32);
@@ -393,7 +392,7 @@ void func_8005669C(s32, s32, s32);
void func_800569F4(s32);
void func_80056A40(s32, s32);
void func_80056A94(s32);
-void func_80056AC0(s32);
+void render_object_bomb_kart(s32);
void func_80056E24(s32, Vec3f);
void func_80056FCC(s32);
diff --git a/src/render_player.c b/src/render_player.c
index e6e4a221d..542049bad 100644
--- a/src/render_player.c
+++ b/src/render_player.c
@@ -16,7 +16,7 @@
#include "buffers.h"
#include "waypoints.h"
#include "player_controller.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "common_textures.h"
#include "skybox_and_splitscreen.h"
#include "spawn_players.h"
diff --git a/src/code_80071F00.c b/src/update_objects.c
index 2115740db..8f0dea1b4 100644
--- a/src/code_80071F00.c
+++ b/src/update_objects.c
@@ -3,13 +3,13 @@
#include <defines.h>
#include <decode.h>
-#include "code_80071F00.h"
+#include "update_objects.h"
#include "main.h"
#include "memory.h"
#include "camera.h"
#include "math_util.h"
#include "math_util_2.h"
-#include "hud_renderer.h"
+#include "render_objects.h"
#include "objects.h"
#include "waypoints.h"
#include "code_800029B0.h"
@@ -81,7 +81,7 @@ u8 *gItemWindowTextures[] = {
common_texture_item_window_mushroom, common_texture_item_window_double_mushroom, common_texture_item_window_triple_mushroom, common_texture_item_window_super_mushroom
};
-u8 *D_800E4570[] = {
+u8 *gHudLapTextures[] = {
common_texture_hud_lap_1_on_3, common_texture_hud_lap_2_on_3, common_texture_hud_lap_3_on_3
};
@@ -182,7 +182,7 @@ void func_80072120(s32 *arg0, s32 arg1) {
s32 i;
for (i = 0; i < arg1; i++) {
- set_object_flag_unk_054_false(*arg0, 0x00600000);
+ set_object_flag_status_false(*arg0, 0x00600000);
arg0++;
}
}
@@ -196,29 +196,29 @@ void func_80072180(void) {
}
}
-void set_object_flag_unk_054_true(s32 objectIndex, s32 flag) {
- gObjectList[objectIndex].unk_054 |= flag;
+void set_object_flag_status_true(s32 objectIndex, s32 flag) {
+ gObjectList[objectIndex].status |= flag;
}
-void set_object_flag_unk_054_false(s32 objectIndex, s32 flag) {
- gObjectList[objectIndex].unk_054 &= ~flag;
+void set_object_flag_status_false(s32 objectIndex, s32 flag) {
+ gObjectList[objectIndex].status &= ~flag;
}
UNUSED void func_80072214(s32 objectIndex, s32 arg1) {
- gObjectList[objectIndex].unk_054 ^= arg1;
+ gObjectList[objectIndex].status ^= arg1;
}
-bool is_obj_index_flag_unk_054_active(s32 objectIndex, s32 arg1) {
+bool is_obj_flag_status_active(s32 objectIndex, s32 arg1) {
s32 phi_v1 = FALSE;
- if ((gObjectList[objectIndex].unk_054 & arg1) != 0) {
+ if ((gObjectList[objectIndex].status & arg1) != 0) {
phi_v1 = TRUE;
}
return phi_v1;
}
-s32 is_obj_index_flag_unk_054_inactive(s32 objectIndex, s32 arg1) {
+s32 is_obj_index_flag_status_inactive(s32 objectIndex, s32 arg1) {
s32 phi_v1 = 0;
- if ((gObjectList[objectIndex].unk_054 & arg1) == 0) {
+ if ((gObjectList[objectIndex].status & arg1) == 0) {
phi_v1 = 1;
}
return phi_v1;
@@ -236,12 +236,12 @@ UNUSED void func_800722F8(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].unk_058 ^= arg1;
}
-s32 func_80072320(s32 objectIndex, s32 arg1) {
- s32 phi_v1 = 0;
+bool func_80072320(s32 objectIndex, s32 arg1) {
+ s32 b = FALSE;
if ((gObjectList[objectIndex].unk_058 & arg1) != 0) {
- phi_v1 = 1;
+ b = TRUE;
}
- return phi_v1;
+ return b;
}
bool func_80072354(s32 objectIndex, s32 arg1) {
@@ -257,7 +257,7 @@ void set_object_unk_0CB(s32 objectIndex, s32 arg1) {
}
void init_object(s32 objectIndex, s32 arg1) {
- gObjectList[objectIndex].unk_054 = 0;
+ gObjectList[objectIndex].status = 0;
gObjectList[objectIndex].unk_058 = 0;
gObjectList[objectIndex].unk_05C = 0;
gObjectList[objectIndex].unk_0CD = 0;
@@ -275,7 +275,7 @@ void func_80072428(s32 objectIndex) {
gObjectList[objectIndex].state = 0;
gObjectList[objectIndex].unk_0D8 = 0;
set_object_unk_0CB(objectIndex, 0);
- gObjectList[objectIndex].unk_054 = 0;
+ gObjectList[objectIndex].status = 0;
gObjectList[objectIndex].unk_058 = 0;
gObjectList[objectIndex].unk_05C = 0;
func_80086F60(objectIndex);
@@ -283,7 +283,7 @@ void func_80072428(s32 objectIndex) {
void func_80072488(s32 objectIndex) {
set_object_unk_0CB(objectIndex, 0);
- set_object_flag_unk_054_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x2000);
gObjectList[objectIndex].state++;
}
@@ -303,8 +303,8 @@ s16 func_80072530(s32 objectIndex) {
void func_80072568(s32 objectIndex, s32 arg1) {
set_object_unk_0CB(objectIndex, 0);
- set_object_flag_unk_054_false(objectIndex, 0x2000);
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 8);
func_80072488(objectIndex);
func_800724F8(objectIndex, gObjectList[objectIndex].state);
gObjectList[objectIndex].state = arg1;
@@ -312,8 +312,8 @@ void func_80072568(s32 objectIndex, s32 arg1) {
void func_800725E8(s32 objectIndex, s32 arg1, s32 arg2) {
set_object_unk_0CB(objectIndex, 0);
- set_object_flag_unk_054_false(objectIndex, 0x2000);
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 8);
gObjectList[objectIndex].state = arg2;
func_800724F8(objectIndex, gObjectList[objectIndex].state);
gObjectList[objectIndex].state = arg1;
@@ -323,14 +323,14 @@ s16 func_80072530(s32); // extern
void func_8007266C(s32 objectIndex) {
set_object_unk_0CB(objectIndex, 0);
- set_object_flag_unk_054_false(objectIndex, 0x2000);
- set_object_flag_unk_054_false(objectIndex, 8);
+ set_object_flag_status_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 8);
gObjectList[objectIndex].state = func_80072530(objectIndex);
}
void func_800726CC(s32 objectIndex, s32 arg1) {
set_object_unk_0CB(objectIndex, 0);
- set_object_flag_unk_054_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x2000);
gObjectList[objectIndex].state = arg1;
}
@@ -476,14 +476,14 @@ s32 func_80072B48(s32 objectIndex, s32 arg1) {
phi_v1 = 0;
if (gObjectList[objectIndex].unk_0CB == 0) {
set_object_unk_0CB(objectIndex, 1);
- set_object_flag_unk_054_true(objectIndex, 0x80000);
+ set_object_flag_status_true(objectIndex, 0x80000);
gObjectList[objectIndex].itemDisplay = D_8018D140;
gObjectList[objectIndex].unk_050 = arg1;
}
gObjectList[objectIndex].unk_050--;
if (gObjectList[objectIndex].unk_050 < 0) {
- set_object_flag_unk_054_false(objectIndex, 0x80000);
+ set_object_flag_status_false(objectIndex, 0x80000);
set_object_unk_0CB(objectIndex, 0);
func_80072488(objectIndex);
phi_v1 = 1;
@@ -493,21 +493,21 @@ s32 func_80072B48(s32 objectIndex, s32 arg1) {
}
void func_80072C00(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3) {
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) {
gObjectList[objectIndex].unk_050 = arg2;
gObjectList[objectIndex].itemDisplay = arg1;
gObjectList[objectIndex].unk_0D4 = 1;
gObjectList[objectIndex].unk_0CC = arg3;
- set_object_flag_unk_054_true(objectIndex, 0x2000);
+ set_object_flag_status_true(objectIndex, 0x2000);
} else {
gObjectList[objectIndex].unk_050--;
if (gObjectList[objectIndex].unk_050 < 0) {
gObjectList[objectIndex].unk_050 = arg2;
gObjectList[objectIndex].unk_0D4--;
if ((gObjectList[objectIndex].unk_0D4 & 1) != 0) {
- set_object_flag_unk_054_false(objectIndex, 0x80000);
+ set_object_flag_status_false(objectIndex, 0x80000);
} else {
- set_object_flag_unk_054_true(objectIndex, 0x80000);
+ set_object_flag_status_true(objectIndex, 0x80000);
}
if (gObjectList[objectIndex].unk_0D4 < 0) {
@@ -518,7 +518,7 @@ void func_80072C00(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3) {
}
if (gObjectList[objectIndex].unk_0CC == 0) {
- set_object_flag_unk_054_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x2000);
func_80072488(objectIndex);
}
}
@@ -527,12 +527,12 @@ void func_80072C00(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3) {
}
void func_80072D3C(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) {
gObjectList[objectIndex].unk_050 = arg3;
gObjectList[objectIndex].itemDisplay = arg1;
gObjectList[objectIndex].unk_0D4 = 1;
gObjectList[objectIndex].unk_0CC = arg4;
- set_object_flag_unk_054_true(objectIndex, 0x2000);
+ set_object_flag_status_true(objectIndex, 0x2000);
return;
}
@@ -553,7 +553,7 @@ void func_80072D3C(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
}
if (gObjectList[objectIndex].unk_0CC == 0) {
- set_object_flag_unk_054_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x2000);
func_80072488(objectIndex);
}
}
@@ -564,12 +564,12 @@ s32 func_80072E54(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 a
s32 sp24;
sp24 = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) {
gObjectList[objectIndex].itemDisplay = arg1;
gObjectList[objectIndex].unk_050 = arg4;
gObjectList[objectIndex].unk_0CC = arg5;
set_object_unk_0CB(objectIndex, 1);
- set_object_flag_unk_054_true(objectIndex, 0x2000);
+ set_object_flag_status_true(objectIndex, 0x2000);
} else {
gObjectList[objectIndex].unk_050--;
if (gObjectList[objectIndex].unk_050 <= 0) {
@@ -582,7 +582,7 @@ s32 func_80072E54(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 a
}
if (gObjectList[objectIndex].unk_0CC == 0) {
gObjectList[objectIndex].itemDisplay = arg2;
- set_object_flag_unk_054_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x2000);
set_object_unk_0CB(objectIndex, 0);
func_80072488(objectIndex);
sp24 = 1;
@@ -599,12 +599,12 @@ bool func_80072F88(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32
s32 sp24;
sp24 = FALSE;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) {
gObjectList[objectIndex].itemDisplay = arg1;
gObjectList[objectIndex].unk_050 = arg4;
gObjectList[objectIndex].unk_0CC = arg5;
set_object_unk_0CB(objectIndex, 1);
- set_object_flag_unk_054_true(objectIndex, 0x2000);
+ set_object_flag_status_true(objectIndex, 0x2000);
} else {
gObjectList[objectIndex].unk_050--;
if (gObjectList[objectIndex].unk_050 <= 0) {
@@ -616,7 +616,7 @@ bool func_80072F88(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32
}
if (gObjectList[objectIndex].unk_0CC == 0) {
gObjectList[objectIndex].itemDisplay = arg2;
- set_object_flag_unk_054_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x2000);
set_object_unk_0CB(objectIndex, 0);
func_80072488(objectIndex);
sp24 = TRUE;
@@ -633,22 +633,22 @@ bool func_800730BC(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32
s32 sp24;
sp24 = FALSE;
- if (is_obj_index_flag_unk_054_inactive(objectIndex ,0x2000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex ,0x2000) != 0) {
gObjectList[objectIndex].itemDisplay = arg1;
gObjectList[objectIndex].unk_050 = arg4;
gObjectList[objectIndex].unk_0CC = arg5;
set_object_unk_0CB(objectIndex, 1);
- set_object_flag_unk_054_true(objectIndex, 0x2000);
- set_object_flag_unk_054_false(objectIndex, 0x4000);
+ set_object_flag_status_true(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x4000);
} else {
gObjectList[objectIndex].unk_050--;
if (gObjectList[objectIndex].unk_050 <= 0) {
gObjectList[objectIndex].unk_050 = arg4;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x4000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 0x4000) != 0) {
gObjectList[objectIndex].itemDisplay += arg3;
if (gObjectList[objectIndex].itemDisplay >= arg2) {
gObjectList[objectIndex].itemDisplay = arg2;
- set_object_flag_unk_054_true(objectIndex, 0x4000);
+ set_object_flag_status_true(objectIndex, 0x4000);
}
} else {
gObjectList[objectIndex].itemDisplay -= arg3;
@@ -659,14 +659,14 @@ bool func_800730BC(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32
}
if (gObjectList[objectIndex].unk_0CC == 0) {
- set_object_flag_unk_054_false(objectIndex, 0x80);
- set_object_flag_unk_054_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x80);
+ set_object_flag_status_false(objectIndex, 0x2000);
set_object_unk_0CB(objectIndex, 0);
func_80072488(objectIndex);
sp24 = TRUE;
} else {
- set_object_flag_unk_054_false(objectIndex, 0x4000);
- set_object_flag_unk_054_true(objectIndex, 0x80);
+ set_object_flag_status_false(objectIndex, 0x4000);
+ set_object_flag_status_true(objectIndex, 0x80);
}
}
}
@@ -679,22 +679,22 @@ s32 func_8007326C(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 a
s32 sp24;
sp24 = 0;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) {
gObjectList[objectIndex].itemDisplay = arg1;
gObjectList[objectIndex].unk_050 = arg4;
gObjectList[objectIndex].unk_0CC = arg5;
set_object_unk_0CB(objectIndex, 1);
- set_object_flag_unk_054_true(objectIndex, 0x2000);
- set_object_flag_unk_054_false(objectIndex, 0x4000);
+ set_object_flag_status_true(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x4000);
} else {
gObjectList[objectIndex].unk_050--;
if (gObjectList[objectIndex].unk_050 <= 0) {
gObjectList[objectIndex].unk_050 = arg4;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x4000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 0x4000) != 0) {
gObjectList[objectIndex].itemDisplay -= arg3;
if (arg2 >= gObjectList[objectIndex].itemDisplay) {
gObjectList[objectIndex].itemDisplay = arg2;
- set_object_flag_unk_054_true(objectIndex, 0x4000);
+ set_object_flag_status_true(objectIndex, 0x4000);
}
} else {
gObjectList[objectIndex].itemDisplay += arg3;
@@ -704,12 +704,12 @@ s32 func_8007326C(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 a
gObjectList[objectIndex].unk_0CC--;
}
if (gObjectList[objectIndex].unk_0CC == 0) {
- set_object_flag_unk_054_false(objectIndex, 0x2000);
+ set_object_flag_status_false(objectIndex, 0x2000);
set_object_unk_0CB(objectIndex, 0);
func_80072488(objectIndex);
sp24 = 1;
} else {
- set_object_flag_unk_054_false(objectIndex, 0x4000);
+ set_object_flag_status_false(objectIndex, 0x4000);
}
}
}
@@ -724,7 +724,7 @@ void func_80073404(s32 objectIndex, u8 arg1, u8 arg2, Vtx *arg3) {
gObjectList[objectIndex].textureHeight = arg2;
gObjectList[objectIndex].itemDisplay = 0;
gObjectList[objectIndex].unk_0D3 = -1;
- gObjectList[objectIndex].unk_054 = 0;
+ gObjectList[objectIndex].status = 0;
}
void init_texture_object(s32 objectIndex, u8 *texture, u8* arg2, u8 arg3, u16 arg4) {
@@ -734,7 +734,7 @@ void init_texture_object(s32 objectIndex, u8 *texture, u8* arg2, u8 arg3, u16 ar
gObjectList[objectIndex].textureHeight = arg4;
gObjectList[objectIndex].itemDisplay = 0;
gObjectList[objectIndex].unk_0D3 = -1;
- gObjectList[objectIndex].unk_054 = 0;
+ gObjectList[objectIndex].status = 0;
}
UNUSED void func_8007348C(s32 objectIndex, u8 *arg1, u8 arg2, u8 arg3, Vtx *arg4) {
@@ -745,7 +745,7 @@ UNUSED void func_8007348C(s32 objectIndex, u8 *arg1, u8 arg2, u8 arg3, Vtx *arg4
gObjectList[objectIndex].vertex = arg4;
gObjectList[objectIndex].itemDisplay = 0;
gObjectList[objectIndex].unk_0D3 = -1;
- gObjectList[objectIndex].unk_054 = 0;
+ gObjectList[objectIndex].status = 0;
}
UNUSED void func_800734D4() {
@@ -776,7 +776,7 @@ UNUSED void func_80073570(s32 objectIndex) {
}
void func_800735BC(s32 objectIndex, Gfx *arg1, f32 arg2) {
- gObjectList[objectIndex].unk_054 = 0;
+ gObjectList[objectIndex].status = 0;
gObjectList[objectIndex].model = arg1;
gObjectList[objectIndex].sizeScaling = arg2;
func_80072488(objectIndex);
@@ -786,26 +786,26 @@ void func_80073600(s32 objectIndex) {
set_object_unk_0CB(objectIndex, 0);
gObjectList[objectIndex].unk_0D6 = 0;
gObjectList[objectIndex].unk_04C = -1;
- set_object_flag_unk_054_false(objectIndex, 0x8000);
+ set_object_flag_status_false(objectIndex, 0x8000);
}
void func_80073654(s32 objectIndex) {
- set_object_flag_unk_054_false(objectIndex, 0x8000);
+ set_object_flag_status_false(objectIndex, 0x8000);
++gObjectList[objectIndex].unk_0D6;
}
UNUSED void func_8007369C(s32 objectIndex, s32 arg1) {
- set_object_flag_unk_054_false(objectIndex, 0x8000);
+ set_object_flag_status_false(objectIndex, 0x8000);
gObjectList[objectIndex].unk_0D6 = arg1;
}
void func_800736E0(s32 objectIndex) {
- set_object_flag_unk_054_false(objectIndex, 0x8000);
+ set_object_flag_status_false(objectIndex, 0x8000);
gObjectList[objectIndex].unk_0D6 = 1;
}
void func_80073720(s32 objectIndex) {
- set_object_flag_unk_054_false(objectIndex, 0x8000);
+ set_object_flag_status_false(objectIndex, 0x8000);
gObjectList[objectIndex].unk_0D6 = 0;
}
@@ -813,13 +813,13 @@ bool func_8007375C(s32 objectIndex, s32 arg1) {
s32 sp24;
sp24 = FALSE;
- if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x00008000) != 0) {
+ if (is_obj_index_flag_status_inactive(objectIndex, 0x00008000) != 0) {
gObjectList[objectIndex].unk_04C = arg1;
- set_object_flag_unk_054_true(objectIndex, 0x00008000);
+ set_object_flag_status_true(objectIndex, 0x00008000);
}
gObjectList[objectIndex].unk_04C--;
if (gObjectList[objectIndex].unk_04C < 0) {
- set_object_flag_unk_054_false(objectIndex, 0x00008000);
+ set_object_flag_status_false(objectIndex, 0x00008000);
func_80073654(objectIndex);
sp24 = TRUE;
}
@@ -1184,11 +1184,11 @@ void func_80074344(s32 objectIndex, f32* arg1, f32 arg2, f32 arg3, f32 arg4, s32
}
void func_80074478(s32 objectIndex) {
- gObjectList[objectIndex].unk_054 |= 1;
+ gObjectList[objectIndex].status |= 1;
}
void func_800744A0(s32 objectIndex) {
- gObjectList[objectIndex].unk_054 &= ~1;
+ gObjectList[objectIndex].status &= ~1;
}
void func_800744CC(void) {
@@ -1212,14 +1212,14 @@ void func_80074574(u8 *arg0, void *arg1, u16 arg2, u16 arg3) {
void func_800745C8(s32 objectIndex, s32 arg1) {
s32 phi_a1;
- if ((gObjectList[objectIndex].unk_054 & 1) != 0) {
+ if ((gObjectList[objectIndex].status & 1) != 0) {
phi_a1 = 0;
if (gObjectList[objectIndex].tlutList != gObjectList[objectIndex].activeTLUT) {
gObjectList[objectIndex].activeTLUT = gObjectList[objectIndex].tlutList;
}
- gObjectList[objectIndex].unk_054 ^= 2;
- if ((gObjectList[objectIndex].unk_054 & 2) != 0) {
+ gObjectList[objectIndex].status ^= 2;
+ if ((gObjectList[objectIndex].status & 2) != 0) {
phi_a1 = 1;
}
@@ -1231,12 +1231,12 @@ void func_800745C8(s32 objectIndex, s32 arg1) {
void func_8007466C(s32 objectIndex, s32 arg1) {
s32 phi_a1;
- if ((gObjectList[objectIndex].unk_054 & 1) != 0) {
+ if ((gObjectList[objectIndex].status & 1) != 0) {
// I have no idea why this typecase works
gObjectList[objectIndex].activeTLUT = (u32*)gObjectList[objectIndex].tlutList + (gObjectList[objectIndex].unk_0D3 << 7) ;
- gObjectList[objectIndex].unk_054 ^= 2;
+ gObjectList[objectIndex].status ^= 2;
phi_a1 = 0;
- if ((gObjectList[objectIndex].unk_054 & 2) != 0) {
+ if ((gObjectList[objectIndex].status & 2) != 0) {
phi_a1 = 1;
}
gObjectList[objectIndex].activeTexture = (u8 *) (gObjectList[objectIndex].textureWidth * gObjectList[objectIndex].textureHeight * phi_a1) + arg1;
@@ -1247,11 +1247,11 @@ void func_8007466C(s32 objectIndex, s32 arg1) {
void func_80074704(s32 objectIndex, s32 arg1) {
s32 phi_a1;
- if ((gObjectList[objectIndex].unk_054 & 1) != 0) {
+ if ((gObjectList[objectIndex].status & 1) != 0) {
gObjectList[objectIndex].activeTLUT = gObjectList[objectIndex].tlutList;
- gObjectList[objectIndex].unk_054 ^= 2;
+ gObjectList[objectIndex].status ^= 2;
phi_a1 = 0;
- if ((gObjectList[objectIndex].unk_054 & 2) != 0) {
+ if ((gObjectList[objectIndex].status & 2) != 0) {
phi_a1 = 1;
}
gObjectList[objectIndex].activeTexture = (u8 *) (gObjectList[objectIndex].textureWidth * gObjectList[objectIndex].textureHeight * phi_a1) + arg1;
@@ -1262,9 +1262,9 @@ void func_80074704(s32 objectIndex, s32 arg1) {
u8 *func_80074790(s32 objectIndex, u8 *arg1) {
s32 phi_a2;
- gObjectList[objectIndex].unk_054 ^= 4;
+ gObjectList[objectIndex].status ^= 4;
phi_a2 = 0;
- if ((gObjectList[objectIndex].unk_054 & 4) != 0) {
+ if ((gObjectList[objectIndex].status & 4) != 0) {
phi_a2 = 1;
}
return (gObjectList[objectIndex].textureWidth * gObjectList[objectIndex].textureHeight * phi_a2) + arg1;
@@ -1336,7 +1336,7 @@ void func_80074924(s32 objectIndex) {
temp_s0->origin_pos[2] = (f32) (((f64) D_80165728 + 200.0) - (f64) sp24);
break;
}
- func_8008B80C(objectIndex, 0, 0, 0);
+ set_obj_origin_offset(objectIndex, 0, 0, 0);
if (gPlayerCount == 1) {
temp_s0->velocity[1] = (f32) (((f64) (f32) (sp2C % 4) * 0.25) + 0.8);
} else {
@@ -1355,18 +1355,18 @@ void func_80074924(s32 objectIndex) {
} else {
temp_s0->unk_084[7] = -0x100 - (sp20 / 32);
}
- temp_s0->unk_0A0 = 0x00E6;
+ temp_s0->primAlpha = 0x00E6;
func_80072488(objectIndex);
}
void func_80074D94(s32 objectIndex) {
if (gObjectList[objectIndex].unk_0AE == 1) {
- if ((D_80165740 <= gObjectList[objectIndex].unk_028[1]) && (s16_step_down_towards(&gObjectList[objectIndex].unk_0A0, 0, 8) != 0)) {
+ if ((D_80165740 <= gObjectList[objectIndex].offset[1]) && (s16_step_down_towards(&gObjectList[objectIndex].primAlpha, 0, 8) != 0)) {
func_80086F60(objectIndex);
}
- func_800877C4(objectIndex);
+ object_add_velocity_offset_y(objectIndex);
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_80074E28(s32 objectIndex) {
@@ -1424,7 +1424,7 @@ void func_80074FD8(s32 objectIndex) {
if (func_80087E08(objectIndex, gObjectList[objectIndex].velocity[1], 0.12f, gObjectList[objectIndex].unk_034, gObjectList[objectIndex].direction_angle[1], 0x00000064) != 0) {
func_80072488(objectIndex);
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
gObjectList[objectIndex].orientation[0] += D_8016582C[0];
gObjectList[objectIndex].orientation[1] += D_8016582C[1];
gObjectList[objectIndex].orientation[2] += D_8016582C[2];
@@ -1549,13 +1549,13 @@ void func_80075698(s32 objectIndex) {
gObjectList[objectIndex].unk_0D5 = 1;
gObjectList[objectIndex].activeTexture = D_8018D490;
gObjectList[objectIndex].textureList = D_8018D490;
- gObjectList[objectIndex].unk_0A0 = 0xFF;
+ gObjectList[objectIndex].primAlpha = 0xFF;
gObjectList[objectIndex].direction_angle[1] = 0;
gObjectList[objectIndex].orientation[0] = 0;
gObjectList[objectIndex].orientation[2] = 0;
- gObjectList[objectIndex].unk_028[0] = 0.0f;
- gObjectList[objectIndex].unk_028[1] = 0.0f;
- gObjectList[objectIndex].unk_028[2] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
+ gObjectList[objectIndex].offset[1] = 0.0f;
+ gObjectList[objectIndex].offset[2] = 0.0f;
gObjectList[objectIndex].sizeScaling = 0.5f;
func_80072488(objectIndex);
}
@@ -1567,9 +1567,9 @@ void func_80075714(s32 objectIndex) {
break;
case 2:
gObjectList[objectIndex].velocity[1] -= 0.03;
- f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 100.0f, gObjectList[objectIndex].velocity[1]);
+ f32_step_up_towards(&gObjectList[objectIndex].offset[1], 100.0f, gObjectList[objectIndex].velocity[1]);
func_8007415C(objectIndex, &gObjectList[objectIndex].sizeScaling, 0.55f, 1.0f, 0.1f, 1, 0);
- if (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0xFF, 0x1E, 7, 0, 0) != 0) {
+ if (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0xFF, 0x1E, 7, 0, 0) != 0) {
func_80072488(objectIndex);
}
break;
@@ -1580,10 +1580,10 @@ void func_80075714(s32 objectIndex) {
break;
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
-void func_80075838(void) {
+void update_train_smoke(void) {
s32 pad[2];
s32 count;
s32 i;
@@ -1670,13 +1670,13 @@ void func_80075B08(s32 objectIndex) {
gObjectList[objectIndex].unk_0D5 = 6;
gObjectList[objectIndex].activeTexture = D_8018D490;
gObjectList[objectIndex].textureList = D_8018D490;
- gObjectList[objectIndex].unk_0A0 = 0xFF;
+ gObjectList[objectIndex].primAlpha = 0xFF;
gObjectList[objectIndex].direction_angle[1] = 0;
gObjectList[objectIndex].orientation[0] = 0;
gObjectList[objectIndex].orientation[2] = 0;
- gObjectList[objectIndex].unk_028[0] = 0.0f;
- gObjectList[objectIndex].unk_028[1] = 0.0f;
- gObjectList[objectIndex].unk_028[2] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
+ gObjectList[objectIndex].offset[1] = 0.0f;
+ gObjectList[objectIndex].offset[2] = 0.0f;
gObjectList[objectIndex].sizeScaling = 0.5f;
func_80072488(objectIndex);
}
@@ -1688,9 +1688,9 @@ void func_80075B84(s32 objectIndex) {
break;
case 2:
gObjectList[objectIndex].velocity[1] -= 0.03;
- f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 100.0f, gObjectList[objectIndex].velocity[1]);
+ f32_step_up_towards(&gObjectList[objectIndex].offset[1], 100.0f, gObjectList[objectIndex].velocity[1]);
func_8007415C(objectIndex, &gObjectList[objectIndex].sizeScaling, 0.55f, 1.0f, 0.1f, 1, 0);
- if (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0xFF, 0x1E, 7, 0, 0) != 0) {
+ if (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0xFF, 0x1E, 7, 0, 0) != 0) {
func_80072488(objectIndex);
}
break;
@@ -1701,10 +1701,10 @@ void func_80075B84(s32 objectIndex) {
break;
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
-void func_80075CA8(void) {
+void update_ferries_smoke_particle(void) {
s32 pad[2];
s32 count;
s32 i;
@@ -1716,7 +1716,7 @@ void func_80075CA8(void) {
if (D_80165790 != 0) {
D_80165790 -= 1;
}
- if ((gFerries[0].someFlags != 0) || (D_8016578C != 0)) {
+ if ((gPaddleBoats[0].someFlags != 0) || (D_8016578C != 0)) {
count = 0;
for (i = 0; i < 128; i++) {
temp_a0 = gObjectParticle2[i];
@@ -1735,7 +1735,7 @@ void func_80075CA8(void) {
D_8016578C = 100;
}
}
- if ((gFerries[1].someFlags != 0) || (D_80165790 != 0)) {
+ if ((gPaddleBoats[1].someFlags != 0) || (D_80165790 != 0)) {
count = 0;
for (i = 0; i < 128; i++) {
temp_a0 = gObjectParticle3[i];
@@ -1810,7 +1810,7 @@ void func_8007601C(s32 objectIndex) {
if (gObjectList[objectIndex].unk_04C == 0) {
func_8008A6DC(objectIndex, 300.0f);
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x40000) != 0) && (func_80072354(objectIndex, 1) != 0)) {
+ if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (func_80072354(objectIndex, 1) != 0)) {
func_800722A4(objectIndex, 1);
func_80075F98(gObjectList[objectIndex].pos, gObjectList[objectIndex].direction_angle[1], 1.0f);
func_800C9D80(gObjectList[objectIndex].pos, gObjectList[objectIndex].velocity, SOUND_ARG_LOAD(0x51, 0x02, 0x80, 0x0A));
@@ -1884,9 +1884,9 @@ void func_8007634C(s32 objectIndex) {
temp_v0 = &gObjectList[objectIndex];
temp_v0->activeTexture = common_texture_particle_smoke;
temp_v0->textureList = common_texture_particle_smoke;
- temp_v0->unk_0A0 = 0x00FF;
+ temp_v0->primAlpha = 0x00FF;
set_obj_orientation(objectIndex, 0U, 0U, 0U);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
func_80072488(objectIndex);
}
@@ -1914,7 +1914,7 @@ void func_800763CC(s32 objectIndex) {
s16_step_towards(&temp_s0->type, 0, 0x0018);
s16_step_towards(&temp_s0->unk_0A2, 0x0080, 0x000C);
}
- if ((temp_s0->unk_0AE >= 2) && (func_80073B00(objectIndex, &temp_s0->unk_0A0, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) {
+ if ((temp_s0->unk_0AE >= 2) && (func_80073B00(objectIndex, &temp_s0->primAlpha, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) {
func_80072488(objectIndex);
}
break;
@@ -1947,7 +1947,7 @@ void func_80076538(s32 objectIndex) {
}
if (gObjectList[objectIndex].unk_0AE > 0) {
func_80087844(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
}
@@ -1969,7 +1969,7 @@ void func_8007661C(void) {
}
if (gObjectList[objectIndex].unk_04C == 0) {
func_8008A6DC(objectIndex, 750.0f);
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) && (func_80072354(objectIndex, 1) != 0)) {
+ if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (func_80072354(objectIndex, 1) != 0)) {
func_800722A4(objectIndex, 1);
func_800762DC(gObjectList[objectIndex].pos, 1.0f);
func_800C9D80(gObjectList[objectIndex].pos, gObjectList[objectIndex].velocity, 0x51038009U);
@@ -2054,9 +2054,9 @@ void func_80076958(s32 objectIndex) {
temp_v0 = &gObjectList[objectIndex];
temp_v0->activeTexture = common_texture_particle_smoke;
temp_v0->textureList = common_texture_particle_smoke;
- temp_v0->unk_0A0 = 0x00FF;
+ temp_v0->primAlpha = 0x00FF;
set_obj_orientation(objectIndex, 0U, 0U, 0U);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
func_80072488(objectIndex);
}
@@ -2078,7 +2078,7 @@ void func_800769D8(s32 objectIndex) {
case 3:
f32_step_towards(&temp_s0->sizeScaling, 2.0f, 0.05f);
s16_step_towards(&temp_s0->type, 0, 0x0018);
- if ((temp_s0->unk_0AE >= 2) && (func_80073B00(objectIndex, &temp_s0->unk_0A0, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) {
+ if ((temp_s0->unk_0AE >= 2) && (func_80073B00(objectIndex, &temp_s0->primAlpha, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) {
func_80072488(objectIndex);
}
break;
@@ -2103,8 +2103,8 @@ void func_80076AEC(s32 objectIndex) {
}
}
if (gObjectList[objectIndex].unk_0AE > 0) {
- func_800877C4(objectIndex);
- func_8008BF18(objectIndex);
+ object_add_velocity_offset_y(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
}
@@ -2112,7 +2112,7 @@ void func_80076B7C(void) {
}
-void update_particle_bowser_castle(void) {
+void update_flame_particle(void) {
s32 someIndex;
s32 objectIndex;
Objects *object;
@@ -2139,7 +2139,7 @@ void update_particle_bowser_castle(void) {
}
}
-void func_80076C9C(s32 objectIndex, Vec3f arg1, s16 arg2) {
+void init_object_smoke_paticle(s32 objectIndex, Vec3f arg1, s16 arg2) {
Objects *temp_v0;
init_object(objectIndex, (s32) arg2);
@@ -2152,15 +2152,15 @@ void func_80076C9C(s32 objectIndex, Vec3f arg1, s16 arg2) {
temp_v0->type = 0x00FF;
temp_v0->unk_034 = 0.0f;
set_obj_orientation(objectIndex, 0U, 0U, 0U);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
}
-void func_80076D70(Vec3f arg0, UNUSED f32 arg1, s16 arg2) {
+void init_smoke_particle(Vec3f arg0, UNUSED f32 arg1, s16 arg2) {
s32 objectIndex;
objectIndex = add_unused_obj_index(gObjectParticle4, &gNextFreeObjectParticle4, gObjectParticle4_SIZE);
if (objectIndex != NULL_OBJECT_ID) {
- func_80076C9C(objectIndex, arg0, arg2);
+ init_object_smoke_paticle(objectIndex, arg0, arg2);
}
}
@@ -2177,7 +2177,7 @@ void func_80076E14(s32 objectIndex) {
func_80076DC4(objectIndex);
break;
case 2:
- if ((gObjectList[objectIndex].unk_0AE >= 2) && (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) {
+ if ((gObjectList[objectIndex].unk_0AE >= 2) && (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) {
func_80072488(objectIndex);
}
break;
@@ -2194,7 +2194,7 @@ void func_80076ED8(s32 objectIndex) {
if ((gObjectList[objectIndex].unk_0AE != 0) && (gObjectList[objectIndex].unk_0AE == 1)) {
func_80086FD4(objectIndex);
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_80076F2C(void) {
@@ -2217,7 +2217,7 @@ void func_80076F2C(void) {
}
}
-void func_80076FEC(s32 objectIndex, s32 flameIndex) {
+void init_object_smoke_particle(s32 objectIndex, s32 flameIndex) {
init_object(objectIndex, 3);
gObjectList[objectIndex].unk_0D5 = 0xB;
@@ -2231,17 +2231,17 @@ void func_80076FEC(s32 objectIndex, s32 flameIndex) {
gObjectList[objectIndex].unk_034 = 0;
gObjectList[objectIndex].type = 255;
gObjectList[objectIndex].unk_0A2 = 255;
- gObjectList[objectIndex].unk_0A0 = 255;
+ gObjectList[objectIndex].primAlpha = 255;
set_obj_orientation(objectIndex, 0, 0, 0);
- func_8008B80C(objectIndex, 0, 0, 0);
+ set_obj_origin_offset(objectIndex, 0, 0, 0);
}
-void func_800770F0(s32 arg0) {
+void init_smoke_particles(s32 arg0) {
s32 objectIndex;
objectIndex = add_unused_obj_index(gObjectParticle4, &gNextFreeObjectParticle4, gObjectParticle4_SIZE);
if (objectIndex != NULL_OBJECT_ID) {
- func_80076FEC(objectIndex, arg0);
+ init_object_smoke_particle(objectIndex, arg0);
}
}
@@ -2254,7 +2254,7 @@ void func_80077138(s32 objectIndex, Vec3f arg1, s32 arg2) {
gObjectList[objectIndex].sizeScaling = 0.05f;
set_obj_origin_pos(objectIndex, arg1[0], arg1[1], arg1[2]);
set_obj_orientation(objectIndex, 0U, 0U, 0U);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
switch (arg2) {
case 0:
gObjectList[objectIndex].velocity[1] = -1.0f;
@@ -2287,7 +2287,7 @@ void func_80077138(s32 objectIndex, Vec3f arg1, s32 arg2) {
gObjectList[objectIndex].unk_084[4] = temp_v0_3;
gObjectList[objectIndex].unk_048 = 1;
}
- gObjectList[objectIndex].unk_0A0 = 0x00FF;
+ gObjectList[objectIndex].primAlpha = 0x00FF;
gObjectList[objectIndex].unk_084[3] = random_int(0x0800U) + 0x400;
if ((gObjectList[objectIndex].direction_angle[1] < 0x3000) || (gObjectList[objectIndex].direction_angle[1] >= 0xB001)) {
gObjectList[objectIndex].unk_084[3] = -gObjectList[objectIndex].unk_084[3];
@@ -2320,7 +2320,7 @@ void func_80077450(s32 objectIndex) {
break;
case 2:
f32_step_up_towards(&gObjectList[objectIndex].sizeScaling, 0.1f, 0.01f);
- if ((gObjectList[objectIndex].pos[1] <= gObjectList[objectIndex].unk_084[5]) && (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x000000FF, 0, 0x00000010, 0, 0) != 0)) {
+ if ((gObjectList[objectIndex].pos[1] <= gObjectList[objectIndex].unk_084[5]) && (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0x000000FF, 0, 0x00000010, 0, 0) != 0)) {
func_80086F60(objectIndex);
func_80072428(objectIndex);
}
@@ -2348,8 +2348,8 @@ void func_80077584(s32 objectIndex) {
}
}
temp_v0->orientation[2] += temp_v0->unk_084[3];
- func_80087710(objectIndex);
- func_8008BF18(objectIndex);
+ object_add_velocity_offset_xyz(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_80077640(void) {
@@ -2372,7 +2372,7 @@ void func_80077640(void) {
}
}
-void init_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) {
+void init_object_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) {
UNUSED s32 stackPadding1;
UNUSED u16 stackPadding0;
u16 temp_s0;
@@ -2387,22 +2387,22 @@ void init_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) {
gObjectList[objectIndex].unk_044 = arg1[1];
switch (gCurrentCourseId) {
case COURSE_MARIO_RACEWAY:
- func_8008BD14(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14);
+ object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14);
gObjectList[objectIndex].unk_034 = 1.5f;
gObjectList[objectIndex].velocity[1] = 1.5f;
break;
case COURSE_YOSHI_VALLEY:
- func_8008BD14(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14);
+ object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14);
gObjectList[objectIndex].unk_034 = 2.0f;
gObjectList[objectIndex].velocity[1] = 2.0f;
break;
case COURSE_ROYAL_RACEWAY:
- func_8008BD14(objectIndex, arg1[0], arg1[1] + 30.0, arg1[2], 0x10, 0x28, 0x10);
+ object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 30.0, arg1[2], 0x10, 0x28, 0x10);
gObjectList[objectIndex].unk_034 = 2.0f;
gObjectList[objectIndex].velocity[1] = 2.0f;
break;
case COURSE_LUIGI_RACEWAY:
- func_8008BD14(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14);
+ object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14);
gObjectList[objectIndex].unk_034 = 1.5f;
gObjectList[objectIndex].velocity[1] = 1.0f;
break;
@@ -2414,21 +2414,21 @@ void init_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) {
set_obj_orientation(objectIndex, temp_s0, sp3E, sp3C);
}
-s32 func_80077A54(Vec3f arg0, s32 num) {
+s32 init_leaf_particle(Vec3f arg0, s32 num) {
s32 objectIndex;
objectIndex = add_unused_obj_index(gLeafParticle, &gNextFreeLeafParticle, gLeafParticle_SIZE);
if (objectIndex != NULL_OBJECT_ID) {
- init_leaf_particle(objectIndex, arg0, num);
+ init_object_leaf_particle(objectIndex, arg0, num);
}
return objectIndex;
}
-void func_80077AB0(Vec3f arg0, UNUSED s32 arg1) {
+void spawn_leaf(Vec3f arg0, UNUSED s32 arg1) {
s32 i;
for (i = 0; i < gLeafParticle_SPAWN_SIZE; i++) {
- if (func_80077A54(arg0, i) == NULL_OBJECT_ID) break;
+ if (init_leaf_particle(arg0, i) == NULL_OBJECT_ID) break;
}
}
@@ -2469,12 +2469,12 @@ void func_80077BCC(s32 objectIndex) {
}
break;
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
gObjectList[objectIndex].orientation[0] += 0x1000;
gObjectList[objectIndex].orientation[1] += 0x1000;
}
-void func_80077C9C(void) {
+void update_leaf(void) {
s32 someIndex;
s32 leafIndex;
Objects *object;
@@ -2524,9 +2524,9 @@ void func_80077E20(s32 objectIndex) {
temp_v0->textureHeight = 0x10;
temp_v0->textureWidth = temp_v0->textureHeight;
temp_v0->sizeScaling = 0.15f;
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
func_80086EF0(objectIndex);
- temp_v0->unk_0A0 = 0x00FF;
+ temp_v0->primAlpha = 0x00FF;
temp_v0->unk_0D5 = 0;
temp_v0->type = 0;
func_80072488(objectIndex);
@@ -2537,11 +2537,11 @@ void func_80077EB8(s32 objectIndex, u16 arg1, Camera *camera) {
temp_v0 = camera->rot[1] - arg1;
if ((temp_v0 >= D_8018D210) || (D_8018D208 >= temp_v0)) {
- gObjectList[objectIndex].unk_028[0] = D_8018D218 + (D_8018D1E8 * (f32) temp_v0);
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ gObjectList[objectIndex].offset[0] = D_8018D218 + (D_8018D1E8 * (f32) temp_v0);
+ set_object_flag_status_true(objectIndex, 0x00000010);
return;
}
- set_object_flag_unk_054_false(objectIndex, 0x00000010);
+ set_object_flag_status_false(objectIndex, 0x00000010);
}
void func_80077F64(s32 objectIndex, Camera *camera) {
@@ -2551,18 +2551,18 @@ void func_80077F64(s32 objectIndex, Camera *camera) {
switch (gObjectList[objectIndex].unk_0AE) { /* irregular */
case 1:
gObjectList[objectIndex].direction_angle[1] = (camera->rot[1] + random_int(0x4000U)) - 0x2000;
- func_8008BAB4(objectIndex, 0x00B4, 0x0014U);
+ object_origin_pos_randomize_around_y(objectIndex, 0x00B4, 0x0014U);
rand = random_int(0x0064U);
gObjectList[objectIndex].velocity[1] = (f32) (-0.75 - (f64) (f32) (rand * 0.01));
- gObjectList[objectIndex].unk_028[0] = 0.0f;
- gObjectList[objectIndex].unk_028[1] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
+ gObjectList[objectIndex].offset[1] = 0.0f;
func_80086FD4(objectIndex);
return;
case 2:
func_80077EB8(objectIndex, gObjectList[objectIndex].direction_angle[1], camera);
- func_800877C4(objectIndex);
- func_8008BF18(objectIndex);
+ object_add_velocity_offset_y(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
func_8008BFC0(objectIndex);
if (gObjectList[objectIndex].pos[1] <= 0.0f) {
func_80086FD4(objectIndex);
@@ -2642,8 +2642,8 @@ void func_80078288(s32 objectIndex) {
gObjectList[objectIndex].unk_0C4 = random_int(0x0400U) + 0x100;
gObjectList[objectIndex].unk_01C[0] = (f32) (((f32) random_int(0x0064U) * 0.03) + 2.0);
gObjectList[objectIndex].velocity[1] = (f32) (-0.3 - (f64) (f32) (random_int(0x0032U) * 0.01));
- gObjectList[objectIndex].unk_028[0] = 0.0f;
- gObjectList[objectIndex].unk_028[1] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
+ gObjectList[objectIndex].offset[1] = 0.0f;
func_80086FD4(objectIndex);
} else {
sp3C = random_int(0x0064U) + 0x28;
@@ -2654,16 +2654,16 @@ void func_80078288(s32 objectIndex) {
gObjectList[objectIndex].unk_0C4 = random_int(0x0400U) + 0x100;
gObjectList[objectIndex].unk_01C[0] = (f32) (((f32) random_int(0x0064U) * 0.03) + 2.0);
gObjectList[objectIndex].velocity[1] = (f32) (-0.6 - (f64) (f32) (random_int(0x0032U) * 0.01));
- gObjectList[objectIndex].unk_028[0] = 0.0f;
- gObjectList[objectIndex].unk_028[1] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
+ gObjectList[objectIndex].offset[1] = 0.0f;
func_80086FD4(objectIndex);
}
break;
case 2:
- func_800877C4(objectIndex);
+ object_add_velocity_offset_y(objectIndex);
gObjectList[objectIndex].direction_angle[0] += gObjectList[objectIndex].unk_0C4;
- gObjectList[objectIndex].unk_028[0] = sins(gObjectList[objectIndex].direction_angle[0]) * gObjectList[objectIndex].unk_01C[0];
- func_8008BF18(objectIndex);
+ gObjectList[objectIndex].offset[0] = sins(gObjectList[objectIndex].direction_angle[0]) * gObjectList[objectIndex].unk_01C[0];
+ object_calculate_new_pos_offset(objectIndex);
if ((f64) gObjectList[objectIndex].pos[1] <= 0.0) {
func_80086FD4(objectIndex);
}
@@ -2709,7 +2709,7 @@ void func_80078790(void) {
}
}
-void func_80078838(void) {
+void update_snowflakes(void) {
s32 someIndex;
s32 snowflakeIndex;
@@ -2735,10 +2735,10 @@ void func_800788F8(s32 objectIndex, u16 rot, Camera *camera) {
temp_v0 = camera->rot[1] + rot;
if ((temp_v0 >= D_8018D210) && (D_8018D208 >= temp_v0)) {
gObjectList[objectIndex].unk_09C = (D_8018D218 + (D_8018D1E8 * temp_v0));
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
return;
}
- set_object_flag_unk_054_false(objectIndex, 0x00000010);
+ set_object_flag_status_false(objectIndex, 0x00000010);
}
#ifdef MIPS_TO_C
@@ -2765,7 +2765,7 @@ void func_800789AC(s32 arg0, Camera *arg1, s16 (*arg2)[4]) {
*/
}
#else
-GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800789AC.s")
+GLOBAL_ASM("asm/non_matchings/update_objects/func_800789AC.s")
#endif
typedef struct {
@@ -2788,19 +2788,19 @@ void func_80078A44(s32 arg0, Camera *camera, u16 rot[][4]) {
func_800788F8(objectIndex, *(u16 *)(rot + i), camera);
switch (i % 5U) {
case 0:
- func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x00000028, 0x000000B4, 0x000000FF, 0, -1);
+ func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000028, 0x000000B4, 0x000000FF, 0, -1);
break;
case 1:
- func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x00000080, 0x000000FF, 0x000000FF, 0, -1);
+ func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000080, 0x000000FF, 0x000000FF, 0, -1);
break;
case 2:
- func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x00000050, 0x000000C8, 0x000000FF, 0, -1);
+ func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000050, 0x000000C8, 0x000000FF, 0, -1);
break;
case 3:
- func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0, 0x0000009B, 0x000000FF, 0, -1);
+ func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0, 0x0000009B, 0x000000FF, 0, -1);
break;
case 4:
- func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x0000005A, 0x00000080, 0x000000FF, 0, -1);
+ func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x0000005A, 0x00000080, 0x000000FF, 0, -1);
break;
}
}
@@ -2972,7 +2972,7 @@ void func_800791F0(s32 objectIndex, s32 playerId) {
func_800C9018(playerId, SOUND_ARG_LOAD(0x01, 0x00, 0xFA, 0x28));
}
-void init_obj_laikitu_red_flag_countdown(s32 objectIndex, s32 arg1) {
+void init_obj_lakitu_red_flag_countdown(s32 objectIndex, s32 arg1) {
if (arg1 == 0) {
D_801656F0 = 0;
D_8018D168 = 0;
@@ -2980,18 +2980,18 @@ void init_obj_laikitu_red_flag_countdown(s32 objectIndex, s32 arg1) {
init_texture_object(objectIndex, (u8 *) common_tlut_lakitu_countdown, gTextureLakituNoLights1, 0x38U, (u16) 0x00000048);
gObjectList[objectIndex].vertex = D_0D005EB0;
gObjectList[objectIndex].sizeScaling = 0.15f;
- set_object_flag_unk_054_false(objectIndex, 0x00000010);
+ set_object_flag_status_false(objectIndex, 0x00000010);
func_80072488(objectIndex);
gObjectList[objectIndex].unk_048 = D_8018D180;
}
-void update_obj_laikitu_countdown(s32 objectIndex, s32 arg1) {
+void update_object_lakitu_countdown(s32 objectIndex, s32 arg1) {
UNUSED s32 pad;
switch (gObjectList[objectIndex].state) {
case 0:
break;
case 1:
- init_obj_laikitu_red_flag_countdown(objectIndex, arg1);
+ init_obj_lakitu_red_flag_countdown(objectIndex, arg1);
break;
case 2:
func_8007278C(objectIndex, gObjectList[objectIndex].unk_048);
@@ -3000,7 +3000,7 @@ void update_obj_laikitu_countdown(s32 objectIndex, s32 arg1) {
}
break;
case 3:
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
func_80086F10(objectIndex, 1, &D_800E67B8);
func_80072488(objectIndex);
break;
@@ -3064,7 +3064,7 @@ void update_obj_laikitu_countdown(s32 objectIndex, s32 arg1) {
}
}
-void init_obj_laikitu_red_flag(s32 objectIndex, s32 playerIndex) {
+void init_obj_lakitu_red_flag(s32 objectIndex, s32 playerIndex) {
Objects *temp_v0;
func_800791F0(objectIndex, playerIndex);
@@ -3077,19 +3077,19 @@ void init_obj_laikitu_red_flag(s32 objectIndex, s32 playerIndex) {
temp_v0->pos[0] = 5000.0f;
temp_v0->sizeScaling = 0.15f;
func_80086F10(objectIndex, 2, &D_800E6834);
- set_object_flag_unk_054_false(objectIndex, 0x00000010);
+ set_object_flag_status_false(objectIndex, 0x00000010);
func_80072488(objectIndex);
}
-void update_obj_laikitu_red_flag(s32 objectIndex, s32 playerIndex) {
+void update_object_lakitu_red_flag(s32 objectIndex, s32 playerIndex) {
switch (gObjectList[objectIndex].state) {
case 0:
break;
case 1:
- init_obj_laikitu_red_flag(objectIndex, playerIndex);
+ init_obj_lakitu_red_flag(objectIndex, playerIndex);
break;
case 2:
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
func_80072488(objectIndex);
break;
case 3:
@@ -3137,19 +3137,19 @@ void func_80079860(s32 playerId) {
void func_8007993C(s32 objectIndex, Player *player) {
if (player->unk_0CA & 4) {
func_800722A4(objectIndex, 2);
- gObjectList[objectIndex].unk_0A0 = player->unk_0C6;
+ gObjectList[objectIndex].primAlpha = player->unk_0C6;
return;
}
func_800722CC(objectIndex, 2);
}
-void init_obj_laikitu_red_flag_fishing(s32 objectIndex, s32 arg1) {
+void init_obj_lakitu_red_flag_fishing(s32 objectIndex, s32 arg1) {
func_800791F0(objectIndex, arg1);
init_texture_object(objectIndex, common_tlut_lakitu_fishing, gTextureLakituFishing1, 0x38U, (u16) 0x00000048);
gObjectList[objectIndex].vertex = D_0D005F30;
gObjectList[objectIndex].sizeScaling = 0.15f;
func_80086E70(objectIndex);
- set_object_flag_unk_054_false(objectIndex, 0x00000010);
+ set_object_flag_status_false(objectIndex, 0x00000010);
func_80073720(objectIndex);
func_80072488(objectIndex);
func_800C8F80((u8)arg1, 0x0100FA28);
@@ -3163,35 +3163,35 @@ void func_80079A5C(s32 objectIndex, UNUSED Player *player) {
gObjectList[objectIndex].origin_pos[2] = 0.0f;
gObjectList[objectIndex].origin_pos[1] = 0.0f;
gObjectList[objectIndex].origin_pos[0] = 0.0f;
- gObjectList[objectIndex].unk_028[2] = 0.0f;
- gObjectList[objectIndex].unk_028[0] = 0.0f;
- gObjectList[objectIndex].unk_028[1] = 80.0f;
+ gObjectList[objectIndex].offset[2] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
+ gObjectList[objectIndex].offset[1] = 80.0f;
func_80086FD4(objectIndex);
break;
case 2:
- if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 5.0f, 1.0f) != 0) {
+ if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 5.0f, 1.0f) != 0) {
func_80086F60(objectIndex);
}
break;
case 3:
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 100.0f, 1.0f) != 0) {
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 100.0f, 1.0f) != 0) {
func_80086F60(objectIndex);
}
break;
}
}
-void update_obj_laikitu_fishing(s32 objectIndex, s32 playerId) {
+void update_object_lakitu_fishing(s32 objectIndex, s32 playerId) {
Player *player = &gPlayerOne[playerId];
switch (gObjectList[objectIndex].state) { /* switch 1; irregular */
case 0: /* switch 1 */
break;
case 1: /* switch 1 */
- init_obj_laikitu_red_flag_fishing(objectIndex, playerId);
+ init_obj_lakitu_red_flag_fishing(objectIndex, playerId);
break;
case 2: /* switch 1 */
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
func_800736E0(objectIndex);
func_80072488(objectIndex);
break;
@@ -3235,7 +3235,7 @@ void update_obj_laikitu_fishing(s32 objectIndex, s32 playerId) {
func_80079A5C(objectIndex, player);
}
-void update_obj_laikitu_fishing2(s32 objectIndex, s32 playerId) {
+void update_object_lakitu_fishing2(s32 objectIndex, s32 playerId) {
Player *temp_s1;
@@ -3244,10 +3244,10 @@ void update_obj_laikitu_fishing2(s32 objectIndex, s32 playerId) {
case 0: /* switch 1 */
break;
case 1: /* switch 1 */
- init_obj_laikitu_red_flag_fishing(objectIndex, playerId);
+ init_obj_lakitu_red_flag_fishing(objectIndex, playerId);
break;
case 2: /* switch 1 */
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
func_800736E0(objectIndex);
temp_s1->unk_0CA |= 0x80;
func_80072488(objectIndex);
@@ -3326,12 +3326,12 @@ void func_8007A060(s32 objectIndex, s32 playerIndex) {
temp_v0->pos[1] = 5000.0f;
temp_v0->pos[0] = 5000.0f;
temp_v0->sizeScaling = 0.15f;
- set_object_flag_unk_054_false(objectIndex, 0x00000010);
+ set_object_flag_status_false(objectIndex, 0x00000010);
func_80086F10(objectIndex, 5, &D_800E694C);
func_80072488(objectIndex);
}
-void update_obj_laikitu_second_lap(s32 objectIndex, s32 playerIndex) {
+void update_object_lakitu_second_lap(s32 objectIndex, s32 playerIndex) {
switch (gObjectList[objectIndex].state) {
case 0:
break;
@@ -3339,7 +3339,7 @@ void update_obj_laikitu_second_lap(s32 objectIndex, s32 playerIndex) {
func_8007A060(objectIndex, playerIndex);
break;
case 2:
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
func_80072488(objectIndex);
break;
case 3:
@@ -3374,12 +3374,12 @@ void func_8007A228(s32 objectIndex, s32 playerIndex) {
temp_v0->pos[1] = 5000.0f;
temp_v0->pos[0] = 5000.0f;
temp_v0->sizeScaling = 0.15f;
- set_object_flag_unk_054_false(objectIndex, 0x00000010);
+ set_object_flag_status_false(objectIndex, 0x00000010);
func_80086F10(objectIndex, 5, &D_800E694C);
func_80072488(objectIndex);
}
-void update_obj_laikitu_final_lap(s32 objectIndex, s32 playerIndex) {
+void update_object_lakitu_final_lap(s32 objectIndex, s32 playerIndex) {
switch (gObjectList[objectIndex].state) {
case 0:
break;
@@ -3387,7 +3387,7 @@ void update_obj_laikitu_final_lap(s32 objectIndex, s32 playerIndex) {
func_8007A228(objectIndex, playerIndex);
break;
case 2:
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
func_80072488(objectIndex);
break;
case 3:
@@ -3420,14 +3420,14 @@ void func_8007A3F0(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].pos[1] = var;
gObjectList[objectIndex].pos[0] = var;
gObjectList[objectIndex].sizeScaling = 0.15f;
- set_object_flag_unk_054_false(objectIndex, 0x00000010);
+ set_object_flag_status_false(objectIndex, 0x00000010);
func_80086F10(objectIndex, 6, &D_800E69B0);
gObjectList[objectIndex].unk_0D6 = 0;
func_80072488(objectIndex);
func_800C8F80((u8)arg1, 0x0100FA28);
}
-void update_obj_laikitu_reverse(s32 objectIndex, s32 playerId) {
+void update_object_lakitu_reverse(s32 objectIndex, s32 playerId) {
Player *sp2C = &gPlayerOne[playerId];
switch (gObjectList[objectIndex].state) {
@@ -3437,7 +3437,7 @@ void update_obj_laikitu_reverse(s32 objectIndex, s32 playerId) {
func_8007A3F0(objectIndex, playerId);
break;
case 2:
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
gObjectList[objectIndex].unk_0D6 = 1;
func_80072488(objectIndex);
break;
@@ -3472,18 +3472,18 @@ void func_8007A66C(s32 objectIndex, Player *player, Camera *camera) {
u16 temp_t8;
temp_t8 = 0x8000 - camera->rot[1];
- gObjectList[objectIndex].pos[0] = (player->pos[0] + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]))) - (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2]));
- gObjectList[objectIndex].pos[1] = player->unk_074 + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].unk_028[1];
- gObjectList[objectIndex].pos[2] = (player->pos[2] + (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]))) + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2]));
+ gObjectList[objectIndex].pos[0] = (player->pos[0] + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]))) - (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2]));
+ gObjectList[objectIndex].pos[1] = player->unk_074 + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].offset[1];
+ gObjectList[objectIndex].pos[2] = (player->pos[2] + (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]))) + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2]));
}
void func_8007A778(s32 objectIndex, Player *player, Camera *camera) {
u16 temp_t8;
temp_t8 = 0x8000 - camera->rot[1];
- gObjectList[objectIndex].pos[0] = (player->pos[0] + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]))) - (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2]));
- gObjectList[objectIndex].pos[1] = player->pos[1] + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].unk_028[1];
- gObjectList[objectIndex].pos[2] = (player->pos[2] + (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]))) + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2]));
+ gObjectList[objectIndex].pos[0] = (player->pos[0] + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]))) - (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2]));
+ gObjectList[objectIndex].pos[1] = player->pos[1] + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].offset[1];
+ gObjectList[objectIndex].pos[2] = (player->pos[2] + (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]))) + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2]));
}
UNUSED void func_8007A884(void) {
@@ -3509,37 +3509,37 @@ void func_8007A910(s32 arg0) {
func_80079860(arg0);
}
-void update_obj_laikitu(s32 playerId) {
+void update_object_lakitu(s32 playerId) {
s32 objectIndex = gIndexLakituList[playerId];
switch (gObjectList[objectIndex].unk_0D8) {
case 0:
break;
case 1:
- update_obj_laikitu_countdown(objectIndex, playerId);
+ update_object_lakitu_countdown(objectIndex, playerId);
func_8008BFFC(objectIndex);
break;
case 2:
- update_obj_laikitu_red_flag(objectIndex, playerId);
+ update_object_lakitu_red_flag(objectIndex, playerId);
func_8008BFFC(objectIndex);
break;
case 3:
- update_obj_laikitu_fishing(objectIndex, playerId);
+ update_object_lakitu_fishing(objectIndex, playerId);
break;
case 4:
- update_obj_laikitu_second_lap(objectIndex, playerId);
+ update_object_lakitu_second_lap(objectIndex, playerId);
func_8008BFFC(objectIndex);
break;
case 5:
- update_obj_laikitu_final_lap(objectIndex, playerId);
+ update_object_lakitu_final_lap(objectIndex, playerId);
func_8008BFFC(objectIndex);
break;
case 6:
- update_obj_laikitu_reverse(objectIndex, playerId);
+ update_object_lakitu_reverse(objectIndex, playerId);
func_8008BFFC(objectIndex);
break;
case 7:
- update_obj_laikitu_fishing2(objectIndex, playerId);
+ update_object_lakitu_fishing2(objectIndex, playerId);
break;
}
}
@@ -3754,7 +3754,7 @@ s32 func_8007B040(s32 objectIndex, s32 playerId) {
return var_t3;
}
#else
-GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007B040.s")
+GLOBAL_ASM("asm/non_matchings/update_objects/func_8007B040.s")
#endif
void func_8007B254(s32 objectIndex, s32 arg1) {
@@ -3990,7 +3990,7 @@ void func_8007BBBC(s32 objectIndex) {
switch (temp_s1->state) { /* irregular */
case 1:
func_800735BC(objectIndex, d_course_banshee_boardwalk_dl_cheep_cheep, 2.0f);
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
temp_s1->unk_0D5 = 0;
break;
case 2:
@@ -4027,14 +4027,14 @@ void func_8007BD04(s32 playerId) {
}
}
-void func_8007BDA8(void) {
+void update_cheep_cheep_race(void) {
UNUSED s32 pad;
s32 objectIndex;
func_8007BD04(0);
objectIndex = indexObjectList2[0];
func_8007BBBC(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void init_var_cheep_cheep(s32 objectIndex) {
@@ -4042,12 +4042,12 @@ void init_var_cheep_cheep(s32 objectIndex) {
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_0D5 = 1;
- temp_v0->unk_054 = 0;
+ temp_v0->status = 0;
temp_v0->model = d_course_banshee_boardwalk_dl_cheep_cheep;
temp_v0->sizeScaling = 0.2f;
func_80072488(objectIndex);
set_obj_origin_pos(objectIndex, D_800E634C[0][0], D_800E634C[0][1] + 55.0, D_800E634C[0][2]);
- func_8008B80C(objectIndex, 0.0f, 30.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 30.0f, 0.0f);
set_obj_direction_angle(objectIndex, 0U, 0x3800U, 0U);
}
@@ -4061,7 +4061,7 @@ void func_8007BEC8(s32 objectIndex) {
break;
case 2:
if (func_8007278C(objectIndex, 0x0000003C) != 0) {
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
func_80086E70(objectIndex);
}
break;
@@ -4095,8 +4095,8 @@ void func_8007BFB0(s32 objectIndex) {
break;
case 1:
temp_s0->velocity[1] = -0.2f;
- if ((f64) temp_s0->unk_028[1] <= 0.0) {
- temp_s0->unk_028[1] = 0.0f;
+ if ((f64) temp_s0->offset[1] <= 0.0) {
+ temp_s0->offset[1] = 0.0f;
temp_s0->velocity[1] = 0.0f;
func_80086F60(objectIndex);
}
@@ -4141,7 +4141,7 @@ void func_8007BFB0(s32 objectIndex) {
case 7:
temp_s0->sizeScaling = (f32) ((f64) temp_s0->sizeScaling - 0.05);
if ((f64) temp_s0->sizeScaling <= 0.01) {
- set_object_flag_unk_054_false(objectIndex, 0x00000010);
+ set_object_flag_status_false(objectIndex, 0x00000010);
temp_s0->sizeScaling = 0.000001f;
func_80086FD4(objectIndex);
}
@@ -4153,11 +4153,11 @@ void func_8007BFB0(s32 objectIndex) {
if (temp_s0->unk_0AE < 0xA) {
func_80074344(objectIndex, &temp_s0->sizeScaling, 0.2f, 0.21f, 0.001f, 0, -1);
}
- func_800877C4(objectIndex);
- func_8008BF18(objectIndex);
+ object_add_velocity_offset_y(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
-void func_8007C280(void) {
+void update_cheep_cheep_ending(void) {
s32 objectIndex;
objectIndex = indexObjectList2[0];
@@ -4171,19 +4171,19 @@ void func_8007C280(void) {
}
}
-void func_8007C2F8(s32 arg0) {
+void update_cheep_cheep(s32 arg0) {
switch (arg0) {
case 0:
- func_8007BDA8();
+ update_cheep_cheep_race();
break;
case 1:
- func_8007C280();
+ update_cheep_cheep_ending();
break;
}
}
-void func_8007C340(void) {
- func_8007CC00();
+void wrapper_update_boos(void) {
+ update_boos();
}
#ifdef MIPS_TO_C
@@ -4206,17 +4206,17 @@ void func_8007C360(s32 objectIndex, Camera *camera) {
if (temp_t2 < 0x13) {
sp20 = temp_a2;
sp1C = temp_t2;
- set_object_flag_unk_054_false(objectIndex, 0x00000080);
+ set_object_flag_status_false(objectIndex, 0x00000080);
temp_a2->itemDisplay = (s8) sp1C;
return;
}
sp20 = temp_a2;
sp1C = temp_t2;
- set_object_flag_unk_054_true(objectIndex, 0x00000080);
+ set_object_flag_status_true(objectIndex, 0x00000080);
temp_a2->itemDisplay = 0x24 - temp_t2;
}
#else
-GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007C360.s")
+GLOBAL_ASM("asm/non_matchings/update_objects/func_8007C360.s")
#endif
void func_8007C420(s32 objectIndex, Player *player, Camera *camera) {
@@ -4253,17 +4253,17 @@ void func_8007C4A4(s32 objectIndex) {
if (temp_t0 < 0x13) {
sp20 = temp_v1;
sp1C = temp_t0;
- set_object_flag_unk_054_false(objectIndex, 0x00000080);
+ set_object_flag_status_false(objectIndex, 0x00000080);
temp_v1->itemDisplay = (s8) sp1C;
return;
}
sp20 = temp_v1;
sp1C = temp_t0;
- set_object_flag_unk_054_true(objectIndex, 0x00000080);
+ set_object_flag_status_true(objectIndex, 0x00000080);
temp_v1->itemDisplay = 0x24 - temp_t0;
}
#else
-GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007C4A4.s")
+GLOBAL_ASM("asm/non_matchings/update_objects/func_8007C4A4.s")
#endif
void func_8007C550(s32 objectIndex) {
@@ -4279,15 +4279,15 @@ void func_8007C5B4(s32 objectIndex) {
temp_s0->pos[0] = 0.0f;
temp_s0->pos[1] = 0.0f;
temp_s0->pos[2] = 0.0f;
- set_object_flag_unk_054_true(objectIndex, 0x00000020);
+ set_object_flag_status_true(objectIndex, 0x00000020);
func_80072488(objectIndex);
- temp_s0->unk_0A0 = 0;
+ temp_s0->primAlpha = 0;
func_80073844(objectIndex);
temp_s0->sizeScaling = 0.15f;
temp_s0->unk_034 = 1.0f;
func_80073FD4(objectIndex);
func_80086EF0(objectIndex);
- set_object_flag_unk_054_true(objectIndex, 0x00000800);
+ set_object_flag_status_true(objectIndex, 0x00000800);
temp_s0->orientation[0] = 0;
temp_s0->orientation[2] = 0x8000;
}
@@ -4305,13 +4305,13 @@ void func_8007C684(s32 objectIndex) {
case 0:
break;
case 1:
- func_80073998(objectIndex, &gObjectList[objectIndex].unk_0A0, 0, 0x00000050, 2, 1, 0);
+ func_80073998(objectIndex, &gObjectList[objectIndex].primAlpha, 0, 0x00000050, 2, 1, 0);
break;
case 2:
- func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x00000050, 0x00000078, 1, 0, -1);
+ func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000050, 0x00000078, 1, 0, -1);
break;
case 3:
- func_80073DC0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0, 2);
+ func_80073DC0(objectIndex, &gObjectList[objectIndex].primAlpha, 0, 2);
break;
case 4:
func_80072428(objectIndex);
@@ -4438,7 +4438,7 @@ void func_8007CA70(void) {
}
}
-void func_8007CC00(void) {
+void update_boos(void) {
u16 temp_t4;
s32 someIndex;
s32 objectIndex;
@@ -4456,11 +4456,11 @@ void func_8007CC00(void) {
player = &gPlayerOne[object->unk_0D1];
camera = &camera1[object->unk_0D1];
temp_t4 = (0x8000 - camera->rot[1]);
- object->pos[0] = player->pos[0] + (coss(temp_t4) * (object->origin_pos[0] + object->unk_028[0])) - (sins(temp_t4) * (object->origin_pos[2] + object->unk_028[2]));
- object->pos[1] = 6.5 + player->unk_074 + object->origin_pos[1] + object->unk_028[1];
- object->pos[2] = player->pos[2] + (sins(temp_t4) * (object->origin_pos[0] + object->unk_028[0])) + (coss(temp_t4) * (object->origin_pos[2] + object->unk_028[2]));
+ object->pos[0] = player->pos[0] + (coss(temp_t4) * (object->origin_pos[0] + object->offset[0])) - (sins(temp_t4) * (object->origin_pos[2] + object->offset[2]));
+ object->pos[1] = 6.5 + player->unk_074 + object->origin_pos[1] + object->offset[1];
+ object->pos[2] = player->pos[2] + (sins(temp_t4) * (object->origin_pos[0] + object->offset[0])) + (coss(temp_t4) * (object->origin_pos[2] + object->offset[2]));
func_8007C550(objectIndex);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000080) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000080) != 0) {
object->vertex = D_800E44B0;
} else {
object->vertex = D_800E4470;
@@ -4480,7 +4480,7 @@ void func_8007CE0C(s32 objectIndex) {
temp_s0->pos[2] = 0.0f;
temp_s0->sizeScaling = 0.15f;
func_80072488(objectIndex);
- temp_s0->unk_0A0 = 0;
+ temp_s0->primAlpha = 0;
func_80073844(objectIndex);
func_80086EF0(objectIndex);
temp_s0->direction_angle[2] = 0x8000;
@@ -4514,16 +4514,16 @@ void func_8007CEDC(s32 objectIndex) {
func_80073514(objectIndex);
switch (temp_s0->unk_0DC) { /* switch 2 */
case 1: /* switch 2 */
- func_80073998(objectIndex, &temp_s0->unk_0A0, 0x00000028, 0x00000050, 4, 0, 0);
+ func_80073998(objectIndex, &temp_s0->primAlpha, 0x00000028, 0x00000050, 4, 0, 0);
break;
case 2: /* switch 2 */
- func_80073CB0(objectIndex, &temp_s0->unk_0A0, 0x00000050, 0x000000B4, 2, 0, -1);
+ func_80073CB0(objectIndex, &temp_s0->primAlpha, 0x00000050, 0x000000B4, 2, 0, -1);
if ((temp_s0->unk_0AE == 0) || (temp_s0->state == 3)) {
temp_s0->unk_0DC += 1;
}
break;
case 3: /* switch 2 */
- func_80073DC0(objectIndex, &temp_s0->unk_0A0, 0, 4);
+ func_80073DC0(objectIndex, &temp_s0->primAlpha, 0, 4);
break;
case 4: /* switch 2 */
func_80073884(objectIndex);
@@ -4572,11 +4572,11 @@ void func_8007D070(void) {
if (gObjectList[objectIndex].state != 0) {
func_8007CEDC(objectIndex);
func_8008B724(objectIndex);
- gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0];
- gObjectList[objectIndex].pos[1] = D_8018CF1C->unk_074 + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].unk_028[1];
- gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2];
+ gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0];
+ gObjectList[objectIndex].pos[1] = D_8018CF1C->unk_074 + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].offset[1];
+ gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2];
func_8007C420(objectIndex, D_8018CF1C, D_8018CF14);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000080) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000080) != 0) {
gObjectList[objectIndex].vertex = D_800E44B0;
} else {
gObjectList[objectIndex].vertex = D_800E4470;
@@ -4606,9 +4606,9 @@ void func_8007D360(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].direction_angle[0] = 0;
gObjectList[objectIndex].unk_0C6 = 0;
}
- gObjectList[objectIndex].direction_angle[1] = func_80041770(gObjectList[objectIndex].origin_pos[0], gObjectList[objectIndex].unk_01C[0], gObjectList[objectIndex].origin_pos[2], gObjectList[objectIndex].unk_01C[2]);
+ gObjectList[objectIndex].direction_angle[1] = get_angle_between_xy(gObjectList[objectIndex].origin_pos[0], gObjectList[objectIndex].unk_01C[0], gObjectList[objectIndex].origin_pos[2], gObjectList[objectIndex].unk_01C[2]);
gObjectList[objectIndex].direction_angle[2] = 0;
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
gObjectList[objectIndex].unk_0B0 = 0;
if (gCCSelection < CC_150) {
gObjectList[objectIndex].unk_034 = (random_int(4U) + 4.0);
@@ -4625,7 +4625,7 @@ void func_8007D6A8(s32 objectIndex, s32 arg1) {
temp_v0->unk_0D5 = 0x0D;
func_8007D360(objectIndex, arg1);
temp_v0->sizeScaling = 0.1f;
- set_object_flag_unk_054_true(objectIndex, 0x00000200);
+ set_object_flag_status_true(objectIndex, 0x00000200);
temp_v0->boundingBoxSize = 3;
}
@@ -4659,7 +4659,7 @@ s32 func_8007D804(s32 objectIndex) {
someCount = 0;
for (loopIndex = 0; loopIndex < gPlayerCountSelection1; loopIndex++) {
- if (func_8008A140(objectIndex, &camera1[loopIndex], 0x4000U) != 0) {
+ if (is_object_visible_on_camera(objectIndex, &camera1[loopIndex], 0x4000U) != 0) {
someCount += 1;
}
}
@@ -4705,7 +4705,7 @@ void func_8007D8D4(s32 objectIndex, s32 arg1) {
void func_8007DA4C(s32 objectIndex) {
func_8008781C(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_8007DA74(s32 objectIndex) {
@@ -4717,7 +4717,7 @@ void func_8007DA74(s32 objectIndex) {
}
gObjectList[objectIndex].direction_angle[0] = func_800417B4(gObjectList[objectIndex].direction_angle[0], gObjectList[objectIndex].unk_0C6);
func_80087844(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_8007DAF8(s32 objectIndex, s32 arg1) {
@@ -4731,7 +4731,7 @@ void func_8007DAF8(s32 objectIndex, s32 arg1) {
}
}
-void func_8007DB44(void) {
+void update_bat(void) {
s32 var_s2;
s32 temp_s0;
Objects *temp_s1;
@@ -4746,8 +4746,8 @@ void func_8007DB44(void) {
func_80072E54(temp_s0, 0, 3, 1, 0, -1);
func_80073514(temp_s0);
temp_s1 = &gObjectList[temp_s0];
- func_80073CB0(temp_s0, &temp_s1->unk_0A0, -0x00001000, 0x00001000, 0x00000400, 0, -1);
- temp_s1->orientation[2] = temp_s1->unk_0A0 + 0x8000;
+ func_80073CB0(temp_s0, &temp_s1->primAlpha, -0x00001000, 0x00001000, 0x00000400, 0, -1);
+ temp_s1->orientation[2] = temp_s1->primAlpha + 0x8000;
if ((D_8018CFB0 != 0) || (D_8018CFC8 != 0)) {
D_8018CFD8 = 0;
for (var_s2 = 0; var_s2 < 40; var_s2++) {
@@ -4814,7 +4814,7 @@ void func_8007DDC0(s32 objectIndex) {
sp2C = 1150.0f;
}
func_8008A6DC(objectIndex, sp2C);
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) && (func_80072354(objectIndex, 1) != 0)) {
+ if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (func_80072354(objectIndex, 1) != 0)) {
func_800722A4(objectIndex, 1);
func_800C9D80(temp_s0->pos, temp_s0->velocity, SOUND_ARG_LOAD(0x51, 0x02, 0x80, 0x06));
func_800726CC(objectIndex, 3);
@@ -4874,8 +4874,8 @@ void func_8007E00C(s32 objectIndex) {
func_8007D714(1);
}
}
- func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, -0x00002000, 0, 0x00000400, 0, -1);
- gObjectList[objectIndex].orientation[2] = gObjectList[objectIndex].unk_0A0;
+ func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, -0x00002000, 0, 0x00000400, 0, -1);
+ gObjectList[objectIndex].orientation[2] = gObjectList[objectIndex].primAlpha;
if (gObjectList[objectIndex].unk_084[7] == 0) {
func_800C98B8(gObjectList[objectIndex].pos, gObjectList[objectIndex].velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x90, 0x4E));
gObjectList[objectIndex].unk_084[7] = 0x0014;
@@ -4902,7 +4902,7 @@ void func_8007E00C(s32 objectIndex) {
}
}
-void func_8007E1AC(void) {
+void update_trash_bin(void) {
s32 objectIndex = indexObjectList1[1];
func_8007E00C(objectIndex);
if (gModeSelection != TIME_TRIALS) {
@@ -4932,7 +4932,7 @@ void func_8007E1F4(s32 objectIndex) {
sp2C = 700.0f;
}
func_8008A6DC(objectIndex, sp2C);
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) && (func_80072354(objectIndex, 1) != 0)) {
+ if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (func_80072354(objectIndex, 1) != 0)) {
func_800722A4(objectIndex, 1);
func_800C9D80(temp_s0->pos, temp_s0->velocity, SOUND_ARG_LOAD(0x51, 0x02, 0x80, 0x06));
func_800726CC(objectIndex, 3);
@@ -5031,26 +5031,26 @@ s32 func_8007E59C(s32 objectIndex) {
void func_8007E63C(s32 objectIndex) {
switch (gObjectList[objectIndex].state) { /* irregular */
case 0x32:
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], gObjectList[objectIndex].unk_01C[1] + 15.0, 1.5f) != 0) {
- set_object_flag_unk_054_true(objectIndex, 0x00000200);
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], gObjectList[objectIndex].unk_01C[1] + 15.0, 1.5f) != 0) {
+ set_object_flag_status_true(objectIndex, 0x00000200);
func_800722A4(objectIndex, 1);
func_800722CC(objectIndex, 2);
func_80072488(objectIndex);
}
break;
case 0x33:
- if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 2.0f) != 0) {
- if (gObjectList[objectIndex].unk_028[1] >= 16.0f) {
+ if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 0.0f, 2.0f) != 0) {
+ if (gObjectList[objectIndex].offset[1] >= 16.0f) {
gObjectList[objectIndex].itemDisplay = 0;
- } else if (gObjectList[objectIndex].unk_028[1] >= 8.0f) {
+ } else if (gObjectList[objectIndex].offset[1] >= 8.0f) {
gObjectList[objectIndex].itemDisplay = 1;
} else {
gObjectList[objectIndex].itemDisplay = 2;
}
func_800722CC(objectIndex, 1);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00010000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00010000) != 0) {
func_800722A4(objectIndex, 0x00000010);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_800722A4(objectIndex, 0x00000020);
}
}
@@ -5068,13 +5068,13 @@ void func_8007E63C(s32 objectIndex) {
func_80072AAC(objectIndex, 2, 0x00000032);
break;
case 0x36:
- if (gObjectList[objectIndex].unk_028[1] >= 20.0f) {
+ if (gObjectList[objectIndex].offset[1] >= 20.0f) {
gObjectList[objectIndex].itemDisplay = 0;
- } else if (gObjectList[objectIndex].unk_028[1] >= 18.0f) {
+ } else if (gObjectList[objectIndex].offset[1] >= 18.0f) {
gObjectList[objectIndex].itemDisplay = 1;
}
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], gObjectList[objectIndex].unk_01C[1], 0.5f) != 0) {
- set_object_flag_unk_054_false(objectIndex, 0x00000200);
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], gObjectList[objectIndex].unk_01C[1], 0.5f) != 0) {
+ set_object_flag_status_false(objectIndex, 0x00000200);
func_8007266C(objectIndex);
}
break;
@@ -5085,15 +5085,15 @@ void func_8007E63C(s32 objectIndex) {
func_8007278C(objectIndex, 0x0000001E);
break;
case 0x66:
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 20.0f, 1.5f) != 0) {
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 20.0f, 1.5f) != 0) {
func_80072488(objectIndex);
}
break;
case 0x67:
- if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 1.5f) != 0) {
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00020000) != 0) {
+ if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 0.0f, 1.5f) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00020000) != 0) {
func_800722A4(objectIndex, 0x00000010);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_800722A4(objectIndex, 0x00000020);
}
}
@@ -5101,15 +5101,15 @@ void func_8007E63C(s32 objectIndex) {
}
break;
case 0x68:
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 12.0f, 1.5f) != 0) {
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 12.0f, 1.5f) != 0) {
func_80072488(objectIndex);
}
break;
case 0x69:
- if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 1.5f) != 0) {
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00020000) != 0) {
+ if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 0.0f, 1.5f) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00020000) != 0) {
func_800722A4(objectIndex, 0x00000010);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_800722A4(objectIndex, 0x00000020);
}
}
@@ -5123,20 +5123,20 @@ void func_8007E63C(s32 objectIndex) {
}
break;
case 0x6B:
- if (gObjectList[objectIndex].unk_028[1] >= 22.0f) {
+ if (gObjectList[objectIndex].offset[1] >= 22.0f) {
gObjectList[objectIndex].itemDisplay = 0;
- } else if (gObjectList[objectIndex].unk_028[1] >= 20.0f) {
+ } else if (gObjectList[objectIndex].offset[1] >= 20.0f) {
gObjectList[objectIndex].itemDisplay = 1;
- } else if (gObjectList[objectIndex].unk_028[1] >= 18.0f) {
+ } else if (gObjectList[objectIndex].offset[1] >= 18.0f) {
gObjectList[objectIndex].itemDisplay = 2;
- } else if (gObjectList[objectIndex].unk_028[1] >= 16.0f) {
+ } else if (gObjectList[objectIndex].offset[1] >= 16.0f) {
gObjectList[objectIndex].itemDisplay = 3;
- } else if (gObjectList[objectIndex].unk_028[1] >= 14.0f) {
+ } else if (gObjectList[objectIndex].offset[1] >= 14.0f) {
gObjectList[objectIndex].itemDisplay = 4;
} else {
func_800730BC(objectIndex, 3, 5, 1, 6, -1);
}
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], gObjectList[objectIndex].unk_01C[1], 0.5f) != 0) {
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], gObjectList[objectIndex].unk_01C[1], 0.5f) != 0) {
set_object_unk_0CB(objectIndex, 0);
func_80072488(objectIndex);
}
@@ -5144,7 +5144,7 @@ void func_8007E63C(s32 objectIndex) {
case 0x6C:
if (func_8007278C(objectIndex, 0x00000064) != 0) {
func_800722CC(objectIndex, 2);
- set_object_flag_unk_054_false(objectIndex, 0x00000200);
+ set_object_flag_status_false(objectIndex, 0x00000200);
func_8007266C(objectIndex);
}
break;
@@ -5170,7 +5170,7 @@ void func_8007EC30(s32 objectIndex) {
temp_s1 = &gObjectList[objectIndex];
temp_s1->unk_044 = 0.0f;
temp_s1->origin_pos[1] = 0.0f;
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
if (gIsMirrorMode != 0) {
set_obj_direction_angle(objectIndex, 0U, 0x4000U, 0U);
set_obj_orientation(objectIndex, 0U, 0x4000U, 0U);
@@ -5183,7 +5183,7 @@ void func_8007EC30(s32 objectIndex) {
temp_s1->boundingBoxSize = 0x000C;
temp_s1->sizeScaling = 1.0f;
temp_s1->unk_01C[1] = 30.0f;
- set_object_flag_unk_054_true(objectIndex, 0x05000220);
+ set_object_flag_status_true(objectIndex, 0x05000220);
temp_s1->type = 0;
temp_s1->unk_0DF = 6;
func_800724DC(objectIndex);
@@ -5213,7 +5213,7 @@ void func_8007ED6C(s32 objectIndex) {
break;
}
func_8007E63C(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
gObjectList[objectIndex].direction_angle[1] = gObjectList[objectIndex].orientation[1];
func_80073514(objectIndex);
}
@@ -5226,13 +5226,13 @@ void func_8007EE5C(s32 objectIndex) {
temp_s0->sizeScaling = 1.0f;
temp_s0->model = d_course_bowsers_castle_dl_thwomp;
temp_s0->boundingBoxSize = 0x000C;
- set_object_flag_unk_054_true(objectIndex, 0x04000220);
+ set_object_flag_status_true(objectIndex, 0x04000220);
temp_s0->type = 0;
temp_s0->unk_0DF = 6;
func_80086E70(objectIndex);
temp_s0->unk_044 = 0.0f;
temp_s0->origin_pos[1] = 0.0f;
- func_8008B80C(objectIndex, 0.0f, 20.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 20.0f, 0.0f);
temp_s0->unk_01C[1] = 20.0f;
if (gIsMirrorMode != 0) {
set_obj_direction_angle(objectIndex, 0U, 0x4000U, 0U);
@@ -5242,7 +5242,7 @@ void func_8007EE5C(s32 objectIndex) {
set_obj_orientation(objectIndex, 0U, 0xC000U, 0U);
}
temp_s0->unk_0AE = 1;
- if (temp_s0->unk_0A0 == 0) {
+ if (temp_s0->primAlpha == 0) {
temp_s0->unk_0DD = 1;
} else {
temp_s0->unk_0DD = 2;
@@ -5259,7 +5259,7 @@ void func_8007EFBC(s32 objectIndex) {
}
break;
case 2:
- if (f32_step_towards(gObjectList[objectIndex].unk_028, gObjectList[objectIndex].unk_01C[0], 4.0f) != 0) {
+ if (f32_step_towards(gObjectList[objectIndex].offset, gObjectList[objectIndex].unk_01C[0], 4.0f) != 0) {
func_80086FD4(objectIndex);
}
break;
@@ -5275,7 +5275,7 @@ void func_8007EFBC(s32 objectIndex) {
}
break;
case 6:
- if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[2], -100.0f, 2.0f) != 0) {
+ if (f32_step_down_towards(&gObjectList[objectIndex].offset[2], -100.0f, 2.0f) != 0) {
func_80086FD4(objectIndex);
}
break;
@@ -5291,7 +5291,7 @@ void func_8007EFBC(s32 objectIndex) {
}
break;
case 10:
- if (f32_step_towards(gObjectList[objectIndex].unk_028, 0.0f, 4.0f) != 0) {
+ if (f32_step_towards(gObjectList[objectIndex].offset, 0.0f, 4.0f) != 0) {
func_80086FD4(objectIndex);
}
break;
@@ -5307,7 +5307,7 @@ void func_8007EFBC(s32 objectIndex) {
}
break;
case 14:
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, 2.0f) != 0) {
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[2], 0.0f, 2.0f) != 0) {
func_80086FD4(objectIndex);
}
break;
@@ -5335,7 +5335,7 @@ void func_8007F280(s32 objectIndex) {
}
break;
case 2:
- if (f32_step_towards(gObjectList[objectIndex].unk_028, gObjectList[objectIndex].unk_01C[0], 4.0f) != 0) {
+ if (f32_step_towards(gObjectList[objectIndex].offset, gObjectList[objectIndex].unk_01C[0], 4.0f) != 0) {
func_80086FD4(objectIndex);
}
break;
@@ -5351,7 +5351,7 @@ void func_8007F280(s32 objectIndex) {
}
break;
case 6:
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[2], 100.0f, 2.0f) != 0) {
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[2], 100.0f, 2.0f) != 0) {
func_80086FD4(objectIndex);
}
break;
@@ -5367,7 +5367,7 @@ void func_8007F280(s32 objectIndex) {
}
break;
case 10:
- if (f32_step_towards(gObjectList[objectIndex].unk_028, 0.0f, 4.0f) != 0) {
+ if (f32_step_towards(gObjectList[objectIndex].offset, 0.0f, 4.0f) != 0) {
func_80086FD4(objectIndex);
}
break;
@@ -5383,7 +5383,7 @@ void func_8007F280(s32 objectIndex) {
}
break;
case 14:
- if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, 2.0f) != 0) {
+ if (f32_step_down_towards(&gObjectList[objectIndex].offset[2], 0.0f, 2.0f) != 0) {
func_80086FD4(objectIndex);
}
break;
@@ -5431,7 +5431,7 @@ void func_8007F5A8(s32 objectIndex) {
}
func_8007E63C(objectIndex);
func_8007F544(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
func_80073514(objectIndex);
}
@@ -5525,11 +5525,11 @@ void func_8007FA08(s32 objectIndex) {
temp_s0->model = d_course_bowsers_castle_dl_thwomp;
temp_s0->boundingBoxSize = 0x000C;
temp_s0->sizeScaling = 1.0f;
- set_object_flag_unk_054_true(objectIndex, 0x04000220);
+ set_object_flag_status_true(objectIndex, 0x04000220);
temp_s0->type = 0;
temp_s0->unk_044 = 0.0f;
temp_s0->origin_pos[1] = 0.0f;
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
set_obj_direction_angle(objectIndex, 0U, 0U, 0U);
if (gIsMirrorMode != 0) {
set_obj_orientation(objectIndex, 0U, 0xC000U, 0U);
@@ -5540,7 +5540,7 @@ void func_8007FA08(s32 objectIndex) {
temp_s0->direction_angle[1] = temp_s0->orientation[1];
temp_s0->unk_0DD = 1;
temp_s0->unk_0DF = 8;
- temp_s0->unk_028[1] = 15.0f;
+ temp_s0->offset[1] = 15.0f;
temp_s0->unk_01C[1] = 15.0f;
func_80072488(objectIndex);
}
@@ -5554,8 +5554,8 @@ void func_8007FB48(s32 objectIndex) {
switch (gObjectList[objectIndex].unk_0AE) {
case 1:
gObjectList[objectIndex].unk_0B0 = 0x00A0;
- gObjectList[objectIndex].unk_028[0] = 0.0f;
- gObjectList[objectIndex].unk_028[2] = 0.0f;
+ gObjectList[objectIndex].offset[0] = 0.0f;
+ gObjectList[objectIndex].offset[2] = 0.0f;
gObjectList[objectIndex].velocity[2] = 0.0f;
func_80086FD4(objectIndex);
break;
@@ -5570,14 +5570,14 @@ void func_8007FB48(s32 objectIndex) {
}
}
if (gObjectList[objectIndex].velocity[2] >= 0.0) {
- if (gObjectList[objectIndex].unk_028[2] >= 40.0) {
+ if (gObjectList[objectIndex].offset[2] >= 40.0) {
gObjectList[objectIndex].velocity[2] = -1.5f;
}
- } else if ((f64) gObjectList[objectIndex].unk_028[2] <= -40.0) {
+ } else if ((f64) gObjectList[objectIndex].offset[2] <= -40.0) {
gObjectList[objectIndex].velocity[2] = 1.5f;
}
}
- func_8008775C(objectIndex);
+ object_add_velocity_offset_xz(objectIndex);
if (gObjectList[objectIndex].unk_0B0 < 0x65) {
gObjectList[objectIndex].orientation[1] = func_800417B4(gObjectList[objectIndex].orientation[1], (gObjectList[objectIndex].direction_angle[1] + 0x8000));
if (gObjectList[objectIndex].unk_0B0 == 0x0064) {
@@ -5586,10 +5586,10 @@ void func_8007FB48(s32 objectIndex) {
}
var_v0 = 0;
if (gIsMirrorMode != 0) {
- if (gObjectList[objectIndex].unk_028[0] <= -1000.0) {
+ if (gObjectList[objectIndex].offset[0] <= -1000.0) {
var_v0 = 1;
}
- } else if (gObjectList[objectIndex].unk_028[0] >= 1000.0) {
+ } else if (gObjectList[objectIndex].offset[0] >= 1000.0) {
var_v0 = 1;
}
gObjectList[objectIndex].unk_0B0--;
@@ -5600,9 +5600,9 @@ void func_8007FB48(s32 objectIndex) {
}
break;
case 4:
- f32_step_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, 2.0f);
- f32_step_towards(gObjectList[objectIndex].unk_028, 0.0f, 5.0f);
- if ((gObjectList[objectIndex].unk_028[0] + gObjectList[objectIndex].unk_028[2]) == 0.0) {
+ f32_step_towards(&gObjectList[objectIndex].offset[2], 0.0f, 2.0f);
+ f32_step_towards(gObjectList[objectIndex].offset, 0.0f, 5.0f);
+ if ((gObjectList[objectIndex].offset[0] + gObjectList[objectIndex].offset[2]) == 0.0) {
func_80086FD4(objectIndex);
}
break;
@@ -5627,7 +5627,7 @@ void func_8007FEA4(s32 objectIndex) {
temp_v1 = &gObjectList[objectIndex];
switch (temp_v1->unk_0AE) {
case 1:
- if (f32_step_towards(&temp_v1->unk_028[0], temp_v1->unk_01C[0], 5.0f) != 0) {
+ if (f32_step_towards(&temp_v1->offset[0], temp_v1->unk_01C[0], 5.0f) != 0) {
func_800726CC(objectIndex, 3);
func_80086FD4(objectIndex);
break;
@@ -5636,7 +5636,7 @@ void func_8007FEA4(s32 objectIndex) {
case 2:
break;
case 3:
- if (f32_step_towards(&temp_v1->unk_028[0], 0.0f, 5.0f) != 0) {
+ if (f32_step_towards(&temp_v1->offset[0], 0.0f, 5.0f) != 0) {
func_80086FD4(objectIndex);
func_800722CC(objectIndex, 8);
}
@@ -5673,7 +5673,7 @@ void func_8007FFC0(s32 objectIndex) {
}
func_8007E63C(objectIndex);
func_8007FF5C(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
func_80073514(objectIndex);
}
@@ -5685,20 +5685,20 @@ void func_80080078(s32 objectIndex) {
temp_s0->model = d_course_bowsers_castle_dl_thwomp;
temp_s0->boundingBoxSize = 0x000C;
temp_s0->sizeScaling = 1.0f;
- set_object_flag_unk_054_true(objectIndex, 0x04000220);
+ set_object_flag_status_true(objectIndex, 0x04000220);
temp_s0->type = 2;
temp_s0->unk_0DF = 8;
set_obj_direction_angle(objectIndex, 0U, 0U, 0U);
temp_s0->unk_044 = 0.0f;
temp_s0->origin_pos[1] = 0.0f;
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
temp_s0->unk_01C[1] = 30.0f;
if (gIsMirrorMode != 0) {
set_obj_orientation(objectIndex, 0U, 0x4000U, 0U);
} else {
set_obj_orientation(objectIndex, 0U, 0xC000U, 0U);
}
- switch (temp_s0->unk_0A0) { /* irregular */
+ switch (temp_s0->primAlpha) { /* irregular */
case 0:
temp_s0->unk_050 = 2;
break;
@@ -5738,7 +5738,7 @@ void func_800801FC(s32 objectIndex) {
break;
}
func_8007E63C(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
func_80073514(objectIndex);
}
@@ -5752,22 +5752,22 @@ void func_800802C0(s32 objectIndex) {
temp_s0->itemDisplay = 0;
temp_s0->boundingBoxSize = 0x000C;
temp_s0->sizeScaling = 1.5f;
- set_object_flag_unk_054_true(objectIndex, 0x05000220);
+ set_object_flag_status_true(objectIndex, 0x05000220);
temp_s0->type = 1;
temp_s0->unk_0DF = 6;
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
set_obj_direction_angle(objectIndex, 0U, 0U, 0U);
temp_s0->unk_044 = 0.0f;
temp_s0->origin_pos[1] = 0.0f;
- temp_s0->unk_028[1] = 10.0f;
+ temp_s0->offset[1] = 10.0f;
temp_s0->unk_01C[1] = 10.0f;
if (gIsMirrorMode != 0) {
set_obj_orientation(objectIndex, 0U, 0x4000U, 0U);
} else {
set_obj_orientation(objectIndex, 0U, 0xC000U, 0U);
}
- temp_s0->unk_028[0] = 0.0f;
- temp_s0->unk_028[2] = 0.0f;
+ temp_s0->offset[0] = 0.0f;
+ temp_s0->offset[2] = 0.0f;
func_800724DC(objectIndex);
func_80072488(objectIndex);
}
@@ -5781,7 +5781,7 @@ void func_80080408(s32 objectIndex) {
break;
case 2:
func_8008A6DC(objectIndex, 100.0f);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_800C98B8(gObjectList[objectIndex].pos, gObjectList[objectIndex].velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x45));
func_80072488(objectIndex);
}
@@ -5797,7 +5797,7 @@ void func_80080408(s32 objectIndex) {
}
break;
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
func_80073514(objectIndex);
}
@@ -5810,11 +5810,11 @@ void func_80080524(s32 objectIndex) {
temp_s0->boundingBoxSize = 0x000C;
temp_s0->itemDisplay = 0;
temp_s0->sizeScaling = 1.0f;
- set_object_flag_unk_054_true(objectIndex, 0x04000220);
+ set_object_flag_status_true(objectIndex, 0x04000220);
temp_s0->type = 0;
temp_s0->unk_0DF = 0x0A;
func_80086E70(objectIndex);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
temp_s0->unk_044 = 70.0f;
temp_s0->origin_pos[1] = 70.0f;
temp_s0->unk_01C[1] = 0.0f;
@@ -5824,7 +5824,7 @@ void func_80080524(s32 objectIndex) {
} else {
set_obj_orientation(objectIndex, 0U, 0x4000U, 0U);
}
- switch (temp_s0->unk_0A0) { /* irregular */
+ switch (temp_s0->primAlpha) { /* irregular */
case 0:
temp_s0->unk_0DD = 2;
temp_s0->velocity[2] = -1.0f;
@@ -5843,13 +5843,13 @@ void func_800806BC(s32 objectIndex) {
case 0:
break;
case 1:
- if (f32_step_towards(&gObjectList[objectIndex].unk_028[2], 250.0f, gObjectList[objectIndex].velocity[2]) != 0) {
+ if (f32_step_towards(&gObjectList[objectIndex].offset[2], 250.0f, gObjectList[objectIndex].velocity[2]) != 0) {
gObjectList[objectIndex].velocity[2] = -gObjectList[objectIndex].velocity[2];
func_80086FD4(objectIndex);
}
break;
case 2:
- if (f32_step_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, gObjectList[objectIndex].velocity[2]) != 0) {
+ if (f32_step_towards(&gObjectList[objectIndex].offset[2], 0.0f, gObjectList[objectIndex].velocity[2]) != 0) {
gObjectList[objectIndex].velocity[2] = -gObjectList[objectIndex].velocity[2];
func_8008701C(objectIndex, 1);
}
@@ -5862,13 +5862,13 @@ void func_8008078C(s32 objectIndex) {
case 0:
break;
case 1:
- if (f32_step_towards(&gObjectList[objectIndex].unk_028[2], -250.0f, gObjectList[objectIndex].velocity[2]) != 0) {
+ if (f32_step_towards(&gObjectList[objectIndex].offset[2], -250.0f, gObjectList[objectIndex].velocity[2]) != 0) {
gObjectList[objectIndex].velocity[2] = -gObjectList[objectIndex].velocity[2];
func_80086FD4(objectIndex);
}
break;
case 2:
- if (f32_step_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, gObjectList[objectIndex].velocity[2]) != 0) {
+ if (f32_step_towards(&gObjectList[objectIndex].offset[2], 0.0f, gObjectList[objectIndex].velocity[2]) != 0) {
gObjectList[objectIndex].velocity[2] = -gObjectList[objectIndex].velocity[2];
func_8008701C(objectIndex, 1);
}
@@ -5885,7 +5885,7 @@ void func_8008085C(s32 objectIndex) {
func_8008078C(objectIndex);
break;
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_800808CC(s32 objectIndex) {
@@ -5936,7 +5936,7 @@ void func_80080B28(s32 objectIndex, s32 playerId) {
Player *temp_s0;
temp_s0 = &gPlayerOne[playerId];
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) {
if (!(temp_s0->soundEffects & 0x100)) {
temp_f0 = func_80088F54(objectIndex, temp_s0);
if ((temp_f0 <= 9.0) && !(temp_s0->effects & 0x04000000) && (has_collided_horizontally_with_player(objectIndex, temp_s0) != 0)) {
@@ -5951,7 +5951,7 @@ void func_80080B28(s32 objectIndex, s32 playerId) {
}
func_80080DE4(objectIndex);
func_80075304(gObjectList[objectIndex].pos, 3, 3, D_8018D3C4);
- set_object_flag_unk_054_false(objectIndex, 0x00000200);
+ set_object_flag_status_false(objectIndex, 0x00000200);
func_800722A4(objectIndex, 0x00000040);
func_80086F60(objectIndex);
func_800726CC(objectIndex, 0x000000C8);
@@ -5959,7 +5959,7 @@ void func_80080B28(s32 objectIndex, s32 playerId) {
}
} else if ((temp_f0 <= 17.5) && (func_80072320(objectIndex, 1) != 0) && (is_within_horizontal_distance_of_player(objectIndex, temp_s0, (temp_s0->unk_094 * 0.5) + 7.0) != 0)) {
if ((temp_s0->type & 0x8000) && !(temp_s0->type & 0x100)) {
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
func_800722A4(objectIndex, 2);
@@ -6012,7 +6012,7 @@ void func_80080E8C(s32 objectIndex1, s32 objectIndex2, s32 arg2) {
gObjectList[objectIndex1].velocity[2] = coss(anAngle) * 0.6;
}
#else
-GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80080E8C.s")
+GLOBAL_ASM("asm/non_matchings/update_objects/func_80080E8C.s")
#endif
void func_80080FEC(s32 arg0) {
@@ -6032,13 +6032,13 @@ void func_80081080(s32 objectIndex) {
temp_v0 = &gObjectList[objectIndex];
temp_v0->activeTexture = D_8018D490;
temp_v0->textureList = D_8018D490;
- temp_v0->unk_0A0 = 0x00FF;
+ temp_v0->primAlpha = 0x00FF;
temp_v0->direction_angle[1] = 0;
temp_v0->orientation[0] = 0;
temp_v0->orientation[2] = 0;
- temp_v0->unk_028[0] = 0.0f;
- temp_v0->unk_028[1] = 0.0f;
- temp_v0->unk_028[2] = 0.0f;
+ temp_v0->offset[0] = 0.0f;
+ temp_v0->offset[1] = 0.0f;
+ temp_v0->offset[2] = 0.0f;
temp_v0->sizeScaling = 0.25f;
func_80072488(objectIndex);
}
@@ -6051,10 +6051,10 @@ void func_800810F4(s32 objectIndex) {
func_80081080(objectIndex);
break;
case 2:
- func_8008775C(objectIndex);
- f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 14.0f, 0.5f);
+ object_add_velocity_offset_xz(objectIndex);
+ f32_step_up_towards(&gObjectList[objectIndex].offset[1], 14.0f, 0.5f);
func_8007415C(objectIndex, &gObjectList[objectIndex].sizeScaling, 0.25f, 0.75f, 0.025f, 1, 0);
- if (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x000000FF, 0, 4, 0, 0) != 0) {
+ if (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0x000000FF, 0, 4, 0, 0) != 0) {
func_80072488(objectIndex);
}
break;
@@ -6062,9 +6062,10 @@ void func_800810F4(s32 objectIndex) {
func_80072428(objectIndex);
break;
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
+// update twomp I think
void func_80081208(void) {
}
@@ -6117,10 +6118,10 @@ void func_80081210(void) {
if (!(player->effects & BOO_EFFECT)) {
func_80080B28(objectIndex, var_s4);
}
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00020000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00020000) != 0) {
func_80080A14(objectIndex, player);
}
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00010000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00010000) != 0) {
func_80080A4C(objectIndex, var_s4);
}
}
@@ -6187,7 +6188,7 @@ void func_80081790(s32 objectIndex) {
if (func_80087E08(objectIndex, gObjectList[objectIndex].velocity[1], 0.3f, gObjectList[objectIndex].unk_034, gObjectList[objectIndex].orientation[1], 0x00000032) != 0) {
func_80072488(objectIndex);
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
break;
case 2:
func_80072428(objectIndex);
@@ -6200,19 +6201,19 @@ void func_80081848(s32 objectIndex) {
init_texture_object(objectIndex, d_course_moo_moo_farm_mole_tlut, (u8*) d_course_moo_moo_farm_mole_frames, 0x20U, (u16) 0x00000040);
gObjectList[objectIndex].sizeScaling = 0.15f;
gObjectList[objectIndex].itemDisplay = 0;
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
set_obj_direction_angle(objectIndex, 0U, 0U, 0U);
set_obj_orientation(objectIndex, 0U, 0U, 0x8000U);
gObjectList[objectIndex].boundingBoxSize = 6;
gObjectList[objectIndex].velocity[1] = 4.0f;
- set_object_flag_unk_054_true(objectIndex, 0x04000000);
+ set_object_flag_status_true(objectIndex, 0x04000000);
func_80072488(objectIndex);
}
void func_80081924(s32 objectIndex) {
switch (gObjectList[objectIndex].unk_0AE) {
case 1:
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 9.0f, 0.7f) != 0) {
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 9.0f, 0.7f) != 0) {
func_80086FD4(objectIndex);
}
break;
@@ -6220,7 +6221,7 @@ void func_80081924(s32 objectIndex) {
func_800871AC(objectIndex, 0x0000000A);
break;
case 3:
- if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 3.0f, 1.0f) != 0) {
+ if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 3.0f, 1.0f) != 0) {
func_80086F60(objectIndex);
}
break;
@@ -6234,7 +6235,7 @@ void func_80081924(s32 objectIndex) {
gObjectList[objectIndex].orientation[2] += 0x1000;
gObjectList[objectIndex].velocity[1] -= 0.184;
func_8008751C(objectIndex);
- func_80087710(objectIndex);
+ object_add_velocity_offset_xyz(objectIndex);
if (gObjectList[objectIndex].pos[1] <= -10.0) {
func_80086F60(objectIndex);
}
@@ -6256,7 +6257,7 @@ void func_80081A88(s32 objectIndex) {
func_80081924(objectIndex);
break;
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_80081AFC(s32 objectIndex, s32 arg1) {
@@ -6272,7 +6273,7 @@ void func_80081AFC(s32 objectIndex, s32 arg1) {
if (temp_s0->unk_04C == 0) {
func_80086EAC(objectIndex, 2, 1);
func_80072488(objectIndex);
- set_object_flag_unk_054_true(objectIndex, 0x00000200);
+ set_object_flag_status_true(objectIndex, 0x00000200);
} else {
temp_s0->unk_04C--;
}
@@ -6298,7 +6299,7 @@ void func_80081AFC(s32 objectIndex, s32 arg1) {
break;
case 0x64:
if (temp_s0->unk_0AE == 0) {
- set_object_flag_unk_054_false(objectIndex, 0x00000200);
+ set_object_flag_status_false(objectIndex, 0x00000200);
func_80072428(objectIndex);
switch (arg1) { /* switch 1; irregular */
case 1: /* switch 1 */
@@ -6334,11 +6335,11 @@ void func_80081D34(s32 objectIndex) {
var_s1 = gPlayerOne;
var_s4 = camera1;
for (var_s2 = 0; var_s2 < D_8018D158; var_s2++, var_s1++, var_s4++) {
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) && !(var_s1->effects & 0x80000000) && (has_collided_with_player(objectIndex, var_s1) != 0)) {
+ if ((is_obj_flag_status_active(objectIndex, 0x00000200) != 0) && !(var_s1->effects & 0x80000000) && (has_collided_with_player(objectIndex, var_s1) != 0)) {
if ((var_s1->type & 0x8000) && !(var_s1->type & 0x100)) {
var_s5 = 1;
temp_s0 = &gObjectList[objectIndex];
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) {
func_80072180();
}
if (var_s1->effects & 0x200) {
@@ -6360,10 +6361,10 @@ void func_80081D34(s32 objectIndex) {
}
if (var_s5 != 0) {
temp_s0 = &gObjectList[objectIndex];
- set_object_flag_unk_054_false(objectIndex, 0x00000200);
+ set_object_flag_status_false(objectIndex, 0x00000200);
func_80086F60(objectIndex);
set_obj_origin_pos(objectIndex, temp_s0->pos[0], temp_s0->pos[1], temp_s0->pos[2]);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
func_80086EAC(objectIndex, 2, 0x000A);
func_800726CC(objectIndex, 0x0000000A);
}
@@ -6428,7 +6429,7 @@ void func_80081FF4(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].origin_pos[2] = gMoleSpawns[var_v1][offset + 2];
}
#else
-GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80081FF4.s")
+GLOBAL_ASM("asm/non_matchings/update_objects/func_80081FF4.s")
#endif
void func_800821AC(s32 objectIndex, s32 arg1) {
@@ -6439,7 +6440,7 @@ void func_800821AC(s32 objectIndex, s32 arg1) {
}
}
-void func_800821FC(void) {
+void update_moles(void) {
s32 var_s1;
s32 objectIndex;
UNUSED s32 stackPadding;
@@ -6510,7 +6511,7 @@ void func_8008241C(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].unk_034 = 1.0f;
func_80086EF0(objectIndex);
gObjectList[objectIndex].spline = D_800E633C[arg1 % 4];
- set_object_flag_unk_054_true(objectIndex, 0x00000800);
+ set_object_flag_status_true(objectIndex, 0x00000800);
func_80072488(objectIndex);
}
@@ -6530,29 +6531,29 @@ void func_8008275C(s32 objectIndex) {
switch (gObjectList[objectIndex].unk_0DD) { /* irregular */
case 1:
func_8008B78C(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
break;
case 2:
func_8008B78C(objectIndex);
vec3f_copy(gObjectList[objectIndex].unk_01C, gObjectList[objectIndex].pos);
- func_8000D940(gObjectList[objectIndex].origin_pos, (s16 *) &gObjectList[objectIndex].unk_0C6, gObjectList[objectIndex].unk_034, 0.0f, 0);
- gObjectList[objectIndex].unk_028[0] *= 2.0;
- gObjectList[objectIndex].unk_028[1] *= 2.5;
- gObjectList[objectIndex].unk_028[2] *= 2.0;
- func_8008BF18(objectIndex);
- gObjectList[objectIndex].direction_angle[1] = get_angle_between_points(gObjectList[objectIndex].unk_01C, gObjectList[objectIndex].pos);
+ func_8000D940(gObjectList[objectIndex].origin_pos, &gObjectList[objectIndex].unk_0C6, gObjectList[objectIndex].unk_034, 0.0f, 0);
+ gObjectList[objectIndex].offset[0] *= 2.0;
+ gObjectList[objectIndex].offset[1] *= 2.5;
+ gObjectList[objectIndex].offset[2] *= 2.0;
+ object_calculate_new_pos_offset(objectIndex);
+ gObjectList[objectIndex].direction_angle[1] = get_angle_between_two_vectors(gObjectList[objectIndex].unk_01C, gObjectList[objectIndex].pos);
break;
}
func_800873F4(objectIndex);
}
-void func_80082870(void) {
+void update_seagulls(void) {
Objects *temp_s1;
UNUSED s32 *var_s4;
s32 temp_s0;
s32 var_s3;
- for (var_s3 = 0; var_s3 < 10; var_s3++) {
+ for (var_s3 = 0; var_s3 < NUM_SEAGULLS; var_s3++) {
temp_s0 = indexObjectList2[var_s3];
temp_s1 = &gObjectList[temp_s0];
@@ -6567,7 +6568,7 @@ void func_80082870(void) {
D_80183E40[0] = 0.0f;
D_80183E40[1] = 0.0f;
D_80183E40[2] = 0.0f;
- if (gGamestate != 9) {
+ if (gGamestate != CREDITS_SEQUENCE) {
func_800C98B8(temp_s1->pos, D_80183E40, SOUND_ARG_LOAD(0x19, 0x01, 0x70, 0x43));
} else {
temp_s0 = indexObjectList2[1];
@@ -6603,12 +6604,12 @@ void init_ktb_crab(s32 objectIndex) {
object->itemDisplay = 0;
func_80072488(objectIndex);
object->boundingBoxSize = 1;
- set_object_flag_unk_054_true(objectIndex, 0x04000420);
+ set_object_flag_status_true(objectIndex, 0x04000420);
func_80086EAC(objectIndex, 0, 1);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
set_obj_orientation(objectIndex, 0U, 0U, 0x8000U);
object->unk_034 = 1.5f;
- set_object_flag_unk_054_true(objectIndex, 0x00000200);
+ set_object_flag_status_true(objectIndex, 0x00000200);
}
void func_80082B34(s32 objectIndex, UNUSED s32 unused) {
@@ -6664,8 +6665,8 @@ void func_80082C30(s32 objectIndex) {
}
break;
}
- func_8008BF18(objectIndex);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
+ object_calculate_new_pos_offset(objectIndex);
+ if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) {
func_80088538(objectIndex);
gObjectList[objectIndex].pos[1] = (f32) (gObjectList[objectIndex].unk_044 + 2.5);
}
@@ -6677,7 +6678,7 @@ void func_80082E18(s32 objectIndex) {
}
}
-void func_80082E5C(void) {
+void update_crabs(void) {
s32 objectIndex;
s32 var_s1;
@@ -6701,11 +6702,11 @@ void func_80082F1C(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].sizeScaling = 0.027f;
func_80072488(objectIndex);
set_obj_origin_pos(objectIndex, D_800E5DF4[arg1].pos[0] * xOrientation, D_800E5DF4[arg1].pos[1], D_800E5DF4[arg1].pos[2]);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
set_obj_direction_angle(objectIndex, 0U, D_800E5DF4[arg1].rot, 0U);
}
#else
-GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80082F1C.s")
+GLOBAL_ASM("asm/non_matchings/update_objects/func_80082F1C.s")
#endif
void func_80083018(s32 objectIndex, s32 arg1) {
@@ -6720,7 +6721,7 @@ void func_80083018(s32 objectIndex, s32 arg1) {
}
void func_80083060(s32 objectIndex) {
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_80083080(void) {
@@ -6747,11 +6748,11 @@ void func_8008311C(s32 objectIndex, s32 arg1) {
temp_s0->sizeScaling = 0.2f;
temp_s0->itemDisplay = 0;
func_80072488(objectIndex);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
set_obj_orientation(objectIndex, 0U, 0U, 0x8000U);
temp_s0->unk_034 = ((arg1 % 6) * 0.1) + 0.5;
func_80086E70(objectIndex);
- set_object_flag_unk_054_true(objectIndex, 0x04000600);
+ set_object_flag_status_true(objectIndex, 0x04000600);
temp_s0->boundingBoxSize = 2;
}
@@ -6778,9 +6779,9 @@ void func_80083248(s32 objectIndex) {
}
break;
}
- func_8008BF18(objectIndex);
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00200000) != 0) {
- if (is_obj_index_flag_unk_054_active(objectIndex, 0x00400000) != 0) {
+ object_calculate_new_pos_offset(objectIndex);
+ if (is_obj_flag_status_active(objectIndex, 0x00200000) != 0) {
+ if (is_obj_flag_status_active(objectIndex, 0x00400000) != 0) {
func_8008861C(objectIndex);
}
gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].unk_044 + 6.0;
@@ -6811,11 +6812,11 @@ void func_80083474(s32 objectIndex) {
}
}
-void func_800834B8(void) {
+void update_hedgehogs(void) {
s32 temp_s1;
s32 var_s0;
- for (var_s0 = 0; var_s0 < 0xF; var_s0++) {
+ for (var_s0 = 0; var_s0 < NUM_HEDGEHOGS; var_s0++) {
temp_s1 = indexObjectList2[var_s0];
func_800833D0(temp_s1, var_s0);
func_80083248(temp_s1);
@@ -6843,7 +6844,7 @@ void func_80083538(s32 objectIndex, Vec3f arg1, s32 arg2, s32 arg3) {
temp_s0->origin_pos[0] = arg1[0];
temp_s0->origin_pos[1] = arg1[1];
temp_s0->origin_pos[2] = arg1[2];
- temp_s0->unk_0A0 = random_int(0x4000U) + 0x1000;
+ temp_s0->primAlpha = random_int(0x4000U) + 0x1000;
}
void func_800836F0(Vec3f arg0) {
@@ -6871,8 +6872,8 @@ void func_8008379C(s32 objectIndex) {
func_80072428(objectIndex);
break;
}
- func_8008BF18(objectIndex);
- gObjectList[objectIndex].orientation[2] += gObjectList[objectIndex].unk_0A0;
+ object_calculate_new_pos_offset(objectIndex);
+ gObjectList[objectIndex].orientation[2] += gObjectList[objectIndex].primAlpha;
}
void func_80083868(s32 objectIndex) {
@@ -6884,14 +6885,14 @@ void func_80083868(s32 objectIndex) {
temp_s0->sizeScaling = 0.1f;
temp_s0->itemDisplay = 0;
func_80072488(objectIndex);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
temp_s0->orientation[0] = 0;
temp_s0->orientation[1] = 0;
temp_s0->orientation[2] = 0x8000;
- temp_s0->unk_0A0 = random_int(0x2000U) - 0x1000;
+ temp_s0->primAlpha = random_int(0x2000U) - 0x1000;
func_80086E70(objectIndex);
temp_s0->unk_034 = 1.5f;
- set_object_flag_unk_054_true(objectIndex, 0x00000200);
+ set_object_flag_status_true(objectIndex, 0x00000200);
}
void func_80083948(s32 objectIndex) {
@@ -6912,7 +6913,7 @@ void func_80083948(s32 objectIndex) {
func_80087D24(objectIndex, 0.0f, 0.2f, -7.0f);
break;
case 20:
- if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 0.2f) != 0) {
+ if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 0.0f, 0.2f) != 0) {
func_80073800(objectIndex, 0);
func_8008701C(objectIndex, 1);
}
@@ -6921,9 +6922,9 @@ void func_80083948(s32 objectIndex) {
default:
break;
}
- func_8008BF18(objectIndex);
- func_80073D0C(objectIndex, &gObjectList[objectIndex].unk_0A0, -0x00001000, 0x00001000, 0x00000400, 1, -1);
- gObjectList[objectIndex].orientation[2] = gObjectList[objectIndex].unk_0A0 + 0x8000;
+ object_calculate_new_pos_offset(objectIndex);
+ func_80073D0C(objectIndex, &gObjectList[objectIndex].primAlpha, -0x00001000, 0x00001000, 0x00000400, 1, -1);
+ gObjectList[objectIndex].orientation[2] = gObjectList[objectIndex].primAlpha + 0x8000;
}
void func_80083A94(s32 objectIndex) {
@@ -6946,17 +6947,17 @@ void func_80083B0C(s32 objectIndex) {
gObjectList[objectIndex].sizeScaling = 0.1f;
gObjectList[objectIndex].itemDisplay = 0;
func_80072488(objectIndex);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
gObjectList[objectIndex].orientation[0] = 0;
gObjectList[objectIndex].orientation[1] = 0;
gObjectList[objectIndex].orientation[2] = 0x8000;
gObjectList[objectIndex].boundingBoxSize = 2;
gObjectList[objectIndex].unk_034 = 1.5f;
- set_object_flag_unk_054_true(objectIndex, 0x04000210);
+ set_object_flag_status_true(objectIndex, 0x04000210);
}
void func_80083BE4(s32 objectIndex) {
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_80083C04(s32 objectIndex) {
@@ -6979,7 +6980,7 @@ void func_80083C04(s32 objectIndex) {
break;
case 11:
if (func_8007278C(objectIndex, 0x0000000A) != 0) {
- set_object_flag_unk_054_true(objectIndex, 0x00000010);
+ set_object_flag_status_true(objectIndex, 0x00000010);
temp_s1->sizeScaling = 0.001f;
}
break;
@@ -6990,7 +6991,7 @@ void func_80083C04(s32 objectIndex) {
break;
case 13:
func_800726CC(objectIndex, 2);
- set_object_flag_unk_054_false(objectIndex, 0x00001000);
+ set_object_flag_status_false(objectIndex, 0x00001000);
break;
}
if (temp_s1->state >= 2) {
@@ -6999,7 +7000,7 @@ void func_80083C04(s32 objectIndex) {
func_80083BE4(objectIndex);
}
-void func_80083D60(void) {
+void update_snowmen(void) {
s32 var_s0;
s32 var_s3;
s32 var_s4;
@@ -7018,16 +7019,16 @@ void func_80083D60(void) {
if (var_s0) {} // ??
}
- for (var_s0 = 0; var_s0 < 19; var_s0++) {
+ for (var_s0 = 0; var_s0 < NUM_SNOWMEN; var_s0++) {
var_s4 = indexObjectList1[var_s0];
var_s3 = indexObjectList2[var_s0];
func_80083A94(var_s3);
func_80083C04(var_s4);
- if (is_obj_index_flag_unk_054_inactive(var_s4, 0x00001000) != 0) {
+ if (is_obj_index_flag_status_inactive(var_s4, 0x00001000) != 0) {
temp_s1 = &gObjectList[var_s4];
if ((func_8008A8B0(temp_s1->unk_0D5 - 1, temp_s1->unk_0D5 + 1) != 0) && (func_80089B50(var_s4) != 0)) {
- set_object_flag_unk_054_true(var_s4, 0x00001000);
- set_object_flag_unk_054_false(var_s4, 0x00000010);
+ set_object_flag_status_true(var_s4, 0x00001000);
+ set_object_flag_status_false(var_s4, 0x00000010);
func_800726CC(var_s4, 0x0000000A);
func_8008701C(var_s3, 0x0000000A);
func_800836F0(temp_s1->pos);
@@ -7047,7 +7048,7 @@ void func_80083F18(s32 objectIndex) {
if (func_80087E08(objectIndex, gObjectList[objectIndex].velocity[1], 0.12f, gObjectList[objectIndex].unk_034, gObjectList[objectIndex].direction_angle[1], 0x00000064) != 0) {
func_80072488(objectIndex);
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
break;
case 2:
func_80086F60(objectIndex);
@@ -7131,7 +7132,7 @@ void func_80084430(s32 objectIndex, UNUSED s32 arg1) {
temp_s0->unk_0DD = 1;
func_80086EF0(objectIndex);
temp_s0->spline = D_800E672C[0];
- set_object_flag_unk_054_true(objectIndex, 0x04000800);
+ set_object_flag_status_true(objectIndex, 0x04000800);
temp_s0->type = func_80004EAC(d_course_sherbet_land_unk_data11, 0);
func_80072488(objectIndex);
}
@@ -7161,7 +7162,7 @@ void func_800845C8(s32 objectIndex, s32 arg1) {
temp_s0->boundingBoxSize = 4;
temp_s0->unk_09C = 2;
temp_s0->unk_04C = random_int(0x012CU);
- set_object_flag_unk_054_true(objectIndex, 0x04000220);
+ set_object_flag_status_true(objectIndex, 0x04000220);
if ((arg1 > 0) && (arg1 < 9)) {
if ((arg1 == 1) || (arg1 == 2)) {
set_obj_origin_pos(objectIndex, xOrientation * -2960.0, -80.0f, 1521.0f);
@@ -7380,7 +7381,7 @@ void func_80084D2C(s32 objectIndex, s32 arg1) {
break;
}
func_8008781C(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_80085024(void) {
@@ -7389,13 +7390,13 @@ void func_80085024(void) {
void func_8008502C(s32 objectIndex, UNUSED s32 arg1) {
func_80088038(objectIndex, gObjectList[objectIndex].unk_01C[1], gObjectList[objectIndex].unk_0C6);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
func_800873F4(objectIndex);
}
void func_80085080(s32 objectIndex) {
func_8008B78C(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
func_800873F4(objectIndex);
}
@@ -7444,12 +7445,12 @@ void func_800850B0(s32 objectIndex, s32 arg1) {
}
}
-void func_80085214(void) {
+void update_penguins(void) {
UNUSED s32 var_s2;
s32 objectIndex;
s32 var_s1;
- for (var_s1 = 0; var_s1 < 0xF; var_s1++) {
+ for (var_s1 = 0; var_s1 < NUM_PENGUINS; var_s1++) {
objectIndex = indexObjectList1[var_s1];
if (gObjectList[objectIndex].state != 0) {
if (var_s1 == 0) {
@@ -7466,22 +7467,22 @@ void func_80085214(void) {
} else {
func_80089820(objectIndex, 1.5f, 1.25f, 0x1900A046U);
}
- if ((is_obj_index_flag_unk_054_active(objectIndex, 0x02000000) != 0) && (func_80072354(objectIndex, 0x00000020) != 0)) {
+ if ((is_obj_flag_status_active(objectIndex, 0x02000000) != 0) && (func_80072354(objectIndex, 0x00000020) != 0)) {
func_800722A4(objectIndex, 0x00000060);
- set_object_flag_unk_054_false(objectIndex, 0x02000000);
+ set_object_flag_status_false(objectIndex, 0x02000000);
}
}
}
-void func_800853DC(s32 objectIndex) {
+void init_hot_air_balloon(s32 objectIndex) {
gObjectList[objectIndex].sizeScaling = 1.0f;
gObjectList[objectIndex].model = d_course_luigi_raceway_dl_F960;
if (gGamestate != 9) {
set_obj_origin_pos(objectIndex, xOrientation * -176.0, 0.0f, -2323.0f);
- func_8008B80C(objectIndex, 0.0f, 300.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 300.0f, 0.0f);
} else {
set_obj_origin_pos(objectIndex, xOrientation * -1250.0, 0.0f, 1110.0f);
- func_8008B80C(objectIndex, 0.0f, 300.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 300.0f, 0.0f);
}
func_8008B844(objectIndex);
func_800886F4(objectIndex);
@@ -7494,7 +7495,7 @@ void func_800853DC(s32 objectIndex) {
void func_80085534(s32 objectIndex) {
switch (gObjectList[objectIndex].unk_0AE) {
case 1:
- if (gObjectList[objectIndex].unk_028[1] <= 18.0) {
+ if (gObjectList[objectIndex].offset[1] <= 18.0) {
func_80086FD4(objectIndex);
}
break;
@@ -7538,14 +7539,14 @@ void func_80085534(s32 objectIndex) {
}
break;
}
- func_800877C4(objectIndex);
+ object_add_velocity_offset_y(objectIndex);
gObjectList[objectIndex].direction_angle[1] += 0x100;
}
void func_80085768(s32 objectIndex) {
switch (gObjectList[objectIndex].state) { /* irregular */
case 1:
- func_800853DC(objectIndex);
+ init_hot_air_balloon(objectIndex);
break;
case 0:
case 2:
@@ -7553,18 +7554,18 @@ void func_80085768(s32 objectIndex) {
}
}
-void func_800857C0(void) {
+void update_hot_air_balloon(void) {
s32 objectIndex;
objectIndex = indexObjectList1[0];
if (gObjectList[objectIndex].state != 0) {
func_80085768(objectIndex);
func_80085534(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
if (gObjectList[objectIndex].state >= 2) {
- D_802BA05C->pos[0] = gObjectList[objectIndex].pos[0];
- D_802BA05C->pos[1] = gObjectList[objectIndex].pos[1] - 10.0;
- D_802BA05C->pos[2] = gObjectList[objectIndex].pos[2];
+ gActorHotAirBalloonItemBox->pos[0] = gObjectList[objectIndex].pos[0];
+ gActorHotAirBalloonItemBox->pos[1] = gObjectList[objectIndex].pos[1] - 10.0;
+ gActorHotAirBalloonItemBox->pos[2] = gObjectList[objectIndex].pos[2];
}
}
}
@@ -7579,11 +7580,11 @@ void func_80085878(s32 objectIndex, s32 arg1) {
temp_s0->vertex = (Vtx *) d_rainbow_road_unk3;
temp_s0->sizeScaling = 0.03f;
temp_s0->boundingBoxSize = 0x000A;
- set_object_flag_unk_054_true(objectIndex, 0x04000200);
+ set_object_flag_status_true(objectIndex, 0x04000200);
temp_s0->unk_084[8] = (arg1 * 0x12C) + 0x1F4;
set_obj_origin_pos(objectIndex, 0.0f, -15.0f, 0.0f);
temp_v0 = &D_80164490[(u16)temp_s0->unk_084[8]];
- func_8008B80C(objectIndex, temp_v0->posX, temp_v0->posY, temp_v0->posZ);
+ set_obj_origin_offset(objectIndex, temp_v0->posX, temp_v0->posY, temp_v0->posZ);
set_obj_direction_angle(objectIndex, 0U, 0U, 0U);
temp_s0->unk_034 = 4.0f;
temp_s0->type = func_80004EAC(d_rainbow_road_unk3, 0);
@@ -7610,20 +7611,20 @@ void func_800859C8(s32 objectIndex, s32 arg1) {
func_80074344(objectIndex, &temp_s0->unk_044, -0.8f, 0.8f, 0.03f, 0, -1);
}
-void func_80085AA8(void) {
+void update_chain_chomps(void) {
s32 objectIndex;
s32 var_s4;
Objects *temp_s0;
- for (var_s4 = 0; var_s4 < 3; var_s4++) {
+ for (var_s4 = 0; var_s4 < NUM_CHAIN_CHOMPS; var_s4++) {
objectIndex = indexObjectList2[var_s4];
temp_s0 = &gObjectList[objectIndex];
if (temp_s0->state != 0) {
func_800859C8(objectIndex, var_s4);
- vec3f_copy(temp_s0->unk_01C, temp_s0->unk_028);
- func_8000D940(temp_s0->unk_028, &temp_s0->unk_084[8], temp_s0->unk_034, temp_s0->unk_044, 0);
- temp_s0->direction_angle[1] = get_angle_between_points(temp_s0->unk_01C, temp_s0->unk_028);
- func_8008BF18(objectIndex);
+ vec3f_copy(temp_s0->unk_01C, temp_s0->offset);
+ func_8000D940(temp_s0->offset, &temp_s0->unk_084[8], temp_s0->unk_034, temp_s0->unk_044, 0);
+ temp_s0->direction_angle[1] = get_angle_between_two_vectors(temp_s0->unk_01C, temp_s0->offset);
+ object_calculate_new_pos_offset(objectIndex);
func_80089CBC(objectIndex, 30.0f);
}
}
@@ -7631,7 +7632,7 @@ void func_80085AA8(void) {
void func_80085BB4(s32 objectIndex) {
gObjectList[objectIndex].sizeScaling = 8.0f;
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
set_obj_orientation(objectIndex, 0U, 0U, 0x8000U);
func_80072488(objectIndex);
}
@@ -7754,7 +7755,7 @@ void func_80086074(s32 objectIndex, s32 arg1) {
func_80085BB4(objectIndex);
}
#else
-GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80086074.s")
+GLOBAL_ASM("asm/non_matchings/update_objects/func_80086074.s")
#endif
void func_80086110(s32 objectIndex, s32 arg1) {
@@ -7767,7 +7768,7 @@ void func_80086110(s32 objectIndex, s32 arg1) {
}
}
-void update_obj_neon(s32 objectIndex, s32 id) {
+void update_object_neon(s32 objectIndex, s32 id) {
switch (id) { /* irregular */
case 0:
func_80085CA0(objectIndex);
@@ -7791,10 +7792,10 @@ void update_neon(void) {
for (id = 0; id < NUM_NEON_SIGNS; id++) {
objectIndex = indexObjectList1[id];
if (gObjectList[objectIndex].state != 0) {
- update_obj_neon(objectIndex, id);
+ update_object_neon(objectIndex, id);
if (gObjectList[objectIndex].state >= 2) {
update_neon_texture(objectIndex);
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
}
}
@@ -7819,7 +7820,7 @@ void func_8008629C(s32 objectIndex, s32 arg1) {
}
gObjectList[objectIndex].sizeScaling = 1.0f;
set_obj_origin_pos(objectIndex, D_800E634C[0][0] - 1.5, D_800E634C[0][1], D_800E634C[0][2]);
- func_8008B80C(objectIndex, 0.0f, -10.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, -10.0f, 0.0f);
set_obj_direction_angle(objectIndex, 0U, 0xF8E4U, 0U);
gObjectList[objectIndex].unk_048 = 0;
func_80072488(objectIndex);
@@ -7834,18 +7835,18 @@ void func_80086424(s32 objectIndex) {
func_80086FD4(objectIndex);
break;
case 2:
- if (gObjectList[objectIndex].unk_028[1] >= -2.0) {
+ if (gObjectList[objectIndex].offset[1] >= -2.0) {
gObjectList[objectIndex].velocity[1] -= 0.1;
}
- func_800877C4(objectIndex);
- if (gObjectList[objectIndex].unk_028[1] >= 0.0) {
- gObjectList[objectIndex].unk_028[1] = 0.0f;
+ object_add_velocity_offset_y(objectIndex);
+ if (gObjectList[objectIndex].offset[1] >= 0.0) {
+ gObjectList[objectIndex].offset[1] = 0.0f;
gObjectList[objectIndex].velocity[1] = 0.0f;
func_80086F60(objectIndex);
}
break;
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_80086528(s32 objectIndex, s32 arg1) {
@@ -7925,7 +7926,7 @@ void func_80086700(s32 objectIndex) {
}
gObjectList[objectIndex].sizeScaling = 0.005f;
set_obj_origin_pos(objectIndex, gObjectList[indexObjectList2[0]].pos[0], gObjectList[indexObjectList2[0]].pos[1] + 16.0, gObjectList[indexObjectList2[0]].pos[2]);
- func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
+ set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);
set_obj_direction_angle(objectIndex, 0U, 0U, 0U);
gObjectList[objectIndex].unk_084[1] = 0x0200;
func_80072488(objectIndex);
@@ -7957,7 +7958,7 @@ void func_80086940(s32 objectIndex) {
temp_s0->velocity[1] = -0.4f;
func_80086FD4(objectIndex);
temp_s0->origin_pos[1] = 90.0f;
- temp_s0->unk_028[1] = 60.0f;
+ temp_s0->offset[1] = 60.0f;
switch (D_802874D8.unk1D) { /* switch 1; irregular */
case 1: /* switch 1 */
temp_s0->origin_pos[0] -= 3.0;
@@ -7970,11 +7971,11 @@ void func_80086940(s32 objectIndex) {
}
break;
case 5:
- if ((f64) temp_s0->unk_028[1] <= 8.0) {
+ if ((f64) temp_s0->offset[1] <= 8.0) {
f32_step_towards(&temp_s0->velocity[1], -0.1f, -0.01f);
}
- func_800877C4(objectIndex);
- if ((f64) temp_s0->unk_028[1] <= 0.0) {
+ object_add_velocity_offset_y(objectIndex);
+ if ((f64) temp_s0->offset[1] <= 0.0) {
func_80086FD4(objectIndex);
}
break;
@@ -7998,7 +7999,7 @@ void func_80086940(s32 objectIndex) {
temp_s0->direction_angle[0] += 0x400;
temp_s0->direction_angle[1] -= 0x200;
}
- func_8008BF18(objectIndex);
+ object_calculate_new_pos_offset(objectIndex);
}
void func_80086C14(s32 objectIndex) {
diff --git a/src/code_80071F00.h b/src/update_objects.h
index 18d353b0d..4350d5125 100644
--- a/src/code_80071F00.h
+++ b/src/update_objects.h
@@ -1,5 +1,5 @@
-#ifndef CODE_80071F00_H
-#define CODE_80071F00_H
+#ifndef UPDATE_OBJECTS_H
+#define UPDATE_OBJECTS_H
#include "code_80004740.h"
#include "common_structs.h"
@@ -16,11 +16,11 @@ s32 add_unused_obj_index(s32*, s32*, s32);
void delete_object_wrapper(s32*);
void func_80072120(s32*, s32);
void func_80072180(void);
-void set_object_flag_unk_054_true(s32, s32);
-void set_object_flag_unk_054_false(s32, s32);
+void set_object_flag_status_true(s32, s32);
+void set_object_flag_status_false(s32, s32);
void func_80072214(s32, s32);
-s32 is_obj_index_flag_unk_054_active(s32, s32);
-s32 is_obj_index_flag_unk_054_inactive(s32, s32);
+s32 is_obj_flag_status_active(s32, s32);
+s32 is_obj_index_flag_status_inactive(s32, s32);
void func_800722A4(s32, s32);
void func_800722CC(s32, s32);
void func_800722F8(s32, s32);
@@ -148,33 +148,33 @@ void func_80076958(s32);
void func_800769D8(s32);
void func_80076AEC(s32);
void func_80076B7C(void);
-void update_particle_bowser_castle(void);
-void func_80076C9C(s32, Vec3f, s16);
-void func_80076D70(Vec3f, f32, s16);
+void update_flame_particle(void);
+void init_object_smoke_paticle(s32, Vec3f, s16);
+void init_smoke_particle(Vec3f, f32, s16);
void func_80076DC4(s32);
void func_80076E14(s32);
void func_80076ED8(s32);
void func_80076F2C(void);
-void func_80076FEC(s32, s32);
-void func_800770F0(s32);
+void init_object_smoke_particle(s32, s32);
+void init_smoke_particles(s32);
void func_800773D8(f32*, s32);
void func_80077428(s32);
void func_80077450(s32);
void func_80077584(s32);
void func_80077640(void);
-void init_leaf_particle(s32, Vec3f, s32);
-s32 func_80077A54(Vec3f, s32);
-void func_80077AB0(Vec3f, s32);
+void init_object_leaf_particle(s32, Vec3f, s32);
+s32 init_leaf_particle(Vec3f, s32);
+void spawn_leaf(Vec3f, s32);
void func_80077B14(s32);
void func_80077B3C(s32);
void func_80077BCC(s32);
-void func_80077C9C(void);
+void update_leaf(void);
void func_80077E20(s32);
void func_80078220(s32);
void func_80078288(s32);
void func_800786EC(s32);
void func_80078790(void);
-void func_80078838(void);
+void update_snowflakes(void);
void func_800788F8(s32, u16, Camera*);
void func_800789AC(s32, Camera*, Vec4s*);
void func_80078C68(void);
@@ -195,7 +195,7 @@ void func_8007A778(s32, Player*, Camera*);
void func_8007A884(void);
void func_8007A88C(s32);
void func_8007A910(s32);
-void update_obj_laikitu(s32);
+void update_object_lakitu(s32);
void func_8007AA44(s32);
void func_8007ABFC(s32, s32);
void consume_item(s32);
@@ -209,13 +209,13 @@ void func_8007B34C(s32);
void func_8007BB9C(s32);
void func_8007BBBC(s32);
void func_8007BD04(s32);
-void func_8007BDA8(void);
+void update_cheep_cheep_race(void);
void init_var_cheep_cheep(s32);
void func_8007BEC8(s32);
void func_8007BFB0(s32);
-void func_8007C280(void);
-void func_8007C2F8(s32);
-void func_8007C340(void);
+void update_cheep_cheep_ending(void);
+void update_cheep_cheep(s32);
+void wrapper_update_boos(void);
void func_8007C360(s32, Camera*);
void func_8007C420(s32, Player*, Camera*);
void func_8007C4A4(s32);
@@ -227,7 +227,7 @@ void func_8007C7B4(s32, s32);
void func_8007C91C(s32);
s32 func_8007C9F8(void);
void func_8007CA70(void);
-void func_8007CC00(void);
+void update_boos(void);
void func_8007CE0C(s32);
void func_8007CEDC(s32);
void func_8007D070(void);
@@ -241,11 +241,11 @@ void func_8007D8D4(s32, s32);
void func_8007DA4C(s32);
void func_8007DA74(s32);
void func_8007DAF8(s32, s32);
-void func_8007DB44(void);
+void update_bat(void);
void func_8007DDC0(s32);
void init_bb_trash_bin(s32);
void func_8007E00C(s32);
-void func_8007E1AC(void);
+void update_trash_bin(void);
void func_8007E1F4(s32);
void func_8007E358(s32);
void func_8007E3EC(s32);
@@ -297,16 +297,16 @@ void func_80081AFC(s32, s32);
void func_80081D34(s32);
void func_80081FF4(s32, s32);
void func_800821AC(s32, s32);
-void func_800821FC(void);
+void update_moles(void);
void func_8008241C(s32, s32);
void func_80082714(s32, s32);
void func_8008275C(s32);
-void func_80082870(void);
+void update_seagulls(void);
void init_ktb_crab(s32);
void func_80082B34(s32, s32);
void func_80082C30(s32);
void func_80082E18(s32);
-void func_80082E5C(void);
+void update_crabs(void);
void func_80082F1C(s32, s32);
void func_80083018(s32, s32);
void func_80083060(s32);
@@ -315,7 +315,7 @@ void func_8008311C(s32, s32);
void func_80083248(s32);
void func_800833D0(s32, s32);
void func_80083474(s32);
-void func_800834B8(void);
+void update_hedgehogs(void);
void func_80083538(s32, Vec3f, s32, s32);
void func_800836F0(Vec3f);
void func_8008379C(s32);
@@ -325,7 +325,7 @@ void func_80083A94(s32);
void func_80083B0C(s32);
void func_80083BE4(s32);
void func_80083C04(s32);
-void func_80083D60(void);
+void update_snowmen(void);
void func_80083F18(s32);
void func_80083FD0(s32, s32, s32);
void func_8008421C(s32, s32);
@@ -339,13 +339,13 @@ void func_80085024(void);
void func_8008502C(s32, s32);
void func_80085080(s32);
void func_800850B0(s32, s32);
-void func_800853DC(s32);
+void init_hot_air_balloon(s32);
void func_80085534(s32);
void func_80085768(s32);
-void func_800857C0(void);
+void update_hot_air_balloon(void);
void func_80085878(s32, s32);
void func_800859C8(s32, s32);
-void func_80085AA8(void);
+void update_chain_chomps(void);
void func_80085BB4(s32);
void init_obj_neon_mushroom(s32);
void func_80085CA0(s32);
@@ -355,7 +355,7 @@ void func_80085EF8(s32);
void func_80085F74(s32);
void func_80086074(s32, s32);
void func_80086110(s32, s32);
-void update_obj_neon(s32, s32);
+void update_object_neon(s32, s32);
void update_neon(void);
void func_8008629C(s32, s32);
void func_80086424(s32);
@@ -376,7 +376,7 @@ extern Vtx D_800E4470[];
extern Vtx D_800E44B0[];
extern u8 *gItemWindowTLUTs[];
extern u8 *gItemWindowTextures[];
-extern u8 *D_800E4570[];
+extern u8 *gHudLapTextures[];
extern u8 *gPortraitTLUTs[];
extern u8 *gPortraitTextures[];