mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
Add loading of iw3 fastfiles
This commit is contained in:
@ -10,14 +10,11 @@ using namespace IW3;
|
||||
|
||||
const char* GameAssetPoolIW3::ASSET_TYPE_NAMES[]
|
||||
{
|
||||
"xmodelpieces",
|
||||
"physpreset",
|
||||
"xanim",
|
||||
"xmodelsurfs",
|
||||
"xmodel",
|
||||
"material",
|
||||
"pixelshader",
|
||||
"vertexshader",
|
||||
"vertexdecl",
|
||||
"techniqueset",
|
||||
"image",
|
||||
"sound",
|
||||
@ -86,7 +83,7 @@ GameAssetPoolIW3::GameAssetPoolIW3(Zone* zone, const int priority)
|
||||
: ZoneAssetPools(zone),
|
||||
m_priority(priority)
|
||||
{
|
||||
assert(std::extent<decltype(ASSET_TYPE_NAMES)>::value == ASSET_TYPE_COUNT);
|
||||
static_assert(std::extent<decltype(ASSET_TYPE_NAMES)>::value == ASSET_TYPE_COUNT);
|
||||
|
||||
m_phys_preset = nullptr;
|
||||
m_xanim_parts = nullptr;
|
||||
|
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "Zone/ZoneTypes.h"
|
||||
#include "Game/IW3/IW3.h"
|
||||
|
||||
namespace IW3
|
||||
{
|
||||
class ZoneConstants final
|
||||
{
|
||||
ZoneConstants() = default;
|
||||
|
||||
public:
|
||||
static constexpr const char* MAGIC_UNSIGNED = "IWffu100";
|
||||
static constexpr int ZONE_VERSION = 5;
|
||||
|
||||
static_assert(std::char_traits<char>::length(MAGIC_UNSIGNED) == sizeof(ZoneHeader::m_magic));
|
||||
|
||||
static constexpr size_t AUTHED_CHUNK_SIZE = 0x2000;
|
||||
static constexpr unsigned AUTHED_CHUNK_COUNT_PER_GROUP = 256;
|
||||
|
||||
static constexpr int OFFSET_BLOCK_BIT_COUNT = 4;
|
||||
static constexpr block_t INSERT_BLOCK = XFILE_BLOCK_VIRTUAL;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user