`TTFDispose` uses `gCurrentTTFFontSet` to deallocate internal resources.
Having the function called after global variable got changed meant it
tried to deallocate incorrect font and would subsequently call
`FT_Done_Face` on a struct having internal data set to nullptr.
Reproduction is fairly easy:
1. launch the game in Korean (I made sure to have all the indexes primed
for this language beforehand - i.e. launch it twice),
2. switch to Japanese,
3. switch back to Korean
Fixes#21664
* Fix memory leak loading malformed `SawyerChunk`
A temporary buffer was not free'd after failing to parse in
`SawyerChunkReader::ReadChunkTrack`. Fix this following the pattern used
in `SawyerChunkReader::ReadChunk` by wrapping the relevant code in a
`try` block with `FreeLargeTempBuffer` called when an exception is
caught.
* Use unique_ptr
* Remove `AllocateLargeTempBuffer`
---------
Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
Due to this overwriting of object IDs, loading the sound effects would not work on RCTC. This overwriting also caused object conflicts which weren’t always won by the RCTC one. This fixes both problems by using non-clashing names, and only renaming one to `rct2.audio.base`, the name expected by the asset packs.