summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-03-07 02:41:26 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-03-07 02:41:26 +0100
commit931de7809213903c2a349c93b049afebda2b0242 (patch)
treeed7aa07802bd559e9213ae7c6e0e5a95fa8f2230 /src
parent99249ba62bcdfbe300c6ab7db02088d8d1e118c4 (diff)
downloadtermgl-931de7809213903c2a349c93b049afebda2b0242.tar.gz
Deactivated color to fix #5 temporarily
Diffstat (limited to 'src')
-rw-r--r--src/cObjectHandler.cpp2
-rw-r--r--src/cRender.cpp13
2 files changed, 12 insertions, 3 deletions
diff --git a/src/cObjectHandler.cpp b/src/cObjectHandler.cpp
index 3b69cfb..da0dcc9 100644
--- a/src/cObjectHandler.cpp
+++ b/src/cObjectHandler.cpp
@@ -163,7 +163,7 @@ void cObjectHandler::buildHitmap()
iHitMap.push_back(cp);
}
- while (size.x <= (int)iHitMap.size())
+ while (size.x < (int)iHitMap.size())
{
iHitMap.pop_back();
}
diff --git a/src/cRender.cpp b/src/cRender.cpp
index 874b955..9d13b7c 100644
--- a/src/cRender.cpp
+++ b/src/cRender.cpp
@@ -41,7 +41,15 @@ cRender::cRender(char _backound, WORD _color, unsigned int _sx, unsigned int _sy
}//render()
-cRender::cRender() {}
+cRender::cRender()
+{
+ cScreen = NULL;
+ wColor = NULL;
+ bBlockRender = false;
+ cBackound = 0;
+ wBackColor = 0;
+ sizeX = sizeY = 0;
+}
cRender::~cRender()
{
@@ -191,8 +199,9 @@ int cRender::render(void)
#elif __linux__
//gotoxy(x,y) now included!!
char buffer[20];
- int cbuf = sprintf(buffer,"\e[%u;%uH\e[%im%c", i + 1, o + 1, wColor[o][i], cScreen[o][i]);
+ //int cbuf = sprintf(buffer,"\e[%u;%uH\e[%im%c", i + 1, o + 1, wColor[o][i], cScreen[o][i]);
// Position Color Origin is at 1,1
+ int cbuf = sprintf(buffer,"\e[%u;%uH%c", i + 1, o + 1, cScreen[o][i]);
write (STDOUT_FILENO, buffer, cbuf);
#endif //__linux__