Add localize entry to iw4 and skip snddriverglobals since the asset is not loaded but is still in the asset list of fastfiles

This commit is contained in:
Jan
2020-09-08 13:10:54 +02:00
parent e7898a1f3c
commit c1d2ac6604
6 changed files with 33 additions and 16 deletions

View File

@ -127,7 +127,7 @@ GameAssetPoolIW4::GameAssetPoolIW4(const int priority)
// m_font = nullptr;
// m_menu_list = nullptr;
// m_menu_def = nullptr;
// m_localize = nullptr;
m_localize = nullptr;
// m_weapon = nullptr;
// m_snd_driver_globals = nullptr;
// m_fx = nullptr;
@ -180,7 +180,7 @@ void GameAssetPoolIW4::InitPoolStatic(const asset_type_t type, const size_t capa
// CASE_INIT_POOL_STATIC(ASSET_TYPE_FONT, m_font, Font_s);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_MENULIST, m_menu_list, MenuList);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_MENU, m_menu_def, menuDef_t);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_LOCALIZE_ENTRY, m_localize, LocalizeEntry);
CASE_INIT_POOL_STATIC(ASSET_TYPE_LOCALIZE_ENTRY, m_localize, LocalizeEntry);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_WEAPON, m_weapon, WeaponCompleteDef);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_SNDDRIVER_GLOBALS, m_snd_driver_globals, SndDriverGlobals);
// CASE_INIT_POOL_STATIC(ASSET_TYPE_FX, m_fx, FxEffectDef);
@ -240,7 +240,7 @@ void GameAssetPoolIW4::InitPoolDynamic(const asset_type_t type)
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_FONT, m_font, Font_s);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_MENULIST, m_menu_list, MenuList);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_MENU, m_menu_def, menuDef_t);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_LOCALIZE_ENTRY, m_localize, LocalizeEntry);
CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_LOCALIZE_ENTRY, m_localize, LocalizeEntry);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_WEAPON, m_weapon, WeaponCompleteDef);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_SNDDRIVER_GLOBALS, m_snd_driver_globals, SndDriverGlobals);
// CASE_INIT_POOL_DYNAMIC(ASSET_TYPE_FX, m_fx, FxEffectDef);
@ -309,7 +309,7 @@ XAssetInfoGeneric* GameAssetPoolIW4::AddAsset(asset_type_t type, std::string nam
// CASE_ADD_TO_POOL(ASSET_TYPE_FONT, m_font, font);
// CASE_ADD_TO_POOL(ASSET_TYPE_MENULIST, m_menu_list, menuList);
// CASE_ADD_TO_POOL(ASSET_TYPE_MENU, m_menu_def, menu);
// CASE_ADD_TO_POOL(ASSET_TYPE_LOCALIZE_ENTRY, m_localize, localize);
CASE_ADD_TO_POOL(ASSET_TYPE_LOCALIZE_ENTRY, m_localize, localize);
// CASE_ADD_TO_POOL(ASSET_TYPE_WEAPON, m_weapon, weapon);
// CASE_ADD_TO_POOL(ASSET_TYPE_SNDDRIVER_GLOBALS, m_snd_driver_globals, sndDriverGlobals);
// CASE_ADD_TO_POOL(ASSET_TYPE_FX, m_fx, fx);
@ -369,7 +369,7 @@ XAssetInfoGeneric* GameAssetPoolIW4::GetAsset(const asset_type_t type, std::stri
// CASE_GET_ASSET(ASSET_TYPE_FONT, m_font);
// CASE_GET_ASSET(ASSET_TYPE_MENULIST, m_menu_list);
// CASE_GET_ASSET(ASSET_TYPE_MENU, m_menu_def);
// CASE_GET_ASSET(ASSET_TYPE_LOCALIZE_ENTRY, m_localize);
CASE_GET_ASSET(ASSET_TYPE_LOCALIZE_ENTRY, m_localize);
// CASE_GET_ASSET(ASSET_TYPE_WEAPON, m_weapon);
// CASE_GET_ASSET(ASSET_TYPE_SNDDRIVER_GLOBALS, m_snd_driver_globals);
// CASE_GET_ASSET(ASSET_TYPE_FX, m_fx);

View File

@ -39,7 +39,7 @@ public:
// std::unique_ptr<AssetPool<IW4::Font_s>> m_font;
// std::unique_ptr<AssetPool<IW4::MenuList>> m_menu_list;
// std::unique_ptr<AssetPool<IW4::menuDef_t>> m_menu_def;
// std::unique_ptr<AssetPool<IW4::LocalizeEntry>> m_localize;
std::unique_ptr<AssetPool<IW4::LocalizeEntry>> m_localize;
// std::unique_ptr<AssetPool<IW4::WeaponCompleteDef>> m_weapon;
// std::unique_ptr<AssetPool<IW4::SndDriverGlobals>> m_snd_driver_globals;
// std::unique_ptr<AssetPool<IW4::FxEffectDef>> m_fx;

View File

@ -98,7 +98,7 @@ namespace IW4
// struct Font_s;
// struct MenuList;
// struct menuDef_t;
// struct LocalizeEntry;
struct LocalizeEntry;
// struct WeaponCompleteDef;
// struct SndDriverGlobals;
// struct FxEffectDef;
@ -138,7 +138,7 @@ namespace IW4
// Font_s* font;
// MenuList* menuList;
// menuDef_t* menu;
// LocalizeEntry* localize;
LocalizeEntry* localize;
// WeaponCompleteDef* weapon;
// SndDriverGlobals* sndDriverGlobals;
// FxEffectDef* fx;
@ -971,6 +971,12 @@ namespace IW4
float knots[16][2];
};
struct LocalizeEntry
{
const char* value;
const char* name;
};
#ifndef __zonecodegenerator
}
#endif