Nuclide
Software Development Kit for id Technology (BETA)
Loading...
Searching...
No Matches
Map Library

Locally installed maps/levels control functions. More...

Detailed Description

Locally installed maps/levels control functions.

Menus need to be aware of what levels aka maps are available for modes like multiplayer. The MapLibrary is by configured to only parse levels from the current game directory (much like GoldSrc) and optionally can blacklist maps based on a variety of criteria which may be configurable at some point in time.

The menu needs to call MapLibrary_Init() at least once, after which you can query the total amount of maps that are available via MapLibrary_GetMapCount().

You can then iterate over the individual entries with MapLibrary_GetInfo().

Classes

struct  mapLibrary_t
 Data holding Map Library entries. More...
 
struct  modeLibrary_t
 Data holding Mode Library entries. More...
 

Functions

void MapLibrary_Init (void)
 Initialize the map library, MapLibrary_GetMapCount() will return the amount of maps available.
 
void ModeLibrary_Init (void)
 Initialize the map library, MapLibrary_GetMapCount() will return the amount of maps available.
 
int MapLibrary_GetMapCount (void)
 Returns the total amount of maps available.
 
int ModeLibrary_GetModeCount (void)
 
__variant MapLibrary_GetInfo (int, mapType_t)
 Retrieve information about a given mapID.
 
__variant ModeLibrary_GetInfo (int, mapType_t)
 

Enumerations

enum  mapType_t {
  MAPINFO_NAME , MAPINFO_TITLE , MAPINFO_AUTHOR , MAPINFO_TYPE ,
  MAPINFO_PREVIEW
}
 Options querying Map Library entries using MapLibrary_GetInfo(). More...
 
enum  modeType_t { MODEINFO_NAME , MODEINFO_TITLE }
 Options querying Mode Library entries using ModeLibrary_GetInfo(). More...
 

Function Documentation

◆ MapLibrary_GetInfo()

__variant MapLibrary_GetInfo ( int mapID,
mapType_t infoType )

Retrieve information about a given mapID.

See mapType_t for which fields you can query.

◆ MapLibrary_GetMapCount()

int MapLibrary_GetMapCount ( void )

Returns the total amount of maps available.

◆ MapLibrary_Init()

void MapLibrary_Init ( void )

Initialize the map library, MapLibrary_GetMapCount() will return the amount of maps available.

◆ ModeLibrary_GetInfo()

__variant ModeLibrary_GetInfo ( int ,
mapType_t  )

◆ ModeLibrary_GetModeCount()

int ModeLibrary_GetModeCount ( void )

◆ ModeLibrary_Init()

void ModeLibrary_Init ( void )

Initialize the map library, MapLibrary_GetMapCount() will return the amount of maps available.

Enumeration Type Documentation

◆ mapType_t

enum mapType_t

Options querying Map Library entries using MapLibrary_GetInfo().

Enumerator
MAPINFO_NAME 

(string) Name of the map.

E.g. e1m1

MAPINFO_TITLE 

(string) Title of the map.

E.g. "Abyss of Cake"

MAPINFO_AUTHOR 

(string) Author of the map.

E.g. "John Doe"

MAPINFO_TYPE 

(string) Type of map.

MAPINFO_PREVIEW 

(string) URL to a preview of the map.

NULL if not available. Will look for level previews inside levelshots/ and maps/ with any file extensions supported by the engine and whitelisted within the cvar 'r_imageextensions'.

◆ modeType_t

enum modeType_t

Options querying Mode Library entries using ModeLibrary_GetInfo().

Enumerator
MODEINFO_NAME 

(string) Name of the mode.

E.g. deathmatch

MODEINFO_TITLE 

(string) Title of the map.

E.g. "Deathmatch"