Merge pull request #286 from westonCoder/makefile-imports-subtitles-fix

Slight Fixes to Subtitles Making
This commit is contained in:
Weston 2023-10-11 12:27:02 -05:00 committed by GitHub
commit 9f14d9aac2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 7 deletions

View file

@ -312,7 +312,7 @@ build/src/scene/switch.o: build/assets/models/props/switch001.h build/assets/mat
build/src/util/dynamic_asset_data.o: build/assets/models/dynamic_model_list_data.h
build/src/util/dynamic_asset_loader.o: build/assets/models/dynamic_model_list.h build/assets/models/dynamic_animated_model_list.h
build/src/menu/audio_options.o: build/src/audio/subtitles.h
build/src/scene/hud.o: build/src/audio/subtitles.h
build/src/scene/scene.o: build/src/audio/subtitles.h
ANIM_TEST_CHAMBERS = build/assets/test_chambers/test_chamber_00/test_chamber_00_anim.o \
@ -443,8 +443,7 @@ build/src/decor/decor_object_list.o: build/src/audio/clips.h
####################
build/src/audio/subtitles.h build/src/audio/subtitles.c: resource/closecaption_english.txt tools/level_scripts/subtitle_generate.py
@mkdir -p $(@D)
python3 tools/level_scripts/subtitle_generate.py
@python tools/level_scripts/subtitle_generate.py
####################
## Linking

View file

@ -10,7 +10,7 @@
#include "../sk64/skelatool_clip.h"
#include "../sk64/skelatool_armature.h"
#include "../physics/collision_box.h"
#include "../build/src/audio/subtitles.h"
#include "../../build/src/audio/subtitles.h"
#define NO_TRANSFORM_INDEX 0xFF

View file

@ -77,7 +77,11 @@ def make_overall_subtitles_header(all_header_lines, languages_list):
header_lines.append("#endif")
with open("build/src/audio/subtitles.h", "w") as f:
headerfile_path = "build/src/audio/subtitles.h"
if not os.path.exists(os.path.dirname(os.path.abspath(headerfile_path))):
os.makedirs(os.path.dirname(os.path.abspath(headerfile_path)))
with open(headerfile_path, "w") as f:
f.writelines(header_lines)
def make_SubtitleKey_headerlines(keys):
@ -133,8 +137,11 @@ def make_overall_subtitles_sourcefile(other_sourcefile_lines, language_list):
sourcefile_lines.append("};\n")
sourcefile_lines.append("\n")
sourcefile_lines.extend(other_sourcefile_lines)
sourcefile_path = "build/src/audio/subtitles.c"
if not os.path.exists(os.path.dirname(os.path.abspath(sourcefile_path))):
os.makedirs(os.path.dirname(os.path.abspath(sourcefile_path)))
with open("build/src/audio/subtitles.c", "w") as f:
with open(sourcefile_path, "w") as f:
f.writelines(sourcefile_lines)
def process_all_closecaption_files(dir):