From a0afc9a192016b2bb4c185895a4082cc965e1179 Mon Sep 17 00:00:00 2001
From: drumsetmonkey <abelleisle@roadrunner.com>
Date: Thu, 11 Feb 2016 08:25:57 -0500
Subject: Worlds can be themed

---
 include/Texture.h  |  2 ++
 include/common.h   |  3 +++
 include/entities.h |  4 +++-
 include/world.h    | 21 ++++++++++++++++++---
 4 files changed, 26 insertions(+), 4 deletions(-)

(limited to 'include')

diff --git a/include/Texture.h b/include/Texture.h
index 50681bf..c6376cb 100644
--- a/include/Texture.h
+++ b/include/Texture.h
@@ -33,6 +33,7 @@ namespace Texture{
 	
 	void initColorIndex();
 	vec2 getIndex(Color c);
+	dim2 imageDim(const char *fileName);
 }
 
 /**
@@ -71,6 +72,7 @@ public:
 	 */
 	
 	Texturec(uint amt,const char **paths);
+	Texturec(std::vector<std::string>vec);
 	
 	/**
 	 * Frees memory taken by the image array.
diff --git a/include/common.h b/include/common.h
index 0a8ba20..34260c9 100644
--- a/include/common.h
+++ b/include/common.h
@@ -234,6 +234,9 @@ const char *readFile(const char *path);
 
 int strCreateFunc(const char *equ);
 
+template<typename N, size_t s>
+size_t arrAmt(N (&)[s]){return s;}
+
 extern void *NULLPTR;
 
 #endif // COMMON_H
diff --git a/include/entities.h b/include/entities.h
index 9cc1b31..05ae64c 100644
--- a/include/entities.h
+++ b/include/entities.h
@@ -26,7 +26,7 @@ enum _TYPE {
 enum GENDER{
 	MALE,
 	FEMALE,
-	NONE 
+	TRANSBULLSHIT
 };
 
 enum MOB_SUB {
@@ -195,7 +195,9 @@ public:
 class Structures : public Entity{
 public:
 	BUILD_SUB bsubtype;
+	World *inWorld;
 	char *inside;
+	char *textureLoc;
 	
 	Structures();
 	~Structures();
diff --git a/include/world.h b/include/world.h
index 47e11f5..43da6fc 100644
--- a/include/world.h
+++ b/include/world.h
@@ -145,7 +145,7 @@ protected:
 	 */
 	
 	Texturec *bgTex;
-	
+
 	/**
 	 * Defines the set of background images that should be used for this world.
 	 */
@@ -163,6 +163,8 @@ protected:
 	 */
 	
 	char *bgm;
+	std::vector<std::string>bgFiles;
+	std::vector<std::string>bgFilesIndoors;
 	
 public:
 
@@ -234,7 +236,14 @@ public:
 	 * A vector of all light elements in this world.
 	 */
 	
-	std::vector<Light        >  light;
+	std::vector<Light      	 >  light;
+
+	/**
+	 * Vector of all building textures for the current world style
+	 */
+
+	std::vector<std::string  >  sTexLoc;
+
 	
 	/**
 	 * NULLifies pointers and allocates necessary memory. This should be
@@ -257,7 +266,7 @@ public:
 	 * the structure.
 	 */
 	
-	void addStructure(BUILD_SUB subtype,float x,float y,const char *inside);
+	void addStructure(BUILD_SUB subtype,float x,float y, char* tex, const char *inside);
 	//void addVillage(int buildingCount, int npcMin, int npcMax,const char *inside);
 	
 	/**
@@ -343,6 +352,12 @@ public:
 	 */
 	
 	void setBGM(const char *path);
+
+	/**
+	 *	Sets the worlds style folder
+	 */
+
+	void setStyle(const char* pre); 
 	
 	/**
 	 * Plays/stops this world's BGM. If `prev` is not NULL, that world's BGM
-- 
cgit v1.2.3