add iw4 tracerdef loading code

This commit is contained in:
Jan
2020-09-09 12:08:09 +02:00
parent 3bf47f058d
commit 0efff7d637
6 changed files with 32 additions and 12 deletions

View File

@ -136,7 +136,7 @@ GameAssetPoolIW4::GameAssetPoolIW4(const int priority)
m_string_table = nullptr;
m_leaderboard = nullptr;
// m_structed_data_def_set = nullptr;
// m_tracer = nullptr;
m_tracer = nullptr;
// m_vehicle = nullptr;
// m_addon_map_ents = nullptr;
}
@ -189,7 +189,7 @@ void GameAssetPoolIW4::InitPoolStatic(const asset_type_t type, const size_t capa
CASE_INIT_POOL_STATIC(ASSET_TYPE_STRINGTABLE, m_string_table, StringTable);
CASE_INIT_POOL_STATIC(ASSET_TYPE_LEADERBOARD, m_leaderboard, LeaderboardDef);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_STRUCTURED_DATA_DEF, m_structed_data_def_set, StructuredDataDefSet);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_TRACER, m_tracer, TracerDef);
CASE_INIT_POOL_STATIC(ASSET_TYPE_TRACER, m_tracer, TracerDef);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_VEHICLE, m_vehicle, VehicleDef);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_ADDON_MAP_ENTS, m_addon_map_ents, AddonMapEnts);
@ -249,7 +249,7 @@ void GameAssetPoolIW4::InitPoolDynamic(const asset_type_t type)
CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_STRINGTABLE, m_string_table, StringTable);
CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_LEADERBOARD, m_leaderboard, LeaderboardDef);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_STRUCTURED_DATA_DEF, m_structed_data_def_set, StructuredDataDefSet);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_TRACER, m_tracer, TracerDef);
CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_TRACER, m_tracer, TracerDef);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_VEHICLE, m_vehicle, VehicleDef);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_ADDON_MAP_ENTS, m_addon_map_ents, AddonMapEnts);
@ -318,7 +318,7 @@ XAssetInfoGeneric* GameAssetPoolIW4::AddAsset(asset_type_t type, std::string nam
CASE_ADD_TO_POOL(ASSET_TYPE_STRINGTABLE, m_string_table, stringTable);
CASE_ADD_TO_POOL(ASSET_TYPE_LEADERBOARD, m_leaderboard, leaderboardDef);
// CASE_ADD_TO_POOL(ASSET_TYPE_STRUCTURED_DATA_DEF, m_structed_data_def_set, structuredDataDefSet);
// CASE_ADD_TO_POOL(ASSET_TYPE_TRACER, m_tracer, tracerDef);
CASE_ADD_TO_POOL(ASSET_TYPE_TRACER, m_tracer, tracerDef);
// CASE_ADD_TO_POOL(ASSET_TYPE_VEHICLE, m_vehicle, vehDef);
// CASE_ADD_TO_POOL(ASSET_TYPE_ADDON_MAP_ENTS, m_addon_map_ents, addonMapEnts);
@ -378,7 +378,7 @@ XAssetInfoGeneric* GameAssetPoolIW4::GetAsset(const asset_type_t type, std::stri
CASE_GET_ASSET(ASSET_TYPE_STRINGTABLE, m_string_table);
CASE_GET_ASSET(ASSET_TYPE_LEADERBOARD, m_leaderboard);
// CASE_GET_ASSET(ASSET_TYPE_STRUCTURED_DATA_DEF, m_structed_data_def_set);
// CASE_GET_ASSET(ASSET_TYPE_TRACER, m_tracer);
CASE_GET_ASSET(ASSET_TYPE_TRACER, m_tracer);
// CASE_GET_ASSET(ASSET_TYPE_VEHICLE, m_vehicle);
// CASE_GET_ASSET(ASSET_TYPE_ADDON_MAP_ENTS, m_addon_map_ents);

View File

@ -48,7 +48,7 @@ public:
std::unique_ptr<AssetPool<IW4::StringTable>> m_string_table;
std::unique_ptr<AssetPool<IW4::LeaderboardDef>> m_leaderboard;
// std::unique_ptr<AssetPool<IW4::StructuredDataDefSet>> m_structed_data_def_set;
// std::unique_ptr<AssetPool<IW4::TracerDef>> m_tracer;
std::unique_ptr<AssetPool<IW4::TracerDef>> m_tracer;
// std::unique_ptr<AssetPool<IW4::VehicleDef>> m_vehicle;
// std::unique_ptr<AssetPool<IW4::AddonMapEnts>> m_addon_map_ents;

View File

@ -107,7 +107,7 @@ namespace IW4
struct StringTable;
struct LeaderboardDef;
// struct StructuredDataDefSet;
// struct TracerDef;
struct TracerDef;
// struct VehicleDef;
// struct AddonMapEnts;
@ -147,7 +147,7 @@ namespace IW4
StringTable* stringTable;
LeaderboardDef* leaderboardDef;
// StructuredDataDefSet* structuredDataDefSet;
// TracerDef* tracerDef;
TracerDef* tracerDef;
// VehicleDef* vehDef;
// AddonMapEnts* addonMapEnts;
void* data;
@ -1680,6 +1680,19 @@ namespace IW4
LbColumnDef* columns;
};
struct TracerDef
{
const char* name;
Material* material;
unsigned int drawInterval;
float speed;
float beamLength;
float beamWidth;
float screwRadius;
float screwDist;
float colors[5][4];
};
#ifndef __zonecodegenerator
}
#endif