rnd-19980928-2
[rocksndiamonds.git] / src / events.c
index 9a2cdd41b6f6cce864ff645838e8572564bd3d9d..48638bdeea8cd7f31bc409e9df7f81f7a91f3626 100644 (file)
@@ -180,8 +180,8 @@ void HandleExposeEvent(XExposeEvent *event)
   {
     int fx = FX, fy = FY;
 
-    fx += (local_player->MovDir & (MV_LEFT|MV_RIGHT) ? ScreenMovPos : 0);
-    fy += (local_player->MovDir & (MV_UP|MV_DOWN)    ? ScreenMovPos : 0);
+    fx += (ScreenMovDir & (MV_LEFT|MV_RIGHT) ? ScreenGfxPos : 0);
+    fy += (ScreenMovDir & (MV_UP|MV_DOWN)    ? ScreenGfxPos : 0);
 
     XCopyArea(display,fieldbuffer,backbuffer,gc,
              fx,fy, SXSIZE,SYSIZE,
@@ -667,6 +667,18 @@ void HandleKey(KeySym key, int key_status)
            printf("\n");
          }
 
+         break;
+
+       case XK_t:
+         {
+           char *color[] = { "yellow", "red", "green", "blue" };
+
+           TestPlayer = (TestPlayer + 1) % MAX_PLAYERS;
+
+           printf("TestPlayer = %d (%s player)\n",
+                  TestPlayer, color[TestPlayer]);
+         }
+
          break;
 #endif