aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-01-20 08:42:46 -0500
committerClyne Sullivan <tullivan99@gmail.com>2016-01-20 08:42:46 -0500
commit1e6676c35ce4990981e8cda389ba39108437d66d (patch)
treec1605794e8fa3d2e3dc9e29a91b0acaded59c8be /include
parent1eced16d75322832617a1b42ec94580a9713e8f0 (diff)
WIP save/load
Diffstat (limited to 'include')
-rw-r--r--include/Texture.h2
-rw-r--r--include/common.h2
-rw-r--r--include/entities.h15
-rw-r--r--include/inventory.h3
-rw-r--r--include/ui.h2
-rw-r--r--include/world.h3
6 files changed, 17 insertions, 10 deletions
diff --git a/include/Texture.h b/include/Texture.h
index 85225d8..03593bf 100644
--- a/include/Texture.h
+++ b/include/Texture.h
@@ -28,6 +28,8 @@ namespace Texture{
*/
GLuint loadTexture(const char *fileName);
+
+ void freeTextures(void);
}
/**
diff --git a/include/common.h b/include/common.h
index ae832f1..fa7356a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -205,6 +205,8 @@ unsigned int millis(void);
int getdir(const char *dir, std::vector<std::string> &files);
void strVectorSortAlpha(std::vector<std::string> *v);
+const char *readFile(const char *path);
+
int strCreateFunc(const char *equ);
extern void *NULLPTR;
diff --git a/include/entities.h b/include/entities.h
index d434546..6328770 100644
--- a/include/entities.h
+++ b/include/entities.h
@@ -63,15 +63,13 @@ public:
bool gravity;
bool behind;
Particles(float x, float y, float w, float h, float vx, float vy, Color c, float d){
- loc.x = (x);
- loc.y = (y);
- width = (w);
- height = (h);
+ loc.x = x;
+ loc.y = y;
+ width = w;
+ height = h;
velx = vx;
vely = vy;
- color.red = (c.red);
- color.green = (c.green);
- color.blue = (c.blue);
+ color = c;
duration = d;
fountain = false;
gravity = true;
@@ -166,7 +164,7 @@ public:
class NPC : public Entity{
public:
std::vector<int (*)(NPC *)>aiFunc;
- unsigned int dialogIndex;
+ int dialogIndex;
NPC();
~NPC();
@@ -180,7 +178,6 @@ class Structures : public Entity{
public:
BUILD_SUB bsubtype;
char *inside;
- //char *outside;
Structures();
~Structures();
diff --git a/include/inventory.h b/include/inventory.h
index b035f91..a08954a 100644
--- a/include/inventory.h
+++ b/include/inventory.h
@@ -106,8 +106,9 @@ public:
}
};
-void itemUse(void *p);
void initInventorySprites(void);
+void destroyInventory(void);
+
char *getItemTexturePath(ITEM_ID id);
int getItemWidth(ITEM_ID);
int getItemHeight(ITEM_ID);
diff --git a/include/ui.h b/include/ui.h
index b769bbf..c018008 100644
--- a/include/ui.h
+++ b/include/ui.h
@@ -41,6 +41,8 @@ namespace ui {
void initFonts(void);
+ void destroyFonts(void);
+
/*
* Sets the current font/font size.
*/
diff --git a/include/world.h b/include/world.h
index a1cc870..3209284 100644
--- a/include/world.h
+++ b/include/world.h
@@ -272,6 +272,9 @@ public:
*/
int getTheWidth(void);
+
+ void save(void);
+ void load(void);
};
/*