diff options
| author | Louis <35883445+louist103@users.noreply.github.com> | 2024-01-13 23:49:07 -0500 |
|---|---|---|
| committer | louist103 <35883445+louist103@users.noreply.github.com> | 2024-03-02 12:13:15 -0500 |
| commit | fb78ffd5ddc18d03f07991002bb2a756beaef528 (patch) | |
| tree | 5524726df03b865c9a2debfd6f127e23db4ccf42 | |
| parent | 906ddd81fd04e9e2b819a16fd6e6c1134c60e3ad (diff) | |
Fix for splines
| -rw-r--r-- | OTRExporter/CutsceneExporter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OTRExporter/CutsceneExporter.cpp b/OTRExporter/CutsceneExporter.cpp index 23d0162..dcb31aa 100644 --- a/OTRExporter/CutsceneExporter.cpp +++ b/OTRExporter/CutsceneExporter.cpp @@ -496,7 +496,11 @@ void OTRExporter_Cutscene::SaveMM(ZCutscene* cs, BinaryWriter* writer) { // BENTODO: Can these stay consilidated? case CutsceneMM_CommandType::CS_CMD_CAMERA_SPLINE: { writer->Write((uint32_t)CutsceneMM_CommandType::CS_CMD_CAMERA_SPLINE); - writer->Write((uint32_t)(cs->commands[i]->entries.size() * sizeof(uint32_t))); + // This command uses 4 different macros that are all different sizes and uses the number of bytes of the + // whole command instead of entries like most other commands. numEntries isn't actually the number of entries in the command + // rather the number of bytes the command will take up in the rom. We also can not simply use GetCommandSize because it returns + // a larger size to help ZAPD know where to start reading for the next command. + writer->Write(cs->commands[i]->numEntries); // monkaS size_t j = 0; for (;;) { |
