mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
Add LeaderboardDef asset loading for IW4
This commit is contained in:
parent
b4756c3688
commit
3bf47f058d
@ -33,7 +33,7 @@ ZoneCode.Assets = {
|
||||
"FxImpactTable",
|
||||
"RawFile",
|
||||
"StringTable",
|
||||
-- "LeaderboardDef",
|
||||
"LeaderboardDef",
|
||||
-- "StructuredDataDefSet",
|
||||
-- "TracerDef",
|
||||
-- "VehicleDef",
|
||||
|
@ -33,7 +33,7 @@ asset FxEffectDef ASSET_TYPE_FX;
|
||||
asset FxImpactTable ASSET_TYPE_IMPACT_FX;
|
||||
asset RawFile ASSET_TYPE_RAWFILE;
|
||||
asset StringTable ASSET_TYPE_STRINGTABLE;
|
||||
// asset LeaderboardDef ASSET_TYPE_LEADERBOARD;
|
||||
asset LeaderboardDef ASSET_TYPE_LEADERBOARD;
|
||||
// asset StructuredDataDefSet ASSET_TYPE_STRUCTURED_DATA_DEF;
|
||||
// asset TracerDef ASSET_TYPE_TRACER;
|
||||
// asset VehicleDef ASSET_TYPE_VEHICLE;
|
||||
@ -652,4 +652,17 @@ set count values columnCount * rowCount;
|
||||
// StringTableCell
|
||||
set string StringTableCell::string;
|
||||
|
||||
// =========================================
|
||||
// LeaderboardDef
|
||||
// =========================================
|
||||
use LeaderboardDef;
|
||||
set string name;
|
||||
set name name;
|
||||
set count columns columnCount;
|
||||
|
||||
// LbColumnDef
|
||||
use LbColumnDef;
|
||||
set string name;
|
||||
set string statName;
|
||||
|
||||
// EOF
|
@ -134,7 +134,7 @@ GameAssetPoolIW4::GameAssetPoolIW4(const int priority)
|
||||
m_fx_impact_table = nullptr;
|
||||
m_raw_file = nullptr;
|
||||
m_string_table = nullptr;
|
||||
// m_leaderboard = nullptr;
|
||||
m_leaderboard = nullptr;
|
||||
// m_structed_data_def_set = nullptr;
|
||||
// m_tracer = nullptr;
|
||||
// m_vehicle = nullptr;
|
||||
@ -187,7 +187,7 @@ void GameAssetPoolIW4::InitPoolStatic(const asset_type_t type, const size_t capa
|
||||
CASE_INIT_POOL_STATIC(ASSET_TYPE_IMPACT_FX, m_fx_impact_table, FxImpactTable);
|
||||
CASE_INIT_POOL_STATIC(ASSET_TYPE_RAWFILE, m_raw_file, RawFile);
|
||||
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_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_VEHICLE, m_vehicle, VehicleDef);
|
||||
@ -247,7 +247,7 @@ void GameAssetPoolIW4::InitPoolDynamic(const asset_type_t type)
|
||||
CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_IMPACT_FX, m_fx_impact_table, FxImpactTable);
|
||||
CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_RAWFILE, m_raw_file, RawFile);
|
||||
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_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_VEHICLE, m_vehicle, VehicleDef);
|
||||
@ -316,7 +316,7 @@ XAssetInfoGeneric* GameAssetPoolIW4::AddAsset(asset_type_t type, std::string nam
|
||||
CASE_ADD_TO_POOL(ASSET_TYPE_IMPACT_FX, m_fx_impact_table, impactFx);
|
||||
CASE_ADD_TO_POOL(ASSET_TYPE_RAWFILE, m_raw_file, rawfile);
|
||||
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_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_VEHICLE, m_vehicle, vehDef);
|
||||
@ -376,7 +376,7 @@ XAssetInfoGeneric* GameAssetPoolIW4::GetAsset(const asset_type_t type, std::stri
|
||||
CASE_GET_ASSET(ASSET_TYPE_IMPACT_FX, m_fx_impact_table);
|
||||
CASE_GET_ASSET(ASSET_TYPE_RAWFILE, m_raw_file);
|
||||
CASE_GET_ASSET(ASSET_TYPE_STRINGTABLE, m_string_table);
|
||||
// CASE_GET_ASSET(ASSET_TYPE_LEADERBOARD, m_leaderboard);
|
||||
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_VEHICLE, m_vehicle);
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
std::unique_ptr<AssetPool<IW4::FxImpactTable>> m_fx_impact_table;
|
||||
std::unique_ptr<AssetPool<IW4::RawFile>> m_raw_file;
|
||||
std::unique_ptr<AssetPool<IW4::StringTable>> m_string_table;
|
||||
// std::unique_ptr<AssetPool<IW4::LeaderboardDef>> m_leaderboard;
|
||||
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::VehicleDef>> m_vehicle;
|
||||
|
@ -105,8 +105,7 @@ namespace IW4
|
||||
struct FxImpactTable;
|
||||
struct RawFile;
|
||||
struct StringTable;
|
||||
|
||||
// struct LeaderboardDef;
|
||||
struct LeaderboardDef;
|
||||
// struct StructuredDataDefSet;
|
||||
// struct TracerDef;
|
||||
// struct VehicleDef;
|
||||
@ -146,7 +145,7 @@ namespace IW4
|
||||
FxImpactTable* impactFx;
|
||||
RawFile* rawfile;
|
||||
StringTable* stringTable;
|
||||
// LeaderboardDef* leaderboardDef;
|
||||
LeaderboardDef* leaderboardDef;
|
||||
// StructuredDataDefSet* structuredDataDefSet;
|
||||
// TracerDef* tracerDef;
|
||||
// VehicleDef* vehDef;
|
||||
@ -1639,6 +1638,48 @@ namespace IW4
|
||||
FxImpactEntry* table;
|
||||
};
|
||||
|
||||
enum LbColType
|
||||
{
|
||||
LBCOL_TYPE_NUMBER = 0x0,
|
||||
LBCOL_TYPE_TIME = 0x1,
|
||||
LBCOL_TYPE_LEVELXP = 0x2,
|
||||
LBCOL_TYPE_PRESTIGE = 0x3,
|
||||
LBCOL_TYPE_BIGNUMBER = 0x4,
|
||||
LBCOL_TYPE_PERCENT = 0x5,
|
||||
LBCOL_TYPE_COUNT = 0x6,
|
||||
};
|
||||
|
||||
enum LbAggType
|
||||
{
|
||||
LBAGG_TYPE_MIN = 0x0,
|
||||
LBAGG_TYPE_MAX = 0x1,
|
||||
LBAGG_TYPE_SUM = 0x2,
|
||||
LBAGG_TYPE_LAST = 0x3,
|
||||
LBAGG_TYPE_COUNT = 0x4,
|
||||
};
|
||||
|
||||
struct LbColumnDef
|
||||
{
|
||||
const char* name;
|
||||
int id;
|
||||
int propertyId;
|
||||
bool hidden;
|
||||
const char* statName;
|
||||
LbColType type;
|
||||
int precision;
|
||||
LbAggType agg;
|
||||
};
|
||||
|
||||
struct LeaderboardDef
|
||||
{
|
||||
const char* name;
|
||||
int id;
|
||||
int columnCount;
|
||||
int xpColId;
|
||||
int prestigeColId;
|
||||
LbColumnDef* columns;
|
||||
};
|
||||
|
||||
#ifndef __zonecodegenerator
|
||||
}
|
||||
#endif
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "Game/IW4/XAssets/gfximage/gfximage_load_db.h"
|
||||
#include "Game/IW4/XAssets/gfxlightdef/gfxlightdef_load_db.h"
|
||||
//#include "Game/IW4/XAssets/gfxworld/gfxworld_load_db.h"
|
||||
//#include "Game/IW4/XAssets/leaderboarddef/leaderboarddef_load_db.h"
|
||||
#include "Game/IW4/XAssets/leaderboarddef/leaderboarddef_load_db.h"
|
||||
#include "Game/IW4/XAssets/loadedsound/loadedsound_load_db.h"
|
||||
#include "Game/IW4/XAssets/localizeentry/localizeentry_load_db.h"
|
||||
//#include "Game/IW4/XAssets/mapents/mapents_load_db.h"
|
||||
@ -135,7 +135,7 @@ void ContentLoaderIW4::LoadXAsset(const bool atStreamStart)
|
||||
LOAD_ASSET(ASSET_TYPE_IMPACT_FX, FxImpactTable, impactFx);
|
||||
LOAD_ASSET(ASSET_TYPE_RAWFILE, RawFile, rawfile);
|
||||
LOAD_ASSET(ASSET_TYPE_STRINGTABLE, StringTable, stringTable);
|
||||
// LOAD_ASSET(ASSET_TYPE_LEADERBOARD, LeaderboardDef, leaderboardDef);
|
||||
LOAD_ASSET(ASSET_TYPE_LEADERBOARD, LeaderboardDef, leaderboardDef);
|
||||
// LOAD_ASSET(ASSET_TYPE_STRUCTURED_DATA_DEF, StructuredDataDefSet, structuredDataDefSet);
|
||||
// LOAD_ASSET(ASSET_TYPE_TRACER, TracerDef, tracerDef);
|
||||
// LOAD_ASSET(ASSET_TYPE_VEHICLE, VehicleDef, vehDef);
|
||||
|
Loading…
x
Reference in New Issue
Block a user