1 --- Makefile 2011-10-23 14:50:19.549756075 +0600
2 +++ Makefile.new 2011-10-23 14:50:07.673089811 +0600
4 #LDFLAGS = -s -L/usr/local/lib
5 LDFLAGS = -s -L/util/X11/lib
11 ALL = README xasteroids xast.docs xast.man Makefile $(SRCS)
12 --- xast.c 2011-10-23 15:16:38.859702325 +0600
13 +++ xast.c.new 2011-10-23 15:19:39.573029507 +0600
17 Use usleep() instead of a delay loop, when available.
18 + Changed default window size and speed (2011).
19 + Disabled timer penalty because of problems with its speed (2011).
21 Changes from version 4.3:
24 #include <X11/Xutil.h>
25 #include <X11/keysym.h>
35 {{0,0}, {pi,20},{7*pi/4,28},{pi/4,28},{pi,20}}
38 -double drawscale = 1, speedscale = 1;
39 +double drawscale = 1, speedscale = 0.2;
41 energy, /* # of turns shield is good for */
44 screen = DefaultScreen(disp);
45 bg = BlackPixel(disp, screen);
46 fg = WhitePixel(disp, screen);
47 - hint.x = 150; hint.y = 200; hint.width = 550; hint.height = 550;
48 + hint.x = 50; hint.y = 50; hint.width = 1024; hint.height = 768;
49 hint.flags = PPosition | PSize;
50 width = hint.width; height = hint.height-letheight-1;
51 depth = DefaultDepth (disp, screen);
53 key = XLookupKeysym ((XKeyEvent *)&event, 0);
54 if (!shield_on) switch (key)
55 { case XK_Left: case XK_e:
56 - obj[SHIP].rotvel = obj[SHIP].rotvel - .1; break;
57 + obj[SHIP].rotvel = obj[SHIP].rotvel - .02; break;
58 case XK_Right: case XK_r:
59 - obj[SHIP].rotvel = obj[SHIP].rotvel + .1; break;
60 + obj[SHIP].rotvel = obj[SHIP].rotvel + .02; break;
62 obj[SHIP].rot -= pi/4; break;
64 obj[SHIP].rot += pi/4; break;
66 - obj[SHIP].rotvel = obj[SHIP].rotvel - .02; break;
67 + obj[SHIP].rotvel = obj[SHIP].rotvel - .005; break;
69 - obj[SHIP].rotvel = obj[SHIP].rotvel + .02; break;
70 + obj[SHIP].rotvel = obj[SHIP].rotvel + .005; break;
71 case XK_Up: case THRUST:
72 obj[SHIP].xvel += cos(obj[SHIP].rot);
73 obj[SHIP].yvel += sin(obj[SHIP].rot);
78 - if (ships) score--; /* timer effect */
80 { counter = counterstart; /* Restart counter */
84 else obj[ENEMYBUL].alive = 0;
89 - for (i = 0; i < delay; i++);