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

---------
This commit is contained in:
coco875
2024-08-28 01:47:39 +02:00
committed by GitHub
parent bb3cbe0500
commit a1f0d32d66
402 changed files with 43929 additions and 45274 deletions
+35 -19
View File
@@ -11,24 +11,42 @@
#include <stdlib.h>
Lights1 D_800E8680 = gdSPDefLights1(31, 31, 31, 255, 255, 255, 40, 40, 20);
#ifdef TARGET_N64
/*** Data ***/
Ambient D_800E8680 = { {
{ 31, 31, 31 },
0,
{ 31, 31, 31 },
0,
} };
Light D_800E8688 = { {
{ 255, 255, 255 },
0,
{ 255, 255, 255 },
0,
{ 40, 40, 20 },
0,
} };
#endif
/*** BSS ****/
s16 D_8018EDB0;
s16 D_8018EDB2;
s16 D_8018EDB4;
Vtx *D_8018EDB8;
Vtx *D_8018EDBC;
Vtx* D_8018EDB8;
Vtx* D_8018EDBC;
/*** utils **/
#define SQ(x) ((x) * (x))
void func_800AF9B0(void) {
D_8018EDB8 = (void *)calloc(480, sizeof(Vtx));
D_8018EDBC = (void *)calloc(480, sizeof(Vtx));
D_8018EDB8 = (void*) calloc(480, sizeof(Vtx));
D_8018EDBC = (void*) calloc(480, sizeof(Vtx));
}
// could be a normal vertex, not a color...
void func_800AF9E4(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4, s16 arg5, s32 arg6, s32 arg7) {
void func_800AF9E4(Vtx* arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4, s16 arg5, s32 arg6, s32 arg7) {
s32 r, g, b;
s32 i;
@@ -40,9 +58,9 @@ void func_800AF9E4(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4, s16 arg5,
(arg0 + i)->v.ob[1] = (arg2 * arg3) + arg3 - 420;
}
if (i % 2 == 0) {
(arg0 + i)->v.ob[1] += (f32)SQ(arg1) * -0.07f;
(arg0 + i)->v.ob[1] += (f32) SQ(arg1) * -0.07f;
} else {
(arg0 + i)->v.ob[1] += (f32)SQ(arg1 + 1) * -0.07f;
(arg0 + i)->v.ob[1] += (f32) SQ(arg1 + 1) * -0.07f;
}
(arg0 + i)->v.cn[0] = 0;
@@ -70,10 +88,10 @@ void func_800AF9E4(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4, s16 arg5,
gSP1Triangle(gDisplayListHead++, 3, 2, 1, 0);
}
void func_800AFC54(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4[3]);
void func_800AFC54(Vtx* arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4[3]);
#ifdef NON_MATCHING
// guess on Vtx type?
void func_800AFC54(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4[3]) {
void func_800AFC54(Vtx* arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4[3]) {
Vtx *a1, *a2, *a3;
s32 saved1, saved2, saved3;
f32 res;
@@ -88,7 +106,6 @@ void func_800AFC54(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4[3]) {
saved2 = a2->v.ob[1];
saved3 = a2->v.ob[2];
a = saved2 - a1->v.ob[1];
e = saved3 - a1->v.ob[2];
d = a3->v.ob[1] - saved2;
@@ -96,31 +113,29 @@ void func_800AFC54(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4[3]) {
f = a3->v.ob[0] - saved1;
c = saved1 - a1->v.ob[0];
f14 = ((a) * (b)) - ((e) * (d));
f16 = ((e) * (f)) - ((c) * (b));
f18 = ((c) * (d)) - ((a) * (f));
res = sqrtf(SQ(f14) + SQ(f16) + SQ(f18));
if (res < 0.001) {
res = 0.001;
}
arg4[0] = f14 * (f32)(1.0 / res) * 120.0f;
arg4[1] = f16 * (f32)(1.0 / res) * 120.0f;
arg4[2] = f18 * (f32)(1.0 / res) * 120.0f;
arg4[0] = f14 * (f32) (1.0 / res) * 120.0f;
arg4[1] = f16 * (f32) (1.0 / res) * 120.0f;
arg4[2] = f18 * (f32) (1.0 / res) * 120.0f;
}
#else
GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800AFC54.s")
#endif
void func_800AFE00(Vtx *arg0, Vec3s *arg1, s32 arg2, s32 arg3) {
void func_800AFE00(Vtx* arg0, Vec3s* arg1, s32 arg2, s32 arg3) {
s32 idx1;
s32 idx2;
s32 i;
Vtx *vtx;
Vtx* vtx;
s16 sp14[2][3];
idx1 = (arg2 == 0) ? 0 : arg2 - 1;
@@ -141,7 +156,7 @@ void func_800AFE00(Vtx *arg0, Vec3s *arg1, s32 arg2, s32 arg3) {
}
}
void func_800AFF58(Vtx *arg0) {
void func_800AFF58(Vtx* arg0) {
UNUSED u32 pad88[26];
s32 i, j;
s16 sp40[12][3];
@@ -167,7 +182,8 @@ void func_800B0004(void) {
gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8680.a), LIGHT_2);
gSPNumLights(gDisplayListHead++, NUMLIGHTS_1);
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);
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);