diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2024-04-20 19:10:53 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-20 19:10:53 -0600 |
| commit | 7a10ba89f6bf26fd4b659510fefb2ce1cd315f02 (patch) | |
| tree | a06fc0b8288801398c24c96e80b0320cf513c9de /src | |
| parent | 4df64731472064ac5452b62fb867e59a18487852 (diff) | |
Header cleanup and some renames (#616)
* Place macros for addr conversions
* dl renames
* fixes
* changes ok
* Delete types.h
* move enums
Diffstat (limited to 'src')
59 files changed, 101 insertions, 70 deletions
diff --git a/src/actors/green_shell/update.inc.c b/src/actors/green_shell/update.inc.c index 891292953..cae0c9470 100644 --- a/src/actors/green_shell/update.inc.c +++ b/src/actors/green_shell/update.inc.c @@ -1,6 +1,5 @@ #include <actors.h> #include <main.h> -#include <types.h> #include <code_800029B0.h> #include <defines.h> #include "collision.h" diff --git a/src/actors/paddle_boat/render.inc.c b/src/actors/paddle_boat/render.inc.c index 40c37b165..379b7455d 100644 --- a/src/actors/paddle_boat/render.inc.c +++ b/src/actors/paddle_boat/render.inc.c @@ -37,8 +37,8 @@ void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED if (render_set_position(spE0, 1) != 0) { // Render the boat - gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E730); - gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E058); + gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_boat_dl); + gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_railings_dl); mtxf_rotate_x(spE0, boat->wheelRot); vec3f_set(sp120, 0, 16.0f, -255.0f); @@ -47,7 +47,7 @@ void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED if (render_set_position(sp60, 3) != 0) { // Render the paddle wheel gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_FC28); + gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_paddle_wheel_dl); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } diff --git a/src/audio/external.c b/src/audio/external.c index ac6f94545..a46e63712 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -1,5 +1,6 @@ #include <ultra64.h> #include <macros.h> +#include <mk64.h> #include <defines.h> #include "camera.h" #include "math_util_2.h" diff --git a/src/audio/internal.h b/src/audio/internal.h index 5a96d950b..85ea368c9 100644 --- a/src/audio/internal.h +++ b/src/audio/internal.h @@ -3,7 +3,6 @@ #include <ultra64.h> -#include "types.h" #define SEQUENCE_PLAYERS 4 #define SEQUENCE_CHANNELS 48 diff --git a/src/buffers.h b/src/buffers.h index 51c949536..13584036d 100644 --- a/src/buffers.h +++ b/src/buffers.h @@ -2,7 +2,7 @@ #define BUFFERS_H #include <PR/ultratypes.h> -#include "config.h" +#include <mk64.h> #include "common_structs.h" /* diff --git a/src/buffers/buffers.c b/src/buffers/buffers.c index cbdaae317..cc08aa60a 100644 --- a/src/buffers/buffers.c +++ b/src/buffers/buffers.c @@ -1,6 +1,6 @@ #include <ultra64.h> #include <macros.h> -#include "config.h" +#include <mk64.h> #include "buffers.h" ALIGNED8 union_D_802BFB80 D_802BFB80; diff --git a/src/buffers/random.h b/src/buffers/random.h index f144f7843..bb7aefa8b 100644 --- a/src/buffers/random.h +++ b/src/buffers/random.h @@ -1,4 +1,9 @@ +#ifndef RANDOM_H +#define RANDOM_H + #include <ultra64.h> extern u16 gRandomSeed16; extern u8 randomSeedPadding[]; + +#endif // RANDOM_H
\ No newline at end of file diff --git a/src/camera.c b/src/camera.c index 43f9d26fe..0ff40d9be 100644 --- a/src/camera.c +++ b/src/camera.c @@ -3,6 +3,7 @@ #include <common_structs.h> #include <defines.h> #include <libc/math.h> +#include <mk64.h> #include "camera.h" #include "code_800029B0.h" diff --git a/src/code_800029B0.c b/src/code_800029B0.c index a665de1b8..c55bcc712 100644 --- a/src/code_800029B0.c +++ b/src/code_800029B0.c @@ -1,8 +1,8 @@ #include <ultra64.h> #include <macros.h> +#include <mk64.h> #include "code_800029B0.h" -#include "types.h" #include "memory.h" #include "waypoints.h" #include "actors.h" diff --git a/src/code_800029B0.h b/src/code_800029B0.h index 30ee796d7..40376ff2e 100644 --- a/src/code_800029B0.h +++ b/src/code_800029B0.h @@ -3,8 +3,29 @@ #include <macros.h> #include <ultra64.h> -#include <types.h> #include <actor_types.h> +#include "camera.h" + +struct UnkStruct_800DC5EC { + /* 0x00 */ struct Controller *controllers; // gControllers ptr 800F6910 + /* 0x04 */ Camera *camera; // Player camera ptr + /* 0x08 */ Player *player; // Player ptr 800F6990 + /* 0x0C */ s32 *unkC; // unk struct? + /* 0x10 */ Vp viewport; + /* 0x20 */ s32 pad[2]; + /* 0x28 */ s16 cameraHeight; + /* 0x2A */ s16 unk; + /* 0x2C */ s16 screenWidth; + /* 0x2E */ s16 screenHeight; + /* 0x30 */ s16 screenStartX; + /* 0x32 */ s16 screenStartY; + /* 0x34 */ s16 unk3C; + /* 0x36 */ s16 playerDirection; + /* 0x38 */ s16 pathCounter; + /* 0x3A */ s16 unk42; + /* 0x3C */ s32 pad2; +}; // size = 0x40 + /* Function Prototypes */ diff --git a/src/code_80004740.c b/src/code_80004740.c index 50ce5f1ed..a863eac74 100644 --- a/src/code_80004740.c +++ b/src/code_80004740.c @@ -1,6 +1,5 @@ #include <ultra64.h> #include <macros.h> -#include <types.h> #include <mk64.h> #include "math_util.h" #include "code_80004740.h" diff --git a/src/code_8003DC40.c b/src/code_8003DC40.c index 7d92688cc..3de5b0add 100644 --- a/src/code_8003DC40.c +++ b/src/code_8003DC40.c @@ -1,5 +1,6 @@ #include <ultra64.h> #include <macros.h> +#include <mk64.h> #include "math_util.h" #include "common_structs.h" #include "player_controller.h" diff --git a/src/code_80057C60.c b/src/code_80057C60.c index 6e4e06d60..ce3586ea3 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -6,13 +6,14 @@ #include <ultra64.h> #include <macros.h> #include <PR/gbi.h> +#include <mk64.h> +#include "camera.h" #include "code_80057C60.h" #include "main.h" #include "actors.h" #include "code_800029B0.h" #include "racing/memory.h" -#include <config.h> #include <defines.h> #include "math_util.h" #include "math_util_2.h" diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c index fa38f6411..3eb226d95 100644 --- a/src/code_8006E9C0.c +++ b/src/code_8006E9C0.c @@ -2,6 +2,7 @@ #include <macros.h> #include <memory.h> #include <defines.h> +#include <mk64.h> #include "code_800029B0.h" #include "code_80005FD0.h" diff --git a/src/code_80086E70.c b/src/code_80086E70.c index fa3169a0c..0489faa0a 100644 --- a/src/code_80086E70.c +++ b/src/code_80086E70.c @@ -1,7 +1,7 @@ #include <ultra64.h> #include <macros.h> #include <common_structs.h> -#include <types.h> +#include <mk64.h> #include "code_80086E70.h" #include "camera.h" diff --git a/src/code_80091440.h b/src/code_80091440.h index ced30ef22..18aa89297 100644 --- a/src/code_80091440.h +++ b/src/code_80091440.h @@ -1,6 +1,10 @@ +#ifndef CODE_80091440_H +#define CODE_80091440_H + #include "ultra64.h" void func_80091440(s8); void func_800914A0(void); void func_800914E0(void); +#endif // CODE_80091440_H
\ No newline at end of file diff --git a/src/code_80091750.c b/src/code_80091750.c index 39f92cacd..570c281ef 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -1,9 +1,9 @@ #include <ultra64.h> #include <macros.h> +#include <mk64.h> #include <defines.h> #include <segments.h> #include <PR/ultratypes.h> -#include <config.h> #include <sounds.h> #include "code_800029B0.h" #include "code_80091750.h" @@ -7415,7 +7415,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { s32 var_s1; char spA8[3]; s32 var_s2; - s32 temp_v0; + UNUSED s32 temp_v0; UNUSED s32 stackPadding9; char sp98[3]; struct_8018EE10_entry *var_v1; @@ -7427,7 +7427,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { case 0x17: /* switch 1 */ case 0x18: /* switch 1 */ for (stackPadding0 = 0; stackPadding0 < 4; stackPadding0++) { - func_80092224(D_8018EDEC - 0x15, stackPadding0, 3); + set_text_color_rainbow_if_selected(D_8018EDEC - 0x15, stackPadding0, 3); func_80093324(0x00000032, 0x55 + (0x23 * stackPadding0), D_800E7868[stackPadding0], 0, 0.9f, 1.0f); if (stackPadding0 == (D_8018EDEC - 0x15)) { spE0.column = 0x0032; @@ -7444,7 +7444,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { func_80093324(0x00000028, 0x55 + (0x14 * stackPadding0), D_800E7878[stackPadding0], 0, 1.0f, 1.0f); } for (stackPadding0 = 0; stackPadding0 < 2; stackPadding0++) { - func_80092224(D_8018EDEC - 0x1E, stackPadding0, 1); + set_text_color_rainbow_if_selected(D_8018EDEC - 0x1E, stackPadding0, 1); func_80093324(0x00000084, 0x96 + (0x19 * stackPadding0), D_800E7840[stackPadding0], 0, 1.0f, 1.0f); if (stackPadding0 == (D_8018EDEC - 0x1E)) { spE0.column = 0x0084; diff --git a/src/code_800AF9B0.h b/src/code_800AF9B0.h index f63066f51..0bd894550 100644 --- a/src/code_800AF9B0.h +++ b/src/code_800AF9B0.h @@ -2,7 +2,6 @@ #define CODE_800AF9B0_H #include "common_structs.h" -#include <types.h> /* Function Prototypes */ void func_800AF9B0(void); diff --git a/src/crash_screen.c b/src/crash_screen.c index 2753cc3ad..0208862be 100644 --- a/src/crash_screen.c +++ b/src/crash_screen.c @@ -1,7 +1,6 @@ #include <ultra64.h> #include <macros.h> -#include <types.h> -#include <config.h> +#include <mk64.h> #include <stdarg.h> #include <string.h> diff --git a/src/crash_screen.h b/src/crash_screen.h index 7975825d1..44ea6619d 100644 --- a/src/crash_screen.h +++ b/src/crash_screen.h @@ -1,6 +1,11 @@ +#ifndef CRASH_SCREEN_H +#define CRASH_SCREEN_H + #include <ultra64.h> #include <macros.h> extern u16 *pFramebuffer; void crash_screen_set_framebuffer(u16*); + +#endif // CRASH_SCREEN_H
\ No newline at end of file diff --git a/src/data/data_segment2.c b/src/data/data_segment2.c index 8598f825e..2d72f4398 100644 --- a/src/data/data_segment2.c +++ b/src/data/data_segment2.c @@ -1,5 +1,4 @@ #include <macros.h> -#include <types.h> #include <PR/ultratypes.h> #include <PR/gbi.h> #include "data_segment2.h" diff --git a/src/debug/all_variables.h b/src/debug/all_variables.h index 2777ba625..561a23ea6 100644 --- a/src/debug/all_variables.h +++ b/src/debug/all_variables.h @@ -51,7 +51,6 @@ #include <actor_types.h> #include <common_structs.h> -#include <config.h> #include <course.h> #include <course_offsets.h> #include <debug.h> @@ -64,7 +63,6 @@ #include <segments.h> #include <sounds.h> #include "buffers/trig_tables.h" -#include <types.h> #include <ultra64.h> #include <vehicles.h> #include <waypoints.h> diff --git a/src/debug/crash_screen_enhancement.c b/src/debug/crash_screen_enhancement.c index 54547908c..574b3f531 100644 --- a/src/debug/crash_screen_enhancement.c +++ b/src/debug/crash_screen_enhancement.c @@ -1,7 +1,6 @@ #include <ultra64.h> #include <macros.h> -#include <types.h> -#include <config.h> +#include <mk64.h> #include <stdarg.h> #include <string.h> #include "../crash_screen.h" diff --git a/src/debug/crash_screen_enhancement.h b/src/debug/crash_screen_enhancement.h index 43fe8e10a..9f9a321ca 100644 --- a/src/debug/crash_screen_enhancement.h +++ b/src/debug/crash_screen_enhancement.h @@ -1,3 +1,6 @@ +#ifndef CRASH_SCREEN_ENHANCEMENT_H +#define CRASH_SCREEN_ENHANCEMENT_H + #include <ultra64.h> #include <macros.h> @@ -35,3 +38,5 @@ void crash_screen_draw(OSThread* thread); // } // gGlobalTimer++; // } + +#endif // CRASH_SCREEN_ENHANCEMENT_H
\ No newline at end of file diff --git a/src/effects.c b/src/effects.c index 779c003c5..52c5127e2 100644 --- a/src/effects.c +++ b/src/effects.c @@ -1,7 +1,7 @@ #include <ultra64.h> #include <macros.h> -#include <types.h> #include <decode.h> +#include <mk64.h> #include <defines.h> #include <sounds.h> #include "code_800029B0.h" diff --git a/src/ending/ceremony_and_credits.c b/src/ending/ceremony_and_credits.c index 879b22262..d12c5d276 100644 --- a/src/ending/ceremony_and_credits.c +++ b/src/ending/ceremony_and_credits.c @@ -6,7 +6,6 @@ #include <ultra64.h> #include <macros.h> -#include <types.h> #include <segments.h> #include <common_structs.h> #include "math_util.h" diff --git a/src/ending/code_80280000.c b/src/ending/code_80280000.c index d96fcb898..f9f1fe824 100644 --- a/src/ending/code_80280000.c +++ b/src/ending/code_80280000.c @@ -3,18 +3,17 @@ #include <defines.h> #include <debug.h> #include <PR/gu.h> +#include <mk64.h> #include <main.h> #include <segments.h> #include <code_800029B0.h> -#include <types.h> #include "camera.h" #include "memory.h" #include "math_util.h" #include "code_80280000.h" #include "code_80281780.h" #include "skybox_and_splitscreen.h" -#include <config.h> #include "code_80091750.h" #include "code_8006E9C0.h" #include "code_800029B0.h" diff --git a/src/ending/code_80281780.c b/src/ending/code_80281780.c index 003d3e552..4b33160a1 100644 --- a/src/ending/code_80281780.c +++ b/src/ending/code_80281780.c @@ -1,11 +1,10 @@ #include <ultra64.h> #include <macros.h> #include <defines.h> -#include <config.h> #include <segments.h> +#include <mk64.h> #include "code_80281780.h" -#include "types.h" #include "memory.h" #include "camera.h" #include "camera_junk.h" diff --git a/src/ending/dl_unk_80284EE0.c b/src/ending/dl_unk_80284EE0.c index 4a729773b..64282cb08 100644 --- a/src/ending/dl_unk_80284EE0.c +++ b/src/ending/dl_unk_80284EE0.c @@ -1,6 +1,5 @@ -#include <types.h> +#include <ultra64.h> #include <PR/gbi.h> - #include "courses/royal_raceway/course_displaylists.inc.h" // Init RDP - RSP (Ceremony) diff --git a/src/ending/podium_ceremony_actors.c b/src/ending/podium_ceremony_actors.c index 7d83d25af..dc6a224d6 100644 --- a/src/ending/podium_ceremony_actors.c +++ b/src/ending/podium_ceremony_actors.c @@ -2,7 +2,6 @@ #include <macros.h> #include <PR/gu.h> #include <mk64.h> -#include <types.h> #include <debug.h> #include <common_structs.h> #include "main.h" diff --git a/src/gbiMacro.c b/src/gbiMacro.c index f079632e4..18f131dce 100644 --- a/src/gbiMacro.c +++ b/src/gbiMacro.c @@ -1,9 +1,8 @@ #include <ultra64.h> #include <macros.h> -#include "types.h" #include "PR/gu.h" #include "main.h" -#include "config.h" +#include <mk64.h> extern s16 D_800E43A8; extern Mtx D_0D008E98; diff --git a/src/main.c b/src/main.c index 873d8efd6..19eb4f4c5 100644 --- a/src/main.c +++ b/src/main.c @@ -6,8 +6,8 @@ #include <PR/ucode.h> #include <macros.h> #include <decode.h> -#include <types.h> -#include <config.h> +#include <mk64.h> + #include "profiler.h" #include "main.h" #include "racing/memory.h" diff --git a/src/main.h b/src/main.h index b4f759d85..b1e37ea95 100644 --- a/src/main.h +++ b/src/main.h @@ -1,7 +1,6 @@ #ifndef MAIN_H #define MAIN_H -#include "types.h" // Message IDs #define MESG_SP_COMPLETE 100 diff --git a/src/math_util_2.c b/src/math_util_2.c index 04d978a79..2afe7f201 100644 --- a/src/math_util_2.c +++ b/src/math_util_2.c @@ -11,6 +11,7 @@ #include "render_player.h" #include "code_80057C60.h" #include "defines.h" +#include "camera.h" #pragma intrinsic (sqrtf) diff --git a/src/math_util_2.h b/src/math_util_2.h index 725fa7627..e43a0df8d 100644 --- a/src/math_util_2.h +++ b/src/math_util_2.h @@ -1,8 +1,8 @@ #ifndef MATH_UTIL_2_H #define MATH_UTIL_2_H -#include "types.h" #include "common_structs.h" +#include "camera.h" /* Function Prototypes */ diff --git a/src/menus.c b/src/menus.c index 154667b6d..f5d371820 100644 --- a/src/menus.c +++ b/src/menus.c @@ -2,6 +2,7 @@ #include <macros.h> #include <defines.h> #include <common_structs.h> +#include <mk64.h> #include "menus.h" #include "main.h" diff --git a/src/menus.h b/src/menus.h index 2345496f6..487697564 100644 --- a/src/menus.h +++ b/src/menus.h @@ -3,7 +3,6 @@ #include "PR/os.h" #include "common_structs.h" -#include <types.h> #include <defines.h> // D_8018EDEC is position on options screen? diff --git a/src/os/osContInternal.h b/src/os/osContInternal.h index 0f628205b..77b51ba93 100644 --- a/src/os/osContInternal.h +++ b/src/os/osContInternal.h @@ -1,7 +1,6 @@ #ifndef _ULTRA64_CONTROLLER_INTERNAL_H_ #define _ULTRA64_CONTROLLER_INTERNAL_H_ -#include <types.h> typedef struct { diff --git a/src/profiler.c b/src/profiler.c index 8090e9dbb..2bb9f5b97 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -1,8 +1,7 @@ #include <ultra64.h> #include <macros.h> -#include "types.h" #include "profiler.h" -#include "config.h" +#include <mk64.h> #include "main.h" struct ProfilerFrameData gProfilerFrameData[2]; diff --git a/src/profiler.h b/src/profiler.h index 2416f4d44..92267ebd2 100644 --- a/src/profiler.h +++ b/src/profiler.h @@ -1,7 +1,6 @@ #ifndef PROFILER_H #define PROFILER_H -#include "types.h" extern u64 osClockRate; diff --git a/src/racing/actors.c b/src/racing/actors.c index 4b1d4a597..4f919a22e 100644 --- a/src/racing/actors.c +++ b/src/racing/actors.c @@ -1,12 +1,12 @@ #include <ultra64.h> #include <macros.h> #include <PR/os.h> +#include <mk64.h> #include <sounds.h> #include <common_structs.h> #include <actor_types.h> #include <defines.h> #include <PR/gbi.h> -#include <types.h> #include "code_800029B0.h" #include "main.h" diff --git a/src/racing/actors.h b/src/racing/actors.h index 0bd0b1b7c..8c0b2e2b2 100644 --- a/src/racing/actors.h +++ b/src/racing/actors.h @@ -1,8 +1,9 @@ #ifndef ACTORS_H #define ACTORS_H -#include "types.h" #include "actor_types.h" +#include "code_800029B0.h" +#include "camera.h" #define END_OF_SPAWN_DATA -0x8000 diff --git a/src/racing/math_util.c b/src/racing/math_util.c index 9626e2a69..3305cb931 100644 --- a/src/racing/math_util.c +++ b/src/racing/math_util.c @@ -421,8 +421,10 @@ void func_802B5D30(s16 arg0, s16 arg1, s32 arg2) { func_802B5D64(0x9000000, arg0, arg1, arg2); } -void func_802B5D64(uintptr_t arg0, s16 arg1, s16 arg2, s32 arg3) { - UNUSED s32 pad[3]; +void func_802B5D64(uintptr_t addr, s16 arg1, s16 arg2, s32 arg3) { + u32 segment = SEGMENT_NUMBER2(addr); + u32 offset = SEGMENT_OFFSET(addr); + UNUSED s32 pad; f32 sp48; f32 sp44; f32 sp40; @@ -432,7 +434,7 @@ void func_802B5D64(uintptr_t arg0, s16 arg1, s16 arg2, s32 arg3) { s8 sp2C[3]; Lights1 *var_s0; - var_s0 = (Lights1 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[arg0 >> 0x18] + (arg0 & 0xFFFFFF)); + var_s0 = (Lights1 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); sp48 = sins(arg2); sp44 = coss(arg2); sp40 = sins(arg1); @@ -1151,15 +1153,17 @@ f32 is_within_render_distance(Vec3f cameraPos, Vec3f objectPos, u16 orientationY // No idea if arg1 is actually a Mat4 or not, but since this function is unused // its impossible to know with certainty either way, very close of func_802B5D64 -UNUSED void func_802B8414(uintptr_t arg0, Mat4 arg1, s16 arg2, s16 arg3, s32 arg4) { - UNUSED s32 pad[3]; +UNUSED void func_802B8414(uintptr_t addr, Mat4 arg1, s16 arg2, s16 arg3, s32 arg4) { + u32 segment = SEGMENT_NUMBER2(addr); + u32 offset = SEGMENT_OFFSET(addr); + UNUSED s32 pad; Vec3f sp40; s8 sp3C[3]; s32 var_v0; UNUSED s32 pad2[3]; Lights1 *var_s0; - var_s0 = (Lights1 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[arg0 >> 0x18] + (arg0 & 0xFFFFFF)); + var_s0 = (Lights1 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); sins(arg3); coss(arg3); sins(arg2); diff --git a/src/racing/math_util.h b/src/racing/math_util.h index 2ed50d6b3..f3ec26b3f 100644 --- a/src/racing/math_util.h +++ b/src/racing/math_util.h @@ -3,7 +3,6 @@ #include <PR/ultratypes.h> -#include "types.h" //#define sins(x) gSineTable[(u16) (x) >> 4] //#define coss(x) gCosineTable[(u16) (x) >> 4] diff --git a/src/racing/memory.c b/src/racing/memory.c index c2f24012f..d2d352d62 100644 --- a/src/racing/memory.c +++ b/src/racing/memory.c @@ -1,7 +1,6 @@ #include <ultra64.h> #include <PR/ultratypes.h> #include <macros.h> -#include <types.h> #include <common_structs.h> #include <segments.h> #include <decode.h> diff --git a/src/racing/memory.h b/src/racing/memory.h index 7a9111b0f..a1bde7e91 100644 --- a/src/racing/memory.h +++ b/src/racing/memory.h @@ -1,7 +1,6 @@ #ifndef MEMORY_H #define MEMORY_H -#include "types.h" struct MainPoolBlock { struct MainPoolBlock *prev; diff --git a/src/racing/race_logic.c b/src/racing/race_logic.c index 04f8ce945..1c690e512 100644 --- a/src/racing/race_logic.c +++ b/src/racing/race_logic.c @@ -1,8 +1,7 @@ #include <ultra64.h> #include <macros.h> -#include <types.h> +#include <mk64.h> #include <common_structs.h> -#include <config.h> #include <defines.h> #include <sounds.h> #include "camera.h" diff --git a/src/racing/render_courses.c b/src/racing/render_courses.c index b2b2a22de..8bb715a79 100644 --- a/src/racing/render_courses.c +++ b/src/racing/render_courses.c @@ -1,8 +1,8 @@ #include <ultra64.h> #include <macros.h> +#include <mk64.h> #include <common_structs.h> #include <defines.h> -#include <types.h> #include <course.h> #include "render_courses.h" diff --git a/src/racing/render_courses.h b/src/racing/render_courses.h index 61a755f52..a41659f6c 100644 --- a/src/racing/render_courses.h +++ b/src/racing/render_courses.h @@ -1,6 +1,8 @@ #ifndef RENDER_COURSES_H #define RENDER_COURSES_H +#include "code_800029B0.h" + void func_8029122C(struct UnkStruct_800DC5EC*, s32); s32 func_80290C20(Camera*); void parse_course_displaylists(uintptr_t); diff --git a/src/racing/skybox_and_splitscreen.c b/src/racing/skybox_and_splitscreen.c index edae4bf31..0245992b0 100644 --- a/src/racing/skybox_and_splitscreen.c +++ b/src/racing/skybox_and_splitscreen.c @@ -1,8 +1,7 @@ #include <ultra64.h> #include <macros.h> #include <PR/gbi.h> -#include <types.h> -#include <config.h> +#include <mk64.h> #include "skybox_and_splitscreen.h" #include "code_800029B0.h" diff --git a/src/racing/skybox_and_splitscreen.h b/src/racing/skybox_and_splitscreen.h index ec2d7d8b3..820a593bc 100644 --- a/src/racing/skybox_and_splitscreen.h +++ b/src/racing/skybox_and_splitscreen.h @@ -2,6 +2,7 @@ #define SKYBOX_AND_SPLITSCREEN_H #include <PR/gbi.h> +#include "code_800029B0.h" #define G_CLEAR_ALL_MODES 0xFFFFFFFF diff --git a/src/render_objects.c b/src/render_objects.c index 1e0c8cdc4..085d6780d 100644 --- a/src/render_objects.c +++ b/src/render_objects.c @@ -4,12 +4,13 @@ **/ #include <ultra64.h> +#include <mk64.h> #include <PR/gbi.h> #include <macros.h> #include <defines.h> #include <common_structs.h> #include <actor_types.h> -#include <config.h> +#include "camera.h" #include "memory.h" #include "math_util.h" #include "math_util_2.h" diff --git a/src/render_player.c b/src/render_player.c index ae21e2fc5..aec58a16c 100644 --- a/src/render_player.c +++ b/src/render_player.c @@ -1,9 +1,10 @@ #include <ultra64.h> #include <macros.h> +#include <mk64.h> #include <common_structs.h> #include <defines.h> -#include <types.h> #include "code_800029B0.h" +#include "camera.h" #include "math_util.h" #include "math_util_2.h" #include "main.h" diff --git a/src/render_player.h b/src/render_player.h index f1663633d..201c44ca2 100644 --- a/src/render_player.h +++ b/src/render_player.h @@ -1,9 +1,9 @@ #ifndef CODE_8001F980_H #define CODE_8001F980_H -#include "types.h" -#include "common_structs.h" +#include <common_structs.h> #include "buffers.h" +#include "camera.h" #define SOME_TEXTURE_POINTER_MATH 0x800 diff --git a/src/save.h b/src/save.h index c68c2a806..81c93d340 100644 --- a/src/save.h +++ b/src/save.h @@ -3,7 +3,6 @@ #include "PR/os.h" #include "common_structs.h" -#include <types.h> /* define symbols */ diff --git a/src/spawn_players.c b/src/spawn_players.c index e4298d0c6..427975e50 100644 --- a/src/spawn_players.c +++ b/src/spawn_players.c @@ -1,4 +1,5 @@ #include <defines.h> +#include <mk64.h> #include "spawn_players.h" #include "code_800029B0.h" diff --git a/src/staff_ghosts.c b/src/staff_ghosts.c index ff52c60b3..97142e717 100644 --- a/src/staff_ghosts.c +++ b/src/staff_ghosts.c @@ -1,6 +1,6 @@ #include <ultra64.h> #include <macros.h> -#include <types.h> +#include <mk64.h> #include <common_structs.h> #include <defines.h> #include <decode.h> @@ -12,6 +12,7 @@ #include "code_8006E9C0.h" #include "code_80091750.h" #include "code_80057C60.h" +#include "kart_dma.h" extern s32 mio0encode(s32 input, s32, s32); extern s32 func_80040174(void *, s32, s32); @@ -61,8 +62,6 @@ s32 D_80162E00; u32 *D_800DC710 = (u32 *) &D_802BFB80.arraySize8[0][2][3]; u32 *D_800DC714 = (u32 *) &D_802BFB80.arraySize8[1][1][3]; -extern u8 _kart_texturesSegmentRomStart; - extern s32 gLapCountByPlayerId[]; extern StaffGhost *d_mario_raceway_staff_ghost; @@ -72,7 +71,7 @@ extern StaffGhost *d_luigi_raceway_staff_ghost; void func_80004EF0(void) { D_80162DA4 = (u32 *) &D_802BFB80.arraySize8[0][2][3]; osInvalDCache(&D_80162DA4[0], 0x4000); - osPiStartDma(&gDmaIoMesg, 0, 0, (uintptr_t) ((D_80162DC4 & 0xFFFFFF) + &_kart_texturesSegmentRomStart), D_80162DA4, 0x4000, &gDmaMesgQueue); + osPiStartDma(&gDmaIoMesg, 0, 0, (uintptr_t) &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(D_80162DC4)], D_80162DA4, 0x4000, &gDmaMesgQueue); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); D_80162D9C = (*D_80162DA4 & 0xFF0000); D_80162DA0 = 0; diff --git a/src/staff_ghosts.h b/src/staff_ghosts.h index 3ff61cda6..5444caa8b 100644 --- a/src/staff_ghosts.h +++ b/src/staff_ghosts.h @@ -3,7 +3,6 @@ #include "PR/os.h" #include "common_structs.h" -#include <types.h> void func_80005B18(void); void func_80004EF0(void); diff --git a/src/update_objects.c b/src/update_objects.c index aa5941c10..439fdb03f 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -2,6 +2,7 @@ #include <macros.h> #include <defines.h> #include <decode.h> +#include <mk64.h> #include "update_objects.h" #include "main.h" |
