diff --git a/fast64_internal/sm64/animation/exporting.py b/fast64_internal/sm64/animation/exporting.py index 87accc209..a983d57e1 100644 --- a/fast64_internal/sm64/animation/exporting.py +++ b/fast64_internal/sm64/animation/exporting.py @@ -69,21 +69,21 @@ def get_animation_pairs( return pairs -def update_includes(level_name: str, groupName: str, dir_name: str, dir_path: str, header_type: str): +def update_includes(level_name: str, group_name: str, dir_name: str, dir_path: str, header_type: str): if header_type == "Actor": - groupPathC = os.path.join(dir_path, groupName + ".c") - groupPathH = os.path.join(dir_path, groupName + ".h") + data_path = os.path.join(dir_path, f"{group_name}.c") + header_path = os.path.join(dir_path, f"{group_name}.h") - writeIfNotFound(groupPathC, '\n#include "' + dir_name + '/anims/data.inc.c"', "") - writeIfNotFound(groupPathC, '\n#include "' + dir_name + '/anims/table.inc.c"', "") - writeIfNotFound(groupPathH, '\n#include "' + dir_name + '/anim_header.h"', "#endif") + writeIfNotFound(data_path, f'\n#include "{dir_name}/anims/data.inc.c"', "") + writeIfNotFound(data_path, f'\n#include "{dir_name}/anims/table.inc.c"', "") + writeIfNotFound(header_path, f'\n#include "{dir_name}/anim_header.h"', "#endif") elif header_type == "Level": - groupPathC = os.path.join(dir_path, "leveldata.c") - groupPathH = os.path.join(dir_path, "header.h") + data_path = os.path.join(dir_path, "leveldata.c") + header_path = os.path.join(dir_path, "header.h") - writeIfNotFound(groupPathC, '\n#include "levels/' + level_name + "/" + dir_name + '/anims/data.inc.c"', "") - writeIfNotFound(groupPathC, '\n#include "levels/' + level_name + "/" + dir_name + '/anims/table.inc.c"', "") - writeIfNotFound(groupPathH, '\n#include "levels/' + level_name + "/" + dir_name + '/anim_header.h"', "\n#endif") + writeIfNotFound(data_path, f'\n#include "levels/{level_name}/{dir_name}/anims/data.inc.c"', "") + writeIfNotFound(data_path, f'\n#include "levels/{level_name}/{dir_name}/anims/table.inc.c"', "") + writeIfNotFound(header_path, f'\n#include "levels/{level_name}/{dir_name}/anim_header.h"', "\n#endif") def write_anim_header(anim_header_path: str, table_name: str):