diff options
| -rw-r--r-- | mm/2s2h/resource/importer/CutsceneFactory.cpp | 3 | ||||
| -rw-r--r-- | mm/include/color.h | 1 | ||||
| -rw-r--r-- | mm/include/command_macros_base.h | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/mm/2s2h/resource/importer/CutsceneFactory.cpp b/mm/2s2h/resource/importer/CutsceneFactory.cpp index 59035ee55..ce75d5972 100644 --- a/mm/2s2h/resource/importer/CutsceneFactory.cpp +++ b/mm/2s2h/resource/importer/CutsceneFactory.cpp @@ -113,6 +113,9 @@ ResourceFactoryBinaryCutsceneV0::ReadResource(std::shared_ptr<Ship::File> file, uint32_t header1 = read_CMD_HH(reader); uint32_t numEntries = header1 & 0xFFFF; + if (reader->GetEndianness() != Ship::Endianness::Native) { + numEntries = header1 >> 16 & 0xFFFF; + } cutscene->commands.push_back(header1); if (numEntries == 0xFFFF) { diff --git a/mm/include/color.h b/mm/include/color.h index 72afeac63..5f15c23c9 100644 --- a/mm/include/color.h +++ b/mm/include/color.h @@ -1,6 +1,7 @@ #ifndef _COLOR_H_ #define _COLOR_H_ +#include <endianness.h> #include "PR/ultratypes.h" #include <libultraship/color.h> // For checking the alpha bit in an RGBA16 pixel diff --git a/mm/include/command_macros_base.h b/mm/include/command_macros_base.h index 22603821f..790af9a1c 100644 --- a/mm/include/command_macros_base.h +++ b/mm/include/command_macros_base.h @@ -1,6 +1,8 @@ #ifndef _COMMAND_MACROS_BASE_H_ #define _COMMAND_MACROS_BASE_H_ +#include <endianness.h> + /** * Command Base macros intended for use in designing of more specific command macros * Each macro packs bytes (B), halfwords (H) and words (W, for consistency) into a single word |
