I've only been using Allegro for about a week. I have a lot to learn.
For the moment, I can't figure out what's causing the player movement speed to increase.
As soon as I install the mouse and register it, the player will move very fast when I move the mouse. If I leave the mouse still, the player moves at normal speed.
If I leave mouse uninstalled, then there is no problem.
AllegroTest Github repo.
All the game code is in game.cpp. You'll notice that I sort of "wrapped" all the allegro initialization code into c++ member functions. It's just easier for me to look at when you look at the main.cpp.
I think all the relevant code will be in these functions:
*Edit: This is funny. I apparently broke something because now when event.mouse.x == 59, then event.keyboard.keycode== 59 (ESC), which triggers game_is_running to be false which then exits the program. Not what I want. I can't imagine how the two events are talking to each other.
*Edit2: I fixed the mouse causing the exit routine. I didn't realize I was assigning false twice to game_is_running. Here's the diff
I've been giving the player speed issue some thought and have a theory that when the mouse is moving it refreshes the screen faster than a keyboard being held down.
Or another theory is that a the key polling and the mouse movement overlap thus doubling the player's speed. I'll experiment with that.