diff options
| author | coco875 <59367621+coco875@users.noreply.github.com> | 2024-08-28 01:47:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-27 17:47:39 -0600 |
| commit | a1f0d32d666c07d0754d97f107a5be59153768fd (patch) | |
| tree | fcc84d9daa940274be8cf76715be902d93338e64 /src/code_800029B0.c | |
| parent | bb3cbe0500197f894c83230a9a170a2cbe7aa3e8 (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_800029B0.c')
| -rw-r--r-- | src/code_800029B0.c | 78 |
1 files changed, 38 insertions, 40 deletions
diff --git a/src/code_800029B0.c b/src/code_800029B0.c index dd29d79b8..0cf1888b5 100644 --- a/src/code_800029B0.c +++ b/src/code_800029B0.c @@ -55,15 +55,15 @@ u16 D_800DC5E4 = 0; s32 gPlayerWinningIndex = 0; ALIGNED16 struct UnkStruct_800DC5EC D_8015F480[4]; -struct UnkStruct_800DC5EC *D_800DC5EC = &D_8015F480[0]; -struct UnkStruct_800DC5EC *D_800DC5F0 = &D_8015F480[1]; -struct UnkStruct_800DC5EC *D_800DC5F4 = &D_8015F480[2]; -struct UnkStruct_800DC5EC *D_800DC5F8 = &D_8015F480[3]; +struct UnkStruct_800DC5EC* D_800DC5EC = &D_8015F480[0]; +struct UnkStruct_800DC5EC* D_800DC5F0 = &D_8015F480[1]; +struct UnkStruct_800DC5EC* D_800DC5F4 = &D_8015F480[2]; +struct UnkStruct_800DC5EC* D_800DC5F8 = &D_8015F480[3]; u16 gIsGamePaused = 0; // 1 if the game is paused and 0 if the game is not paused -u8 *pAppNmiBuffer = (u8 *) &osAppNmiBuffer; +u8* pAppNmiBuffer = (u8*) &osAppNmiBuffer; s32 gIsMirrorMode = 0; -f32 vtxStretchY = 1.0f; +f32 vtxStretchY = 1.0f; Lights1 D_800DC610[] = { gdSPDefLights1(175, 175, 175, 255, 255, 255, 0, 0, 120), gdSPDefLights1(115, 115, 115, 255, 255, 255, 0, 0, 120), @@ -73,8 +73,8 @@ s16 gCreditsCourseId = COURSE_LUIGI_RACEWAY; s16 gPlaceItemBoxes = 1; // Technically a pointer to an array, but declaring it so creates regalloc issues. -CollisionTriangle *gCollisionMesh; -u16 *gCollisionIndices; +CollisionTriangle* gCollisionMesh; +u16* gCollisionIndices; u16 gCollisionMeshCount; // Number of entries in gCollisionMesh u16 gNumCollisionTriangles; u32 D_8015F58C; @@ -84,7 +84,7 @@ s32 D_8015F59C; s32 D_8015F5A0; s32 D_8015F5A4; s32 code_800029B0_bss_pad[48]; -Vtx *vtxBuffer[32]; +Vtx* vtxBuffer[32]; s16 gCourseMaxX; s16 gCourseMinX; @@ -131,12 +131,12 @@ u16 D_8015F894; // Indexed by Player ID. Track time in seconds since player has last crossed the finish line f32 gTimePlayerLastTouchedFinishLine[NUM_PLAYERS]; -u8 *gNmiUnknown1; -u8 *gNmiUnknown2; -u8 *gNmiUnknown3; -u8 *gNmiUnknown4; -u8 *gNmiUnknown5; -u8 *gNmiUnknown6; +u8* gNmiUnknown1; +u8* gNmiUnknown2; +u8* gNmiUnknown3; +u8* gNmiUnknown4; +u8* gNmiUnknown5; +u8* gNmiUnknown6; Vec3f D_8015F8D0; s32 D_8015F8DC; @@ -161,7 +161,7 @@ uintptr_t D_801625F8; f32 D_801625FC; void func_800029B0(void) { - switch(D_800DC5A8) { + switch (D_800DC5A8) { case 0: func_800C8F44(127); break; @@ -175,7 +175,7 @@ void func_800029B0(void) { } void setup_race(void) { - struct Controller *controller; + struct Controller* controller; int i; gPlayerCountSelection1 = gPlayerCount; @@ -217,16 +217,13 @@ void setup_race(void) { init_actors_and_load_textures(); if (gModeSelection != BATTLE) { - D_8015F8D0[1] = (f32) (D_80164490->posY - 15);; + D_8015F8D0[1] = (f32) (D_80164490->posY - 15); + ; D_8015F8D0[2] = D_80164490->posZ; if (gCurrentCourseId == COURSE_TOADS_TURNPIKE) { - D_8015F8D0[0] = (gIsMirrorMode != 0) ? - D_80164490->posX + 138.0f : - D_80164490->posX - 138.0f; + D_8015F8D0[0] = (gIsMirrorMode != 0) ? D_80164490->posX + 138.0f : D_80164490->posX - 138.0f; } else if (gCurrentCourseId == COURSE_WARIO_STADIUM) { - D_8015F8D0[0] = (gIsMirrorMode != 0) ? - D_80164490->posX + 12.0f : - D_80164490->posX - 12.0f; + D_8015F8D0[0] = (gIsMirrorMode != 0) ? D_80164490->posX + 12.0f : D_80164490->posX - 12.0f; } else { D_8015F8D0[0] = D_80164490->posX; } @@ -238,7 +235,7 @@ void setup_race(void) { controller = gControllerOne; - for (i = 0; i < 7; i++, controller++){ + for (i = 0; i < 7; i++, controller++) { controller->rawStickX = 0; controller->rawStickY = 0; controller->buttonPressed = 0; @@ -296,8 +293,8 @@ void clear_nmi_buffer(void) { void func_80003040(void) { Vec3f position; - Vec3f velocity = {0, 0, 0}; - Vec3s rotation = {0, 0, 0}; + Vec3f velocity = { 0, 0, 0 }; + Vec3s rotation = { 0, 0, 0 }; D_800DC5BC = 0; D_800DC5C8 = 0; @@ -306,11 +303,12 @@ void func_80003040(void) { gCourseDirection = 1.0f; gPlayerCountSelection1 = 1; - set_segment_base_addr(0x3, (void *) (gNextFreeMemoryAddress + 0xFFFF7000)); + set_segment_base_addr(0x3, (void*) (gNextFreeMemoryAddress + 0xFFFF7000)); destroy_all_actors(); switch (gCurrentCourseId) { case COURSE_MARIO_RACEWAY: { - struct ActorSpawnData *a_d_course_mario_raceway_tree_spawns = (struct ActorSpawnData *) LOAD_ASSET(d_course_mario_raceway_tree_spawns); + struct ActorSpawnData* a_d_course_mario_raceway_tree_spawns = + (struct ActorSpawnData*) LOAD_ASSET(d_course_mario_raceway_tree_spawns); dma_textures(gTextureTrees1, 0x35B, 0x800); spawn_foliage(a_d_course_mario_raceway_tree_spawns); break; @@ -329,18 +327,18 @@ void func_80003040(void) { add_actor_to_empty_slot(position, rotation, velocity, ACTOR_YOSHI_EGG); break; case COURSE_MOO_MOO_FARM: - dma_textures(gTextureTrees4Left, 0x3E8, 0x800); + dma_textures(gTextureTrees4Left, 0x3E8, 0x800); dma_textures(gTextureTrees4Right, 0x3E8, 0x800); - dma_textures(gTextureCow01Left, 0x400, 0x800); - dma_textures(gTextureCow01Right, 0x400, 0x800); - dma_textures(gTextureCow02Left, 0x400, 0x800); - dma_textures(gTextureCow02Right, 0x400, 0x800); - dma_textures(gTextureCow03Left, 0x400, 0x800); - dma_textures(gTextureCow03Right, 0x400, 0x800); - dma_textures(gTextureCow04Left, 0x400, 0x800); - dma_textures(gTextureCow04Right, 0x400, 0x800); - dma_textures(gTextureCow05Left, 0x400, 0x800); - dma_textures(gTextureCow05Right, 0x400, 0x800); + dma_textures(gTextureCow01Left, 0x400, 0x800); + dma_textures(gTextureCow01Right, 0x400, 0x800); + dma_textures(gTextureCow02Left, 0x400, 0x800); + dma_textures(gTextureCow02Right, 0x400, 0x800); + dma_textures(gTextureCow03Left, 0x400, 0x800); + dma_textures(gTextureCow03Right, 0x400, 0x800); + dma_textures(gTextureCow04Left, 0x400, 0x800); + dma_textures(gTextureCow04Right, 0x400, 0x800); + dma_textures(gTextureCow05Left, 0x400, 0x800); + dma_textures(gTextureCow05Right, 0x400, 0x800); spawn_foliage(d_course_moo_moo_farm_tree_spawn); break; case COURSE_SHERBET_LAND: |
