1 /*
2    laser.h:
3 
4    Headers for "Comet Zap" typing game adapted from "Tux, of Math
5    Command"  (http://tux4kids.alioth.debian.org)
6 
7    Copyright 2000, 2003, 2008, 2010.
8    Authors: Bill Kendrick, Jesse Andrews, David Bruce.
9 
10    Project email: <tux4kids-tuxtype-dev@lists.alioth.debian.org>
11    Project website: http://tux4kids.alioth.debian.org
12 
13    laser.h is part of Tux Typing, a.k.a "tuxtype".
14 
15 Tux Typing is free software: you can redistribute it and/or modify
16 it under the terms of the GNU General Public License as published by
17 the Free Software Foundation; either version 3 of the License, or
18 (at your option) any later version.
19 
20 Tux Typing is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 GNU General Public License for more details.
24 
25 You should have received a copy of the GNU General Public License
26 along with this program.  If not, see <http://www.gnu.org/licenses/>.
27 */
28 
29 
30 
31 #ifndef LASER_H
32 #define LASER_H
33 
34 #define MAX_COMETS 30
35 #define NUM_CITIES 9   /* MUST BE AN EVEN NUMBER! */
36 
37 #define NUM_BKGDS 5
38 #define MAX_CITY_COLORS 4
39 
40 typedef struct comet_type {
41   int alive;
42   int expl;
43   int city;
44   int x, y;
45   int shootable;
46   struct comet_type* next;
47   wchar_t ch;
48 } comet_type;
49 
50 typedef struct city_type {
51   int alive, expl, shields;
52   int x;
53 } city_type;
54 
55 typedef struct laser_type {
56   int alive;
57   int x1, y1;
58   int x2, y2;
59 } laser_type;
60 
61 enum {
62   IMG_TUX_HELMET1,
63   IMG_TUX_HELMET2,
64   IMG_TUX_HELMET3,
65   IMG_CITY_BLUE,
66   IMG_CITY_BLUE_EXPL1,
67   IMG_CITY_BLUE_EXPL2,
68   IMG_CITY_BLUE_EXPL3,
69   IMG_CITY_BLUE_EXPL4,
70   IMG_CITY_BLUE_EXPL5,
71   IMG_CITY_BLUE_DEAD,
72   IMG_CITY_GREEN,
73   IMG_CITY_GREEN_EXPL1,
74   IMG_CITY_GREEN_EXPL2,
75   IMG_CITY_GREEN_EXPL3,
76   IMG_CITY_GREEN_EXPL4,
77   IMG_CITY_GREEN_EXPL5,
78   IMG_CITY_GREEN_DEAD,
79   IMG_CITY_ORANGE,
80   IMG_CITY_ORANGE_EXPL1,
81   IMG_CITY_ORANGE_EXPL2,
82   IMG_CITY_ORANGE_EXPL3,
83   IMG_CITY_ORANGE_EXPL4,
84   IMG_CITY_ORANGE_EXPL5,
85   IMG_CITY_ORANGE_DEAD,
86   IMG_CITY_RED,
87   IMG_CITY_RED_EXPL1,
88   IMG_CITY_RED_EXPL2,
89   IMG_CITY_RED_EXPL3,
90   IMG_CITY_RED_EXPL4,
91   IMG_CITY_RED_EXPL5,
92   IMG_CITY_RED_DEAD,
93   IMG_COMET1,
94   IMG_COMET2,
95   IMG_COMET3,
96   IMG_COMETEX1,
97   IMG_COMETEX2,
98   IMG_CONSOLE,
99   IMG_TUX_CONSOLE1,
100   IMG_TUX_CONSOLE2,
101   IMG_TUX_CONSOLE3,
102   IMG_TUX_CONSOLE4,
103   IMG_TUX_RELAX1,
104   IMG_TUX_RELAX2,
105   IMG_TUX_DRAT,
106   IMG_TUX_YIPE,
107   IMG_TUX_YAY1,
108   IMG_TUX_YAY2,
109   IMG_TUX_YES1,
110   IMG_TUX_YES2,
111   IMG_TUX_SIT,
112   IMG_TUX_FIST1,
113   IMG_TUX_FIST2,
114   IMG_WAVE,
115   IMG_SCORE,
116   IMG_NUMBERS,
117   IMG_GAMEOVER,
118   NUM_IMAGES
119 };
120 
121 
122 static char* image_filenames[NUM_IMAGES] = {
123   "status/tux_helmet1.png",
124   "status/tux_helmet2.png",
125   "status/tux_helmet3.png",
126   "cities/city-blue.png",
127   "cities/csplode-blue-1.png",
128   "cities/csplode-blue-2.png",
129   "cities/csplode-blue-3.png",
130   "cities/csplode-blue-4.png",
131   "cities/csplode-blue-5.png",
132   "cities/cdead-blue.png",
133   "cities/city-green.png",
134   "cities/csplode-green-1.png",
135   "cities/csplode-green-2.png",
136   "cities/csplode-green-3.png",
137   "cities/csplode-green-4.png",
138   "cities/csplode-green-5.png",
139   "cities/cdead-green.png",
140   "cities/city-orange.png",
141   "cities/csplode-orange-1.png",
142   "cities/csplode-orange-2.png",
143   "cities/csplode-orange-3.png",
144   "cities/csplode-orange-4.png",
145   "cities/csplode-orange-5.png",
146   "cities/cdead-orange.png",
147   "cities/city-red.png",
148   "cities/csplode-red-1.png",
149   "cities/csplode-red-2.png",
150   "cities/csplode-red-3.png",
151   "cities/csplode-red-4.png",
152   "cities/csplode-red-5.png",
153   "cities/cdead-red.png",
154   "comets/comet1.png",
155   "comets/comet2.png",
156   "comets/comet3.png",
157   "comets/cometex1.png",
158   "comets/cometex2.png",
159   "tux/console.png",
160   "tux/tux-console1.png",
161   "tux/tux-console2.png",
162   "tux/tux-console3.png",
163   "tux/tux-console4.png",
164   "tux/tux-relax1.png",
165   "tux/tux-relax2.png",
166   "tux/tux-drat.png",
167   "tux/tux-yipe.png",
168   "tux/tux-yay1.png",
169   "tux/tux-yay2.png",
170   "tux/tux-yes1.png",
171   "tux/tux-yes2.png",
172   "tux/tux-sit.png",
173   "tux/tux-fist0.png",
174   "tux/tux-fist1.png",
175   "status/wave.png",
176   "status/score.png",
177   "status/numbers.png",
178   "status/gameover.png"
179 };
180 
181 enum {
182   SND_POP,
183   SND_LASER,
184   SND_BUZZ,
185   SND_ALARM,
186   SND_SHIELDSDOWN,
187   SND_EXPLOSION,
188   SND_TOCK,
189   NUM_SOUNDS
190 };
191 
192 
193 static char* sound_filenames[NUM_SOUNDS] = {
194   "pop.wav",
195   "laser.wav",
196   "buzz.wav",
197   "alarm.wav",
198   "shieldsdown.wav",
199   "explosion.wav",
200   "tock.wav"
201 };
202 
203 
204 enum {
205   MUS_GAME,
206   MUS_GAME2,
207   MUS_GAME3,
208   NUM_MUSICS
209 };
210 
211 static char * music_filenames[NUM_MUSICS] = {
212   "game.mod",
213   "game2.mod",
214   "game3.mod"
215 };
216 
217 #endif
218