summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authortom <tom@ground-control>2015-11-18 19:59:47 -0600
committertom <tom@ground-control>2015-11-18 19:59:47 -0600
commita760b9339a98281a8a1072d03dbf41f08eb696a6 (patch)
treef1e7958d297c55fdbc6daa1a8d1777cb1ca78fc6 /inc
shovelling
Diffstat (limited to 'inc')
-rw-r--r--inc/Character.hpp19
-rw-r--r--inc/Frame.hpp41
-rw-r--r--inc/Screen.hpp21
-rw-r--r--inc/main.hpp8
4 files changed, 89 insertions, 0 deletions
diff --git a/inc/Character.hpp b/inc/Character.hpp
new file mode 100644
index 0000000..4e0869a
--- /dev/null
+++ b/inc/Character.hpp
@@ -0,0 +1,19 @@
+#ifndef character_h
+#define character_h
+
+class Character
+{
+ public:
+ Character(char nSymbol, int nRow, int nCol);
+ void move(int nRow, int nCol);
+ int getRow();
+ int getCol();
+ char getSymbol();
+
+ private:
+ char symbol;
+ int row;
+ int col;
+};
+
+#endif
diff --git a/inc/Frame.hpp b/inc/Frame.hpp
new file mode 100644
index 0000000..35ff0d6
--- /dev/null
+++ b/inc/Frame.hpp
@@ -0,0 +1,41 @@
+#ifndef frame_h
+#define frame_h
+
+#include <ncurses.h>
+#include "Character.hpp"
+#include <string>
+#include <fstream>
+
+
+class Frame
+{
+ public:
+ //Frame(int rows, int cols, int nRow, int nCol); // main window test
+ Frame(string location, int nRow, int nCol); // main window with seeded map
+ Frame(Frame &super, int rows, int cols, int nRow, int nCol); // viewport
+ ~Frame();
+ WINDOW * getWin();
+ WINDOW * getSuper();
+ bool getHasSuper();
+ int getHeight();
+ int getWidth();
+ int getRow();
+ int getCol();
+ void fillWindow();
+ void refresh();
+ void move(int nRow, int nCol);
+ void add(Character &c);
+ void add(Character &c, int nRow, int nCol);
+ void erase(Character &c);
+ void center(Character &ch);
+
+ private:
+ int height, width;
+ int row, col;
+ bool hasSuper;
+ WINDOW * w;
+ WINDOW * super;
+ string m;
+};
+
+#endif
diff --git a/inc/Screen.hpp b/inc/Screen.hpp
new file mode 100644
index 0000000..505f4e2
--- /dev/null
+++ b/inc/Screen.hpp
@@ -0,0 +1,21 @@
+#ifndef window_h
+#define window_h
+
+#include <string>
+#include "ncurses.h"
+
+using namespace std;
+
+class Screen
+{
+ public:
+ Screen();
+ ~Screen();
+ void ping(string msg);
+ int getHeight();
+ int getWidth();
+ private:
+ int height, width;
+};
+
+#endif
diff --git a/inc/main.hpp b/inc/main.hpp
new file mode 100644
index 0000000..6d3cae3
--- /dev/null
+++ b/inc/main.hpp
@@ -0,0 +1,8 @@
+#ifndef main_h
+#define main_h
+
+#include "Screen.hpp"
+#include "Character.hpp"
+#include "Frame.hpp"
+
+#endif