/***********************************************************
* Rocks'n'Diamonds -- McDuffin Strikes Back! *
*----------------------------------------------------------*
/***********************************************************
* Rocks'n'Diamonds -- McDuffin Strikes Back! *
*----------------------------------------------------------*
-* ©1995 Artsoft Development *
-* Holger Schemel *
-* 33659 Bielefeld-Senne *
-* Telefon: (0521) 493245 *
-* eMail: aeglos@valinor.owl.de *
-* aeglos@uni-paderborn.de *
-* q99492@pbhrzx.uni-paderborn.de *
+* (c) 1995-98 Artsoft Entertainment *
+* Holger Schemel *
+* Oststrasse 11a *
+* 33604 Bielefeld *
+* phone: ++49 +521 290471 *
+* email: aeglos@valinor.owl.de *
*----------------------------------------------------------*
* events.c *
***********************************************************/
*----------------------------------------------------------*
* events.c *
***********************************************************/
- case ClientMessage:
- HandleClientMessageEvent((XClientMessageEvent *) &event);
+
+ case UnmapNotify:
+ /* this is only to surely prevent the 'should not happen' case
+ * of recursively looping between 'SleepWhileUnmapped()' and
+ * 'HandleOtherEvents()' which usually calls this funtion.
+ */
int x = event->x, y = event->y;
int width = event->width, height = event->height;
int x = event->x, y = event->y;
int width = event->width, height = event->height;
- 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,
XCopyArea(display,fieldbuffer,backbuffer,gc,
fx,fy, SXSIZE,SYSIZE,
{
if ((event->window == window) &&
(event->data.l[0] == XInternAtom(display, "WM_DELETE_WINDOW", FALSE)))
{
if ((event->window == window) &&
(event->data.l[0] == XInternAtom(display, "WM_DELETE_WINDOW", FALSE)))
printf("INFO: Feld[%d][%d] == %d\n", x,y, Feld[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("INFO: Feld[%d][%d] == %d\n", x,y, Feld[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]);
case MAINMENU:
HandleMainMenu(mx,my,0,0,button);
break;
case MAINMENU:
HandleMainMenu(mx,my,0,0,button);
break;
case CHOOSELEVEL:
HandleChooseLevel(mx,my,0,0,button);
break;
case CHOOSELEVEL:
HandleChooseLevel(mx,my,0,0,button);
break;
case SETUP:
HandleSetupScreen(mx,my,0,0,button);
break;
case SETUP:
HandleSetupScreen(mx,my,0,0,button);
break;
HandleChooseLevel(0,0,0,0,MB_MENU_CHOICE);
else if (game_status==SETUP)
HandleSetupScreen(0,0,0,0,MB_MENU_CHOICE);
HandleChooseLevel(0,0,0,0,MB_MENU_CHOICE);
else if (game_status==SETUP)
HandleSetupScreen(0,0,0,0,MB_MENU_CHOICE);
ScrollStepSize = TILEX/8;
printf("ScrollStepSize == %d (1/8)\n", ScrollStepSize);
break;
ScrollStepSize = TILEX/8;
printf("ScrollStepSize == %d (1/8)\n", ScrollStepSize);
break;
case XK_g:
ScrollStepSize = TILEX/4;
printf("ScrollStepSize == %d (1/4)\n", ScrollStepSize);
break;
case XK_g:
ScrollStepSize = TILEX/4;
printf("ScrollStepSize == %d (1/4)\n", ScrollStepSize);
break;
case XK_h:
ScrollStepSize = TILEX/2;
printf("ScrollStepSize == %d (1/2)\n", ScrollStepSize);
break;
case XK_h:
ScrollStepSize = TILEX/2;
printf("ScrollStepSize == %d (1/2)\n", ScrollStepSize);
break;
+ break;
+
+ case XK_t:
+ {
+ char *color[] = { "yellow", "red", "green", "blue" };
+
+ do
+ TestPlayer = (TestPlayer + 1) % MAX_PLAYERS;
+ while(!stored_player[TestPlayer].active);
+
+ printf("TestPlayer = %d (%s player)\n",
+ TestPlayer, color[TestPlayer]);
+ }
+
HandleChooseLevel(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
else if (game_status==SETUP)
HandleSetupScreen(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
HandleChooseLevel(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
else if (game_status==SETUP)
HandleSetupScreen(0,0,dx,dy,newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);
+ else if (game_status==SETUPINPUT)
+ HandleSetupInputScreen(0,0,dx,dy,
+ newbutton ? MB_MENU_CHOICE : MB_MENU_MARK);