First, let me introduce myself.
Hello, I'm new to allegro, and somewhat new to C++ as well. However, I have used a scripting language for a program called Gamemaker before, which has similar C++ syntax. I'm familiar with C++ now, after studying it, however, I still dont know how to code some advanced things (ie: templates, network programming, file compression, ect.).
Recently I have been programming a small little casual offline game engine with allegro for windows over the past few days, and it seems that for some reason, I cannot get the game loop to exit when I press the excape button, whilst instead it gives me the "We're sorry, but this program needs to close, blah blah blah" after several seconds.
Using the debugger, I have determined that the game never exits the loop, and instead just goes on and on, dispite using "poll_keyboard();" inside it. The compiler I am using is GNU GCC, and the enviorment is Code::Blocks IDE. The loop is simple at this point, what coding I have already spent is loading all the game's resources.
Here is the loop:
I've also used other checkings instead, such as readkey() and it does not work either. I'm wondering how would I go about fixing this, and I would really appreciate any help.