diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cObject.cpp | 3 | ||||
-rw-r--r-- | cObjectHandler.h | 4 | ||||
-rw-r--r-- | cRender.h | 2 | ||||
-rw-r--r-- | testobject.h | 3 |
5 files changed, 7 insertions, 7 deletions
@@ -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; }; @@ -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) |