mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-11-09 09:51:58 +00:00
* feat: QOS (007: Quantum of Solace) support * feat: add qos localize loader * feat: add qos stringtable loader * chore: comment about official zones * fix: add qos gfximage runtime fields * chore: remove useless dev time comments * fix: remove all `static_asserts`s from asset headers causing build fail on x64 * chore: change union ordering of qos `entryInternalData` * chore: move qos asset type enum to qos.h * fix: qos and t4 xsurface index buffer * chore: implement qos MaterialInfo struct * chore: adjust some gfxworld struct members * chore: implement qos PhysPreset and PhysConstraints * chore: fix and adjust slight inconsistencies with qos zone code * chore: reorder qos ZoneCode.lua entries in order of asset type enum * chore: remove asset types that are not actual asset types in zones * chore: check common asset arrays with static_assert * chore: rename qos assets * chore: reorder qos in templates to be in alphabetical order * chore: use function for CopyMipLevel in Dx9TextureLoader * chore: use templates for qos MapEntsDumper * chore: add missing braces in XModelToCommonConverter * chore: add generic way to peek at zone data * Qos does not use a classic ZoneHeader so code needs to be more generic * fix: do not use raw_byte and raw_uint typedefs for qos * fix: not being able to write clipmapmp * chore: additional research on qos vertex property and stuff --------- Co-authored-by: Jan Laupetin <[email protected]>
47 lines
1.8 KiB
C++
47 lines
1.8 KiB
C++
#pragma once
|
|
|
|
#include "Game/IGame.h"
|
|
#include "Utils/ProgressCallback.h"
|
|
#include "Zone/ZoneTypes.h"
|
|
#include "ZoneDataPeeking.h"
|
|
#include "ZoneLoader.h"
|
|
|
|
#include <memory>
|
|
#include <optional>
|
|
|
|
struct ZoneLoaderInspectionResult
|
|
{
|
|
// The game this zone is created for.
|
|
GameId m_game_id;
|
|
// Whether the zone is meant for a little-endian or big-endian loader.
|
|
GameEndianness m_endianness;
|
|
// Whether the zone is meant for a 32bit or 64bit loader.
|
|
GameWordSize m_word_size;
|
|
// The platform this zone is for.
|
|
GamePlatform m_platform;
|
|
// Whether this zone is confirmed official. False if not official or unknown.
|
|
bool m_is_official;
|
|
// Whether this zone contains a signature confirming the identity of the creator.
|
|
bool m_is_signed;
|
|
// Whether this zone is encrypted.
|
|
bool m_is_encrypted;
|
|
};
|
|
|
|
class IZoneLoaderFactory
|
|
{
|
|
public:
|
|
IZoneLoaderFactory() = default;
|
|
virtual ~IZoneLoaderFactory() = default;
|
|
IZoneLoaderFactory(const IZoneLoaderFactory& other) = default;
|
|
IZoneLoaderFactory(IZoneLoaderFactory&& other) noexcept = default;
|
|
IZoneLoaderFactory& operator=(const IZoneLoaderFactory& other) = default;
|
|
IZoneLoaderFactory& operator=(IZoneLoaderFactory&& other) noexcept = default;
|
|
|
|
[[nodiscard]] virtual std::optional<ZoneLoaderInspectionResult> InspectZoneHeader(ZoneDataPeeking& filePeek) const = 0;
|
|
[[nodiscard]] virtual std::unique_ptr<ZoneLoader> CreateLoaderForHeader(ZoneDataPeeking& filePeek,
|
|
const std::string& fileName,
|
|
std::optional<std::unique_ptr<ProgressCallback>> progressCallback) const = 0;
|
|
|
|
static const IZoneLoaderFactory* GetZoneLoaderFactoryForGame(GameId game);
|
|
};
|