summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorTom Barrett <tombarrett@cornell.engr.siu.edu>2015-05-01 13:01:55 -0500
committerTom Barrett <tombarrett@cornell.engr.siu.edu>2015-05-01 13:01:55 -0500
commit87d20801300e90423c17ad425364f77152eb88c3 (patch)
treeaf0d1cf0022b160e87f3e5ae519d685bb2e693f9 /inc
parent29168e06ffcea8b8f55a9ed2e8acb3529e776456 (diff)
fixed directories and makefile
Diffstat (limited to 'inc')
-rw-r--r--inc/creature.h12
-rw-r--r--inc/entity.h20
-rw-r--r--inc/event.h21
-rw-r--r--inc/main.h10
-rw-r--r--inc/resource.h12
-rw-r--r--inc/window.h24
6 files changed, 99 insertions, 0 deletions
diff --git a/inc/creature.h b/inc/creature.h
new file mode 100644
index 0000000..5f5bb8d
--- /dev/null
+++ b/inc/creature.h
@@ -0,0 +1,12 @@
+#ifndef creature_h
+#define creature_h
+
+#include "entity.h"
+
+class Creature: public Entity
+{
+ public:
+ Creature(Window m, std::string s);
+};
+
+#endif
diff --git a/inc/entity.h b/inc/entity.h
new file mode 100644
index 0000000..1d16a2c
--- /dev/null
+++ b/inc/entity.h
@@ -0,0 +1,20 @@
+#ifndef entity_h
+#define entity_h
+
+#include "window.h"
+
+class Entity
+{
+ public:
+ void Place();
+ SDL_Texture* loadTexture(std::string path, Window main);
+
+ protected:
+ int x, y;
+ int height, width;
+ int degrees = 0;
+ SDL_Texture* texture;
+ SDL_Renderer* renderer;
+};
+
+#endif
diff --git a/inc/event.h b/inc/event.h
new file mode 100644
index 0000000..9ba7eea
--- /dev/null
+++ b/inc/event.h
@@ -0,0 +1,21 @@
+#ifndef event_h
+#define event_h
+
+#include "window.h"
+
+class Event
+{
+ public:
+ Event();
+ int Poll();
+ void off();
+ bool gRun();
+ SDL_Event& gEvent();
+ int gEventType();
+
+ private:
+ bool run;
+ SDL_Event v;
+};
+
+#endif
diff --git a/inc/main.h b/inc/main.h
new file mode 100644
index 0000000..d026886
--- /dev/null
+++ b/inc/main.h
@@ -0,0 +1,10 @@
+#ifndef main_h
+#define main_h
+
+#include "window.h"
+#include "entity.h"
+#include "event.h"
+#include "creature.h"
+#include "resource.h"
+
+#endif
diff --git a/inc/resource.h b/inc/resource.h
new file mode 100644
index 0000000..463f355
--- /dev/null
+++ b/inc/resource.h
@@ -0,0 +1,12 @@
+#ifndef resource_h
+#define resource_h
+
+#include "entity.h"
+
+class Resource: public Entity
+{
+ public:
+ Resource(Window m, std::string s);
+};
+
+#endif
diff --git a/inc/window.h b/inc/window.h
new file mode 100644
index 0000000..fb1cf67
--- /dev/null
+++ b/inc/window.h
@@ -0,0 +1,24 @@
+#ifndef window_h
+#define window_h
+
+#include <SDL2/SDL.h>
+#include <SDL2/SDL_image.h>
+#include <string>
+#include <cmath>
+
+class Window
+{
+ public:
+ Window();
+ void Destroy();
+
+ void Clear();
+ void Render();
+ SDL_Renderer* getRenderer();
+
+ private:
+ SDL_Window* main;
+ SDL_Renderer* renderer;
+};
+
+#endif