mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-11-07 01:01:59 +00:00
refactor: support multiple variants for games in zonecode
This commit is contained in:
61 files changed
+411
-288
No files matched your search
@@ -18,8 +18,11 @@ RenderingUsedType::RenderingUsedType(const DataDefinition* type, StructureInform
|
||||
{
|
||||
}
|
||||
|
||||
OncePerAssetRenderingContext::OncePerAssetRenderingContext(std::string game, const WordSize gameWordSize, std::vector<const FastFileBlock*> fastFileBlocks)
|
||||
: BaseRenderingContext(std::move(game), gameWordSize, std::move(fastFileBlocks)),
|
||||
OncePerAssetRenderingContext::OncePerAssetRenderingContext(std::string game,
|
||||
const WordSize gameWordSize,
|
||||
const std::endian endianness,
|
||||
std::vector<const FastFileBlock*> fastFileBlocks)
|
||||
: BaseRenderingContext(std::move(game), gameWordSize, endianness, std::move(fastFileBlocks)),
|
||||
m_asset(nullptr),
|
||||
m_has_actions(false)
|
||||
{
|
||||
@@ -185,10 +188,11 @@ bool OncePerAssetRenderingContext::UsedTypeHasActions(const RenderingUsedType* u
|
||||
return false;
|
||||
}
|
||||
|
||||
std::unique_ptr<OncePerAssetRenderingContext> OncePerAssetRenderingContext::BuildContext(const IDataRepository* repository, StructureInformation* asset)
|
||||
std::unique_ptr<OncePerAssetRenderingContext>
|
||||
OncePerAssetRenderingContext::BuildContext(const IDataRepository* repository, StructureInformation* asset, const GameVariant* variant)
|
||||
{
|
||||
auto context = std::make_unique<OncePerAssetRenderingContext>(
|
||||
OncePerAssetRenderingContext(repository->GetGameName(), repository->GetWordSize(), repository->GetAllFastFileBlocks()));
|
||||
OncePerAssetRenderingContext(repository->GetGameName(), variant->m_word_size, variant->m_endianness, repository->GetAllFastFileBlocks()));
|
||||
|
||||
context->MakeAsset(repository, asset);
|
||||
context->CreateUsedTypeCollections();
|
||||
|
||||
Reference in new issue
Block a user