I'm using a guide here: http://codeumbra.eu/complete-roguelike-tutorial-using-c-and-libtcod-part-1-setting-up
The following code opens a console window, and a main window for the game. the game windows closes half a second after opening, then pressing a key on the console window simply returns 3.
#include "libtcod.hpp"
int main() {
TCODConsole::initRoot(80,50,"libtcod C++ tutorial",false);
while ( !TCODConsole::isWindowClosed() ) {
TCODSystem::checkForEvent(TCOD_EVENT_KEY_PRESS,NULL,NULL);
TCODConsole::root->clear();
TCODConsole::root->putChar(40,25,'@');
TCODConsole::flush();
}
return 0;
}
Process terminated with status 3 (0 minutes, 3 seconds)
-
I don't know why this is, but apparently others have had the same issue. This has happened in libtcod versions 1.5.0, 1.5.1, and now 1.5.2. I'm sure it isn't just the version and compatibility.
As of now I am using code::blocks with libtcod 1.5.2 (nightly) on windows 7.
I've been at this for hours, and I'm getting a bit tired of coding as a whole. Please, gods of stackoverflow, help me ;_;