Commit graph

2 commits

Author SHA1 Message Date
James Lambert 1228850440 Better integrate subtitle generation into the build process 2023-10-10 22:13:48 -06:00
westonCoder b2bde849ba Dynamic Captions Building and Enhancements
- python file added and invoked at make that produces a subtitles.c and subtitles.h synamically based on the closed captions files present inside of the resource/ folder
- added an in-game  slider to choose from the languages which were dynamically loaded at time of building.
- if no closecaption files are present at the time of building, the script will still make the subtitles.c/.h but it just wont have any data. This will also result in the two menu items relating to closed captions being removed.
- the names of subtitles in the .yaml files are the upercase versions of the names of subtitles in each subtitle file, so that they are easy to find.
- fixed margins on sides of subtitles
- fixed color of subtitles to be more visible
- sped up the fade in and out animations.
- automated new-line breaks.

Issues I have seen:
- if you load more than like 6 closed caption languages into the resource/ folder the game doesnt seem to want to start up once built. I think this is due to the sheer size of the subtitles.c file that is generated. I would love some feedback on how to make this work a little better/be more memory efficient, as it would be nice to have every closed caption language available on every build.
- languages with very unique characters (chinese, japanese, korean, greek, etc.) do not work because the python codec that is used to decode/encode the files doesnt support them. for now that logic is in a try/except so it wont fail, it will simply skip a language that is not supported.
2023-10-09 21:09:22 -05:00