aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--cObject.cpp3
-rw-r--r--cObjectHandler.h4
-rw-r--r--cRender.h2
-rw-r--r--testobject.h3
5 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 132f2ec..c265956 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CC = /usr/bin/g++
-CFLAGS = -Wall -g
+CFLAGS = -Wall -g -std=c++11
LDFLAGS = -lm -lcurses
OUTPUT = bin/Engine
diff --git a/cObject.cpp b/cObject.cpp
index 118fe6f..b293745 100644
--- a/cObject.cpp
+++ b/cObject.cpp
@@ -3,6 +3,7 @@
cObject::cObject(int _sx, int _sy)
{
bSizeSet = false;
+ bBlockRender = true; //Block inherited render capabilities of parent
setSize(_sx, _sy);
}
@@ -46,8 +47,6 @@ void cObject::setSize(int _sx, int _sy)
if(bSizeSet)
return;
- bBlockRender = true; //Block inherited render capabilities of parent
-
sizeX = _sx;
sizeY = _sy;
diff --git a/cObjectHandler.h b/cObjectHandler.h
index 86034b8..555b373 100644
--- a/cObjectHandler.h
+++ b/cObjectHandler.h
@@ -10,7 +10,7 @@
using namespace std;
-class cObject; //Circular dependency break (Bad practice. I Know.)
+//class cObject; //Circular dependency break (Bad practice. I Know.)
class cObjectHandler
{
@@ -49,7 +49,7 @@ private:
void buildHitmap();
vector<cObject*> objects;
- vector<vector<unsigned int>> iHitMap;
+ vector< vector<unsigned int> > iHitMap;
cRender *render;
unsigned long int iActiveObject;
};
diff --git a/cRender.h b/cRender.h
index c30a901..209c75b 100644
--- a/cRender.h
+++ b/cRender.h
@@ -73,7 +73,7 @@ public:
//Resizes console window for Windows
//Sets Size to Console Window Size for Linux. Writes Error for _sx or _sy smaller than Screen. Get by getLastError()
- ~cRender();
+ virtual ~cRender();
//frees allocated memory
int drawPoint(char _c, sPos _pos, bool _overrideCollision, WORD _color);
diff --git a/testobject.h b/testobject.h
index 5e5475f..1da8987 100644
--- a/testobject.h
+++ b/testobject.h
@@ -1,6 +1,7 @@
#pragma once
#include "cObject.h"
+#include <string>
class testobject : cObject
{
@@ -22,7 +23,7 @@ public:
virtual void onClick(sPos _pos, unsigned int _button)
{
cc++;
- drawText(to_string(cc), {2,2}, _COL_RED);
+ drawText(std::to_string(cc), {2,2}, _COL_RED);
}
virtual void onChar(unsigned char _c)