X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fevents.c;h=b1c15e9fc8a8e09069c64984b52e4bfb9b81c439;hp=619a7f13495fdc76c984724e718cd430d4ba3544;hb=9de8eede744c45187c7011543ef8097d1ebc879c;hpb=a85d66e030463ca9cf9700888481ebf2a04f8740 diff --git a/src/events.c b/src/events.c index 619a7f13..b1c15e9f 100644 --- a/src/events.c +++ b/src/events.c @@ -23,11 +23,6 @@ #include "tape.h" #include "network.h" -/* values for key_status */ -#define KEY_NOT_PRESSED FALSE -#define KEY_RELEASED FALSE -#define KEY_PRESSED TRUE - static boolean cursor_inside_playfield = FALSE; static boolean playfield_cursor_set = FALSE; @@ -311,7 +306,9 @@ void HandleKeyEvent(KeyEvent *event) int key_status = (event->type==EVENT_KEYPRESS ? KEY_PRESSED : KEY_RELEASED); boolean with_modifiers = (game_status == GAME_MODE_PLAYING ? FALSE : TRUE); Key key = GetEventKey(event, with_modifiers); + Key keymod = (with_modifiers ? GetEventKey(event, FALSE) : key); + HandleKeyModState(keymod, key_status); HandleKey(key, key_status); } @@ -425,13 +422,15 @@ void HandleButton(int mx, int my, int button) if (!IN_LEV_FIELD(x, y)) break; - printf(" Feld[%d][%d] == %d\n", x,y, Feld[x][y]); + printf(" Feld[%d][%d] == %d ('%s')\n", x,y, Feld[x][y], + element_info[Feld[x][y]].token_name); printf(" Store[%d][%d] == %d\n", x,y, Store[x][y]); printf(" Store2[%d][%d] == %d\n", x,y, Store2[x][y]); printf(" StorePlayer[%d][%d] == %d\n", x,y, StorePlayer[x][y]); printf(" MovPos[%d][%d] == %d\n", x,y, MovPos[x][y]); printf(" MovDir[%d][%d] == %d\n", x,y, MovDir[x][y]); printf(" MovDelay[%d][%d] == %d\n", x,y, MovDelay[x][y]); + printf(" ChangeDelay[%d][%d] == %d\n", x,y, ChangeDelay[x][y]); printf(" GfxElement[%d][%d] == %d\n", x,y, GfxElement[x][y]); printf("\n"); }