iw4x-client/iw4/Components/Menus.hpp

41 lines
1.1 KiB
C++
Raw Normal View History

2015-12-23 21:26:46 -05:00
#define MAX_SOURCEFILES 64
2015-12-23 16:21:03 -05:00
namespace Components
{
class Menus : public Component
{
public:
Menus();
2015-12-23 21:26:46 -05:00
~Menus();
2015-12-23 16:21:03 -05:00
const char* GetName() { return "Menus"; };
2015-12-23 21:26:46 -05:00
private:
static std::vector<Game::menuDef_t*> MenuList;
static std::vector<Game::MenuList*> MenuListList;
static Game::XAssetHeader MenuFileLoad(Game::XAssetType type, const char* filename);
static Game::MenuList* LoadMenuList(Game::MenuList* menuList);
static std::vector<Game::menuDef_t*> LoadMenu(Game::menuDef_t* menudef);
static Game::script_t* LoadMenuScript(const char* name, std::string buffer);
static int LoadMenuSource(const char* name, std::string buffer);
2015-12-23 21:26:46 -05:00
static int ReserveSourceHandle();
static bool IsValidSourceHandle(int handle);
static int ReadToken(int handle, Game::pc_token_t *pc_token);
static Game::menuDef_t* ParseMenu(int handle);
2015-12-23 21:26:46 -05:00
static void FreeMenuSource(int handle);
static void FreeMenuList(Game::MenuList* menuList);
static void FreeMenu(Game::menuDef_t* menudef);
static void FreeEverything();
// Ugly!
static int KeywordHash(char* key);
2015-12-23 16:21:03 -05:00
};
}