[go: up one dir, main page]

Menu

[948d63]: / game.h  Maximize  Restore  History

Download this file

51 lines (38 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef GAME_H
#define GAME_H
#include "player.h"
#include "troop.h"
#include "vehicle.h"
#include "building.h"
//contains integral parts of the game
namespace game {
//settings
extern int speed;
extern int difficulty;
extern int mode;
extern int map_width;
extern int map_height;
//samples of each unit. These make up the build menu.
extern std::vector<troop> troop_samples;
extern std::vector<vehicle> vehicle_samples;
extern std::vector<building> building_samples;
//global variables
extern std::vector<player> players;
extern std::vector <std::vector <unit* > >all_units;//two-dimensional vector to store
/*Loads samples of each troop.
*By creating a sample of each troop, the stats always match what is to be constructed*/
void load_troop_samples();
//This empties the vector, thus saving memory
void clear_troop_samples();
/*Loads samples of each vehicle.
*By creating a sample of each vehicle, the stats always match what is to be constructed*/
void load_vehicle_samples();
//This empties the vector, thus saving memory
void clear_vehicle_samples();
/*Loads samples of each building.
*By creating a sample of each building, the stats always match what is to be constructed*/
void load_building_samples();
//This empties the vector, thus saving memory
void clear_building_samples();
};
#endif // GAME_H