38 lines
676 B
C++
38 lines
676 B
C++
#ifndef GUARD_CONFIG_H
|
|
#define GUARD_CONFIG_H
|
|
|
|
#include<vector>
|
|
#include "utils.h"
|
|
#include "player_def.h"
|
|
|
|
using namespace std;
|
|
|
|
typedef string configKey;
|
|
|
|
class Config{
|
|
public:
|
|
aliensGrid grid;
|
|
|
|
unsigned alien_size;
|
|
unsigned distance;
|
|
|
|
unsigned missile_width;
|
|
unsigned missile_length; // auto defined from width
|
|
unsigned torpedo_width;
|
|
unsigned torpedo_length; // auto defined from width
|
|
unsigned player_width;
|
|
|
|
unsigned alien_speed;
|
|
unsigned player_speed;
|
|
|
|
PlayerDef p1Def;
|
|
PlayerDef p2Def;
|
|
unsigned startXPosition;
|
|
|
|
bool loadConfig();
|
|
string getString(configKey& key);
|
|
int getInt(configKey& key);
|
|
nsGraphics::RGBAcolor getColor(configKey& key);
|
|
};
|
|
|
|
#endif |