mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-31 12:00:25 -07:00
bump lus (#5187)
* pushing what i have so i can try to figure out HW_REG errors * HW_REG (fix? workaround? either way it builds now) * factory fixes and shaders * bump again * bump again * copy shaders for `ExtractAssets` too (instead of just in `GenerateSohOtr`)
This commit is contained in:
parent
9ae9dc4977
commit
26aa36fe7b
33 changed files with 97 additions and 82 deletions
|
@ -199,6 +199,11 @@ find_package(Python3 COMPONENTS Interpreter)
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
ExtractAssets
|
ExtractAssets
|
||||||
COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr oot-mq.otr soh.otr
|
COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr oot-mq.otr soh.otr
|
||||||
|
|
||||||
|
# copy LUS default shaders into assets/custom
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E rm -r -f ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom/shaders/
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/libultraship/src/graphic/Fast3D/shaders/ ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom/shaders/
|
||||||
|
|
||||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --non-interactive --xml-root ../soh/assets/xml --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}"
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --non-interactive --xml-root ../soh/assets/xml --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}"
|
||||||
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
|
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
||||||
|
@ -220,6 +225,11 @@ add_custom_target(
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
GenerateSohOtr
|
GenerateSohOtr
|
||||||
COMMAND ${CMAKE_COMMAND} -E rm -f soh.otr
|
COMMAND ${CMAKE_COMMAND} -E rm -f soh.otr
|
||||||
|
|
||||||
|
# copy LUS default shaders into assets/custom
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E rm -r -f ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom/shaders/
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/libultraship/src/graphic/Fast3D/shaders/ ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom/shaders/
|
||||||
|
|
||||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --norom --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}"
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --norom --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}"
|
||||||
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DONLYSOHOTR=On -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
|
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DONLYSOHOTR=On -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 02bb77ef253e2de0969fd2cb36ad2e870677d18d
|
Subproject commit 455b6dadef901d586332d6015fd2fd01ff07b54c
|
1
soh/assets/.gitignore
vendored
1
soh/assets/.gitignore
vendored
|
@ -5,3 +5,4 @@
|
||||||
*.vtx.inc
|
*.vtx.inc
|
||||||
*.dlist.inc
|
*.dlist.inc
|
||||||
!*.png
|
!*.png
|
||||||
|
custom/shaders
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
// #define __attribute__(x)
|
// #define __attribute__(x)
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
// this was removed from the LUS rcp.h in https://github.com/Kenix3/libultraship/pull/833/
|
||||||
|
// it is still used in graph.c and fault.c
|
||||||
|
#define HW_REG(reg, type) *(volatile type*)((reg) | 0xA0000000)
|
||||||
|
|
||||||
// SoH [Port] Always use the AVOID_UB version (we don't set AVOID_UB while building yet)
|
// SoH [Port] Always use the AVOID_UB version (we don't set AVOID_UB while building yet)
|
||||||
/*
|
/*
|
||||||
#ifndef AVOID_UB
|
#ifndef AVOID_UB
|
||||||
|
|
|
@ -909,7 +909,7 @@ OTRVersion ReadPortVersionFromOTR(std::string otrPath) {
|
||||||
// Use a temporary archive instance to load the otr and read the version file
|
// Use a temporary archive instance to load the otr and read the version file
|
||||||
auto archive = std::make_shared<Ship::OtrArchive>(otrPath);
|
auto archive = std::make_shared<Ship::OtrArchive>(otrPath);
|
||||||
if (archive->Open()) {
|
if (archive->Open()) {
|
||||||
auto t = archive->LoadFile("portVersion", std::make_shared<Ship::ResourceInitData>());
|
auto t = archive->LoadFile("portVersion");
|
||||||
if (t != nullptr && t->IsLoaded) {
|
if (t != nullptr && t->IsLoaded) {
|
||||||
auto stream = std::make_shared<Ship::MemoryStream>(t->Buffer->data(), t->Buffer->size());
|
auto stream = std::make_shared<Ship::MemoryStream>(t->Buffer->data(), t->Buffer->size());
|
||||||
auto reader = std::make_shared<Ship::BinaryReader>(stream);
|
auto reader = std::make_shared<Ship::BinaryReader>(stream);
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAnimationV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAnimationV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto animation = std::make_shared<Animation>(file->InitData);
|
auto animation = std::make_shared<Animation>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
AnimationType animType = (AnimationType)reader->ReadUInt32();
|
AnimationType animType = (AnimationType)reader->ReadUInt32();
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryAnimationV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryAnimationV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
#include "graphic/Fast3D/lus_gbi.h"
|
#include "graphic/Fast3D/lus_gbi.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryArrayV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryArrayV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto array = std::make_shared<Array>(file->InitData);
|
auto array = std::make_shared<Array>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
array->ArrayType = (ArrayResourceType)reader->ReadUInt32();
|
array->ArrayType = (ArrayResourceType)reader->ReadUInt32();
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryArrayV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryArrayV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace LUS
|
} // namespace LUS
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAudioSampleV2::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAudioSampleV2::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto audioSample = std::make_shared<AudioSample>(file->InitData);
|
auto audioSample = std::make_shared<AudioSample>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
audioSample->sample.codec = reader->ReadUByte();
|
audioSample->sample.codec = reader->ReadUByte();
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryAudioSampleV2 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryAudioSampleV2 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAudioSequenceV2::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAudioSequenceV2::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto audioSequence = std::make_shared<AudioSequence>(file->InitData);
|
auto audioSequence = std::make_shared<AudioSequence>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
audioSequence->sequence.seqDataSize = reader->ReadInt32();
|
audioSequence->sequence.seqDataSize = reader->ReadInt32();
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryAudioSequenceV2 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryAudioSequenceV2 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
#include "libultraship/libultraship.h"
|
#include "libultraship/libultraship.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAudioSoundFontV2::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryAudioSoundFontV2::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto audioSoundFont = std::make_shared<AudioSoundFont>(file->InitData);
|
auto audioSoundFont = std::make_shared<AudioSoundFont>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
audioSoundFont->soundFont.fntIndex = reader->ReadInt32();
|
audioSoundFont->soundFont.fntIndex = reader->ReadInt32();
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryAudioSoundFontV2 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryAudioSoundFontV2 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryBackgroundV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryBackgroundV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto background = std::make_shared<Background>(file->InitData);
|
auto background = std::make_shared<Background>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
uint32_t dataSize = reader->ReadUInt32();
|
uint32_t dataSize = reader->ReadUInt32();
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryBackgroundV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryBackgroundV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryCollisionHeaderV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryCollisionHeaderV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto collisionHeader = std::make_shared<CollisionHeader>(file->InitData);
|
auto collisionHeader = std::make_shared<CollisionHeader>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
collisionHeader->collisionHeaderData.minBounds.x = reader->ReadInt16();
|
collisionHeader->collisionHeaderData.minBounds.x = reader->ReadInt16();
|
||||||
|
@ -123,12 +123,12 @@ std::shared_ptr<Ship::IResource> ResourceFactoryBinaryCollisionHeaderV0::ReadRes
|
||||||
return collisionHeader;
|
return collisionHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryXMLCollisionHeaderV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryXMLCollisionHeaderV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto collisionHeader = std::make_shared<CollisionHeader>(file->InitData);
|
auto collisionHeader = std::make_shared<CollisionHeader>(initData);
|
||||||
|
|
||||||
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader)->FirstChildElement();
|
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader)->FirstChildElement();
|
||||||
auto child = reader->FirstChildElement();
|
auto child = reader->FirstChildElement();
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryCollisionHeaderV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryCollisionHeaderV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ResourceFactoryXMLCollisionHeaderV0 : public Ship::ResourceFactoryXML {
|
class ResourceFactoryXMLCollisionHeaderV0 : public Ship::ResourceFactoryXML {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -58,12 +58,12 @@ static inline uint32_t read_CMD_HH(std::shared_ptr<Ship::BinaryReader> reader) {
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryCutsceneV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryCutsceneV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto cutscene = std::make_shared<Cutscene>(file->InitData);
|
auto cutscene = std::make_shared<Cutscene>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
uint32_t numEntries = reader->ReadUInt32();
|
uint32_t numEntries = reader->ReadUInt32();
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryCutsceneV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryCutsceneV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryPathV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryPathV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto path = std::make_shared<Path>(file->InitData);
|
auto path = std::make_shared<Path>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
path->numPaths = reader->ReadUInt32();
|
path->numPaths = reader->ReadUInt32();
|
||||||
|
@ -43,12 +43,12 @@ std::shared_ptr<Ship::IResource> ResourceFactoryBinaryPathV0::ReadResource(std::
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryXMLPathV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryXMLPathV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto path = std::make_shared<Path>(file->InitData);
|
auto path = std::make_shared<Path>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader);
|
||||||
|
|
||||||
auto pathElement = reader->RootElement();
|
auto pathElement = reader->RootElement();
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryPathV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryPathV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ResourceFactoryXMLPathV0 : public Ship::ResourceFactoryXML {
|
class ResourceFactoryXMLPathV0 : public Ship::ResourceFactoryXML {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryPlayerAnimationV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryPlayerAnimationV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto playerAnimation = std::make_shared<PlayerAnimation>(file->InitData);
|
auto playerAnimation = std::make_shared<PlayerAnimation>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
uint32_t numEntries = reader->ReadUInt32();
|
uint32_t numEntries = reader->ReadUInt32();
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryPlayerAnimationV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryPlayerAnimationV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -93,12 +93,12 @@ std::shared_ptr<ISceneCommand> ResourceFactoryBinarySceneV0::ParseSceneCommand(s
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinarySceneV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinarySceneV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto scene = std::make_shared<Scene>(file->InitData);
|
auto scene = std::make_shared<Scene>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
ParseSceneCommands(scene, reader);
|
ParseSceneCommands(scene, reader);
|
||||||
|
@ -216,12 +216,12 @@ std::shared_ptr<ISceneCommand> ResourceFactoryXMLSceneV0::ParseSceneCommand(std:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryXMLSceneV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryXMLSceneV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto scene = std::make_shared<Scene>(file->InitData);
|
auto scene = std::make_shared<Scene>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader);
|
||||||
|
|
||||||
ParseSceneCommands(scene, reader);
|
ParseSceneCommands(scene, reader);
|
||||||
|
|
|
@ -12,7 +12,7 @@ class ResourceFactoryBinarySceneV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
ResourceFactoryBinarySceneV0();
|
ResourceFactoryBinarySceneV0();
|
||||||
|
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
void ParseSceneCommands(std::shared_ptr<Scene> scene, std::shared_ptr<Ship::BinaryReader> reader);
|
void ParseSceneCommands(std::shared_ptr<Scene> scene, std::shared_ptr<Ship::BinaryReader> reader);
|
||||||
|
|
||||||
// Doing something very similar to what we do on the ResourceLoader.
|
// Doing something very similar to what we do on the ResourceLoader.
|
||||||
|
@ -28,7 +28,7 @@ class ResourceFactoryXMLSceneV0 : public Ship::ResourceFactoryXML {
|
||||||
public:
|
public:
|
||||||
ResourceFactoryXMLSceneV0();
|
ResourceFactoryXMLSceneV0();
|
||||||
|
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
void ParseSceneCommands(std::shared_ptr<Scene> scene, std::shared_ptr<tinyxml2::XMLDocument> reader);
|
void ParseSceneCommands(std::shared_ptr<Scene> scene, std::shared_ptr<tinyxml2::XMLDocument> reader);
|
||||||
|
|
||||||
// Doing something very similar to what we do on the ResourceLoader.
|
// Doing something very similar to what we do on the ResourceLoader.
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
#include <libultraship/libultraship.h>
|
#include <libultraship/libultraship.h>
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinarySkeletonV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinarySkeletonV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto skeleton = std::make_shared<Skeleton>(file->InitData);
|
auto skeleton = std::make_shared<Skeleton>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
skeleton->type = (SkeletonType)reader->ReadInt8();
|
skeleton->type = (SkeletonType)reader->ReadInt8();
|
||||||
|
@ -62,12 +62,12 @@ std::shared_ptr<Ship::IResource> ResourceFactoryBinarySkeletonV0::ReadResource(s
|
||||||
return skeleton;
|
return skeleton;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryXMLSkeletonV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryXMLSkeletonV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto skel = std::make_shared<Skeleton>(file->InitData);
|
auto skel = std::make_shared<Skeleton>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader)->FirstChildElement();
|
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader)->FirstChildElement();
|
||||||
auto child = reader->FirstChildElement();
|
auto child = reader->FirstChildElement();
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinarySkeletonV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinarySkeletonV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ResourceFactoryXMLSkeletonV0 : public Ship::ResourceFactoryXML {
|
class ResourceFactoryXMLSkeletonV0 : public Ship::ResourceFactoryXML {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
#include "libultraship/libultraship.h"
|
#include "libultraship/libultraship.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinarySkeletonLimbV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinarySkeletonLimbV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto skeletonLimb = std::make_shared<SkeletonLimb>(file->InitData);
|
auto skeletonLimb = std::make_shared<SkeletonLimb>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
skeletonLimb->limbType = (LimbType)reader->ReadInt8();
|
skeletonLimb->limbType = (LimbType)reader->ReadInt8();
|
||||||
|
@ -184,12 +184,12 @@ std::shared_ptr<Ship::IResource> ResourceFactoryBinarySkeletonLimbV0::ReadResour
|
||||||
return skeletonLimb;
|
return skeletonLimb;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryXMLSkeletonLimbV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryXMLSkeletonLimbV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto skelLimb = std::make_shared<SkeletonLimb>(file->InitData);
|
auto skelLimb = std::make_shared<SkeletonLimb>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader)->FirstChildElement();
|
auto reader = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader)->FirstChildElement();
|
||||||
|
|
||||||
std::string limbType = reader->Attribute("Type");
|
std::string limbType = reader->Attribute("Type");
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinarySkeletonLimbV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinarySkeletonLimbV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ResourceFactoryXMLSkeletonLimbV0 : public Ship::ResourceFactoryXML {
|
class ResourceFactoryXMLSkeletonLimbV0 : public Ship::ResourceFactoryXML {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryTextV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryBinaryTextV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto text = std::make_shared<Text>(file->InitData);
|
auto text = std::make_shared<Text>(initData);
|
||||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||||
|
|
||||||
uint32_t msgCount = reader->ReadUInt32();
|
uint32_t msgCount = reader->ReadUInt32();
|
||||||
|
@ -27,12 +27,12 @@ std::shared_ptr<Ship::IResource> ResourceFactoryBinaryTextV0::ReadResource(std::
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Ship::IResource> ResourceFactoryXMLTextV0::ReadResource(std::shared_ptr<Ship::File> file) {
|
std::shared_ptr<Ship::IResource> ResourceFactoryXMLTextV0::ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) {
|
||||||
if (!FileHasValidFormatAndReader(file)) {
|
if (!FileHasValidFormatAndReader(file, initData)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto txt = std::make_shared<Text>(file->InitData);
|
auto txt = std::make_shared<Text>(initData);
|
||||||
auto child = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader)->FirstChildElement()->FirstChildElement();
|
auto child = std::get<std::shared_ptr<tinyxml2::XMLDocument>>(file->Reader)->FirstChildElement()->FirstChildElement();
|
||||||
|
|
||||||
while (child != nullptr) {
|
while (child != nullptr) {
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
namespace SOH {
|
namespace SOH {
|
||||||
class ResourceFactoryBinaryTextV0 : public Ship::ResourceFactoryBinary {
|
class ResourceFactoryBinaryTextV0 : public Ship::ResourceFactoryBinary {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ResourceFactoryXMLTextV0 : public Ship::ResourceFactoryXML {
|
class ResourceFactoryXMLTextV0 : public Ship::ResourceFactoryXML {
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
|
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file, std::shared_ptr<Ship::ResourceInitData> initData) override;
|
||||||
};
|
};
|
||||||
} // namespace SOH
|
} // namespace SOH
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue