Allegro: mouse & keyboard
Situation: User is pressing mouse button to draw tiles on the screen. it must not print those if mouse_y > x
Piece of cake you say. I also believe that I do everything necessary, but if the user is a real idiot and pulls the mouse very quickly under the limit it will draw those tile under x.
if(mouse_b & 1)
rest(10); // Helps a bit, but stil...
/* Draw & set a tile */
if((mouse_x < mapX*PCX_X) && (mouse_y < mapY*PCX_Y))
map.SetTile(mouse_x/PCX_X, mouse_y/PCX_Y, (TILE)tile); // just an insertion to an array
map.UpdateTile(mouse_x/PCX_X, mouse_y/PCX_Y); // -> blit
How to get other than US-layout for the keyboard? (And how to work with that `install_keyboard_hooks()'?)