]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
style background is useless
authorClyne Sullivan <tullivan99@gmail.com>
Sat, 22 Jul 2017 14:22:35 +0000 (10:22 -0400)
committerClyne Sullivan <tullivan99@gmail.com>
Sat, 22 Jul 2017 14:22:35 +0000 (10:22 -0400)
include/world.hpp
src/world.cpp
xml/!town.xml
xml/!town2.xml
xml/bobshouse.xml

index a7096a8660f398cd63f845908edc321b3d7266f9..570cc9d693970bd4cd6f10599df243470372812c 100644 (file)
@@ -20,14 +20,6 @@ using namespace tinyxml2;
 #include <thread.hpp>
 #include <vector2.hpp>
 
-/**
- * The background type enum.
- * Used to choose which set of background images should be used.
- */
-enum class WorldBGType : unsigned int {
-       Forest = 0      /**< A forest theme. */
-};
-
 /**
  * The line structure.
  * This structure is used to store the world's ground, stored in vertical
@@ -90,9 +82,7 @@ struct WorldData2 {
        std::string toLeft, toRight; /**< File names of the worlds adjacent to this one. */
 
        // Style variables
-       WorldBGType style;                /**< The style type of the world. */
        std::string styleFolder;          /**< The folder to get stylized textures from. */
-       std::vector<std::string> sTexLoc; /**< File names of stylized textures for structures. */
 
        // Music
        std::string bgm;             /**< The path to the BGM file. */
index ecd8ae4ad1bb36473a15a695b1e900f405bfb264..22ffdffa3b6c7e966aee8825fd2aa6c4139222c3 100644 (file)
@@ -262,12 +262,6 @@ void WorldSystem::loader(void)
                // style tag
                if (tagName == "style") {
                        world.styleFolder = wxml->StrAttribute("folder");
-
-                       unsigned int styleNo;
-                       if (wxml->QueryUnsignedAttribute("background", &styleNo) != XML_NO_ERROR)
-                               UserError("XML Error: No background given in <style> in " + xmlPath);
-
-                       world.style = static_cast<WorldBGType>(styleNo);
                        world.bgm = wxml->StrAttribute("bgm");
 
                        std::vector<std::string> bgFiles;
index 1b8054d8b6b433fe575178ad98737c66ade35d3e..9f5bd0a6e626263a2c31cb47d2609660c01d9ff6 100644 (file)
@@ -2,7 +2,7 @@
 <include file="entities.xml"/>
 
 <World>
-       <style background="0" bgm="assets/music/town.ogg" folder="assets/style/classic/">
+       <style bgm="assets/music/town.ogg" folder="assets/style/classic/">
                <layer path="bg/bg.png"/>
                <layer path="bg/bgFarMountain.png"/>
                <layer path="bg/forestTileFar.png"/>
index bea653837cdf70e90c803b5551156024feaf2662..8df73a4bca27436851c4d631df49442268bb842c 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <World>
-       <style background="0" bgm="assets/music/embark.wav" folder="assets/style/classic/">
+       <style bgm="assets/music/embark.wav" folder="assets/style/classic/">
                <layer path="bg/bg.png"/>
                <layer path="bg/bgFarMountain.png"/>
                <layer path="bg/forestTileFar.png"/>
index e6b87e58cf56ad273e481824ac2b5d094044edb6..0b287b6b1419339dc7f0f83a3da257f2618d7b4a 100644 (file)
@@ -2,7 +2,7 @@
 <include file="entities.xml"/>
 
 <IndoorWorld>
-       <style background="0" bgm="assets/music/theme_jazz.wav" folder="assets/style/classic/">
+       <style bgm="assets/music/theme_jazz.wav" folder="assets/style/classic/">
                <layer path="bg/bg.png"/>
                <layer path="bg/bgFarMountain.png"/>
                <layer path="bg/forestTileFar.png"/>