23 return "set a parameter";
47 if ((s.length() >= 3) &&
48 (((s[0] ==
'"') && (s[s.length() - 1] ==
'"'))
49 || ((s[0] ==
'\'') && (s[s.length() - 1] ==
'\'')))) {
51 s.erase(s.length() - 1, 1);
70 if (var.compare(
"size") == 0) {
71 unsigned int w = DEFAULT_WIDTH, h = DEFAULT_HEIGHT;
72 if (!(args >> w >> h)) {
77 }
else if (var.compare(
"fullscreen") == 0) {
78 bool fullscreen =
false;
79 if (!(args >> fullscreen)) {
84 }
else if (var.compare(
"audio") == 0) {
86 if (!(args >> audio)) {
91 }
else if (var.compare(
"volume") == 0) {
98 }
else if (var.compare(
"mouse_x") == 0) {
100 if (!(args >> sense)) {
105 }
else if (var.compare(
"mouse_y") == 0) {
107 if (!(args >> sense)) {
112 }
else if (var.compare(
"fps") == 0) {
114 if (!(args >> fps)) {
119 }
else if (var.compare(
"basedir") == 0) {
123 }
else if (var.compare(
"pakdir") == 0) {
127 }
else if (var.compare(
"audiodir") == 0) {
131 }
else if (var.compare(
"datadir") == 0) {
135 }
else if (var.compare(
"font") == 0) {
155 return "get a parameter";
180 if (var.compare(
"size") == 0) {
182 }
else if (var.compare(
"fullscreen") == 0) {
184 }
else if (var.compare(
"audio") == 0) {
186 }
else if (var.compare(
"volume") == 0) {
188 }
else if (var.compare(
"mouse_x") == 0) {
190 }
else if (var.compare(
"mouse_y") == 0) {
192 }
else if (var.compare(
"fps") == 0) {
194 }
else if (var.compare(
"basedir") == 0) {
196 }
else if (var.compare(
"pakdir") == 0) {
198 }
else if (var.compare(
"audiodir") == 0) {
200 }
else if (var.compare(
"datadir") == 0) {
202 }
else if (var.compare(
"font") == 0) {
static std::string getAudioDir()
static std::string expandNames(std::string s)
String handling utilities.
virtual int execute(std::istream &args)
static std::string getPakDir()
static bool getFullscreen()
static void setSensitivityX(float sens)
static float getSensitivityX()
virtual std::string brief()
static void setShowFPS(bool f)
static std::string getFontName()
static void setPakDir(std::string dir)
static std::string getBaseDir()
static LogLevel & get(int level)
static void setFullscreen(bool f)
static void setDataDir(std::string dir)
static int initialize(std::string font="")
static void setSensitivityY(float sens)
static float getSensitivityY()
static void setBaseDir(std::string dir)
static void error(char *msg)
static void setEnabled(bool on=true)
virtual std::string brief()
virtual std::string name()
std::string expandHomeDirectory(std::string s)
static void setAudioDir(std::string dir)
Runtime Configuration Storage.
virtual int execute(std::istream &args)
std::string findAndReplace(std::string s, std::string find, std::string replace)
static void setVolume(float vol=1.0f)
virtual std::string name()
static void setSize(glm::i32vec2 s)
static glm::i32vec2 getSize()
static std::string getDataDir()