Fix splines

This commit is contained in:
louist103
2024-05-22 09:04:57 -05:00
committed by Garrett Cox
parent 5e96bdeba5
commit d46b3bc2fa
4 changed files with 28 additions and 6 deletions
+1 -1
Submodule ZAPDTR updated: 01615a6c4c...f30b7de367
+26 -1
View File
@@ -745,9 +745,34 @@ void LUS::CutsceneFactoryV0::ParseFileBinaryMM(std::shared_ptr<BinaryReader> rea
uint32_t size = reader->ReadUInt32();
cutscene->commands.push_back(size);
for (uint32_t i = 0; i < (size / 4); i++) {
while (1) {
// We need to store the first half of the header to get the number of entries.
uint32_t header1 = read_CMD_HH(reader);
uint32_t numEntries = header1 & 0xFFFF;
cutscene->commands.push_back(header1);
if (numEntries == 0xFFFF) {
break; //Last command is HH(0xFFFF, 0004) which was already read in and pushed into the vector
}
cutscene->commands.push_back(read_CMD_HH(reader));
for (size_t j = 0; j < numEntries * 2; j++) {
cutscene->commands.push_back(read_CMD_BBH(reader));
cutscene->commands.push_back(read_CMD_HH(reader));
cutscene->commands.push_back(read_CMD_HH(reader));
}
for (size_t j = 0; j < numEntries; j++) {
cutscene->commands.push_back(read_CMD_HH(reader));
cutscene->commands.push_back(read_CMD_HH(reader));
}
}
//for (uint32_t i = 0; i < (size / 4); i++) {
//cutscene->commands.push_back(read_CMD_HH(reader));
//}
break;
}
case CS_CMD_MISC: {
@@ -16,7 +16,6 @@ size_t SetCutscenes::GetPointerSize() {
}
CutsceneScriptEntry* SetCutscenesMM::GetPointer() {
// return nullptr; // BENTODO
if (entries.size() == 0) {
return nullptr;
}
@@ -24,8 +23,6 @@ CutsceneScriptEntry* SetCutscenesMM::GetPointer() {
}
size_t SetCutscenesMM::GetPointerSize() {
//return 0;
// BENTODO
if (entries.size() == 0) {
return 0;
}