aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/settings.xml4
-rw-r--r--include/common.h4
-rw-r--r--main.cpp14
3 files changed, 13 insertions, 9 deletions
diff --git a/config/settings.xml b/config/settings.xml
deleted file mode 100644
index d981664..0000000
--- a/config/settings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-
-<screen width="1280" height="720" />
-<hline value="3" /> \ No newline at end of file
diff --git a/include/common.h b/include/common.h
index 0df6533..8e08d1d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -99,6 +99,7 @@ extern unsigned int SCREEN_WIDTH;
extern unsigned int SCREEN_HEIGHT;
//#define FULLSCREEN
+extern bool FULLSCREEN;
/**
* Define the length of a single HLINE.
@@ -110,7 +111,8 @@ extern unsigned int SCREEN_HEIGHT;
*
*/
-#define HLINE 3
+//#define HLINE 3
+extern unsigned int HLINE;
/**
* A 'wrapper' for libc's srand(), as we hope to eventually have our own random number
diff --git a/main.cpp b/main.cpp
index cfcf7ec..dcfc722 100644
--- a/main.cpp
+++ b/main.cpp
@@ -174,8 +174,10 @@ extern bool fadeWhite;
extern bool fadeFast;
extern int fadeIntensity;
-unsigned int SCREEN_WIDTH;
-unsigned int SCREEN_HEIGHT;
+unsigned int HLINE = 3;
+unsigned int SCREEN_WIDTH = 720;
+unsigned int SCREEN_HEIGHT = 1080;
+bool FULLSCREEN = false;
/*******************************************************************************
* MAIN ************************************************************************
@@ -186,9 +188,13 @@ int main(/*int argc, char *argv[]*/){
gameRunning=false;
XMLDocument xml;
+ XMLElement *scr;
xml.LoadFile("config/settings.xml");
- SCREEN_WIDTH = xml.FirstChildElement("screen")->UnsignedAttribute("width");
- SCREEN_HEIGHT = xml.FirstChildElement("screen")->UnsignedAttribute("height");
+ scr = xml.FirstChildElement("screen");
+ SCREEN_WIDTH = scr->UnsignedAttribute("width");
+ SCREEN_HEIGHT = scr->UnsignedAttribute("height");
+ FULLSCREEN = scr->BoolAttribute("fullscreen");
+ HLINE = xml.FirstChildElement("hline")->UnsignedAttribute("size");
/*!
* (Attempt to) Initialize SDL libraries so that we can use SDL facilities and eventually