X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=f3207c5116bba4b1aa78979f912ef89e419a4d8b;hb=e10dc1ec22ffe858a810174cf35f15ae24a2c243;hp=e76026e17bfc68c3c468eedc59421fcdc08a1ff3;hpb=e0bf8eee0aec424593e68e37e35c6b6f120e4712;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index e76026e1..f3207c51 100644 --- a/src/events.c +++ b/src/events.c @@ -85,7 +85,7 @@ void EventLoop(void) { Event event; - if (NextValidEvent(&event)) + while (NextValidEvent(&event)) { switch(event.type) { @@ -112,7 +112,7 @@ void EventLoop(void) else { /* when playing, display a special mouse pointer inside the playfield */ - if (game_status == GAME_MODE_PLAYING) + if (game_status == GAME_MODE_PLAYING && !tape.pausing) { if (!playfield_cursor_set && cursor_inside_playfield && DelayReached(&playfield_cursor_delay, 1000)) @@ -411,36 +411,8 @@ void HandleButton(int mx, int my, int button) case GAME_MODE_PLAYING: #ifdef DEBUG - if (button == MB_RELEASED) - { - if (IN_GFX_SCREEN(mx, my)) - { - int sx = (mx - SX) / TILEX; - int sy = (my - SY) / TILEY; - int x = LEVELX(sx); - int y = LEVELY(sy); - - printf("INFO: SCREEN(%d, %d), LEVEL(%d, %d)\n", sx, sy, x, y); - - if (!IN_LEV_FIELD(x, y)) - break; - - printf(" Feld[%d][%d] == %d ('%s')\n", x,y, Feld[x][y], - element_info[Feld[x][y]].token_name); - printf(" Back[%d][%d] == %d\n", x,y, Back[x][y]); - 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(" GfxAction[%d][%d] == %d\n", x,y, GfxAction[x][y]); - printf(" GfxFrame[%d][%d] == %d\n", x,y, GfxFrame[x][y]); - printf("\n"); - } - } + if (button == MB_PRESSED && !motion_status && IN_GFX_SCREEN(mx, my)) + DumpTile(LEVELX((mx - SX) / TILEX), LEVELY((my - SY) / TILEY)); #endif break; @@ -674,7 +646,7 @@ void HandleKey(Key key, int key_status) if (setup.autorecord) TapeStartRecording(); -#if defined(PLATFORM_UNIX) +#if defined(NETWORK_AVALIABLE) if (options.network) SendToServer_StartPlaying(); else @@ -718,6 +690,7 @@ void HandleKey(Key key, int key_status) case GAME_MODE_INFO: switch(key) { + case KSYM_space: case KSYM_Return: if (game_status == GAME_MODE_MAIN) HandleMainMenu(0,0, 0,0, MB_MENU_CHOICE); @@ -764,6 +737,7 @@ void HandleKey(Key key, int key_status) case GAME_MODE_SCORES: switch(key) { + case KSYM_space: case KSYM_Return: case KSYM_Escape: game_status = GAME_MODE_MAIN; @@ -899,6 +873,11 @@ void HandleKey(Key key, int key_status) printf("ScrollStepSize == %d (1/1)\n", ScrollStepSize); break; + case KSYM_v: + printf("::: currently using game engine version %d\n", + game.engine_version); + break; + #if 0 case KSYM_z: @@ -945,7 +924,7 @@ void HandleNoEvent() return; } -#if defined(PLATFORM_UNIX) +#if defined(NETWORK_AVALIABLE) if (options.network) HandleNetworking(); #endif