mirror of
https://github.com/n64decomp/mk64
synced 2026-07-01 10:58:50 -04:00
Document render/update objects (#565)
* Document objects related code. * Including render/update objects code * Various renamings
This commit is contained in:
+87
-115
@@ -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:
|
||||
|
||||
+8
-9
@@ -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[];
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
+26
-26
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+14
-14
@@ -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);
|
||||
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 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);
|
||||
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 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);
|
||||
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 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);
|
||||
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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user