const int GAMETYPE_FLAG_PRIORITY = BIT(3); // priority selection when preferred gametype isn't available in random selections
const int GAMETYPE_FLAG_HIDELIMITS = BIT(4); // don't display a score limit needed for winning the match in the scoreboard
const int GAMETYPE_FLAG_WEAPONARENA = BIT(5); // gametype has a forced weapon arena, weapon arena mutators should disable themselves when this is set
const int GAMETYPE_FLAG_PRIORITY = BIT(3); // priority selection when preferred gametype isn't available in random selections
const int GAMETYPE_FLAG_HIDELIMITS = BIT(4); // don't display a score limit needed for winning the match in the scoreboard
const int GAMETYPE_FLAG_WEAPONARENA = BIT(5); // gametype has a forced weapon arena, weapon arena mutators should disable themselves when this is set
ATTRIB(Gametype, m_hidelimits, bool, false);
/** does this gametype enforce its own weapon arena? */
ATTRIB(Gametype, m_weaponarena, bool, false);
ATTRIB(Gametype, m_hidelimits, bool, false);
/** does this gametype enforce its own weapon arena? */
ATTRIB(Gametype, m_weaponarena, bool, false);
/** game type defaults */
ATTRIB(Gametype, model2, string);
/** game type description */
/** game type defaults */
ATTRIB(Gametype, model2, string);
/** game type description */
this.m_priority = ((gflags & GAMETYPE_FLAG_PREFERRED) ? 2 : ((gflags & GAMETYPE_FLAG_PRIORITY) ? 1 : 0));
this.m_hidelimits = (gflags & GAMETYPE_FLAG_HIDELIMITS);
this.m_weaponarena = (gflags & GAMETYPE_FLAG_WEAPONARENA);
this.m_priority = ((gflags & GAMETYPE_FLAG_PREFERRED) ? 2 : ((gflags & GAMETYPE_FLAG_PRIORITY) ? 1 : 0));
this.m_hidelimits = (gflags & GAMETYPE_FLAG_HIDELIMITS);
this.m_weaponarena = (gflags & GAMETYPE_FLAG_WEAPONARENA);
REGISTRY_CHECK(Gametypes)
REGISTRY_DEFINE_GET(Gametypes, NULL)
STATIC_INIT(Gametypes_renumber) { FOREACH(Gametypes, true, it.m_id = i); }
#define REGISTER_GAMETYPE(NAME, inst) REGISTER(Gametypes, MAPINFO_TYPE, NAME, m_id, inst)
REGISTRY_CHECK(Gametypes)
REGISTRY_DEFINE_GET(Gametypes, NULL)
STATIC_INIT(Gametypes_renumber) { FOREACH(Gametypes, true, it.m_id = i); }
#define REGISTER_GAMETYPE(NAME, inst) REGISTER(Gametypes, MAPINFO_TYPE, NAME, m_id, inst)
const int MAPINFO_FEATURE_WEAPONS = 1; // not defined for instagib-only maps
const int MAPINFO_FEATURE_VEHICLES = 2;
const int MAPINFO_FEATURE_WEAPONS = 1; // not defined for instagib-only maps
const int MAPINFO_FEATURE_VEHICLES = 2;
const int MAPINFO_FLAG_HIDDEN = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
const int MAPINFO_FLAG_FORBIDDEN = 2; // don't even allow the map by a cvar setting that allows hidden maps
const int MAPINFO_FLAG_FRUSTRATING = 4; // this map is near impossible to play, enable at your own risk
const int MAPINFO_FLAG_HIDDEN = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
const int MAPINFO_FLAG_FORBIDDEN = 2; // don't even allow the map by a cvar setting that allows hidden maps
const int MAPINFO_FLAG_FRUSTRATING = 4; // this map is near impossible to play, enable at your own risk
// load info about a map by name into the MapInfo_Map_* globals
int MapInfo_Get_ByName(string s, float allowGenerate, Gametype gametypeToSet); // 1 on success, 0 on failure, 2 if it autogenerated a mapinfo file
// load info about a map by name into the MapInfo_Map_* globals
int MapInfo_Get_ByName(string s, float allowGenerate, Gametype gametypeToSet); // 1 on success, 0 on failure, 2 if it autogenerated a mapinfo file
// look for a map by a prefix, returns the actual map name on success, string_null on failure or ambigous match
string MapInfo_FindName_match; // the name of the map that was found
float MapInfo_FindName_firstResult; // -1 if none were found, index of first one if not unique but found (FindName then returns -1)
// look for a map by a prefix, returns the actual map name on success, string_null on failure or ambigous match
string MapInfo_FindName_match; // the name of the map that was found
float MapInfo_FindName_firstResult; // -1 if none were found, index of first one if not unique but found (FindName then returns -1)
// gets a gametype from a string
string _MapInfo_GetDefaultEx(Gametype t);
float _MapInfo_GetTeamPlayBool(Gametype t);
// gets a gametype from a string
string _MapInfo_GetDefaultEx(Gametype t);
float _MapInfo_GetTeamPlayBool(Gametype t);
string MapInfo_Type_Description(Gametype t);
string MapInfo_Type_ToString(Gametype t);
string MapInfo_Type_ToText(Gametype t);
string MapInfo_Type_Description(Gametype t);
string MapInfo_Type_ToString(Gametype t);
string MapInfo_Type_ToText(Gametype t);
void MapInfo_Cache_Create(); // enable caching
void MapInfo_Cache_Invalidate(); // delete cache if any, but keep enabled
void MapInfo_Cache_Create(); // enable caching
void MapInfo_Cache_Invalidate(); // delete cache if any, but keep enabled
+bool _MapInfo_ParseArena(string arena_filename, int fh, string pFilename, Gametype pGametypeToSet, bool isdefi, bool isgenerator);
+
+string _MapInfo_FindArenaFile(string pFilename, string extension);
+
void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s, float recurse);
void MapInfo_ClearTemps(); // call this when done with mapinfo for this frame
void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s, float recurse);
void MapInfo_ClearTemps(); // call this when done with mapinfo for this frame