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/render_objects.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/render_objects.c')
| -rw-r--r-- | src/render_objects.c | 1837 |
1 files changed, 1022 insertions, 815 deletions
diff --git a/src/render_objects.c b/src/render_objects.c index 14c5bfa8c..f1fd51f9b 100644 --- a/src/render_objects.c +++ b/src/render_objects.c @@ -1,7 +1,7 @@ /** * @file render_objects.c renders hud elements * A more suitable name may be print.c -**/ + **/ #include <libultraship.h> #include <libultra/gbi.h> @@ -42,83 +42,43 @@ #include <assets/frappe_snowland_data.h> Lights1 D_800E45C0[] = { - gdSPDefLights1( - 100, 0, 0, - 100, 0, 0, 0, -120, 0 - ), - gdSPDefLights1( - 100, 100, 0, - 255, 255, 0, 0, -120, 0 - ), - gdSPDefLights1( - 100, 100, 100, - 255, 255, 255, 0, -120, 0 - ), - gdSPDefLights1( - 100, 0, 0, - 100, 0, 0, 0, -120, 0 - ), + gdSPDefLights1(100, 0, 0, 100, 0, 0, 0, -120, 0), + gdSPDefLights1(100, 100, 0, 255, 255, 0, 0, -120, 0), + gdSPDefLights1(100, 100, 100, 255, 255, 255, 0, -120, 0), + gdSPDefLights1(100, 0, 0, 100, 0, 0, 0, -120, 0), }; -Lights1 D_800E4620 = gdSPDefLights1( - 150, 180, 250, - 255, 255, 255, 0, 0, 0 -); - -Lights1 D_800E4638 = gdSPDefLights1( - 85, 85, 85, - 255, 255, 255, 0, -120, 0 -); - -Lights1 D_800E4650 = gdSPDefLights1( - 85, 85, 0, - 255, 255, 0, 0, 120, 0 -); - -Lights1 D_800E4668 = gdSPDefLights1( - 85, 85, 85, - 255, 255, 255, -66, 82, -55 -); - -Lights1 D_800E4680 = gdSPDefLights1( - 85, 85, 85, - 255, 255, 255, 0, 0, 120 -); - -Lights1 D_800E4698 = gdSPDefLights1( - 85, 85, 85, - 255, 255, 255, 0, 0, 120 -); - -Lights1 D_800E46B0 = gdSPDefLights1( - 85, 85, 85, - 255, 255, 255, 0, 0, 120 -); - -Lights1 D_800E46C8 = gdSPDefLights1( - 85, 85, 85, - 255, 255, 255, 0, 0, 120 -); - -Lights1 D_800E46E0 = gdSPDefLights1( - 85, 85, 85, - 255, 255, 255, 0, 0, 120 -); - - -void func_800431B0(Vec3f pos, Vec3su orientation, f32 scale, Vtx *vtx) { +Lights1 D_800E4620 = gdSPDefLights1(150, 180, 250, 255, 255, 255, 0, 0, 0); + +Lights1 D_800E4638 = gdSPDefLights1(85, 85, 85, 255, 255, 255, 0, -120, 0); + +Lights1 D_800E4650 = gdSPDefLights1(85, 85, 0, 255, 255, 0, 0, 120, 0); + +Lights1 D_800E4668 = gdSPDefLights1(85, 85, 85, 255, 255, 255, -66, 82, -55); + +Lights1 D_800E4680 = gdSPDefLights1(85, 85, 85, 255, 255, 255, 0, 0, 120); + +Lights1 D_800E4698 = gdSPDefLights1(85, 85, 85, 255, 255, 255, 0, 0, 120); + +Lights1 D_800E46B0 = gdSPDefLights1(85, 85, 85, 255, 255, 255, 0, 0, 120); + +Lights1 D_800E46C8 = gdSPDefLights1(85, 85, 85, 255, 255, 255, 0, 0, 120); + +Lights1 D_800E46E0 = gdSPDefLights1(85, 85, 85, 255, 255, 255, 0, 0, 120); + +void func_800431B0(Vec3f pos, Vec3su orientation, f32 scale, Vtx* vtx) { rsp_set_matrix_transformation(pos, orientation, scale); gSPVertex(gDisplayListHead++, vtx, 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); } -void func_80043220(Vec3f pos, Vec3su orientation, f32 scale, Gfx *gfx) { +void func_80043220(Vec3f pos, Vec3su orientation, f32 scale, Gfx* gfx) { rsp_set_matrix_transformation(pos, orientation, scale); gSPDisplayList(gDisplayListHead++, D_0D0077A0); gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void func_80043288(Vec3f pos, Vec3su orientation, f32 arg2, Gfx *gfx) { +UNUSED void func_80043288(Vec3f pos, Vec3su orientation, f32 arg2, Gfx* gfx) { rsp_set_matrix_transformation(pos, orientation, arg2); gSPDisplayList(gDisplayListHead++, D_0D0077A0); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); @@ -126,25 +86,25 @@ UNUSED void func_80043288(Vec3f pos, Vec3su orientation, f32 arg2, Gfx *gfx) { gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_80043328(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx) { +void func_80043328(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx* gfx) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0077D0); gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void func_80043390(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx) { +UNUSED void func_80043390(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx* gfx) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0077F8); gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void func_800433F8(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx) { +UNUSED void func_800433F8(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx* gfx) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007828); gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void func_80043460(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx) { +UNUSED void func_80043460(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx* gfx) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007828); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); @@ -152,7 +112,7 @@ UNUSED void func_80043460(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx) { gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_80043500(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx) { +void func_80043500(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx* gfx) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007850); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); @@ -160,7 +120,7 @@ void func_80043500(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx) { gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_800435A0(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx, s32 arg4) { +void func_800435A0(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx* gfx, s32 arg4) { rsp_set_matrix_transformation_inverted_x_y_orientation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007878); @@ -170,28 +130,27 @@ void func_800435A0(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx, s32 arg4) { gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -UNUSED void func_80043668(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx) { +UNUSED void func_80043668(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx* gfx) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0078A0); gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void func_800436D0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx) { +UNUSED void func_800436D0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx* vtx) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D0078A0); gSPVertex(gDisplayListHead++, vtx, 3, 0); gSPDisplayList(gDisplayListHead++, D_0D006930); - } -UNUSED void func_80043764(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx) { +UNUSED void func_80043764(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx* vtx) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D0078A0); gSPVertex(gDisplayListHead++, vtx, 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); } -UNUSED void func_800437F8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx, s32 arg5) { +UNUSED void func_800437F8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx* vtx, s32 arg5) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D0078A0); @@ -204,7 +163,7 @@ UNUSED void func_800437F8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx, s32 gSPDisplayList(gDisplayListHead++, common_rectangle_display); } -UNUSED void func_800438C4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx, s32 arg5) { +UNUSED void func_800438C4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx* vtx, s32 arg5) { vtx[1].v.ob[0] = arg5; vtx[2].v.ob[0] = arg5; func_80042330(arg0, arg1, arg2, arg3); @@ -214,7 +173,7 @@ UNUSED void func_800438C4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx, s32 gSPDisplayList(gDisplayListHead++, common_rectangle_display); } -UNUSED void func_8004398C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx, s32 arg5) { +UNUSED void func_8004398C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx* vtx, s32 arg5) { vtx[0].v.ob[0] = arg5; vtx[3].v.ob[0] = arg5; func_80042330(arg0, arg1, arg2, arg3); @@ -238,177 +197,219 @@ s32 func_80043A54(s32 arg0) { return phi_v1; } -void load_texture_block_rgba32_nomirror(u8 *texture, s32 width, s32 height) { +void load_texture_block_rgba32_nomirror(u8* texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 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); + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); } -void load_texture_tile_rgba32_nomirror(u8 *texture, s32 width, s32 height) { - gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, - 0, 0, width - 1, height - 1, 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); +void load_texture_tile_rgba32_nomirror(u8* texture, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 0, 0, width - 1, + height - 1, 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); } -void load_texture_block_rgba16_mirror(u8 *texture, s32 width, s32 height) { +void load_texture_block_rgba16_mirror(u8* texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, - G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); } -void load_texture_block_rgba16_nomirror(u8 *texture, s32 width, s32 height, s32 someMask) { +void load_texture_block_rgba16_nomirror(u8* texture, s32 width, s32 height, s32 someMask) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, - G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, someMask, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, someMask, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); } -void load_texture_tile_rgba16_nomirror(u8 *texture, s32 width, s32 height) { - gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, - 0, 0, width - 1, height - 1, 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); +void load_texture_tile_rgba16_nomirror(u8* texture, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, 0, width - 1, + height - 1, 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); } -void load_texture_block_ia16_nomirror(u8 *texture, s32 width, s32 height) { +void load_texture_block_ia16_nomirror(u8* texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 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); + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); } -void load_texture_tile_ia16_nomirror(u8 *texture, s32 width, s32 height) { - gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, - 0, 0, width - 1, height - 1, 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); +void load_texture_tile_ia16_nomirror(u8* texture, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, 0, width - 1, + height - 1, 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); } -void load_texture_block_ia8_nomirror(u8 *texture, s32 width, s32 height) { +void load_texture_block_ia8_nomirror(u8* texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 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); + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); } -void load_texture_tile_ia8_nomirror(u8 *texture, s32 width, s32 height) { - gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, - 0, 0, width - 1, height - 1, 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); +void load_texture_tile_ia8_nomirror(u8* texture, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, 0, width - 1, + height - 1, 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); } -void load_texture_block_i8_nomirror(u8 *texture, s32 width, s32 height) { +void load_texture_block_i8_nomirror(u8* texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_I, G_IM_SIZ_8b, width, height, 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); + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); } -void func_80044924(u8 *texture, s32 width, s32 height) { +void func_80044924(u8* texture, s32 width, s32 height) { // This macro ought to be equivalent to the block of macros below but it doesn't match // See comment above the `gDPLoadBlock` macro - //gDPLoadTextureBlock_4b(gDisplayListHead++, texture, G_IM_FMT_I, width, height, 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_4b(gDisplayListHead++, texture, G_IM_FMT_I, width, height, 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); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, texture); - gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, G_TX_RENDERTILE, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); + gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, G_TX_RENDERTILE, G_TX_LOADTILE, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, + G_TX_NOLOD); gDPLoadSync(gDisplayListHead++); // The last argument to this macro really should be `CALC_DXT_4b(width)` but that creates a massive diff - gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (((width * height) + 3) >> 2) - 1, ((width / 16) + 2047) / (width / 16)); + gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (((width * height) + 3) >> 2) - 1, + ((width / 16) + 2047) / (width / 16)); gDPPipeSync(gDisplayListHead++); - gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_4b, (((width >> 1) + 7) >> 3), G_TX_RENDERTILE, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width-1) << G_TEXTURE_IMAGE_FRAC, (height-1) << G_TEXTURE_IMAGE_FRAC); + gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_4b, (((width >> 1) + 7) >> 3), G_TX_RENDERTILE, + G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, + G_TX_NOMASK, G_TX_NOLOD); + gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width - 1) << G_TEXTURE_IMAGE_FRAC, + (height - 1) << G_TEXTURE_IMAGE_FRAC); } -UNUSED void func_80044AB8(u8 *texture, s32 width, s32 height) { - gDPLoadTextureTile_4b(gDisplayListHead++, texture, G_IM_FMT_IA, width, height, - 0, 0, width - 1, height - 1, 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); +UNUSED void func_80044AB8(u8* texture, s32 width, s32 height) { + gDPLoadTextureTile_4b(gDisplayListHead++, texture, G_IM_FMT_IA, width, height, 0, 0, width - 1, height - 1, 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); } -void func_80044BF8(u8 *texture, s32 width, s32 height) { +void func_80044BF8(u8* texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_I, G_IM_SIZ_8b, width, height, 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); + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); } -void func_80044DA0(u8 *image, s32 width, s32 height) { +void func_80044DA0(u8* image, s32 width, s32 height) { // This macro ought to be equivalent to the block of macros below but it doesn't match // See comment above the `gDPLoadBlock` macro - // gDPLoadTextureBlock_4b(gDisplayListHead++, image, G_IM_FMT_I, width, height, 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_4b(gDisplayListHead++, image, G_IM_FMT_I, width, height, 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); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_16b, 1, image); - gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_16b, 0, G_TX_RENDERTILE, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); + gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_16b, 0, G_TX_RENDERTILE, G_TX_LOADTILE, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, + G_TX_NOLOD); gDPLoadSync(gDisplayListHead++); // The last argument to this macro really should be `CALC_DXT_4b(width)` but that creates a massive diff - gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (((width * height) + 3) >> 2) - 1, ((width / 16) + 2047) / (width / 16)); + gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (((width * height) + 3) >> 2) - 1, + ((width / 16) + 2047) / (width / 16)); gDPPipeSync(gDisplayListHead++); - gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_4b, (((width >> 1) + 7) >> 3), G_TX_RENDERTILE, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width-1) << G_TEXTURE_IMAGE_FRAC, (height-1) << G_TEXTURE_IMAGE_FRAC); + gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_4b, (((width >> 1) + 7) >> 3), G_TX_RENDERTILE, G_TX_RENDERTILE, + 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, + G_TX_NOLOD); + gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width - 1) << G_TEXTURE_IMAGE_FRAC, + (height - 1) << G_TEXTURE_IMAGE_FRAC); } // Appears to be a complete copy of `func_80044F34`? -void func_80044F34(u8 *image, s32 width, s32 height) { +void func_80044F34(u8* image, s32 width, s32 height) { // This macro ought to be equivalent to the block of macros below but it doesn't match // See comment above the `gDPLoadBlock` macro - // gDPLoadTextureBlock_4b(gDisplayListHead++, image, G_IM_FMT_I, width, height, 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_4b(gDisplayListHead++, image, G_IM_FMT_I, width, height, 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); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_16b, 1, image); - gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_16b, 0, G_TX_RENDERTILE, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); + gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_16b, 0, G_TX_RENDERTILE, G_TX_LOADTILE, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, + G_TX_NOLOD); gDPLoadSync(gDisplayListHead++); // The last argument to this macro really should be `CALC_DXT_4b(width)` but that creates a massive diff - gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (((width * height) + 3) >> 2) - 1, ((width / 16) + 2047) / (width / 16)); + gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (((width * height) + 3) >> 2) - 1, + ((width / 16) + 2047) / (width / 16)); gDPPipeSync(gDisplayListHead++); - gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_4b, (((width >> 1) + 7) >> 3), G_TX_RENDERTILE, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width-1) << G_TEXTURE_IMAGE_FRAC, (height-1) << G_TEXTURE_IMAGE_FRAC); + gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_4b, (((width >> 1) + 7) >> 3), G_TX_RENDERTILE, G_TX_RENDERTILE, + 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, + G_TX_NOLOD); + gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width - 1) << G_TEXTURE_IMAGE_FRAC, + (height - 1) << G_TEXTURE_IMAGE_FRAC); } -void func_800450C8(u8 *image, s32 width, s32 height) { +void func_800450C8(u8* image, s32 width, s32 height) { // This macro ought to be equivalent to the block of macros below but it doesn't match // See comment above the `gDPLoadBlock` macro - // gDPLoadTextureBlock_4b(gDisplayListHead++, image, G_IM_FMT_I, width, height, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, masks, G_TX_NOLOD, G_TX_NOLOD); + // gDPLoadTextureBlock_4b(gDisplayListHead++, image, G_IM_FMT_I, width, height, 0, G_TX_NOMIRROR | G_TX_CLAMP, + // G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, masks, G_TX_NOLOD, G_TX_NOLOD); s32 masks = func_80043A54(width); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_16b, 1, image); - gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_16b, 0, G_TX_RENDERTILE, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, masks, G_TX_NOLOD); + gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_16b, 0, G_TX_RENDERTILE, G_TX_LOADTILE, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, masks, G_TX_NOLOD); gDPLoadSync(gDisplayListHead++); // The last argument to this macro really should be `CALC_DXT_4b(width)` but that creates a massive diff - gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (((width * height) + 3) >> 2) - 1, ((width / 16) + 2047) / (width / 16)); + gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (((width * height) + 3) >> 2) - 1, + ((width / 16) + 2047) / (width / 16)); gDPPipeSync(gDisplayListHead++); - gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_4b, (((width >> 1) + 7) >> 3), G_TX_RENDERTILE, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, masks, G_TX_NOLOD); - gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width-1) << G_TEXTURE_IMAGE_FRAC, (height-1) << G_TEXTURE_IMAGE_FRAC); + gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_4b, (((width >> 1) + 7) >> 3), G_TX_RENDERTILE, G_TX_RENDERTILE, + 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_MIRROR | G_TX_WRAP, masks, G_TX_NOLOD); + gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width - 1) << G_TEXTURE_IMAGE_FRAC, + (height - 1) << G_TEXTURE_IMAGE_FRAC); } -void rsp_load_texture(u8 *texture, s32 width, s32 height) { +void rsp_load_texture(u8* texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, 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); + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); } -void rsp_load_texture_mask(u8 *texture, s32 width, s32 height, s32 someMask) { +void rsp_load_texture_mask(u8* texture, s32 width, s32 height, s32 someMask) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, 0, - G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, someMask, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, someMask, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); } -UNUSED void func_80045614(u8 *texture, s32 width, s32 height) { - gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, - 0, 0, width - 1, height - 1, 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); +UNUSED void func_80045614(u8* texture, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, 0, 0, width - 1, + height - 1, 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); } -UNUSED void func_80045738(u8 *image1, u8 *image2, s32 width, s32 height) { +UNUSED void func_80045738(u8* image1, u8* image2, s32 width, s32 height) { gDPSetCombineLERP(gDisplayListHead++, 0, 0, 0, TEXEL0, 0, 0, 0, TEXEL1, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED); - gDPLoadMultiBlock(gDisplayListHead++, image2, 0x100, G_TX_RENDERTILE, G_IM_FMT_I, G_IM_SIZ_8b, width, height, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gDPLoadTextureBlock(gDisplayListHead++, image1, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gDPLoadMultiBlock(gDisplayListHead++, image2, 0x100, G_TX_RENDERTILE, G_IM_FMT_I, G_IM_SIZ_8b, width, height, 0, + G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); + gDPLoadTextureBlock(gDisplayListHead++, image1, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, + G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); - gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_8b, (width + 7) >> 3, 0x0100, 1, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);; - gDPSetTileSize(gDisplayListHead++, 1, 0, 0, (width-1) << G_TEXTURE_IMAGE_FRAC, (height-1) << G_TEXTURE_IMAGE_FRAC); + gDPSetTile(gDisplayListHead++, G_IM_FMT_I, G_IM_SIZ_8b, (width + 7) >> 3, 0x0100, 1, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + ; + gDPSetTileSize(gDisplayListHead++, 1, 0, 0, (width - 1) << G_TEXTURE_IMAGE_FRAC, + (height - 1) << G_TEXTURE_IMAGE_FRAC); } -void func_80045B2C(Vtx *arg0) { +void func_80045B2C(Vtx* arg0) { gSPVertex(gDisplayListHead++, arg0, 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); } -void func_80045B74(Vtx *arg0) { +void func_80045B74(Vtx* arg0) { gSPVertex(gDisplayListHead++, arg0, 3, 0); gSPDisplayList(gDisplayListHead++, D_0D006930); } -UNUSED void func_80045BBC(Vec3f arg0, Vec3su arg1, f32 arg2, Vtx *arg3) { +UNUSED void func_80045BBC(Vec3f arg0, Vec3su arg1, f32 arg2, Vtx* arg3) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0078A0); gSPVertex(gDisplayListHead++, arg3, 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); } -UNUSED void func_80045C48(Vec3f arg0, Vec3su arg1, f32 arg2, Vtx *arg3) { +UNUSED void func_80045C48(Vec3f arg0, Vec3su arg1, f32 arg2, Vtx* arg3) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0078D0); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); @@ -417,58 +418,57 @@ UNUSED void func_80045C48(Vec3f arg0, Vec3su arg1, f32 arg2, Vtx *arg3) { gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_80045D0C(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) { +void func_80045D0C(u8* texture, Vtx* arg1, s32 width, s32 arg3, s32 height) { s32 heightIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { load_texture_block_rgba16_mirror(img, width, height); func_80045B2C(&arg1[vertexIndex]); - img += width * height * 2; - vertexIndex += 4; - } + img += width * height * 2; + vertexIndex += 4; + } gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_80045E10(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) { +void func_80045E10(u8* texture, Vtx* arg1, s32 width, s32 arg3, s32 height) { s32 heightIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { load_texture_block_rgba16_mirror(img, width, height); func_80045B2C(&arg1[vertexIndex]); - img += width * (height - 1) * 2; - vertexIndex += 4; - } + img += width * (height - 1) * 2; + vertexIndex += 4; + } gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_80045F18(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height, s32 someMask) { +void func_80045F18(u8* texture, Vtx* arg1, s32 width, s32 arg3, s32 height, s32 someMask) { s32 heightIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { load_texture_block_rgba16_nomirror(img, width, height, someMask); func_80045B2C(&arg1[vertexIndex]); - img += width * (height - 1) * 2; - vertexIndex += 4; - } + img += width * (height - 1) * 2; + vertexIndex += 4; + } gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } //! @todo tlut/texture unconfirmed. This could be texture1 and texture2 -UNUSED void func_80046030(u8 *tlut, u8 *texture, Vtx *arg2, s32 width, s32 arg4, s32 height) { +UNUSED void func_80046030(u8* tlut, u8* texture, Vtx* arg2, s32 width, s32 arg4, s32 height) { s32 var_s0 = 0; - u8 *img1 = tlut; - u8 *img2 = texture; + u8* img1 = tlut; + u8* img2 = texture; s32 temp_lo_2; s32 var; s32 i; - gSPDisplayList(gDisplayListHead++, D_0D008138); for (i = 0; i < arg4 / height; i++) { @@ -484,60 +484,65 @@ UNUSED void func_80046030(u8 *tlut, u8 *texture, Vtx *arg2, s32 width, s32 arg4, gSPDisplayList(gDisplayListHead++, D_0D008120); } -void func_800461A4(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) { +void func_800461A4(u8* texture, Vtx* arg1, s32 width, s32 arg3, s32 height) { s32 heightIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { load_texture_block_rgba32_nomirror(img, width, height); func_80045B2C(&arg1[vertexIndex]); - img += width * height * 4; - vertexIndex += 4; + img += width * height * 4; + vertexIndex += 4; } gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_800462A8(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) { +void func_800462A8(u8* texture, Vtx* arg1, s32 width, s32 arg3, s32 height) { s32 heightIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { load_texture_block_rgba32_nomirror(img, width, height); func_80045B2C(&arg1[vertexIndex]); - img += width * (height - 1) * 4; - vertexIndex += 4; + img += width * (height - 1) * 4; + vertexIndex += 4; } gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_800463B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, UNUSED s32 arg8, s32 arg9) { +void func_800463B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, UNUSED s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007928); func_80045D0C(texture, arg5, arg6, arg7, arg9); } -void func_80046424(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, UNUSED s32 arg8, s32 arg9) { +void func_80046424(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, UNUSED s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007968); func_8004B614(D_801656C0, D_801656D0, D_801656E0, 128, 128, 128, 255); func_80045D0C(texture, arg5, arg6, arg7, arg9); } -UNUSED void func_800464D0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, UNUSED s32 arg8, s32 arg9) { +UNUSED void func_800464D0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, + UNUSED s32 arg8, s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007948); func_80045E10(texture, arg5, arg6, arg7, arg9); } -UNUSED void func_80046544(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, UNUSED s32 arg8, s32 arg9) { +UNUSED void func_80046544(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, + UNUSED s32 arg8, s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D0079A8); func_80045E10(texture, arg5, arg6, arg7, arg9); } -void func_800465B8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, UNUSED s32 arg9, s32 argA) { +void func_800465B8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + UNUSED s32 arg9, s32 argA) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D0079E8); @@ -545,50 +550,57 @@ void func_800465B8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *texture func_80045E10(texture, arg6, arg7, arg8, argA); } -UNUSED void func_80046634(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, UNUSED s32 arg9, s32 argA) { +UNUSED void func_80046634(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + UNUSED s32 arg9, s32 argA) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007948); func_80046030(tlut, texture, arg6, arg7, arg8, argA); } -void func_800466B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx* arg5, s32 arg6, s32 arg7) { +void func_800466B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007948); load_texture_block_rgba16_mirror(texture, arg6, arg7); func_80045B74(arg5); } -UNUSED void func_80046720(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, UNUSED s32 arg8, s32 arg9) { +UNUSED void func_80046720(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, + UNUSED s32 arg8, s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007928); func_800461A4(texture, arg5, arg6, arg7, arg9); } -UNUSED void func_80046794(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, UNUSED s32 arg8, s32 arg9) { +UNUSED void func_80046794(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, + UNUSED s32 arg8, s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007948); func_800462A8(texture, arg5, arg6, arg7, arg9); } -void func_80046808(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 arg8) { +void func_80046808(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, + s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007948); func_80045E10(texture, arg4, arg5, arg6, arg8); } -UNUSED void func_80046874(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 arg8) { +UNUSED void func_80046874(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, + UNUSED s32 arg7, s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0079C8); func_80045E10(texture, arg4, arg5, arg6, arg8); } -void func_800468E0(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 arg8, s32 arg9) { +void func_800468E0(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, + s32 arg8, s32 arg9) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0079C8); func_80045F18(texture, arg4, arg5, arg6, arg8, arg9); } -UNUSED void func_80046954(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 arg8) { +UNUSED void func_80046954(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, + UNUSED s32 arg7, s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0079C8); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); @@ -596,77 +608,78 @@ UNUSED void func_80046954(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *a gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_80046A00(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6) { +void func_80046A00(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007948); load_texture_block_rgba16_mirror(texture, arg5, arg6); func_80045B74(arg4); } -UNUSED void func_80046A68(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 arg8) { +UNUSED void func_80046A68(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, + UNUSED s32 arg7, s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0079C8); func_800462A8(texture, arg4, arg5, arg6, arg8); } -UNUSED void func_80046AD4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture) { +UNUSED void func_80046AD4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture) { func_800464D0(arg0, arg1, arg2, arg3, texture, common_vtx_player_minimap_icon, 8, 8, 8, 8); } -UNUSED void func_80046B38(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture) { +UNUSED void func_80046B38(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture) { func_800464D0(arg0, arg1, arg2, arg3, texture, common_vtx_rectangle, 16, 16, 16, 16); } -UNUSED void func_80046B9C(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture) { +UNUSED void func_80046B9C(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture) { func_80046808(arg0, arg1, arg2, texture, common_vtx_rectangle, 16, 16, 16, 16); } -UNUSED void func_80046BEC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_80046BEC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_800466B0(arg0, arg1, arg2, arg3, texture, arg5, 16, 16); } -UNUSED void func_80046C3C(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4) { +UNUSED void func_80046C3C(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4) { func_80046A00(arg0, arg1, arg2, texture, arg4, 16, 16); } -UNUSED void func_80046C78(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture) { +UNUSED void func_80046C78(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture) { func_800464D0(arg0, arg1, arg2, arg3, texture, D_0D005AE0, 32, 32, 32, 32); } -UNUSED void func_80046CDC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture) { +UNUSED void func_80046CDC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture) { func_800464D0(arg0, arg1, arg2, arg3, texture, D_0D005FB0, 64, 32, 64, 32); } -UNUSED void func_80046D40(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture) { +UNUSED void func_80046D40(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture) { func_80046808(arg0, arg1, arg2, texture, D_0D005FB0, 64, 32, 64, 32); } -UNUSED void func_80046D90(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture) { - Vtx *vtx = (Vtx *) LOAD_ASSET(common_vtx_hedgehog); +UNUSED void func_80046D90(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture) { + Vtx* vtx = (Vtx*) LOAD_ASSET(common_vtx_hedgehog); func_800464D0(arg0, arg1, arg2, arg3, texture, vtx, 64, 64, 64, 32); } -UNUSED void func_80046DF4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *texture) { - Vtx *vtx = (Vtx *) LOAD_ASSET(common_vtx_hedgehog); +UNUSED void func_80046DF4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8* texture) { + Vtx* vtx = (Vtx*) LOAD_ASSET(common_vtx_hedgehog); func_800465B8(arg0, arg1, arg2, arg3, arg4, texture, vtx, 64, 64, 64, 32); } -void load_texture_and_tlut(u8 *tlut, u8 *texture, s32 width, s32 height) { +void load_texture_and_tlut(u8* tlut, u8* texture, s32 width, s32 height) { gSPDisplayList(gDisplayListHead++, D_0D007D78); gDPLoadTLUT_pal256(gDisplayListHead++, tlut); rsp_load_texture(texture, width, height); } -void func_80046F60(u8 *tlut, u8 *arg1, s32 arg2, s32 arg3, s32 arg4) { +void func_80046F60(u8* tlut, u8* arg1, s32 arg2, s32 arg3, s32 arg4) { gSPDisplayList(gDisplayListHead++, D_0D007D78); gDPLoadTLUT_pal256(gDisplayListHead++, tlut); rsp_load_texture_mask(arg1, arg2, arg3, arg4); } -void func_80047068(u8 *tlut, u8 *texture, Vtx *arg2, UNUSED s32 arg3, s32 arg4, s32 width, s32 height) { +void func_80047068(u8* tlut, u8* texture, Vtx* arg2, UNUSED s32 arg3, s32 arg4, s32 width, s32 height) { s32 heightIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; gDPLoadTLUT_pal256(gDisplayListHead++, tlut); for (heightIndex = 0; heightIndex < arg4 / height; heightIndex++) { @@ -679,10 +692,11 @@ void func_80047068(u8 *tlut, u8 *texture, Vtx *arg2, UNUSED s32 arg3, s32 arg4, gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void draw_rectangle_texture_overlap(u8 *tlut, u8 *texture, Vtx *arg2, UNUSED s32 w, s32 height, s32 width, s32 heighthalf) { +void draw_rectangle_texture_overlap(u8* tlut, u8* texture, Vtx* arg2, UNUSED s32 w, s32 height, s32 width, + s32 heighthalf) { s32 heightIndex; s32 vertexIndex = 0; - u8 *img = (u8 *) LOAD_ASSET(texture); + u8* img = (u8*) LOAD_ASSET(texture); gDPLoadTLUT_pal256(gDisplayListHead++, tlut); for (heightIndex = 0; heightIndex < height / heighthalf; heightIndex++) { @@ -695,10 +709,10 @@ void draw_rectangle_texture_overlap(u8 *tlut, u8 *texture, Vtx *arg2, UNUSED s32 gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_8004747C(u8 *tlut, u8 *texture, Vtx *arg2, UNUSED s32 arg3, s32 arg4, s32 width, s32 height, s32 someMask) { +void func_8004747C(u8* tlut, u8* texture, Vtx* arg2, UNUSED s32 arg3, s32 arg4, s32 width, s32 height, s32 someMask) { s32 heightIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; gDPLoadTLUT_pal256(gDisplayListHead++, tlut); for (heightIndex = 0; heightIndex < arg4 / height; heightIndex++) { @@ -711,10 +725,10 @@ void func_8004747C(u8 *tlut, u8 *texture, Vtx *arg2, UNUSED s32 arg3, s32 arg4, gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_8004768C(u8 *tlut, u8 *texture, Vtx *arg2, s32 arg3, s32 width, s32 height) { +void func_8004768C(u8* tlut, u8* texture, Vtx* arg2, s32 arg3, s32 width, s32 height) { s32 heightIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; gDPLoadTLUT_pal256(gDisplayListHead++, tlut); for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { @@ -728,174 +742,201 @@ void func_8004768C(u8 *tlut, u8 *texture, Vtx *arg2, s32 arg3, s32 width, s32 he gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_8004788C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_8004788C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007CB8); func_80047068(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_80047910(s32 x, s32 y, u16 angle, f32 size, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_80047910(s32 x, s32 y, u16 angle, f32 size, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, s32 arg9, + s32 argA) { func_80042330(x, y, angle, size); gSPDisplayList(gDisplayListHead++, D_0D007CD8); draw_rectangle_texture_overlap(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_80047994(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_80047994(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007CF8); draw_rectangle_texture_overlap(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_80047A18(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_80047A18(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007D18); func_80047068(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_80047A9C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_80047A9C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007D38); draw_rectangle_texture_overlap(tlut, texture, arg6, arg7, arg8, arg9, argA); } -UNUSED void func_80047B20(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9) { +UNUSED void func_80047B20(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007D38); func_8004768C(tlut, texture, arg6, arg7, arg8, arg9); } -void func_80047B9C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *tlut, u8 *texture, Vtx *arg7, s32 arg8, s32 arg9, s32 argA, s32 argB) { +void func_80047B9C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8* tlut, u8* texture, Vtx* arg7, s32 arg8, + s32 arg9, s32 argA, s32 argB) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007DB8); set_transparency(arg4); func_80047068(tlut, texture, arg7, arg8, arg9, argA, argB); } -UNUSED void func_80047C28(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *tlut, u8 *texture, Vtx *arg7, s32 arg8, s32 arg9, s32 argA, s32 argB) { +UNUSED void func_80047C28(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8* tlut, u8* texture, Vtx* arg7, s32 arg8, + s32 arg9, s32 argA, s32 argB) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007DD8); set_transparency(arg4); draw_rectangle_texture_overlap(tlut, texture, arg7, arg8, arg9, argA, argB); } -void func_80047CB4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *tlut, u8 *texture, Vtx *arg7, s32 arg8, s32 arg9, s32 argA, s32 argB) { +void func_80047CB4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8* tlut, u8* texture, Vtx* arg7, s32 arg8, + s32 arg9, s32 argA, s32 argB) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007E38); set_transparency(arg4); func_80047068(tlut, texture, arg7, arg8, arg9, argA, argB); } -UNUSED void func_80047D40(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *tlut, u8 *texture, Vtx *arg7, s32 arg8, s32 arg9, s32 argA, s32 argB) { +UNUSED void func_80047D40(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8* tlut, u8* texture, Vtx* arg7, s32 arg8, + s32 arg9, s32 argA, s32 argB) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007E58); set_transparency(arg4); draw_rectangle_texture_overlap(tlut, texture, arg7, arg8, arg9, argA, argB); } -UNUSED void func_80047DCC(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +UNUSED void func_80047DCC(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, + s32 arg8, s32 arg9) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007CB8); func_80047068(tlut, texture, arg5, arg6, arg7, arg8, arg9); } -void func_80047E48(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_80047E48(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007CD8); draw_rectangle_texture_overlap(tlut, texture, arg5, arg6, arg7, arg8, arg9); } -UNUSED void func_80047EC4(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +UNUSED void func_80047EC4(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, + s32 arg8, s32 arg9) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007D18); func_80047068(tlut, texture, arg5, arg6, arg7, arg8, arg9); } -void func_80047F40(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_80047F40(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007D38); draw_rectangle_texture_overlap(tlut, texture, arg5, arg6, arg7, arg8, arg9); } -UNUSED void func_80047FBC(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +UNUSED void func_80047FBC(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, + s32 arg8, s32 arg9) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007D58); draw_rectangle_texture_overlap(tlut, texture, arg5, arg6, arg7, arg8, arg9); } -UNUSED void func_80048038(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +UNUSED void func_80048038(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, + s32 arg8, s32 arg9) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007D98); func_80047068(tlut, texture, arg5, arg6, arg7, arg8, arg9); } -void draw_2d_texture_at(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 width, s32 height, s32 width2, s32 height2) { +void draw_2d_texture_at(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5, s32 width, s32 height, + s32 width2, s32 height2) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007D78); draw_rectangle_texture_overlap(tlut, texture, arg5, width, height, width2, height2); } -void func_80048130(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_80048130(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007D78); func_8004747C(tlut, texture, arg5, arg6, arg7, arg8, arg9, argA); } -UNUSED void func_800481B4(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8) { +UNUSED void func_800481B4(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, + s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007D78); func_8004768C(tlut, texture, arg5, arg6, arg7, arg8); } -UNUSED void func_80048228(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +UNUSED void func_80048228(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, + s32 arg8, s32 arg9, s32 argA) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007DB8); set_transparency(arg3); func_80047068(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_800482AC(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_800482AC(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007DD8); set_transparency(arg3); draw_rectangle_texture_overlap(tlut, texture, arg6, arg7, arg8, arg9, argA); } -UNUSED void func_80048330(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +UNUSED void func_80048330(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, + s32 arg8, s32 arg9, s32 argA) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007E38); set_transparency(arg3); func_80047068(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_800483B4(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_800483B4(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007E58); set_transparency(arg3); draw_rectangle_texture_overlap(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_80048438(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_80048438(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007DF8); set_transparency(arg3); func_80047068(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_800484BC(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_800484BC(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007E18); set_transparency(arg3); draw_rectangle_texture_overlap(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_80048540(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_80048540(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007E98); set_transparency(arg3); draw_rectangle_texture_overlap(tlut, texture, arg6, arg7, arg8, arg9, argA); } -void func_800485C4(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA) { +void func_800485C4(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6, s32 arg7, s32 arg8, + s32 arg9, s32 argA) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007E98); gDPSetAlphaCompare(gDisplayListHead++, G_AC_DITHER); @@ -907,103 +948,103 @@ void func_800485C4(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *te gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE); } -UNUSED void func_800486B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_800486B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_8004788C(arg0, arg1, arg2, arg3, tlut, texture, arg6, 24, 48, 24, 48); } -UNUSED void func_80048718(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048718(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_8004788C(arg0, arg1, arg2, arg3, tlut, texture, arg6, 32, 32, 32, 32); } -UNUSED void func_80048780(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048780(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_80048540(arg0, arg1, arg2, arg3, tlut, texture, arg6, 48, 48, 48, 40); } -UNUSED void func_800487DC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_800487DC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_8004788C(arg0, arg1, arg2, arg3, tlut, texture, arg6, 48, 48, 48, 48); } -UNUSED void func_80048844(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048844(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_8004788C(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 32, 64, 32); } -UNUSED void func_800488AC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_800488AC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_8004788C(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 64, 64, 32); } -UNUSED void func_80048914(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048914(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_80047910(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 64, 64, 32); } -UNUSED void func_8004897C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_8004897C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_80047994(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 64, 64, 32); } -UNUSED void func_800489E4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_800489E4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_80047A18(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 64, 64, 32); } -UNUSED void func_80048A4C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048A4C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_80047A9C(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 64, 64, 32); } -UNUSED void func_80048AB4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *tlut, u8 *texture, Vtx *arg7) { +UNUSED void func_80048AB4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8* tlut, u8* texture, Vtx* arg7) { func_80047B9C(arg0, arg1, arg2, arg3, arg4, tlut, texture, arg7, 64, 64, 64, 32); } -UNUSED void func_80048B24(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 *tlut, u8 *texture, Vtx *arg7) { +UNUSED void func_80048B24(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8* tlut, u8* texture, Vtx* arg7) { func_80047CB4(arg0, arg1, arg2, arg3, arg4, tlut, texture, arg7, 64, 64, 64, 32); } -UNUSED void func_80048B94(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5) { +UNUSED void func_80048B94(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5) { func_80047E48(arg0, arg1, arg2, tlut, texture, arg5, 64, 64, 64, 32); } -UNUSED void func_80048BE8(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5) { +UNUSED void func_80048BE8(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5) { func_80047F40(arg0, arg1, arg2, tlut, texture, arg5, 64, 64, 64, 32); } -UNUSED void func_80048C3C(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5) { +UNUSED void func_80048C3C(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5) { draw_2d_texture_at(arg0, arg1, arg2, tlut, texture, arg5, 64, 64, 64, 32); } -UNUSED void func_80048C90(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048C90(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_800482AC(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 64, 64, 32); } -UNUSED void func_80048CEC(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048CEC(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_800483B4(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 64, 64, 32); } -UNUSED void func_80048D48(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048D48(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_800484BC(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 64, 64, 32); } -UNUSED void func_80048DA4(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048DA4(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_80048540(arg0, arg1, arg2, arg3, tlut, texture, arg6, 64, 64, 64, 32); } -UNUSED void func_80048E00(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048E00(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_80047910(arg0, arg1, arg2, arg3, tlut, texture, arg6, 72, 48, 72, 24); } -UNUSED void func_80048E68(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048E68(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_80047A18(arg0, arg1, arg2, arg3, tlut, texture, arg6, 72, 48, 72, 24); } -UNUSED void func_80048ED0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { +UNUSED void func_80048ED0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* tlut, u8* texture, Vtx* arg6) { func_80047A9C(arg0, arg1, arg2, arg3, tlut, texture, arg6, 72, 48, 72, 24); } -UNUSED void func_80048F38(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5) { +UNUSED void func_80048F38(Vec3f arg0, Vec3su arg1, f32 arg2, u8* tlut, u8* texture, Vtx* arg5) { draw_2d_texture_at(arg0, arg1, arg2, tlut, texture, arg5, 72, 48, 72, 24); } -void func_80048F8C(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 height) { +void func_80048F8C(u8* texture, Vtx* arg1, s32 arg2, s32 arg3, s32 width, s32 height) { s32 heightIndex; s32 widthIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) { @@ -1017,11 +1058,11 @@ void func_80048F8C(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_80049130(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 height) { +void func_80049130(u8* texture, Vtx* arg1, s32 arg2, s32 arg3, s32 width, s32 height) { s32 heightIndex; s32 widthIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) { @@ -1035,11 +1076,11 @@ void func_80049130(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_800492D4(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 height) { +void func_800492D4(u8* texture, Vtx* arg1, s32 arg2, s32 arg3, s32 width, s32 height) { s32 heightIndex; s32 widthIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) { @@ -1053,11 +1094,11 @@ void func_800492D4(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_80049478(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 height) { +void func_80049478(u8* texture, Vtx* arg1, s32 arg2, s32 arg3, s32 width, s32 height) { s32 heightIndex; s32 widthIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) { @@ -1071,11 +1112,11 @@ void func_80049478(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_8004961C(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 height) { +void func_8004961C(u8* texture, Vtx* arg1, s32 arg2, s32 arg3, s32 width, s32 height) { s32 i; s32 j; s32 var_s2 = 0; - u8 *img = texture; + u8* img = texture; for (i = 0; i < arg3 / height; i++) { for (j = 0; j < arg2 / width; j++) { @@ -1091,11 +1132,11 @@ void func_8004961C(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF); } -void func_800497CC(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 height) { +void func_800497CC(u8* texture, Vtx* arg1, s32 arg2, s32 arg3, s32 width, s32 height) { s32 heightIndex; s32 widthIndex; s32 vertexIndex = 0; - u8 *img = texture; + u8* img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) { @@ -1109,11 +1150,11 @@ void func_800497CC(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_80049970(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 height) { +void func_80049970(u8* texture, Vtx* arg1, s32 arg2, s32 arg3, s32 width, s32 height) { s32 i; s32 j; s32 var_s2 = 0; - u8 *img = texture; + u8* img = texture; for (i = 0; i < arg3 / height; i++) { for (j = 0; j < arg2 / width; j++) { @@ -1127,144 +1168,164 @@ void func_80049970(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF); } -void func_80049B20(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_80049B20(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A40); func_80048F8C(texture, arg5, arg6, arg7, arg8, arg9); } -UNUSED void func_80049B9C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +UNUSED void func_80049B9C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A40); func_80049130(texture, arg5, arg6, arg7, arg8, arg9); } -void func_80049C18(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_80049C18(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A40); func_800492D4(texture, arg5, arg6, arg7, arg8, arg9); } -void func_80049C94(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_80049C94(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A60); func_800492D4(texture, arg5, arg6, arg7, arg8, arg9); } -void func_80049D10(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_80049D10(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A80); func_800492D4(texture, arg5, arg6, arg7, arg8, arg9); } -void func_80049D8C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_80049D8C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007AA0); func_800492D4(texture, arg5, arg6, arg7, arg8, arg9); } -UNUSED void func_80049E08(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8 *texture, Vtx *arg9, s32 argA, s32 argB, s32 argC, s32 argD) { +UNUSED void func_80049E08(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8* texture, + Vtx* arg9, s32 argA, s32 argB, s32 argC, s32 argD) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A40); func_8004B35C(red, green, blue, alpha); func_800492D4(texture, arg9, argA, argB, argC, argD); } -UNUSED void func_80049E98(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8 *texture, Vtx *arg9, s32 argA, s32 argB, s32 argC, s32 argD) { +UNUSED void func_80049E98(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8* texture, + Vtx* arg9, s32 argA, s32 argB, s32 argC, s32 argD) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A60); func_8004B35C(red, green, blue, alpha); func_800492D4(texture, arg9, argA, argB, argC, argD); } -UNUSED void func_80049F28(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8 *texture, Vtx *arg9, s32 argA, s32 argB, s32 argC, s32 argD) { +UNUSED void func_80049F28(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8* texture, + Vtx* arg9, s32 argA, s32 argB, s32 argC, s32 argD) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007B00); func_8004B35C(red, green, blue, alpha); func_800492D4(texture, arg9, argA, argB, argC, argD); } -UNUSED void func_80049FB8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +UNUSED void func_80049FB8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A40); func_80049478(texture, arg5, arg6, arg7, arg8, arg9); } -UNUSED void func_8004A034(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +UNUSED void func_8004A034(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A60); func_80049478(texture, arg5, arg6, arg7, arg8, arg9); } -void func_8004A0B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_8004A0B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A40); func_8004961C(texture, arg5, arg6, arg7, arg8, arg9); } -UNUSED void func_8004A12C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8 *texture, Vtx *arg9, s32 argA, s32 argB, s32 argC, s32 argD) { +UNUSED void func_8004A12C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8* texture, + Vtx* arg9, s32 argA, s32 argB, s32 argC, s32 argD) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A60); func_8004B35C(red, green, blue, alpha); func_8004961C(texture, arg9, argA, argB, argC, argD); } -UNUSED void func_8004A1BC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +UNUSED void func_8004A1BC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A40); gDPSetCombineLERP(gDisplayListHead++, 1, 0, SHADE, 0, 0, 0, 0, TEXEL0, 1, 0, SHADE, 0, 0, 0, 0, TEXEL0); func_80049970(texture, arg5, arg6, arg7, arg8, arg9); } -void func_8004A258(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_8004A258(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5, s32 arg6, s32 arg7, s32 arg8, + s32 arg9) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A60); gDPSetCombineLERP(gDisplayListHead++, 1, 0, SHADE, 0, 0, 0, 0, TEXEL0, 1, 0, SHADE, 0, 0, 0, 0, TEXEL0); func_80049970(texture, arg5, arg6, arg7, arg8, arg9); } -void func_8004A2F4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8 *texture, Vtx *arg9, s32 argA, s32 argB, s32 argC, s32 argD) { +void func_8004A2F4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8* texture, + Vtx* arg9, s32 argA, s32 argB, s32 argC, s32 argD) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A40); func_8004B414(red, green, blue, alpha); func_80049970(texture, arg9, argA, argB, argC, argD); } -void func_8004A384(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8 *texture, Vtx *arg9, s32 argA, s32 argB, s32 argC, s32 argD) { +void func_8004A384(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 red, s32 green, s32 blue, s32 alpha, u8* texture, + Vtx* arg9, s32 argA, s32 argB, s32 argC, s32 argD) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007A60); func_8004B414(red, green, blue, alpha); func_80049970(texture, arg9, argA, argB, argC, argD); } -void func_8004A414(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8) { +void func_8004A414(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007A40); func_800492D4(texture, arg4, arg5, arg6, arg7, arg8); } -UNUSED void func_8004A488(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8) { +UNUSED void func_8004A488(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, s32 arg7, + s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007A60); func_800492D4(texture, arg4, arg5, arg6, arg7, arg8); } -UNUSED void func_8004A4FC(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8) { +UNUSED void func_8004A4FC(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, s32 arg7, + s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007AC0); func_800492D4(texture, arg4, arg5, arg6, arg7, arg8); } -UNUSED void func_8004A570(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8) { +UNUSED void func_8004A570(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, s32 arg7, + s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007AE0); func_800492D4(texture, arg4, arg5, arg6, arg7, arg8); } -UNUSED void func_8004A5E4(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4) { +UNUSED void func_8004A5E4(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4) { func_8004A414(arg0, arg1, arg2, texture, arg4, 16, 16, 16, 16); } -void func_8004A630(Collision *arg0, Vec3f arg1, f32 arg2) { +void func_8004A630(Collision* arg0, Vec3f arg1, f32 arg2) { if (func_80041924(arg0, arg1) != 0) { D_80183E50[0] = arg1[0]; D_80183E50[1] = calculate_surface_height(arg1[0], 0.0f, arg1[2], arg0->meshIndexZX) + 0.8; @@ -1275,9 +1336,10 @@ void func_8004A630(Collision *arg0, Vec3f arg1, f32 arg2) { } void func_8004A6EC(s32 objectIndex, f32 scale) { - Object *object; + Object* object; - if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && (is_obj_flag_status_active(objectIndex, 0x00800000) != 0)) { + if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && + (is_obj_flag_status_active(objectIndex, 0x00800000) != 0)) { object = &gObjectList[objectIndex]; D_80183E50[0] = object->pos[0]; D_80183E50[1] = object->surfaceHeight + 0.8; @@ -1288,7 +1350,7 @@ void func_8004A6EC(s32 objectIndex, f32 scale) { } void func_8004A7AC(s32 objectIndex, f32 arg1) { - Object *object; + Object* object; if (is_obj_flag_status_active(objectIndex, 0x00000020) != 0) { object = &gObjectList[objectIndex]; @@ -1305,16 +1367,18 @@ void func_8004A7AC(s32 objectIndex, f32 arg1) { void func_8004A870(s32 objectIndex, f32 arg1) { Mat4 sp30; - Object *object; + Object* object; - if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && (is_obj_flag_status_active(objectIndex, 0x00800000) != 0)) { + if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && + (is_obj_flag_status_active(objectIndex, 0x00800000) != 0)) { object = &gObjectList[objectIndex]; D_80183E50[0] = object->pos[0]; D_80183E50[1] = object->surfaceHeight + 0.8; D_80183E50[2] = object->pos[2]; set_transform_matrix(sp30, object->unk_01C, D_80183E50, 0U, arg1); convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], sp30); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gDisplayListHead++, D_0D007B98); } } @@ -1324,78 +1388,83 @@ void func_8004A9B8(f32 arg0) { gSPDisplayList(gDisplayListHead++, D_0D007C10); } -UNUSED void func_8004AA10(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8) { +UNUSED void func_8004AA10(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4, s32 arg5, s32 arg6, s32 arg7, + s32 arg8) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007AE0); func_8004B6C4(D_80165860, D_8016586C, D_80165878); func_800497CC(texture, arg4, arg5, arg6, arg7, arg8); } -UNUSED void func_8004AAA0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_8004AAA0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_80049B20(arg0, arg1, arg2, arg3, texture, arg5, 16, 16, 16, 16); } -UNUSED void func_8004AB00(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_8004AB00(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_80049C18(arg0, arg1, arg2, arg3, texture, arg5, 16, 16, 16, 16); } -UNUSED void func_8004AB60(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *arg4, Vtx *arg5) { +UNUSED void func_8004AB60(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* arg4, Vtx* arg5) { func_8004A0B0(arg0, arg1, arg2, arg3, arg4, arg5, 16, 16, 16, 16); } -UNUSED void func_8004ABC0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_8004ABC0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_80049B20(arg0, arg1, arg2, arg3, texture, arg5, 32, 32, 32, 32); } -UNUSED void func_8004AC20(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *arg4, Vtx *arg5) { +UNUSED void func_8004AC20(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* arg4, Vtx* arg5) { func_80049C18(arg0, arg1, arg2, arg3, arg4, arg5, 32, 32, 32, 32); } -UNUSED void func_8004AC80(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *arg4, Vtx *arg5) { +UNUSED void func_8004AC80(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* arg4, Vtx* arg5) { func_8004A0B0(arg0, arg1, arg2, arg3, arg4, arg5, 32, 32, 32, 32); } -UNUSED void func_8004ACE0(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4) { +UNUSED void func_8004ACE0(Vec3f arg0, Vec3su arg1, f32 arg2, u8* texture, Vtx* arg4) { func_8004A414(arg0, arg1, arg2, texture, arg4, 32, 32, 32, 32); } -UNUSED void func_8004AD2C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_8004AD2C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_80049B20(arg0, arg1, arg2, arg3, texture, arg5, 64, 32, 64, 32); } -UNUSED void func_8004AD8C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *arg4, Vtx *arg5) { +UNUSED void func_8004AD8C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* arg4, Vtx* arg5) { func_80049C18(arg0, arg1, arg2, arg3, arg4, arg5, 64, 32, 64, 32); } -UNUSED void func_8004ADEC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *arg4, Vtx *arg5) { +UNUSED void func_8004ADEC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* arg4, Vtx* arg5) { func_80049C94(arg0, arg1, arg2, arg3, arg4, arg5, 64, 32, 64, 32); } -UNUSED void func_8004AE4C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_8004AE4C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_80049D10(arg0, arg1, arg2, arg3, texture, arg5, 64, 32, 64, 32); } -UNUSED void func_8004AEAC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_8004AEAC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_80049D8C(arg0, arg1, arg2, arg3, texture, arg5, 64, 32, 64, 32); } -UNUSED void func_8004AF0C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_8004AF0C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_80049C18(arg0, arg1, arg2, arg3, texture, arg5, 64, 64, 64, 64); } -UNUSED void func_8004AF6C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_8004AF6C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_80049B20(arg0, arg1, arg2, arg3, texture, arg5, 64, 64, 64, 32); } -UNUSED void func_8004AFCC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx *arg5) { +UNUSED void func_8004AFCC(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8* texture, Vtx* arg5) { func_80049C18(arg0, arg1, arg2, arg3, texture, arg5, 64, 96, 64, 48); } UNUSED void func_8004B02C(void) { - gDPSetRenderMode(gDisplayListHead++, AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)); + gDPSetRenderMode(gDisplayListHead++, + AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL | + GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA), + AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | CVG_X_ALPHA | FORCE_BL | + GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)); } -void func_8004B05C(u8 *tlut) { +void func_8004B05C(u8* tlut) { gDPLoadTLUT_pal256(gDisplayListHead++, tlut); gDPLoadSync(gDisplayListHead++); gDPSetTexturePersp(gDisplayListHead++, G_TP_NONE); @@ -1425,7 +1494,8 @@ void set_transparency(s32 alpha) { } void func_8004B310(s32 alpha) { - gDPSetCombineLERP(gDisplayListHead++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gDisplayListHead++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, + PRIMITIVE, 0); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, alpha); } @@ -1440,7 +1510,8 @@ void func_8004B3C8(s32 alpha) { } void func_8004B414(s32 red, s32 green, s32 blue, s32 alpha) { - gDPSetCombineLERP(gDisplayListHead++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gDisplayListHead++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, + PRIMITIVE, 0); gDPSetPrimColor(gDisplayListHead++, 0, 0, red, green, blue, alpha); } @@ -1450,24 +1521,28 @@ void func_8004B480(s32 red, s32 green, s32 blue) { } UNUSED void func_8004B4E8(s32 red, s32 green, s32 blue, s32 alpha) { - gDPSetCombineLERP(gDisplayListHead++, 1, 0, SHADE, PRIMITIVE, 0, 0, 0, TEXEL0, 1, 0, SHADE, PRIMITIVE, 0, 0, 0, TEXEL0); + gDPSetCombineLERP(gDisplayListHead++, 1, 0, SHADE, PRIMITIVE, 0, 0, 0, TEXEL0, 1, 0, SHADE, PRIMITIVE, 0, 0, 0, + TEXEL0); gDPSetPrimColor(gDisplayListHead++, 0, 0, red, green, blue, alpha); } UNUSED void func_8004B554(s32 alpha) { - gDPSetCombineLERP(gDisplayListHead++, 0, 0, 0, SHADE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, SHADE, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gDisplayListHead++, 0, 0, 0, SHADE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, SHADE, TEXEL0, 0, PRIMITIVE, + 0); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0xFF, 0xFF, 0xFF, alpha); } UNUSED void func_8004B5A8(s32 red, s32 green, s32 blue, s32 alpha) { gDPSetPrimColor(gDisplayListHead++, 0, 0, red, green, blue, alpha); - gDPSetCombineLERP(gDisplayListHead++, 1, PRIMITIVE_ALPHA, TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0, 1, PRIMITIVE_ALPHA, TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0); + gDPSetCombineLERP(gDisplayListHead++, 1, PRIMITIVE_ALPHA, TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0, 1, PRIMITIVE_ALPHA, + TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0); } void func_8004B614(s32 primRed, s32 primGreen, s32 primBlue, s32 envRed, s32 envGreen, s32 envBlue, s32 primAlpha) { gDPSetPrimColor(gDisplayListHead++, 0, 0, primRed, primGreen, primBlue, primAlpha); gDPSetEnvColor(gDisplayListHead++, envRed, envGreen, envBlue, 0xFF); - gDPSetCombineLERP(gDisplayListHead++, 1, ENVIRONMENT, TEXEL0, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0, 1, ENVIRONMENT, TEXEL0, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0); + gDPSetCombineLERP(gDisplayListHead++, 1, ENVIRONMENT, TEXEL0, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0, 1, ENVIRONMENT, + TEXEL0, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0); } void func_8004B6C4(s32 red, s32 green, s32 blue) { @@ -1478,7 +1553,8 @@ void func_8004B6C4(s32 red, s32 green, s32 blue) { void func_8004B72C(s32 primRed, s32 primGreen, s32 primBlue, s32 envRed, s32 envGreen, s32 envBlue, s32 primAlpha) { gDPSetPrimColor(gDisplayListHead++, 0, 0, primRed, primGreen, primBlue, primAlpha); gDPSetEnvColor(gDisplayListHead++, envRed, envGreen, envBlue, 0xFF); - gDPSetCombineLERP(gDisplayListHead++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); + gDPSetCombineLERP(gDisplayListHead++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, + PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); } void func_8004B7DC(s32 x, s32 y, s32 width, s32 height, s32 arg4, s32 arg5, s32 arg6) { @@ -1493,10 +1569,12 @@ void func_8004B7DC(s32 x, s32 y, s32 width, s32 height, s32 arg4, s32 arg5, s32 if (arg6 == 0) { //! @todo Update to F3DEX. Uses OLD definition for gspTextureRectangle. - gSPTextureRectangle(gDisplayListHead++, xl, yl, xh, yh, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 4 << 10, 1 << 10); + gSPTextureRectangle(gDisplayListHead++, xl, yl, xh, yh, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 4 << 10, + 1 << 10); return; } - gSPTextureRectangle(gDisplayListHead++, xl, yl, xh2, yh2, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 1 << 10, 1 << 10); + gSPTextureRectangle(gDisplayListHead++, xl, yl, xh2, yh2, G_TX_RENDERTILE, arg4 << 5, (arg5 << 5), 1 << 10, + 1 << 10); } void func_8004B950(s32 x, s32 y, s32 width, s32 height, s32 arg4) { @@ -1582,7 +1660,6 @@ void func_8004BA98(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s } UNUSED void func_8004BB34(void) { - } void func_8004BB3C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, f32 arg4) { @@ -1620,14 +1697,19 @@ void func_8004BB3C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, f32 arg4) { } } -UNUSED void func_8004BD14(s32 x, s32 y, u32 width, u32 height, s32 alpha, u8 *texture1, u8 *texture2) { +UNUSED void func_8004BD14(s32 x, s32 y, u32 width, u32 height, s32 alpha, u8* texture1, u8* texture2) { gSPDisplayList(gDisplayListHead++, D_0D007F38); gSPDisplayList(gDisplayListHead++, D_0D008138); gDPSetTextureLOD(gDisplayListHead++, G_TL_TILE); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, alpha); - gDPSetCombineLERP(gDisplayListHead++, TEXEL1, TEXEL0, PRIMITIVE_ALPHA, TEXEL0, TEXEL1, TEXEL0, PRIMITIVE, TEXEL0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED); - gDPLoadMultiTile(gDisplayListHead++, texture1, 0, G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, 0, width - 1, height - 1, 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); - gDPLoadMultiTile(gDisplayListHead++, texture2, 256, G_TX_RENDERTILE+1, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, 0, width - 1, height - 1, 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); + gDPSetCombineLERP(gDisplayListHead++, TEXEL1, TEXEL0, PRIMITIVE_ALPHA, TEXEL0, TEXEL1, TEXEL0, PRIMITIVE, TEXEL0, 0, + 0, 0, COMBINED, 0, 0, 0, COMBINED); + gDPLoadMultiTile(gDisplayListHead++, texture1, 0, G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, 0, + width - 1, height - 1, 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); + gDPLoadMultiTile(gDisplayListHead++, texture2, 256, G_TX_RENDERTILE + 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, + 0, 0, width - 1, height - 1, 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_8004B950(x, y, width, height, 2); gSPDisplayList(gDisplayListHead++, D_0D008120); } @@ -1650,24 +1732,23 @@ void func_8004C148(s16 arg0, s16 arg1, s16 arg2, u16 red, u16 green, u16 blue, u func_8004B97C(arg0, arg1, 1, arg2, 1); } -void func_8004C268(u32 arg0, u32 arg1, u8 *texture, u32 width, u32 arg4, u32 height, s32 arg6) -{ +void func_8004C268(u32 arg0, u32 arg1, u8* texture, u32 width, u32 arg4, u32 height, s32 arg6) { s32 i; - u8 *img2; + u8* img2; arg0 -= (width / 2); arg1 -= (arg4 / 2); img2 = texture; - for (i = 0; (u32)i < (arg4 / height); i++) { + for (i = 0; (u32) i < (arg4 / height); i++) { load_texture_block_rgba16_mirror(img2, width, height); func_8004B97C(arg0, arg1, width, height, arg6); - //! @todo fakematch? - #ifdef AVOID_UB +//! @todo fakematch? +#ifdef AVOID_UB img2 += (width * height) * 2; - #else +#else img2 += (width * height) * 2 ^ ((arg4 / height) * 0); - #endif +#endif arg1 += height; } } @@ -1678,7 +1759,7 @@ UNUSED void func_8004C354() { UNUSED void func_8004C35C() { } -void draw_hud_2d_texture(s32 x, s32 y, u32 width, u32 height, u8 *texture) { +void draw_hud_2d_texture(s32 x, s32 y, u32 width, u32 height, u8* texture) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); @@ -1687,7 +1768,7 @@ void draw_hud_2d_texture(s32 x, s32 y, u32 width, u32 height, u8 *texture) { gSPDisplayList(gDisplayListHead++, D_0D007EB8); } -void func_8004C450(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { +void func_8004C450(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8* texture) { gSPDisplayList(gDisplayListHead++, D_0D007F38); func_8004B614(D_801656C0, D_801656D0, D_801656E0, 0x80, 0x80, 0x80, 0xFF); @@ -1696,7 +1777,7 @@ void func_8004C450(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { gSPDisplayList(gDisplayListHead++, D_0D007EB8); } -UNUSED void func_8004C53C(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { +UNUSED void func_8004C53C(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8* texture) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D007EF8); @@ -1706,7 +1787,7 @@ UNUSED void func_8004C53C(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { gSPDisplayList(gDisplayListHead++, D_0D007EB8); } -void func_8004C628(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { +void func_8004C628(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8* texture) { gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); @@ -1717,8 +1798,9 @@ void func_8004C628(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { #ifdef NON_MATCHING // https://decomp.me/scratch/TqXqn -// There's a weird fakematch concerning `athing`, don't know that to make of. Can't quite get it over the finish line though -void func_8004C6FC(s16 arg0, s16 arg1, u8 *texture, u32 width, u32 arg4) { +// There's a weird fakematch concerning `athing`, don't know that to make of. Can't quite get it over the finish line +// though +void func_8004C6FC(s16 arg0, s16 arg1, u8* texture, u32 width, u32 arg4) { s32 temp_v0_3; s32 var_s3; s32 var_s4; @@ -1727,7 +1809,7 @@ void func_8004C6FC(s16 arg0, s16 arg1, u8 *texture, u32 width, u32 arg4) { u32 temp_t8; s32 heigth; s32 var_s6; - u8 *textureCopy; + u8* textureCopy; athing = arg0 - (width / 2); var_s4 = arg1 - (arg4 / 2); @@ -1766,7 +1848,7 @@ void func_8004C8D4(s16 arg0, s16 arg1) { func_8004C6FC(arg0, arg1, D_8018D1E0, 0x100, 0x80); } -UNUSED void func_8004C91C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5) { +UNUSED void func_8004C91C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, s32 arg5) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); @@ -1774,75 +1856,75 @@ UNUSED void func_8004C91C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s gSPDisplayList(gDisplayListHead++, D_0D007EB8); } -void func_8004C9D8(s32 arg0, s32 arg1, s32 arg2, u8 *texture, s32 arg4, s32 arg5, UNUSED s32 arg6, s32 arg7) { +void func_8004C9D8(s32 arg0, s32 arg1, s32 arg2, u8* texture, s32 arg4, s32 arg5, UNUSED s32 arg6, s32 arg7) { gSPDisplayList(gDisplayListHead++, D_0D007F38); set_transparency(arg2); func_8004C268(arg0, arg1, texture, arg4, arg5, arg7, 1); } -void func_8004CA58(s32 arg0, s32 arg1, f32 arg2, u8 *texture, s32 arg4, s32 arg5) { +void func_8004CA58(s32 arg0, s32 arg1, f32 arg2, u8* texture, s32 arg4, s32 arg5) { gSPDisplayList(gDisplayListHead++, D_0D007F78); load_texture_block_rgba16_mirror(texture, arg4, arg5); func_8004BB3C(arg0, arg1, arg4, arg5, arg2); } -void draw_hud_2d_texture_8x8(s32 x, s32 y, u8 *texture) { +void draw_hud_2d_texture_8x8(s32 x, s32 y, u8* texture) { draw_hud_2d_texture(x, y, 8, 8, texture); } -UNUSED void draw_hud_2d_texture_8x16(s32 x, s32 y, u8 *texture) { +UNUSED void draw_hud_2d_texture_8x16(s32 x, s32 y, u8* texture) { draw_hud_2d_texture(x, y, 8, 16, texture); } -UNUSED void draw_hud_2d_texture_16x16(s32 x, s32 y, u8 *texture) { +UNUSED void draw_hud_2d_texture_16x16(s32 x, s32 y, u8* texture) { draw_hud_2d_texture(x, y, 16, 16, texture); } -void draw_hud_2d_texture_32x8(s32 x, s32 y, u8 *texture) { +void draw_hud_2d_texture_32x8(s32 x, s32 y, u8* texture) { draw_hud_2d_texture(x, y, 32, 8, texture); } -void draw_hud_2d_texture_32x16(s32 x, s32 y, u8 *texture) { +void draw_hud_2d_texture_32x16(s32 x, s32 y, u8* texture) { draw_hud_2d_texture(x, y, 32, 16, texture); } -UNUSED void func_8004CBC0(s32 arg0, s32 arg1, f32 arg2, u8 *texture) { +UNUSED void func_8004CBC0(s32 arg0, s32 arg1, f32 arg2, u8* texture) { func_8004CA58(arg0, arg1, arg2, texture, 32, 16); } -UNUSED void draw_hud_2d_texture_32x32(s32 x, s32 y, u8 *texture) { +UNUSED void draw_hud_2d_texture_32x32(s32 x, s32 y, u8* texture) { draw_hud_2d_texture(x, y, 32, 32, texture); } -UNUSED void func_8004CC24(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004CC24(s32 arg0, s32 arg1, u8* texture) { func_8004C628(arg0, arg1, 32, 32, texture); } -UNUSED void draw_hud_2d_texture_40x32(s32 x, s32 y, u8 *texture) { +UNUSED void draw_hud_2d_texture_40x32(s32 x, s32 y, u8* texture) { draw_hud_2d_texture(x, y, 40, 32, texture); } -UNUSED void func_8004CC84(s32 x, s32 y, u8 *texture) { +UNUSED void func_8004CC84(s32 x, s32 y, u8* texture) { func_8004C91C(x, y, texture, 48, 48, 24); } -UNUSED void func_8004CCB4(s32 x, s32 y, u8 *texture) { +UNUSED void func_8004CCB4(s32 x, s32 y, u8* texture) { draw_hud_2d_texture(x, y, 64, 32, texture); } -UNUSED void func_8004CCE4(s32 arg0, s32 arg1, f32 arg2, u8 *texture) { +UNUSED void func_8004CCE4(s32 arg0, s32 arg1, f32 arg2, u8* texture) { func_8004CA58(arg0, arg1, arg2, texture, 64, 32); } -UNUSED void func_8004CD18(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004CD18(s32 arg0, s32 arg1, u8* texture) { func_8004C91C(arg0, arg1, texture, 64, 64, 32); } -UNUSED void func_8004CD48(s32 arg0, s32 arg1, UNUSED u8 *texture, s32 width, s32 arg4, s32 height) { +UNUSED void func_8004CD48(s32 arg0, s32 arg1, UNUSED u8* texture, s32 width, s32 arg4, s32 height) { UNUSED s32 pad; s32 var_s0; s32 i; - u8 *img; + u8* img; var_s0 = arg1 - (arg4 / 2); gSPDisplayList(gDisplayListHead++, D_0D007FE0); @@ -1855,10 +1937,10 @@ UNUSED void func_8004CD48(s32 arg0, s32 arg1, UNUSED u8 *texture, s32 width, s32 } } -UNUSED void func_8004CE8C(s32 arg0, s32 arg1, u8 *texture, s32 width, s32 arg4, s32 height) { +UNUSED void func_8004CE8C(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4, s32 height) { s32 var_s0 = arg1 - (arg4 / 2); s32 i; - u8 *img = texture; + u8* img = texture; for (i = 0; i < arg4 / height; i++) { load_texture_block_ia8_nomirror(img, width, height); @@ -1868,29 +1950,29 @@ UNUSED void func_8004CE8C(s32 arg0, s32 arg1, u8 *texture, s32 width, s32 arg4, } } -UNUSED void func_8004CF9C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, UNUSED s32 arg5, s32 arg6) { +UNUSED void func_8004CF9C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, UNUSED s32 arg5, s32 arg6) { gSPDisplayList(gDisplayListHead++, D_0D007FE0); func_8004CE8C(arg0, arg1, texture, arg3, arg4, arg6); } -UNUSED void func_8004CFF0(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, UNUSED s32 arg5, s32 arg6) { +UNUSED void func_8004CFF0(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, UNUSED s32 arg5, s32 arg6) { gSPDisplayList(gDisplayListHead++, D_0D008000); func_8004CE8C(arg0, arg1, texture, arg3, arg4, arg6); } -UNUSED void func_8004D044(s32 arg0, s32 arg1, u8 *texture, s32 red, s32 green, s32 blue, s32 alpha, s32 arg7, s32 arg8, UNUSED s32 arg9, s32 argA) { +UNUSED void func_8004D044(s32 arg0, s32 arg1, u8* texture, s32 red, s32 green, s32 blue, s32 alpha, s32 arg7, s32 arg8, + UNUSED s32 arg9, s32 argA) { gSPDisplayList(gDisplayListHead++, D_0D007FE0); func_8004B35C(red, green, blue, alpha); func_8004CE8C(arg0, arg1, texture, arg7, arg8, argA); } UNUSED void func_8004D0CC(void) { - } -UNUSED void func_8004D0D4(s32 arg0, s32 arg1, u8 *texture, s32 width, s32 arg4, s32 height) { +UNUSED void func_8004D0D4(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4, s32 height) { s32 var_s0; - u8 *img; + u8* img; s32 i; var_s0 = arg1 - (arg4 / 2); @@ -1898,16 +1980,17 @@ UNUSED void func_8004D0D4(s32 arg0, s32 arg1, u8 *texture, s32 width, s32 arg4, gSPDisplayList(gDisplayListHead++, D_0D007FE0); for (i = 0; i < arg4 / height; i++) { - func_80044924(img, width, height); - func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1); - img += width * height; - var_s0 += height; + func_80044924(img, width, height); + func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1); + img += width * height; + var_s0 += height; } } -void func_8004D210(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 width, s32 arg8, UNUSED s32 arg9, s32 height) { +void func_8004D210(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 width, s32 arg8, + UNUSED s32 arg9, s32 height) { s32 var_s3; - u8 *img; + u8* img; s32 i; var_s3 = arg1 - (arg8 / 2); @@ -1921,15 +2004,14 @@ void func_8004D210(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5 img += (width * height) / 2; var_s3 += height; } - } -void func_8004D37C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 width, s32 arg8, UNUSED s32 arg9, s32 height) { +void func_8004D37C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 width, s32 arg8, + UNUSED s32 arg9, s32 height) { s32 var_s3; - u8 *img; + u8* img; s32 i; - var_s3 = arg1 - (arg8 / 2); img = texture; gSPDisplayList(gDisplayListHead++, D_0D007FE0); @@ -1943,9 +2025,10 @@ void func_8004D37C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5 } } -void func_8004D4E8(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 width, s32 arg8, UNUSED s32 arg9, s32 height) { +void func_8004D4E8(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 width, s32 arg8, + UNUSED s32 arg9, s32 height) { s32 var_s3; - u8 *img; + u8* img; s32 i; var_s3 = arg1 - (arg8 / 2); @@ -1961,10 +2044,11 @@ void func_8004D4E8(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5 } } -void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 width, s32 arg9, UNUSED s32 argA, s32 height) { +void func_8004D654(s32 arg0, s32 arg1, u8* texture, f32 arg3, s32 arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 width, + s32 arg9, UNUSED s32 argA, s32 height) { s32 i; s32 var_s3; - u8 *textureCopy; + u8* textureCopy; var_s3 = arg1 - (arg9 / 2); textureCopy = texture; @@ -1978,7 +2062,7 @@ void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s32 arg5 } } -void func_8004D7B4(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { +void func_8004D7B4(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) { s32 sp5C; f32 temp_f20; s16 temp_s7; @@ -1986,7 +2070,7 @@ void func_8004D7B4(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { u16 temp_s0; s32 temp_s5; s32 var_s3; - u8 *img; + u8* img; UNUSED s32 test[3]; s32 i; @@ -2012,14 +2096,14 @@ void func_8004D7B4(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { } } -void func_8004D93C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { +void func_8004D93C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) { f32 temp_f20; s16 temp_s7; s16 var_s1; u16 temp_s0; s32 temp_s6; s32 var_s4; - u8 *img; + u8* img; s32 i; s32 var; @@ -2031,7 +2115,6 @@ void func_8004D93C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { var = arg3 / 2; var_s4 = arg1 - (arg4 / 2); - gSPDisplayList(gDisplayListHead++, D_0D007FE0); for (i = 0; i < arg4; i++) { @@ -2046,13 +2129,13 @@ void func_8004D93C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { } } -UNUSED void func_8004DAB8(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { +UNUSED void func_8004DAB8(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) { f32 temp_f20; s16 temp_s7; s16 var_s1; u16 temp_s0; s32 temp_s6; - u8 *img; + u8* img; s32 var_s4; s32 var; s32 i; @@ -2078,95 +2161,94 @@ UNUSED void func_8004DAB8(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { } } -UNUSED void func_8004DC34(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DC34(s32 arg0, s32 arg1, u8* texture) { func_8004CF9C(arg0, arg1, texture, 8, 160, 8, 160); } -UNUSED void func_8004DC6C(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DC6C(s32 arg0, s32 arg1, u8* texture) { func_8004CF9C(arg0, arg1, texture, 12, 160, 12, 160); } -UNUSED void func_8004DCA4(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DCA4(s32 arg0, s32 arg1, u8* texture) { func_8004CF9C(arg0, arg1, texture, 12, 192, 12, 192); } -UNUSED void func_8004DCDC(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DCDC(s32 arg0, s32 arg1, u8* texture) { func_8004CD48(arg0, arg1, texture, 16, 16, 16); } -UNUSED void func_8004DD0C(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DD0C(s32 arg0, s32 arg1, u8* texture) { func_8004CF9C(arg0, arg1, texture, 16, 160, 16, 160); } -UNUSED void func_8004DD44(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DD44(s32 arg0, s32 arg1, u8* texture) { func_8004CD48(arg0, arg1, texture, 32, 32, 32); } -UNUSED void func_8004DD74(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DD74(s32 arg0, s32 arg1, u8* texture) { func_8004CF9C(arg0, arg1, texture, 32, 32, 32, 32); } -UNUSED void func_8004DDAC(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DDAC(s32 arg0, s32 arg1, u8* texture) { func_8004D0D4(arg0, arg1, texture, 32, 32, 32); } -UNUSED void func_8004DDDC(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DDDC(s32 arg0, s32 arg1, u8* texture) { func_8004D7B4(arg0, arg1, texture, 32, 32); } -UNUSED void func_8004DE04(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DE04(s32 arg0, s32 arg1, u8* texture) { func_8004D93C(arg0, arg1, texture, 32, 32); } -UNUSED void func_8004DE2C(s32 arg0, s32 arg1, u8 *arg2) { +UNUSED void func_8004DE2C(s32 arg0, s32 arg1, u8* arg2) { func_8004DAB8(arg0, arg1, arg2, 32, 32); } -UNUSED void func_8004DE54(s32 arg0, s32 arg1, u8 *arg2) { +UNUSED void func_8004DE54(s32 arg0, s32 arg1, u8* arg2) { func_8004CD48(arg0, arg1, arg2, 64, 32, 32); } -UNUSED void func_8004DE84(s32 arg0, s32 arg1, u8 *arg2) { +UNUSED void func_8004DE84(s32 arg0, s32 arg1, u8* arg2) { func_8004CD48(arg0, arg1, arg2, 64, 64, 32); } -UNUSED void func_8004DEB4(s32 arg0, s32 arg1, u8 *texture) { +UNUSED void func_8004DEB4(s32 arg0, s32 arg1, u8* texture) { func_8004CF9C(arg0, arg1, texture, 64, 96, 64, 48); } -UNUSED void func_8004DEEC(s32 arg0, s32 arg1, u8 *arg2) { +UNUSED void func_8004DEEC(s32 arg0, s32 arg1, u8* arg2) { func_8004CF9C(arg0, arg1, arg2, 112, 32, 112, 32); } -UNUSED void func_8004DF24(s32 arg0, s32 arg1, u8 *arg2) { +UNUSED void func_8004DF24(s32 arg0, s32 arg1, u8* arg2) { func_8004CF9C(arg0, arg1, arg2, 128, 32, 128, 32); } -void func_8004DF5C(s32 arg0, s32 arg1, u8 *texture, s32 width, s32 arg4, s32 height) { +void func_8004DF5C(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4, s32 height) { s32 var_s0 = var_s0 = arg1 - (arg4 / 2); - u8 *img = texture; + u8* img = texture; s32 i; for (i = 0; i < arg4 / height; i++) { - rsp_load_texture(img, width, height); - func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1); - img += width * height; - var_s0 += height; + rsp_load_texture(img, width, height); + func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1); + img += width * height; + var_s0 += height; } } -void func_8004E06C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { +void func_8004E06C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) { f32 temp_f20; s16 temp_s7; s16 var_s1; u16 temp_s0; s32 var_s4; - u8 *img; + u8* img; u32 temp_s6; s32 i; s32 var; - D_801656B0 += D_80165710; temp_f20 = D_8018D00C; var_s1 = (s16) D_801656B0; @@ -2176,35 +2258,34 @@ void func_8004E06C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { var_s4 = arg1 - (arg4 / 2); for (i = 0; i < arg4; i++) { - temp_s0 = var_s1; - temp_s6 = (u32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - var)); - sins(temp_s0); - rsp_load_texture(img, arg3, 1); - func_8004B97C(temp_s6, var_s4, arg3, 1, 1); - var_s1 += temp_s7; - img += arg3; - var_s4 += 1; + temp_s0 = var_s1; + temp_s6 = (u32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - var)); + sins(temp_s0); + rsp_load_texture(img, arg3, 1); + func_8004B97C(temp_s6, var_s4, arg3, 1, 1); + var_s1 += temp_s7; + img += arg3; + var_s4 += 1; } } UNUSED void func_8004E238(void) { - } -void func_8004E240(s32 arg0, s32 arg1, u8 *tlut, u8 *texture, s32 arg4, s32 arg5, s32 arg6) { +void func_8004E240(s32 arg0, s32 arg1, u8* tlut, u8* texture, s32 arg4, s32 arg5, s32 arg6) { gSPDisplayList(gDisplayListHead++, D_0D007CB8); func_8004B05C(tlut); func_8004DF5C(arg0, arg1, texture, arg4, arg5, arg6); } -void func_8004E2B8(s32 arg0, s32 arg1, s32 arg2, u8 *tlut, u8 *texture, s32 arg5, s32 arg6, s32 arg7) { +void func_8004E2B8(s32 arg0, s32 arg1, s32 arg2, u8* tlut, u8* texture, s32 arg5, s32 arg6, s32 arg7) { gSPDisplayList(gDisplayListHead++, D_0D007DB8); set_transparency(arg2); func_8004B05C(tlut); func_8004DF5C(arg0, arg1, texture, arg5, arg6, arg7); } -void func_8004E338(s32 arg0, s32 arg1, u8 *tlut, u8 *texture, s32 arg4, s32 arg5) { +void func_8004E338(s32 arg0, s32 arg1, u8* tlut, u8* texture, s32 arg4, s32 arg5) { gSPDisplayList(gDisplayListHead++, D_0D007DB8); set_transparency(D_8016589C); func_8004B05C(tlut); @@ -2212,98 +2293,107 @@ void func_8004E338(s32 arg0, s32 arg1, u8 *tlut, u8 *texture, s32 arg4, s32 arg5 } UNUSED void func_8004E3B8(void) { - } -UNUSED void func_8004E3C0(s32 arg0, s32 arg1, u8 *tlut, u8 *texture, s32 arg4, s32 arg5, UNUSED s32 arg6, s32 arg7) { +UNUSED void func_8004E3C0(s32 arg0, s32 arg1, u8* tlut, u8* texture, s32 arg4, s32 arg5, UNUSED s32 arg6, s32 arg7) { func_8004E240(arg0, arg1, tlut, texture, arg4, arg5, arg7); } -UNUSED void func_8004E3F4(s32 arg0, s32 arg1, s32 arg2, u8 *tlut, u8 *texture, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 arg8) { +UNUSED void func_8004E3F4(s32 arg0, s32 arg1, s32 arg2, u8* tlut, u8* texture, s32 arg5, s32 arg6, UNUSED s32 arg7, + s32 arg8) { func_8004E2B8(arg0, arg1, arg2, tlut, texture, arg5, arg6, arg8); } -UNUSED void func_8004E430(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) { +UNUSED void func_8004E430(s32 arg0, s32 arg1, u8* tlut, u8* texture) { func_8004E240(arg0, arg1, tlut, texture, 8, 128, 128); } -UNUSED void func_8004E464(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) { +UNUSED void func_8004E464(s32 arg0, s32 arg1, u8* tlut, u8* texture) { func_8004E240(arg0, arg1, tlut, texture, 32, 32, 32); } -UNUSED void func_8004E498(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) { +UNUSED void func_8004E498(s32 arg0, s32 arg1, u8* tlut, u8* texture) { func_8004E240(arg0, arg1, tlut, texture, 32, 64, 64); } -void func_8004E4CC(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) { +void func_8004E4CC(s32 arg0, s32 arg1, u8* tlut, u8* texture) { func_8004E240(arg0, arg1, tlut, texture, 40, 32, 32); } -UNUSED void func_8004E500(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) { +UNUSED void func_8004E500(s32 arg0, s32 arg1, u8* tlut, u8* texture) { func_8004E240(arg0, arg1, tlut, texture, 48, 48, 24); } -UNUSED void func_8004E534(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) { +UNUSED void func_8004E534(s32 arg0, s32 arg1, u8* tlut, u8* texture) { func_8004E240(arg0, arg1, tlut, texture, 64, 32, 32); } -UNUSED void func_8004E568(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) { +UNUSED void func_8004E568(s32 arg0, s32 arg1, u8* tlut, u8* texture) { func_8004E240(arg0, arg1, tlut, texture, 64, 64, 32); } -UNUSED void func_8004E59C(s32 arg0, s32 arg1, s32 arg2, u8 *tlut, u8 *texture) { +UNUSED void func_8004E59C(s32 arg0, s32 arg1, s32 arg2, u8* tlut, u8* texture) { func_8004E2B8(arg0, arg1, arg2, tlut, texture, 64, 64, 32); } -UNUSED void func_8004E5D8(s32 arg0, s32 arg1, u8 *tlut, u8 *arg3) { +UNUSED void func_8004E5D8(s32 arg0, s32 arg1, u8* tlut, u8* arg3) { func_8004E338(arg0, arg1, tlut, arg3, 64, 64); } -UNUSED void func_8004E604(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) { +UNUSED void func_8004E604(s32 arg0, s32 arg1, u8* tlut, u8* texture) { func_8004E240(arg0, arg1, tlut, texture, SCREEN_WIDTH, SCREEN_HEIGHT, 6); } void draw_item_window(s32 playerId) { s32 objectIndex; - Object *object; - hud_player *temp_v0; + Object* object; + hud_player* temp_v0; objectIndex = gItemWindowObjectByPlayerId[playerId]; object = &gObjectList[objectIndex]; if (object->state >= 2) { temp_v0 = &playerHUD[playerId]; - func_8004E4CC(temp_v0->slideItemBoxX + temp_v0->itemBoxX, temp_v0->slideItemBoxY + temp_v0->itemBoxY, (u8 *) object->activeTLUT, object->activeTexture); + func_8004E4CC(temp_v0->slideItemBoxX + temp_v0->itemBoxX, temp_v0->slideItemBoxY + temp_v0->itemBoxY, + (u8*) object->activeTLUT, object->activeTexture); } } void func_8004E6C4(s32 playerId) { s32 objectIndex; - Object *object; - hud_player *temp_v0; + Object* object; + hud_player* temp_v0; objectIndex = gItemWindowObjectByPlayerId[playerId]; object = &gObjectList[objectIndex]; if (object->state >= 2) { temp_v0 = &playerHUD[playerId]; - func_80047910(temp_v0->slideItemBoxX + temp_v0->itemBoxX, temp_v0->slideItemBoxY + temp_v0->itemBoxY, 0U, temp_v0->unknownScaling, (u8 *) object->activeTLUT, (u8 *) object->activeTexture, D_0D005C30, 0x00000028, 0x00000020, 0x00000028, 0x00000020); + func_80047910(temp_v0->slideItemBoxX + temp_v0->itemBoxX, temp_v0->slideItemBoxY + temp_v0->itemBoxY, 0U, + temp_v0->unknownScaling, (u8*) object->activeTLUT, (u8*) object->activeTexture, D_0D005C30, + 0x00000028, 0x00000020, 0x00000028, 0x00000020); } } void draw_simplified_lap_count(s32 playerId) { - draw_hud_2d_texture_32x8((s32) playerHUD[playerId].lapX, playerHUD[playerId].lapY + 3, (u8*) common_texture_hud_lap); - draw_hud_2d_texture_32x16(playerHUD[playerId].lapX + 0x1C, (s32) playerHUD[playerId].lapY, (u8*) gHudLapTextures[playerHUD[playerId].alsoLapCount]); + draw_hud_2d_texture_32x8((s32) playerHUD[playerId].lapX, playerHUD[playerId].lapY + 3, + (u8*) common_texture_hud_lap); + draw_hud_2d_texture_32x16(playerHUD[playerId].lapX + 0x1C, (s32) playerHUD[playerId].lapY, + (u8*) gHudLapTextures[playerHUD[playerId].alsoLapCount]); } void func_8004E800(s32 playerId) { if (playerHUD[playerId].unk_81 != 0) { if (playerHUD[playerId].lapCount != 3) { - func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U, - playerHUD[playerId].rankScaling, 0x000000FF, D_800E55F8[D_8018CF98[playerId]], 0, 0x000000FF, common_texture_hud_place[D_8018CF98[playerId]], - D_0D0068F0, 0x00000080, 0x00000040, 0x00000080, 0x00000040); + func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, + playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U, + playerHUD[playerId].rankScaling, 0x000000FF, D_800E55F8[D_8018CF98[playerId]], 0, 0x000000FF, + common_texture_hud_place[D_8018CF98[playerId]], D_0D0068F0, 0x00000080, 0x00000040, + 0x00000080, 0x00000040); } else { - func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U, - playerHUD[playerId].rankScaling, 0x000000FF, D_800E55F8[D_80165594], 0, 0x000000FF, common_texture_hud_place[gGPCurrentRaceRankByPlayerId[playerId]], - D_0D0068F0, 0x00000080, 0x00000040, 0x00000080, 0x00000040); + func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, + playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U, + playerHUD[playerId].rankScaling, 0x000000FF, D_800E55F8[D_80165594], 0, 0x000000FF, + common_texture_hud_place[gGPCurrentRaceRankByPlayerId[playerId]], D_0D0068F0, 0x00000080, + 0x00000040, 0x00000080, 0x00000040); } } } @@ -2311,53 +2401,69 @@ void func_8004E800(s32 playerId) { void func_8004E998(s32 playerId) { if (playerHUD[playerId].unk_81 != 0) { if (playerHUD[playerId].lapCount != 3) { - func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U, - playerHUD[playerId].rankScaling, 0x000000FF, D_800E5618[gGPCurrentRaceRankByPlayerId[playerId]], 0, 0x000000FF, D_0D015258[gGPCurrentRaceRankByPlayerId[playerId]], - D_0D006030, 0x00000040, 0x00000040, 0x00000040, 0x00000040); + func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, + playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U, + playerHUD[playerId].rankScaling, 0x000000FF, + D_800E5618[gGPCurrentRaceRankByPlayerId[playerId]], 0, 0x000000FF, + D_0D015258[gGPCurrentRaceRankByPlayerId[playerId]], D_0D006030, 0x00000040, 0x00000040, + 0x00000040, 0x00000040); } else { - func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U, - playerHUD[playerId].rankScaling, 0x000000FF, D_800E5618[D_80165598], 0, 0x000000FF, D_0D015258[gGPCurrentRaceRankByPlayerId[playerId]], - D_0D006030, 0x00000040, 0x00000040, 0x00000040, 0x00000040); + func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, + playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U, + playerHUD[playerId].rankScaling, 0x000000FF, D_800E5618[D_80165598], 0, 0x000000FF, + D_0D015258[gGPCurrentRaceRankByPlayerId[playerId]], D_0D006030, 0x00000040, 0x00000040, + 0x00000040, 0x00000040); } } } void func_8004EB30(UNUSED s32 arg0) { - } void func_8004EB38(s32 playerId) { - hud_player *temp_s0; + hud_player* temp_s0; temp_s0 = &playerHUD[playerId]; if ((u8) temp_s0->unk_7B != 0) { - func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000080, (u8*) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000080, + (u8*) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); func_8004F950((s32) temp_s0->lap1CompletionTimeX, (s32) temp_s0->timerY, 0x00000080, (s32) temp_s0->someTimer); } if ((u8) temp_s0->unk_7C != 0) { - func_8004C9D8(temp_s0->lap2CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000050, (u8*) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8(temp_s0->lap2CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000050, + (u8*) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); func_8004F950((s32) temp_s0->lap2CompletionTimeX, (s32) temp_s0->timerY, 0x00000050, (s32) temp_s0->someTimer); } if ((u8) temp_s0->unk_7E != 0) { - func_8004C9D8((s32) temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x00000080, (u8*) common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); - func_8004C9D8(temp_s0->lapAfterImage1X + 0x1C, (s32) temp_s0->lapY, 0x00000080, (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8((s32) temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x00000080, (u8*) common_texture_hud_lap, + 0x00000020, 8, 0x00000020, 8); + func_8004C9D8(temp_s0->lapAfterImage1X + 0x1C, (s32) temp_s0->lapY, 0x00000080, + (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); } if ((u8) temp_s0->unk_7F != 0) { - func_8004C9D8((s32) temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x00000050, (u8*) common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); - func_8004C9D8(temp_s0->lapAfterImage2X + 0x1C, (s32) temp_s0->lapY, 0x00000050, (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8((s32) temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x00000050, (u8*) common_texture_hud_lap, + 0x00000020, 8, 0x00000020, 8); + func_8004C9D8(temp_s0->lapAfterImage2X + 0x1C, (s32) temp_s0->lapY, 0x00000050, + (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); } } void func_8004ED40(s32 arg0) { - func_8004A2F4(playerHUD[arg0].speedometerX, playerHUD[arg0].speedometerY, 0U, 1.0f, D_8018D300, D_8018D308, D_8018D310, 0xFF, LOAD_ASSET(common_texture_speedometer), LOAD_ASSET(D_0D0064B0), 64, 96, 64, 48); - func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, common_texture_speedometer_needle, D_0D005FF0, 0x40, 0x20, 0x40, 0x20); + func_8004A2F4(playerHUD[arg0].speedometerX, playerHUD[arg0].speedometerY, 0U, 1.0f, D_8018D300, D_8018D308, + D_8018D310, 0xFF, LOAD_ASSET(common_texture_speedometer), LOAD_ASSET(D_0D0064B0), 64, 96, 64, 48); + func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, common_texture_speedometer_needle, D_0D005FF0, 0x40, 0x20, + 0x40, 0x20); } void func_8004EE54(s32 arg0) { if (gIsMirrorMode != 0) { - func_8004D4E8(D_8018D2C0[arg0] + D_8018D2F0, D_8018D2D8[arg0] + D_8018D2F8, (u8 *) D_8018D240, (s32) D_8018D300, (s32) D_8018D308, (s32) D_8018D310, 0x000000FF, (s32) D_8018D2B0, (s32) D_8018D2B8, (s32) D_8018D2B0, (s32) D_8018D2B8); + func_8004D4E8(D_8018D2C0[arg0] + D_8018D2F0, D_8018D2D8[arg0] + D_8018D2F8, (u8*) D_8018D240, (s32) D_8018D300, + (s32) D_8018D308, (s32) D_8018D310, 0x000000FF, (s32) D_8018D2B0, (s32) D_8018D2B8, + (s32) D_8018D2B0, (s32) D_8018D2B8); } else { - func_8004D37C(D_8018D2C0[arg0] + D_8018D2F0, D_8018D2D8[arg0] + D_8018D2F8, (u8 *) D_8018D240, (s32) D_8018D300, (s32) D_8018D308, (s32) D_8018D310, 0x000000FF, (s32) D_8018D2B0, (s32) D_8018D2B8, (s32) D_8018D2B0, (s32) D_8018D2B8); + func_8004D37C(D_8018D2C0[arg0] + D_8018D2F0, D_8018D2D8[arg0] + D_8018D2F8, (u8*) D_8018D240, (s32) D_8018D300, + (s32) D_8018D308, (s32) D_8018D310, 0x000000FF, (s32) D_8018D2B0, (s32) D_8018D2B8, + (s32) D_8018D2B0, (s32) D_8018D2B8); } } @@ -2367,7 +2473,8 @@ void func_8004EF9C(s32 arg0) { temp_v0 = D_800E5548[arg0 * 2]; temp_t0 = D_800E5548[arg0 * 2 + 1]; - func_8004D37C(0x00000104, 0x0000003C, D_8018D248[arg0], 0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF, temp_v0, temp_t0, temp_v0, temp_t0); + func_8004D37C(0x00000104, 0x0000003C, D_8018D248[arg0], 0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF, temp_v0, + temp_t0, temp_v0, temp_t0); } void func_8004F020(s32 arg0) { @@ -2376,16 +2483,16 @@ void func_8004F020(s32 arg0) { var_f2 = ((D_8018D2C0[arg0] + D_8018D2F0) - (D_8018D2B0 / 2)) + D_8018D2E0; var_f0 = ((D_8018D2D8[arg0] + D_8018D2F8) - (D_8018D2B8 / 2)) + D_8018D2E8; - switch (gCurrentCourseId) { /* irregular */ - case COURSE_MARIO_RACEWAY: - var_f0 = var_f0 - 2.0; - break; - case COURSE_CHOCO_MOUNTAIN: - var_f0 = var_f0 - 16.0; - break; - case COURSE_KALAMARI_DESERT: - var_f0 = var_f0 + 4.0; - break; + switch (gCurrentCourseId) { /* irregular */ + case COURSE_MARIO_RACEWAY: + var_f0 = var_f0 - 2.0; + break; + case COURSE_CHOCO_MOUNTAIN: + var_f0 = var_f0 - 16.0; + break; + case COURSE_KALAMARI_DESERT: + var_f0 = var_f0 + 4.0; + break; } draw_hud_2d_texture_8x8(var_f2, var_f0, (u8*) common_texture_minimap_finish_line); } @@ -2394,39 +2501,47 @@ void func_8004F020(s32 arg0) { // https://decomp.me/scratch/FxA1w /** * characterId of 8 appears to be a type of null check or control flow alteration. -*/ + */ #define EXPLICIT_AND 1 void func_8004F168(s32 arg0, s32 playerId, s32 characterId) { f32 thing0; f32 thing1; s16 temp_a0; s16 temp_a1; - Player *player = &gPlayerOne[playerId]; + Player* player = &gPlayerOne[playerId]; if (player->type & (1 << 15)) { thing0 = player->pos[0] * D_8018D2A0; thing1 = player->pos[2] * D_8018D2A0; - temp_a0 = ((D_8018D2C0[arg0] + D_8018D2F0) - (D_8018D2B0 / 2)) + D_8018D2E0 + (s16)(thing0); - temp_a1 = ((D_8018D2D8[arg0] + D_8018D2F8) - (D_8018D2B8 / 2)) + D_8018D2E8 + (s16)(thing1); + temp_a0 = ((D_8018D2C0[arg0] + D_8018D2F0) - (D_8018D2B0 / 2)) + D_8018D2E0 + (s16) (thing0); + temp_a1 = ((D_8018D2D8[arg0] + D_8018D2F8) - (D_8018D2B8 / 2)) + D_8018D2E8 + (s16) (thing1); if (characterId != 8) { if ((gGPCurrentRaceRankByPlayerId[playerId] == 0) && (gModeSelection != 3) && (gModeSelection != 1)) { - #if EXPLICIT_AND == 1 - func_80046424(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); - #else - func_80046424(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); - #endif +#if EXPLICIT_AND == 1 + func_80046424(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, + (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, + 8, 8, 8, 8); +#else + func_80046424(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, + (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, + 8, 8, 8, 8); +#endif } else { - #if EXPLICIT_AND == 1 - func_800463B0(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); - #else - func_800463B0(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); - #endif +#if EXPLICIT_AND == 1 + func_800463B0(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, + (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, + 8, 8, 8, 8); +#else + func_800463B0(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, + (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, + 8, 8, 8, 8); +#endif } } else { if (gGPCurrentRaceRankByPlayerId[playerId] == 0) { - func_8004C450(temp_a0, temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); + func_8004C450(temp_a0, temp_a1, 8, 8, (u8*) common_texture_minimap_progress_dot); } else { - draw_hud_2d_texture(temp_a0, temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); + draw_hud_2d_texture(temp_a0, temp_a1, 8, 8, (u8*) common_texture_minimap_progress_dot); } } } @@ -2438,50 +2553,50 @@ GLOBAL_ASM("asm/non_matchings/render_objects/func_8004F168.s") // WTF is up with the gPlayerOne access in this function? void func_8004F3E4(s32 arg0) { - UNUSED Player *player; + UNUSED Player* player; s32 playerId; s32 idx; - switch (gModeSelection) { /* irregular */ - case GRAND_PRIX: - for (idx = D_8018D158 - 1; idx >= 0; idx--) { - playerId = gGPCurrentRacePlayerIdByRank[idx]; - if ((gPlayerOne + playerId)->type & PLAYER_KART_AI) { - func_8004F168(arg0, playerId, 8); + switch (gModeSelection) { /* irregular */ + case GRAND_PRIX: + for (idx = D_8018D158 - 1; idx >= 0; idx--) { + playerId = gGPCurrentRacePlayerIdByRank[idx]; + if ((gPlayerOne + playerId)->type & PLAYER_KART_AI) { + func_8004F168(arg0, playerId, 8); + } } - } - for (idx = D_8018D158 - 1; idx >= 0; idx--) { - playerId = gGPCurrentRacePlayerIdByRank[idx]; - if (((gPlayerOne + playerId)->type & PLAYER_KART_AI) != PLAYER_KART_AI) { - func_8004F168(arg0, playerId, (gPlayerOne + playerId)->characterId); + for (idx = D_8018D158 - 1; idx >= 0; idx--) { + playerId = gGPCurrentRacePlayerIdByRank[idx]; + if (((gPlayerOne + playerId)->type & PLAYER_KART_AI) != PLAYER_KART_AI) { + func_8004F168(arg0, playerId, (gPlayerOne + playerId)->characterId); + } } - } - break; - case TIME_TRIALS: - for (idx = 0; idx < 8; idx++) { - if (((gPlayerOne + idx)->type & PLAYER_INVISIBLE_OR_BOMB) == PLAYER_INVISIBLE_OR_BOMB) { - func_8004F168(arg0, idx, 8); + break; + case TIME_TRIALS: + for (idx = 0; idx < 8; idx++) { + if (((gPlayerOne + idx)->type & PLAYER_INVISIBLE_OR_BOMB) == PLAYER_INVISIBLE_OR_BOMB) { + func_8004F168(arg0, idx, 8); + } } - } - func_8004F168(arg0, 0, gPlayerOne->characterId); - break; - case VERSUS: - for (idx = gPlayerCountSelection1 - 1; idx >=0; idx--) { - playerId = gGPCurrentRacePlayerIdByRank[idx]; - func_8004F168(arg0, playerId, (gPlayerOne + playerId)->characterId); - } - break; - case BATTLE: - for (idx = 0; idx < gPlayerCountSelection1; idx++) { - if (!((gPlayerOne + idx)->type & PLAYER_UNKNOWN_0x40)) { - func_8004F168(arg0, idx, (gPlayerOne + idx)->characterId); + func_8004F168(arg0, 0, gPlayerOne->characterId); + break; + case VERSUS: + for (idx = gPlayerCountSelection1 - 1; idx >= 0; idx--) { + playerId = gGPCurrentRacePlayerIdByRank[idx]; + func_8004F168(arg0, playerId, (gPlayerOne + playerId)->characterId); } - } - break; + break; + case BATTLE: + for (idx = 0; idx < gPlayerCountSelection1; idx++) { + if (!((gPlayerOne + idx)->type & PLAYER_UNKNOWN_0x40)) { + func_8004F168(arg0, idx, (gPlayerOne + idx)->characterId); + } + } + break; } } -s32 func_8004F674(s32 *arg0, s32 arg1) { +s32 func_8004F674(s32* arg0, s32 arg1) { s32 temp_v0; s32 ret; @@ -2569,26 +2684,36 @@ void render_hud_timer(s32 playerId) { if (D_8015F890 == 0) { for (var_s0 = 0; var_s0 < 3; var_s0++) { if (D_80165658[var_s0] == 0) { - print_timer(playerHUD[playerId].lapCompletionTimeXs[var_s0], playerHUD[playerId].timerY + (var_s0*0x10), playerHUD[playerId].lapDurations[var_s0]); + print_timer(playerHUD[playerId].lapCompletionTimeXs[var_s0], + playerHUD[playerId].timerY + (var_s0 * 0x10), + playerHUD[playerId].lapDurations[var_s0]); } else { - print_timer_rainbow(playerHUD[playerId].lapCompletionTimeXs[var_s0], playerHUD[playerId].timerY + (var_s0*0x10), playerHUD[playerId].lapDurations[var_s0]); + print_timer_rainbow(playerHUD[playerId].lapCompletionTimeXs[var_s0], + playerHUD[playerId].timerY + (var_s0 * 0x10), + playerHUD[playerId].lapDurations[var_s0]); } } - draw_hud_2d_texture_32x16(playerHUD[playerId].totalTimeX - 0x13, playerHUD[playerId].timerY + 0x38, (u8*) common_texture_hud_total_time); + draw_hud_2d_texture_32x16(playerHUD[playerId].totalTimeX - 0x13, playerHUD[playerId].timerY + 0x38, + (u8*) common_texture_hud_total_time); if (D_801657E5 != 0) { - print_timer_rainbow(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, playerHUD[playerId].someTimer); + print_timer_rainbow(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, + playerHUD[playerId].someTimer); } else { - print_timer(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, playerHUD[playerId].someTimer); + print_timer(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, + playerHUD[playerId].someTimer); } } } else { if (playerHUD[playerId].blinkTimer == 0) { - draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, (u8*) common_texture_hud_time); + draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, + (u8*) common_texture_hud_time); print_timer(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer); } else { - draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, (u8*) common_texture_hud_lap_time); + draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, + (u8*) common_texture_hud_lap_time); if (D_801657E3 != 0) { - print_timer_rainbow(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer1); + print_timer_rainbow(playerHUD[playerId].timerX, playerHUD[playerId].timerY, + playerHUD[playerId].someTimer1); } else if (playerHUD[playerId].blinkState == 0) { print_timer(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer1); } @@ -2603,10 +2728,10 @@ void draw_lap_count(s16 lapX, s16 lapY, s8 lap) { gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); load_texture_block_rgba16_mirror((u8*) common_texture_hud_123, 32, 8); // Display current lap. Ex. 1/3 - - func_8004BA98(lapX , lapY, 8, 8, lap * 8, 0, 0); // display the digit - func_8004BA98(lapX + 8 , lapY, 8, 8, 24, 0, 0); // display the / - func_8004BA98(lapX + 16, lapY, 8, 8, 16, 0, 0); // display the 3 + + func_8004BA98(lapX, lapY, 8, 8, lap * 8, 0, 0); // display the digit + func_8004BA98(lapX + 8, lapY, 8, 8, 24, 0, 0); // display the / + func_8004BA98(lapX + 16, lapY, 8, 8, 16, 0, 0); // display the 3 gSPDisplayList(gDisplayListHead++, D_0D007EB8); } @@ -2668,9 +2793,11 @@ void func_80050320(void) { characterId = gGPCurrentRaceCharacterIdByRank[var_s0]; lapCount = gLapCountByPlayerId[temp_v0]; if (characterId == gPlayerOne->characterId) { - func_8004FDB4(D_8018D028[var_s0], D_8018D050[var_s0], var_s0, lapCount, characterId, 0x000000FF, 1, var_a0, 0); + func_8004FDB4(D_8018D028[var_s0], D_8018D050[var_s0], var_s0, lapCount, characterId, 0x000000FF, 1, + var_a0, 0); } else { - func_8004FDB4(D_8018D028[var_s0], D_8018D050[var_s0], var_s0, lapCount, characterId, D_8018D3E0, 0, var_a0, 0); + func_8004FDB4(D_8018D028[var_s0], D_8018D050[var_s0], var_s0, lapCount, characterId, D_8018D3E0, 0, + var_a0, 0); } } } @@ -2686,9 +2813,11 @@ void func_80050320(void) { characterId = (gPlayerOne + temp_v0)->characterId; lapCount = gLapCountByPlayerId[temp_v0]; if (temp_v0 == 0) { - func_8004FDB4(D_8018D028[var_s0], D_8018D050[var_s0], var_s0, lapCount, characterId, 0x000000FF, 1, var_a0, 1); + func_8004FDB4(D_8018D028[var_s0], D_8018D050[var_s0], var_s0, lapCount, characterId, 0x000000FF, 1, + var_a0, 1); } else { - func_8004FDB4(D_8018D028[var_s0], D_8018D050[var_s0], var_s0, lapCount, characterId, 0x000000FF, 0, var_a0, 1); + func_8004FDB4(D_8018D028[var_s0], D_8018D050[var_s0], var_s0, lapCount, characterId, 0x000000FF, 0, + var_a0, 1); } } } @@ -2696,7 +2825,7 @@ void func_80050320(void) { gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF); } -s32 func_80050644(u16 arg0, s32 *arg1, s32 *arg2) { +s32 func_80050644(u16 arg0, s32* arg1, s32* arg2) { s32 var_v0 = 0; s32 thing = 0; s32 test = gLapCountByPlayerId[arg0]; @@ -2741,7 +2870,7 @@ s32 func_80050644(u16 arg0, s32 *arg1, s32 *arg2) { return var_v0; } -void func_800507D8(u16 bombIndex, s32 *arg1, s32 *arg2) { +void func_800507D8(u16 bombIndex, s32* arg1, s32* arg2) { s32 temp_v0 = gBombKarts[bombIndex].waypointIndex; s32 var_v1 = 0; @@ -2802,48 +2931,50 @@ void func_800508C0(void) { func_8004C024(0x0020, 0x00DE, 0x0104, var_s0_2, var_s1, var_s2, 0x000000FF); func_8004C148(0x0020, 0x0012, 0x00CC, var_s0_2, var_s1, var_s2, 0x000000FF); } - if ((temp_v1 < 0) || (temp_v1 >= 3)) return; + if ((temp_v1 < 0) || (temp_v1 >= 3)) { + return; + } switch (temp_v1) { - case 0: - var_s0_2 = 0; - var_s1 = 0; - var_s2 = 0x00FF; - break; - case 1: - var_s0_2 = 0x00FF; - var_s1 = 0x00FF; - var_s2 = 0; - break; - case 2: - var_s0_2 = 0x00FF; - var_s1 = 0; - var_s2 = 0; - break; - default: - break; + case 0: + var_s0_2 = 0; + var_s1 = 0; + var_s2 = 0x00FF; + break; + case 1: + var_s0_2 = 0x00FF; + var_s1 = 0x00FF; + var_s2 = 0; + break; + case 2: + var_s0_2 = 0x00FF; + var_s1 = 0; + var_s2 = 0; + break; + default: + break; } switch (sp4C) { - case 1: - func_8004C024(0x0020, 0x0012, sp54, var_s0_2, var_s1, var_s2, 0x000000FF); - break; - case 2: - func_8004C024(0x0020, 0x0012, 0x0104, var_s0_2, var_s1, var_s2, 0x000000FF); - func_8004C148(0x0124, 0x0012, sp50, var_s0_2, var_s1, var_s2, 0x000000FF); - break; - case 3: - func_8004C024(0x0020, 0x0012, 0x0104, var_s0_2, var_s1, var_s2, 0x000000FF); - func_8004C148(0x0124, 0x0012, 0x00CC, var_s0_2, var_s1, var_s2, 0x000000FF); - func_8004C024(sp54 + 0x20, 0x00DE, 0x104 - sp54, var_s0_2, var_s1, var_s2, 0x000000FF); - break; - case 4: - func_8004C024(0x0020, 0x0012, 0x0104, var_s0_2, var_s1, var_s2, 0x000000FF); - func_8004C148(0x0124, 0x0012, 0x00CC, var_s0_2, var_s1, var_s2, 0x000000FF); - func_8004C024(0x0020, 0x00DE, 0x0104, var_s0_2, var_s1, var_s2, 0x000000FF); - func_8004C148(0x0020, sp50 + 0x12, 0xCC - sp50, var_s0_2, var_s1, var_s2, 0x000000FF); - break; - case 0: - default: - break; + case 1: + func_8004C024(0x0020, 0x0012, sp54, var_s0_2, var_s1, var_s2, 0x000000FF); + break; + case 2: + func_8004C024(0x0020, 0x0012, 0x0104, var_s0_2, var_s1, var_s2, 0x000000FF); + func_8004C148(0x0124, 0x0012, sp50, var_s0_2, var_s1, var_s2, 0x000000FF); + break; + case 3: + func_8004C024(0x0020, 0x0012, 0x0104, var_s0_2, var_s1, var_s2, 0x000000FF); + func_8004C148(0x0124, 0x0012, 0x00CC, var_s0_2, var_s1, var_s2, 0x000000FF); + func_8004C024(sp54 + 0x20, 0x00DE, 0x104 - sp54, var_s0_2, var_s1, var_s2, 0x000000FF); + break; + case 4: + func_8004C024(0x0020, 0x0012, 0x0104, var_s0_2, var_s1, var_s2, 0x000000FF); + func_8004C148(0x0124, 0x0012, 0x00CC, var_s0_2, var_s1, var_s2, 0x000000FF); + func_8004C024(0x0020, 0x00DE, 0x0104, var_s0_2, var_s1, var_s2, 0x000000FF); + func_8004C148(0x0020, sp50 + 0x12, 0xCC - sp50, var_s0_2, var_s1, var_s2, 0x000000FF); + break; + case 0: + default: + break; } } @@ -2881,8 +3012,8 @@ void func_80050E34(s32 playerId, s32 arg1) { s32 characterId; s32 spB8; s32 temp_v0_2; - Object *object; - Player *player; + Object* object; + Player* player; player = &gPlayerOne[playerId]; lapCount = gLapCountByPlayerId[playerId]; @@ -2916,7 +3047,8 @@ void func_80050E34(s32 playerId, s32 arg1) { gDPLoadTLUT_pal256(gDisplayListHead++, gPortraitTLUTs[characterId]); gSPDisplayList(gDisplayListHead++, D_0D007DB8); if (player->effects & STAR_EFFECT) { - func_8004B614((s32) D_801656C0, (s32) D_801656D0, (s32) D_801656E0, 0x00000080, 0x00000080, 0x00000080, (s32) gObjectList[objectIndex].primAlpha); + func_8004B614((s32) D_801656C0, (s32) D_801656D0, (s32) D_801656E0, 0x00000080, 0x00000080, 0x00000080, + (s32) gObjectList[objectIndex].primAlpha); } else { set_transparency((s32) gObjectList[objectIndex].primAlpha); } @@ -2957,7 +3089,7 @@ void func_800514BC(void) { s32 var_s0; s32 var_s1; s32 var_s3; - Player *player; + Player* player; if (gScreenModeSelection == 0) { func_800508C0(); @@ -2984,12 +3116,12 @@ void func_800514BC(void) { void render_object_leaf_particle(UNUSED s32 cameraId) { s32 someIndex; s32 leafIndex; - Object *object; + Object* object; gSPDisplayList(gDisplayListHead++, D_0D0079C8); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); load_texture_block_rgba16_mirror((u8*) common_texture_particle_leaf, 0x00000020, 0x00000010); - for(someIndex = 0; someIndex < gLeafParticle_SIZE; someIndex++) { + for (someIndex = 0; someIndex < gLeafParticle_SIZE; someIndex++) { leafIndex = gLeafParticle[someIndex]; if (leafIndex != -1) { object = &gObjectList[leafIndex]; @@ -3025,7 +3157,8 @@ void func_800518F8(s32 objectIndex, s16 arg1, s16 arg2) { if (gObjectList[objectIndex].status & 0x10) { if (D_8018D228 != gObjectList[objectIndex].unk_0D5) { D_8018D228 = gObjectList[objectIndex].unk_0D5; - func_80044DA0(gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].textureWidth, gObjectList[objectIndex].textureHeight); + func_80044DA0(gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].textureWidth, + gObjectList[objectIndex].textureHeight); } func_80042330(arg1, arg2, 0U, gObjectList[objectIndex].sizeScaling); gSPVertex(gDisplayListHead++, gObjectList[objectIndex].vertex, 4, 0); @@ -3037,7 +3170,8 @@ void func_800519D4(s32 objectIndex, s16 arg1, s16 arg2) { if (gObjectList[objectIndex].status & 0x10) { if (D_8018D228 != gObjectList[objectIndex].unk_0D5) { D_8018D228 = gObjectList[objectIndex].unk_0D5; - func_80044DA0(gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].textureWidth, gObjectList[objectIndex].textureHeight); + func_80044DA0(gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].textureWidth, + gObjectList[objectIndex].textureHeight); } func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, gObjectList[objectIndex].primAlpha); func_80042330(arg1, arg2, 0U, gObjectList[objectIndex].sizeScaling); @@ -3049,7 +3183,7 @@ void func_800519D4(s32 objectIndex, s16 arg1, s16 arg2) { void func_80051ABC(s16 arg0, s32 arg1) { s32 var_s0; s32 objectIndex; - Object *object; + Object* object; D_8018D228 = 0xFF; gSPDisplayList(gDisplayListHead++, D_0D007A60); @@ -3074,7 +3208,7 @@ void func_80051C60(s16 arg0, s32 arg1) { s16 var_s5; s32 var_s0; s32 objectIndex; - Object *object; + Object* object; if (D_801658FE == 0) { if (gCurrentCourseId == 6) { @@ -3154,23 +3288,28 @@ void func_80052080(void) { func_80051C60(240 - D_800DC5F0->cameraHeight, D_8018D1F0); } - void func_800520C0(s32 arg0) { - //Lights1 *D_800E45C0 = LOAD_ASSET(D_800E45C0); + // Lights1 *D_800E45C0 = LOAD_ASSET(D_800E45C0); if (gObjectList[arg0].unk_0D5 == 0) { - D_800E45C0[0].l[0].l.dir[0] = D_800E45C0[1].l[0].l.dir[0] = D_800E45C0[2].l[0].l.dir[0] = D_800E45C0[3].l[0].l.dir[0] = 0; - D_800E45C0[0].l[0].l.dir[1] = D_800E45C0[1].l[0].l.dir[1] = D_800E45C0[2].l[0].l.dir[1] = D_800E45C0[3].l[0].l.dir[1] = -0x78; - D_800E45C0[0].l[0].l.dir[2] = D_800E45C0[1].l[0].l.dir[2] = D_800E45C0[2].l[0].l.dir[2] = D_800E45C0[3].l[0].l.dir[2] = 0; + D_800E45C0[0].l[0].l.dir[0] = D_800E45C0[1].l[0].l.dir[0] = D_800E45C0[2].l[0].l.dir[0] = + D_800E45C0[3].l[0].l.dir[0] = 0; + D_800E45C0[0].l[0].l.dir[1] = D_800E45C0[1].l[0].l.dir[1] = D_800E45C0[2].l[0].l.dir[1] = + D_800E45C0[3].l[0].l.dir[1] = -0x78; + D_800E45C0[0].l[0].l.dir[2] = D_800E45C0[1].l[0].l.dir[2] = D_800E45C0[2].l[0].l.dir[2] = + D_800E45C0[3].l[0].l.dir[2] = 0; } else { - D_800E45C0[0].l[0].l.dir[0] = D_800E45C0[1].l[0].l.dir[0] = D_800E45C0[2].l[0].l.dir[0] = D_800E45C0[3].l[0].l.dir[0] = 0x63; - D_800E45C0[0].l[0].l.dir[1] = D_800E45C0[1].l[0].l.dir[1] = D_800E45C0[2].l[0].l.dir[1] = D_800E45C0[3].l[0].l.dir[1] = 0x42; - D_800E45C0[0].l[0].l.dir[2] = D_800E45C0[1].l[0].l.dir[2] = D_800E45C0[2].l[0].l.dir[2] = D_800E45C0[3].l[0].l.dir[2] = 0; + D_800E45C0[0].l[0].l.dir[0] = D_800E45C0[1].l[0].l.dir[0] = D_800E45C0[2].l[0].l.dir[0] = + D_800E45C0[3].l[0].l.dir[0] = 0x63; + D_800E45C0[0].l[0].l.dir[1] = D_800E45C0[1].l[0].l.dir[1] = D_800E45C0[2].l[0].l.dir[1] = + D_800E45C0[3].l[0].l.dir[1] = 0x42; + D_800E45C0[0].l[0].l.dir[2] = D_800E45C0[1].l[0].l.dir[2] = D_800E45C0[2].l[0].l.dir[2] = + D_800E45C0[3].l[0].l.dir[2] = 0; } } void func_8005217C(UNUSED s32 arg0) { - Lights1 *D_800E45C0l = LOAD_ASSET(D_800E45C0); - Object *object; + Lights1* D_800E45C0l = LOAD_ASSET(D_800E45C0); + Object* object; s32 temp_a3; temp_a3 = indexObjectList2[0]; @@ -3199,12 +3338,13 @@ void func_8005217C(UNUSED s32 arg0) { void func_800523B8(s32 objectIndex, s32 arg1, u32 arg2) { UNUSED s32 pad[2]; - Object *object; - Camera *camera = &camera1[arg1]; + Object* object; + Camera* camera = &camera1[arg1]; object = &gObjectList[objectIndex]; object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], camera->pos); - func_800484BC(object->pos, object->orientation, object->sizeScaling, object->primAlpha, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, 0x00000030, 0x00000028, 0x00000030, 0x00000028); + func_800484BC(object->pos, object->orientation, object->sizeScaling, object->primAlpha, (u8*) object->activeTLUT, + object->activeTexture, object->vertex, 0x00000030, 0x00000028, 0x00000030, 0x00000028); if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && (arg2 < 0x15F91U)) { func_8004A630(&D_8018C830, object->pos, 0.4f); } @@ -3229,32 +3369,41 @@ void render_object_boos(s32 arg0) { void render_object_bat(s32 cameraId) { s32 var_s2; s32 objectIndex; - Camera *temp_s7; + Camera* temp_s7; objectIndex = indexObjectList1[0]; temp_s7 = &camera1[cameraId]; - func_80046F60(gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, 0x00000020, 0x00000040, 5); + func_80046F60(gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, 0x00000020, 0x00000040, + 5); D_80183E80[0] = gObjectList[objectIndex].orientation[0]; D_80183E80[2] = gObjectList[objectIndex].orientation[2]; if ((D_8018CFB0 != 0) || (D_8018CFC8 != 0)) { for (var_s2 = 0; var_s2 < 40; var_s2++) { objectIndex = gObjectParticle2[var_s2]; - if (objectIndex == -1) continue; + if (objectIndex == -1) { + continue; + } if ((gObjectList[objectIndex].state >= 2) && (gMatrixHudCount < 0x2EF)) { - D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], temp_s7->pos); - func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D0062B0); + D_80183E80[1] = + func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], temp_s7->pos); + func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, + D_0D0062B0); } } } if ((D_8018CFE8 != 0) || (D_8018D000 != 0)) { for (var_s2 = 0; var_s2 < 30; var_s2++) { objectIndex = gObjectParticle3[var_s2]; - if (objectIndex == -1) continue; + if (objectIndex == -1) { + continue; + } if ((gObjectList[objectIndex].state >= 2) && (gMatrixHudCount < 0x2EF)) { - D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], temp_s7->pos); - func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D0062B0); + D_80183E80[1] = + func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], temp_s7->pos); + func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, + D_0D0062B0); } } } @@ -3263,7 +3412,7 @@ void render_object_bat(s32 cameraId) { void render_object_trash_bin(s32 cameraId) { s32 objectIndex; - Object *object; + Object* object; objectIndex = indexObjectList1[1]; func_8008A364(objectIndex, cameraId, 0x5555U, 0x00000320); @@ -3276,7 +3425,7 @@ void render_object_trash_bin(s32 cameraId) { } void func_8005285C(s32 arg0) { - Player *temp_v0; + Player* temp_v0; temp_v0 = &gPlayerOne[arg0]; D_80183E40[0] = temp_v0->pos[0]; @@ -3291,8 +3440,8 @@ void func_8005285C(s32 arg0) { void func_800528EC(s32 arg0) { s32 var_s3; s32 objectIndex; - Object *object; - //Lights1 D_800E4620l = *(Lights1 *) LOAD_ASSET(D_800E4620); + Object* object; + // Lights1 D_800E4620l = *(Lights1 *) LOAD_ASSET(D_800E4620); D_80183E80[0] = D_8016582C[0]; D_80183E80[1] = D_8016582C[1]; @@ -3338,7 +3487,7 @@ void func_800528EC(s32 arg0) { void render_ice_block(s32 arg0) { s32 playerId; s32 objectIndex; - //Lights1 D_800E4620l = *(Lights1 *) LOAD_ASSET(D_800E4620); + // Lights1 D_800E4620l = *(Lights1 *) LOAD_ASSET(D_800E4620); D_800E4620.l[0].l.dir[0] = D_80165840[0]; D_800E4620.l[0].l.dir[1] = D_80165840[1]; D_800E4620.l[0].l.dir[2] = D_80165840[2]; @@ -3357,7 +3506,7 @@ void render_ice_block(s32 arg0) { void func_80052D70(s32 playerId) { s32 test; - Player *temp_v1; + Player* temp_v1; temp_v1 = &gPlayerOne[playerId]; test = gIndexLakituList[playerId]; @@ -3365,13 +3514,13 @@ void func_80052D70(s32 playerId) { D_80183E40[0] = temp_v1->pos[0]; D_80183E40[1] = temp_v1->unk_074 - 6.5; D_80183E40[2] = temp_v1->pos[2]; - func_800435A0(D_80183E40, (u16 *) D_80183E80, 0.02f, d_course_sherbet_land_dl_ice_block, 0x000000FF); + func_800435A0(D_80183E40, (u16*) D_80183E80, 0.02f, d_course_sherbet_land_dl_ice_block, 0x000000FF); } } void func_80052E30(UNUSED s32 arg0) { s32 var_s0; - //Lights1 D_800E4620l = *(Lights1 *) LOAD_ASSET(D_800E4620); + // Lights1 D_800E4620l = *(Lights1 *) LOAD_ASSET(D_800E4620); D_800E4620.l[0].l.dir[0] = D_80165840[0]; D_800E4620.l[0].l.dir[1] = D_80165840[1]; D_800E4620.l[0].l.dir[2] = D_80165840[2]; @@ -3389,10 +3538,10 @@ void func_80052E30(UNUSED s32 arg0) { void render_object_snowmans_list_2(s32 cameraId) { UNUSED s32 stackPadding[2]; - Camera *sp44; + Camera* sp44; s32 someIndex; s32 objectIndex; - Object *object; + Object* object; sp44 = &camera1[cameraId]; load_texture_and_tlut(d_course_frappe_snowland_snow_tlut, d_course_frappe_snowland_snow, 0x00000020, 0x00000020); @@ -3416,7 +3565,7 @@ void render_object_snowmans_list_2(s32 cameraId) { void render_object_snowmans_list_1(s32 cameraId) { s32 var_s4; s32 objectIndex; - Camera *camera; + Camera* camera; camera = &camera1[cameraId]; for (var_s4 = 0; var_s4 < NUM_SNOWMEN; var_s4++) { @@ -3425,15 +3574,22 @@ void render_object_snowmans_list_1(s32 cameraId) { func_8008A364(objectIndex, cameraId, 0x2AABU, 0x00000258); if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { D_80183E80[0] = (s16) gObjectList[objectIndex].orientation[0]; - D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); + D_80183E80[1] = + func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2]; if (is_obj_flag_status_active(objectIndex, 0x00000010) != 0) { - draw_2d_texture_at(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020); + draw_2d_texture_at(gObjectList[objectIndex].pos, (u16*) D_80183E80, + gObjectList[objectIndex].sizeScaling, (u8*) gObjectList[objectIndex].activeTLUT, + gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, + 0x00000040, 0x00000040, 0x00000040, 0x00000020); } objectIndex = indexObjectList2[var_s4]; D_80183E80[0] = (s16) gObjectList[objectIndex].orientation[0]; D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2]; - draw_2d_texture_at(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020); + draw_2d_texture_at(gObjectList[objectIndex].pos, (u16*) D_80183E80, + gObjectList[objectIndex].sizeScaling, (u8*) gObjectList[objectIndex].activeTLUT, + gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, + 0x00000040, 0x00000040, 0x00000020); } } } @@ -3446,11 +3602,11 @@ void render_object_snowmans(s32 arg0) { void render_lakitu(s32 cameraId) { UNUSED s32 stackPadding; - Camera *camera; + Camera* camera; f32 var_f0; f32 var_f2; s32 objectIndex; - Object *object; + Object* object; objectIndex = gIndexLakituList[cameraId]; camera = &camera1[cameraId]; @@ -3460,9 +3616,14 @@ void render_lakitu(s32 cameraId) { object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], camera->pos); object->orientation[2] = 0x8000; if (func_80072354(objectIndex, 2) != 0) { - draw_2d_texture_at(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2); + draw_2d_texture_at(object->pos, object->orientation, object->sizeScaling, (u8*) object->activeTLUT, + object->activeTexture, object->vertex, (s32) object->textureWidth, + (s32) object->textureHeight, (s32) object->textureWidth, + (s32) object->textureHeight / 2); } else { - func_800485C4(object->pos, object->orientation, object->sizeScaling, (s32) object->primAlpha, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2); + func_800485C4(object->pos, object->orientation, object->sizeScaling, (s32) object->primAlpha, + (u8*) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, + (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2); } if (gScreenModeSelection == SCREEN_MODE_1P) { var_f0 = object->pos[0] - D_8018CF14->pos[0]; @@ -3482,7 +3643,7 @@ void render_lakitu(s32 cameraId) { void func_800534A4(UNUSED s32 arg0) { func_800419F8(); - //Lights1 *D_800E4638l = (Lights1 *) LOAD_ASSET(D_800E4638); + // Lights1 *D_800E4638l = (Lights1 *) LOAD_ASSET(D_800E4638); D_800E4638.l[0].l.dir[0] = D_80165840[0]; D_800E4638.l[0].l.dir[1] = D_80165840[1]; D_800E4638.l[0].l.dir[2] = D_80165840[2]; @@ -3490,44 +3651,44 @@ void func_800534A4(UNUSED s32 arg0) { void func_800534E8(s32 objectIndex) { - //Lights1 *D_800E4638l = (Lights1 *) LOAD_ASSET(D_800E4638); - //Lights1 *D_800E4650l = (Lights1 *) LOAD_ASSET(D_800E4650); - //Lights1 *D_800E4668l = (Lights1 *) LOAD_ASSET(D_800E4668); - //Lights1 *D_800E4680l = (Lights1 *) LOAD_ASSET(D_800E4680); - //Lights1 *D_800E4698l = (Lights1 *) LOAD_ASSET(D_800E4698); - + // Lights1 *D_800E4638l = (Lights1 *) LOAD_ASSET(D_800E4638); + // Lights1 *D_800E4650l = (Lights1 *) LOAD_ASSET(D_800E4650); + // Lights1 *D_800E4668l = (Lights1 *) LOAD_ASSET(D_800E4668); + // Lights1 *D_800E4680l = (Lights1 *) LOAD_ASSET(D_800E4680); + // Lights1 *D_800E4698l = (Lights1 *) LOAD_ASSET(D_800E4698); // Why these don't just use `gSPSetLights1` calls... switch (gObjectList[objectIndex].type) { // hmm very strange 80165C18 - case 0: - gSPLight(gDisplayListHead++, &D_800E4638.l[0], LIGHT_1); - gSPLight(gDisplayListHead++, &D_800E4638.a, LIGHT_2); - break; - case 1: - gSPLight(gDisplayListHead++, &D_800E4650.l[0], LIGHT_1); - gSPLight(gDisplayListHead++, &D_800E4650.a, LIGHT_2); - break; - case 2: - gSPLight(gDisplayListHead++, &D_800E4668.l[0], LIGHT_1); - gSPLight(gDisplayListHead++, &D_800E4668.a, LIGHT_2); - break; - case 3: - gSPLight(gDisplayListHead++, &D_800E4680.l[0], LIGHT_1); - gSPLight(gDisplayListHead++, &D_800E4680.a, LIGHT_2); - break; - case 4: - gSPLight(gDisplayListHead++, &D_800E4698.l[0], LIGHT_1); - gSPLight(gDisplayListHead++, &D_800E4698.a, LIGHT_2); - break; - default: - break; + case 0: + gSPLight(gDisplayListHead++, &D_800E4638.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4638.a, LIGHT_2); + break; + case 1: + gSPLight(gDisplayListHead++, &D_800E4650.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4650.a, LIGHT_2); + break; + case 2: + gSPLight(gDisplayListHead++, &D_800E4668.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4668.a, LIGHT_2); + break; + case 3: + gSPLight(gDisplayListHead++, &D_800E4680.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4680.a, LIGHT_2); + break; + case 4: + gSPLight(gDisplayListHead++, &D_800E4698.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4698.a, LIGHT_2); + break; + default: + break; } } void render_object_thwomps_model(s32 objectIndex) { if ((gObjectList[objectIndex].state >= 2) && (func_80072354(objectIndex, 0x00000040) != 0)) { func_8004A7AC(objectIndex, 1.75f); - rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling); + rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, + gObjectList[objectIndex].sizeScaling); func_800534E8(objectIndex); gSPDisplayList(gDisplayListHead++, D_0D007828); gDPSetTextureLUT(gDisplayListHead++, G_TT_RGBA16); @@ -3542,9 +3703,9 @@ void render_object_thwomps(s32 cameraId) { s32 i; UNUSED s32 stackPadding0; s16 minusone, plusone; - Camera *camera; - Object *object; - //Lights1 *D_800E4668l = (Lights1 *) LOAD_ASSET(D_800E4668); + Camera* camera; + Object* object; + // Lights1 *D_800E4668l = (Lights1 *) LOAD_ASSET(D_800E4668); camera = &camera1[cameraId]; if (cameraId == PLAYER_ONE) { @@ -3561,7 +3722,8 @@ void render_object_thwomps(s32 cameraId) { minusone = gObjectList[objectIndex].unk_0DF - 1; plusone = gObjectList[objectIndex].unk_0DF + 1; if (gGamestate != 9) { - if ((D_8018CF68[cameraId] >= minusone) && (plusone >= D_8018CF68[cameraId]) && (is_object_visible_on_camera(objectIndex, camera, 0x8000U) != 0)) { + if ((D_8018CF68[cameraId] >= minusone) && (plusone >= D_8018CF68[cameraId]) && + (is_object_visible_on_camera(objectIndex, camera, 0x8000U) != 0)) { render_object_thwomps_model(objectIndex); } } else { @@ -3609,15 +3771,17 @@ void render_object_thwomps(s32 cameraId) { } void func_80053D74(s32 objectIndex, UNUSED s32 arg1, s32 vertexIndex) { - Object *object; + Object* object; - Vtx *vtx = (Vtx *) LOAD_ASSET(common_vtx_hedgehog); + Vtx* vtx = (Vtx*) LOAD_ASSET(common_vtx_hedgehog); if (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX) { object = &gObjectList[objectIndex]; D_80183E80[2] = (s16) (object->unk_084[6] + 0x8000); - rsp_set_matrix_transformation(object->pos, (u16 *) D_80183E80, object->sizeScaling); - set_color_render((s32) object->unk_084[0], (s32) object->unk_084[1], (s32) object->unk_084[2], (s32) object->unk_084[3], (s32) object->unk_084[4], (s32) object->unk_084[5], (s32) object->primAlpha); + rsp_set_matrix_transformation(object->pos, (u16*) D_80183E80, object->sizeScaling); + set_color_render((s32) object->unk_084[0], (s32) object->unk_084[1], (s32) object->unk_084[2], + (s32) object->unk_084[3], (s32) object->unk_084[4], (s32) object->unk_084[5], + (s32) object->primAlpha); gSPVertex(gDisplayListHead++, &vtx[vertexIndex], 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); } @@ -3641,11 +3805,11 @@ void func_80053E6C(s32 arg0) { } //! @bug This part is not rendering. + gDPLoadTextureBlock(gDisplayListHead++, gTextureBalloon2, G_IM_FMT_CI, G_IM_SIZ_8b, 64, 32, 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++, gTextureBalloon2, G_IM_FMT_CI, G_IM_SIZ_8b, 64, 32, 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); - - //rsp_load_texture(gTextureBalloon2, 64, 32); + // rsp_load_texture(gTextureBalloon2, 64, 32); for (var_s1 = 0; var_s1 < D_80165738; var_s1++) { objectIndex = gObjectParticle3[var_s1]; if ((objectIndex != NULL_OBJECT_ID) && (gObjectList[objectIndex].state >= 2)) { @@ -3654,15 +3818,17 @@ gDPLoadTextureBlock(gDisplayListHead++, gTextureBalloon2, G_IM_FMT_CI, G_IM_SIZ_ } } - void render_object_train_smoke_particle(s32 objectIndex, s32 cameraId) { - Camera *camera; + Camera* camera; camera = &camera1[cameraId]; if (objectIndex != NULL_OBJECT_ID) { - if ((gObjectList[objectIndex].state >= 2) && (gObjectList[objectIndex].unk_0D5 == 1) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { - set_color_render((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, 0, 0, 0, (s32) gObjectList[objectIndex].primAlpha); - D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); + if ((gObjectList[objectIndex].state >= 2) && (gObjectList[objectIndex].unk_0D5 == 1) && + (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { + set_color_render((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, + (s32) gObjectList[objectIndex].type, 0, 0, 0, (s32) gObjectList[objectIndex].primAlpha); + D_80183E80[1] = + func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D005AE0); } } @@ -3672,7 +3838,7 @@ void render_object_train_smoke_particle(s32 objectIndex, s32 cameraId) { void render_object_trains_smoke_particles(s32 cameraId) { UNUSED s32 pad; UNUSED s32 j; - Camera *camera; + Camera* camera; s32 i; camera = &camera1[cameraId]; @@ -3685,7 +3851,8 @@ void render_object_trains_smoke_particles(s32 cameraId) { // Render smoke for any number of trains. Don't know enough about these variables yet. #ifdef AVOID_UB_WIP for (j = 0; j < NUM_TRAINS; j++) { - if ((gTrainList[j].someFlags != 0) && (is_particle_on_screen(&gTrainList[j].locomotive.position, camera, 0x4000U) != 0)) { + if ((gTrainList[j].someFlags != 0) && + (is_particle_on_screen(&gTrainList[j].locomotive.position, camera, 0x4000U) != 0)) { for (i = 0; i < 128; i++) { // Need to make a way to increase this array for each train. @@ -3695,14 +3862,15 @@ void render_object_trains_smoke_particles(s32 cameraId) { } #else - if ((gTrainList[0].someFlags != 0) && (is_particle_on_screen(gTrainList[0].locomotive.position, camera, 0x4000U) != 0)) { + if ((gTrainList[0].someFlags != 0) && + (is_particle_on_screen(gTrainList[0].locomotive.position, camera, 0x4000U) != 0)) { for (i = 0; i < gObjectParticle2_SIZE; i++) { render_object_train_smoke_particle(gObjectParticle2[i], cameraId); } - } - if ((gTrainList[1].someFlags != 0) && (is_particle_on_screen(gTrainList[1].locomotive.position, camera, 0x4000U) != 0)) { + if ((gTrainList[1].someFlags != 0) && + (is_particle_on_screen(gTrainList[1].locomotive.position, camera, 0x4000U) != 0)) { for (i = 0; i < gObjectParticle3_SIZE; i++) { render_object_train_smoke_particle(gObjectParticle3[i], cameraId); } @@ -3711,13 +3879,18 @@ void render_object_trains_smoke_particles(s32 cameraId) { } void render_object_paddle_boat_smoke_particle(s32 objectIndex, s32 cameraId) { - Camera *camera; + Camera* camera; camera = &camera1[cameraId]; if (objectIndex != NULL_OBJECT_ID) { - if ((gObjectList[objectIndex].state >= 2) && (gObjectList[objectIndex].unk_0D5 == 6) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { - set_color_render((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, (s32) gObjectList[objectIndex].primAlpha); - D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); + if ((gObjectList[objectIndex].state >= 2) && (gObjectList[objectIndex].unk_0D5 == 6) && + (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { + set_color_render((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, + (s32) gObjectList[objectIndex].type, gObjectList[objectIndex].unk_0A2, + gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, + (s32) gObjectList[objectIndex].primAlpha); + D_80183E80[1] = + func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D005AE0); } } @@ -3726,7 +3899,7 @@ void render_object_paddle_boat_smoke_particle(s32 objectIndex, s32 cameraId) { // Likely smoke related. void render_object_paddle_boat_smoke_particles(s32 cameraId) { UNUSED s32 pad[2]; - Camera *camera; + Camera* camera; s32 i; camera = &camera1[cameraId]; @@ -3749,8 +3922,8 @@ void render_object_paddle_boat_smoke_particles(s32 cameraId) { } void render_object_bowser_flame_particle(s32 objectIndex, s32 cameraId) { - Camera *camera; - Object *object; + Camera* camera; + Object* object; camera = &camera1[cameraId]; if (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX) { @@ -3784,7 +3957,7 @@ void render_object_bowser_flame(s32 cameraId) { void func_8005477C(s32 objectIndex, u8 arg1, Vec3f arg2) { if (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX) { - switch (arg1) { /* irregular */ + switch (arg1) { /* irregular */ case 0: set_color_render(0xE6, 0xFF, 0xFF, 0x00, 0x00, 0xFF, (s32) gObjectList[objectIndex].primAlpha); break; @@ -3807,10 +3980,10 @@ void func_8005477C(s32 objectIndex, u8 arg1, Vec3f arg2) { void render_object_smoke_particles(s32 cameraId) { UNUSED s32 stackPadding[2]; - Camera *sp54; + Camera* sp54; s32 var_s0; s32 objectIndex; - Object *object; + Object* object; sp54 = &camera1[cameraId]; gSPDisplayList(gDisplayListHead++, D_0D007AE0); @@ -3840,8 +4013,10 @@ void func_80054AFC(s32 objectIndex, Vec3f arg1) { D_80183E80[0] = func_800418E8(gObjectList[objectIndex].pos[2], gObjectList[objectIndex].pos[1], arg1); D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], arg1); D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2]; - func_8004B138((s32) gObjectList[objectIndex].unk_084[0], (s32) gObjectList[objectIndex].unk_084[1], (s32) gObjectList[objectIndex].unk_084[2], (s32) gObjectList[objectIndex].primAlpha); - rsp_set_matrix_transformation(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling); + func_8004B138((s32) gObjectList[objectIndex].unk_084[0], (s32) gObjectList[objectIndex].unk_084[1], + (s32) gObjectList[objectIndex].unk_084[2], (s32) gObjectList[objectIndex].primAlpha); + rsp_set_matrix_transformation(gObjectList[objectIndex].pos, (u16*) D_80183E80, + gObjectList[objectIndex].sizeScaling); gSPVertex(gDisplayListHead++, D_0D005AE0, 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); } @@ -3849,7 +4024,7 @@ void func_80054AFC(s32 objectIndex, Vec3f arg1) { void func_80054BE8(s32 cameraId) { s32 var_s0; s32 temp_a0; - Camera *camera; + Camera* camera; camera = &camera1[cameraId]; gSPDisplayList(gDisplayListHead++, D_0D007AE0); @@ -3865,16 +4040,19 @@ void func_80054BE8(s32 cameraId) { } void func_80054D00(s32 objectIndex, s32 cameraId) { - Camera *camera; + Camera* camera; camera = &camera1[cameraId]; if (gObjectList[objectIndex].state >= 3) { func_8008A364(objectIndex, cameraId, 0x2AABU, 0x0000012C); if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { D_80183E80[0] = (s16) gObjectList[objectIndex].orientation[0]; - D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); + D_80183E80[1] = + func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2]; - func_80048130(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, LOAD_ASSET(D_0D0062B0), 0x00000020, 0x00000040, 0x00000020, 0x00000040, 5); + func_80048130(gObjectList[objectIndex].pos, (u16*) D_80183E80, gObjectList[objectIndex].sizeScaling, + (u8*) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, + LOAD_ASSET(D_0D0062B0), 0x00000020, 0x00000040, 0x00000020, 0x00000040, 5); } } } @@ -3905,12 +4083,12 @@ void func_80054EB8(UNUSED s32 unused) { void func_80054F04(s32 cameraId) { s32 var_s2; s32 objectIndex; - Camera *sp44; - Object *object; + Camera* sp44; + Object* object; sp44 = &camera1[cameraId]; gSPDisplayList(gDisplayListHead++, D_0D0079C8); - load_texture_block_rgba16_mirror((u8 *)LOAD_ASSET(d_course_moo_moo_farm_mole_dirt), 0x00000010, 0x00000010); + load_texture_block_rgba16_mirror((u8*) LOAD_ASSET(d_course_moo_moo_farm_mole_dirt), 0x00000010, 0x00000010); for (var_s2 = 0; var_s2 < gObjectParticle2_SIZE; var_s2++) { objectIndex = gObjectParticle2[var_s2]; object = &gObjectList[objectIndex]; @@ -3945,11 +4123,15 @@ void render_object_moles(s32 cameraId) { void func_80055164(s32 objectIndex) { if (gObjectList[objectIndex].state >= 2) { gSPDisplayList(gDisplayListHead++, D_0D0077A0); - rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].direction_angle, gObjectList[objectIndex].sizeScaling); + rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].direction_angle, + gObjectList[objectIndex].sizeScaling); if (gIsGamePaused == 0) { - gObjectList[objectIndex].unk_0A2 = render_animated_model((Armature *) gObjectList[objectIndex].model, (Animation **) gObjectList[objectIndex].vertex, 0, gObjectList[objectIndex].unk_0A2); + gObjectList[objectIndex].unk_0A2 = render_animated_model((Armature*) gObjectList[objectIndex].model, + (Animation**) gObjectList[objectIndex].vertex, 0, + gObjectList[objectIndex].unk_0A2); } else { - render_animated_model((Armature *) gObjectList[objectIndex].model, (Animation **) gObjectList[objectIndex].vertex, 0, gObjectList[objectIndex].unk_0A2); + render_animated_model((Armature*) gObjectList[objectIndex].model, + (Animation**) gObjectList[objectIndex].vertex, 0, gObjectList[objectIndex].unk_0A2); } } } @@ -3969,12 +4151,16 @@ void func_80055228(s32 cameraId) { void func_800552BC(s32 objectIndex) { if (gObjectList[objectIndex].state >= 2) { - rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].direction_angle, gObjectList[objectIndex].sizeScaling); + rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].direction_angle, + gObjectList[objectIndex].sizeScaling); gSPDisplayList(gDisplayListHead++, D_0D0077D0); if (gIsGamePaused == 0) { - gObjectList[objectIndex].unk_0A2 = render_animated_model((Armature *) gObjectList[objectIndex].model, (Animation **) gObjectList[objectIndex].vertex, 0, gObjectList[objectIndex].unk_0A2); + gObjectList[objectIndex].unk_0A2 = render_animated_model((Armature*) gObjectList[objectIndex].model, + (Animation**) gObjectList[objectIndex].vertex, 0, + gObjectList[objectIndex].unk_0A2); } else { - render_animated_model((Armature *) gObjectList[objectIndex].model, (Animation **) gObjectList[objectIndex].vertex, 0, gObjectList[objectIndex].unk_0A2); + render_animated_model((Armature*) gObjectList[objectIndex].model, + (Animation**) gObjectList[objectIndex].vertex, 0, gObjectList[objectIndex].unk_0A2); } } } @@ -3996,14 +4182,18 @@ void render_object_seagulls(s32 arg0) { } void draw_crabs(s32 objectIndex, s32 cameraId) { - Camera *camera; + Camera* camera; if (gObjectList[objectIndex].state >= 2) { - Vtx *vtx = (Vtx *) LOAD_ASSET(common_vtx_hedgehog); + Vtx* vtx = (Vtx*) LOAD_ASSET(common_vtx_hedgehog); camera = &camera1[cameraId]; func_8004A6EC(objectIndex, 0.5f); - gObjectList[objectIndex].orientation[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); - draw_2d_texture_at(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, vtx, 0x00000040, 0x00000040, 0x00000040, 0x00000020); + gObjectList[objectIndex].orientation[1] = + func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); + draw_2d_texture_at(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, + gObjectList[objectIndex].sizeScaling, (u8*) gObjectList[objectIndex].activeTLUT, + gObjectList[objectIndex].activeTexture, common_vtx_hedgehog, 0x00000040, 0x00000040, + 0x00000040, 0x00000020); } } @@ -4021,13 +4211,16 @@ void render_object_crabs(s32 arg0) { } void func_800555BC(s32 objectIndex, s32 cameraId) { - Camera *camera; + Camera* camera; if (gObjectList[objectIndex].state >= 2) { camera = &camera1[cameraId]; func_8004A870(objectIndex, 0.7f); - gObjectList[objectIndex].orientation[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); - draw_2d_texture_at(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 64, 64, 64, 32); + gObjectList[objectIndex].orientation[1] = + func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); + draw_2d_texture_at(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, + gObjectList[objectIndex].sizeScaling, (u8*) gObjectList[objectIndex].activeTLUT, + gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 64, 64, 64, 32); } } @@ -4057,12 +4250,11 @@ void render_object_hedgehogs(s32 arg0) { } UNUSED void func_800557AC() { - } void func_800557B4(s32 objectIndex, u32 arg1, u32 arg2) { Vec3f sp34; - Object *object; + Object* object; object = &gObjectList[objectIndex]; if (object->state >= 2) { @@ -4072,9 +4264,11 @@ void func_800557B4(s32 objectIndex, u32 arg1, u32 arg2) { sp34[0] = object->pos[0]; sp34[1] = object->pos[1] - 1.0; sp34[2] = object->pos[2]; - rsp_set_matrix_transformation_inverted_x_y_orientation(sp34, object->orientation, object->sizeScaling); + rsp_set_matrix_transformation_inverted_x_y_orientation(sp34, object->orientation, + object->sizeScaling); gSPDisplayList(gDisplayListHead++, D_0D0077D0); - render_animated_model((Armature *) object->model, (Animation **) object->vertex, (s16) object->unk_0D8, (s16) object->itemDisplay); + render_animated_model((Armature*) object->model, (Animation**) object->vertex, + (s16) object->unk_0D8, (s16) object->itemDisplay); } } else if (arg1 < 0x15F91U) { func_8004A7AC(objectIndex, 1.5f); @@ -4082,7 +4276,8 @@ void func_800557B4(s32 objectIndex, u32 arg1, u32 arg2) { } rsp_set_matrix_transformation(object->pos, object->orientation, object->sizeScaling); gSPDisplayList(gDisplayListHead++, D_0D0077D0); - render_animated_model((Armature *) object->model, (Animation **) object->vertex, (s16) object->unk_0D8, (s16) object->itemDisplay); + render_animated_model((Armature*) object->model, (Animation**) object->vertex, (s16) object->unk_0D8, + (s16) object->itemDisplay); } } @@ -4131,7 +4326,7 @@ void render_object_train_penguins(s32 cameraId) { } void func_80055AB8(s32 objectIndex, s32 cameraId) { - Camera *camera; + Camera* camera; camera = &camera1[cameraId]; if (gObjectList[objectIndex].state >= 2) { @@ -4140,13 +4335,18 @@ void func_80055AB8(s32 objectIndex, s32 cameraId) { D_80183E40[1] = gObjectList[objectIndex].pos[1] + 16.0; D_80183E40[2] = gObjectList[objectIndex].pos[2]; D_80183E80[0] = 0; - D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); + D_80183E80[1] = + func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); D_80183E80[2] = 0x8000; - func_800468E0(D_80183E40, D_80183E80, 0.54f, d_course_rainbow_road_sphere, D_0D0062B0, 0x00000020, 0x00000040, 0x00000020, 0x00000040, 5); + func_800468E0(D_80183E40, D_80183E80, 0.54f, d_course_rainbow_road_sphere, D_0D0062B0, 0x00000020, + 0x00000040, 0x00000020, 0x00000040, 5); } else { - rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].direction_angle, gObjectList[objectIndex].sizeScaling); + rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].direction_angle, + gObjectList[objectIndex].sizeScaling); gSPDisplayList(gDisplayListHead++, D_0D0077D0); - render_animated_model((Armature *) gObjectList[objectIndex].model, (Animation **) gObjectList[objectIndex].vertex, 0, (s16) gObjectList[objectIndex].itemDisplay); + render_animated_model((Armature*) gObjectList[objectIndex].model, + (Animation**) gObjectList[objectIndex].vertex, 0, + (s16) gObjectList[objectIndex].itemDisplay); } } } @@ -4167,7 +4367,7 @@ void render_object_chain_chomps(s32 cameraId) { void func_80055CCC(s32 objectIndex, s32 cameraId) { UNUSED s32 pad; f32 test; - Camera *camera; + Camera* camera; camera = &camera1[cameraId]; if (gObjectList[objectIndex].state >= 2) { @@ -4175,13 +4375,17 @@ void func_80055CCC(s32 objectIndex, s32 cameraId) { test = gObjectList[objectIndex].pos[1] - gObjectList[objectIndex].surfaceHeight; func_8004A6EC(objectIndex, (20.0 / test) + 0.5); if (is_obj_index_flag_status_inactive(objectIndex, 0x00100000) != 0) { - func_80043328(gObjectList[objectIndex].pos, (u16 *) gObjectList[objectIndex].direction_angle, gObjectList[objectIndex].sizeScaling, d_course_luigi_raceway_dl_F960); + func_80043328(gObjectList[objectIndex].pos, (u16*) gObjectList[objectIndex].direction_angle, + gObjectList[objectIndex].sizeScaling, d_course_luigi_raceway_dl_F960); gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_dl_F650); } else { D_80183E80[0] = (s16) gObjectList[objectIndex].direction_angle[0]; - D_80183E80[1] = (s16) (func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos) + 0x8000); + D_80183E80[1] = + (s16) (func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos) + + 0x8000); D_80183E80[2] = (u16) gObjectList[objectIndex].direction_angle[2]; - func_80043328(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, d_course_luigi_raceway_dl_FBE0); + func_80043328(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, + d_course_luigi_raceway_dl_FBE0); gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_dl_FA20); if (gPlayerCountSelection1 == 1) { gObjectList[objectIndex].direction_angle[1] = 0; @@ -4205,7 +4409,7 @@ void render_object_hot_air_balloon(s32 arg0) { } void func_80055EF4(s32 objectIndex, UNUSED s32 arg1) { - Object *object; + Object* object; object = &gObjectList[objectIndex]; if (object->state >= 2) { @@ -4224,18 +4428,22 @@ void func_80055F48(s32 arg0) { void func_80055FA0(s32 objectIndex, UNUSED s32 arg1) { Mat4 someMatrix1; Mat4 someMatrix2; - Object *object; + Object* object; object = &gObjectList[objectIndex]; if (object->state >= 2) { - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - mtxf_set_matrix_transformation(someMatrix1,object->pos, object->direction_angle, object->sizeScaling); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + mtxf_set_matrix_transformation(someMatrix1, object->pos, object->direction_angle, object->sizeScaling); convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], someMatrix1); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), + G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gDisplayListHead++, D_0D0077A0); gSPDisplayList(gDisplayListHead++, object->model); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), + G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); mtxf_identity(someMatrix2); render_set_position(someMatrix2, 0); } @@ -4246,35 +4454,39 @@ void func_80056160(s32 arg0) { } void render_object_neon(s32 cameraId) { - Camera *camera; + Camera* camera; s32 var_s2; s32 objectIndex; - Object *object; + Object* object; camera = &camera1[cameraId]; - for (var_s2 =0; var_s2 < 10; var_s2++) { + for (var_s2 = 0; var_s2 < 10; var_s2++) { objectIndex = indexObjectList1[var_s2]; if (D_8018E838[cameraId] == 0) { object = &gObjectList[objectIndex]; - if ((object->state >= 2) && (is_obj_index_flag_status_inactive(objectIndex, 0x00080000) != 0) && (is_object_visible_on_camera(objectIndex, camera, 0x2AABU) != 0)) { - Vtx *vtx = (Vtx *) LOAD_ASSET(common_vtx_hedgehog); + if ((object->state >= 2) && (is_obj_index_flag_status_inactive(objectIndex, 0x00080000) != 0) && + (is_object_visible_on_camera(objectIndex, camera, 0x2AABU) != 0)) { + Vtx* vtx = (Vtx*) LOAD_ASSET(common_vtx_hedgehog); object->orientation[1] = angle_between_object_camera(objectIndex, camera); - draw_2d_texture_at(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, vtx, 0x00000040, 0x00000040, 0x00000040, 0x00000020); + draw_2d_texture_at(object->pos, object->orientation, object->sizeScaling, (u8*) object->activeTLUT, + object->activeTexture, vtx, 0x00000040, 0x00000040, 0x00000040, 0x00000020); } } } } Vec3iu D_800E46F8A[] = { - {255, 255, 255}, {255, 255, 0}, {255, 0, 0}, + { 255, 255, 255 }, + { 255, 255, 0 }, + { 255, 0, 0 }, }; u8 D_800E471CA[] = { - 0, 1, 2, 3, 2, 1, 0, + 0, 1, 2, 3, 2, 1, 0, }; void func_800562E4(s32 arg0, s32 arg1, s32 arg2) { - //Vec3iu *A_800E46F8 = LOAD_ASSET(D_800E46F8); + // Vec3iu *A_800E46F8 = LOAD_ASSET(D_800E46F8); D_80165860 = D_800E46F8A[arg0][0]; D_8016586C = D_800E46F8A[arg0][1]; @@ -4290,8 +4502,8 @@ void func_800563DC(s32 objectIndex, s32 cameraId, s32 arg2) { s32 temp_s0; s32 temp_v0; s32 residue; - Camera *camera; - Object *object; + Camera* camera; + Object* object; camera = &camera1[cameraId]; object = &gObjectList[objectIndex]; @@ -4305,7 +4517,8 @@ void func_800563DC(s32 objectIndex, s32 cameraId, s32 arg2) { rsp_set_matrix_transformation(D_80183E40, D_80183E80, 0.2f); gSPDisplayList(gDisplayListHead++, D_0D007E98); func_8004B310(arg2); - draw_rectangle_texture_overlap((u8*) common_tlut_bomb, common_texture_bomb[residue], D_0D005AE0, 0x00000020, 0x00000020, 0x00000020, 0x00000020); + draw_rectangle_texture_overlap((u8*) common_tlut_bomb, common_texture_bomb[residue], D_0D005AE0, 0x00000020, + 0x00000020, 0x00000020, 0x00000020); temp_s0 = D_8018D400; gSPDisplayList(gDisplayListHead++, D_0D007B00); func_8004B414(0, 0, 0, arg2); @@ -4343,7 +4556,7 @@ void func_8005669C(s32 objectIndex, UNUSED s32 arg1, s32 arg2) { void func_800568A0(s32 objectIndex, s32 playerId) { Mat4 sp30; - Player *player; + Player* player; player = &gPlayerOne[playerId]; D_80183E50[0] = gObjectList[objectIndex].pos[0]; @@ -4351,7 +4564,8 @@ void func_800568A0(s32 objectIndex, s32 playerId) { D_80183E50[2] = gObjectList[objectIndex].pos[2]; set_transform_matrix(sp30, player->collision.orientationVector, D_80183E50, 0U, 0.5f); convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], sp30); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gDisplayListHead++, D_0D007B98); } @@ -4376,11 +4590,11 @@ void func_80056A94(s32 playerIndex) { } void render_object_bomb_kart(s32 cameraId) { - Player *temp_v0; + Player* temp_v0; s32 temp_s1; s32 temp_s0; s32 payerId; - Object *object; + Object* object; for (payerId = 0; payerId < NUM_BOMB_KARTS_BATTLE; payerId++) { temp_s0 = gIndexObjectBombKart[payerId]; @@ -4404,7 +4618,7 @@ void func_80056BF0(s32 bombIndex) { u8 thing; s32 temp_s0; s32 temp_v0; - u8 *bombFrame; + u8* bombFrame; BombKart sp40 = gBombKarts[bombIndex]; temp_v0 = D_801655CC % 6U; @@ -4413,7 +4627,8 @@ void func_80056BF0(s32 bombIndex) { D_80183E40[0] = sp40.bombPos[0]; D_80183E40[1] = sp40.bombPos[1] + 1.0; D_80183E40[2] = sp40.bombPos[2]; - draw_2d_texture_at(D_80183E40, D_80183E80, 0.25f, (u8*) common_tlut_bomb, bombFrame, D_0D005AE0, 0x20, 0x20, 0x20, 0x20); + draw_2d_texture_at(D_80183E40, D_80183E80, 0.25f, (u8*) common_tlut_bomb, bombFrame, D_0D005AE0, 0x20, 0x20, 0x20, + 0x20); temp_s0 = D_8018D400; gSPDisplayList(gDisplayListHead++, D_0D007B00); func_8004B414(0, 0, 0, 0xFF); @@ -4449,7 +4664,7 @@ void func_80056E24(s32 bombIndex, Vec3f arg1) { void func_80056FCC(s32 bombIndex) { Mat4 mat; - BombKart *temp_v0; + BombKart* temp_v0; temp_v0 = &gBombKarts[bombIndex]; D_80183E50[0] = temp_v0->bombPos[0]; @@ -4457,17 +4672,18 @@ void func_80056FCC(s32 bombIndex) { D_80183E50[2] = temp_v0->bombPos[2]; set_transform_matrix(mat, D_80164038[bombIndex].orientationVector, D_80183E50, 0U, 0.5f); convert_to_fixed_point_matrix(&gGfxPool->mtxHud[gMatrixHudCount], mat); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), G_MTX_LOAD | G_MTX_NOPUSH| G_MTX_MODELVIEW); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxHud[gMatrixHudCount++]), + G_MTX_LOAD | G_MTX_NOPUSH | G_MTX_MODELVIEW); gSPDisplayList(gDisplayListHead++, D_0D007B98); } void func_80057114(s32 cameraId) { - Camera *camera; + Camera* camera; s32 objectIndex; s32 temp_s4; s32 i; s32 state; - BombKart *var_s1_2; + BombKart* var_s1_2; if (gGamestate == 5) { cameraId = 0; @@ -4511,7 +4727,6 @@ void func_80057114(s32 cameraId) { } UNUSED void func_80057330(void) { - } UNUSED void func_80057338(void) { @@ -4523,30 +4738,24 @@ UNUSED void func_80057338(void) { } UNUSED void func_800573BC(void) { - } UNUSED void func_800573C4(void) { - } UNUSED void func_800573CC(void) { - } UNUSED void func_800573D4(void) { - } UNUSED void func_800573DC(void) { - } - void func_800573E4(s32 x, s32 y, s8 str) { func_8004B7DC(x, y, 8, 8, (((str % 16) * 8) << 16) >> 16, (((unsigned short) (str / 16)) << 19) >> 16, 0); } -void debug_wrap_text(s32 *x, s32 *y) { +void debug_wrap_text(s32* x, s32* y) { *x += 8; if (*x >= 296) { *x = 20; @@ -4554,23 +4763,22 @@ void debug_wrap_text(s32 *x, s32 *y) { } } -void debug_print_string(s32 *x, s32 *y, char *arg2) { +void debug_print_string(s32* x, s32* y, char* arg2) { *x += 20; *y += 20; while (*arg2 != '\0') { - if (D_800E5628[(s32)*arg2] >= 0) { - func_800573E4(*x, *y, D_800E5628[(s32)*arg2]); + if (D_800E5628[(s32) *arg2] >= 0) { + func_800573E4(*x, *y, D_800E5628[(s32) *arg2]); } debug_wrap_text(x, y); arg2++; } } -void debug_print_number(s32 *x, s32 *y, s32 number, u32 numDigits) -{ +void debug_print_number(s32* x, s32* y, s32 number, u32 numDigits) { s32 n; - s8 *ptr; + s8* ptr; s8 remainder; debug_wrap_text(x, y); @@ -4596,7 +4804,7 @@ void debug_print_number(s32 *x, s32 *y, s32 number, u32 numDigits) do { func_800573E4(*x, *y, *ptr--); debug_wrap_text(x, y); - } while (*ptr != -1); + } while (*ptr != -1); } /** @@ -4604,9 +4812,9 @@ void debug_print_number(s32 *x, s32 *y, s32 number, u32 numDigits) * Index zero is a null/0xFF flag. * The other indexes increment 0-9 * The final index (10) increments the tenth digit. -*/ -void func_8005762C(s32 *x, s32 *y, s32 pathCount, u32 numDigits) { - s8 *ptr; + */ +void func_8005762C(s32* x, s32* y, s32 pathCount, u32 numDigits) { + s8* ptr; s32 count; s8 remainder; @@ -4633,79 +4841,78 @@ void func_8005762C(s32 *x, s32 *y, s32 pathCount, u32 numDigits) { } UNUSED void func_80057708() { - } void load_debug_font(void) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D008080); //! todo: Implement alpha compare - // gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); + // gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); } void func_80057778(void) { gSPDisplayList(gDisplayListHead++, D_0D007EB8); } -void debug_print_str2(s32 xPos, s32 yPos, char *str) { +void debug_print_str2(s32 xPos, s32 yPos, char* str) { debug_print_string(&xPos, &yPos, str); } -void print_str_num(s32 arg0, s32 arg1, char *arg2, s32 arg3) { +void print_str_num(s32 arg0, s32 arg1, char* arg2, s32 arg3) { debug_print_string(&arg0, &arg1, arg2); debug_print_number(&arg0, &arg1, arg3, 10); } -UNUSED void func_80057814(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +UNUSED void func_80057814(s32 arg0, s32 arg1, char* arg2, u32 arg3) { debug_print_string(&arg0, &arg1, arg2); func_8005762C(&arg0, &arg1, arg3, 10); } -UNUSED void func_80057858(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +UNUSED void func_80057858(s32 arg0, s32 arg1, char* arg2, u32 arg3) { debug_print_string(&arg0, &arg1, arg2); debug_print_number(&arg0, &arg1, arg3, 16); func_800573E4(arg0, arg1, D_800E5628[0x48]); } -UNUSED void func_800578B0(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +UNUSED void func_800578B0(s32 arg0, s32 arg1, char* arg2, u32 arg3) { debug_print_string(&arg0, &arg1, arg2); func_8005762C(&arg0, &arg1, arg3, 16); func_800573E4(arg0, arg1, D_800E5628[0x48]); } -UNUSED void func_80057908(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +UNUSED void func_80057908(s32 arg0, s32 arg1, char* arg2, u32 arg3) { debug_print_string(&arg0, &arg1, arg2); debug_print_number(&arg0, &arg1, arg3, 2); func_800573E4(arg0, arg1, D_800E5628[0x42]); } -UNUSED void func_80057960(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +UNUSED void func_80057960(s32 arg0, s32 arg1, char* arg2, u32 arg3) { debug_print_string(&arg0, &arg1, arg2); func_8005762C(&arg0, &arg1, arg3, 2); func_800573E4(arg0, arg1, D_800E5628[0x42]); } -UNUSED void func_800579B8(s32 arg0, s32 arg1, char *arg2) { +UNUSED void func_800579B8(s32 arg0, s32 arg1, char* arg2) { load_debug_font(); debug_print_string(&arg0, &arg1, arg2); func_80057778(); } -void func_800579F8(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +void func_800579F8(s32 arg0, s32 arg1, char* arg2, u32 arg3) { load_debug_font(); debug_print_string(&arg0, &arg1, arg2); debug_print_number(&arg0, &arg1, arg3, 10); func_80057778(); } -void func_80057A50(s32 x, s32 y, char *str, u32 arg3) { +void func_80057A50(s32 x, s32 y, char* str, u32 arg3) { load_debug_font(); debug_print_string(&x, &y, str); func_8005762C(&x, &y, arg3, 10); func_80057778(); } -UNUSED void func_80057AA8(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +UNUSED void func_80057AA8(s32 arg0, s32 arg1, char* arg2, u32 arg3) { load_debug_font(); debug_print_string(&arg0, &arg1, arg2); debug_print_number(&arg0, &arg1, arg3, 16); @@ -4713,7 +4920,7 @@ UNUSED void func_80057AA8(s32 arg0, s32 arg1, char *arg2, u32 arg3) { func_80057778(); } -UNUSED void func_80057B14(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +UNUSED void func_80057B14(s32 arg0, s32 arg1, char* arg2, u32 arg3) { load_debug_font(); debug_print_string(&arg0, &arg1, arg2); func_8005762C(&arg0, &arg1, arg3, 16); @@ -4721,7 +4928,7 @@ UNUSED void func_80057B14(s32 arg0, s32 arg1, char *arg2, u32 arg3) { func_80057778(); } -UNUSED void func_80057B80(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +UNUSED void func_80057B80(s32 arg0, s32 arg1, char* arg2, u32 arg3) { load_debug_font(); debug_print_string(&arg0, &arg1, arg2); debug_print_number(&arg0, &arg1, arg3, 2); @@ -4729,7 +4936,7 @@ UNUSED void func_80057B80(s32 arg0, s32 arg1, char *arg2, u32 arg3) { func_80057778(); } -UNUSED void func_80057BEC(s32 arg0, s32 arg1, char *arg2, u32 arg3) { +UNUSED void func_80057BEC(s32 arg0, s32 arg1, char* arg2, u32 arg3) { load_debug_font(); debug_print_string(&arg0, &arg1, arg2); func_8005762C(&arg0, &arg1, arg3, 2); |
