mirror of https://github.com/n64decomp/mk64.git
Merge e35e5014da
into f5caebc5de
This commit is contained in:
commit
43764f839f
|
@ -822,7 +822,13 @@ typedef short ENVMIX_STATE[40];
|
||||||
/*
|
/*
|
||||||
* See aEnvMixer for more info.
|
* See aEnvMixer for more info.
|
||||||
*/
|
*/
|
||||||
#define aEnvSetup1Alt(pkt,initialVolReverb,rampReverbL,rampReverbR,rampLeft,rampRight) { Acmd *_a = (Acmd *)pkt; _a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | _SHIFTL(initialVolReverb, 16, 8) | (_SHIFTL(rampReverbL, 8, 8)) | _SHIFTL(rampReverbR, 0, 8)); _a->words.w1 = _SHIFTL(rampLeft, 16, 16) | _SHIFTL(rampRight, 0, 16); }
|
#define aEnvSetup1Alt(pkt, initialVolReverb, rampReverbL, rampReverbR, rampLeft, rampRight) \
|
||||||
|
{ \
|
||||||
|
Acmd* _a = (Acmd*) pkt; \
|
||||||
|
_a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | _SHIFTL(initialVolReverb, 16, 8) | \
|
||||||
|
(_SHIFTL(rampReverbL, 8, 8)) | _SHIFTL(rampReverbR, 0, 8)); \
|
||||||
|
_a->words.w1 = _SHIFTL(rampLeft, 16, 16) | _SHIFTL(rampRight, 0, 16); \
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See aEnvMixer for more info.
|
* See aEnvMixer for more info.
|
||||||
|
|
|
@ -73,12 +73,12 @@
|
||||||
|
|
||||||
// Float version required for matching
|
// Float version required for matching
|
||||||
#ifdef VERSION_EU
|
#ifdef VERSION_EU
|
||||||
#define COURSE_TIMER_ITER 0.020041665999999999 // 1 / 50
|
#define COURSE_TIMER_ITER 0.020041665999999999 // 1 / 50
|
||||||
#ifdef AVOID_UB
|
#ifdef AVOID_UB
|
||||||
#define COURSE_TIMER_ITER_f 0.020041665999999999f // 1 / 50
|
#define COURSE_TIMER_ITER_f 0.020041665999999999f // 1 / 50
|
||||||
#else
|
#else
|
||||||
#define COURSE_TIMER_ITER_f 0.01666666f //! 1 / 60 - Float unchanged in EU
|
#define COURSE_TIMER_ITER_f 0.01666666f //! 1 / 60 - Float unchanged in EU
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define COURSE_TIMER_ITER 0.01666666 // 1 / 60
|
#define COURSE_TIMER_ITER 0.01666666 // 1 / 60
|
||||||
#define COURSE_TIMER_ITER_f 0.01666666f // 1 / 60
|
#define COURSE_TIMER_ITER_f 0.01666666f // 1 / 60
|
||||||
|
|
|
@ -32,7 +32,7 @@ enum SeqId {
|
||||||
SEQ_EVENT_CEREMONY_PRESENTATION_PART2_WIN, // 0x1B (27)
|
SEQ_EVENT_CEREMONY_PRESENTATION_PART2_WIN, // 0x1B (27)
|
||||||
SEQ_EVENT_CEREMONY_TROPHY_CREDITS, // 0x1C (28)
|
SEQ_EVENT_CEREMONY_TROPHY_CREDITS, // 0x1C (28)
|
||||||
SEQ_EVENT_CEREMONY_PRESENTATION_PART2_LOSE, // 0x1D (29)
|
SEQ_EVENT_CEREMONY_PRESENTATION_PART2_LOSE, // 0x1D (29)
|
||||||
SEQ_COUNT
|
SEQ_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SEQ_IDS_H
|
#endif // SEQ_IDS_H
|
||||||
|
|
|
@ -172,8 +172,8 @@ s16 func_802B3FD0(Player* owner, struct ShellActor* shell) {
|
||||||
if (gPlayerBalloonCount[playerIndex] < 0) {
|
if (gPlayerBalloonCount[playerIndex] < 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// dist_squared_bugged is not quite a 3D distance function, it doubles (rather than squares) the Z difference of the
|
// dist_squared_bugged is not quite a 3D distance function, it doubles (rather than squares) the Z difference of
|
||||||
// positions
|
// the positions
|
||||||
playerToShellDistance = dist_squared_bugged(player->pos, shell->pos);
|
playerToShellDistance = dist_squared_bugged(player->pos, shell->pos);
|
||||||
if (playerToShellDistance < smallestDistance) {
|
if (playerToShellDistance < smallestDistance) {
|
||||||
smallestDistance = playerToShellDistance;
|
smallestDistance = playerToShellDistance;
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
* @param arg2
|
* @param arg2
|
||||||
*/
|
*/
|
||||||
void render_actor_cow(Camera* camera, Mat4 arg1, struct Actor* arg2) {
|
void render_actor_cow(Camera* camera, Mat4 arg1, struct Actor* arg2) {
|
||||||
if (distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1],
|
if (distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f) < 0) {
|
||||||
4000000.0f) < 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ void render_actor_fake_item_box(Camera* camera, struct FakeItemBox* fakeItemBox)
|
||||||
f32 someMultiplier;
|
f32 someMultiplier;
|
||||||
|
|
||||||
if (distance_if_visible(camera->pos, fakeItemBox->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1],
|
if (distance_if_visible(camera->pos, fakeItemBox->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1],
|
||||||
1000000.0f) < 0) {
|
1000000.0f) < 0) {
|
||||||
actor_not_rendered(camera, (struct Actor*) fakeItemBox);
|
actor_not_rendered(camera, (struct Actor*) fakeItemBox);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ void render_actor_falling_rock(Camera* camera, struct FallingRock* rock) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
height = distance_if_visible(camera->pos, rock->pos, camera->rot[1], 400.0f, gCameraZoom[camera - camera1],
|
height =
|
||||||
4000000.0f);
|
distance_if_visible(camera->pos, rock->pos, camera->rot[1], 400.0f, gCameraZoom[camera - camera1], 4000000.0f);
|
||||||
|
|
||||||
if (height < 0.0f) {
|
if (height < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -27,7 +27,7 @@ void render_actor_item_box(Camera* camera, struct ItemBox* item_box) {
|
||||||
f32 someMultiplier;
|
f32 someMultiplier;
|
||||||
|
|
||||||
temp_f0 = distance_if_visible(camera->pos, item_box->pos, camera->rot[1], 0.0f, gCameraZoom[camera - camera1],
|
temp_f0 = distance_if_visible(camera->pos, item_box->pos, camera->rot[1], 0.0f, gCameraZoom[camera - camera1],
|
||||||
4000000.0f);
|
4000000.0f);
|
||||||
if (!(temp_f0 < 0.0f) && !(600000.0f < temp_f0)) {
|
if (!(temp_f0 < 0.0f) && !(600000.0f < temp_f0)) {
|
||||||
if ((item_box->state == 2) && (temp_f0 < 100000.0f)) {
|
if ((item_box->state == 2) && (temp_f0 < 100000.0f)) {
|
||||||
someRot[0] = 0;
|
someRot[0] = 0;
|
||||||
|
|
|
@ -28,8 +28,7 @@ void render_actor_paddle_boat(Camera* arg0, struct PaddleWheelBoat* boat, UNUSED
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp =
|
temp = distance_if_visible(arg0->pos, boat->pos, arg0->rot[1], 90000.0f, gCameraZoom[arg0 - camera1], 9000000.0f);
|
||||||
distance_if_visible(arg0->pos, boat->pos, arg0->rot[1], 90000.0f, gCameraZoom[arg0 - camera1], 9000000.0f);
|
|
||||||
|
|
||||||
if (temp < 0.0f) {
|
if (temp < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -20,8 +20,7 @@ void render_actor_palm_tree(Camera* arg0, UNUSED Mat4 arg1, struct PalmTree* arg
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(arg0->pos, arg2->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f);
|
||||||
distance_if_visible(arg0->pos, arg2->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f);
|
|
||||||
|
|
||||||
if (!(temp_f0 < 0.0f)) {
|
if (!(temp_f0 < 0.0f)) {
|
||||||
if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) {
|
if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) {
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
void render_actor_railroad_crossing(Camera* arg0, struct RailroadCrossing* rr_crossing) {
|
void render_actor_railroad_crossing(Camera* arg0, struct RailroadCrossing* rr_crossing) {
|
||||||
UNUSED Vec3s sp80 = { 0, 0, 0 };
|
UNUSED Vec3s sp80 = { 0, 0, 0 };
|
||||||
Mat4 sp40;
|
Mat4 sp40;
|
||||||
f32 unk = distance_if_visible(arg0->pos, rr_crossing->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1],
|
f32 unk =
|
||||||
4000000.0f);
|
distance_if_visible(arg0->pos, rr_crossing->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f);
|
||||||
|
|
||||||
if (!(unk < 0.0f)) {
|
if (!(unk < 0.0f)) {
|
||||||
mtxf_rotate_zxy_translate(sp40, rr_crossing->pos, rr_crossing->rot);
|
mtxf_rotate_zxy_translate(sp40, rr_crossing->pos, rr_crossing->rot);
|
||||||
|
|
|
@ -17,8 +17,7 @@ void render_actor_school_bus(Camera* arg0, struct Actor* arg1) {
|
||||||
UNUSED s32 pad2[32];
|
UNUSED s32 pad2[32];
|
||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(arg0->pos, arg1->pos, arg0->rot[1], 2500.0f, gCameraZoom[arg0 - camera1], 9000000.0f);
|
||||||
distance_if_visible(arg0->pos, arg1->pos, arg0->rot[1], 2500.0f, gCameraZoom[arg0 - camera1], 9000000.0f);
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@ void render_actor_tanker_truck(Camera* camera, struct Actor* arg1) {
|
||||||
UNUSED s32 pad[6];
|
UNUSED s32 pad[6];
|
||||||
Mat4 spC8;
|
Mat4 spC8;
|
||||||
UNUSED s32 pad2[32];
|
UNUSED s32 pad2[32];
|
||||||
f32 temp_f0 = distance_if_visible(camera->pos, arg1->pos, camera->rot[1], 2500.0f,
|
f32 temp_f0 =
|
||||||
gCameraZoom[camera - camera1], 9000000.0f);
|
distance_if_visible(camera->pos, arg1->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1], 9000000.0f);
|
||||||
|
|
||||||
if (!(temp_f0 < 0.0f)) {
|
if (!(temp_f0 < 0.0f)) {
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ void render_actor_train_engine(Camera* camera, struct TrainCar* actor) {
|
||||||
Mat4 spE0;
|
Mat4 spE0;
|
||||||
Mat4 spA0;
|
Mat4 spA0;
|
||||||
|
|
||||||
f32 distance = distance_if_visible(camera->pos, actor->pos, camera->rot[1], 2500.0f,
|
f32 distance = distance_if_visible(camera->pos, actor->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1],
|
||||||
gCameraZoom[camera - camera1], 9000000.0f);
|
9000000.0f);
|
||||||
|
|
||||||
if (distance < 0.0f) {
|
if (distance < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -166,8 +166,8 @@ void render_actor_train_tender(Camera* camera, struct TrainCar* actor) {
|
||||||
Mat4 spE0;
|
Mat4 spE0;
|
||||||
Mat4 spA0;
|
Mat4 spA0;
|
||||||
|
|
||||||
f32 temp_f0 = distance_if_visible(camera->pos, actor->pos, camera->rot[1], 625.0f,
|
f32 temp_f0 =
|
||||||
gCameraZoom[camera - camera1], 9000000.0f);
|
distance_if_visible(camera->pos, actor->pos, camera->rot[1], 625.0f, gCameraZoom[camera - camera1], 9000000.0f);
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -251,8 +251,8 @@ void render_actor_train_passenger_car(Camera* camera, struct TrainCar* actor) {
|
||||||
Mat4 spE0;
|
Mat4 spE0;
|
||||||
Mat4 spA0;
|
Mat4 spA0;
|
||||||
|
|
||||||
f32 temp_f0 = distance_if_visible(camera->pos, actor->pos, camera->rot[1], 2025.0f,
|
f32 temp_f0 = distance_if_visible(camera->pos, actor->pos, camera->rot[1], 2025.0f, gCameraZoom[camera - camera1],
|
||||||
gCameraZoom[camera - camera1], 9000000.0f);
|
9000000.0f);
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -54,8 +54,7 @@ void render_actor_tree_yoshi_valley(Camera* camera, Mat4 arg1, struct Actor* arg
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -89,8 +88,7 @@ void render_actor_tree_royal_raceway(Camera* camera, Mat4 arg1, struct Actor* ar
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -124,8 +122,7 @@ void render_actor_tree_moo_moo_farm(Camera* camera, Mat4 arg1, struct Actor* arg
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 6250000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 6250000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -153,8 +150,7 @@ void func_80299864(Camera* camera, Mat4 arg1, struct Actor* arg2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -192,8 +188,7 @@ void render_actor_tree_bowser_castle(Camera* camera, Mat4 arg1, struct Actor* ar
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -227,8 +222,7 @@ void render_actor_bush_bowser_castle(Camera* camera, Mat4 arg1, struct Actor* ar
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 640000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 640000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -262,8 +256,7 @@ void render_actor_tree_frappe_snowland(Camera* camera, Mat4 arg1, struct Actor*
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -296,8 +289,7 @@ void render_actor_tree_cactus1_kalimari_desert(Camera* camera, Mat4 arg1, struct
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -330,8 +322,7 @@ void render_actor_tree_cactus2_kalimari_desert(Camera* camera, Mat4 arg1, struct
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
@ -364,8 +355,7 @@ void render_actor_tree_cactus3_kalimari_desert(Camera* camera, Mat4 arg1, struct
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_f0 =
|
temp_f0 = distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
||||||
distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f);
|
|
||||||
|
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -20,8 +20,8 @@ void render_actor_yoshi_egg(Camera* arg0, Mat4 arg1, struct YoshiValleyEgg* egg,
|
||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
|
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
temp_f0 = distance_if_visible(arg0->pos, egg->pos, arg0->rot[1], 200.0f, gCameraZoom[arg0 - camera1],
|
temp_f0 =
|
||||||
16000000.0f);
|
distance_if_visible(arg0->pos, egg->pos, arg0->rot[1], 200.0f, gCameraZoom[arg0 - camera1], 16000000.0f);
|
||||||
if (temp_f0 < 0.0f) {
|
if (temp_f0 < 0.0f) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,7 +232,7 @@ s8 func_800C16E8(f32 arg0, f32 arg1, u8 cameraId) {
|
||||||
f32 var_f0;
|
f32 var_f0;
|
||||||
f32 var_f14;
|
f32 var_f14;
|
||||||
f32 new_var;
|
f32 new_var;
|
||||||
f32 *new_var2;
|
f32* new_var2;
|
||||||
f32 var_f16;
|
f32 var_f16;
|
||||||
f32 var_f18;
|
f32 var_f18;
|
||||||
f32 var_f20;
|
f32 var_f20;
|
||||||
|
@ -1350,7 +1350,7 @@ void func_800C4398(void) {
|
||||||
}
|
}
|
||||||
if ((sSoundBanks[bank][sSoundBankFreeListFront[bank]].next != 0xFF) && (soundIndex != 0)) {
|
if ((sSoundBanks[bank][sSoundBankFreeListFront[bank]].next != 0xFF) && (soundIndex != 0)) {
|
||||||
var_t2 = soundIndex = sSoundBankFreeListFront[bank];
|
var_t2 = soundIndex = sSoundBankFreeListFront[bank];
|
||||||
sSoundBanks[bank][soundIndex].unk00 = (Vec3f*)&(*var_a2->position)[0];
|
sSoundBanks[bank][soundIndex].unk00 = (Vec3f*) &(*var_a2->position)[0];
|
||||||
sSoundBanks[bank][soundIndex].unk04 = &(*var_a2->position)[1];
|
sSoundBanks[bank][soundIndex].unk04 = &(*var_a2->position)[1];
|
||||||
sSoundBanks[bank][soundIndex].unk08 = &(*var_a2->position)[2];
|
sSoundBanks[bank][soundIndex].unk08 = &(*var_a2->position)[2];
|
||||||
sSoundBanks[bank][soundIndex].cameraId = var_a2->cameraId;
|
sSoundBanks[bank][soundIndex].cameraId = var_a2->cameraId;
|
||||||
|
@ -1399,7 +1399,8 @@ struct ActiveSfx {
|
||||||
u32 priority;
|
u32 priority;
|
||||||
u8 soundIndex;
|
u8 soundIndex;
|
||||||
};
|
};
|
||||||
#define AUDIO_MK_CMD(b0,b1,b2,b3) ((((b0) & 0xFF) << 0x18) | (((b1) & 0xFF) << 0x10) | (((b2) & 0xFF) << 0x8) | (((b3) & 0xFF) << 0))
|
#define AUDIO_MK_CMD(b0, b1, b2, b3) \
|
||||||
|
((((b0) & 0xFF) << 0x18) | (((b1) & 0xFF) << 0x10) | (((b2) & 0xFF) << 0x8) | (((b3) & 0xFF) << 0))
|
||||||
void func_800C4888(u8 bankId) {
|
void func_800C4888(u8 bankId) {
|
||||||
u8 j;
|
u8 j;
|
||||||
u8 numChannels;
|
u8 numChannels;
|
||||||
|
@ -1425,7 +1426,8 @@ void func_800C4888(u8 bankId) {
|
||||||
soundIndex = sSoundBanks[bankId][0].next;
|
soundIndex = sSoundBanks[bankId][0].next;
|
||||||
k = 0;
|
k = 0;
|
||||||
while (soundIndex != 0xFF) {
|
while (soundIndex != 0xFF) {
|
||||||
if ((sSoundBanks[bankId][soundIndex].soundStatus == 1) && ((sSoundBanks[bankId][soundIndex].soundBits & 0x08000000) == 0x08000000)) {
|
if ((sSoundBanks[bankId][soundIndex].soundStatus == 1) &&
|
||||||
|
((sSoundBanks[bankId][soundIndex].soundBits & 0x08000000) == 0x08000000)) {
|
||||||
sSoundBanks[bankId][soundIndex].freshness -= 1;
|
sSoundBanks[bankId][soundIndex].freshness -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1437,8 +1439,7 @@ void func_800C4888(u8 bankId) {
|
||||||
if (&D_800EA1C8 == entry[0].unk00) {
|
if (&D_800EA1C8 == entry[0].unk00) {
|
||||||
entry->distance = 0.0f;
|
entry->distance = 0.0f;
|
||||||
} else {
|
} else {
|
||||||
entry->distance =
|
entry->distance = (*entry->unk00[0] * *entry->unk00[0]) + (*entry->unk08 * *entry->unk08);
|
||||||
(*entry->unk00[0] * *entry->unk00[0]) + (*entry->unk08 * *entry->unk08);
|
|
||||||
}
|
}
|
||||||
requestedPriority = (((u32) (entry->soundBits & 0xFF00)) >> 8);
|
requestedPriority = (((u32) (entry->soundBits & 0xFF00)) >> 8);
|
||||||
if (entry->soundBits & 0x100000) {
|
if (entry->soundBits & 0x100000) {
|
||||||
|
@ -1499,7 +1500,7 @@ void func_800C4888(u8 bankId) {
|
||||||
|
|
||||||
for (i = 0; i < numChannels; i++) {
|
for (i = 0; i < numChannels; i++) {
|
||||||
needNewSfx = false;
|
needNewSfx = false;
|
||||||
activeSfx = (struct ActiveSfx*)&D_80192AB8[bankId][i];
|
activeSfx = (struct ActiveSfx*) &D_80192AB8[bankId][i];
|
||||||
|
|
||||||
if (activeSfx->soundIndex == 0xFF) {
|
if (activeSfx->soundIndex == 0xFF) {
|
||||||
needNewSfx = true;
|
needNewSfx = true;
|
||||||
|
@ -1531,7 +1532,7 @@ void func_800C4888(u8 bankId) {
|
||||||
chosenEntryIndex = chosenSfx[j].soundIndex;
|
chosenEntryIndex = chosenSfx[j].soundIndex;
|
||||||
if ((chosenEntryIndex != 0xFF) && (sSoundBanks[bankId][chosenEntryIndex].soundStatus != 3)) {
|
if ((chosenEntryIndex != 0xFF) && (sSoundBanks[bankId][chosenEntryIndex].soundStatus != 3)) {
|
||||||
for (k = 0; k < numChannels; k++) {
|
for (k = 0; k < numChannels; k++) {
|
||||||
if (chosenEntryIndex == ((struct ActiveSfx*)(D_80192AB8[bankId]))[k].soundIndex) {
|
if (chosenEntryIndex == ((struct ActiveSfx*) (D_80192AB8[bankId]))[k].soundIndex) {
|
||||||
needNewSfx = false;
|
needNewSfx = false;
|
||||||
k = numChannels;
|
k = numChannels;
|
||||||
}
|
}
|
||||||
|
@ -1951,7 +1952,7 @@ void func_800C6108(u8 playerId) {
|
||||||
D_800E9ED4[playerId] = D_800E9EE4[playerId] * 0.25f;
|
D_800E9ED4[playerId] = D_800E9EE4[playerId] * 0.25f;
|
||||||
D_800E9F7C[playerId].unk_0C = D_800E9EC4[playerId] + D_800E9ED4[playerId] + D_800E9F34[playerId];
|
D_800E9F7C[playerId].unk_0C = D_800E9EC4[playerId] + D_800E9ED4[playerId] + D_800E9F34[playerId];
|
||||||
} else {
|
} else {
|
||||||
D_800E9F7C[playerId].unk_0C = D_800E9EB4[playerId] + D_800E9F34[playerId];
|
D_800E9F7C[playerId].unk_0C = D_800E9EB4[playerId] + D_800E9F34[playerId];
|
||||||
}
|
}
|
||||||
#ifdef VERSION_EU
|
#ifdef VERSION_EU
|
||||||
if (D_800E9F7C[playerId].unk_0C < 0.0f) {
|
if (D_800E9F7C[playerId].unk_0C < 0.0f) {
|
||||||
|
@ -2398,11 +2399,12 @@ void func_800C70A8(u8 playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Routine to tell the game which "finish" music to play depending on which mode the player is in (Grand Prix, Time Trials, etc),
|
Routine to tell the game which "finish" music to play depending on which mode the player is in (Grand Prix, Time
|
||||||
whether the game is in multiplayer or not, and which position they ended up finishing in (1st, 2nd, 3rd, etc)
|
Trials, etc), whether the game is in multiplayer or not, and which position they ended up finishing in (1st, 2nd,
|
||||||
|
3rd, etc)
|
||||||
|
|
||||||
Contains a LOT of inlined funcs.
|
Contains a LOT of inlined funcs.
|
||||||
Modify if you dare.
|
Modify if you dare.
|
||||||
*/
|
*/
|
||||||
void func_800C76C0(u8 playerId) {
|
void func_800C76C0(u8 playerId) {
|
||||||
|
@ -2958,8 +2960,8 @@ void func_800C90F4(u8 playerId, u32 soundBits) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800C9250(u8 playerIndex) {
|
void func_800C9250(u8 playerIndex) {
|
||||||
func_800C90F4(playerIndex,
|
func_800C90F4(playerIndex, (gPlayers[playerIndex].characterId * 0x10) + (gAudioRandom & 1) +
|
||||||
(gPlayers[playerIndex].characterId * 0x10) + (gAudioRandom & 1) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x01));
|
SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x01));
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800C92CC(u8 playerId, u32 soundBits) {
|
void func_800C92CC(u8 playerId, u32 soundBits) {
|
||||||
|
@ -3378,7 +3380,8 @@ void func_800CA730(u8 playerIndex) {
|
||||||
if (D_800EA0EC[playerIndex] == 0) {
|
if (D_800EA0EC[playerIndex] == 0) {
|
||||||
if ((D_800EA108 == 0) && (D_800EA10C[playerIndex] != 0)) {
|
if ((D_800EA108 == 0) && (D_800EA10C[playerIndex] != 0)) {
|
||||||
play_sound(gPlayers[playerIndex].characterId * 0x10 + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x08),
|
play_sound(gPlayers[playerIndex].characterId * 0x10 + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x08),
|
||||||
&D_800E9F7C[playerIndex].pos, playerIndex, &D_800EA1D4, &D_800EA1D4, (s8*) &D_800E9F7C[playerIndex].unk_14);
|
&D_800E9F7C[playerIndex].pos, playerIndex, &D_800EA1D4, &D_800EA1D4,
|
||||||
|
(s8*) &D_800E9F7C[playerIndex].unk_14);
|
||||||
if (D_800EA10C[playerIndex] != 0) {
|
if (D_800EA10C[playerIndex] != 0) {
|
||||||
if ((s32) D_800EA1C0 >= 2) {
|
if ((s32) D_800EA1C0 >= 2) {
|
||||||
func_800C9018(playerIndex, SOUND_ARG_LOAD(0x01, 0x00, 0xFF, 0x2C));
|
func_800C9018(playerIndex, SOUND_ARG_LOAD(0x01, 0x00, 0xFF, 0x2C));
|
||||||
|
@ -3420,8 +3423,8 @@ void func_800CA984(u8 playerIndex) {
|
||||||
|
|
||||||
if ((D_800EA108 == 0) && (D_800EA0F0 == 0)) {
|
if ((D_800EA108 == 0) && (D_800EA0F0 == 0)) {
|
||||||
for (i = 0; i < D_800EA1C0 + 1; i++) {
|
for (i = 0; i < D_800EA1C0 + 1; i++) {
|
||||||
temp_v0_2 =
|
temp_v0_2 = func_800C1C88(playerIndex, gPlayers[playerIndex].pos, D_800EA1C8,
|
||||||
func_800C1C88(playerIndex, gPlayers[playerIndex].pos, D_800EA1C8, &gPlayers[playerIndex].unk_098, (u8) i, SOUND_ITEM_STAR);
|
&gPlayers[playerIndex].unk_098, (u8) i, SOUND_ITEM_STAR);
|
||||||
if (temp_v0_2) {
|
if (temp_v0_2) {
|
||||||
play_sound(SOUND_ITEM_STAR, &temp_v0_2->unk18, i, &D_800EA1D4, &D_800EA1D4, &D_800EA1DC);
|
play_sound(SOUND_ITEM_STAR, &temp_v0_2->unk18, i, &D_800EA1D4, &D_800EA1D4, &D_800EA1DC);
|
||||||
}
|
}
|
||||||
|
@ -3499,8 +3502,8 @@ void func_800CADD0(u8 playerIndex, f32 arg1) {
|
||||||
arg1 = 0.0f;
|
arg1 = 0.0f;
|
||||||
}
|
}
|
||||||
D_800EA110[playerIndex] = arg1;
|
D_800EA110[playerIndex] = arg1;
|
||||||
play_sound(0x1900A209U, &D_800E9F7C[playerIndex].pos, playerIndex, &D_800EA1D4, &D_800EA110[playerIndex],
|
play_sound(0x1900A209U, &D_800E9F7C[playerIndex].pos, playerIndex, &D_800EA1D4,
|
||||||
(s8*) &D_800E9F7C[playerIndex].unk_14);
|
&D_800EA110[playerIndex], (s8*) &D_800E9F7C[playerIndex].unk_14);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -3553,7 +3556,8 @@ void func_800CB064(u8 playerIndex) {
|
||||||
if ((u8) D_800EA168 == 0) {
|
if ((u8) D_800EA168 == 0) {
|
||||||
func_800C36C4(0, 1U, 0x7FU, 0x19);
|
func_800C36C4(0, 1U, 0x7FU, 0x19);
|
||||||
}
|
}
|
||||||
func_800C90F4(playerIndex, gPlayers[playerIndex].characterId * 0x10 + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x08));
|
func_800C90F4(playerIndex,
|
||||||
|
gPlayers[playerIndex].characterId * 0x10 + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x08));
|
||||||
func_800C9018(playerIndex, SOUND_ARG_LOAD(0x01, 0x00, 0xFA, 0x4C));
|
func_800C9018(playerIndex, SOUND_ARG_LOAD(0x01, 0x00, 0xFA, 0x4C));
|
||||||
D_800EA170[playerIndex] = 0;
|
D_800EA170[playerIndex] = 0;
|
||||||
}
|
}
|
||||||
|
@ -3574,18 +3578,23 @@ void begin_losing_ceremony_sequence() {
|
||||||
D_800EA174++;
|
D_800EA174++;
|
||||||
|
|
||||||
if (D_800EA174 == 3) {
|
if (D_800EA174 == 3) {
|
||||||
play_sequence(SEQ_EVENT_CEREMONY_PRESENTATION_PART1); // Begin with Part 1 of the ceremony presentation music --- "Everything seems normal..."
|
play_sequence(SEQ_EVENT_CEREMONY_PRESENTATION_PART1); // Begin with Part 1 of the ceremony presentation
|
||||||
|
// music --- "Everything seems normal..."
|
||||||
func_800C3448(0x4000007F);
|
func_800C3448(0x4000007F);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_800EA174 == 300) {
|
if (D_800EA174 == 300) {
|
||||||
play_sequence(SEQ_EVENT_CEREMONY_PRESENTATION_PART2_WIN); // Follow up with Part 2 of the winning ceremony presentation music --- "Looks like I won...?"
|
play_sequence(SEQ_EVENT_CEREMONY_PRESENTATION_PART2_WIN); // Follow up with Part 2 of the winning ceremony
|
||||||
|
// presentation music --- "Looks like I won...?"
|
||||||
func_800C3448(0x4000007F);
|
func_800C3448(0x4000007F);
|
||||||
play_sequence2(SEQ_EVENT_CEREMONY_PRESENTATION_PART2_LOSE); // Once it ends, begin the LOSING ceremony presentation music, which has a few notes changed to be off-tune --- "Uh oh..."
|
play_sequence2(SEQ_EVENT_CEREMONY_PRESENTATION_PART2_LOSE); // Once it ends, begin the LOSING ceremony
|
||||||
|
// presentation music, which has a few notes
|
||||||
|
// changed to be off-tune --- "Uh oh..."
|
||||||
func_800C3448(0x41000000);
|
func_800C3448(0x41000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_800EA174 == 560) { // (Somewhere in this code it slows down the music, changes the pitch of it and completely breaks the music)
|
if (D_800EA174 == 560) { // (Somewhere in this code it slows down the music, changes the pitch of it and
|
||||||
|
// completely breaks the music)
|
||||||
func_800C3448(0x40640000);
|
func_800C3448(0x40640000);
|
||||||
func_800C3448(0xB0640073);
|
func_800C3448(0xB0640073);
|
||||||
func_800C3448(0x4150007F);
|
func_800C3448(0x4150007F);
|
||||||
|
@ -3605,11 +3614,13 @@ void begin_losing_ceremony_sequence() {
|
||||||
func_800C3448(0x41320000);
|
func_800C3448(0x41320000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_800EA174 == 1200) { // (Player gets hit by the bomb-omb car; play the "explosion" sound effect and the "hurt" voice for the current character)
|
if (D_800EA174 == 1200) { // (Player gets hit by the bomb-omb car; play the "explosion" sound effect and the
|
||||||
|
// "hurt" voice for the current character)
|
||||||
func_800C3448(0x110100FF);
|
func_800C3448(0x110100FF);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_800EA174 == 1230) { // Once the music is completely broken by this point, play the "No Trophy For You!" sequence --- "Aw man, I lost... :("
|
if (D_800EA174 == 1230) { // Once the music is completely broken by this point, play the "No Trophy For You!"
|
||||||
|
// sequence --- "Aw man, I lost... :("
|
||||||
play_sequence(SEQ_EVENT_CEREMONY_TROPHY_LOSE);
|
play_sequence(SEQ_EVENT_CEREMONY_TROPHY_LOSE);
|
||||||
func_800C3448(0x4000007F); // (Play the "losing" voice for the current character, twice)
|
func_800C3448(0x4000007F); // (Play the "losing" voice for the current character, twice)
|
||||||
}
|
}
|
||||||
|
|
|
@ -787,7 +787,10 @@ void audio_init(void) {
|
||||||
#ifdef TARGET_N64
|
#ifdef TARGET_N64
|
||||||
// It seems boot.s doesn't clear the .bss area for audio, so do it here.
|
// It seems boot.s doesn't clear the .bss area for audio, so do it here.
|
||||||
ptr64 = (u64*) ((u8*) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer));
|
ptr64 = (u64*) ((u8*) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer));
|
||||||
for (k = ((uintptr_t) &gAudioGlobalsEndMarker - (uintptr_t) ((u64 *)((u8 *) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer))) ) / 8; k >= 0; k--) {
|
for (k = ((uintptr_t) &gAudioGlobalsEndMarker -
|
||||||
|
(uintptr_t) ((u64*) ((u8*) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer)))) /
|
||||||
|
8;
|
||||||
|
k >= 0; k--) {
|
||||||
*ptr64++ = 0;
|
*ptr64++ = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -882,7 +885,7 @@ void audio_init(void) {
|
||||||
|
|
||||||
// Load bank sets for each sequence
|
// Load bank sets for each sequence
|
||||||
gAlBankSets = soundAlloc(&gAudioInitPool, 0x100);
|
gAlBankSets = soundAlloc(&gAudioInitPool, 0x100);
|
||||||
audio_dma_copy_immediate((u8 *) &_instrument_setsSegmentRomStart, gAlBankSets, 0x100);
|
audio_dma_copy_immediate((u8*) &_instrument_setsSegmentRomStart, gAlBankSets, 0x100);
|
||||||
|
|
||||||
sound_alloc_pool_init(&gUnkPool1.pool, soundAlloc(&gAudioInitPool, (u32) D_800EA5D8), (u32) D_800EA5D8);
|
sound_alloc_pool_init(&gUnkPool1.pool, soundAlloc(&gAudioInitPool, (u32) D_800EA5D8), (u32) D_800EA5D8);
|
||||||
init_sequence_players();
|
init_sequence_players();
|
||||||
|
|
|
@ -330,13 +330,13 @@ Acmd* synthesis_do_one_audio_update(s16* aiBuf, s32 bufLen, Acmd* acmd, s32 upda
|
||||||
Acmd* synthesis_process_note(s32 noteIndex, struct NoteSubEu* noteSubEu, struct NoteSynthesisState* synthesisState,
|
Acmd* synthesis_process_note(s32 noteIndex, struct NoteSubEu* noteSubEu, struct NoteSynthesisState* synthesisState,
|
||||||
UNUSED s16* aiBuf, s32 inBuf, Acmd* cmd, s32 updateIndex) {
|
UNUSED s16* aiBuf, s32 inBuf, Acmd* cmd, s32 updateIndex) {
|
||||||
s32 pad[3];
|
s32 pad[3];
|
||||||
struct AudioBankSample *audioBookSample; // sp130
|
struct AudioBankSample* audioBookSample; // sp130
|
||||||
struct AdpcmLoop *loopInfo; // sp12C
|
struct AdpcmLoop* loopInfo; // sp12C
|
||||||
s16 *curLoadedBook; // sp128
|
s16* curLoadedBook; // sp128
|
||||||
s32 pad4;
|
s32 pad4;
|
||||||
s32 nSamplesToLoad;
|
s32 nSamplesToLoad;
|
||||||
s32 noteFinished; // sp11C
|
s32 noteFinished; // sp11C
|
||||||
s32 restart; // sp118
|
s32 restart; // sp118
|
||||||
s32 flags;
|
s32 flags;
|
||||||
u16 resamplingRateFixedPoint; // sp112
|
u16 resamplingRateFixedPoint; // sp112
|
||||||
s32 pad2[1];
|
s32 pad2[1];
|
||||||
|
@ -347,22 +347,22 @@ Acmd* synthesis_process_note(s32 noteIndex, struct NoteSubEu* noteSubEu, struct
|
||||||
s32 pad3;
|
s32 pad3;
|
||||||
s32 nAdpcmSamplesProcessed;
|
s32 nAdpcmSamplesProcessed;
|
||||||
s32 s4;
|
s32 s4;
|
||||||
u8 *sampleAddr; // spEC
|
u8* sampleAddr; // spEC
|
||||||
s32 s3;
|
s32 s3;
|
||||||
s32 samplesLenAdjusted; // spE4
|
s32 samplesLenAdjusted; // spE4
|
||||||
s32 leftRight;
|
s32 leftRight;
|
||||||
s32 endPos; // spDC
|
s32 endPos; // spDC
|
||||||
s32 nSamplesToProcess; // spD8
|
s32 nSamplesToProcess; // spD8
|
||||||
u32 samplesLenFixedPoint;
|
u32 samplesLenFixedPoint;
|
||||||
s32 var_s6;
|
s32 var_s6;
|
||||||
s32 nSamplesInThisIteration;
|
s32 nSamplesInThisIteration;
|
||||||
u32 var_t2;
|
u32 var_t2;
|
||||||
u8 *var_a0_2;
|
u8* var_a0_2;
|
||||||
s32 s5Aligned;
|
s32 s5Aligned;
|
||||||
s32 temp_t6;
|
s32 temp_t6;
|
||||||
s32 aligned;
|
s32 aligned;
|
||||||
struct AudioBankSample *bankSample;
|
struct AudioBankSample* bankSample;
|
||||||
s32 nParts; // spB0
|
s32 nParts; // spB0
|
||||||
s32 curPart; // spAC
|
s32 curPart; // spAC
|
||||||
s32 pad5;
|
s32 pad5;
|
||||||
s16 addr;
|
s16 addr;
|
||||||
|
@ -371,7 +371,7 @@ Acmd* synthesis_process_note(s32 noteIndex, struct NoteSubEu* noteSubEu, struct
|
||||||
s32 samplesRemaining;
|
s32 samplesRemaining;
|
||||||
s32 s1;
|
s32 s1;
|
||||||
u32 nEntries;
|
u32 nEntries;
|
||||||
struct Note *note;
|
struct Note* note;
|
||||||
|
|
||||||
curLoadedBook = NULL;
|
curLoadedBook = NULL;
|
||||||
note = &gNotes[noteIndex];
|
note = &gNotes[noteIndex];
|
||||||
|
@ -420,7 +420,7 @@ Acmd* synthesis_process_note(s32 noteIndex, struct NoteSubEu* noteSubEu, struct
|
||||||
if (curLoadedBook != (*bankSample->book).book) {
|
if (curLoadedBook != (*bankSample->book).book) {
|
||||||
curLoadedBook = bankSample->book->book;
|
curLoadedBook = bankSample->book->book;
|
||||||
nEntries = (16 * bankSample->book->order) * bankSample->book->npredictors;
|
nEntries = (16 * bankSample->book->order) * bankSample->book->npredictors;
|
||||||
aLoadADPCM(cmd++, nEntries, VIRTUAL_TO_PHYSICAL2(noteSubEu->bookOffset+curLoadedBook));
|
aLoadADPCM(cmd++, nEntries, VIRTUAL_TO_PHYSICAL2(noteSubEu->bookOffset + curLoadedBook));
|
||||||
}
|
}
|
||||||
if (noteSubEu->bookOffset != 0) {
|
if (noteSubEu->bookOffset != 0) {
|
||||||
curLoadedBook = &gUnknownData_800F6290[0];
|
curLoadedBook = &gUnknownData_800F6290[0];
|
||||||
|
@ -567,7 +567,8 @@ Acmd* synthesis_process_note(s32 noteIndex, struct NoteSubEu* noteSubEu, struct
|
||||||
noteSubEu->needsInit = false;
|
noteSubEu->needsInit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = final_resample(cmd, synthesisState, inBuf * 2, resamplingRateFixedPoint, noteSamplesDmemAddrBeforeResampling, flags);
|
cmd = final_resample(cmd, synthesisState, inBuf * 2, resamplingRateFixedPoint, noteSamplesDmemAddrBeforeResampling,
|
||||||
|
flags);
|
||||||
headsetPanRight = noteSubEu->headsetPanRight;
|
headsetPanRight = noteSubEu->headsetPanRight;
|
||||||
if ((headsetPanRight & 0xFFFF) || synthesisState->prevHeadsetPanRight) {
|
if ((headsetPanRight & 0xFFFF) || synthesisState->prevHeadsetPanRight) {
|
||||||
leftRight = 1;
|
leftRight = 1;
|
||||||
|
@ -619,13 +620,13 @@ Acmd* func_800B86A0(Acmd* cmd, struct NoteSubEu* note, struct NoteSynthesisState
|
||||||
|
|
||||||
sourceLeft = synthesisState->curVolLeft;
|
sourceLeft = synthesisState->curVolLeft;
|
||||||
sourceRight = synthesisState->curVolRight;
|
sourceRight = synthesisState->curVolRight;
|
||||||
|
|
||||||
targetLeft = (note->targetVolLeft) << 4;
|
targetLeft = (note->targetVolLeft) << 4;
|
||||||
targetRight = (note->targetVolRight) << 4;
|
targetRight = (note->targetVolRight) << 4;
|
||||||
|
|
||||||
rampLeft = ((targetLeft - sourceLeft) / (nSamples >> 3));
|
rampLeft = ((targetLeft - sourceLeft) / (nSamples >> 3));
|
||||||
rampRight = ((targetRight - sourceRight) / (nSamples >> 3));
|
rampRight = ((targetRight - sourceRight) / (nSamples >> 3));
|
||||||
targetLeft = sourceLeft + rampLeft * (nSamples >> 3);
|
targetLeft = sourceLeft + rampLeft * (nSamples >> 3);
|
||||||
targetRight = sourceRight + rampRight * (nSamples >> 3);
|
targetRight = sourceRight + rampRight * (nSamples >> 3);
|
||||||
|
|
||||||
synthesisState->curVolLeft = targetLeft;
|
synthesisState->curVolLeft = targetLeft;
|
||||||
|
@ -633,52 +634,29 @@ Acmd* func_800B86A0(Acmd* cmd, struct NoteSubEu* note, struct NoteSynthesisState
|
||||||
|
|
||||||
if (note->usesHeadsetPanEffects) {
|
if (note->usesHeadsetPanEffects) {
|
||||||
aClearBuffer(cmd++, DMEM_ADDR_NOTE_PAN_TEMP, DEFAULT_LEN_1CH);
|
aClearBuffer(cmd++, DMEM_ADDR_NOTE_PAN_TEMP, DEFAULT_LEN_1CH);
|
||||||
aEnvSetup1Alt(cmd++, note->reverbVol, sourceLeft, sourceRight, (u32)rampLeft, (u32)rampRight);
|
aEnvSetup1Alt(cmd++, note->reverbVol, sourceLeft, sourceRight, (u32) rampLeft, (u32) rampRight);
|
||||||
aEnvSetup2(cmd++, sourceLeft, sourceRight);
|
aEnvSetup2(cmd++, sourceLeft, sourceRight);
|
||||||
|
|
||||||
switch (headsetPanSettings) {;
|
switch (headsetPanSettings) {
|
||||||
|
;
|
||||||
case 1:
|
case 1:
|
||||||
aEnvMixer(cmd++,
|
aEnvMixer(cmd++, inBuf, nSamples, 0, note->stereoStrongRight, note->stereoStrongLeft,
|
||||||
inBuf, nSamples,
|
DMEM_ADDR_NOTE_PAN_TEMP, DMEM_ADDR_RIGHT_CH, DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_WET_RIGHT_CH);
|
||||||
0,
|
|
||||||
note->stereoStrongRight, note->stereoStrongLeft,
|
|
||||||
DMEM_ADDR_NOTE_PAN_TEMP,
|
|
||||||
DMEM_ADDR_RIGHT_CH,
|
|
||||||
DMEM_ADDR_WET_LEFT_CH,
|
|
||||||
DMEM_ADDR_WET_RIGHT_CH);
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
aEnvMixer(cmd++,
|
aEnvMixer(cmd++, inBuf, nSamples, 0, note->stereoStrongRight, note->stereoStrongLeft, DMEM_ADDR_LEFT_CH,
|
||||||
inBuf, nSamples,
|
DMEM_ADDR_NOTE_PAN_TEMP, DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_WET_RIGHT_CH);
|
||||||
0,
|
|
||||||
note->stereoStrongRight, note->stereoStrongLeft,
|
|
||||||
DMEM_ADDR_LEFT_CH,
|
|
||||||
DMEM_ADDR_NOTE_PAN_TEMP,
|
|
||||||
DMEM_ADDR_WET_LEFT_CH,
|
|
||||||
DMEM_ADDR_WET_RIGHT_CH);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
aEnvMixer(cmd++,
|
aEnvMixer(cmd++, inBuf, nSamples, 0, note->stereoStrongRight, note->stereoStrongLeft, DMEM_ADDR_LEFT_CH,
|
||||||
inBuf, nSamples,
|
DMEM_ADDR_RIGHT_CH, DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_WET_RIGHT_CH);
|
||||||
0,
|
|
||||||
note->stereoStrongRight, note->stereoStrongLeft,
|
|
||||||
DMEM_ADDR_LEFT_CH,
|
|
||||||
DMEM_ADDR_RIGHT_CH,
|
|
||||||
DMEM_ADDR_WET_LEFT_CH,
|
|
||||||
DMEM_ADDR_WET_RIGHT_CH);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
aEnvSetup1Alt(cmd++, note->reverbVol, sourceLeft, sourceRight, (u32)rampLeft, (u32)rampRight);
|
aEnvSetup1Alt(cmd++, note->reverbVol, sourceLeft, sourceRight, (u32) rampLeft, (u32) rampRight);
|
||||||
aEnvSetup2(cmd++, sourceLeft, sourceRight);
|
aEnvSetup2(cmd++, sourceLeft, sourceRight);
|
||||||
aEnvMixer(cmd++,
|
aEnvMixer(cmd++, inBuf, nSamples, 0, note->stereoStrongRight, note->stereoStrongLeft, DMEM_ADDR_LEFT_CH,
|
||||||
inBuf, nSamples,
|
DMEM_ADDR_RIGHT_CH, DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_WET_RIGHT_CH);
|
||||||
0,
|
|
||||||
note->stereoStrongRight, note->stereoStrongLeft,
|
|
||||||
DMEM_ADDR_LEFT_CH,
|
|
||||||
DMEM_ADDR_RIGHT_CH,
|
|
||||||
DMEM_ADDR_WET_LEFT_CH,
|
|
||||||
DMEM_ADDR_WET_RIGHT_CH);
|
|
||||||
}
|
}
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2813,7 +2813,8 @@ void func_8005D6C0(Player* player) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_particle_position_and_rotation(Player* player, Particle* particle, f32 x, f32 y, f32 z, s8 surfaceType, s8 arg6) {
|
void set_particle_position_and_rotation(Player* player, Particle* particle, f32 x, f32 y, f32 z, s8 surfaceType,
|
||||||
|
s8 arg6) {
|
||||||
particle->pos[2] = z;
|
particle->pos[2] = z;
|
||||||
particle->pos[0] = x;
|
particle->pos[0] = x;
|
||||||
particle->pos[1] = y;
|
particle->pos[1] = y;
|
||||||
|
@ -2851,12 +2852,12 @@ void set_drift_particles(Player* player, s16 arg1, UNUSED s32 arg2, UNUSED s8 ar
|
||||||
|
|
||||||
if (player->unk_0C0 >= 0) {
|
if (player->unk_0C0 >= 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], player->tyres[BACK_LEFT].pos[0],
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], player->tyres[BACK_LEFT].pos[0],
|
||||||
player->tyres[BACK_LEFT].baseHeight + 2.0f, player->tyres[BACK_LEFT].pos[2],
|
player->tyres[BACK_LEFT].baseHeight + 2.0f, player->tyres[BACK_LEFT].pos[2],
|
||||||
player->tyres[BACK_LEFT].surfaceType, 1);
|
player->tyres[BACK_LEFT].surfaceType, 1);
|
||||||
} else {
|
} else {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], player->tyres[BACK_RIGHT].pos[0],
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], player->tyres[BACK_RIGHT].pos[0],
|
||||||
player->tyres[BACK_RIGHT].baseHeight + 2.0f, player->tyres[BACK_RIGHT].pos[2],
|
player->tyres[BACK_RIGHT].baseHeight + 2.0f,
|
||||||
player->tyres[BACK_RIGHT].surfaceType, 0);
|
player->tyres[BACK_RIGHT].pos[2], player->tyres[BACK_RIGHT].surfaceType, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_lo = player->unk_0C0 / 182;
|
temp_lo = player->unk_0C0 / 182;
|
||||||
|
@ -2932,8 +2933,8 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
||||||
|
@ -2956,8 +2957,8 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
}
|
}
|
||||||
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
||||||
|
@ -2984,8 +2985,8 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 3, 1.0f);
|
init_new_particle_player(&player->particles[10 + arg1], 3, 1.0f);
|
||||||
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
||||||
player->particles[10 + arg1].red -= arg1 * 8;
|
player->particles[10 + arg1].red -= arg1 * 8;
|
||||||
|
@ -2993,8 +2994,8 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
player->particles[10 + arg1].blue -= arg1 * 8;
|
player->particles[10 + arg1].blue -= arg1 * 8;
|
||||||
}
|
}
|
||||||
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 3, 1.0f);
|
init_new_particle_player(&player->particles[10 + arg1], 3, 1.0f);
|
||||||
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
||||||
player->particles[10 + arg1].red -= arg1 * 8;
|
player->particles[10 + arg1].red -= arg1 * 8;
|
||||||
|
@ -3007,15 +3008,15 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
}
|
}
|
||||||
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3025,15 +3026,15 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
}
|
}
|
||||||
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3043,15 +3044,15 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
}
|
}
|
||||||
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3061,15 +3062,15 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
}
|
}
|
||||||
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
set_particle_colour_randomly_varried(&player->particles[10 + arg1], 0x00FFA54F, 0x00AF);
|
set_particle_colour_randomly_varried(&player->particles[10 + arg1], 0x00FFA54F, 0x00AF);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
||||||
|
@ -3081,15 +3082,15 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
}
|
}
|
||||||
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3103,8 +3104,8 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
if (((((player->speed / 18.0f) * 216.0f) >= 30.0f) &&
|
if (((((player->speed / 18.0f) * 216.0f) >= 30.0f) &&
|
||||||
((((player->unk_0C0 / 182) > 0x14) || ((player->unk_0C0 / 182) < (-0x14))))) ||
|
((((player->unk_0C0 / 182) > 0x14) || ((player->unk_0C0 / 182) < (-0x14))))) ||
|
||||||
((player->previousSpeed - player->speed) >= 0.04)) {
|
((player->previousSpeed - player->speed) >= 0.04)) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3113,8 +3114,8 @@ void setup_tyre_particles(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UN
|
||||||
(((((player->speed / 18.0f) * 216.0f) >= 30.0f) &&
|
(((((player->speed / 18.0f) * 216.0f) >= 30.0f) &&
|
||||||
(((player->unk_0C0 / 182) >= 0x15) || ((player->unk_0C0 / 182) < -0x14))) ||
|
(((player->unk_0C0 / 182) >= 0x15) || ((player->unk_0C0 / 182) < -0x14))) ||
|
||||||
((player->previousSpeed - player->speed) >= 0.04))) {
|
((player->previousSpeed - player->speed) >= 0.04))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], tyre_x, tyre_y, tyre_z,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 2, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3158,12 +3159,14 @@ void func_8005EA94(Player* player, s16 arg1, s32 arg2, s8 arg3, UNUSED s8 arg4)
|
||||||
if (var_t0 == 0) {
|
if (var_t0 == 0) {
|
||||||
if ((arg1 == 0) && ((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
if ((arg1 == 0) && ((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
if (((player->speed / 18.0f) * 216.0f) >= 10.0f) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f2, var_f12, var_f14, var_t0, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f2, var_f12, var_f14,
|
||||||
|
var_t0, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 9, 0.8f);
|
init_new_particle_player(&player->particles[10 + arg1], 9, 0.8f);
|
||||||
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00AF);
|
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00AF);
|
||||||
}
|
}
|
||||||
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
} else if ((player->particles[10 + arg2].timer > 0) && (((player->speed / 18.0f) * 216.0f) >= 10.0f)) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f2, var_f12, var_f14, var_t0, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f2, var_f12, var_f14, var_t0,
|
||||||
|
var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 9, 0.8f);
|
init_new_particle_player(&player->particles[10 + arg1], 9, 0.8f);
|
||||||
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00AF);
|
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00AF);
|
||||||
}
|
}
|
||||||
|
@ -3199,7 +3202,8 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case DIRT:
|
case DIRT:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t3);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
||||||
|
@ -3221,7 +3225,8 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
}
|
}
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t3);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
||||||
|
@ -3247,16 +3252,16 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case GRASS:
|
case GRASS:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.1f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.1f);
|
||||||
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
||||||
player->particles[10 + arg1].red -= arg1 * 8;
|
player->particles[10 + arg1].red -= arg1 * 8;
|
||||||
player->particles[10 + arg1].green -= arg1 * 8;
|
player->particles[10 + arg1].green -= arg1 * 8;
|
||||||
player->particles[10 + arg1].blue -= arg1 * 8;
|
player->particles[10 + arg1].blue -= arg1 * 8;
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.1f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.1f);
|
||||||
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
||||||
player->particles[10 + arg1].red -= arg1 * 8;
|
player->particles[10 + arg1].red -= arg1 * 8;
|
||||||
|
@ -3268,14 +3273,14 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case SAND_OFFROAD:
|
case SAND_OFFROAD:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3284,14 +3289,14 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case SAND:
|
case SAND:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3300,14 +3305,14 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case WET_SAND:
|
case WET_SAND:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3316,14 +3321,14 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case DIRT_OFFROAD:
|
case DIRT_OFFROAD:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3333,14 +3338,14 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case SNOW_OFFROAD:
|
case SNOW_OFFROAD:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3351,14 +3356,14 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case BRIDGE:
|
case BRIDGE:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, (s8) surfaceType,
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
(s8) var_t3);
|
(s8) surfaceType, (s8) var_t3);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 5, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3393,7 +3398,8 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case DIRT:
|
case DIRT:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
||||||
|
@ -3415,7 +3421,8 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
}
|
}
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
if ((gCurrentCourseId == COURSE_CHOCO_MOUNTAIN) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY)) {
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 1, 0, 0x0080);
|
||||||
|
@ -3441,14 +3448,16 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case GRASS:
|
case GRASS:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.1f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.1f);
|
||||||
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
||||||
player->particles[10 + arg1].red -= arg1 * 8;
|
player->particles[10 + arg1].red -= arg1 * 8;
|
||||||
player->particles[10 + arg1].green -= arg1 * 8;
|
player->particles[10 + arg1].green -= arg1 * 8;
|
||||||
player->particles[10 + arg1].blue -= arg1 * 8;
|
player->particles[10 + arg1].blue -= arg1 * 8;
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.1f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.1f);
|
||||||
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
set_particle_colour(&player->particles[10 + arg1], 0x00FFFFFF, 0x00FF);
|
||||||
player->particles[10 + arg1].red -= arg1 * 8;
|
player->particles[10 + arg1].red -= arg1 * 8;
|
||||||
|
@ -3460,12 +3469,14 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case SAND_OFFROAD:
|
case SAND_OFFROAD:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 2, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3474,12 +3485,14 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case SAND:
|
case SAND:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 3, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3488,12 +3501,14 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case WET_SAND:
|
case WET_SAND:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 4, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3502,12 +3517,14 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case DIRT_OFFROAD:
|
case DIRT_OFFROAD:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 5, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3517,12 +3534,14 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case SNOW_OFFROAD:
|
case SNOW_OFFROAD:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
func_8005DAD8(&player->particles[10 + arg1], 6, 1, 0x00A8);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3533,12 +3552,14 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
case BRIDGE:
|
case BRIDGE:
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
((player->particles[10 + arg2].timer > 0) || (player->particles[10 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
} else if (player->particles[10 + arg2].timer > 0) {
|
} else if (player->particles[10 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
set_particle_position_and_rotation(player, &player->particles[10 + arg1], var_f0, var_f2, var_f12,
|
||||||
|
surfaceType, var_t1);
|
||||||
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
init_new_particle_player(&player->particles[10 + arg1], 4, 0.46f);
|
||||||
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
func_8005DAD8(&player->particles[10 + arg1], 0, 0, 0x0080);
|
||||||
player->particles[10 + arg1].green = random_int(0x0010U);
|
player->particles[10 + arg1].green = random_int(0x0010U);
|
||||||
|
@ -3928,7 +3949,8 @@ void func_80061EF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
if (var_t0 == 0) {
|
if (var_t0 == 0) {
|
||||||
if ((arg1 == 0) &&
|
if ((arg1 == 0) &&
|
||||||
((player->particles[0x1E + arg2].timer > 0) || (player->particles[0x1E + arg2].IsAlive == 0))) {
|
((player->particles[0x1E + arg2].timer > 0) || (player->particles[0x1E + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[0x1E + arg1], 0.0f, var_f2, 0.0f, (s8) var_t0, (s8) var_t1);
|
set_particle_position_and_rotation(player, &player->particles[0x1E + arg1], 0.0f, var_f2, 0.0f, (s8) var_t0,
|
||||||
|
(s8) var_t1);
|
||||||
init_new_particle_player(&player->particles[0x1E + arg1], 3, 0.5f);
|
init_new_particle_player(&player->particles[0x1E + arg1], 3, 0.5f);
|
||||||
set_particle_colour(&player->particles[0x1E + arg1], 0x00FFFFFF, 0x0060);
|
set_particle_colour(&player->particles[0x1E + arg1], 0x00FFFFFF, 0x0060);
|
||||||
player->particles[0x1E + arg1].rotation = 0;
|
player->particles[0x1E + arg1].rotation = 0;
|
||||||
|
@ -3944,7 +3966,8 @@ void func_80061EF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
player->pos[0] +
|
player->pos[0] +
|
||||||
(sins(player->particles[0x1E + arg1].rotation - player->rotation[1] - player->unk_0C0) * 5.0f);
|
(sins(player->particles[0x1E + arg1].rotation - player->rotation[1] - player->unk_0C0) * 5.0f);
|
||||||
} else if (player->particles[0x1E + arg2].timer > 0) {
|
} else if (player->particles[0x1E + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[0x1E + arg1], 0.0f, var_f2, 0.0f, (s8) var_t0, (s8) var_t1);
|
set_particle_position_and_rotation(player, &player->particles[0x1E + arg1], 0.0f, var_f2, 0.0f, (s8) var_t0,
|
||||||
|
(s8) var_t1);
|
||||||
init_new_particle_player(&player->particles[0x1E + arg1], 3, 0.5f);
|
init_new_particle_player(&player->particles[0x1E + arg1], 3, 0.5f);
|
||||||
set_particle_colour(&player->particles[0x1E + arg1], 0x00FFFFFF, 0x0060);
|
set_particle_colour(&player->particles[0x1E + arg1], 0x00FFFFFF, 0x0060);
|
||||||
player->particles[0x1E + arg1].rotation = 0;
|
player->particles[0x1E + arg1].rotation = 0;
|
||||||
|
@ -3989,7 +4012,8 @@ void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
|
|
||||||
if (phi_t0 == 0) {
|
if (phi_t0 == 0) {
|
||||||
if ((arg1 == 0) && ((player->particles[30 + arg2].timer > 0) || (player->particles[30 + arg2].IsAlive == 0))) {
|
if ((arg1 == 0) && ((player->particles[30 + arg2].timer > 0) || (player->particles[30 + arg2].IsAlive == 0))) {
|
||||||
set_particle_position_and_rotation(player, &player->particles[30 + arg1], 0.0f, phi_f2, 0.0f, phi_t0, phi_t1);
|
set_particle_position_and_rotation(player, &player->particles[30 + arg1], 0.0f, phi_f2, 0.0f, phi_t0,
|
||||||
|
phi_t1);
|
||||||
init_new_particle_player(&player->particles[30 + arg1], 8, 1.0f);
|
init_new_particle_player(&player->particles[30 + arg1], 8, 1.0f);
|
||||||
set_particle_colour(&player->particles[30 + arg1], 0xFFFF20, 0xFF);
|
set_particle_colour(&player->particles[30 + arg1], 0xFFFF20, 0xFF);
|
||||||
|
|
||||||
|
@ -4011,7 +4035,8 @@ void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||||
|
|
||||||
new_var2 = player;
|
new_var2 = player;
|
||||||
if (new_var2->particles[30 + arg2].timer > 0) {
|
if (new_var2->particles[30 + arg2].timer > 0) {
|
||||||
set_particle_position_and_rotation(new_var2, &new_var2->particles[30 + arg1], 0.0f, phi_f2, 0.0f, phi_t0, phi_t1);
|
set_particle_position_and_rotation(new_var2, &new_var2->particles[30 + arg1], 0.0f, phi_f2, 0.0f, phi_t0,
|
||||||
|
phi_t1);
|
||||||
init_new_particle_player(&new_var2->particles[30 + arg1], 8, 1.0f);
|
init_new_particle_player(&new_var2->particles[30 + arg1], 8, 1.0f);
|
||||||
set_particle_colour(&new_var2->particles[30 + arg1], 0xFFFF20, 0xFF);
|
set_particle_colour(&new_var2->particles[30 + arg1], 0xFFFF20, 0xFF);
|
||||||
new_var2->particles[30 + arg1].rotation = 0;
|
new_var2->particles[30 + arg1].rotation = 0;
|
||||||
|
@ -4779,10 +4804,10 @@ void func_800649F4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) {
|
||||||
f32 temp;
|
f32 temp;
|
||||||
temp = player->particles[30 + arg1].unk_018;
|
temp = player->particles[30 + arg1].unk_018;
|
||||||
|
|
||||||
player->particles[30 + arg1].pos[2] =
|
player->particles[30 + arg1].pos[2] = player->unk_21C + (((-temp) * player->particles[30 + arg1].timer) *
|
||||||
player->unk_21C + (((-temp) * player->particles[30 + arg1].timer) * coss(player->particles[30 + arg1].rotation));
|
coss(player->particles[30 + arg1].rotation));
|
||||||
player->particles[30 + arg1].pos[0] =
|
player->particles[30 + arg1].pos[0] = player->unk_218 + (((-temp) * player->particles[30 + arg1].timer) *
|
||||||
player->unk_218 + (((-temp) * player->particles[30 + arg1].timer) * sins(player->particles[30 + arg1].rotation));
|
sins(player->particles[30 + arg1].rotation));
|
||||||
player->particles[30 + arg1].pos[1] = player->pos[1] + player->particles[30 + arg1].unk_014;
|
player->particles[30 + arg1].pos[1] = player->pos[1] + player->particles[30 + arg1].unk_014;
|
||||||
player->particles[30 + arg1].scale += 0.04;
|
player->particles[30 + arg1].scale += 0.04;
|
||||||
|
|
||||||
|
@ -5134,21 +5159,31 @@ void func_80065F0C(Player* player, UNUSED s8 playerIndex, s16 arg2, s8 arg3) {
|
||||||
spD4[2] = 0;
|
spD4[2] = 0;
|
||||||
func_800652D4(&spDC[0], &spD4[0], player->particles[10 + arg2].scale * player->size);
|
func_800652D4(&spDC[0], &spD4[0], player->particles[10 + arg2].scale * player->size);
|
||||||
if (((s32) player->particles[10 + arg2].unk_014) != 8) {
|
if (((s32) player->particles[10 + arg2].unk_014) != 8) {
|
||||||
primRed = ((D_800E47DC[player->particles[10 + arg2].red] >> 0x10) & 0xFF) - player->particles[10 + arg2].green;
|
primRed =
|
||||||
primGreen = ((D_800E47DC[player->particles[10 + arg2].red] >> 0x08) & 0xFF) - player->particles[10 + arg2].green;
|
((D_800E47DC[player->particles[10 + arg2].red] >> 0x10) & 0xFF) - player->particles[10 + arg2].green;
|
||||||
primBlue = ((D_800E47DC[player->particles[10 + arg2].red] >> 0x00) & 0xFF) - player->particles[10 + arg2].green;
|
primGreen =
|
||||||
envRed = ((D_800E480C[player->particles[10 + arg2].red] >> 0x10) & 0xFF) - player->particles[10 + arg2].green;
|
((D_800E47DC[player->particles[10 + arg2].red] >> 0x08) & 0xFF) - player->particles[10 + arg2].green;
|
||||||
envGreen = ((D_800E480C[player->particles[10 + arg2].red] >> 0x08) & 0xFF) - player->particles[10 + arg2].green;
|
primBlue =
|
||||||
envBlue = ((D_800E480C[player->particles[10 + arg2].red] >> 0x00) & 0xFF) - player->particles[10 + arg2].green;
|
((D_800E47DC[player->particles[10 + arg2].red] >> 0x00) & 0xFF) - player->particles[10 + arg2].green;
|
||||||
|
envRed =
|
||||||
|
((D_800E480C[player->particles[10 + arg2].red] >> 0x10) & 0xFF) - player->particles[10 + arg2].green;
|
||||||
|
envGreen =
|
||||||
|
((D_800E480C[player->particles[10 + arg2].red] >> 0x08) & 0xFF) - player->particles[10 + arg2].green;
|
||||||
|
envBlue =
|
||||||
|
((D_800E480C[player->particles[10 + arg2].red] >> 0x00) & 0xFF) - player->particles[10 + arg2].green;
|
||||||
primAlpha = player->particles[10 + arg2].alpha;
|
primAlpha = player->particles[10 + arg2].alpha;
|
||||||
if (player->particles[10 + arg2].unk_040 == 0) {
|
if (player->particles[10 + arg2].unk_040 == 0) {
|
||||||
gSPDisplayList(gDisplayListHead++, D_0D008DB8);
|
gSPDisplayList(gDisplayListHead++, D_0D008DB8);
|
||||||
gDPLoadTextureBlock(gDisplayListHead++, D_8018D494, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadTextureBlock(gDisplayListHead++, D_8018D494, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0,
|
||||||
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||||
|
G_TX_NOLOD, G_TX_NOLOD);
|
||||||
func_8004B72C(primRed, primGreen, primBlue, envRed, envGreen, envBlue, primAlpha);
|
func_8004B72C(primRed, primGreen, primBlue, envRed, envGreen, envBlue, primAlpha);
|
||||||
gSPDisplayList(gDisplayListHead++, D_0D008E48);
|
gSPDisplayList(gDisplayListHead++, D_0D008E48);
|
||||||
} else {
|
} else {
|
||||||
gSPDisplayList(gDisplayListHead++, D_0D008DB8);
|
gSPDisplayList(gDisplayListHead++, D_0D008DB8);
|
||||||
gDPLoadTextureBlock(gDisplayListHead++, D_8018D494, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
gDPLoadTextureBlock(gDisplayListHead++, D_8018D494, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0,
|
||||||
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||||
|
G_TX_NOLOD, G_TX_NOLOD);
|
||||||
func_8004B72C(primRed, primGreen, primBlue, envRed, envGreen, envBlue, primAlpha);
|
func_8004B72C(primRed, primGreen, primBlue, envRed, envGreen, envBlue, primAlpha);
|
||||||
gDPSetAlphaCompare(gDisplayListHead++, G_AC_DITHER);
|
gDPSetAlphaCompare(gDisplayListHead++, G_AC_DITHER);
|
||||||
gSPDisplayList(gDisplayListHead++, D_0D008E48);
|
gSPDisplayList(gDisplayListHead++, D_0D008E48);
|
||||||
|
@ -5159,7 +5194,9 @@ void func_80065F0C(Player* player, UNUSED s8 playerIndex, s16 arg2, s8 arg3) {
|
||||||
primBlue = player->particles[10 + arg2].blue;
|
primBlue = player->particles[10 + arg2].blue;
|
||||||
gSPDisplayList(gDisplayListHead++, D_0D008C90);
|
gSPDisplayList(gDisplayListHead++, D_0D008C90);
|
||||||
gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE);
|
gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE);
|
||||||
gDPLoadTextureBlock(gDisplayListHead++, D_8018D498, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 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);
|
gDPLoadTextureBlock(gDisplayListHead++, D_8018D498, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 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);
|
||||||
func_8004B35C(primRed, primGreen, primBlue, 0x000000FF);
|
func_8004B35C(primRed, primGreen, primBlue, 0x000000FF);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||||
gSPVertex(gDisplayListHead++, D_800E8C00, 4, 0);
|
gSPVertex(gDisplayListHead++, D_800E8C00, 4, 0);
|
||||||
|
@ -5930,7 +5967,7 @@ void func_8006A7C0(Player* player, f32 arg1, f32 arg2, s8 playerIndex, s8 balloo
|
||||||
gPlayerBalloonPosZ[playerIndex][balloonIndex] = player->pos[2] + someZ;
|
gPlayerBalloonPosZ[playerIndex][balloonIndex] = player->pos[2] + someZ;
|
||||||
gPlayerBalloonDepartingTimer[playerIndex][balloonIndex] = 0;
|
gPlayerBalloonDepartingTimer[playerIndex][balloonIndex] = 0;
|
||||||
} else {
|
} else {
|
||||||
gPlayerBalloonPosY[playerIndex][balloonIndex] += 0.2; // Balloon is departing, so it rises
|
gPlayerBalloonPosY[playerIndex][balloonIndex] += 0.2; // Balloon is departing, so it rises
|
||||||
gPlayerBalloonDepartingTimer[playerIndex][balloonIndex] += 1; // Increment the timer
|
gPlayerBalloonDepartingTimer[playerIndex][balloonIndex] += 1; // Increment the timer
|
||||||
move_s16_towards(&D_8018D890[playerIndex][balloonIndex], 0, 0.1f);
|
move_s16_towards(&D_8018D890[playerIndex][balloonIndex], 0, 0.1f);
|
||||||
move_s16_towards(&gPlayerBalloonRotation[playerIndex][balloonIndex], 0, 0.1f);
|
move_s16_towards(&gPlayerBalloonRotation[playerIndex][balloonIndex], 0, 0.1f);
|
||||||
|
@ -5995,7 +6032,8 @@ void render_battle_balloon(Player* player, s8 playerIndex, s16 balloonIndex, s8
|
||||||
sp134[2] = gPlayerBalloonPosZ[playerIndex][balloonIndex];
|
sp134[2] = gPlayerBalloonPosZ[playerIndex][balloonIndex];
|
||||||
sp12C[0] = -((D_8018D890[playerIndex][balloonIndex] * 4) * coss(temp_t1));
|
sp12C[0] = -((D_8018D890[playerIndex][balloonIndex] * 4) * coss(temp_t1));
|
||||||
sp12C[1] = player->unk_048[screenId];
|
sp12C[1] = player->unk_048[screenId];
|
||||||
sp12C[2] = D_8018D7D0[playerIndex][balloonIndex] - (gPlayerBalloonRotation[playerIndex][balloonIndex] * coss(temp_t1)) -
|
sp12C[2] = D_8018D7D0[playerIndex][balloonIndex] -
|
||||||
|
(gPlayerBalloonRotation[playerIndex][balloonIndex] * coss(temp_t1)) -
|
||||||
((D_8018D890[playerIndex][balloonIndex] * 8) * sins(temp_t1));
|
((D_8018D890[playerIndex][balloonIndex] * 8) * sins(temp_t1));
|
||||||
mtxf_translate_rotate(sp140, sp134, sp12C);
|
mtxf_translate_rotate(sp140, sp134, sp12C);
|
||||||
mtxf_scale2(sp140, var_f20);
|
mtxf_scale2(sp140, var_f20);
|
||||||
|
@ -6397,7 +6435,7 @@ void func_8006CEC0(Player* arg0, s16 arg1, s8 arg2, s8 arg3) {
|
||||||
if (--sp20 < 0) {
|
if (--sp20 < 0) {
|
||||||
sp20 = 9;
|
sp20 = 9;
|
||||||
}
|
}
|
||||||
//Spawn particles when oob
|
// Spawn particles when oob
|
||||||
if (arg0->particles[arg1].IsAlive == 1) {
|
if (arg0->particles[arg1].IsAlive == 1) {
|
||||||
switch (arg0->particles[arg1].type) {
|
switch (arg0->particles[arg1].type) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -6539,9 +6577,11 @@ void func_8006D474(Player* player, s8 playerId, s8 screenId) {
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (gActiveScreenMode == SCREEN_MODE_1P) {
|
if (gActiveScreenMode == SCREEN_MODE_1P) {
|
||||||
render_wall_bonk_star_particles(player, playerId, var_s2, screenId, player->particles[var_s2 + 30].scale);
|
render_wall_bonk_star_particles(player, playerId, var_s2, screenId,
|
||||||
|
player->particles[var_s2 + 30].scale);
|
||||||
} else if (screenId == playerId) {
|
} else if (screenId == playerId) {
|
||||||
render_wall_bonk_star_particles(player, playerId, var_s2, screenId, player->particles[var_s2 + 30].scale);
|
render_wall_bonk_star_particles(player, playerId, var_s2, screenId,
|
||||||
|
player->particles[var_s2 + 30].scale);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
|
|
@ -420,7 +420,7 @@ void func_8006F8CC(void) {
|
||||||
|
|
||||||
void func_8006FA94(void) {
|
void func_8006FA94(void) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Player *player;
|
Player* player;
|
||||||
|
|
||||||
func_8006F8CC();
|
func_8006F8CC();
|
||||||
track_minimap_settings();
|
track_minimap_settings();
|
||||||
|
@ -440,69 +440,69 @@ void func_8006FA94(void) {
|
||||||
D_801658BC = D_801658C6 = D_801658CE = D_801658DC = D_801658EC = D_801658F4 = D_801658E4 = D_801658D6 = 0;
|
D_801658BC = D_801658C6 = D_801658CE = D_801658DC = D_801658EC = D_801658F4 = D_801658E4 = D_801658D6 = 0;
|
||||||
|
|
||||||
switch (gPlayerCount) {
|
switch (gPlayerCount) {
|
||||||
case 1:
|
case 1:
|
||||||
if (gModeSelection == GRAND_PRIX) {
|
|
||||||
D_8018D114 = 0;
|
|
||||||
D_8018D178 = 150;
|
|
||||||
D_8018D180 = 240;
|
|
||||||
} else {
|
|
||||||
D_8018D114 = 1;
|
|
||||||
D_8018D178 = 10;
|
|
||||||
D_8018D180 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
if (gScreenModeSelection == SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL) {
|
|
||||||
if (gModeSelection == GRAND_PRIX) {
|
if (gModeSelection == GRAND_PRIX) {
|
||||||
D_8018D114 = 2;
|
D_8018D114 = 0;
|
||||||
D_8018D178 = 150;
|
D_8018D178 = 150;
|
||||||
D_8018D180 = 240;
|
D_8018D180 = 240;
|
||||||
D_8018D2AC = 60;
|
|
||||||
} else if (gModeSelection == VERSUS) {
|
|
||||||
D_8018D114 = 3;
|
|
||||||
D_8018D178 = 30;
|
|
||||||
D_8018D180 = 30;
|
|
||||||
D_8018D2AC = 60;
|
|
||||||
} else {
|
} else {
|
||||||
D_8018D114 = 4;
|
D_8018D114 = 1;
|
||||||
D_8018D178 = 40;
|
D_8018D178 = 10;
|
||||||
D_8018D180 = 40;
|
D_8018D180 = 0;
|
||||||
D_8018D2AC = 60;
|
|
||||||
}
|
}
|
||||||
} else if (gModeSelection == GRAND_PRIX) {
|
break;
|
||||||
D_8018D114 = 5;
|
case 2:
|
||||||
} else if (gModeSelection == VERSUS) {
|
if (gScreenModeSelection == SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL) {
|
||||||
D_8018D114 = 6;
|
if (gModeSelection == GRAND_PRIX) {
|
||||||
} else {
|
D_8018D114 = 2;
|
||||||
D_8018D114 = 7;
|
D_8018D178 = 150;
|
||||||
}
|
D_8018D180 = 240;
|
||||||
break;
|
D_8018D2AC = 60;
|
||||||
case 3:
|
} else if (gModeSelection == VERSUS) {
|
||||||
if (gModeSelection == VERSUS) {
|
D_8018D114 = 3;
|
||||||
D_8018D114 = 8;
|
D_8018D178 = 30;
|
||||||
D_8018D178 = 0x00000064;
|
D_8018D180 = 30;
|
||||||
D_8018D180 = 0x00000096;
|
D_8018D2AC = 60;
|
||||||
D_8018D2AC = 0x0000003C;
|
} else {
|
||||||
} else {
|
D_8018D114 = 4;
|
||||||
D_8018D114 = 9;
|
D_8018D178 = 40;
|
||||||
D_8018D178 = 0x00000064;
|
D_8018D180 = 40;
|
||||||
D_8018D180 = 0x00000096;
|
D_8018D2AC = 60;
|
||||||
D_8018D2AC = 0x0000003C;
|
}
|
||||||
}
|
} else if (gModeSelection == GRAND_PRIX) {
|
||||||
break;
|
D_8018D114 = 5;
|
||||||
case 4:
|
} else if (gModeSelection == VERSUS) {
|
||||||
if (gModeSelection == VERSUS) {
|
D_8018D114 = 6;
|
||||||
D_8018D114 = 0x0000000A;
|
} else {
|
||||||
D_8018D178 = 0x0000001E;
|
D_8018D114 = 7;
|
||||||
D_8018D180 = 0x0000001E;
|
}
|
||||||
D_8018D2AC = 0x0000000A;
|
break;
|
||||||
} else {
|
case 3:
|
||||||
D_8018D114 = 0x0000000B;
|
if (gModeSelection == VERSUS) {
|
||||||
D_8018D178 = 0x0000001E;
|
D_8018D114 = 8;
|
||||||
D_8018D180 = 0x0000001E;
|
D_8018D178 = 0x00000064;
|
||||||
D_8018D2AC = 0x0000000A;
|
D_8018D180 = 0x00000096;
|
||||||
}
|
D_8018D2AC = 0x0000003C;
|
||||||
break;
|
} else {
|
||||||
|
D_8018D114 = 9;
|
||||||
|
D_8018D178 = 0x00000064;
|
||||||
|
D_8018D180 = 0x00000096;
|
||||||
|
D_8018D2AC = 0x0000003C;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if (gModeSelection == VERSUS) {
|
||||||
|
D_8018D114 = 0x0000000A;
|
||||||
|
D_8018D178 = 0x0000001E;
|
||||||
|
D_8018D180 = 0x0000001E;
|
||||||
|
D_8018D2AC = 0x0000000A;
|
||||||
|
} else {
|
||||||
|
D_8018D114 = 0x0000000B;
|
||||||
|
D_8018D178 = 0x0000001E;
|
||||||
|
D_8018D180 = 0x0000001E;
|
||||||
|
D_8018D2AC = 0x0000000A;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (gEnableDebugMode == 0) {
|
if (gEnableDebugMode == 0) {
|
||||||
D_8016576A = 0;
|
D_8016576A = 0;
|
||||||
|
|
|
@ -111,7 +111,7 @@ void func_800AFC54(Vtx* vtx, s32 a, s32 b, s32 c, Vec3s out) {
|
||||||
dx = ((varB2 - varA2) * (varC4 - varB4)) - ((varB4 - varA4) * (varC2 - varB2));
|
dx = ((varB2 - varA2) * (varC4 - varB4)) - ((varB4 - varA4) * (varC2 - varB2));
|
||||||
dy = ((varB4 - varA4) * (varC0 - varB0)) - ((varB0 - varA0) * (varC4 - varB4));
|
dy = ((varB4 - varA4) * (varC0 - varB0)) - ((varB0 - varA0) * (varC4 - varB4));
|
||||||
dz = ((varB0 - varA0) * (varC2 - varB2)) - ((varB2 - varA2) * (varC0 - varB0));
|
dz = ((varB0 - varA0) * (varC2 - varB2)) - ((varB2 - varA2) * (varC0 - varB0));
|
||||||
|
|
||||||
length = sqrtf((dx * dx) + (dy * dy) + (dz * dz));
|
length = sqrtf((dx * dx) + (dy * dy) + (dz * dz));
|
||||||
|
|
||||||
if (length < 0.001) {
|
if (length < 0.001) {
|
||||||
|
@ -163,7 +163,7 @@ void func_800AFF58(Vtx* arg0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800B0004(void) {
|
void func_800B0004(void) {
|
||||||
Vtx *vtxs;
|
Vtx* vtxs;
|
||||||
s32 res1;
|
s32 res1;
|
||||||
s32 res2;
|
s32 res2;
|
||||||
UNUSED u32 pad[0x4];
|
UNUSED u32 pad[0x4];
|
||||||
|
@ -176,16 +176,17 @@ void func_800B0004(void) {
|
||||||
gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8680), LIGHT_2);
|
gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8680), LIGHT_2);
|
||||||
gSPNumLights(gDisplayListHead++, NUMLIGHTS_1);
|
gSPNumLights(gDisplayListHead++, NUMLIGHTS_1);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH);
|
||||||
gDPSetCombineLERP(gDisplayListHead++, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, SHADE, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, SHADE);
|
gDPSetCombineLERP(gDisplayListHead++, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, SHADE, PRIMITIVE, 0, SHADE, 0, 0, 0, 0,
|
||||||
|
SHADE);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
vtxs = (D_8018EDB4 % 2) ? (D_8018EDB8) : (D_8018EDBC);
|
vtxs = (D_8018EDB4 % 2) ? (D_8018EDB8) : (D_8018EDBC);
|
||||||
D_8018EDB2 = 0x9C0;
|
D_8018EDB2 = 0x9C0;
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
for (k = 0, j = 0; j < 12; j++, k += 84) {
|
for (k = 0, j = 0; j < 12; j++, k += 84) {
|
||||||
res1 = ((sins(D_8018EDB0 - (j * D_8018EDB2)) * 84.0f) * j) * 0.18f;
|
res1 = ((sins(D_8018EDB0 - (j * D_8018EDB2)) * 84.0f) * j) * 0.18f;
|
||||||
res2 = ((sins(D_8018EDB0 - ((j + 1) * D_8018EDB2)) * 84.0f) * (j + 1)) * 0.18f;
|
res2 = ((sins(D_8018EDB0 - ((j + 1) * D_8018EDB2)) * 84.0f) * (j + 1)) * 0.18f;
|
||||||
func_800AF9E4(&(&vtxs[j * idx])[i * 48], j, i, 84, res1, res2, k, 84);
|
func_800AF9E4(&(&vtxs[j * idx])[i * 48], j, i, 84, res1, res2, k, 84);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1405,7 +1405,6 @@ void update_player(s32 playerId) {
|
||||||
s16 angle;
|
s16 angle;
|
||||||
s16 steeringSensitivity;
|
s16 steeringSensitivity;
|
||||||
|
|
||||||
|
|
||||||
s32 maxAngle;
|
s32 maxAngle;
|
||||||
Player* player;
|
Player* player;
|
||||||
UNUSED s32 pad3[10];
|
UNUSED s32 pad3[10];
|
||||||
|
@ -1639,7 +1638,12 @@ void update_player(s32 playerId) {
|
||||||
pathIndex %= gSelectedPathCount;
|
pathIndex %= gSelectedPathCount;
|
||||||
set_track_offset_position(pathIndex, -0.7f, gPlayerPathIndex);
|
set_track_offset_position(pathIndex, -0.7f, gPlayerPathIndex);
|
||||||
}
|
}
|
||||||
if (1) { } if (1) { } if (1) { } if (1) { } if (1) { } if (1) { }
|
if (1) {}
|
||||||
|
if (1) {}
|
||||||
|
if (1) {}
|
||||||
|
if (1) {}
|
||||||
|
if (1) {}
|
||||||
|
if (1) {}
|
||||||
if (gPlayerPathIndex == 0) {
|
if (gPlayerPathIndex == 0) {
|
||||||
func_8000B140(playerId);
|
func_8000B140(playerId);
|
||||||
if (D_80162FF8[playerId] > 0) {
|
if (D_80162FF8[playerId] > 0) {
|
||||||
|
@ -1845,7 +1849,6 @@ void func_8000B140(s32 playerId) {
|
||||||
sp74[j] = temp_f2 - temp_f0_2;
|
sp74[j] = temp_f2 - temp_f0_2;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1865,7 +1868,7 @@ void func_8000B140(s32 playerId) {
|
||||||
temp_f2 = gTrackPositionFactor[sp9C[i]];
|
temp_f2 = gTrackPositionFactor[sp9C[i]];
|
||||||
if ((temp_f2 > (-1.0f)) && (temp_f2 < 1.0f)) {
|
if ((temp_f2 > (-1.0f)) && (temp_f2 < 1.0f)) {
|
||||||
|
|
||||||
temp_f12 = temp_ft2 = ((0.2f * (20.0f / (spB0[i] + 20.0f))) * ((sp74[i]) + 10.0f)) / 20.0f;
|
temp_f12 = temp_ft2 = ((0.2f * (20.0f / (spB0[i] + 20.0f))) * ((sp74[i]) + 10.0f)) / 20.0f;
|
||||||
|
|
||||||
if ((var_f18 == 1.0f) && (var_f20 == (-1.0f))) {
|
if ((var_f18 == 1.0f) && (var_f20 == (-1.0f))) {
|
||||||
var_f18 = temp_f2 - temp_f12;
|
var_f18 = temp_f2 - temp_f12;
|
||||||
|
@ -2854,12 +2857,14 @@ void func_80017054(Camera* camera, UNUSED Player* player, UNUSED s32 index, s32
|
||||||
sp58 = gPathCountByPathIndex[pathIndex];
|
sp58 = gPathCountByPathIndex[pathIndex];
|
||||||
D_80163238 = playerId;
|
D_80163238 = playerId;
|
||||||
sp56 = gNearestPathPointByCameraId[cameraId];
|
sp56 = gNearestPathPointByCameraId[cameraId];
|
||||||
gNearestPathPointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestPathPointByCameraId[cameraId], pathIndex);
|
gNearestPathPointByCameraId[cameraId] =
|
||||||
|
func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestPathPointByCameraId[cameraId], pathIndex);
|
||||||
if (gCurrentCourseId == 4) {
|
if (gCurrentCourseId == 4) {
|
||||||
if ((sp56 != gNearestPathPointByCameraId[cameraId]) && (gNearestPathPointByCameraId[cameraId] == 1)) {
|
if ((sp56 != gNearestPathPointByCameraId[cameraId]) && (gNearestPathPointByCameraId[cameraId] == 1)) {
|
||||||
D_80163DD8[cameraId] = random_int(4);
|
D_80163DD8[cameraId] = random_int(4);
|
||||||
pathIndex = D_80163DD8[cameraId];
|
pathIndex = D_80163DD8[cameraId];
|
||||||
gNearestPathPointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestPathPointByCameraId[cameraId], pathIndex);
|
gNearestPathPointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2],
|
||||||
|
gNearestPathPointByCameraId[cameraId], pathIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sp6E = (gNearestPathPointByCameraId[cameraId] + 0xA) % sp58;
|
sp6E = (gNearestPathPointByCameraId[cameraId] + 0xA) % sp58;
|
||||||
|
@ -3883,10 +3888,10 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
bool isValidBanana2;
|
bool isValidBanana2;
|
||||||
|
|
||||||
// Only used in this function
|
// Only used in this function
|
||||||
#define BANANA_ACTOR(actor) ((struct BananaActor*)(actor))
|
#define BANANA_ACTOR(actor) ((struct BananaActor*) (actor))
|
||||||
#define SHELL_ACTOR(actor) ((struct ShellActor*)(actor))
|
#define SHELL_ACTOR(actor) ((struct ShellActor*) (actor))
|
||||||
#define FAKE_ITEMBOX_ACTOR(actor) ((struct FakeItemBox*)(actor))
|
#define FAKE_ITEMBOX_ACTOR(actor) ((struct FakeItemBox*) (actor))
|
||||||
#define BANANA_BUNCH_ACTOR(actor) ((struct BananaBunchParent*)(actor))
|
#define BANANA_BUNCH_ACTOR(actor) ((struct BananaBunchParent*) (actor))
|
||||||
|
|
||||||
if (gModeSelection == TIME_TRIALS) {
|
if (gModeSelection == TIME_TRIALS) {
|
||||||
return;
|
return;
|
||||||
|
@ -3905,9 +3910,9 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
cpuStrategy->actorIndex = -1;
|
cpuStrategy->actorIndex = -1;
|
||||||
if ((((playerId * 20) + 100) < gNumPathPointsTraversed[playerId]) && (cpuStrategy->timer >= 0x259) &&
|
if ((((playerId * 20) + 100) < gNumPathPointsTraversed[playerId]) && (cpuStrategy->timer >= 0x259) &&
|
||||||
(cpuStrategy->numItemUse < 3) && (gLapCountByPlayerId[playerId] < 3)) {
|
(cpuStrategy->numItemUse < 3) && (gLapCountByPlayerId[playerId] < 3)) {
|
||||||
cpu_decisions_branch_item(playerId, &cpuStrategy->branch,
|
cpu_decisions_branch_item(
|
||||||
cpu_gen_random_item((s16) gLapCountByPlayerId[playerId],
|
playerId, &cpuStrategy->branch,
|
||||||
gGPCurrentRaceRankByPlayerId[playerId]));
|
cpu_gen_random_item((s16) gLapCountByPlayerId[playerId], gGPCurrentRaceRankByPlayerId[playerId]));
|
||||||
} else {
|
} else {
|
||||||
func_8001ABE0(playerId, cpuStrategy);
|
func_8001ABE0(playerId, cpuStrategy);
|
||||||
}
|
}
|
||||||
|
@ -3915,28 +3920,30 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
|
|
||||||
case CPU_STRATEGY_ITEM_BANANA:
|
case CPU_STRATEGY_ITEM_BANANA:
|
||||||
// never true
|
// never true
|
||||||
if ((gLapCountByPlayerId[playerId] > 0) && (gGPCurrentRaceRankByPlayerId[playerId] > gGPCurrentRaceRankByPlayerId[gBestRankedHumanPlayer]) && (gGPCurrentRaceRankByPlayerId[gBestRankedHumanPlayer] == FIRST_PLACE)) {
|
if ((gLapCountByPlayerId[playerId] > 0) &&
|
||||||
|
(gGPCurrentRaceRankByPlayerId[playerId] > gGPCurrentRaceRankByPlayerId[gBestRankedHumanPlayer]) &&
|
||||||
|
(gGPCurrentRaceRankByPlayerId[gBestRankedHumanPlayer] == FIRST_PLACE)) {
|
||||||
switch (player->characterId) {
|
switch (player->characterId) {
|
||||||
case DK:
|
case DK:
|
||||||
if (is_path_point_in_range(gNearestPathPointByPlayerId[playerId],
|
if (is_path_point_in_range(gNearestPathPointByPlayerId[playerId],
|
||||||
gNearestPathPointByPlayerId[gBestRankedHumanPlayer], 40, 2,
|
gNearestPathPointByPlayerId[gBestRankedHumanPlayer], 40, 2,
|
||||||
gSelectedPathCount) > 0) {
|
gSelectedPathCount) > 0) {
|
||||||
cpuStrategy->branch = CPU_STRATEGY_THROW_BANANA;
|
cpuStrategy->branch = CPU_STRATEGY_THROW_BANANA;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PEACH:
|
case PEACH:
|
||||||
if (is_path_point_in_range(gNearestPathPointByPlayerId[playerId],
|
if (is_path_point_in_range(gNearestPathPointByPlayerId[playerId],
|
||||||
gNearestPathPointByPlayerId[gBestRankedHumanPlayer], 4, 2,
|
gNearestPathPointByPlayerId[gBestRankedHumanPlayer], 4, 2,
|
||||||
gSelectedPathCount) > 0) {
|
gSelectedPathCount) > 0) {
|
||||||
cpuStrategy->branch = CPU_STRATEGY_THROW_BANANA;
|
cpuStrategy->branch = CPU_STRATEGY_THROW_BANANA;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (is_path_point_in_range(gNearestPathPointByPlayerId[playerId],
|
if (is_path_point_in_range(gNearestPathPointByPlayerId[playerId],
|
||||||
gNearestPathPointByPlayerId[gBestRankedHumanPlayer], 10, 2,
|
gNearestPathPointByPlayerId[gBestRankedHumanPlayer], 10, 2,
|
||||||
gSelectedPathCount) > 0) {
|
gSelectedPathCount) > 0) {
|
||||||
cpuStrategy->branch = CPU_STRATEGY_THROW_BANANA;
|
cpuStrategy->branch = CPU_STRATEGY_THROW_BANANA;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -3958,8 +3965,8 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
|
|
||||||
case CPU_STRATEGY_HOLD_BANANA:
|
case CPU_STRATEGY_HOLD_BANANA:
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((!(BANANA_ACTOR(actor)->flags & 0x8000)) || (BANANA_ACTOR(actor)->type != ACTOR_BANANA) || (BANANA_ACTOR(actor)->state != HELD_BANANA) ||
|
if ((!(BANANA_ACTOR(actor)->flags & 0x8000)) || (BANANA_ACTOR(actor)->type != ACTOR_BANANA) ||
|
||||||
(playerId != BANANA_ACTOR(actor)->playerId)) {
|
(BANANA_ACTOR(actor)->state != HELD_BANANA) || (playerId != BANANA_ACTOR(actor)->playerId)) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
if (!(BANANA_ACTOR(actor)->flags & 0x8000)) {}
|
if (!(BANANA_ACTOR(actor)->flags & 0x8000)) {}
|
||||||
|
@ -3978,7 +3985,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
case CPU_STRATEGY_DROP_BANANA:
|
case CPU_STRATEGY_DROP_BANANA:
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((((!(BANANA_ACTOR(actor)->flags & 0x8000)) || (BANANA_ACTOR(actor)->type != ACTOR_BANANA)) ||
|
if ((((!(BANANA_ACTOR(actor)->flags & 0x8000)) || (BANANA_ACTOR(actor)->type != ACTOR_BANANA)) ||
|
||||||
(BANANA_ACTOR(actor)->state != HELD_BANANA)) ||
|
(BANANA_ACTOR(actor)->state != HELD_BANANA)) ||
|
||||||
(playerId != BANANA_ACTOR(actor)->playerId)) {
|
(playerId != BANANA_ACTOR(actor)->playerId)) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
|
@ -4014,7 +4021,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
cpuStrategy->numItemUse += 1;
|
cpuStrategy->numItemUse += 1;
|
||||||
pathPoint = &gTrackPaths[gPathIndexByPlayerId[0]]
|
pathPoint = &gTrackPaths[gPathIndexByPlayerId[0]]
|
||||||
[(gNearestPathPointByPlayerId[gBestRankedHumanPlayer] + 30) %
|
[(gNearestPathPointByPlayerId[gBestRankedHumanPlayer] + 30) %
|
||||||
gPathCountByPathIndex[gPathIndexByPlayerId[gBestRankedHumanPlayer]]];
|
gPathCountByPathIndex[gPathIndexByPlayerId[gBestRankedHumanPlayer]]];
|
||||||
BANANA_ACTOR(actor)->velocity[0] = (pathPoint->posX - player->pos[0]) / 20.0;
|
BANANA_ACTOR(actor)->velocity[0] = (pathPoint->posX - player->pos[0]) / 20.0;
|
||||||
BANANA_ACTOR(actor)->velocity[1] = ((pathPoint->posY - player->pos[1]) / 20.0) + 4.0;
|
BANANA_ACTOR(actor)->velocity[1] = ((pathPoint->posY - player->pos[1]) / 20.0) + 4.0;
|
||||||
BANANA_ACTOR(actor)->velocity[2] = (pathPoint->posZ - player->pos[2]) / 20.0;
|
BANANA_ACTOR(actor)->velocity[2] = (pathPoint->posZ - player->pos[2]) / 20.0;
|
||||||
|
@ -4030,7 +4037,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
case CPU_STRATEGY_HOLD_THROW_BANANA:
|
case CPU_STRATEGY_HOLD_THROW_BANANA:
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((((!(BANANA_ACTOR(actor)->flags & 0x8000)) || (BANANA_ACTOR(actor)->type != ACTOR_BANANA)) ||
|
if ((((!(BANANA_ACTOR(actor)->flags & 0x8000)) || (BANANA_ACTOR(actor)->type != ACTOR_BANANA)) ||
|
||||||
(BANANA_ACTOR(actor)->state != BANANA_ON_GROUND)) ||
|
(BANANA_ACTOR(actor)->state != BANANA_ON_GROUND)) ||
|
||||||
(playerId != BANANA_ACTOR(actor)->playerId)) {
|
(playerId != BANANA_ACTOR(actor)->playerId)) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
|
@ -4056,7 +4063,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
case CPU_STRATEGY_END_THROW_BANANA:
|
case CPU_STRATEGY_END_THROW_BANANA:
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((((!(BANANA_ACTOR(actor)->flags & 0x8000)) || (BANANA_ACTOR(actor)->type != ACTOR_BANANA)) ||
|
if ((((!(BANANA_ACTOR(actor)->flags & 0x8000)) || (BANANA_ACTOR(actor)->type != ACTOR_BANANA)) ||
|
||||||
(BANANA_ACTOR(actor)->state != BANANA_ON_GROUND)) ||
|
(BANANA_ACTOR(actor)->state != BANANA_ON_GROUND)) ||
|
||||||
(playerId != BANANA_ACTOR(actor)->playerId)) {
|
(playerId != BANANA_ACTOR(actor)->playerId)) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
|
@ -4071,7 +4078,8 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
BANANA_ACTOR(actor)->velocity[1] = 0.0f;
|
BANANA_ACTOR(actor)->velocity[1] = 0.0f;
|
||||||
BANANA_ACTOR(actor)->velocity[2] = 0.0f;
|
BANANA_ACTOR(actor)->velocity[2] = 0.0f;
|
||||||
BANANA_ACTOR(actor)->pos[1] =
|
BANANA_ACTOR(actor)->pos[1] =
|
||||||
get_surface_height(BANANA_ACTOR(actor)->pos[0], BANANA_ACTOR(actor)->pos[1] + 30.0, BANANA_ACTOR(actor)->pos[2]) +
|
get_surface_height(BANANA_ACTOR(actor)->pos[0], BANANA_ACTOR(actor)->pos[1] + 30.0,
|
||||||
|
BANANA_ACTOR(actor)->pos[2]) +
|
||||||
(BANANA_ACTOR(actor)->boundingBoxSize + 1.0f);
|
(BANANA_ACTOR(actor)->boundingBoxSize + 1.0f);
|
||||||
}
|
}
|
||||||
player->soundEffects &= ~HOLD_BANANA_SOUND_EFFECT;
|
player->soundEffects &= ~HOLD_BANANA_SOUND_EFFECT;
|
||||||
|
@ -4097,8 +4105,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
|
|
||||||
case CPU_STRATEGY_HOLD_GREEN_SHELL:
|
case CPU_STRATEGY_HOLD_GREEN_SHELL:
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((((!(actor->flags & 0x8000)) || (actor->type != ACTOR_GREEN_SHELL)) ||
|
if ((((!(actor->flags & 0x8000)) || (actor->type != ACTOR_GREEN_SHELL)) || (actor->state != HELD_SHELL)) ||
|
||||||
(actor->state != HELD_SHELL)) ||
|
|
||||||
(playerId != actor->rot[2])) {
|
(playerId != actor->rot[2])) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
|
@ -4117,8 +4124,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
|
|
||||||
case CPU_STRATEGY_THROW_GREEN_SHELL:
|
case CPU_STRATEGY_THROW_GREEN_SHELL:
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((((!(actor->flags & 0x8000)) || (actor->type != ACTOR_GREEN_SHELL)) ||
|
if ((((!(actor->flags & 0x8000)) || (actor->type != ACTOR_GREEN_SHELL)) || (actor->state != HELD_SHELL)) ||
|
||||||
(actor->state != HELD_SHELL)) ||
|
|
||||||
(playerId != actor->rot[2])) {
|
(playerId != actor->rot[2])) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
|
@ -4155,7 +4161,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
case CPU_STRATEGY_HOLD_RED_SHELL:
|
case CPU_STRATEGY_HOLD_RED_SHELL:
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((((!(SHELL_ACTOR(actor)->flags & 0x8000)) || (SHELL_ACTOR(actor)->type != ACTOR_RED_SHELL)) ||
|
if ((((!(SHELL_ACTOR(actor)->flags & 0x8000)) || (SHELL_ACTOR(actor)->type != ACTOR_RED_SHELL)) ||
|
||||||
(SHELL_ACTOR(actor)->state != HELD_SHELL)) ||
|
(SHELL_ACTOR(actor)->state != HELD_SHELL)) ||
|
||||||
(playerId != SHELL_ACTOR(actor)->playerId)) {
|
(playerId != SHELL_ACTOR(actor)->playerId)) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
|
@ -4175,7 +4181,7 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
clear_expired_strategies(cpuStrategy);
|
clear_expired_strategies(cpuStrategy);
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((((!(SHELL_ACTOR(actor)->flags & 0x8000)) || (SHELL_ACTOR(actor)->type != ACTOR_RED_SHELL)) ||
|
if ((((!(SHELL_ACTOR(actor)->flags & 0x8000)) || (SHELL_ACTOR(actor)->type != ACTOR_RED_SHELL)) ||
|
||||||
(SHELL_ACTOR(actor)->state != HELD_SHELL)) ||
|
(SHELL_ACTOR(actor)->state != HELD_SHELL)) ||
|
||||||
(playerId != SHELL_ACTOR(actor)->playerId)) {
|
(playerId != SHELL_ACTOR(actor)->playerId)) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
|
@ -4283,9 +4289,10 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((BANANA_BUNCH_ACTOR(actor)->type == ACTOR_BANANA_BUNCH) && (BANANA_BUNCH_ACTOR(actor)->state == 6)) &&
|
if (((BANANA_BUNCH_ACTOR(actor)->type == ACTOR_BANANA_BUNCH) &&
|
||||||
|
(BANANA_BUNCH_ACTOR(actor)->state == 6)) &&
|
||||||
(isValidBanana1 == true)) {
|
(isValidBanana1 == true)) {
|
||||||
drop_banana_in_banana_bunch((struct BananaBunchParent*)actor);
|
drop_banana_in_banana_bunch((struct BananaBunchParent*) actor);
|
||||||
}
|
}
|
||||||
cpuStrategy->numDroppedBananaBunch += 1;
|
cpuStrategy->numDroppedBananaBunch += 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -4309,8 +4316,9 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
|
|
||||||
case CPU_STRATEGY_HOLD_FAKE_ITEM_BOX:
|
case CPU_STRATEGY_HOLD_FAKE_ITEM_BOX:
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((((!(FAKE_ITEMBOX_ACTOR(actor)->flags & 0x8000)) || (FAKE_ITEMBOX_ACTOR(actor)->type != ACTOR_FAKE_ITEM_BOX)) ||
|
if ((((!(FAKE_ITEMBOX_ACTOR(actor)->flags & 0x8000)) ||
|
||||||
(FAKE_ITEMBOX_ACTOR(actor)->state != 0)) ||
|
(FAKE_ITEMBOX_ACTOR(actor)->type != ACTOR_FAKE_ITEM_BOX)) ||
|
||||||
|
(FAKE_ITEMBOX_ACTOR(actor)->state != 0)) ||
|
||||||
(playerId != ((s32) FAKE_ITEMBOX_ACTOR(actor)->playerId))) {
|
(playerId != ((s32) FAKE_ITEMBOX_ACTOR(actor)->playerId))) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
|
@ -4328,8 +4336,9 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
|
|
||||||
case CPU_STRATEGY_THROW_FAKE_ITEM_BOX:
|
case CPU_STRATEGY_THROW_FAKE_ITEM_BOX:
|
||||||
actor = &gActorList[cpuStrategy->actorIndex];
|
actor = &gActorList[cpuStrategy->actorIndex];
|
||||||
if ((((!(FAKE_ITEMBOX_ACTOR(actor)->flags & 0x8000)) || (FAKE_ITEMBOX_ACTOR(actor)->type != ACTOR_FAKE_ITEM_BOX)) ||
|
if ((((!(FAKE_ITEMBOX_ACTOR(actor)->flags & 0x8000)) ||
|
||||||
(FAKE_ITEMBOX_ACTOR(actor)->state != 0)) ||
|
(FAKE_ITEMBOX_ACTOR(actor)->type != ACTOR_FAKE_ITEM_BOX)) ||
|
||||||
|
(FAKE_ITEMBOX_ACTOR(actor)->state != 0)) ||
|
||||||
(playerId != ((s32) FAKE_ITEMBOX_ACTOR(actor)->playerId))) {
|
(playerId != ((s32) FAKE_ITEMBOX_ACTOR(actor)->playerId))) {
|
||||||
|
|
||||||
// FAKE
|
// FAKE
|
||||||
|
@ -4339,10 +4348,11 @@ void cpu_use_item_strategy(s32 playerId) {
|
||||||
if (FAKE_ITEMBOX_ACTOR(actor)->rot[0] != playerId) {}
|
if (FAKE_ITEMBOX_ACTOR(actor)->rot[0] != playerId) {}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
func_802A1064((struct FakeItemBox*)actor);
|
func_802A1064((struct FakeItemBox*) actor);
|
||||||
if (D_801631E0[playerId] == true) {
|
if (D_801631E0[playerId] == true) {
|
||||||
FAKE_ITEMBOX_ACTOR(actor)->pos[1] =
|
FAKE_ITEMBOX_ACTOR(actor)->pos[1] =
|
||||||
get_surface_height(FAKE_ITEMBOX_ACTOR(actor)->pos[0], FAKE_ITEMBOX_ACTOR(actor)->pos[1] + 30.0, FAKE_ITEMBOX_ACTOR(actor)->pos[2]) +
|
get_surface_height(FAKE_ITEMBOX_ACTOR(actor)->pos[0], FAKE_ITEMBOX_ACTOR(actor)->pos[1] + 30.0,
|
||||||
|
FAKE_ITEMBOX_ACTOR(actor)->pos[2]) +
|
||||||
FAKE_ITEMBOX_ACTOR(actor)->boundingBoxSize;
|
FAKE_ITEMBOX_ACTOR(actor)->boundingBoxSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,8 @@ void func_80007FA4(s32 playerId, Player* player, f32 arg2) {
|
||||||
(arg2 < ((test * 18.0) / 216.0)) ? func_80038BE4(player, 6) : player_decelerate_alternative(player, 1.0f);
|
(arg2 < ((test * 18.0) / 216.0)) ? func_80038BE4(player, 6) : player_decelerate_alternative(player, 1.0f);
|
||||||
} else if (D_80163410[playerId] == 0) {
|
} else if (D_80163410[playerId] == 0) {
|
||||||
test = 35;
|
test = 35;
|
||||||
(arg2 < (((test ^ 0) * 18.0) / 216.0)) ? func_80038BE4(player, 2) : player_decelerate_alternative(player, 1.0f);
|
(arg2 < (((test ^ 0) * 18.0) / 216.0)) ? func_80038BE4(player, 2)
|
||||||
|
: player_decelerate_alternative(player, 1.0f);
|
||||||
} else {
|
} else {
|
||||||
player_decelerate_alternative(player, 1.0f);
|
player_decelerate_alternative(player, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,13 +302,19 @@ ThwompSpawn gThomwpSpawns150CC[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
f32 D_800E594C[] = {
|
f32 D_800E594C[] = {
|
||||||
-8.0, 8.0,
|
-8.0,
|
||||||
8.0, 8.0,
|
8.0,
|
||||||
0.0, 0.0,
|
8.0,
|
||||||
8.0, -8.0,
|
8.0,
|
||||||
-8.0, -8.0,
|
0.0,
|
||||||
|
0.0,
|
||||||
|
8.0,
|
||||||
|
-8.0,
|
||||||
|
-8.0,
|
||||||
|
-8.0,
|
||||||
// This feels super fake, but it matches
|
// This feels super fake, but it matches
|
||||||
-0.0, 0.0,
|
-0.0,
|
||||||
|
0.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
s16 D_800E597C[] = { 0x0000, 0x0000, 0x4000, 0x8000, 0x8000, 0xc000 };
|
s16 D_800E597C[] = { 0x0000, 0x0000, 0x4000, 0x8000, 0x8000, 0xc000 };
|
||||||
|
@ -446,10 +452,8 @@ s8 D_800E5DB4[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
s16 D_800E5DF4[] = {
|
s16 D_800E5DF4[] = {
|
||||||
0xfc7a, 0x0046, 0xfa82, 0x3800,
|
0xfc7a, 0x0046, 0xfa82, 0x3800, 0xfc4c, 0x0046, 0xfa03, 0x3800,
|
||||||
0xfc4c, 0x0046, 0xfa03, 0x3800,
|
0xf786, 0x0000, 0x02d3, 0x0400, 0xf76f, 0x0000, 0x02f9, 0x0400,
|
||||||
0xf786, 0x0000, 0x02d3, 0x0400,
|
|
||||||
0xf76f, 0x0000, 0x02f9, 0x0400,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
HegdehogSpawn gHedgehogSpawns[] = {
|
HegdehogSpawn gHedgehogSpawns[] = {
|
||||||
|
@ -667,13 +671,8 @@ SplineData* D_800E672C[] = { &D_800E659C, &D_800E6668 };
|
||||||
|
|
||||||
// Positions of the neon signs in rainbow road
|
// Positions of the neon signs in rainbow road
|
||||||
float D_800E6734[] = {
|
float D_800E6734[] = {
|
||||||
1443.0, 1044.0, -5478.0,
|
1443.0, 1044.0, -5478.0, 1678.0, 1012.0, -4840.0, -3924.0, 921.0, 2566.0, -3311.0, 790.0,
|
||||||
1678.0, 1012.0, -4840.0,
|
3524.0, -1284.0, 1341.0, 4527.0, 2268.0, 1041.0, 4456.0, 2820.0, 1109.0, 1985.0,
|
||||||
-3924.0, 921.0, 2566.0,
|
|
||||||
-3311.0, 790.0, 3524.0,
|
|
||||||
-1284.0, 1341.0, 4527.0,
|
|
||||||
2268.0, 1041.0, 4456.0,
|
|
||||||
2820.0, 1109.0, 1985.0,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// This should really be `extern Vec3s gTorchSpawns[];`
|
// This should really be `extern Vec3s gTorchSpawns[];`
|
||||||
|
|
|
@ -2994,8 +2994,9 @@ Gfx* func_80096CD8(Gfx* displayListHead, s32 xPos, s32 yPos, u32 width, u32 heig
|
||||||
if (rectXoffset == 0) {
|
if (rectXoffset == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
rectXoffset = tileWidth;
|
rectXoffset = tileWidth;
|
||||||
|
}
|
||||||
|
|
||||||
gDPLoadTextureTile(displayListHead++, (D_0B002A00 + random_int(128) * 2), G_IM_FMT_IA, G_IM_SIZ_16b, width,
|
gDPLoadTextureTile(displayListHead++, (D_0B002A00 + random_int(128) * 2), G_IM_FMT_IA, G_IM_SIZ_16b, width,
|
||||||
height, x, y, x + rectXoffset, y + rectYoffset, 0, G_TX_WRAP, G_TX_WRAP, masks, maskt,
|
height, x, y, x + rectXoffset, y + rectYoffset, 0, G_TX_WRAP, G_TX_WRAP, masks, maskt,
|
||||||
|
@ -3714,8 +3715,9 @@ void func_80099EC4(void) {
|
||||||
var_s1 = D_8018E0E8;
|
var_s1 = D_8018E0E8;
|
||||||
temp_s2 = var_s1->mk64Texture;
|
temp_s2 = var_s1->mk64Texture;
|
||||||
|
|
||||||
if (temp_s2 == NULL)
|
if (temp_s2 == NULL) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
huh = temp_s2->size;
|
huh = temp_s2->size;
|
||||||
if (huh != 0) {
|
if (huh != 0) {
|
||||||
|
@ -3753,8 +3755,9 @@ void func_80099EC4(void) {
|
||||||
D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array);
|
D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array);
|
||||||
var_s1->mk64Texture = NULL;
|
var_s1->mk64Texture = NULL;
|
||||||
var_s1++;
|
var_s1++;
|
||||||
if (var_s4 != 0)
|
if (var_s4 != 0) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
|
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
|
||||||
if ((var_s1 + 1)->mk64Texture == NULL) {
|
if ((var_s1 + 1)->mk64Texture == NULL) {
|
||||||
var_s4 += 1;
|
var_s4 += 1;
|
||||||
|
@ -3777,8 +3780,9 @@ void func_80099EC4(void) {
|
||||||
D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array);
|
D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array);
|
||||||
var_s1->mk64Texture = NULL;
|
var_s1->mk64Texture = NULL;
|
||||||
var_s1++;
|
var_s1++;
|
||||||
if (var_s4 != 0)
|
if (var_s4 != 0) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
|
osRecvMesg(&gDmaMesgQueue, &sp64, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10975,7 +10979,8 @@ void func_800ACF40(MenuItem* arg0) {
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (D_8018DEE0[arg0->D_8018DEE0_index].sequenceIndex >= D_800E8440[temp_a1]) {
|
if (D_8018DEE0[arg0->D_8018DEE0_index].sequenceIndex >= D_800E8440[temp_a1]) {
|
||||||
func_8009A640(arg0->D_8018DEE0_index, 0, somePlayerIndex, segmented_to_virtual_dupe_2(D_800E83A0[temp_a1]));
|
func_8009A640(arg0->D_8018DEE0_index, 0, somePlayerIndex,
|
||||||
|
segmented_to_virtual_dupe_2(D_800E83A0[temp_a1]));
|
||||||
arg0->state = 4;
|
arg0->state = 4;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
43
src/menus.c
43
src/menus.c
|
@ -1271,7 +1271,7 @@ void setup_selected_game_mode(void) {
|
||||||
*/
|
*/
|
||||||
void main_menu_act(struct Controller* controller, u16 controllerIdx) {
|
void main_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
u16 btnAndStick;
|
u16 btnAndStick;
|
||||||
s32 subMode; // subMode
|
s32 subMode; // subMode
|
||||||
bool cursorMoved; // cursorMoved
|
bool cursorMoved; // cursorMoved
|
||||||
|
|
||||||
btnAndStick = controller->buttonPressed | controller->stickPressed;
|
btnAndStick = controller->buttonPressed | controller->stickPressed;
|
||||||
|
@ -1354,7 +1354,7 @@ void main_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
play_sound2(SOUND_MENU_GO_BACK);
|
play_sound2(SOUND_MENU_GO_BACK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (btnAndStick & A_BUTTON) {
|
if (btnAndStick & A_BUTTON) {
|
||||||
switch (gGameModePlayerSelection[gPlayerCount - 1][gGameModeMenuColumn[gPlayerCount - 1]]) {
|
switch (gGameModePlayerSelection[gPlayerCount - 1][gGameModeMenuColumn[gPlayerCount - 1]]) {
|
||||||
default:
|
default:
|
||||||
|
@ -1407,11 +1407,13 @@ void main_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
if (btnAndStick & D_JPAD) {
|
if (btnAndStick & D_JPAD) {
|
||||||
cursorMoved = false;
|
cursorMoved = false;
|
||||||
if (has_unlocked_extra_mode()) {
|
if (has_unlocked_extra_mode()) {
|
||||||
if (subMode < sGameModePlayerColumnExtra[gPlayerCount - 1][gGameModeMenuColumn[gPlayerCount - 1]]) {
|
if (subMode <
|
||||||
|
sGameModePlayerColumnExtra[gPlayerCount - 1][gGameModeMenuColumn[gPlayerCount - 1]]) {
|
||||||
cursorMoved = true;
|
cursorMoved = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (subMode < sGameModePlayerColumnDefault[gPlayerCount - 1][gGameModeMenuColumn[gPlayerCount - 1]]) {
|
if (subMode <
|
||||||
|
sGameModePlayerColumnDefault[gPlayerCount - 1][gGameModeMenuColumn[gPlayerCount - 1]]) {
|
||||||
cursorMoved = true;
|
cursorMoved = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1428,7 +1430,7 @@ void main_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
reset_cycle_flash_menu();
|
reset_cycle_flash_menu();
|
||||||
play_sound2(SOUND_MENU_GO_BACK);
|
play_sound2(SOUND_MENU_GO_BACK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (btnAndStick & A_BUTTON) {
|
if (btnAndStick & A_BUTTON) {
|
||||||
reset_cycle_flash_menu();
|
reset_cycle_flash_menu();
|
||||||
if ((gPlayerCount == 1) && ((gGameModeMenuColumn - 1)[gPlayerCount] == 1) && (subMode == 1)) {
|
if ((gPlayerCount == 1) && ((gGameModeMenuColumn - 1)[gPlayerCount] == 1) && (subMode == 1)) {
|
||||||
|
@ -1533,10 +1535,12 @@ void player_select_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
play_sound2(SOUND_MENU_GO_BACK);
|
play_sound2(SOUND_MENU_GO_BACK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((btnAndStick & A_BUTTON) && (gCharacterGridIsSelected[controllerIdx] == 0)) {
|
if ((btnAndStick & A_BUTTON) && (gCharacterGridIsSelected[controllerIdx] == 0)) {
|
||||||
gCharacterGridIsSelected[controllerIdx] = true;
|
gCharacterGridIsSelected[controllerIdx] = true;
|
||||||
func_800C90F4(controllerIdx, ((sCharacterGridOrder - 1)[gCharacterGridSelections[controllerIdx]] * 0x10) + 0x2900800E);
|
func_800C90F4(controllerIdx,
|
||||||
|
((sCharacterGridOrder - 1)[gCharacterGridSelections[controllerIdx]] * 0x10) +
|
||||||
|
0x2900800E);
|
||||||
}
|
}
|
||||||
|
|
||||||
selected = false;
|
selected = false;
|
||||||
|
@ -1558,7 +1562,9 @@ void player_select_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
}
|
}
|
||||||
j = gCharacterGridSelections[controllerIdx];
|
j = gCharacterGridSelections[controllerIdx];
|
||||||
if ((btnAndStick & R_JPAD) && (btnAndStick & D_JPAD)) {
|
if ((btnAndStick & R_JPAD) && (btnAndStick & D_JPAD)) {
|
||||||
if ((gCharacterGridSelections[controllerIdx] == 1U) || (gCharacterGridSelections[controllerIdx] == 2U) || (gCharacterGridSelections[controllerIdx] == 3U)) {
|
if ((gCharacterGridSelections[controllerIdx] == 1U) ||
|
||||||
|
(gCharacterGridSelections[controllerIdx] == 2U) ||
|
||||||
|
(gCharacterGridSelections[controllerIdx] == 3U)) {
|
||||||
j = gCharacterGridSelections[controllerIdx] + 5;
|
j = gCharacterGridSelections[controllerIdx] + 5;
|
||||||
if (is_character_spot_free(j)) {
|
if (is_character_spot_free(j)) {
|
||||||
gCharacterGridSelections[controllerIdx] = j;
|
gCharacterGridSelections[controllerIdx] = j;
|
||||||
|
@ -1568,7 +1574,9 @@ void player_select_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((btnAndStick & L_JPAD) && (btnAndStick & D_JPAD)) {
|
if ((btnAndStick & L_JPAD) && (btnAndStick & D_JPAD)) {
|
||||||
if ((gCharacterGridSelections[controllerIdx] == 2U) || (gCharacterGridSelections[controllerIdx] == 3U) || (gCharacterGridSelections[controllerIdx] == 4U)) {
|
if ((gCharacterGridSelections[controllerIdx] == 2U) ||
|
||||||
|
(gCharacterGridSelections[controllerIdx] == 3U) ||
|
||||||
|
(gCharacterGridSelections[controllerIdx] == 4U)) {
|
||||||
j = gCharacterGridSelections[controllerIdx] + 3;
|
j = gCharacterGridSelections[controllerIdx] + 3;
|
||||||
if (is_character_spot_free(j)) {
|
if (is_character_spot_free(j)) {
|
||||||
gCharacterGridSelections[controllerIdx] = j;
|
gCharacterGridSelections[controllerIdx] = j;
|
||||||
|
@ -1578,7 +1586,9 @@ void player_select_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((btnAndStick & R_JPAD) && (btnAndStick & U_JPAD)) {
|
if ((btnAndStick & R_JPAD) && (btnAndStick & U_JPAD)) {
|
||||||
if ((gCharacterGridSelections[controllerIdx] == 5U) || (gCharacterGridSelections[controllerIdx] == 6U) || (gCharacterGridSelections[controllerIdx] == 7U)) {
|
if ((gCharacterGridSelections[controllerIdx] == 5U) ||
|
||||||
|
(gCharacterGridSelections[controllerIdx] == 6U) ||
|
||||||
|
(gCharacterGridSelections[controllerIdx] == 7U)) {
|
||||||
j = gCharacterGridSelections[controllerIdx] - 3;
|
j = gCharacterGridSelections[controllerIdx] - 3;
|
||||||
if (is_character_spot_free(j)) {
|
if (is_character_spot_free(j)) {
|
||||||
gCharacterGridSelections[controllerIdx] = j;
|
gCharacterGridSelections[controllerIdx] = j;
|
||||||
|
@ -1589,7 +1599,9 @@ void player_select_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((btnAndStick & L_JPAD) && (btnAndStick & U_JPAD)) {
|
if ((btnAndStick & L_JPAD) && (btnAndStick & U_JPAD)) {
|
||||||
if ((gCharacterGridSelections[controllerIdx] == 6U) || (gCharacterGridSelections[controllerIdx] == 7U) || (gCharacterGridSelections[controllerIdx] == 8U)) {
|
if ((gCharacterGridSelections[controllerIdx] == 6U) ||
|
||||||
|
(gCharacterGridSelections[controllerIdx] == 7U) ||
|
||||||
|
(gCharacterGridSelections[controllerIdx] == 8U)) {
|
||||||
j = gCharacterGridSelections[controllerIdx] - 5;
|
j = gCharacterGridSelections[controllerIdx] - 5;
|
||||||
if (is_character_spot_free(j)) {
|
if (is_character_spot_free(j)) {
|
||||||
gCharacterGridSelections[controllerIdx] = j;
|
gCharacterGridSelections[controllerIdx] = j;
|
||||||
|
@ -1597,10 +1609,10 @@ void player_select_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (btnAndStick & R_JPAD) {
|
if (btnAndStick & R_JPAD) {
|
||||||
if ((gCharacterGridSelections[controllerIdx] != 4U) && (gCharacterGridSelections[controllerIdx] != 8U)) {
|
if ((gCharacterGridSelections[controllerIdx] != 4U) &&
|
||||||
|
(gCharacterGridSelections[controllerIdx] != 8U)) {
|
||||||
j = gCharacterGridSelections[controllerIdx] + 1;
|
j = gCharacterGridSelections[controllerIdx] + 1;
|
||||||
do {
|
do {
|
||||||
if (is_character_spot_free(j)) {
|
if (is_character_spot_free(j)) {
|
||||||
|
@ -1618,7 +1630,8 @@ void player_select_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (btnAndStick & L_JPAD) {
|
if (btnAndStick & L_JPAD) {
|
||||||
if ((gCharacterGridSelections[controllerIdx] != 1U) && (gCharacterGridSelections[controllerIdx] != 5U)) {
|
if ((gCharacterGridSelections[controllerIdx] != 1U) &&
|
||||||
|
(gCharacterGridSelections[controllerIdx] != 5U)) {
|
||||||
j = gCharacterGridSelections[controllerIdx] - 1;
|
j = gCharacterGridSelections[controllerIdx] - 1;
|
||||||
do {
|
do {
|
||||||
if (is_character_spot_free(j)) {
|
if (is_character_spot_free(j)) {
|
||||||
|
@ -1626,7 +1639,7 @@ void player_select_menu_act(struct Controller* controller, u16 controllerIdx) {
|
||||||
play_sound2(SOUND_MENU_CURSOR_MOVE);
|
play_sound2(SOUND_MENU_CURSOR_MOVE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
j--;
|
j--;
|
||||||
if (j == 0 || j == 4) {
|
if (j == 0 || j == 4) {
|
||||||
break;
|
break;
|
||||||
|
|
21
src/menus.h
21
src/menus.h
|
@ -47,12 +47,12 @@ enum SubMenuSelectionType {
|
||||||
SUB_MENU_ERASE_QUIT = SUB_MENU_ERASE_MIN,
|
SUB_MENU_ERASE_QUIT = SUB_MENU_ERASE_MIN,
|
||||||
SUB_MENU_ERASE_ERASE,
|
SUB_MENU_ERASE_ERASE,
|
||||||
SUB_MENU_ERASE_MAX = SUB_MENU_ERASE_ERASE, // 0x1F
|
SUB_MENU_ERASE_MAX = SUB_MENU_ERASE_ERASE, // 0x1F
|
||||||
SUB_MENU_SAVE_DATA_ERASED, // 0x20
|
SUB_MENU_SAVE_DATA_ERASED, // 0x20
|
||||||
SUB_MENU_COPY_PAK_FROM_GHOST_MIN = 0x28,
|
SUB_MENU_COPY_PAK_FROM_GHOST_MIN = 0x28,
|
||||||
SUB_MENU_COPY_PAK_FROM_GHOST1_1P = SUB_MENU_COPY_PAK_FROM_GHOST_MIN,
|
SUB_MENU_COPY_PAK_FROM_GHOST1_1P = SUB_MENU_COPY_PAK_FROM_GHOST_MIN,
|
||||||
SUB_MENU_COPY_PAK_FROM_GHOST2_1P,
|
SUB_MENU_COPY_PAK_FROM_GHOST2_1P,
|
||||||
SUB_MENU_COPY_PAK_FROM_GHOST_MAX = SUB_MENU_COPY_PAK_FROM_GHOST2_1P, // 0x29
|
SUB_MENU_COPY_PAK_FROM_GHOST_MAX = SUB_MENU_COPY_PAK_FROM_GHOST2_1P, // 0x29
|
||||||
SUB_MENU_COPY_PAK_ERROR_2P_MIN, // 0x2A
|
SUB_MENU_COPY_PAK_ERROR_2P_MIN, // 0x2A
|
||||||
SUB_MENU_COPY_PAK_ERROR_NO_GHOST_DATA = SUB_MENU_COPY_PAK_ERROR_2P_MIN,
|
SUB_MENU_COPY_PAK_ERROR_NO_GHOST_DATA = SUB_MENU_COPY_PAK_ERROR_2P_MIN,
|
||||||
SUB_MENU_COPY_PAK_ERROR_NO_GAME_DATA,
|
SUB_MENU_COPY_PAK_ERROR_NO_GAME_DATA,
|
||||||
SUB_MENU_COPY_PAK_ERROR_NO_PAK_2P,
|
SUB_MENU_COPY_PAK_ERROR_NO_PAK_2P,
|
||||||
|
@ -93,10 +93,10 @@ enum MainMenuSelectionType {
|
||||||
MAIN_MENU_OPTION,
|
MAIN_MENU_OPTION,
|
||||||
MAIN_MENU_DATA,
|
MAIN_MENU_DATA,
|
||||||
MAIN_MENU_PLAYER_SELECT,
|
MAIN_MENU_PLAYER_SELECT,
|
||||||
MAIN_MENU_MODE_SELECT, // Mario GP - T. Trials - VS - Battle
|
MAIN_MENU_MODE_SELECT, // Mario GP - T. Trials - VS - Battle
|
||||||
MAIN_MENU_MODE_SUB_SELECT, // CC Selection and T.Trials options (Begin, Data)
|
MAIN_MENU_MODE_SUB_SELECT, // CC Selection and T.Trials options (Begin, Data)
|
||||||
MAIN_MENU_OK_SELECT, // OK option after selecting a submode
|
MAIN_MENU_OK_SELECT, // OK option after selecting a submode
|
||||||
MAIN_MENU_OK_SELECT_GO_BACK, // OK option after going back from player select
|
MAIN_MENU_OK_SELECT_GO_BACK, // OK option after going back from player select
|
||||||
MAIN_MENU_MODE_SUB_SELECT_GO_BACK // Used in T.Trials after going back to Data option from course data
|
MAIN_MENU_MODE_SUB_SELECT_GO_BACK // Used in T.Trials after going back to Data option from course data
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ enum MainMenuSelectionType {
|
||||||
enum PlayerSelectMenuSelectionTypes {
|
enum PlayerSelectMenuSelectionTypes {
|
||||||
PLAYER_SELECT_MENU_NONE,
|
PLAYER_SELECT_MENU_NONE,
|
||||||
PLAYER_SELECT_MENU_MAIN,
|
PLAYER_SELECT_MENU_MAIN,
|
||||||
PLAYER_SELECT_MENU_OK, // OK option after selecting characters
|
PLAYER_SELECT_MENU_OK, // OK option after selecting characters
|
||||||
PLAYER_SELECT_MENU_OK_GO_BACK // OK option after going back from map select
|
PLAYER_SELECT_MENU_OK_GO_BACK // OK option after going back from map select
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -176,11 +176,7 @@ enum DebugGotoSceneTypes {
|
||||||
/**
|
/**
|
||||||
* @brief Options for gFadeModeSelection
|
* @brief Options for gFadeModeSelection
|
||||||
*/
|
*/
|
||||||
enum FadeModeSelectionTypes {
|
enum FadeModeSelectionTypes { FADE_MODE_NONE, FADE_MODE_MAIN, FADE_MODE_LOGO };
|
||||||
FADE_MODE_NONE,
|
|
||||||
FADE_MODE_MAIN,
|
|
||||||
FADE_MODE_LOGO
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Options for gControllerPakScrollDirection
|
* @brief Options for gControllerPakScrollDirection
|
||||||
|
@ -191,7 +187,6 @@ enum ControllerPakScrollDirectionTypes {
|
||||||
CONTROLLER_PAK_SCROLL_DIR_UP
|
CONTROLLER_PAK_SCROLL_DIR_UP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
void update_menus(void);
|
void update_menus(void);
|
||||||
void options_menu_act(struct Controller*, u16);
|
void options_menu_act(struct Controller*, u16);
|
||||||
|
|
|
@ -2117,10 +2117,10 @@ void func_8002D268(Player* player, UNUSED Camera* camera, s8 screenId, s8 player
|
||||||
}
|
}
|
||||||
if ((player->tyres[BACK_LEFT].surfaceType == ASPHALT) && (player->tyres[BACK_RIGHT].surfaceType == ASPHALT)) {
|
if ((player->tyres[BACK_LEFT].surfaceType == ASPHALT) && (player->tyres[BACK_RIGHT].surfaceType == ASPHALT)) {
|
||||||
gravityX = (-1 * (player->unk_064[0] + sp16C[0])) +
|
gravityX = (-1 * (player->unk_064[0] + sp16C[0])) +
|
||||||
((-player->collision.orientationVector[0] * player->kartGravity) * 0.925);
|
((-player->collision.orientationVector[0] * player->kartGravity) * 0.925);
|
||||||
gravityY = (-player->collision.orientationVector[1] * player->kartGravity);
|
gravityY = (-player->collision.orientationVector[1] * player->kartGravity);
|
||||||
gravityZ = (-1 * (player->unk_064[2] + sp16C[2])) +
|
gravityZ = (-1 * (player->unk_064[2] + sp16C[2])) +
|
||||||
((-player->collision.orientationVector[2] * player->kartGravity) * 0.925);
|
((-player->collision.orientationVector[2] * player->kartGravity) * 0.925);
|
||||||
} else {
|
} else {
|
||||||
temp3 = (((player->speed / 18.0f) * 216.0f) / 10.0f);
|
temp3 = (((player->speed / 18.0f) * 216.0f) / 10.0f);
|
||||||
if (temp3 >= 10) {
|
if (temp3 >= 10) {
|
||||||
|
@ -2450,7 +2450,8 @@ void func_8002E594(Player* player, UNUSED Camera* camera, s8 screenId, s8 player
|
||||||
gravityX =
|
gravityX =
|
||||||
-1 * (player->unk_064[0]) + (((-player->collision.orientationVector[0]) * player->kartGravity) * 0.1);
|
-1 * (player->unk_064[0]) + (((-player->collision.orientationVector[0]) * player->kartGravity) * 0.1);
|
||||||
gravityY = (-player->collision.orientationVector[1]) * player->kartGravity;
|
gravityY = (-player->collision.orientationVector[1]) * player->kartGravity;
|
||||||
gravityZ = -1 * (player->unk_064[2]) + (((-player->collision.orientationVector[2]) * player->kartGravity) * 0.1);
|
gravityZ =
|
||||||
|
-1 * (player->unk_064[2]) + (((-player->collision.orientationVector[2]) * player->kartGravity) * 0.1);
|
||||||
} else {
|
} else {
|
||||||
gravityX = -1 * player->unk_064[0];
|
gravityX = -1 * player->unk_064[0];
|
||||||
gravityY = -1 * player->kartGravity;
|
gravityY = -1 * player->kartGravity;
|
||||||
|
@ -2479,17 +2480,22 @@ void func_8002E594(Player* player, UNUSED Camera* camera, s8 screenId, s8 player
|
||||||
((player->effects & HIT_BY_GREEN_SHELL_EFFECT) != HIT_BY_GREEN_SHELL_EFFECT) &&
|
((player->effects & HIT_BY_GREEN_SHELL_EFFECT) != HIT_BY_GREEN_SHELL_EFFECT) &&
|
||||||
((player->effects & EXPLOSION_CRASH_EFFECT) != EXPLOSION_CRASH_EFFECT) &&
|
((player->effects & EXPLOSION_CRASH_EFFECT) != EXPLOSION_CRASH_EFFECT) &&
|
||||||
((player->effects & HIT_BY_STAR_EFFECT) != HIT_BY_STAR_EFFECT)) {
|
((player->effects & HIT_BY_STAR_EFFECT) != HIT_BY_STAR_EFFECT)) {
|
||||||
newVelocity[0] += (((((spEC[0] + gravityX) + spD4[0])) - (newVelocity[0] * (0.12 * player->kartFriction))) / 6000) /
|
newVelocity[0] +=
|
||||||
((player->unk_20C * 5.0f) + 1.0f);
|
(((((spEC[0] + gravityX) + spD4[0])) - (newVelocity[0] * (0.12 * player->kartFriction))) / 6000) /
|
||||||
newVelocity[2] += (((((spEC[2] + gravityZ) + spD4[2])) - (newVelocity[2] * (0.12 * player->kartFriction))) / 6000) /
|
((player->unk_20C * 5.0f) + 1.0f);
|
||||||
((player->unk_20C * 5.0f) + 1.0f);
|
newVelocity[2] +=
|
||||||
|
(((((spEC[2] + gravityZ) + spD4[2])) - (newVelocity[2] * (0.12 * player->kartFriction))) / 6000) /
|
||||||
|
((player->unk_20C * 5.0f) + 1.0f);
|
||||||
} else {
|
} else {
|
||||||
newVelocity[0] +=
|
newVelocity[0] +=
|
||||||
((((f64) (spEC[0] + gravityX + spD4[0]) - (newVelocity[0] * (0.2 * (f64) player->kartFriction))) / 6000) * 0.08);
|
((((f64) (spEC[0] + gravityX + spD4[0]) - (newVelocity[0] * (0.2 * (f64) player->kartFriction))) / 6000) *
|
||||||
|
0.08);
|
||||||
newVelocity[2] +=
|
newVelocity[2] +=
|
||||||
((((f64) (spEC[2] + gravityZ + spD4[2]) - (newVelocity[2] * (0.2 * (f64) player->kartFriction))) / 6000) * 0.08);
|
((((f64) (spEC[2] + gravityZ + spD4[2]) - (newVelocity[2] * (0.2 * (f64) player->kartFriction))) / 6000) *
|
||||||
|
0.08);
|
||||||
}
|
}
|
||||||
newVelocity[1] += (((((spEC[1] + gravityY) + spD4[1])) - (newVelocity[1] * (0.12 * player->kartFriction))) / 6000) / player->unk_DAC;
|
newVelocity[1] += (((((spEC[1] + gravityY) + spD4[1])) - (newVelocity[1] * (0.12 * player->kartFriction))) / 6000) /
|
||||||
|
player->unk_DAC;
|
||||||
|
|
||||||
if (((player->unk_0CA & 2) == 2) || ((player->unk_0CA & 8) == 8)) {
|
if (((player->unk_0CA & 2) == 2) || ((player->unk_0CA & 8) == 8)) {
|
||||||
newVelocity[0] = 0.0f;
|
newVelocity[0] = 0.0f;
|
||||||
|
@ -3703,10 +3709,12 @@ void player_decelerate(Player* player, f32 speedReduction) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void player_accelerate_global(Player* player, s32 playerIndex) {
|
void player_accelerate_global(Player* player, s32 playerIndex) {
|
||||||
if ((gPlayerCurrentSpeed[playerIndex] >= 0.0) && (gPlayerCurrentSpeed[playerIndex] < ((f64) player->topSpeed * 0.1))) {
|
if ((gPlayerCurrentSpeed[playerIndex] >= 0.0) &&
|
||||||
|
(gPlayerCurrentSpeed[playerIndex] < ((f64) player->topSpeed * 0.1))) {
|
||||||
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][0] * 3.2;
|
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][0] * 3.2;
|
||||||
}
|
}
|
||||||
if (((player->topSpeed * 0.1) <= gPlayerCurrentSpeed[playerIndex]) && (gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.2))) {
|
if (((player->topSpeed * 0.1) <= gPlayerCurrentSpeed[playerIndex]) &&
|
||||||
|
(gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.2))) {
|
||||||
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][1] * 3.2;
|
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][1] * 3.2;
|
||||||
}
|
}
|
||||||
if (((player->topSpeed * 0.2) <= gPlayerCurrentSpeed[playerIndex]) &&
|
if (((player->topSpeed * 0.2) <= gPlayerCurrentSpeed[playerIndex]) &&
|
||||||
|
@ -3721,19 +3729,24 @@ void player_accelerate_global(Player* player, s32 playerIndex) {
|
||||||
(gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.5))) {
|
(gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.5))) {
|
||||||
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][4] * 3.2;
|
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][4] * 3.2;
|
||||||
}
|
}
|
||||||
if (((player->topSpeed * 0.5) <= gPlayerCurrentSpeed[playerIndex]) && (gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.6))) {
|
if (((player->topSpeed * 0.5) <= gPlayerCurrentSpeed[playerIndex]) &&
|
||||||
|
(gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.6))) {
|
||||||
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][5] * 3.2;
|
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][5] * 3.2;
|
||||||
}
|
}
|
||||||
if (((player->topSpeed * 0.6) <= gPlayerCurrentSpeed[playerIndex]) && (gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.7))) {
|
if (((player->topSpeed * 0.6) <= gPlayerCurrentSpeed[playerIndex]) &&
|
||||||
|
(gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.7))) {
|
||||||
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][6] * 3.2;
|
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][6] * 3.2;
|
||||||
}
|
}
|
||||||
if (((player->topSpeed * 0.7) <= gPlayerCurrentSpeed[playerIndex]) && (gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.8))) {
|
if (((player->topSpeed * 0.7) <= gPlayerCurrentSpeed[playerIndex]) &&
|
||||||
|
(gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.8))) {
|
||||||
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][7] * 2.8;
|
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][7] * 2.8;
|
||||||
}
|
}
|
||||||
if (((player->topSpeed * 0.8) <= gPlayerCurrentSpeed[playerIndex]) && (gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.9))) {
|
if (((player->topSpeed * 0.8) <= gPlayerCurrentSpeed[playerIndex]) &&
|
||||||
|
(gPlayerCurrentSpeed[playerIndex] < (player->topSpeed * 0.9))) {
|
||||||
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][8] * 2.8;
|
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][8] * 2.8;
|
||||||
}
|
}
|
||||||
if (((player->topSpeed * 0.9) <= gPlayerCurrentSpeed[playerIndex]) && (gPlayerCurrentSpeed[playerIndex] <= (player->topSpeed * 1.0))) {
|
if (((player->topSpeed * 0.9) <= gPlayerCurrentSpeed[playerIndex]) &&
|
||||||
|
(gPlayerCurrentSpeed[playerIndex] <= (player->topSpeed * 1.0))) {
|
||||||
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][9] * 2.8;
|
gPlayerCurrentSpeed[playerIndex] += gKartAccelerationTables[player->characterId][9] * 2.8;
|
||||||
}
|
}
|
||||||
player->unk_044 |= 0x20;
|
player->unk_044 |= 0x20;
|
||||||
|
@ -4230,8 +4243,10 @@ void apply_cpu_turn(Player* player, s16 targetAngle) {
|
||||||
}
|
}
|
||||||
player->unk_078 = var_v0 * var_f0;
|
player->unk_078 = var_v0 * var_f0;
|
||||||
}
|
}
|
||||||
if ((((player->effects & HOP_EFFECT) != HOP_EFFECT) && (player->unk_0C0 < 0x3D) && (player->unk_0C0 > -0x3D)) ||
|
if ((((player->effects & HOP_EFFECT) != HOP_EFFECT) && (player->unk_0C0 < 0x3D) &&
|
||||||
(((player->speed / 18.0f) * 216.0f) <= 20.0f) || ((player->effects & ENEMY_BONK_EFFECT) == ENEMY_BONK_EFFECT)) {
|
(player->unk_0C0 > -0x3D)) ||
|
||||||
|
(((player->speed / 18.0f) * 216.0f) <= 20.0f) ||
|
||||||
|
((player->effects & ENEMY_BONK_EFFECT) == ENEMY_BONK_EFFECT)) {
|
||||||
func_80036CB4(player);
|
func_80036CB4(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4421,7 +4436,6 @@ void func_80037614(Player* player, Vec3f arg1, Vec3f arg2) {
|
||||||
arg2[2] = arg1[2];
|
arg2[2] = arg1[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void func_8003777C(Player* player, Vec3f arg1, Vec3f arg2) {
|
void func_8003777C(Player* player, Vec3f arg1, Vec3f arg2) {
|
||||||
f32 var_f12;
|
f32 var_f12;
|
||||||
f32 var_f2;
|
f32 var_f2;
|
||||||
|
@ -4605,7 +4619,8 @@ void func_80037CFC(Player* player, struct Controller* controller, s8 playerIndex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((!(player->effects & BOOST_RAMP_ASPHALT_EFFECT)) && (!(player->effects & BOOST_RAMP_WOOD_EFFECT))) {
|
if ((!(player->effects & BOOST_RAMP_ASPHALT_EFFECT)) && (!(player->effects & BOOST_RAMP_WOOD_EFFECT))) {
|
||||||
if (((get_clamped_stickY_with_deadzone(controller) < (-0x31)) && (((player->speed / 18.0f) * 216.0f) <= 5.0f)) &&
|
if (((get_clamped_stickY_with_deadzone(controller) < (-0x31)) &&
|
||||||
|
(((player->speed / 18.0f) * 216.0f) <= 5.0f)) &&
|
||||||
(controller->button & B_BUTTON)) {
|
(controller->button & B_BUTTON)) {
|
||||||
player->currentSpeed = 140.0f;
|
player->currentSpeed = 140.0f;
|
||||||
player->unk_044 |= 1;
|
player->unk_044 |= 1;
|
||||||
|
@ -4901,9 +4916,12 @@ void func_80038C6C(Player* player, UNUSED Camera* camera, s8 screenId, s8 player
|
||||||
newVelocity[1] = player->velocity[1];
|
newVelocity[1] = player->velocity[1];
|
||||||
newVelocity[2] = player->velocity[2];
|
newVelocity[2] = player->velocity[2];
|
||||||
|
|
||||||
newVelocity[0] += ((((((sp114[0] + spA4) + spF0[0])) - (newVelocity[0] * (0.12 * (player->kartFriction)))) / 6000.0) / 1);
|
newVelocity[0] +=
|
||||||
newVelocity[2] += ((((((sp114[2] + sp9C) + spF0[2])) - (newVelocity[2] * (0.12 * (player->kartFriction)))) / 6000.0) / 1);
|
((((((sp114[0] + spA4) + spF0[0])) - (newVelocity[0] * (0.12 * (player->kartFriction)))) / 6000.0) / 1);
|
||||||
newVelocity[1] += ((((((sp114[1] + spA0) + spF0[1])) - (newVelocity[1] * (0.12 * (player->kartFriction)))) / 6000.0) / 1);
|
newVelocity[2] +=
|
||||||
|
((((((sp114[2] + sp9C) + spF0[2])) - (newVelocity[2] * (0.12 * (player->kartFriction)))) / 6000.0) / 1);
|
||||||
|
newVelocity[1] +=
|
||||||
|
((((((sp114[1] + spA0) + spF0[1])) - (newVelocity[1] * (0.12 * (player->kartFriction)))) / 6000.0) / 1);
|
||||||
if ((player->unk_044 & 0x10) == 0x10) {
|
if ((player->unk_044 & 0x10) == 0x10) {
|
||||||
player->unk_044 &= 0xFFEF;
|
player->unk_044 &= 0xFFEF;
|
||||||
}
|
}
|
||||||
|
|
|
@ -755,8 +755,7 @@ UNUSED void func_8029ABD4(f32* pos, s16 state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8029AC18(Camera* camera, Mat4 arg1, struct Actor* arg2) {
|
void func_8029AC18(Camera* camera, Mat4 arg1, struct Actor* arg2) {
|
||||||
if (distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f) <
|
if (distance_if_visible(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f) < 0) {
|
||||||
0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1354,12 +1354,12 @@ s32 is_between_angle(u16 angleCCW, u16 angleCW, u16 angleToCheck) {
|
||||||
* @param preloadDistanceSquared Consider an object within this distance of viweable area as renderable
|
* @param preloadDistanceSquared Consider an object within this distance of viweable area as renderable
|
||||||
* @param fovDegrees The field of view (FOV) of the camera (degrees).
|
* @param fovDegrees The field of view (FOV) of the camera (degrees).
|
||||||
* @param maxDistanceSquared The maximum render distance.
|
* @param maxDistanceSquared The maximum render distance.
|
||||||
* @return The xz-distance squared between the camera and the object if it's within render distance
|
* @return The xz-distance squared between the camera and the object if it's within render
|
||||||
of the camera's vision, or -1.0f if it exceeds the render distance.
|
distance of the camera's vision, or -1.0f if it exceeds the render distance.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
f32 distance_if_visible(Vec3f cameraPos, Vec3f objectPos, u16 orientationY, f32 preloadDistanceSquared,
|
f32 distance_if_visible(Vec3f cameraPos, Vec3f objectPos, u16 orientationY, f32 preloadDistanceSquared, f32 fovDegrees,
|
||||||
f32 fovDegrees, f32 maxDistanceSquared) {
|
f32 maxDistanceSquared) {
|
||||||
u16 angleObject;
|
u16 angleObject;
|
||||||
UNUSED u16 pad;
|
UNUSED u16 pad;
|
||||||
u16 preloadAngle;
|
u16 preloadAngle;
|
||||||
|
|
|
@ -480,11 +480,11 @@ void play_music_for_current_track(s32 track) {
|
||||||
case COURSE_BIG_DONUT:
|
case COURSE_BIG_DONUT:
|
||||||
play_sequence(SEQ_TRACK_BATTLE);
|
play_sequence(SEQ_TRACK_BATTLE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef AVOID_UB
|
#ifdef AVOID_UB
|
||||||
default: //! @BUG: No default case. Enable AVOID_UB for custom tracks.
|
default: //! @BUG: No default case. Enable AVOID_UB for custom tracks.
|
||||||
play_sequence(SEQ_TRACK_RACEWAY);
|
play_sequence(SEQ_TRACK_RACEWAY);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -916,7 +916,8 @@ void func_8028FCBC(void) {
|
||||||
}
|
}
|
||||||
switch (D_800DC510) {
|
switch (D_800DC510) {
|
||||||
case 0:
|
case 0:
|
||||||
if (!gDemoMode) { // If we're not in the demo mode, play the starting fanfare for the current mode (Grand Prix / Time Trials / VS / Battle)
|
if (!gDemoMode) { // If we're not in the demo mode, play the starting fanfare for the current mode (Grand
|
||||||
|
// Prix / Time Trials / VS / Battle)
|
||||||
if (gModeSelection == GRAND_PRIX) {
|
if (gModeSelection == GRAND_PRIX) {
|
||||||
play_sequence2(SEQ_EVENT_RACE_STARTING);
|
play_sequence2(SEQ_EVENT_RACE_STARTING);
|
||||||
play_sound2(SOUND_ACTION_REV_ENGINE);
|
play_sound2(SOUND_ACTION_REV_ENGINE);
|
||||||
|
|
|
@ -1798,7 +1798,6 @@ void render_texture_tile_rgba32_block(s16 x, s16 y, u8* texture, u32 width, u32
|
||||||
texSize -= (width * heightDiv * 4);
|
texSize -= (width * heightDiv * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
centerY += heightDiv;
|
centerY += heightDiv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2470,25 +2469,29 @@ void draw_minimap_character(s32 arg0, s32 playerId, s32 characterId) {
|
||||||
f32 thing1;
|
f32 thing1;
|
||||||
s16 x;
|
s16 x;
|
||||||
s16 y;
|
s16 y;
|
||||||
Player *player = &gPlayerOne[playerId];
|
Player* player = &gPlayerOne[playerId];
|
||||||
|
|
||||||
if (player->type & (1 << 15)) {
|
if (player->type & (1 << 15)) {
|
||||||
thing0 = player->pos[0] * gMiniMapMarkerScale;
|
thing0 = player->pos[0] * gMiniMapMarkerScale;
|
||||||
thing1 = player->pos[2] * gMiniMapMarkerScale;
|
thing1 = player->pos[2] * gMiniMapMarkerScale;
|
||||||
x = ((gMiniMapFinishLineX[arg0] + D_8018D2F0) - (D_8018D2B0 / 2)) + gMiniMapX + (s16)(thing0);
|
x = ((gMiniMapFinishLineX[arg0] + D_8018D2F0) - (D_8018D2B0 / 2)) + gMiniMapX + (s16) (thing0);
|
||||||
y = ((gMiniMapFinishLineY[arg0] + D_8018D2F8) - (D_8018D2B8 / 2)) + gMiniMapY + (s16)(thing1);
|
y = ((gMiniMapFinishLineY[arg0] + D_8018D2F8) - (D_8018D2B8 / 2)) + gMiniMapY + (s16) (thing1);
|
||||||
// huh?
|
// huh?
|
||||||
if (characterId != 8) {
|
if (characterId != 8) {
|
||||||
if ((gGPCurrentRaceRankByPlayerId[playerId] == 0) && (gModeSelection != 3) && (gModeSelection != 1)) {
|
if ((gGPCurrentRaceRankByPlayerId[playerId] == 0) && (gModeSelection != 3) && (gModeSelection != 1)) {
|
||||||
func_80046424(x, y, player->rotation[1] + 0x8000, 1.0f, (u8*)&common_texture_minimap_kart_mario[characterId * 64], common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
func_80046424(x, y, player->rotation[1] + 0x8000, 1.0f,
|
||||||
|
(u8*) &common_texture_minimap_kart_mario[characterId * 64],
|
||||||
|
common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
||||||
} else {
|
} else {
|
||||||
func_800463B0(x, y, player->rotation[1] + 0x8000, 1.0f, (u8*)&common_texture_minimap_kart_mario[characterId * 64], common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
func_800463B0(x, y, player->rotation[1] + 0x8000, 1.0f,
|
||||||
|
(u8*) &common_texture_minimap_kart_mario[characterId * 64],
|
||||||
|
common_vtx_player_minimap_icon, 8, 8, 8, 8);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (gGPCurrentRaceRankByPlayerId[playerId] == 0) {
|
if (gGPCurrentRaceRankByPlayerId[playerId] == 0) {
|
||||||
func_8004C450(x, y, 8, 8, (u8 *) common_texture_minimap_progress_dot);
|
func_8004C450(x, y, 8, 8, (u8*) common_texture_minimap_progress_dot);
|
||||||
} else {
|
} else {
|
||||||
draw_hud_2d_texture(x, y, 8, 8, (u8 *) common_texture_minimap_progress_dot);
|
draw_hud_2d_texture(x, y, 8, 8, (u8*) common_texture_minimap_progress_dot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2944,14 +2947,14 @@ void func_80050E34(s32 playerId, s32 arg1) {
|
||||||
s32 objectIndex;
|
s32 objectIndex;
|
||||||
s32 spD0;
|
s32 spD0;
|
||||||
s32 spCC;
|
s32 spCC;
|
||||||
Player *dummy = &gPlayerOne[playerId];
|
Player* dummy = &gPlayerOne[playerId];
|
||||||
s32 spC4;
|
s32 spC4;
|
||||||
s32 lapCount;
|
s32 lapCount;
|
||||||
s32 characterId;
|
s32 characterId;
|
||||||
s32 spB8;
|
s32 spB8;
|
||||||
s32 temp_v0_2;
|
s32 temp_v0_2;
|
||||||
Object* object;
|
Object* object;
|
||||||
Player *player = &gPlayerOne[playerId];
|
Player* player = &gPlayerOne[playerId];
|
||||||
|
|
||||||
lapCount = gLapCountByPlayerId[playerId];
|
lapCount = gLapCountByPlayerId[playerId];
|
||||||
characterId = player->characterId;
|
characterId = player->characterId;
|
||||||
|
|
|
@ -483,7 +483,8 @@ void render_players_on_screen_one(void) {
|
||||||
|
|
||||||
s32 junk[] = { 0, 0, 0 };
|
s32 junk[] = { 0, 0, 0 };
|
||||||
|
|
||||||
Vtx* gPlayerVtx[] = { gPlayerOneVtx, gPlayerTwoVtx, gPlayerThreeVtx, gPlayerFourVtx, gPlayerFiveVtx, gPlayerSixVtx, gPlayerSevenVtx, gPlayerEightVtx };
|
Vtx* gPlayerVtx[] = { gPlayerOneVtx, gPlayerTwoVtx, gPlayerThreeVtx, gPlayerFourVtx,
|
||||||
|
gPlayerFiveVtx, gPlayerSixVtx, gPlayerSevenVtx, gPlayerEightVtx };
|
||||||
|
|
||||||
f32 gCharacterSize[] = { MARIO_SIZE, LUIGI_SIZE, YOSHI_SIZE, TOAD_SIZE, DK_SIZE, WARIO_SIZE, PEACH_SIZE, BOWSER_SIZE };
|
f32 gCharacterSize[] = { MARIO_SIZE, LUIGI_SIZE, YOSHI_SIZE, TOAD_SIZE, DK_SIZE, WARIO_SIZE, PEACH_SIZE, BOWSER_SIZE };
|
||||||
|
|
||||||
|
@ -956,7 +957,8 @@ void func_80022A98(Player* player, s8 playerIndex) {
|
||||||
if ((player->type & PLAYER_EXISTS) == PLAYER_EXISTS) {
|
if ((player->type & PLAYER_EXISTS) == PLAYER_EXISTS) {
|
||||||
func_80026A48(player, playerIndex);
|
func_80026A48(player, playerIndex);
|
||||||
func_800235AC(player, playerIndex);
|
func_800235AC(player, playerIndex);
|
||||||
if (((player->effects & SQUISH_EFFECT) == SQUISH_EFFECT) || ((player->effects & POST_SQUISH_EFFECT) == POST_SQUISH_EFFECT)) {
|
if (((player->effects & SQUISH_EFFECT) == SQUISH_EFFECT) ||
|
||||||
|
((player->effects & POST_SQUISH_EFFECT) == POST_SQUISH_EFFECT)) {
|
||||||
if ((player->effects & SQUISH_EFFECT) == SQUISH_EFFECT) {
|
if ((player->effects & SQUISH_EFFECT) == SQUISH_EFFECT) {
|
||||||
func_80022B50(player, playerIndex);
|
func_80022B50(player, playerIndex);
|
||||||
}
|
}
|
||||||
|
@ -1073,8 +1075,8 @@ void change_player_color_effect_rgb(UNUSED Player* player, s8 playerIndex, s32 a
|
||||||
gPlayerRedEffect[playerIndex] =
|
gPlayerRedEffect[playerIndex] =
|
||||||
(s16) ((f32) gPlayerRedEffect[playerIndex] - ((gPlayerRedEffect[playerIndex] - ((arg2 >> 16) & 0xFF)) * alpha));
|
(s16) ((f32) gPlayerRedEffect[playerIndex] - ((gPlayerRedEffect[playerIndex] - ((arg2 >> 16) & 0xFF)) * alpha));
|
||||||
|
|
||||||
gPlayerGreenEffect[playerIndex] =
|
gPlayerGreenEffect[playerIndex] = (s16) ((f32) gPlayerGreenEffect[playerIndex] -
|
||||||
(s16) ((f32) gPlayerGreenEffect[playerIndex] - ((gPlayerGreenEffect[playerIndex] - ((arg2 >> 8) & 0xFF)) * alpha));
|
((gPlayerGreenEffect[playerIndex] - ((arg2 >> 8) & 0xFF)) * alpha));
|
||||||
|
|
||||||
gPlayerBlueEffect[playerIndex] =
|
gPlayerBlueEffect[playerIndex] =
|
||||||
(s16) ((f32) gPlayerBlueEffect[playerIndex] - ((gPlayerBlueEffect[playerIndex] - (arg2 & 0xFF)) * alpha));
|
(s16) ((f32) gPlayerBlueEffect[playerIndex] - ((gPlayerBlueEffect[playerIndex] - (arg2 & 0xFF)) * alpha));
|
||||||
|
@ -1093,10 +1095,14 @@ void change_player_color_effect_cmy(UNUSED Player* player, s8 playerIndex, s32 a
|
||||||
bool is_player_under_light_luigi_raceway(Player* player, s8 playerIndex) {
|
bool is_player_under_light_luigi_raceway(Player* player, s8 playerIndex) {
|
||||||
switch (gCurrentCourseId) {
|
switch (gCurrentCourseId) {
|
||||||
case COURSE_LUIGI_RACEWAY:
|
case COURSE_LUIGI_RACEWAY:
|
||||||
if (((gNearestPathPointByPlayerId[playerIndex] >= 0x14F) && (gNearestPathPointByPlayerId[playerIndex] < 0x158)) ||
|
if (((gNearestPathPointByPlayerId[playerIndex] >= 0x14F) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x15E) && (gNearestPathPointByPlayerId[playerIndex] < 0x164)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x158)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x169) && (gNearestPathPointByPlayerId[playerIndex] < 0x170)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x15E) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x174) && (gNearestPathPointByPlayerId[playerIndex] < 0x17A)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x164)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x169) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x170)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x174) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x17A)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x17E) &&
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x17E) &&
|
||||||
(gNearestPathPointByPlayerId[playerIndex] < 0x184))) { // under a light in the tunnel
|
(gNearestPathPointByPlayerId[playerIndex] < 0x184))) { // under a light in the tunnel
|
||||||
change_player_color_effect_rgb(player, playerIndex, COLOR_LIGHT, 0.3f);
|
change_player_color_effect_rgb(player, playerIndex, COLOR_LIGHT, 0.3f);
|
||||||
|
@ -1114,18 +1120,26 @@ bool is_player_under_light_luigi_raceway(Player* player, s8 playerIndex) {
|
||||||
void render_light_environment_on_player(Player* player, s8 playerIndex) {
|
void render_light_environment_on_player(Player* player, s8 playerIndex) {
|
||||||
switch (gCurrentCourseId) {
|
switch (gCurrentCourseId) {
|
||||||
case COURSE_BOWSER_CASTLE:
|
case COURSE_BOWSER_CASTLE:
|
||||||
if (((gNearestPathPointByPlayerId[playerIndex] >= 0x15) && (gNearestPathPointByPlayerId[playerIndex] < 0x2A)) ||
|
if (((gNearestPathPointByPlayerId[playerIndex] >= 0x15) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x14D) && (gNearestPathPointByPlayerId[playerIndex] < 0x15C)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x2A)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x1D1) && (gNearestPathPointByPlayerId[playerIndex] < 0x1E4)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x14D) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x15C)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x1D1) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x1E4)) ||
|
||||||
(player->collision.surfaceDistance[2] >= 500.0f)) { // over lava
|
(player->collision.surfaceDistance[2] >= 500.0f)) { // over lava
|
||||||
change_player_color_effect_rgb(player, playerIndex, COLOR_LAVA, 0.3f);
|
change_player_color_effect_rgb(player, playerIndex, COLOR_LAVA, 0.3f);
|
||||||
change_player_color_effect_cmy(player, playerIndex, 0x004040, 0.3f);
|
change_player_color_effect_cmy(player, playerIndex, 0x004040, 0.3f);
|
||||||
D_80164B80[playerIndex] = 0;
|
D_80164B80[playerIndex] = 0;
|
||||||
} else if (((gNearestPathPointByPlayerId[playerIndex] >= 0xF1) && (gNearestPathPointByPlayerId[playerIndex] < 0xF5)) ||
|
} else if (((gNearestPathPointByPlayerId[playerIndex] >= 0xF1) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0xFB) && (gNearestPathPointByPlayerId[playerIndex] < 0xFF)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0xF5)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x105) && (gNearestPathPointByPlayerId[playerIndex] < 0x109)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0xFB) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x10F) && (gNearestPathPointByPlayerId[playerIndex] < 0x113)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0xFF)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x145) && (gNearestPathPointByPlayerId[playerIndex] < 0x14A)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x105) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x109)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x10F) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x113)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x145) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x14A)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x15E) &&
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x15E) &&
|
||||||
(gNearestPathPointByPlayerId[playerIndex] < 0x163))) { // under a lamp
|
(gNearestPathPointByPlayerId[playerIndex] < 0x163))) { // under a lamp
|
||||||
change_player_color_effect_rgb(player, playerIndex, COLOR_LIGHT, 0.3f);
|
change_player_color_effect_rgb(player, playerIndex, COLOR_LIGHT, 0.3f);
|
||||||
|
@ -1138,23 +1152,40 @@ void render_light_environment_on_player(Player* player, s8 playerIndex) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COURSE_BANSHEE_BOARDWALK:
|
case COURSE_BANSHEE_BOARDWALK:
|
||||||
if (((gNearestPathPointByPlayerId[playerIndex] >= 0xD) && (gNearestPathPointByPlayerId[playerIndex] < 0x15)) ||
|
if (((gNearestPathPointByPlayerId[playerIndex] >= 0xD) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x29) && (gNearestPathPointByPlayerId[playerIndex] < 0x39)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x15)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x46) && (gNearestPathPointByPlayerId[playerIndex] < 0x4E)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x29) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x5F) && (gNearestPathPointByPlayerId[playerIndex] < 0x67)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x39)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x7B) && (gNearestPathPointByPlayerId[playerIndex] < 0x86)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x46) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x9D) && (gNearestPathPointByPlayerId[playerIndex] < 0xA6)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x4E)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0xB9) && (gNearestPathPointByPlayerId[playerIndex] < 0xC3)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x5F) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0xB9) && (gNearestPathPointByPlayerId[playerIndex] < 0xC3)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x67)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0xD7) && (gNearestPathPointByPlayerId[playerIndex] < 0xE1)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x7B) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x10E) && (gNearestPathPointByPlayerId[playerIndex] < 0x119)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x86)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x154) && (gNearestPathPointByPlayerId[playerIndex] < 0x15F)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x9D) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x1EF) && (gNearestPathPointByPlayerId[playerIndex] < 0x1F7)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0xA6)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x202) && (gNearestPathPointByPlayerId[playerIndex] < 0x209)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0xB9) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x216) && (gNearestPathPointByPlayerId[playerIndex] < 0x21D)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0xC3)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x230) && (gNearestPathPointByPlayerId[playerIndex] < 0x23A)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0xB9) &&
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x24C) && (gNearestPathPointByPlayerId[playerIndex] < 0x256)) ||
|
(gNearestPathPointByPlayerId[playerIndex] < 0xC3)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x288) && (gNearestPathPointByPlayerId[playerIndex] < 0x269)) ||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0xD7) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0xE1)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x10E) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x119)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x154) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x15F)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x1EF) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x1F7)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x202) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x209)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x216) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x21D)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x230) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x23A)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x24C) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x256)) ||
|
||||||
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x288) &&
|
||||||
|
(gNearestPathPointByPlayerId[playerIndex] < 0x269)) ||
|
||||||
((gNearestPathPointByPlayerId[playerIndex] >= 0x274) &&
|
((gNearestPathPointByPlayerId[playerIndex] >= 0x274) &&
|
||||||
(gNearestPathPointByPlayerId[playerIndex] < 0x27E))) { // under a lamp
|
(gNearestPathPointByPlayerId[playerIndex] < 0x27E))) { // under a lamp
|
||||||
change_player_color_effect_rgb(player, playerIndex, COLOR_LIGHT, 0.3f);
|
change_player_color_effect_rgb(player, playerIndex, COLOR_LIGHT, 0.3f);
|
||||||
|
@ -1271,7 +1302,8 @@ void func_800235AC(Player* player, s8 playerIndex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80023BF0(Player* player, s8 playerId, s8 screenId, s8 arg3) {
|
void func_80023BF0(Player* player, s8 playerId, s8 screenId, s8 arg3) {
|
||||||
if (((player->effects & SQUISH_EFFECT) == SQUISH_EFFECT) || ((player->effects & POST_SQUISH_EFFECT) == POST_SQUISH_EFFECT)) {
|
if (((player->effects & SQUISH_EFFECT) == SQUISH_EFFECT) ||
|
||||||
|
((player->effects & POST_SQUISH_EFFECT) == POST_SQUISH_EFFECT)) {
|
||||||
func_80022CA8(player, playerId, screenId, arg3);
|
func_80022CA8(player, playerId, screenId, arg3);
|
||||||
} else {
|
} else {
|
||||||
func_80022E84(player, playerId, screenId, arg3);
|
func_80022E84(player, playerId, screenId, arg3);
|
||||||
|
@ -1301,10 +1333,13 @@ void render_player_shadow(Player* player, s8 playerId, s8 screenId) {
|
||||||
spAC = -sins(temp_t9 << 7) * 2;
|
spAC = -sins(temp_t9 << 7) * 2;
|
||||||
|
|
||||||
if (((player->effects & EXPLOSION_CRASH_EFFECT) == EXPLOSION_CRASH_EFFECT) ||
|
if (((player->effects & EXPLOSION_CRASH_EFFECT) == EXPLOSION_CRASH_EFFECT) ||
|
||||||
((player->effects & HIT_BY_GREEN_SHELL_EFFECT) == HIT_BY_GREEN_SHELL_EFFECT) || ((player->effects & UNKNOWN_EFFECT_0x80000) == UNKNOWN_EFFECT_0x80000) ||
|
((player->effects & HIT_BY_GREEN_SHELL_EFFECT) == HIT_BY_GREEN_SHELL_EFFECT) ||
|
||||||
((player->effects & UNKNOWN_EFFECT_0x800000) == UNKNOWN_EFFECT_0x800000) || ((player->effects & HIT_BY_GREEN_SHELL_EFFECT) == HIT_BY_GREEN_SHELL_EFFECT) ||
|
((player->effects & UNKNOWN_EFFECT_0x80000) == UNKNOWN_EFFECT_0x80000) ||
|
||||||
((player->unk_0CA & 2) == 2) || ((player->effects & HIT_BY_STAR_EFFECT) == HIT_BY_STAR_EFFECT) ||
|
((player->effects & UNKNOWN_EFFECT_0x800000) == UNKNOWN_EFFECT_0x800000) ||
|
||||||
((player->effects & TERRAIN_TUMBLE_EFFECT) == TERRAIN_TUMBLE_EFFECT) || ((player->effects & MIDAIR_EFFECT) == MIDAIR_EFFECT)) {
|
((player->effects & HIT_BY_GREEN_SHELL_EFFECT) == HIT_BY_GREEN_SHELL_EFFECT) || ((player->unk_0CA & 2) == 2) ||
|
||||||
|
((player->effects & HIT_BY_STAR_EFFECT) == HIT_BY_STAR_EFFECT) ||
|
||||||
|
((player->effects & TERRAIN_TUMBLE_EFFECT) == TERRAIN_TUMBLE_EFFECT) ||
|
||||||
|
((player->effects & MIDAIR_EFFECT) == MIDAIR_EFFECT)) {
|
||||||
|
|
||||||
var_f2 = (f32) (1.0 - ((f64) player->collision.surfaceDistance[2] * 0.02));
|
var_f2 = (f32) (1.0 - ((f64) player->collision.surfaceDistance[2] * 0.02));
|
||||||
if (var_f2 < 0.0f) {
|
if (var_f2 < 0.0f) {
|
||||||
|
@ -1747,7 +1782,8 @@ void render_player(Player* player, s8 playerId, s8 screenId) {
|
||||||
void func_80026A48(Player* player, s8 playerIndex) {
|
void func_80026A48(Player* player, s8 playerIndex) {
|
||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
|
|
||||||
if (((player->effects & EARLY_START_SPINOUT_EFFECT) == EARLY_START_SPINOUT_EFFECT) && ((player->type & PLAYER_START_SEQUENCE) == 0)) {
|
if (((player->effects & EARLY_START_SPINOUT_EFFECT) == EARLY_START_SPINOUT_EFFECT) &&
|
||||||
|
((player->type & PLAYER_START_SEQUENCE) == 0)) {
|
||||||
player->tyreSpeed += D_800DDE74[8];
|
player->tyreSpeed += D_800DDE74[8];
|
||||||
if (player->tyreSpeed >= 0x400) {
|
if (player->tyreSpeed >= 0x400) {
|
||||||
player->tyreSpeed = 0;
|
player->tyreSpeed = 0;
|
||||||
|
@ -1779,10 +1815,14 @@ void update_wheel_palette(Player* player, s8 playerId, s8 screenId, s8 arg3) {
|
||||||
s16 temp_t2 = player->tyreSpeed;
|
s16 temp_t2 = player->tyreSpeed;
|
||||||
s16 temp_num = 0x40; // setting this as a variable gets rid of regalloc
|
s16 temp_num = 0x40; // setting this as a variable gets rid of regalloc
|
||||||
|
|
||||||
if (((player->effects & EARLY_START_SPINOUT_EFFECT) == EARLY_START_SPINOUT_EFFECT) && ((player->type & PLAYER_START_SEQUENCE) == 0)) {
|
if (((player->effects & EARLY_START_SPINOUT_EFFECT) == EARLY_START_SPINOUT_EFFECT) &&
|
||||||
if (((player->effects & BANANA_SPINOUT_EFFECT) != BANANA_SPINOUT_EFFECT) && ((player->effects & DRIVING_SPINOUT_EFFECT) != DRIVING_SPINOUT_EFFECT) &&
|
((player->type & PLAYER_START_SEQUENCE) == 0)) {
|
||||||
((player->effects & LIGHTNING_STRIKE_EFFECT) != LIGHTNING_STRIKE_EFFECT) && ((player->effects & UNKNOWN_EFFECT_0x80000) != UNKNOWN_EFFECT_0x80000) &&
|
if (((player->effects & BANANA_SPINOUT_EFFECT) != BANANA_SPINOUT_EFFECT) &&
|
||||||
((player->effects & UNKNOWN_EFFECT_0x800000) != UNKNOWN_EFFECT_0x800000) && ((player->unk_044 & 0x800) == 0)) {
|
((player->effects & DRIVING_SPINOUT_EFFECT) != DRIVING_SPINOUT_EFFECT) &&
|
||||||
|
((player->effects & LIGHTNING_STRIKE_EFFECT) != LIGHTNING_STRIKE_EFFECT) &&
|
||||||
|
((player->effects & UNKNOWN_EFFECT_0x80000) != UNKNOWN_EFFECT_0x80000) &&
|
||||||
|
((player->effects & UNKNOWN_EFFECT_0x800000) != UNKNOWN_EFFECT_0x800000) &&
|
||||||
|
((player->unk_044 & 0x800) == 0)) {
|
||||||
|
|
||||||
if (frameId <= 20) {
|
if (frameId <= 20) {
|
||||||
load_player_data_non_blocking(player,
|
load_player_data_non_blocking(player,
|
||||||
|
@ -1809,9 +1849,12 @@ void update_wheel_palette(Player* player, s8 playerId, s8 screenId, s8 arg3) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (((player->effects & BANANA_SPINOUT_EFFECT) != BANANA_SPINOUT_EFFECT) && ((player->effects & DRIVING_SPINOUT_EFFECT) != DRIVING_SPINOUT_EFFECT) &&
|
if (((player->effects & BANANA_SPINOUT_EFFECT) != BANANA_SPINOUT_EFFECT) &&
|
||||||
((player->effects & UNKNOWN_EFFECT_0x80000) != UNKNOWN_EFFECT_0x80000) && ((player->effects & UNKNOWN_EFFECT_0x800000) != UNKNOWN_EFFECT_0x800000) &&
|
((player->effects & DRIVING_SPINOUT_EFFECT) != DRIVING_SPINOUT_EFFECT) &&
|
||||||
((player->effects & LIGHTNING_STRIKE_EFFECT) != LIGHTNING_STRIKE_EFFECT) && ((player->unk_044 & 0x800) == 0)) {
|
((player->effects & UNKNOWN_EFFECT_0x80000) != UNKNOWN_EFFECT_0x80000) &&
|
||||||
|
((player->effects & UNKNOWN_EFFECT_0x800000) != UNKNOWN_EFFECT_0x800000) &&
|
||||||
|
((player->effects & LIGHTNING_STRIKE_EFFECT) != LIGHTNING_STRIKE_EFFECT) &&
|
||||||
|
((player->unk_044 & 0x800) == 0)) {
|
||||||
|
|
||||||
if (frameId <= 20) {
|
if (frameId <= 20) {
|
||||||
load_player_data_non_blocking(player,
|
load_player_data_non_blocking(player,
|
||||||
|
|
14
src/save.c
14
src/save.c
|
@ -330,10 +330,10 @@ s32 func_800B5218(void) {
|
||||||
fastestLapIndex = 0;
|
fastestLapIndex = 0;
|
||||||
character = *gCharacterSelections;
|
character = *gCharacterSelections;
|
||||||
for (checkLapIndex = 1; checkLapIndex != 3; checkLapIndex++) {
|
for (checkLapIndex = 1; checkLapIndex != 3; checkLapIndex++) {
|
||||||
if ((s32)playerHUD->lapDurations[checkLapIndex] < (s32)playerHUD->lapDurations[fastestLapIndex]) {
|
if ((s32) playerHUD->lapDurations[checkLapIndex] < (s32) playerHUD->lapDurations[fastestLapIndex]) {
|
||||||
lapBitmask = 1 << checkLapIndex;
|
lapBitmask = 1 << checkLapIndex;
|
||||||
fastestLapIndex = checkLapIndex;
|
fastestLapIndex = checkLapIndex;
|
||||||
} else if ((s32)playerHUD->lapDurations[fastestLapIndex] == (s32)playerHUD->lapDurations[checkLapIndex]) {
|
} else if ((s32) playerHUD->lapDurations[fastestLapIndex] == (s32) playerHUD->lapDurations[checkLapIndex]) {
|
||||||
lapBitmask |= 1 << checkLapIndex;
|
lapBitmask |= 1 << checkLapIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -471,7 +471,7 @@ void func_800B559C(s32 arg0) {
|
||||||
* But only unknown bytes 7 and 8 ever get set, so why the extra 3, and why in chunks of 17?
|
* But only unknown bytes 7 and 8 ever get set, so why the extra 3, and why in chunks of 17?
|
||||||
**/
|
**/
|
||||||
u8 func_800B578C(s32 arg0) {
|
u8 func_800B578C(s32 arg0) {
|
||||||
u8* times = (u8*)&gSaveData.onlyBestTimeTrialRecords[arg0];
|
u8* times = (u8*) &gSaveData.onlyBestTimeTrialRecords[arg0];
|
||||||
s32 checksum = 0;
|
s32 checksum = 0;
|
||||||
s32 i;
|
s32 i;
|
||||||
s32 j;
|
s32 j;
|
||||||
|
@ -952,14 +952,14 @@ u8 func_800B6828(s32 arg0) {
|
||||||
|
|
||||||
u8 func_800B68F4(s32 arg0) {
|
u8 func_800B68F4(s32 arg0) {
|
||||||
struct_8018EE10_entry* var_v0 = gSomeDLBuffer;
|
struct_8018EE10_entry* var_v0 = gSomeDLBuffer;
|
||||||
u8 *addr = (u8*)(var_v0 + arg0);
|
u8* addr = (u8*) (var_v0 + arg0);
|
||||||
s32 i = 0;
|
s32 i = 0;
|
||||||
u32 checksum = 0;
|
u32 checksum = 0;
|
||||||
|
|
||||||
for (i = 0; i < (s32)offsetof(struct_8018EE10_entry, pad_43); i++) {
|
for (i = 0; i < (s32) offsetof(struct_8018EE10_entry, pad_43); i++) {
|
||||||
checksum += (addr[i] * (arg0 + 1)) + i;
|
checksum += (addr[i] * (arg0 + 1)) + i;
|
||||||
}
|
}
|
||||||
|
|
||||||
return checksum;
|
return checksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6737,11 +6737,12 @@ void update_crabs(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80082F1C(s32 objectIndex, s32 arg1) {
|
void func_80082F1C(s32 objectIndex, s32 arg1) {
|
||||||
gObjectList[objectIndex].model = (Gfx*)d_course_yoshi_valley_unk5;
|
gObjectList[objectIndex].model = (Gfx*) d_course_yoshi_valley_unk5;
|
||||||
gObjectList[objectIndex].vertex = (Vtx*)d_course_yoshi_valley_unk4;
|
gObjectList[objectIndex].vertex = (Vtx*) d_course_yoshi_valley_unk4;
|
||||||
gObjectList[objectIndex].sizeScaling = 0.027f;
|
gObjectList[objectIndex].sizeScaling = 0.027f;
|
||||||
object_next_state(objectIndex);
|
object_next_state(objectIndex);
|
||||||
set_obj_origin_pos(objectIndex, D_800E5DF4[arg1 * 4 + 0] * xOrientation, D_800E5DF4[arg1 * 4 + 1], D_800E5DF4[arg1 * 4 + 2]);
|
set_obj_origin_pos(objectIndex, D_800E5DF4[arg1 * 4 + 0] * xOrientation, D_800E5DF4[arg1 * 4 + 1],
|
||||||
|
D_800E5DF4[arg1 * 4 + 2]);
|
||||||
set_obj_origin_offset(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 * 4 + 3], 0U);
|
set_obj_direction_angle(objectIndex, 0U, D_800E5DF4[arg1 * 4 + 3], 0U);
|
||||||
}
|
}
|
||||||
|
@ -7806,7 +7807,8 @@ void func_80085F74(s32 objectIndex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80086074(s32 objectIndex, s32 arg1) {
|
void func_80086074(s32 objectIndex, s32 arg1) {
|
||||||
set_obj_origin_pos(objectIndex, D_800E6734[arg1 * 3 + 0] * xOrientation, D_800E6734[arg1 * 3 + 1], D_800E6734[arg1 * 3 + 2]);
|
set_obj_origin_pos(objectIndex, D_800E6734[arg1 * 3 + 0] * xOrientation, D_800E6734[arg1 * 3 + 1],
|
||||||
|
D_800E6734[arg1 * 3 + 2]);
|
||||||
init_texture_object(objectIndex, &d_course_rainbow_road_static_tluts[arg1 * 256],
|
init_texture_object(objectIndex, &d_course_rainbow_road_static_tluts[arg1 * 256],
|
||||||
&d_course_rainbow_road_static_textures[arg1], 64, 64);
|
&d_course_rainbow_road_static_textures[arg1], 64, 64);
|
||||||
func_80085BB4(objectIndex);
|
func_80085BB4(objectIndex);
|
||||||
|
|
Loading…
Reference in New Issue