From 670a930f31691535813b1df2692a2f76bbb9136c Mon Sep 17 00:00:00 2001 From: coco875 <59367621+coco875@users.noreply.github.com> Date: Sun, 24 Dec 2023 23:52:09 +0100 Subject: [PATCH] Rename code_8001F980 to render_player and code_800B45E0 to save (#507) * Update and rename code_8001F980.c to render_player.c * Rename code_8001F980.h to render_player.h * rename import file to render_player * Update and rename code_80004740.c to save.c * Rename code_80004740.h to save.h --- .../{code_800B45E0 => save}/func_800B5218.s | 0 .../{code_800B45E0 => save}/func_800B578C.s | 0 .../{code_800B45E0 => save}/func_800B60E8.s | 0 .../{code_800B45E0 => save}/func_800B68F4.s | 0 .../{code_800B45E0 => save}/func_800B69BC.s | 0 ctx_includes.c | 4 ++-- enhancements/flycam.patch | 6 +++--- mk64.ld | 12 ++++++------ src/camera.c | 2 +- src/code_80005FD0.c | 2 +- src/code_80057C60.c | 2 +- src/code_8008C1D0.c | 2 +- src/code_80091750.c | 2 +- src/debug/all_variables.h | 4 ++-- src/ending/code_80281C40.c | 2 +- src/ending/podium_ceremony_actors.c | 2 +- src/hud_renderer.c | 2 +- src/main.c | 2 +- src/math_util_2.c | 2 +- src/menus.c | 2 +- src/player_controller.c | 2 +- src/racing/skybox_and_splitscreen.c | 2 +- src/{code_8001F980.c => render_player.c} | 2 +- src/{code_8001F980.h => render_player.h} | 0 src/{code_800B45E0.c => save.c} | 12 ++++++------ src/{code_800B45E0.h => save.h} | 4 ++-- src/spawn_players.c | 4 ++-- src/staff_ghosts.c | 2 +- tools/yaml/mk64.eu1.yaml | 4 ++-- tools/yaml/mk64.us.yaml | 4 ++-- 30 files changed, 42 insertions(+), 42 deletions(-) rename asm/non_matchings/{code_800B45E0 => save}/func_800B5218.s (100%) rename asm/non_matchings/{code_800B45E0 => save}/func_800B578C.s (100%) rename asm/non_matchings/{code_800B45E0 => save}/func_800B60E8.s (100%) rename asm/non_matchings/{code_800B45E0 => save}/func_800B68F4.s (100%) rename asm/non_matchings/{code_800B45E0 => save}/func_800B69BC.s (100%) rename src/{code_8001F980.c => render_player.c} (99%) rename src/{code_8001F980.h => render_player.h} (100%) rename src/{code_800B45E0.c => save.c} (98%) rename src/{code_800B45E0.h => save.h} (98%) diff --git a/asm/non_matchings/code_800B45E0/func_800B5218.s b/asm/non_matchings/save/func_800B5218.s similarity index 100% rename from asm/non_matchings/code_800B45E0/func_800B5218.s rename to asm/non_matchings/save/func_800B5218.s diff --git a/asm/non_matchings/code_800B45E0/func_800B578C.s b/asm/non_matchings/save/func_800B578C.s similarity index 100% rename from asm/non_matchings/code_800B45E0/func_800B578C.s rename to asm/non_matchings/save/func_800B578C.s diff --git a/asm/non_matchings/code_800B45E0/func_800B60E8.s b/asm/non_matchings/save/func_800B60E8.s similarity index 100% rename from asm/non_matchings/code_800B45E0/func_800B60E8.s rename to asm/non_matchings/save/func_800B60E8.s diff --git a/asm/non_matchings/code_800B45E0/func_800B68F4.s b/asm/non_matchings/save/func_800B68F4.s similarity index 100% rename from asm/non_matchings/code_800B45E0/func_800B68F4.s rename to asm/non_matchings/save/func_800B68F4.s diff --git a/asm/non_matchings/code_800B45E0/func_800B69BC.s b/asm/non_matchings/save/func_800B69BC.s similarity index 100% rename from asm/non_matchings/code_800B45E0/func_800B69BC.s rename to asm/non_matchings/save/func_800B69BC.s diff --git a/ctx_includes.c b/ctx_includes.c index ef9e424f5..604ec888a 100644 --- a/ctx_includes.c +++ b/ctx_includes.c @@ -70,7 +70,7 @@ #include "src/code_800029B0.h" #include "src/code_80004740.h" #include "src/code_80005FD0.h" -#include "src/code_8001F980.h" +#include "src/render_player.h" #include "src/code_8003DC40.h" #include "src/code_80057C60.h" #include "src/code_8006E9C0.h" @@ -80,7 +80,7 @@ #include "src/code_80091440.h" #include "src/code_80091750.h" #include "src/code_800AF9B0.h" -#include "src/code_800B45E0.h" +#include "src/save.h" #include "src/common_textures.h" #include "src/data/data_800E45C0.h" #include "src/data/data_800E8700.h" diff --git a/enhancements/flycam.patch b/enhancements/flycam.patch index 024efbd6e..1e8b7ef4a 100644 --- a/enhancements/flycam.patch +++ b/enhancements/flycam.patch @@ -49,10 +49,10 @@ index 02275b1..406739d 100644 break; case 8: func_8001E0C4(camera, player, index); -diff --git a/src/code_8001F980.c b/src/code_8001F980.c +diff --git a/src/render_player.c b/src/render_player.c index 6b14e27..d10796b 100644 ---- a/src/code_8001F980.c -+++ b/src/code_8001F980.c +--- a/src/render_player.c ++++ b/src/render_player.c @@ -65,6 +65,8 @@ void func_8001F9E4(Player *player, Camera *camera, s8 arg2) { } } diff --git a/mk64.ld b/mk64.ld index 92e07fc69..fa0cf21b3 100644 --- a/mk64.ld +++ b/mk64.ld @@ -46,7 +46,7 @@ SECTIONS BUILD_DIR/asm/unused_overflow_check.o(.text); BUILD_DIR/src/code_80005FD0.jp.o(.text); BUILD_DIR/src/camera.o(.text); - BUILD_DIR/src/code_8001F980.o(.text); + BUILD_DIR/src/render_player.o(.text); BUILD_DIR/src/kart_dma.o(.text); BUILD_DIR/src/player_controller.o(.text); BUILD_DIR/src/spawn_players.o(.text); @@ -66,7 +66,7 @@ SECTIONS BUILD_DIR/src/code_80091750.jp.o(.text); BUILD_DIR/src/code_800AF9B0.o(.text); BUILD_DIR/src/menus.o(.text); - BUILD_DIR/src/code_800B45E0.o(.text); + BUILD_DIR/src/save.o(.text); BUILD_DIR/src/audio/synthesis.o(.text); BUILD_DIR/src/audio/heap.o(.text); BUILD_DIR/src/audio/load.o(.text); @@ -210,7 +210,7 @@ SECTIONS BUILD_DIR/src/staff_ghosts.o(.data); BUILD_DIR/data/data_0DD0A0_1.o(.data); BUILD_DIR/src/camera.o(.data); - BUILD_DIR/src/code_8001F980.o(.data); + BUILD_DIR/src/render_player.o(.data); BUILD_DIR/src/kart_dma.o(.data); BUILD_DIR/src/data/kart_attributes.inc.o(.data); BUILD_DIR/src/player_controller.o(.data); @@ -224,7 +224,7 @@ SECTIONS BUILD_DIR/src/code_80091750.jp.o(.data); BUILD_DIR/src/code_800AF9B0.o(.data); BUILD_DIR/src/menus.o(.data); - BUILD_DIR/src/code_800B45E0.o(.data); + BUILD_DIR/src/save.o(.data); BUILD_DIR/src/data/data_800E8700.o(.data); BUILD_DIR/src/audio/synthesis.o(.data); BUILD_DIR/src/audio/heap.o(.data); @@ -259,7 +259,7 @@ SECTIONS BUILD_DIR/src/code_800029B0.o(.rodata); BUILD_DIR/src/code_80005FD0.jp.o(.rodata); BUILD_DIR/src/camera.o(.rodata); - BUILD_DIR/src/code_8001F980.o(.rodata); + BUILD_DIR/src/render_player.o(.rodata); BUILD_DIR/src/player_controller.o(.rodata); BUILD_DIR/src/spawn_players.o(.rodata); BUILD_DIR/src/code_8003DC40.o(.rodata); @@ -272,7 +272,7 @@ SECTIONS BUILD_DIR/src/code_80091750.jp.o(.rodata); BUILD_DIR/src/code_800AF9B0.o(.rodata); BUILD_DIR/src/menus.o(.rodata); - BUILD_DIR/src/code_800B45E0.o(.rodata); + BUILD_DIR/src/save.o(.rodata); BUILD_DIR/src/audio/heap.o(.rodata); BUILD_DIR/src/audio/load.o(.rodata); BUILD_DIR/src/audio/playback.o(.rodata); diff --git a/src/camera.c b/src/camera.c index 6cd1c5841..7cd43a14f 100644 --- a/src/camera.c +++ b/src/camera.c @@ -10,7 +10,7 @@ #include "racing/memory.h" #include "waypoints.h" #include "variables.h" -#include "code_8001F980.h" +#include "render_player.h" #include "collision.h" #include "code_80057C60.h" #include "code_80005FD0.h" diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index e7934fef8..12843612e 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -10,7 +10,7 @@ #include "camera.h" #include "actors.h" #include "actors_extended.h" -#include "code_8001F980.h" +#include "render_player.h" #include "player_controller.h" #include "code_80071F00.h" #include "collision.h" diff --git a/src/code_80057C60.c b/src/code_80057C60.c index e1a042c9e..daf745db1 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -13,7 +13,7 @@ #include "math_util.h" #include "math_util_2.h" #include "code_80005FD0.h" -#include "code_8001F980.h" +#include "render_player.h" #include "hud_renderer.h" #include "code_80071F00.h" #include "code_80086E70.h" diff --git a/src/code_8008C1D0.c b/src/code_8008C1D0.c index 792213487..8f02103d2 100644 --- a/src/code_8008C1D0.c +++ b/src/code_8008C1D0.c @@ -10,7 +10,7 @@ #include "kart_attributes.h" #include "waypoints.h" #include "code_80005FD0.h" -#include "code_8001F980.h" +#include "render_player.h" #include "player_controller.h" #include "hud_renderer.h" #include "code_80057C60.h" diff --git a/src/code_80091750.c b/src/code_80091750.c index d2385cb96..93c5b33db 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -9,7 +9,7 @@ #include "code_80091750.h" #include "code_80005FD0.h" #include "menus.h" -#include "code_800B45E0.h" +#include "save.h" #include "code_80057C60.h" #include "credits.h" #include "data_segment2.h" diff --git a/src/debug/all_variables.h b/src/debug/all_variables.h index 531bd8d5c..8825e111b 100644 --- a/src/debug/all_variables.h +++ b/src/debug/all_variables.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/ending/code_80281C40.c b/src/ending/code_80281C40.c index dd387d256..a5ff81ba7 100644 --- a/src/ending/code_80281C40.c +++ b/src/ending/code_80281C40.c @@ -12,7 +12,7 @@ #include "podium_ceremony_actors.h" #include "ceremony_and_credits.h" #include "podium_ceremony_actors.h" -#include "code_8001F980.h" +#include "render_player.h" struct UnkStruct80287560 { s16 unk0; diff --git a/src/ending/podium_ceremony_actors.c b/src/ending/podium_ceremony_actors.c index ced908978..b2fd207ae 100644 --- a/src/ending/podium_ceremony_actors.c +++ b/src/ending/podium_ceremony_actors.c @@ -9,7 +9,7 @@ #include "memory.h" #include "variables.h" #include "common_textures.h" -#include "code_8001F980.h" +#include "render_player.h" #include "hud_renderer.h" #include "podium_ceremony_actors.h" #include "camera_junk.h" diff --git a/src/hud_renderer.c b/src/hud_renderer.c index 7e582f356..7ace731f4 100644 --- a/src/hud_renderer.c +++ b/src/hud_renderer.c @@ -18,7 +18,7 @@ #include "waypoints.h" #include "bomb_kart.h" #include "common_textures.h" -#include "code_8001F980.h" +#include "render_player.h" #include "code_80004740.h" #include "code_80005FD0.h" #include "code_80057C60.h" diff --git a/src/main.c b/src/main.c index 53460ffd6..86d63419d 100644 --- a/src/main.c +++ b/src/main.c @@ -29,7 +29,7 @@ #include "code_80057C60.h" #include "profiler.h" #include "player_controller.h" -#include "code_8001F980.h" +#include "render_player.h" #include "render_courses.h" #include "actors.h" #include "staff_ghosts.h" diff --git a/src/math_util_2.c b/src/math_util_2.c index d2978b9cb..abcf890b2 100644 --- a/src/math_util_2.c +++ b/src/math_util_2.c @@ -9,7 +9,7 @@ #include "memory.h" #include "collision.h" -#include "code_8001F980.h" +#include "render_player.h" #pragma intrinsic (sqrtf) diff --git a/src/menus.c b/src/menus.c index 987f5e48f..66a24ab57 100644 --- a/src/menus.c +++ b/src/menus.c @@ -13,7 +13,7 @@ #include "code_80005FD0.h" #include "code_80091750.h" #include "code_800AF9B0.h" -#include "code_800B45E0.h" +#include "save.h" #include "staff_ghosts.h" #include "save_data.h" #include diff --git a/src/player_controller.c b/src/player_controller.c index afc5da745..68719f8e2 100644 --- a/src/player_controller.c +++ b/src/player_controller.c @@ -9,7 +9,7 @@ #include "kart_attributes.h" #include "racing/memory.h" #include "math_util.h" -#include "code_8001F980.h" +#include "render_player.h" #include "code_8008C1D0.h" #include "collision.h" #include "waypoints.h" diff --git a/src/racing/skybox_and_splitscreen.c b/src/racing/skybox_and_splitscreen.c index 759c85504..b352c27b5 100644 --- a/src/racing/skybox_and_splitscreen.c +++ b/src/racing/skybox_and_splitscreen.c @@ -11,7 +11,7 @@ #include "memory.h" #include "camera.h" #include "common_textures.h" -#include "code_8001F980.h" +#include "render_player.h" #include "code_80057C60.h" #include "code_80091750.h" #include "actors.h" diff --git a/src/code_8001F980.c b/src/render_player.c similarity index 99% rename from src/code_8001F980.c rename to src/render_player.c index 7d251ab04..81607db3e 100644 --- a/src/code_8001F980.c +++ b/src/render_player.c @@ -11,7 +11,7 @@ #include "functions.h" #include "kart_dma.h" #include "objects.h" -#include "code_8001F980.h" +#include "render_player.h" #include "code_80057C60.h" #include "code_8008C1D0.h" #include "framebuffers.h" diff --git a/src/code_8001F980.h b/src/render_player.h similarity index 100% rename from src/code_8001F980.h rename to src/render_player.h diff --git a/src/code_800B45E0.c b/src/save.c similarity index 98% rename from src/code_800B45E0.c rename to src/save.c index e6bbd03ce..a1a427630 100644 --- a/src/code_800B45E0.c +++ b/src/save.c @@ -3,7 +3,7 @@ #include #include "global.h" -#include "code_800B45E0.h" +#include "save.h" #include "code_80091750.h" #include "menus.h" @@ -370,7 +370,7 @@ s32 func_800B5218(void) { } } #else -GLOBAL_ASM("asm/non_matchings/code_800B45E0/func_800B5218.s") +GLOBAL_ASM("asm/non_matchings/save/func_800B5218.s") #endif void func_800B536C(s32 arg0) { @@ -506,7 +506,7 @@ s32 func_800B578C(s32 arg0) { return (var_v1 % 256) & 0xFF; } #else -GLOBAL_ASM("asm/non_matchings/code_800B45E0/func_800B578C.s") +GLOBAL_ASM("asm/non_matchings/save/func_800B578C.s") #endif s32 func_800B5888(s32 arg0) { @@ -759,7 +759,7 @@ u8 func_800B60E8(s32 page) { return checksum; } #else -GLOBAL_ASM("asm/non_matchings/code_800B45E0/func_800B60E8.s") +GLOBAL_ASM("asm/non_matchings/save/func_800B60E8.s") #endif s32 func_800B6178(s32 arg0) { @@ -982,7 +982,7 @@ u8 func_800B68F4(s32 arg0) { return checksum; } #else -GLOBAL_ASM("asm/non_matchings/code_800B45E0/func_800B68F4.s") +GLOBAL_ASM("asm/non_matchings/save/func_800B68F4.s") #endif #ifdef NON_MATCHING @@ -1006,7 +1006,7 @@ s32 func_800B69BC(s32 arg0) { return osPfsReadWriteFile(&gControllerPak1FileHandle, gControllerPak1FileNote, PFS_WRITE, offset, sizeof(struct_8018EE10_entry), (u8 *)plz); } #else -GLOBAL_ASM("asm/non_matchings/code_800B45E0/func_800B69BC.s") +GLOBAL_ASM("asm/non_matchings/save/func_800B69BC.s") #endif s32 func_800B6A68(void) { diff --git a/src/code_800B45E0.h b/src/save.h similarity index 98% rename from src/code_800B45E0.h rename to src/save.h index 75e3ed935..927f4b7f2 100644 --- a/src/code_800B45E0.h +++ b/src/save.h @@ -1,5 +1,5 @@ -#ifndef CODE_800B045E0_H -#define CODE_800B045E0_H +#ifndef SAVE_H +#define SAVE_H #include "PR/os.h" #include "common_structs.h" diff --git a/src/spawn_players.c b/src/spawn_players.c index 4ee667e02..a46564a29 100644 --- a/src/spawn_players.c +++ b/src/spawn_players.c @@ -16,11 +16,11 @@ #include "render_courses.h" #include "staff_ghosts.h" #include "code_80005FD0.h" -#include "code_8001F980.h" +#include "render_player.h" #include "podium_ceremony_actors.h" #include "main.h" #include "menus.h" -#include "code_8001F980.h" +#include "render_player.h" // arg4 is height? Or something like that? void spawn_player(Player *player, s8 playerIndex, f32 startingRow, f32 startingColumn, f32 arg4, f32 arg5, u16 characterId, s16 playerType) { diff --git a/src/staff_ghosts.c b/src/staff_ghosts.c index 3044704ba..0a471f61b 100644 --- a/src/staff_ghosts.c +++ b/src/staff_ghosts.c @@ -7,7 +7,7 @@ #include "main.h" #include "code_800029B0.h" #include "framebuffers.h" -#include "code_800B45E0.h" +#include "save.h" #include "staff_ghosts.h" #include "code_80091750.h" diff --git a/tools/yaml/mk64.eu1.yaml b/tools/yaml/mk64.eu1.yaml index 53717b16e..9253601d5 100644 --- a/tools/yaml/mk64.eu1.yaml +++ b/tools/yaml/mk64.eu1.yaml @@ -53,7 +53,7 @@ segments: - [0x6B90, asm, unused_overflow_check] - [0x6BB0, c, code_80005FD0] - [0x1D0B0, c, camera] - - [0x20560, c, code_8001F980] + - [0x20560, c, render_player] - [0x27C20, c, kart_dma] - [0x288E0, c, code_80027D00] - [0x39FA0, c, spawn_players] @@ -73,7 +73,7 @@ segments: - [0x92350, c, code_80091750] - [0xB05B0, c, code_800AF9B0] - [0xB0F50, c, menus] - - [0xB51E0, c, code_800B45E0] + - [0xB51E0, c, save] - [0xB77F0, c, audio/synthesis] - [0xB99E0, c, audio/heap] - [0xBB680, c, audio/load] diff --git a/tools/yaml/mk64.us.yaml b/tools/yaml/mk64.us.yaml index 151a919ae..11492ffa5 100644 --- a/tools/yaml/mk64.us.yaml +++ b/tools/yaml/mk64.us.yaml @@ -52,7 +52,7 @@ segments: - [0x6BB0, asm, unused_overflow_check] - [0x6BD0, c, code_80005FD0] - [0x1D0D0, c, camera] - - [0x20580, c, code_8001F980] + - [0x20580, c, render_player] - [0x27C40, c, kart_dma] - [0x28900, c, code_80027D00] - [0x39FC0, c, spawn_players] @@ -72,7 +72,7 @@ segments: - [0x92350, c, code_80091750] - [0xB05B0, c, code_800AF9B0] - [0xB0F50, c, menus] - - [0xB51E0, c, code_800B45E0] + - [0xB51E0, c, save] - [0xB77F0, c, audio/synthesis] - [0xB99E0, c, audio/heap] - [0xBB680, c, audio/load]