From 89d44f650160c6953944bad00a675be76d84aa9b Mon Sep 17 00:00:00 2001 From: MysterD Date: Wed, 9 Mar 2022 23:09:33 -0800 Subject: [PATCH] Moved smlua_XXX_utils.[ch] to src/pc/lua/utils/ --- Makefile | 2 +- autogen/convert_constants.py | 2 +- autogen/convert_functions.py | 8 ++++---- autogen/convert_structs.py | 6 +++--- src/engine/level_script.c | 2 +- src/game/behavior_actions.c | 2 +- src/game/obj_behaviors_2.c | 2 +- src/pc/lua/smlua_cobject.c | 4 ++-- src/pc/lua/smlua_cobject_autogen.c | 6 +++--- src/pc/lua/smlua_functions_autogen.c | 6 +++--- src/pc/lua/{ => utils}/smlua_anim_utils.c | 2 +- src/pc/lua/{ => utils}/smlua_anim_utils.h | 0 src/pc/lua/{ => utils}/smlua_collision_utils.c | 2 +- src/pc/lua/{ => utils}/smlua_collision_utils.h | 0 src/pc/lua/{ => utils}/smlua_misc_utils.c | 2 +- src/pc/lua/{ => utils}/smlua_misc_utils.h | 0 src/pc/lua/{ => utils}/smlua_model_utils.c | 0 src/pc/lua/{ => utils}/smlua_model_utils.h | 0 src/pc/lua/{ => utils}/smlua_obj_utils.c | 2 +- src/pc/lua/{ => utils}/smlua_obj_utils.h | 0 src/pc/network/packets/packet_spawn_objects.c | 2 +- 21 files changed, 25 insertions(+), 25 deletions(-) rename src/pc/lua/{ => utils}/smlua_anim_utils.c (99%) rename src/pc/lua/{ => utils}/smlua_anim_utils.h (100%) rename src/pc/lua/{ => utils}/smlua_collision_utils.c (99%) rename src/pc/lua/{ => utils}/smlua_collision_utils.h (100%) rename src/pc/lua/{ => utils}/smlua_misc_utils.c (83%) rename src/pc/lua/{ => utils}/smlua_misc_utils.h (100%) rename src/pc/lua/{ => utils}/smlua_model_utils.c (100%) rename src/pc/lua/{ => utils}/smlua_model_utils.h (100%) rename src/pc/lua/{ => utils}/smlua_obj_utils.c (99%) rename src/pc/lua/{ => utils}/smlua_obj_utils.h (100%) diff --git a/Makefile b/Makefile index f4a40965..11f0f02d 100644 --- a/Makefile +++ b/Makefile @@ -374,7 +374,7 @@ LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h))) # Hi, I'm a PC SRC_DIRS := src src/engine src/game src/audio src/menu src/buffers actors levels bin data assets src/pc src/pc/gfx src/pc/audio src/pc/controller src/pc/fs src/pc/fs/packtypes -SRC_DIRS += src/pc/network src/pc/network/packets src/pc/network/socket src/pc/utils src/pc/djui src/pc/lua +SRC_DIRS += src/pc/network src/pc/network/packets src/pc/network/socket src/pc/utils src/pc/djui src/pc/lua src/pc/lua/utils ASM_DIRS := #ifeq ($(DISCORDRPC),1) diff --git a/autogen/convert_constants.py b/autogen/convert_constants.py index 4fa599e9..ebe7ac20 100644 --- a/autogen/convert_constants.py +++ b/autogen/convert_constants.py @@ -21,7 +21,7 @@ in_files = [ "src/game/interaction.h", "src/pc/djui/djui_hud_utils.h", "include/behavior_table.h", - "src/pc/lua/smlua_model_utils.h", + "src/pc/lua/utils/smlua_model_utils.h", "include/object_constants.h", "include/mario_geo_switch_case_ids.h", "src/game/object_list_processor.h", diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py index e93da6f2..26e2dd0c 100644 --- a/autogen/convert_functions.py +++ b/autogen/convert_functions.py @@ -35,9 +35,9 @@ in_files = [ "src/pc/djui/djui_hud_utils.h", "src/pc/network/network_player.h", "include/behavior_table.h", - "src/pc/lua/smlua_obj_utils.h", - "src/pc/lua/smlua_misc_utils.h", - 'src/pc/lua/smlua_collision_utils.h', + "src/pc/lua/utils/smlua_obj_utils.h", + "src/pc/lua/utils/smlua_misc_utils.h", + 'src/pc/lua/utils/smlua_collision_utils.h', "src/game/object_helpers.c", "src/game/obj_behaviors.c", "src/game/obj_behaviors_2.c", @@ -77,7 +77,7 @@ override_disallowed_functions = { } lua_function_params = { - "src/pc/lua/smlua_obj_utils.h::spawn_object_sync::objSetupFunction": [ "struct Object*" ] + "src/pc/lua/utils/smlua_obj_utils.h::spawn_object_sync::objSetupFunction": [ "struct Object*" ] } ########################################################### diff --git a/autogen/convert_structs.py b/autogen/convert_structs.py index 6c0d335a..5de01e58 100644 --- a/autogen/convert_structs.py +++ b/autogen/convert_structs.py @@ -15,9 +15,9 @@ in_files = [ 'src/pc/djui/djui_hud_utils.h', 'src/game/object_helpers.h', 'src/game/mario_step.h', - 'src/pc/lua/smlua_anim_utils.h', - 'src/pc/lua/smlua_misc_utils.h', - 'src/pc/lua/smlua_collision_utils.h', + 'src/pc/lua/utils/smlua_anim_utils.h', + 'src/pc/lua/utils/smlua_misc_utils.h', + 'src/pc/lua/utils/smlua_collision_utils.h', 'src/game/spawn_sound.h', ] diff --git a/src/engine/level_script.c b/src/engine/level_script.c index fffb464d..86fccace 100644 --- a/src/engine/level_script.c +++ b/src/engine/level_script.c @@ -23,7 +23,7 @@ #include "surface_collision.h" #include "surface_load.h" #include "level_table.h" -#include "src/pc/lua/smlua_model_utils.h" +#include "src/pc/lua/utils/smlua_model_utils.h" #define CMD_GET(type, offset) (*(type *) (CMD_PROCESS_OFFSET(offset) + (u8 *) sCurrentCmd)) diff --git a/src/game/behavior_actions.c b/src/game/behavior_actions.c index a229cf34..cc5a0c40 100644 --- a/src/game/behavior_actions.c +++ b/src/game/behavior_actions.c @@ -46,7 +46,7 @@ #include "thread6.h" #include "area.h" #include "game/rng_position.h" -#include "pc/lua/smlua_model_utils.h" +#include "pc/lua/utils/smlua_model_utils.h" #define o gCurrentObject diff --git a/src/game/obj_behaviors_2.c b/src/game/obj_behaviors_2.c index 66721a3e..c7f45cac 100644 --- a/src/game/obj_behaviors_2.c +++ b/src/game/obj_behaviors_2.c @@ -47,7 +47,7 @@ #include "engine/surface_load.h" #include "pc/network/network.h" #include "pc/network/reservation_area.h" -#include "pc/lua/smlua_model_utils.h" +#include "pc/lua/utils/smlua_model_utils.h" #define POS_OP_SAVE_POSITION 0 #define POS_OP_COMPUTE_VELOCITY 1 diff --git a/src/pc/lua/smlua_cobject.c b/src/pc/lua/smlua_cobject.c index 9c0b6bf2..ae9698b5 100644 --- a/src/pc/lua/smlua_cobject.c +++ b/src/pc/lua/smlua_cobject.c @@ -7,8 +7,8 @@ #include "object_fields.h" #include "pc/djui/djui_hud_utils.h" #include "pc/lua/smlua.h" -#include "pc/lua/smlua_anim_utils.h" -#include "pc/lua/smlua_collision_utils.h" +#include "pc/lua/utils/smlua_anim_utils.h" +#include "pc/lua/utils/smlua_collision_utils.h" #include "pc/mod_list.h" #define LUA_VEC3S_FIELD_COUNT 3 diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index 2f8a6799..458cd248 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -10,9 +10,9 @@ #include "src/pc/djui/djui_hud_utils.h" #include "src/game/object_helpers.h" #include "src/game/mario_step.h" -#include "src/pc/lua/smlua_anim_utils.h" -#include "src/pc/lua/smlua_misc_utils.h" -#include "src/pc/lua/smlua_collision_utils.h" +#include "src/pc/lua/utils/smlua_anim_utils.h" +#include "src/pc/lua/utils/smlua_misc_utils.h" +#include "src/pc/lua/utils/smlua_collision_utils.h" #include "src/game/spawn_sound.h" #include "include/object_fields.h" diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index 258fdce4..ea5d82fb 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -19,9 +19,9 @@ #include "src/pc/djui/djui_hud_utils.h" #include "src/pc/network/network_player.h" #include "include/behavior_table.h" -#include "src/pc/lua/smlua_obj_utils.h" -#include "src/pc/lua/smlua_misc_utils.h" -#include "src/pc/lua/smlua_collision_utils.h" +#include "src/pc/lua/utils/smlua_obj_utils.h" +#include "src/pc/lua/utils/smlua_misc_utils.h" +#include "src/pc/lua/utils/smlua_collision_utils.h" #include "src/engine/surface_load.h" diff --git a/src/pc/lua/smlua_anim_utils.c b/src/pc/lua/utils/smlua_anim_utils.c similarity index 99% rename from src/pc/lua/smlua_anim_utils.c rename to src/pc/lua/utils/smlua_anim_utils.c index 76a10ced..f42eaebf 100644 --- a/src/pc/lua/smlua_anim_utils.c +++ b/src/pc/lua/utils/smlua_anim_utils.c @@ -1,6 +1,6 @@ #include "types.h" -#include "smlua.h" +#include "pc/lua/smlua.h" #include "smlua_anim_utils.h" #include "pc/debuglog.h" diff --git a/src/pc/lua/smlua_anim_utils.h b/src/pc/lua/utils/smlua_anim_utils.h similarity index 100% rename from src/pc/lua/smlua_anim_utils.h rename to src/pc/lua/utils/smlua_anim_utils.h diff --git a/src/pc/lua/smlua_collision_utils.c b/src/pc/lua/utils/smlua_collision_utils.c similarity index 99% rename from src/pc/lua/smlua_collision_utils.c rename to src/pc/lua/utils/smlua_collision_utils.c index ddc8bfe9..1898549b 100644 --- a/src/pc/lua/smlua_collision_utils.c +++ b/src/pc/lua/utils/smlua_collision_utils.c @@ -2,7 +2,7 @@ #include "src/engine/surface_collision.h" -#include "smlua.h" +#include "pc/lua/smlua.h" #include "smlua_collision_utils.h" #include "pc/debuglog.h" diff --git a/src/pc/lua/smlua_collision_utils.h b/src/pc/lua/utils/smlua_collision_utils.h similarity index 100% rename from src/pc/lua/smlua_collision_utils.h rename to src/pc/lua/utils/smlua_collision_utils.h diff --git a/src/pc/lua/smlua_misc_utils.c b/src/pc/lua/utils/smlua_misc_utils.c similarity index 83% rename from src/pc/lua/smlua_misc_utils.c rename to src/pc/lua/utils/smlua_misc_utils.c index 576b298f..5dc9bb1c 100644 --- a/src/pc/lua/smlua_misc_utils.c +++ b/src/pc/lua/utils/smlua_misc_utils.c @@ -1,6 +1,6 @@ #include "types.h" -#include "smlua.h" +#include "pc/lua/smlua.h" #include "smlua_misc_utils.h" #include "pc/debuglog.h" diff --git a/src/pc/lua/smlua_misc_utils.h b/src/pc/lua/utils/smlua_misc_utils.h similarity index 100% rename from src/pc/lua/smlua_misc_utils.h rename to src/pc/lua/utils/smlua_misc_utils.h diff --git a/src/pc/lua/smlua_model_utils.c b/src/pc/lua/utils/smlua_model_utils.c similarity index 100% rename from src/pc/lua/smlua_model_utils.c rename to src/pc/lua/utils/smlua_model_utils.c diff --git a/src/pc/lua/smlua_model_utils.h b/src/pc/lua/utils/smlua_model_utils.h similarity index 100% rename from src/pc/lua/smlua_model_utils.h rename to src/pc/lua/utils/smlua_model_utils.h diff --git a/src/pc/lua/smlua_obj_utils.c b/src/pc/lua/utils/smlua_obj_utils.c similarity index 99% rename from src/pc/lua/smlua_obj_utils.c rename to src/pc/lua/utils/smlua_obj_utils.c index bb2cbde5..9bca2af9 100644 --- a/src/pc/lua/smlua_obj_utils.c +++ b/src/pc/lua/utils/smlua_obj_utils.c @@ -3,7 +3,7 @@ #include "object_fields.h" #include "src/game/object_helpers.h" -#include "smlua.h" +#include "pc/lua/smlua.h" #include "smlua_obj_utils.h" #include "smlua_model_utils.h" #include "pc/debuglog.h" diff --git a/src/pc/lua/smlua_obj_utils.h b/src/pc/lua/utils/smlua_obj_utils.h similarity index 100% rename from src/pc/lua/smlua_obj_utils.h rename to src/pc/lua/utils/smlua_obj_utils.h diff --git a/src/pc/network/packets/packet_spawn_objects.c b/src/pc/network/packets/packet_spawn_objects.c index bc11f636..c9d53695 100644 --- a/src/pc/network/packets/packet_spawn_objects.c +++ b/src/pc/network/packets/packet_spawn_objects.c @@ -7,7 +7,7 @@ #include "src/game/area.h" #include "behavior_data.h" #include "behavior_table.h" -#include "src/pc/lua/smlua_model_utils.h" +#include "src/pc/lua/utils/smlua_model_utils.h" //#define DISABLE_MODULE_LOG 1 #include "pc/debuglog.h"