summaryrefslogtreecommitdiff
path: root/src/code_8003DC40.c
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2024-08-28 01:47:39 +0200
committerGitHub <noreply@github.com>2024-08-27 17:47:39 -0600
commita1f0d32d666c07d0754d97f107a5be59153768fd (patch)
treefcc84d9daa940274be8cf76715be902d93338e64 /src/code_8003DC40.c
parentbb3cbe0500197f894c83230a9a170a2cbe7aa3e8 (diff)
Update decomp clang (#67)
* Update menus.c (#634) * Update common_data.yml (#635) * Renames for screenId and other changes (#636) * screenId renames * Rename surface map to collision mesh (#637) * Rename some stack vars (#638) * Fix syntax error (#639) * Rename some stack vars * Update collision.c * Collision Documentation (#640) * Collision related renames * update doxygen (#649) * change bool (#644) Co-authored-by: MegaMech <MegaMech@users.noreply.github.com> * Update (#642) * Delete trig_tables_bss.c (#650) * fix typo audio (#656) * fix typo src actor (#657) Co-authored-by: MegaMech <MegaMech@users.noreply.github.com> * fix typo include (#658) * fix course (#659) * fix typo debug (#660) * fix typo data (#661) * replace number with const (#665) * fix typo buffers (#655) * fix typo buffers * tweak ld file * rename to sMemoryPool * add a warning --------- * fix typo src (#654) * fix typo src * fix non matcing * Update code_80091750.c --------- * fix typo racing (#653) * fix typo racing * get it match * replace G_LINE3D to G_QUAD --------- * fix typo src (#652) * fix ending typo (#651) * Action more info when it doesn't match and fix first diff (#662) * Update linux-compile.yml * fix first-diff * Update first-diff.py --------- * document texture of kart (#663) * document texture of kart * change screenPlayerId to screenId * some documentation around object * Revert "some documentation around object" This reverts commit cbb39078e036bf2a417bed67359e910213acab28. * more rename --------- * Make evaluate_collision_players_palm_tree better (#667) This matches just the same as before, but using those two casts instead of shifts seems more likely to be accurate to the original source code Signed-off-by: Gabriel Ravier <gabravier@gmail.com> * add fedora instruciton (#666) * start documenting animation (#668) * start documenting animation * Update course_data.c * change comment * update libultra asm (#648) * update libultra asm * fix gcc __osThreadTail --------- * Document Vehicles (#641) * start doc collision * fix merge * finish rename fonction related to vehicle * document around waypoint of vehicle * make some modification * make some change and rename one * copy_ to oldPos * doc smoke ferry and train * some rename * fix some renaming * precise index * rename a funciton * simplify waypoint_vehicles * change some name * change some name * rename move_to_point_direction * fix some conflict * Update code_80005FD0.c * Update code_80005FD0.h --------- * Label a save info loop (#645) * save info * more gcc progress * fix a value and do a rename (#669) * update clang and add action (#664) * update clang and add action * try clang on course folder only * forget two file * Update course_displaylists.inc.c * forget few other file * Update course_vertices.inc.c * format all code while get it match * second pass * format other dir * disable clang format on bad ido code * fix some tabulation * revert format on tool dir * Update clang-format.yml * ignore gbi.h * add some read me instruction * fix error * format and fixing error * Update README.md --------- * Update linkonly_generator.py (#670) * format more file * update * fix compilation issue * remove course_metadata folder * re add course metadata folder * fix banshee bordwalk crash * fix windows eurk * Update CMakeLists.txt ---------
Diffstat (limited to 'src/code_8003DC40.c')
-rw-r--r--src/code_8003DC40.c77
1 files changed, 40 insertions, 37 deletions
diff --git a/src/code_8003DC40.c b/src/code_8003DC40.c
index 4c6125339..218bedbe9 100644
--- a/src/code_8003DC40.c
+++ b/src/code_8003DC40.c
@@ -8,15 +8,15 @@
#include "code_8003DC40.h"
#include "defines.h"
-void func_8003DC40(Player *player) {
+void func_8003DC40(Player* player) {
player->unk_DAC = 1.0f;
}
-UNUSED void func_8003DC50(Player *player, Vec3f arg1) {
+UNUSED void func_8003DC50(Player* player, Vec3f arg1) {
s32 thing1 = 0;
s32 thing2 = 0;
// Praise Fake Match!!
- if(player){};
+ if (player) {};
if (player->unk_230 <= player->unk_23C) {
if (player->collision.unk48[1] >= 0.1736) {
arg1[0] = (player->unk_206 / 182) * 0x78;
@@ -36,11 +36,11 @@ UNUSED void func_8003DC50(Player *player, Vec3f arg1) {
mtxf_translate_vec3f_mat3(arg1, player->orientationMatrix);
}
-UNUSED void func_8003DE4C(Player *player, Vec3f arg1) {
+UNUSED void func_8003DE4C(Player* player, Vec3f arg1) {
s32 thing1 = 0;
s32 thing2 = 0;
// Praise Fake Match!!
- if(player){};
+ if (player) {};
if (player->unk_230 <= player->unk_23C) {
if (player->collision.unk54[1] >= 0.1736) {
arg1[0] = (player->unk_206 / 182) * 0x78;
@@ -60,7 +60,7 @@ UNUSED void func_8003DE4C(Player *player, Vec3f arg1) {
mtxf_translate_vec3f_mat3(arg1, player->orientationMatrix);
}
// Stick to ground?
-void func_8003E048(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
+void func_8003E048(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
*arg5 += arg1[0] * player->collision.surfaceDistance[2] * 1;
*arg6 += arg1[1] * player->collision.surfaceDistance[2] * 0.1;
*arg7 += arg1[2] * player->collision.surfaceDistance[2] * 1;
@@ -86,7 +86,7 @@ void func_8003E048(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
mtxf_translate_vec3f_mat3(arg3, player->orientationMatrix);
}
-void func_8003E37C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
+void func_8003E37C(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
*arg5 += arg1[0] * player->collision.surfaceDistance[2] * 1;
*arg6 += arg1[1] * player->collision.surfaceDistance[2] * 0.2;
*arg7 += arg1[2] * player->collision.surfaceDistance[2] * 1;
@@ -114,7 +114,7 @@ void func_8003E37C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
mtxf_translate_vec3f_mat3(arg3, player->orientationMatrix);
}
-void func_8003E6EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
+void func_8003E6EC(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
*arg5 += arg1[0] * player->collision.surfaceDistance[2] * 1;
*arg6 += arg1[1] * player->collision.surfaceDistance[2] * 0.1;
*arg7 += arg1[2] * player->collision.surfaceDistance[2] * 1;
@@ -135,7 +135,7 @@ void func_8003E6EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
mtxf_translate_vec3f_mat3(arg3, player->orientationMatrix);
}
-void func_8003E9EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
+void func_8003E9EC(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
*arg5 += arg1[0] * player->collision.surfaceDistance[2] * 1;
*arg6 += arg1[1] * player->collision.surfaceDistance[2] * 0.1;
*arg7 += arg1[2] * player->collision.surfaceDistance[2] * 1;
@@ -147,7 +147,10 @@ void func_8003E9EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
func_8003DC40(player);
} else {
if ((((player->unk_094 / 18.0f) * 216.0f) > 20.0f) || ((player->effects & 0x10000) == 0x10000)) {
- if ((player->tyres[BACK_LEFT].surfaceType == ASPHALT) || (player->tyres[BACK_RIGHT].surfaceType == ASPHALT) || (player->tyres[FRONT_RIGHT].surfaceType == ASPHALT) || (player->tyres[FRONT_LEFT].surfaceType == ASPHALT)) {
+ if ((player->tyres[BACK_LEFT].surfaceType == ASPHALT) ||
+ (player->tyres[BACK_RIGHT].surfaceType == ASPHALT) ||
+ (player->tyres[FRONT_RIGHT].surfaceType == ASPHALT) ||
+ (player->tyres[FRONT_LEFT].surfaceType == ASPHALT)) {
arg3[0] = ((player->unk_206 / 182) * 5);
} else {
arg3[0] = ((player->unk_206 / 182) * 0x28);
@@ -166,7 +169,7 @@ void func_8003E9EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
mtxf_translate_vec3f_mat3(arg3, player->orientationMatrix);
}
-void func_8003EE2C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
+void func_8003EE2C(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
*arg5 += arg1[0] * player->collision.surfaceDistance[2] * 1;
*arg6 += arg1[1] * player->collision.surfaceDistance[2] * 0.1;
*arg7 += arg1[2] * player->collision.surfaceDistance[2] * 1;
@@ -187,7 +190,7 @@ void func_8003EE2C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
mtxf_translate_vec3f_mat3(arg3, player->orientationMatrix);
}
-void func_8003F138(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
+void func_8003F138(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
*arg5 += arg1[0] * player->collision.surfaceDistance[2] * 1;
*arg6 += arg1[1] * player->collision.surfaceDistance[2] * 0.1;
*arg7 += arg1[2] * player->collision.surfaceDistance[2] * 1;
@@ -214,7 +217,7 @@ void func_8003F138(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
mtxf_translate_vec3f_mat3(arg3, player->orientationMatrix);
}
-void func_8003F46C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
+void func_8003F46C(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
arg1[0] = -player->collision.orientationVector[0];
arg1[1] = -player->collision.orientationVector[1];
arg1[2] = -player->collision.orientationVector[2];
@@ -229,28 +232,28 @@ void func_8003F46C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
return;
} else {
switch (gCurrentCourseId) {
- case COURSE_MARIO_RACEWAY:
- func_8003E048(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- break;
- case COURSE_CHOCO_MOUNTAIN:
- case COURSE_KOOPA_BEACH:
- func_8003E37C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- break;
- case COURSE_BOWSER_CASTLE:
- func_8003E6EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- break;
- case COURSE_LUIGI_RACEWAY:
- func_8003E9EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- break;
- case COURSE_WARIO_STADIUM:
- func_8003EE2C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- break;
- case COURSE_DK_JUNGLE:
- func_8003F138(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- break;
- default:
- func_8003E048(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- break;
+ case COURSE_MARIO_RACEWAY:
+ func_8003E048(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ break;
+ case COURSE_CHOCO_MOUNTAIN:
+ case COURSE_KOOPA_BEACH:
+ func_8003E37C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ break;
+ case COURSE_BOWSER_CASTLE:
+ func_8003E6EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ break;
+ case COURSE_LUIGI_RACEWAY:
+ func_8003E9EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ break;
+ case COURSE_WARIO_STADIUM:
+ func_8003EE2C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ break;
+ case COURSE_DK_JUNGLE:
+ func_8003F138(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ break;
+ default:
+ func_8003E048(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ break;
}
if (player->effects & 0x10000) {
player->unk_DAC = 0.5f;
@@ -258,7 +261,7 @@ void func_8003F46C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
}
}
-void func_8003F734(Player *player, Vec3f arg1, Vec3f arg2, f32 *arg3, f32 *arg4, f32 *arg5, f32 *arg6) {
+void func_8003F734(Player* player, Vec3f arg1, Vec3f arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6) {
f32 temp_f12;
f32 temp_f14;
f32 temp_f0_2;
@@ -312,7 +315,7 @@ void func_8003F734(Player *player, Vec3f arg1, Vec3f arg2, f32 *arg3, f32 *arg4,
}
}
-void func_8003FBAC(Player *player, Vec3f arg1, Vec3f arg2, f32 *arg3, f32 *arg4, f32 *arg5, f32 *arg6) {
+void func_8003FBAC(Player* player, Vec3f arg1, Vec3f arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6) {
f32 temp_f0_2;
f32 temp_f12;
f32 temp_f14;