]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
Scrub
authordrumsetmonkey <abelleisle@roadrunner.com>
Mon, 4 Apr 2016 11:42:19 +0000 (07:42 -0400)
committerdrumsetmonkey <abelleisle@roadrunner.com>
Mon, 4 Apr 2016 11:42:19 +0000 (07:42 -0400)
assets/items/FOOD_CHICKEN_FRIED.png [new file with mode: 0644]
assets/style/classic/bg/bagels.jpg [new file with mode: 0644]
assets/style/classic/bg/bagels.png [new file with mode: 0644]
assets/style/classic/bg/bgb.png [new file with mode: 0644]
src/entities.cpp
src/world.cpp
storyXML/0000_SpawnHill.xml [new file with mode: 0644]
storyXML/0000_SpawnHill.xml.dat [new file with mode: 0644]

diff --git a/assets/items/FOOD_CHICKEN_FRIED.png b/assets/items/FOOD_CHICKEN_FRIED.png
new file mode 100644 (file)
index 0000000..d086400
Binary files /dev/null and b/assets/items/FOOD_CHICKEN_FRIED.png differ
diff --git a/assets/style/classic/bg/bagels.jpg b/assets/style/classic/bg/bagels.jpg
new file mode 100644 (file)
index 0000000..fb68d2e
Binary files /dev/null and b/assets/style/classic/bg/bagels.jpg differ
diff --git a/assets/style/classic/bg/bagels.png b/assets/style/classic/bg/bagels.png
new file mode 100644 (file)
index 0000000..2ee843b
Binary files /dev/null and b/assets/style/classic/bg/bagels.png differ
diff --git a/assets/style/classic/bg/bgb.png b/assets/style/classic/bg/bgb.png
new file mode 100644 (file)
index 0000000..278e9b0
Binary files /dev/null and b/assets/style/classic/bg/bgb.png differ
index f4e2dd7a085009bf0178e5eef3cbeb0a41be2835..a10649f21941b3ef14ab98ef614a272a377d56e5 100644 (file)
@@ -10,6 +10,8 @@ extern World *currentWorld;           // main.cpp
 extern unsigned int loops;             // main.cpp
 extern unsigned int tickCount; // main.cpp
 
+extern std::string xmlFolder;
+
 GLuint waterTex;
 
 std::vector<int (*)(NPC *)> AIpreload; // A dynamic array of AI functions that are being preloaded
@@ -697,7 +699,7 @@ void Player::save(void){
 void Player::sspawn(float x,float y){
        unsigned int i;
        uint count;
-       std::ifstream in ("storyXML/main.dat",std::ios::in | std::ios::binary);
+       std::ifstream in (std::string(xmlFolder + "main.dat"),std::ios::in | std::ios::binary);
        spawn(x,y);
 
        if(in.good()){
index 8a46e8d77ccdc30ecee1dcaf9dad64f079399e5c..bcd4f7a297d60e6793b695f5c8f3140a24b502cc 100644 (file)
@@ -1505,7 +1505,7 @@ loadWorldFromXMLNoSave( std::string path ) {
         return NULL;
 
     std::cout << "File path: " << path << std::endl;
-       currentXML = std::string("storyXML/" + path);
+       currentXML = std::string(xmlFolder + path);
     std::cout << "Full file path: " << currentXML << std::endl;
 
        xml.LoadFile(currentXML.c_str());
diff --git a/storyXML/0000_SpawnHill.xml b/storyXML/0000_SpawnHill.xml
new file mode 100644 (file)
index 0000000..0a41197
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<World>
+
+       <style background="0" bgm="assets/music/embark.wav" folder="assets/style/classic/" />
+       <generation type="Random" width="500" />
+       <time>12000</time>
+
+       <hill peakx="0" peaky="1000" width="50" />
+
+</World>
diff --git a/storyXML/0000_SpawnHill.xml.dat b/storyXML/0000_SpawnHill.xml.dat
new file mode 100644 (file)
index 0000000..45a3a9f
--- /dev/null
@@ -0,0 +1 @@
+dOnE
\ No newline at end of file