updated on Fri Jan 20 04:00:45 UTC 2012
[aur-mirror.git] / xasteroids / 02_xast.patch
blob6eabd95add1bf69598b1ce67dc274bfe3c9acea9
1 --- Makefile 2011-10-23 14:50:19.549756075 +0600
2 +++ Makefile.new 2011-10-23 14:50:07.673089811 +0600
3 @@ -6,7 +6,7 @@
4 #LDFLAGS = -s -L/usr/local/lib
5 LDFLAGS = -s -L/util/X11/lib
6 LIBS = -lm -lX11
7 -TARGET = xast.exe
8 +TARGET = xast
9 SRCS = xast.c
10 OBJS = xast.o
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
14 @@ -9,6 +9,8 @@
15 Arrow keys.
16 ANSI-C cleanups.
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:
23 @@ -46,10 +48,7 @@
24 #include <X11/Xutil.h>
25 #include <X11/keysym.h>
26 #include <math.h>
28 -#ifdef HAS_USLEEP
29 #include <unistd.h>
30 -#endif
32 #ifndef __STDC__
33 define void
34 @@ -130,7 +129,7 @@
35 {{0,0}, {pi,20},{7*pi/4,28},{pi/4,28},{pi,20}}
37 Boom blist = NULL;
38 -double drawscale = 1, speedscale = 1;
39 +double drawscale = 1, speedscale = 0.2;
40 int width, height,
41 energy, /* # of turns shield is good for */
42 highscore = 0, level,
43 @@ -716,7 +715,7 @@
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);
52 @@ -818,17 +817,17 @@
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;
61 case XK_w:
62 obj[SHIP].rot -= pi/4; break;
63 case XK_t:
64 obj[SHIP].rot += pi/4; break;
65 case XK_d:
66 - obj[SHIP].rotvel = obj[SHIP].rotvel - .02; break;
67 + obj[SHIP].rotvel = obj[SHIP].rotvel - .005; break;
68 case XK_f:
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);
74 @@ -900,7 +899,6 @@
75 } }
76 if (!pause)
77 { moveobjs(&crashed);
78 - if (ships) score--; /* timer effect */
79 if (!counter)
80 { counter = counterstart; /* Restart counter */
81 if (crashed == 2)
82 @@ -978,11 +976,7 @@
84 else obj[ENEMYBUL].alive = 0;
86 -#ifdef HAS_USLEEP
87 - usleep(delay);
88 -#else
89 - for (i = 0; i < delay; i++);
90 -#endif
91 + usleep(2000);