1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Fix creation of new title sequences

This commit is contained in:
Ted John
2016-11-29 13:42:24 +00:00
parent a66ce50db8
commit 975cb43137
7 changed files with 50 additions and 3 deletions

View File

@@ -39,6 +39,13 @@ static utf8 * LegacyScriptWrite(TitleSequence * seq);
extern "C"
{
TitleSequence * CreateTitleSequence()
{
TitleSequence * seq = Memory::Allocate<TitleSequence>();
Memory::Set(seq, 0, sizeof(TitleSequence));
return seq;
}
TitleSequence * LoadTitleSequence(const utf8 * path)
{
size_t scriptLength;
@@ -87,7 +94,7 @@ extern "C"
std::vector<TitleCommand> commands = LegacyScriptRead(script, scriptLength, saves);
TitleSequence * seq = Memory::Allocate<TitleSequence>();
TitleSequence * seq = CreateTitleSequence();
seq->Name = Path::GetFileNameWithoutExtension(path);
seq->Path = String::Duplicate(path);
seq->NumSaves = saves.size();