]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/campaign_common.qh
Merge branch 'master' into terencehill/string_prefixes_cleanup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / campaign_common.qh
1 #ifndef CAMPAIGN_COMMON_H
2 #define CAMPAIGN_COMMON_H
3
4 #ifndef CAMPAIGN_MAX_ENTRIES
5 #define CAMPAIGN_MAX_ENTRIES 64
6 #endif
7
8 // each i-th array element corresponds to the list entry campaign_offset+i
9 int campaign_entries;
10 int campaign_offset;
11 string campaign_gametype[CAMPAIGN_MAX_ENTRIES];
12 string campaign_mapname[CAMPAIGN_MAX_ENTRIES];
13 float campaign_bots[CAMPAIGN_MAX_ENTRIES];
14 float campaign_botskill[CAMPAIGN_MAX_ENTRIES];
15 float campaign_fraglimit[CAMPAIGN_MAX_ENTRIES];
16 float campaign_timelimit[CAMPAIGN_MAX_ENTRIES];
17 string campaign_mutators[CAMPAIGN_MAX_ENTRIES];
18 string campaign_shortdesc[CAMPAIGN_MAX_ENTRIES];
19 string campaign_longdesc[CAMPAIGN_MAX_ENTRIES];
20 string campaign_title; // filled upon loading
21
22 // load the campaign file, but use the given offset and limit the number of
23 // entries being read. Returns the number of entries successfully read (this
24 // number is also stored in campaign_entries).
25 // NOTE: there MUST be a corresponding CampaignFile_Unload() to unzone the
26 // strings.
27 string campaign_name; // set that to the campaign you want to load before calling CampaignFile_Load
28 float CampaignFile_Load(float offset, float entries);
29 void CampaignFile_Unload();
30
31 // Sets up the campaign for the n-th array item (meaning: campaign_offset+nth
32 // level) using localcmd()
33 void CampaignSetup(float n);
34 #endif