aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndy <drumsetmonkey@gmail.com>2016-11-28 08:43:33 -0500
committerAndy <drumsetmonkey@gmail.com>2016-11-28 08:43:33 -0500
commit1c5b4e5a0ad8b7a65fef3df48ed50f96a4b865c7 (patch)
tree543d1a437efc734e131e3eb5a8bf5654aee7b794 /include
parent320f5d3506a8e0062606b9a178dd40d5a89b37c5 (diff)
parentc155b43e5189e838c9988a464ca930efb242ee90 (diff)
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'include')
-rw-r--r--include/components.hpp3
-rw-r--r--include/window.hpp18
2 files changed, 20 insertions, 1 deletions
diff --git a/include/components.hpp b/include/components.hpp
index 774429d..551df53 100644
--- a/include/components.hpp
+++ b/include/components.hpp
@@ -247,10 +247,11 @@ struct Visible {
struct Dialog {
Dialog(int idx = 0)
- : index(idx), rindex((idx == 9999) ? randGet() : idx) {}
+ : index(idx), rindex((idx == 9999) ? randGet() : idx), talking(false) {}
int index;
int rindex;
+ bool talking;
};
// movement styles
diff --git a/include/window.hpp b/include/window.hpp
index 55cbe1c..5cf05ea 100644
--- a/include/window.hpp
+++ b/include/window.hpp
@@ -1,3 +1,8 @@
+/**
+ * @file window.hpp
+ * Provides a system for handling the game's window.
+ */
+
#ifndef WINDOW_HPP_
#define WINDOW_HPP_
@@ -7,9 +12,22 @@
#include <events.hpp>
+/**
+ * @class WindowSystem
+ * Contains everything needed to create and update a window, using SDL.
+ * Also handles window resizing (WIP) and screenshots (WIP).
+ */
class WindowSystem : public entityx::System<WindowSystem>, public entityx::Receiver<WindowSystem> {
private:
+
+ /**
+ * SDL's object for the window.
+ */
SDL_Window *window;
+
+ /**
+ * An OpenGL context, created when OpenGL is set up for use.
+ */
SDL_GLContext glContext;
public: