diff --git a/soh/soh/resource/importer/CutsceneFactory.cpp b/soh/soh/resource/importer/CutsceneFactory.cpp index c8d3b0e19f..1d96178b9c 100644 --- a/soh/soh/resource/importer/CutsceneFactory.cpp +++ b/soh/soh/resource/importer/CutsceneFactory.cpp @@ -2,14 +2,14 @@ #include "soh/resource/type/Cutscene.h" #include "spdlog/spdlog.h" -static inline uint32_t read_CMD_BBBB(std::shared_ptr reader) { +static uint32_t read_CMD_BBBB(Ship::BinaryReader* reader) { uint32_t v; reader->Read((char*)&v, sizeof(uint32_t)); return v; } -static inline uint32_t read_CMD_BBH(std::shared_ptr reader) { +static uint32_t read_CMD_BBH(Ship::BinaryReader* reader) { uint32_t v; reader->Read((char*)&v, sizeof(uint32_t)); @@ -24,7 +24,7 @@ static inline uint32_t read_CMD_BBH(std::shared_ptr reader) return v; } -static inline uint32_t read_CMD_HBB(std::shared_ptr reader) { +static uint32_t read_CMD_HBB(Ship::BinaryReader* reader) { uint32_t v; reader->Read((char*)&v, sizeof(uint32_t)); @@ -39,7 +39,7 @@ static inline uint32_t read_CMD_HBB(std::shared_ptr reader) return v; } -static inline uint32_t read_CMD_HH(std::shared_ptr reader) { +static uint32_t read_CMD_HH(Ship::BinaryReader* reader) { uint32_t v; reader->Read((char*)&v, sizeof(uint32_t)); @@ -66,7 +66,8 @@ ResourceFactoryBinaryCutsceneV0::ReadResource(std::shared_ptr file, } auto cutscene = std::make_shared(initData); - auto reader = std::get>(file->Reader); + const auto readerShared = std::get>(file->Reader); + const auto reader = readerShared.get(); uint32_t numEntries = reader->ReadUInt32(); cutscene->commands.reserve(numEntries); diff --git a/soh/soh/resource/type/Cutscene.h b/soh/soh/resource/type/Cutscene.h index 59475d1cf9..a8748f59b3 100644 --- a/soh/soh/resource/type/Cutscene.h +++ b/soh/soh/resource/type/Cutscene.h @@ -1,7 +1,6 @@ #pragma once #include -#include #include namespace SOH {