1 |
commit: b9914d2c155b43f92ae742a9a35e737fe351f45f |
2 |
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Jul 12 18:14:38 2021 +0000 |
4 |
Commit: Azamat H. Hackimov <winterheart <AT> gentoo <DOT> ru> |
5 |
CommitDate: Mon Jul 12 20:45:53 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gamerlay.git/commit/?id=b9914d2c |
7 |
|
8 |
games-action/area2048: remove broken package |
9 |
|
10 |
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com> |
11 |
|
12 |
games-action/area2048/area2048-1.03.ebuild | 67 -- |
13 |
.../area2048/files/area2048-1.03-homedir.patch | 157 --- |
14 |
.../area2048/files/area2048-1.03-import.patch | 1230 -------------------- |
15 |
.../area2048/files/area2048-1.03-makefile.patch | 22 - |
16 |
.../area2048/files/area2048-1.03-src.patch | 1217 ------------------- |
17 |
games-action/area2048/files/area2048.png | Bin 2508 -> 0 bytes |
18 |
games-action/area2048/metadata.xml | 8 - |
19 |
7 files changed, 2701 deletions(-) |
20 |
|
21 |
diff --git a/games-action/area2048/area2048-1.03.ebuild b/games-action/area2048/area2048-1.03.ebuild |
22 |
deleted file mode 100644 |
23 |
index df021f3..0000000 |
24 |
--- a/games-action/area2048/area2048-1.03.ebuild |
25 |
+++ /dev/null |
26 |
@@ -1,67 +0,0 @@ |
27 |
-# Copyright 1999-2018 Gentoo Authors |
28 |
-# Distributed under the terms of the GNU General Public License v2 |
29 |
- |
30 |
-EAPI=2 |
31 |
- |
32 |
-inherit d-games |
33 |
- |
34 |
-MY_PN=a2k |
35 |
-MY_PV=${PV//./_} |
36 |
- |
37 |
-DESCRIPTION="jumpei isshiki's HelloWorldProject (2005/01/17) " |
38 |
-HOMEPAGE="https://sourceforge.net/projects/area2048/" |
39 |
-SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-linux.tar.gz" |
40 |
- |
41 |
-LICENSE="BSD" |
42 |
-SLOT="0" |
43 |
-KEYWORDS="~ppc ~x86" |
44 |
-IUSE="" |
45 |
- |
46 |
-RDEPEND="media-libs/libsdl |
47 |
- media-libs/mesa |
48 |
- media-libs/sdl-mixer |
49 |
- dev-libs/libbulletml" |
50 |
-DEPEND="${RDEPEND}" |
51 |
- |
52 |
-S=${WORKDIR}/${MY_PN} |
53 |
- |
54 |
-src_unpack(){ |
55 |
- cd "${WORKDIR}" |
56 |
- unpack ${MY_PN}.zip |
57 |
- cd "${S}" |
58 |
- unpack ${MY_PN}_src.zip |
59 |
- |
60 |
-} |
61 |
- |
62 |
-src_prepare(){ |
63 |
- epatch "${FILESDIR}"/${P}-import.patch |
64 |
- epatch "${FILESDIR}"/${P}-src.patch |
65 |
- epatch "${FILESDIR}"/${P}-makefile.patch |
66 |
- epatch "${FILESDIR}"/${P}-homedir.patch |
67 |
- sed -i \ |
68 |
- -e 's:"\(icon.bmp[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i a2k_src/src/util_pad.d \ |
69 |
- -e 's:"\(title.bmp[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i a2k_src/src/init.d \ |
70 |
- -e 's:"\(stg0[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i a2k_src/src/init.d \ |
71 |
- -e 's:"\(boss0[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i a2k_src/src/init.d \ |
72 |
- -e 's:"\(se_[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i a2k_src/src/init.d \ |
73 |
- -e 's:"\(voice[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i a2k_src/src/init.d \ |
74 |
- -e 's:"\(bullet[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i a2k_src/src/init.d \ |
75 |
- || die "sed failed" |
76 |
-} |
77 |
- |
78 |
-src_install() { |
79 |
- dogamesbin ${PN} || die "dogamesbin failed" |
80 |
- |
81 |
- local datadir="${GAMES_DATADIR}"/${PN} |
82 |
- dodir ${datadir} |
83 |
- insinto "${GAMES_DATADIR}"/${PN} |
84 |
- doins *.xml *.bmp *.ogg *.wav || die |
85 |
- newicon "${FILESDIR}"/${PN}.png ${PN}.png |
86 |
- make_desktop_entry ${PN} ${PN} |
87 |
- dodoc readme* |
88 |
- prepgamesdirs |
89 |
-} |
90 |
- |
91 |
-pkg_postinst() { |
92 |
- games_pkg_postinst |
93 |
-} |
94 |
|
95 |
diff --git a/games-action/area2048/files/area2048-1.03-homedir.patch b/games-action/area2048/files/area2048-1.03-homedir.patch |
96 |
deleted file mode 100644 |
97 |
index f18a52d..0000000 |
98 |
--- a/games-action/area2048/files/area2048-1.03-homedir.patch |
99 |
+++ /dev/null |
100 |
@@ -1,157 +0,0 @@ |
101 |
-diff -Naur a2k-o/a2k_src/src/gctrl.d a2k/a2k_src/src/gctrl.d |
102 |
---- a2k-o/a2k_src/src/gctrl.d 2005-01-18 02:03:08.000000000 +0100 |
103 |
-+++ a2k/a2k_src/src/gctrl.d 2009-08-29 12:21:15.000000000 +0200 |
104 |
-@@ -6,6 +6,12 @@ |
105 |
- 2004/04/08 jumpei isshiki |
106 |
- */ |
107 |
- |
108 |
-+private import SDL; |
109 |
-+private import std.stdio; |
110 |
-+private import std.math; |
111 |
-+private import std.file; |
112 |
-+private import std.path; |
113 |
-+private import std.string; |
114 |
- private import std.random; |
115 |
- private import util_snd; |
116 |
- private import util_pad; |
117 |
-@@ -72,6 +78,30 @@ |
118 |
- private float rank_max; |
119 |
- private float rank_min; |
120 |
- |
121 |
-+public static char[] pref_dir() { |
122 |
-+ |
123 |
-+ char * home = getenv("HOME"); |
124 |
-+ |
125 |
-+ if (home is null) |
126 |
-+ |
127 |
-+ throw new Error("HOME environment variable undefined"); |
128 |
-+ |
129 |
-+ char[] dir = std.string.toString(home) ~ "/.area2048"; |
130 |
-+ |
131 |
-+ try { |
132 |
-+ |
133 |
-+ mkdir(dir); |
134 |
-+ |
135 |
-+ } catch (FileException e) { |
136 |
-+ |
137 |
-+ } |
138 |
-+ |
139 |
-+ return dir; |
140 |
-+ |
141 |
-+} |
142 |
-+ |
143 |
-+ |
144 |
-+ |
145 |
- void TSKgctrl(int id) |
146 |
- { |
147 |
- switch(TskBuf[id].step){ |
148 |
-diff -Naur a2k-o/a2k_src/src/init.d a2k/a2k_src/src/init.d |
149 |
---- a2k-o/a2k_src/src/init.d 2009-08-29 12:15:08.000000000 +0200 |
150 |
-+++ a2k/a2k_src/src/init.d 2009-08-29 12:08:58.000000000 +0200 |
151 |
-@@ -98,11 +98,11 @@ |
152 |
- auto File fd = new File; |
153 |
- |
154 |
- try { |
155 |
-- fd.open("score.dat"); |
156 |
-+ fd.open(pref_dir() ~ "/" ~ "score.dat"); |
157 |
- if(fd.size() != 12){ |
158 |
- fd.close(); |
159 |
- printf("score.dat initialized"); |
160 |
-- fd.create("score.dat"); |
161 |
-+ fd.create(pref_dir() ~ "/" ~ "score.dat"); |
162 |
- fd.write(high_easy); |
163 |
- fd.write(high_normal); |
164 |
- fd.write(high_hard); |
165 |
-@@ -113,7 +113,7 @@ |
166 |
- } |
167 |
- } catch (Error e) { |
168 |
- printf("score.dat initialized"); |
169 |
-- fd.create("score.dat"); |
170 |
-+ fd.create(pref_dir() ~ "/" ~ "score.dat"); |
171 |
- fd.write(high_easy); |
172 |
- fd.write(high_normal); |
173 |
- fd.write(high_hard); |
174 |
-@@ -122,12 +122,12 @@ |
175 |
- fd.close(); |
176 |
- } |
177 |
- |
178 |
-- fd.open("config.dat"); |
179 |
-+ fd.open(pref_dir() ~ "/" ~ "config.dat"); |
180 |
- try { |
181 |
- if(fd.size() != 12){ |
182 |
- fd.close(); |
183 |
- printf("config.dat initialized"); |
184 |
-- fd.create("config.dat"); |
185 |
-+ fd.create(pref_dir() ~ "/" ~ "config.dat"); |
186 |
- fd.write(pad_type); |
187 |
- fd.write(vol_se); |
188 |
- fd.write(vol_music); |
189 |
-@@ -140,7 +140,7 @@ |
190 |
- } |
191 |
- } catch (Error e) { |
192 |
- printf("config.dat initialized"); |
193 |
-- fd.create("config.dat"); |
194 |
-+ fd.create(pref_dir() ~ "/" ~ "config.dat"); |
195 |
- fd.write(pad_type); |
196 |
- fd.write(vol_se); |
197 |
- fd.write(vol_music); |
198 |
-@@ -153,13 +153,13 @@ |
199 |
- void configSAVE() |
200 |
- { |
201 |
- auto File fd = new File; |
202 |
-- fd.create("score.dat"); |
203 |
-+ fd.create(pref_dir() ~ "/" ~ "score.dat"); |
204 |
- fd.write(high_easy); |
205 |
- fd.write(high_normal); |
206 |
- fd.write(high_hard); |
207 |
- fd.close(); |
208 |
- |
209 |
-- fd.create("config.dat"); |
210 |
-+ fd.create(pref_dir() ~ "/" ~ "config.dat"); |
211 |
- fd.write(pad_type); |
212 |
- fd.write(vol_se); |
213 |
- fd.write(vol_music); |
214 |
-diff -Naur a2k-o/a2k_src/src/main.d a2k/a2k_src/src/main.d |
215 |
---- a2k-o/a2k_src/src/main.d 2009-08-29 12:15:08.000000000 +0200 |
216 |
-+++ a2k/a2k_src/src/main.d 2009-08-29 12:39:56.000000000 +0200 |
217 |
-@@ -7,7 +7,7 @@ |
218 |
- */ |
219 |
- |
220 |
- //private import std.c.windows.windows; |
221 |
--private import SDL; |
222 |
-+private import SDL; |
223 |
- private import SDL_Keysym; |
224 |
- private import opengl; |
225 |
- private import util_sdl; |
226 |
-@@ -36,8 +36,8 @@ |
227 |
- extern (Windows) |
228 |
- int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) |
229 |
- { |
230 |
--*/ |
231 |
--public int main(char[][] args) { |
232 |
-+*/ |
233 |
-+public int main(char[][] args) { |
234 |
- int result; |
235 |
- /* |
236 |
- gc_init(); |
237 |
-@@ -45,10 +45,10 @@ |
238 |
- |
239 |
- try{ |
240 |
- _moduleCtor(); |
241 |
-- _moduleUnitTests(); |
242 |
-+ _moduleUnitTests(); |
243 |
- */ |
244 |
- result = boot(); |
245 |
--/* |
246 |
-+/* |
247 |
- }catch (Object o){ |
248 |
- MessageBoxA(null, cast(char*)o.toString(), "Error", MB_OK | MB_ICONEXCLAMATION); |
249 |
- result = 0; |
250 |
-@@ -103,6 +103,7 @@ |
251 |
- initTSK(); |
252 |
- initASCII(); |
253 |
- bulletINIT(); |
254 |
-+ configSAVE(); |
255 |
- configINIT(); |
256 |
- |
257 |
- game_exec = 1; |
258 |
|
259 |
diff --git a/games-action/area2048/files/area2048-1.03-import.patch b/games-action/area2048/files/area2048-1.03-import.patch |
260 |
deleted file mode 100644 |
261 |
index d42beb3..0000000 |
262 |
--- a/games-action/area2048/files/area2048-1.03-import.patch |
263 |
+++ /dev/null |
264 |
@@ -1,1230 +0,0 @@ |
265 |
-diff -Naur a2k_src/import/opengl.d a2k_src/import/opengl.d |
266 |
---- a2k_src/import/opengl.d 2008-02-12 22:20:18.000000000 +0100 |
267 |
-+++ a2k_src/import/opengl.d 2009-08-27 15:18:28.000000000 +0200 |
268 |
-@@ -1,16 +1,6 @@ |
269 |
--version (Win32) { |
270 |
-- import std.c.windows.windows; |
271 |
--} |
272 |
--extern(System): |
273 |
-- |
274 |
--/* Please use this code with old D compiler. |
275 |
--version (Win32) { |
276 |
-- extern(Windows): |
277 |
--} |
278 |
--else { |
279 |
-+ |
280 |
- extern(C): |
281 |
--} |
282 |
--*/ |
283 |
-+ |
284 |
- |
285 |
- alias uint GLenum; |
286 |
- alias ubyte GLboolean; |
287 |
-@@ -1122,7 +1112,7 @@ |
288 |
- /*************************************************************/ |
289 |
- |
290 |
- void /*APIENTRY*/glAccum (GLenum op, GLfloat value); |
291 |
--void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf cref); |
292 |
-+void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf); |
293 |
- GLboolean /*APIENTRY*/glAreTexturesResident (GLsizei n, GLuint *textures, GLboolean *residences); |
294 |
- void /*APIENTRY*/glArrayElement (GLint i); |
295 |
- void /*APIENTRY*/glBegin (GLenum mode); |
296 |
-@@ -1375,7 +1365,7 @@ |
297 |
- void /*APIENTRY*/glScissor (GLint x, GLint y, GLsizei width, GLsizei height); |
298 |
- void /*APIENTRY*/glSelectBuffer (GLsizei size, GLuint *buffer); |
299 |
- void /*APIENTRY*/glShadeModel (GLenum mode); |
300 |
--void /*APIENTRY*/glStencilFunc (GLenum func, GLint cref, GLuint mask); |
301 |
-+void /*APIENTRY*/glStencilFunc (GLenum func, GLint, GLuint mask); |
302 |
- void /*APIENTRY*/glStencilMask (GLuint mask); |
303 |
- void /*APIENTRY*/glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); |
304 |
- void /*APIENTRY*/glTexCoord1d (GLdouble s); |
305 |
-diff -Naur a2k_src/import/openglu.d a2k_src/import/openglu.d |
306 |
---- a2k_src/import/openglu.d 2008-02-12 22:20:14.000000000 +0100 |
307 |
-+++ a2k_src/import/openglu.d 2009-08-27 15:18:28.000000000 +0200 |
308 |
-@@ -1,15 +1,6 @@ |
309 |
--import opengl; |
310 |
- |
311 |
--extern(System): |
312 |
-- |
313 |
--/* Please use this code with old D compiler. |
314 |
--version (Win32) { |
315 |
-- extern(Windows): |
316 |
--} |
317 |
--else { |
318 |
- extern(C): |
319 |
--} |
320 |
--*/ |
321 |
-+ |
322 |
- |
323 |
- GLubyte* gluErrorString ( |
324 |
- GLenum errCode); |
325 |
-diff -Naur a2k_src/import/SDL_active.d a2k_src/import/SDL_active.d |
326 |
---- a2k_src/import/SDL_active.d 2006-07-26 23:24:30.000000000 +0200 |
327 |
-+++ a2k_src/import/SDL_active.d 2009-08-27 15:18:28.000000000 +0200 |
328 |
-@@ -22,7 +22,7 @@ |
329 |
- |
330 |
- /* Include file for SDL application focus event handling */ |
331 |
- |
332 |
--public import SDL_types; |
333 |
-+import SDL_types; |
334 |
- |
335 |
- extern(C): |
336 |
- |
337 |
-diff -Naur a2k_src/import/SDL_audio.d a2k_src/import/SDL_audio.d |
338 |
---- a2k_src/import/SDL_audio.d 2006-07-26 23:24:40.000000000 +0200 |
339 |
-+++ a2k_src/import/SDL_audio.d 2009-08-27 15:18:28.000000000 +0200 |
340 |
-@@ -20,10 +20,10 @@ |
341 |
- slouken@××××××××××.com |
342 |
- */ |
343 |
- |
344 |
--public import SDL_types; |
345 |
--public import SDL_error; |
346 |
--public import SDL_rwops; |
347 |
--public import SDL_byteorder; |
348 |
-+import SDL_types; |
349 |
-+import SDL_error; |
350 |
-+import SDL_rwops; |
351 |
-+import SDL_byteorder; |
352 |
- |
353 |
- extern(C): |
354 |
- |
355 |
-diff -Naur a2k_src/import/SDL_cdrom.d a2k_src/import/SDL_cdrom.d |
356 |
---- a2k_src/import/SDL_cdrom.d 2006-07-26 23:24:42.000000000 +0200 |
357 |
-+++ a2k_src/import/SDL_cdrom.d 2009-08-27 15:18:28.000000000 +0200 |
358 |
-@@ -22,7 +22,7 @@ |
359 |
- |
360 |
- /* This is the CD-audio control API for Simple DirectMedia Layer */ |
361 |
- |
362 |
--public import SDL_types; |
363 |
-+import SDL_types; |
364 |
- |
365 |
- extern(C): |
366 |
- |
367 |
-diff -Naur a2k_src/import/SDL.d a2k_src/import/SDL.d |
368 |
---- a2k_src/import/SDL.d 2006-07-26 23:24:12.000000000 +0200 |
369 |
-+++ a2k_src/import/SDL.d 2009-08-27 15:18:28.000000000 +0200 |
370 |
-@@ -33,60 +33,60 @@ |
371 |
- public import SDL_byteorder; |
372 |
- public import SDL_Version; |
373 |
- |
374 |
--extern(C): |
375 |
-- |
376 |
--/* As of version 0.5, SDL is loaded dynamically into the application */ |
377 |
-- |
378 |
--/* These are the flags which may be passed to SDL_Init() -- you should |
379 |
-- specify the subsystems which you will be using in your application. |
380 |
--*/ |
381 |
--const uint SDL_INIT_TIMER = 0x00000001; |
382 |
--const uint SDL_INIT_AUDIO = 0x00000010; |
383 |
--const uint SDL_INIT_VIDEO = 0x00000020; |
384 |
--const uint SDL_INIT_CDROM = 0x00000100; |
385 |
--const uint SDL_INIT_JOYSTICK = 0x00000200; |
386 |
--const uint SDL_INIT_NOPARACHUTE = 0x00100000; /* Don't catch fatal signals */ |
387 |
--const uint SDL_INIT_EVENTTHREAD = 0x01000000; /* Not supported on all OS's */ |
388 |
--const uint SDL_INIT_EVERYTHING = 0x0000FFFF; |
389 |
-- |
390 |
--/* This function loads the SDL dynamically linked library and initializes |
391 |
-- * the subsystems specified by 'flags' (and those satisfying dependencies) |
392 |
-- * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup |
393 |
-- * signal handlers for some commonly ignored fatal signals (like SIGSEGV) |
394 |
-- */ |
395 |
--int SDL_Init(Uint32 flags); |
396 |
-- |
397 |
--/* This function initializes specific SDL subsystems */ |
398 |
--int SDL_InitSubSystem(Uint32 flags); |
399 |
-- |
400 |
--/* This function cleans up specific SDL subsystems */ |
401 |
--void SDL_QuitSubSystem(Uint32 flags); |
402 |
-- |
403 |
--/* This function returns mask of the specified subsystems which have |
404 |
-- been initialized. |
405 |
-- If 'flags' is 0, it returns a mask of all initialized subsystems. |
406 |
--*/ |
407 |
--Uint32 SDL_WasInit(Uint32 flags); |
408 |
-- |
409 |
--/* This function cleans up all initialized subsystems and unloads the |
410 |
-- * dynamically linked library. You should call it upon all exit conditions. |
411 |
-- */ |
412 |
--void SDL_Quit(); |
413 |
-- |
414 |
--void SDL_SetModuleHandle(void *hInst); |
415 |
--//extern(Windows) void* GetModuleHandle(char*); |
416 |
--extern(Windows) void* GetModuleHandleA(char*); |
417 |
-- |
418 |
--static this() |
419 |
--{ |
420 |
-- /* Load SDL dynamic link library */ |
421 |
-- if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0) |
422 |
-- throw new Error("Error loading SDL"); |
423 |
--// SDL_SetModuleHandle(GetModuleHandle(null)); |
424 |
-- SDL_SetModuleHandle(GetModuleHandleA(null)); |
425 |
--} |
426 |
-- |
427 |
--static ~this() |
428 |
--{ |
429 |
-- SDL_Quit(); |
430 |
--} |
431 |
-+extern(C): |
432 |
-+ |
433 |
-+/* As of version 0.5, SDL is loaded dynamically into the application */ |
434 |
-+ |
435 |
-+/* These are the flags which may be passed to SDL_Init() -- you should |
436 |
-+ specify the subsystems which you will be using in your application. |
437 |
-+*/ |
438 |
-+const uint SDL_INIT_TIMER = 0x00000001; |
439 |
-+const uint SDL_INIT_AUDIO = 0x00000010; |
440 |
-+const uint SDL_INIT_VIDEO = 0x00000020; |
441 |
-+const uint SDL_INIT_CDROM = 0x00000100; |
442 |
-+const uint SDL_INIT_JOYSTICK = 0x00000200; |
443 |
-+const uint SDL_INIT_NOPARACHUTE = 0x00100000; /* Don't catch fatal signals */ |
444 |
-+const uint SDL_INIT_EVENTTHREAD = 0x01000000; /* Not supported on all OS's */ |
445 |
-+const uint SDL_INIT_EVERYTHING = 0x0000FFFF; |
446 |
-+ |
447 |
-+/* This function loads the SDL dynamically linked library and initializes |
448 |
-+ * the subsystems specified by 'flags' (and those satisfying dependencies) |
449 |
-+ * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup |
450 |
-+ * signal handlers for some commonly ignored fatal signals (like SIGSEGV) |
451 |
-+ */ |
452 |
-+int SDL_Init(Uint32 flags); |
453 |
-+ |
454 |
-+/* This function initializes specific SDL subsystems */ |
455 |
-+int SDL_InitSubSystem(Uint32 flags); |
456 |
-+ |
457 |
-+/* This function cleans up specific SDL subsystems */ |
458 |
-+void SDL_QuitSubSystem(Uint32 flags); |
459 |
-+ |
460 |
-+/* This function returns mask of the specified subsystems which have |
461 |
-+ been initialized. |
462 |
-+ If 'flags' is 0, it returns a mask of all initialized subsystems. |
463 |
-+*/ |
464 |
-+Uint32 SDL_WasInit(Uint32 flags); |
465 |
-+ |
466 |
-+/* This function cleans up all initialized subsystems and unloads the |
467 |
-+ * dynamically linked library. You should call it upon all exit conditions. |
468 |
-+ */ |
469 |
-+void SDL_Quit(); |
470 |
-+ |
471 |
-+/+ |
472 |
-+void SDL_SetModuleHandle(void *hInst); |
473 |
-+extern(Windows) void* GetModuleHandle(char*); |
474 |
-+ |
475 |
-+static this() |
476 |
-+{ |
477 |
-+ /* Load SDL dynamic link library */ |
478 |
-+ if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0) |
479 |
-+ throw new Error("Error loading SDL"); |
480 |
-+ SDL_SetModuleHandle(GetModuleHandle(null)); |
481 |
-+} |
482 |
-+ |
483 |
-+static ~this() |
484 |
-+{ |
485 |
-+ SDL_Quit(); |
486 |
-+} |
487 |
-++/ |
488 |
-diff -Naur a2k_src/import/SDL_endian.d a2k_src/import/SDL_endian.d |
489 |
---- a2k_src/import/SDL_endian.d 2006-09-14 01:57:50.000000000 +0200 |
490 |
-+++ a2k_src/import/SDL_endian.d 2009-08-27 15:18:28.000000000 +0200 |
491 |
-@@ -34,9 +34,9 @@ |
492 |
- and other data sources. |
493 |
- */ |
494 |
- |
495 |
--public import SDL_types; |
496 |
--public import SDL_rwops; |
497 |
--public import SDL_byteorder; |
498 |
-+import SDL_types; |
499 |
-+import SDL_rwops; |
500 |
-+import SDL_byteorder; |
501 |
- |
502 |
- extern(C): |
503 |
- |
504 |
-@@ -47,7 +47,7 @@ |
505 |
- */ |
506 |
- |
507 |
- Uint16 SDL_Swap16(Uint16 D) { |
508 |
-- return cast(Uint16)((D<<8)|(D>>8)); |
509 |
-+ return((D<<8)|(D>>8)); |
510 |
- } |
511 |
- |
512 |
- Uint32 SDL_Swap32(Uint32 D) { |
513 |
-diff -Naur a2k_src/import/SDL_events.d a2k_src/import/SDL_events.d |
514 |
---- a2k_src/import/SDL_events.d 2006-07-26 23:25:46.000000000 +0200 |
515 |
-+++ a2k_src/import/SDL_events.d 2009-08-27 15:18:28.000000000 +0200 |
516 |
-@@ -22,12 +22,12 @@ |
517 |
- |
518 |
- /* Include file for SDL event handling */ |
519 |
- |
520 |
--public import SDL_types; |
521 |
--public import SDL_active; |
522 |
--public import SDL_keyboard; |
523 |
--public import SDL_mouse; |
524 |
--public import SDL_joystick; |
525 |
--public import SDL_syswm; |
526 |
-+import SDL_types; |
527 |
-+import SDL_active; |
528 |
-+import SDL_keyboard; |
529 |
-+import SDL_mouse; |
530 |
-+import SDL_joystick; |
531 |
-+import SDL_syswm; |
532 |
- |
533 |
- extern(C): |
534 |
- |
535 |
-@@ -304,7 +304,7 @@ |
536 |
- If 'state' is set to SDL_QUERY, SDL_EventState() will return the |
537 |
- current processing state of the specified event. |
538 |
- */ |
539 |
--const int SDL_QUERY = -1; |
540 |
-+const uint SDL_QUERY = -1; |
541 |
- const uint SDL_IGNORE = 0; |
542 |
- const uint SDL_DISABLE = 0; |
543 |
- const uint SDL_ENABLE = 1; |
544 |
-diff -Naur a2k_src/import/SDL_image.d a2k_src/import/SDL_image.d |
545 |
---- a2k_src/import/SDL_image.d 2006-07-26 23:24:58.000000000 +0200 |
546 |
-+++ a2k_src/import/SDL_image.d 2009-08-27 15:18:28.000000000 +0200 |
547 |
-@@ -26,7 +26,7 @@ |
548 |
- |
549 |
- /* A simple library to load images of various formats as SDL surfaces */ |
550 |
- |
551 |
--public import SDL; |
552 |
-+import SDL; |
553 |
- |
554 |
- extern (C) { |
555 |
- |
556 |
-diff -Naur a2k_src/import/SDL_joystick.d a2k_src/import/SDL_joystick.d |
557 |
---- a2k_src/import/SDL_joystick.d 2006-07-26 23:25:10.000000000 +0200 |
558 |
-+++ a2k_src/import/SDL_joystick.d 2009-08-27 15:18:28.000000000 +0200 |
559 |
-@@ -22,7 +22,7 @@ |
560 |
- |
561 |
- /* Include file for SDL joystick event handling */ |
562 |
- |
563 |
--public import SDL_types; |
564 |
-+import SDL_types; |
565 |
- |
566 |
- extern(C): |
567 |
- |
568 |
-diff -Naur a2k_src/import/SDL_keyboard.d a2k_src/import/SDL_keyboard.d |
569 |
---- a2k_src/import/SDL_keyboard.d 2006-07-26 23:25:14.000000000 +0200 |
570 |
-+++ a2k_src/import/SDL_keyboard.d 2009-08-27 15:18:28.000000000 +0200 |
571 |
-@@ -22,11 +22,11 @@ |
572 |
- |
573 |
- /* Include file for SDL keyboard event handling */ |
574 |
- |
575 |
--public import SDL_types; |
576 |
-+import SDL_types; |
577 |
- // !!! A hack! struct SDL_keysym is defined in this module, |
578 |
- // !!! so we need to resolve the nameclash... |
579 |
- // !!! Definitely won't work on *NIX but for now will do. |
580 |
--public import SDL_Keysym; |
581 |
-+import SDL_Keysym; |
582 |
- |
583 |
- extern(C): |
584 |
- |
585 |
-diff -Naur a2k_src/import/SDL_keysym.d a2k_src/import/SDL_keysym.d |
586 |
---- a2k_src/import/SDL_keysym.d 2002-01-04 23:31:22.000000000 +0100 |
587 |
-+++ a2k_src/import/SDL_keysym.d 1970-01-01 01:00:00.000000000 +0100 |
588 |
-@@ -1,308 +0,0 @@ |
589 |
--/* |
590 |
-- SDL - Simple DirectMedia Layer |
591 |
-- Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga |
592 |
-- |
593 |
-- This library is free software; you can redistribute it and/or |
594 |
-- modify it under the terms of the GNU Library General Public |
595 |
-- License as published by the Free Software Foundation; either |
596 |
-- version 2 of the License, or (at your option) any later version. |
597 |
-- |
598 |
-- This library is distributed in the hope that it will be useful, |
599 |
-- but WITHOUT ANY WARRANTY; without even the implied warranty of |
600 |
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
601 |
-- Library General Public License for more details. |
602 |
-- |
603 |
-- You should have received a copy of the GNU Library General Public |
604 |
-- License along with this library; if not, write to the Free |
605 |
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
606 |
-- |
607 |
-- Sam Lantinga |
608 |
-- slouken@××××××××××.com |
609 |
--*/ |
610 |
-- |
611 |
--/* What we really want is a mapping of every raw key on the keyboard. |
612 |
-- To support international keyboards, we use the range 0xA1 - 0xFF |
613 |
-- as international virtual keycodes. We'll follow in the footsteps of X11... |
614 |
-- The names of the keys |
615 |
-- */ |
616 |
-- |
617 |
--alias int SDLKey; |
618 |
--enum { |
619 |
-- /* The keyboard syms have been cleverly chosen to map to ASCII */ |
620 |
-- SDLK_UNKNOWN = 0, |
621 |
-- SDLK_FIRST = 0, |
622 |
-- SDLK_BACKSPACE = 8, |
623 |
-- SDLK_TAB = 9, |
624 |
-- SDLK_CLEAR = 12, |
625 |
-- SDLK_RETURN = 13, |
626 |
-- SDLK_PAUSE = 19, |
627 |
-- SDLK_ESCAPE = 27, |
628 |
-- SDLK_SPACE = 32, |
629 |
-- SDLK_EXCLAIM = 33, |
630 |
-- SDLK_QUOTEDBL = 34, |
631 |
-- SDLK_HASH = 35, |
632 |
-- SDLK_DOLLAR = 36, |
633 |
-- SDLK_AMPERSAND = 38, |
634 |
-- SDLK_QUOTE = 39, |
635 |
-- SDLK_LEFTPAREN = 40, |
636 |
-- SDLK_RIGHTPAREN = 41, |
637 |
-- SDLK_ASTERISK = 42, |
638 |
-- SDLK_PLUS = 43, |
639 |
-- SDLK_COMMA = 44, |
640 |
-- SDLK_MINUS = 45, |
641 |
-- SDLK_PERIOD = 46, |
642 |
-- SDLK_SLASH = 47, |
643 |
-- SDLK_0 = 48, |
644 |
-- SDLK_1 = 49, |
645 |
-- SDLK_2 = 50, |
646 |
-- SDLK_3 = 51, |
647 |
-- SDLK_4 = 52, |
648 |
-- SDLK_5 = 53, |
649 |
-- SDLK_6 = 54, |
650 |
-- SDLK_7 = 55, |
651 |
-- SDLK_8 = 56, |
652 |
-- SDLK_9 = 57, |
653 |
-- SDLK_COLON = 58, |
654 |
-- SDLK_SEMICOLON = 59, |
655 |
-- SDLK_LESS = 60, |
656 |
-- SDLK_EQUALS = 61, |
657 |
-- SDLK_GREATER = 62, |
658 |
-- SDLK_QUESTION = 63, |
659 |
-- SDLK_AT = 64, |
660 |
-- /* |
661 |
-- Skip uppercase letters |
662 |
-- */ |
663 |
-- SDLK_LEFTBRACKET = 91, |
664 |
-- SDLK_BACKSLASH = 92, |
665 |
-- SDLK_RIGHTBRACKET = 93, |
666 |
-- SDLK_CARET = 94, |
667 |
-- SDLK_UNDERSCORE = 95, |
668 |
-- SDLK_BACKQUOTE = 96, |
669 |
-- SDLK_a = 97, |
670 |
-- SDLK_b = 98, |
671 |
-- SDLK_c = 99, |
672 |
-- SDLK_d = 100, |
673 |
-- SDLK_e = 101, |
674 |
-- SDLK_f = 102, |
675 |
-- SDLK_g = 103, |
676 |
-- SDLK_h = 104, |
677 |
-- SDLK_i = 105, |
678 |
-- SDLK_j = 106, |
679 |
-- SDLK_k = 107, |
680 |
-- SDLK_l = 108, |
681 |
-- SDLK_m = 109, |
682 |
-- SDLK_n = 110, |
683 |
-- SDLK_o = 111, |
684 |
-- SDLK_p = 112, |
685 |
-- SDLK_q = 113, |
686 |
-- SDLK_r = 114, |
687 |
-- SDLK_s = 115, |
688 |
-- SDLK_t = 116, |
689 |
-- SDLK_u = 117, |
690 |
-- SDLK_v = 118, |
691 |
-- SDLK_w = 119, |
692 |
-- SDLK_x = 120, |
693 |
-- SDLK_y = 121, |
694 |
-- SDLK_z = 122, |
695 |
-- SDLK_DELETE = 127, |
696 |
-- /* End of ASCII mapped keysyms */ |
697 |
-- |
698 |
-- /* International keyboard syms */ |
699 |
-- SDLK_WORLD_0 = 160, /* 0xA0 */ |
700 |
-- SDLK_WORLD_1 = 161, |
701 |
-- SDLK_WORLD_2 = 162, |
702 |
-- SDLK_WORLD_3 = 163, |
703 |
-- SDLK_WORLD_4 = 164, |
704 |
-- SDLK_WORLD_5 = 165, |
705 |
-- SDLK_WORLD_6 = 166, |
706 |
-- SDLK_WORLD_7 = 167, |
707 |
-- SDLK_WORLD_8 = 168, |
708 |
-- SDLK_WORLD_9 = 169, |
709 |
-- SDLK_WORLD_10 = 170, |
710 |
-- SDLK_WORLD_11 = 171, |
711 |
-- SDLK_WORLD_12 = 172, |
712 |
-- SDLK_WORLD_13 = 173, |
713 |
-- SDLK_WORLD_14 = 174, |
714 |
-- SDLK_WORLD_15 = 175, |
715 |
-- SDLK_WORLD_16 = 176, |
716 |
-- SDLK_WORLD_17 = 177, |
717 |
-- SDLK_WORLD_18 = 178, |
718 |
-- SDLK_WORLD_19 = 179, |
719 |
-- SDLK_WORLD_20 = 180, |
720 |
-- SDLK_WORLD_21 = 181, |
721 |
-- SDLK_WORLD_22 = 182, |
722 |
-- SDLK_WORLD_23 = 183, |
723 |
-- SDLK_WORLD_24 = 184, |
724 |
-- SDLK_WORLD_25 = 185, |
725 |
-- SDLK_WORLD_26 = 186, |
726 |
-- SDLK_WORLD_27 = 187, |
727 |
-- SDLK_WORLD_28 = 188, |
728 |
-- SDLK_WORLD_29 = 189, |
729 |
-- SDLK_WORLD_30 = 190, |
730 |
-- SDLK_WORLD_31 = 191, |
731 |
-- SDLK_WORLD_32 = 192, |
732 |
-- SDLK_WORLD_33 = 193, |
733 |
-- SDLK_WORLD_34 = 194, |
734 |
-- SDLK_WORLD_35 = 195, |
735 |
-- SDLK_WORLD_36 = 196, |
736 |
-- SDLK_WORLD_37 = 197, |
737 |
-- SDLK_WORLD_38 = 198, |
738 |
-- SDLK_WORLD_39 = 199, |
739 |
-- SDLK_WORLD_40 = 200, |
740 |
-- SDLK_WORLD_41 = 201, |
741 |
-- SDLK_WORLD_42 = 202, |
742 |
-- SDLK_WORLD_43 = 203, |
743 |
-- SDLK_WORLD_44 = 204, |
744 |
-- SDLK_WORLD_45 = 205, |
745 |
-- SDLK_WORLD_46 = 206, |
746 |
-- SDLK_WORLD_47 = 207, |
747 |
-- SDLK_WORLD_48 = 208, |
748 |
-- SDLK_WORLD_49 = 209, |
749 |
-- SDLK_WORLD_50 = 210, |
750 |
-- SDLK_WORLD_51 = 211, |
751 |
-- SDLK_WORLD_52 = 212, |
752 |
-- SDLK_WORLD_53 = 213, |
753 |
-- SDLK_WORLD_54 = 214, |
754 |
-- SDLK_WORLD_55 = 215, |
755 |
-- SDLK_WORLD_56 = 216, |
756 |
-- SDLK_WORLD_57 = 217, |
757 |
-- SDLK_WORLD_58 = 218, |
758 |
-- SDLK_WORLD_59 = 219, |
759 |
-- SDLK_WORLD_60 = 220, |
760 |
-- SDLK_WORLD_61 = 221, |
761 |
-- SDLK_WORLD_62 = 222, |
762 |
-- SDLK_WORLD_63 = 223, |
763 |
-- SDLK_WORLD_64 = 224, |
764 |
-- SDLK_WORLD_65 = 225, |
765 |
-- SDLK_WORLD_66 = 226, |
766 |
-- SDLK_WORLD_67 = 227, |
767 |
-- SDLK_WORLD_68 = 228, |
768 |
-- SDLK_WORLD_69 = 229, |
769 |
-- SDLK_WORLD_70 = 230, |
770 |
-- SDLK_WORLD_71 = 231, |
771 |
-- SDLK_WORLD_72 = 232, |
772 |
-- SDLK_WORLD_73 = 233, |
773 |
-- SDLK_WORLD_74 = 234, |
774 |
-- SDLK_WORLD_75 = 235, |
775 |
-- SDLK_WORLD_76 = 236, |
776 |
-- SDLK_WORLD_77 = 237, |
777 |
-- SDLK_WORLD_78 = 238, |
778 |
-- SDLK_WORLD_79 = 239, |
779 |
-- SDLK_WORLD_80 = 240, |
780 |
-- SDLK_WORLD_81 = 241, |
781 |
-- SDLK_WORLD_82 = 242, |
782 |
-- SDLK_WORLD_83 = 243, |
783 |
-- SDLK_WORLD_84 = 244, |
784 |
-- SDLK_WORLD_85 = 245, |
785 |
-- SDLK_WORLD_86 = 246, |
786 |
-- SDLK_WORLD_87 = 247, |
787 |
-- SDLK_WORLD_88 = 248, |
788 |
-- SDLK_WORLD_89 = 249, |
789 |
-- SDLK_WORLD_90 = 250, |
790 |
-- SDLK_WORLD_91 = 251, |
791 |
-- SDLK_WORLD_92 = 252, |
792 |
-- SDLK_WORLD_93 = 253, |
793 |
-- SDLK_WORLD_94 = 254, |
794 |
-- SDLK_WORLD_95 = 255, /* 0xFF */ |
795 |
-- |
796 |
-- /* Numeric keypad */ |
797 |
-- SDLK_KP0 = 256, |
798 |
-- SDLK_KP1 = 257, |
799 |
-- SDLK_KP2 = 258, |
800 |
-- SDLK_KP3 = 259, |
801 |
-- SDLK_KP4 = 260, |
802 |
-- SDLK_KP5 = 261, |
803 |
-- SDLK_KP6 = 262, |
804 |
-- SDLK_KP7 = 263, |
805 |
-- SDLK_KP8 = 264, |
806 |
-- SDLK_KP9 = 265, |
807 |
-- SDLK_KP_PERIOD = 266, |
808 |
-- SDLK_KP_DIVIDE = 267, |
809 |
-- SDLK_KP_MULTIPLY = 268, |
810 |
-- SDLK_KP_MINUS = 269, |
811 |
-- SDLK_KP_PLUS = 270, |
812 |
-- SDLK_KP_ENTER = 271, |
813 |
-- SDLK_KP_EQUALS = 272, |
814 |
-- |
815 |
-- /* Arrows + Home/End pad */ |
816 |
-- SDLK_UP = 273, |
817 |
-- SDLK_DOWN = 274, |
818 |
-- SDLK_RIGHT = 275, |
819 |
-- SDLK_LEFT = 276, |
820 |
-- SDLK_INSERT = 277, |
821 |
-- SDLK_HOME = 278, |
822 |
-- SDLK_END = 279, |
823 |
-- SDLK_PAGEUP = 280, |
824 |
-- SDLK_PAGEDOWN = 281, |
825 |
-- |
826 |
-- /* Function keys */ |
827 |
-- SDLK_F1 = 282, |
828 |
-- SDLK_F2 = 283, |
829 |
-- SDLK_F3 = 284, |
830 |
-- SDLK_F4 = 285, |
831 |
-- SDLK_F5 = 286, |
832 |
-- SDLK_F6 = 287, |
833 |
-- SDLK_F7 = 288, |
834 |
-- SDLK_F8 = 289, |
835 |
-- SDLK_F9 = 290, |
836 |
-- SDLK_F10 = 291, |
837 |
-- SDLK_F11 = 292, |
838 |
-- SDLK_F12 = 293, |
839 |
-- SDLK_F13 = 294, |
840 |
-- SDLK_F14 = 295, |
841 |
-- SDLK_F15 = 296, |
842 |
-- |
843 |
-- /* Key state modifier keys */ |
844 |
-- SDLK_NUMLOCK = 300, |
845 |
-- SDLK_CAPSLOCK = 301, |
846 |
-- SDLK_SCROLLOCK = 302, |
847 |
-- SDLK_RSHIFT = 303, |
848 |
-- SDLK_LSHIFT = 304, |
849 |
-- SDLK_RCTRL = 305, |
850 |
-- SDLK_LCTRL = 306, |
851 |
-- SDLK_RALT = 307, |
852 |
-- SDLK_LALT = 308, |
853 |
-- SDLK_RMETA = 309, |
854 |
-- SDLK_LMETA = 310, |
855 |
-- SDLK_LSUPER = 311, /* Left "Windows" key */ |
856 |
-- SDLK_RSUPER = 312, /* Right "Windows" key */ |
857 |
-- SDLK_MODE = 313, /* "Alt Gr" key */ |
858 |
-- SDLK_COMPOSE = 314, /* Multi-key compose key */ |
859 |
-- |
860 |
-- /* Miscellaneous function keys */ |
861 |
-- SDLK_HELP = 315, |
862 |
-- SDLK_PRINT = 316, |
863 |
-- SDLK_SYSREQ = 317, |
864 |
-- SDLK_BREAK = 318, |
865 |
-- SDLK_MENU = 319, |
866 |
-- SDLK_POWER = 320, /* Power Macintosh power key */ |
867 |
-- SDLK_EURO = 321, /* Some european keyboards */ |
868 |
-- SDLK_UNDO = 322, /* Atari keyboard has Undo */ |
869 |
-- |
870 |
-- /* Add any other keys here */ |
871 |
-- |
872 |
-- SDLK_LAST |
873 |
--} |
874 |
-- |
875 |
--/* Enumeration of valid key mods (possibly OR'd together) */ |
876 |
--alias int SDLMod; |
877 |
--enum { |
878 |
-- KMOD_NONE = 0x0000, |
879 |
-- KMOD_LSHIFT= 0x0001, |
880 |
-- KMOD_RSHIFT= 0x0002, |
881 |
-- KMOD_LCTRL = 0x0040, |
882 |
-- KMOD_RCTRL = 0x0080, |
883 |
-- KMOD_LALT = 0x0100, |
884 |
-- KMOD_RALT = 0x0200, |
885 |
-- KMOD_LMETA = 0x0400, |
886 |
-- KMOD_RMETA = 0x0800, |
887 |
-- KMOD_NUM = 0x1000, |
888 |
-- KMOD_CAPS = 0x2000, |
889 |
-- KMOD_MODE = 0x4000, |
890 |
-- KMOD_RESERVED = 0x8000 |
891 |
--} |
892 |
-- |
893 |
--const uint KMOD_CTRL = (KMOD_LCTRL|KMOD_RCTRL); |
894 |
--const uint KMOD_SHIFT = (KMOD_LSHIFT|KMOD_RSHIFT); |
895 |
--const uint KMOD_ALT = (KMOD_LALT|KMOD_RALT); |
896 |
--const uint KMOD_META = (KMOD_LMETA|KMOD_RMETA); |
897 |
-diff -Naur a2k_src/import/SDL_Keysym.d a2k_src/import/SDL_Keysym.d |
898 |
---- a2k_src/import/SDL_Keysym.d 1970-01-01 01:00:00.000000000 +0100 |
899 |
-+++ a2k_src/import/SDL_Keysym.d 2009-08-27 15:18:28.000000000 +0200 |
900 |
-@@ -0,0 +1,308 @@ |
901 |
-+/* |
902 |
-+ SDL - Simple DirectMedia Layer |
903 |
-+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga |
904 |
-+ |
905 |
-+ This library is free software; you can redistribute it and/or |
906 |
-+ modify it under the terms of the GNU Library General Public |
907 |
-+ License as published by the Free Software Foundation; either |
908 |
-+ version 2 of the License, or (at your option) any later version. |
909 |
-+ |
910 |
-+ This library is distributed in the hope that it will be useful, |
911 |
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
912 |
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
913 |
-+ Library General Public License for more details. |
914 |
-+ |
915 |
-+ You should have received a copy of the GNU Library General Public |
916 |
-+ License along with this library; if not, write to the Free |
917 |
-+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
918 |
-+ |
919 |
-+ Sam Lantinga |
920 |
-+ slouken@××××××××××.com |
921 |
-+*/ |
922 |
-+ |
923 |
-+/* What we really want is a mapping of every raw key on the keyboard. |
924 |
-+ To support international keyboards, we use the range 0xA1 - 0xFF |
925 |
-+ as international virtual keycodes. We'll follow in the footsteps of X11... |
926 |
-+ The names of the keys |
927 |
-+ */ |
928 |
-+ |
929 |
-+alias int SDLKey; |
930 |
-+enum { |
931 |
-+ /* The keyboard syms have been cleverly chosen to map to ASCII */ |
932 |
-+ SDLK_UNKNOWN = 0, |
933 |
-+ SDLK_FIRST = 0, |
934 |
-+ SDLK_BACKSPACE = 8, |
935 |
-+ SDLK_TAB = 9, |
936 |
-+ SDLK_CLEAR = 12, |
937 |
-+ SDLK_RETURN = 13, |
938 |
-+ SDLK_PAUSE = 19, |
939 |
-+ SDLK_ESCAPE = 27, |
940 |
-+ SDLK_SPACE = 32, |
941 |
-+ SDLK_EXCLAIM = 33, |
942 |
-+ SDLK_QUOTEDBL = 34, |
943 |
-+ SDLK_HASH = 35, |
944 |
-+ SDLK_DOLLAR = 36, |
945 |
-+ SDLK_AMPERSAND = 38, |
946 |
-+ SDLK_QUOTE = 39, |
947 |
-+ SDLK_LEFTPAREN = 40, |
948 |
-+ SDLK_RIGHTPAREN = 41, |
949 |
-+ SDLK_ASTERISK = 42, |
950 |
-+ SDLK_PLUS = 43, |
951 |
-+ SDLK_COMMA = 44, |
952 |
-+ SDLK_MINUS = 45, |
953 |
-+ SDLK_PERIOD = 46, |
954 |
-+ SDLK_SLASH = 47, |
955 |
-+ SDLK_0 = 48, |
956 |
-+ SDLK_1 = 49, |
957 |
-+ SDLK_2 = 50, |
958 |
-+ SDLK_3 = 51, |
959 |
-+ SDLK_4 = 52, |
960 |
-+ SDLK_5 = 53, |
961 |
-+ SDLK_6 = 54, |
962 |
-+ SDLK_7 = 55, |
963 |
-+ SDLK_8 = 56, |
964 |
-+ SDLK_9 = 57, |
965 |
-+ SDLK_COLON = 58, |
966 |
-+ SDLK_SEMICOLON = 59, |
967 |
-+ SDLK_LESS = 60, |
968 |
-+ SDLK_EQUALS = 61, |
969 |
-+ SDLK_GREATER = 62, |
970 |
-+ SDLK_QUESTION = 63, |
971 |
-+ SDLK_AT = 64, |
972 |
-+ /* |
973 |
-+ Skip uppercase letters |
974 |
-+ */ |
975 |
-+ SDLK_LEFTBRACKET = 91, |
976 |
-+ SDLK_BACKSLASH = 92, |
977 |
-+ SDLK_RIGHTBRACKET = 93, |
978 |
-+ SDLK_CARET = 94, |
979 |
-+ SDLK_UNDERSCORE = 95, |
980 |
-+ SDLK_BACKQUOTE = 96, |
981 |
-+ SDLK_a = 97, |
982 |
-+ SDLK_b = 98, |
983 |
-+ SDLK_c = 99, |
984 |
-+ SDLK_d = 100, |
985 |
-+ SDLK_e = 101, |
986 |
-+ SDLK_f = 102, |
987 |
-+ SDLK_g = 103, |
988 |
-+ SDLK_h = 104, |
989 |
-+ SDLK_i = 105, |
990 |
-+ SDLK_j = 106, |
991 |
-+ SDLK_k = 107, |
992 |
-+ SDLK_l = 108, |
993 |
-+ SDLK_m = 109, |
994 |
-+ SDLK_n = 110, |
995 |
-+ SDLK_o = 111, |
996 |
-+ SDLK_p = 112, |
997 |
-+ SDLK_q = 113, |
998 |
-+ SDLK_r = 114, |
999 |
-+ SDLK_s = 115, |
1000 |
-+ SDLK_t = 116, |
1001 |
-+ SDLK_u = 117, |
1002 |
-+ SDLK_v = 118, |
1003 |
-+ SDLK_w = 119, |
1004 |
-+ SDLK_x = 120, |
1005 |
-+ SDLK_y = 121, |
1006 |
-+ SDLK_z = 122, |
1007 |
-+ SDLK_DELETE = 127, |
1008 |
-+ /* End of ASCII mapped keysyms */ |
1009 |
-+ |
1010 |
-+ /* International keyboard syms */ |
1011 |
-+ SDLK_WORLD_0 = 160, /* 0xA0 */ |
1012 |
-+ SDLK_WORLD_1 = 161, |
1013 |
-+ SDLK_WORLD_2 = 162, |
1014 |
-+ SDLK_WORLD_3 = 163, |
1015 |
-+ SDLK_WORLD_4 = 164, |
1016 |
-+ SDLK_WORLD_5 = 165, |
1017 |
-+ SDLK_WORLD_6 = 166, |
1018 |
-+ SDLK_WORLD_7 = 167, |
1019 |
-+ SDLK_WORLD_8 = 168, |
1020 |
-+ SDLK_WORLD_9 = 169, |
1021 |
-+ SDLK_WORLD_10 = 170, |
1022 |
-+ SDLK_WORLD_11 = 171, |
1023 |
-+ SDLK_WORLD_12 = 172, |
1024 |
-+ SDLK_WORLD_13 = 173, |
1025 |
-+ SDLK_WORLD_14 = 174, |
1026 |
-+ SDLK_WORLD_15 = 175, |
1027 |
-+ SDLK_WORLD_16 = 176, |
1028 |
-+ SDLK_WORLD_17 = 177, |
1029 |
-+ SDLK_WORLD_18 = 178, |
1030 |
-+ SDLK_WORLD_19 = 179, |
1031 |
-+ SDLK_WORLD_20 = 180, |
1032 |
-+ SDLK_WORLD_21 = 181, |
1033 |
-+ SDLK_WORLD_22 = 182, |
1034 |
-+ SDLK_WORLD_23 = 183, |
1035 |
-+ SDLK_WORLD_24 = 184, |
1036 |
-+ SDLK_WORLD_25 = 185, |
1037 |
-+ SDLK_WORLD_26 = 186, |
1038 |
-+ SDLK_WORLD_27 = 187, |
1039 |
-+ SDLK_WORLD_28 = 188, |
1040 |
-+ SDLK_WORLD_29 = 189, |
1041 |
-+ SDLK_WORLD_30 = 190, |
1042 |
-+ SDLK_WORLD_31 = 191, |
1043 |
-+ SDLK_WORLD_32 = 192, |
1044 |
-+ SDLK_WORLD_33 = 193, |
1045 |
-+ SDLK_WORLD_34 = 194, |
1046 |
-+ SDLK_WORLD_35 = 195, |
1047 |
-+ SDLK_WORLD_36 = 196, |
1048 |
-+ SDLK_WORLD_37 = 197, |
1049 |
-+ SDLK_WORLD_38 = 198, |
1050 |
-+ SDLK_WORLD_39 = 199, |
1051 |
-+ SDLK_WORLD_40 = 200, |
1052 |
-+ SDLK_WORLD_41 = 201, |
1053 |
-+ SDLK_WORLD_42 = 202, |
1054 |
-+ SDLK_WORLD_43 = 203, |
1055 |
-+ SDLK_WORLD_44 = 204, |
1056 |
-+ SDLK_WORLD_45 = 205, |
1057 |
-+ SDLK_WORLD_46 = 206, |
1058 |
-+ SDLK_WORLD_47 = 207, |
1059 |
-+ SDLK_WORLD_48 = 208, |
1060 |
-+ SDLK_WORLD_49 = 209, |
1061 |
-+ SDLK_WORLD_50 = 210, |
1062 |
-+ SDLK_WORLD_51 = 211, |
1063 |
-+ SDLK_WORLD_52 = 212, |
1064 |
-+ SDLK_WORLD_53 = 213, |
1065 |
-+ SDLK_WORLD_54 = 214, |
1066 |
-+ SDLK_WORLD_55 = 215, |
1067 |
-+ SDLK_WORLD_56 = 216, |
1068 |
-+ SDLK_WORLD_57 = 217, |
1069 |
-+ SDLK_WORLD_58 = 218, |
1070 |
-+ SDLK_WORLD_59 = 219, |
1071 |
-+ SDLK_WORLD_60 = 220, |
1072 |
-+ SDLK_WORLD_61 = 221, |
1073 |
-+ SDLK_WORLD_62 = 222, |
1074 |
-+ SDLK_WORLD_63 = 223, |
1075 |
-+ SDLK_WORLD_64 = 224, |
1076 |
-+ SDLK_WORLD_65 = 225, |
1077 |
-+ SDLK_WORLD_66 = 226, |
1078 |
-+ SDLK_WORLD_67 = 227, |
1079 |
-+ SDLK_WORLD_68 = 228, |
1080 |
-+ SDLK_WORLD_69 = 229, |
1081 |
-+ SDLK_WORLD_70 = 230, |
1082 |
-+ SDLK_WORLD_71 = 231, |
1083 |
-+ SDLK_WORLD_72 = 232, |
1084 |
-+ SDLK_WORLD_73 = 233, |
1085 |
-+ SDLK_WORLD_74 = 234, |
1086 |
-+ SDLK_WORLD_75 = 235, |
1087 |
-+ SDLK_WORLD_76 = 236, |
1088 |
-+ SDLK_WORLD_77 = 237, |
1089 |
-+ SDLK_WORLD_78 = 238, |
1090 |
-+ SDLK_WORLD_79 = 239, |
1091 |
-+ SDLK_WORLD_80 = 240, |
1092 |
-+ SDLK_WORLD_81 = 241, |
1093 |
-+ SDLK_WORLD_82 = 242, |
1094 |
-+ SDLK_WORLD_83 = 243, |
1095 |
-+ SDLK_WORLD_84 = 244, |
1096 |
-+ SDLK_WORLD_85 = 245, |
1097 |
-+ SDLK_WORLD_86 = 246, |
1098 |
-+ SDLK_WORLD_87 = 247, |
1099 |
-+ SDLK_WORLD_88 = 248, |
1100 |
-+ SDLK_WORLD_89 = 249, |
1101 |
-+ SDLK_WORLD_90 = 250, |
1102 |
-+ SDLK_WORLD_91 = 251, |
1103 |
-+ SDLK_WORLD_92 = 252, |
1104 |
-+ SDLK_WORLD_93 = 253, |
1105 |
-+ SDLK_WORLD_94 = 254, |
1106 |
-+ SDLK_WORLD_95 = 255, /* 0xFF */ |
1107 |
-+ |
1108 |
-+ /* Numeric keypad */ |
1109 |
-+ SDLK_KP0 = 256, |
1110 |
-+ SDLK_KP1 = 257, |
1111 |
-+ SDLK_KP2 = 258, |
1112 |
-+ SDLK_KP3 = 259, |
1113 |
-+ SDLK_KP4 = 260, |
1114 |
-+ SDLK_KP5 = 261, |
1115 |
-+ SDLK_KP6 = 262, |
1116 |
-+ SDLK_KP7 = 263, |
1117 |
-+ SDLK_KP8 = 264, |
1118 |
-+ SDLK_KP9 = 265, |
1119 |
-+ SDLK_KP_PERIOD = 266, |
1120 |
-+ SDLK_KP_DIVIDE = 267, |
1121 |
-+ SDLK_KP_MULTIPLY = 268, |
1122 |
-+ SDLK_KP_MINUS = 269, |
1123 |
-+ SDLK_KP_PLUS = 270, |
1124 |
-+ SDLK_KP_ENTER = 271, |
1125 |
-+ SDLK_KP_EQUALS = 272, |
1126 |
-+ |
1127 |
-+ /* Arrows + Home/End pad */ |
1128 |
-+ SDLK_UP = 273, |
1129 |
-+ SDLK_DOWN = 274, |
1130 |
-+ SDLK_RIGHT = 275, |
1131 |
-+ SDLK_LEFT = 276, |
1132 |
-+ SDLK_INSERT = 277, |
1133 |
-+ SDLK_HOME = 278, |
1134 |
-+ SDLK_END = 279, |
1135 |
-+ SDLK_PAGEUP = 280, |
1136 |
-+ SDLK_PAGEDOWN = 281, |
1137 |
-+ |
1138 |
-+ /* Function keys */ |
1139 |
-+ SDLK_F1 = 282, |
1140 |
-+ SDLK_F2 = 283, |
1141 |
-+ SDLK_F3 = 284, |
1142 |
-+ SDLK_F4 = 285, |
1143 |
-+ SDLK_F5 = 286, |
1144 |
-+ SDLK_F6 = 287, |
1145 |
-+ SDLK_F7 = 288, |
1146 |
-+ SDLK_F8 = 289, |
1147 |
-+ SDLK_F9 = 290, |
1148 |
-+ SDLK_F10 = 291, |
1149 |
-+ SDLK_F11 = 292, |
1150 |
-+ SDLK_F12 = 293, |
1151 |
-+ SDLK_F13 = 294, |
1152 |
-+ SDLK_F14 = 295, |
1153 |
-+ SDLK_F15 = 296, |
1154 |
-+ |
1155 |
-+ /* Key state modifier keys */ |
1156 |
-+ SDLK_NUMLOCK = 300, |
1157 |
-+ SDLK_CAPSLOCK = 301, |
1158 |
-+ SDLK_SCROLLOCK = 302, |
1159 |
-+ SDLK_RSHIFT = 303, |
1160 |
-+ SDLK_LSHIFT = 304, |
1161 |
-+ SDLK_RCTRL = 305, |
1162 |
-+ SDLK_LCTRL = 306, |
1163 |
-+ SDLK_RALT = 307, |
1164 |
-+ SDLK_LALT = 308, |
1165 |
-+ SDLK_RMETA = 309, |
1166 |
-+ SDLK_LMETA = 310, |
1167 |
-+ SDLK_LSUPER = 311, /* Left "Windows" key */ |
1168 |
-+ SDLK_RSUPER = 312, /* Right "Windows" key */ |
1169 |
-+ SDLK_MODE = 313, /* "Alt Gr" key */ |
1170 |
-+ SDLK_COMPOSE = 314, /* Multi-key compose key */ |
1171 |
-+ |
1172 |
-+ /* Miscellaneous function keys */ |
1173 |
-+ SDLK_HELP = 315, |
1174 |
-+ SDLK_PRINT = 316, |
1175 |
-+ SDLK_SYSREQ = 317, |
1176 |
-+ SDLK_BREAK = 318, |
1177 |
-+ SDLK_MENU = 319, |
1178 |
-+ SDLK_POWER = 320, /* Power Macintosh power key */ |
1179 |
-+ SDLK_EURO = 321, /* Some european keyboards */ |
1180 |
-+ SDLK_UNDO = 322, /* Atari keyboard has Undo */ |
1181 |
-+ |
1182 |
-+ /* Add any other keys here */ |
1183 |
-+ |
1184 |
-+ SDLK_LAST |
1185 |
-+} |
1186 |
-+ |
1187 |
-+/* Enumeration of valid key mods (possibly OR'd together) */ |
1188 |
-+alias int SDLMod; |
1189 |
-+enum { |
1190 |
-+ KMOD_NONE = 0x0000, |
1191 |
-+ KMOD_LSHIFT= 0x0001, |
1192 |
-+ KMOD_RSHIFT= 0x0002, |
1193 |
-+ KMOD_LCTRL = 0x0040, |
1194 |
-+ KMOD_RCTRL = 0x0080, |
1195 |
-+ KMOD_LALT = 0x0100, |
1196 |
-+ KMOD_RALT = 0x0200, |
1197 |
-+ KMOD_LMETA = 0x0400, |
1198 |
-+ KMOD_RMETA = 0x0800, |
1199 |
-+ KMOD_NUM = 0x1000, |
1200 |
-+ KMOD_CAPS = 0x2000, |
1201 |
-+ KMOD_MODE = 0x4000, |
1202 |
-+ KMOD_RESERVED = 0x8000 |
1203 |
-+} |
1204 |
-+ |
1205 |
-+const uint KMOD_CTRL = (KMOD_LCTRL|KMOD_RCTRL); |
1206 |
-+const uint KMOD_SHIFT = (KMOD_LSHIFT|KMOD_RSHIFT); |
1207 |
-+const uint KMOD_ALT = (KMOD_LALT|KMOD_RALT); |
1208 |
-+const uint KMOD_META = (KMOD_LMETA|KMOD_RMETA); |
1209 |
-diff -Naur a2k_src/import/SDL_mixer.d a2k_src/import/SDL_mixer.d |
1210 |
---- a2k_src/import/SDL_mixer.d 2006-07-26 23:24:04.000000000 +0200 |
1211 |
-+++ a2k_src/import/SDL_mixer.d 2009-08-27 15:18:28.000000000 +0200 |
1212 |
-@@ -24,7 +24,7 @@ |
1213 |
- |
1214 |
- /* $Id: SDL_mixer.h,v 1.24 2002/05/21 05:45:59 slouken Exp $ */ |
1215 |
- |
1216 |
--public import SDL; |
1217 |
-+import SDL; |
1218 |
- |
1219 |
- extern (C) { |
1220 |
- |
1221 |
-diff -Naur a2k_src/import/SDL_mouse.d a2k_src/import/SDL_mouse.d |
1222 |
---- a2k_src/import/SDL_mouse.d 2006-07-26 23:25:18.000000000 +0200 |
1223 |
-+++ a2k_src/import/SDL_mouse.d 2009-08-27 15:18:28.000000000 +0200 |
1224 |
-@@ -22,8 +22,8 @@ |
1225 |
- |
1226 |
- /* Include file for SDL mouse event handling */ |
1227 |
- |
1228 |
--public import SDL_types; |
1229 |
--public import SDL_video; |
1230 |
-+import SDL_types; |
1231 |
-+import SDL_video; |
1232 |
- |
1233 |
- extern(C): |
1234 |
- |
1235 |
-diff -Naur a2k_src/import/SDL_mutex.d a2k_src/import/SDL_mutex.d |
1236 |
---- a2k_src/import/SDL_mutex.d 2006-07-26 23:25:20.000000000 +0200 |
1237 |
-+++ a2k_src/import/SDL_mutex.d 2009-08-27 15:18:28.000000000 +0200 |
1238 |
-@@ -25,7 +25,7 @@ |
1239 |
- These are independent of the other SDL routines. |
1240 |
- */ |
1241 |
- |
1242 |
--public import SDL_types; |
1243 |
-+import SDL_types; |
1244 |
- |
1245 |
- extern(C): |
1246 |
- |
1247 |
-diff -Naur a2k_src/import/SDL_quit.d a2k_src/import/SDL_quit.d |
1248 |
---- a2k_src/import/SDL_quit.d 2006-07-26 23:25:22.000000000 +0200 |
1249 |
-+++ a2k_src/import/SDL_quit.d 2009-08-27 15:18:28.000000000 +0200 |
1250 |
-@@ -22,7 +22,7 @@ |
1251 |
- |
1252 |
- /* Include file for SDL quit event handling */ |
1253 |
- |
1254 |
--public import SDL_events; |
1255 |
-+import SDL_events; |
1256 |
- |
1257 |
- /* |
1258 |
- An SDL_QUITEVENT is generated when the user tries to close the application |
1259 |
-diff -Naur a2k_src/import/SDL_rwops.d a2k_src/import/SDL_rwops.d |
1260 |
---- a2k_src/import/SDL_rwops.d 2006-07-26 23:25:24.000000000 +0200 |
1261 |
-+++ a2k_src/import/SDL_rwops.d 2009-08-27 15:18:28.000000000 +0200 |
1262 |
-@@ -24,7 +24,7 @@ |
1263 |
- data sources. It can easily be extended to files, memory, etc. |
1264 |
- */ |
1265 |
- |
1266 |
--public import SDL_types; |
1267 |
-+import SDL_types; |
1268 |
- |
1269 |
- extern(C): |
1270 |
- |
1271 |
-diff -Naur a2k_src/import/SDL_sound.d a2k_src/import/SDL_sound.d |
1272 |
---- a2k_src/import/SDL_sound.d 2006-07-26 23:25:26.000000000 +0200 |
1273 |
-+++ a2k_src/import/SDL_sound.d 2009-08-27 15:18:28.000000000 +0200 |
1274 |
-@@ -62,7 +62,7 @@ |
1275 |
- |
1276 |
- // convert to D by shinichiro.h |
1277 |
- |
1278 |
--public import SDL; |
1279 |
-+import SDL; |
1280 |
- |
1281 |
- extern (C) { |
1282 |
- const int SOUND_VER_MAJOR = 1; |
1283 |
-diff -Naur a2k_src/import/SDL_syswm.d a2k_src/import/SDL_syswm.d |
1284 |
---- a2k_src/import/SDL_syswm.d 2006-07-26 23:25:32.000000000 +0200 |
1285 |
-+++ a2k_src/import/SDL_syswm.d 2009-08-27 15:18:28.000000000 +0200 |
1286 |
-@@ -22,7 +22,7 @@ |
1287 |
- |
1288 |
- /* Include file for SDL custom system window manager hooks */ |
1289 |
- |
1290 |
--public import SDL_Version; |
1291 |
-+import SDL_Version; |
1292 |
- |
1293 |
- extern(C): |
1294 |
- |
1295 |
-diff -Naur a2k_src/import/SDL_thread.d a2k_src/import/SDL_thread.d |
1296 |
---- a2k_src/import/SDL_thread.d 2006-07-26 23:25:36.000000000 +0200 |
1297 |
-+++ a2k_src/import/SDL_thread.d 2009-08-27 15:18:28.000000000 +0200 |
1298 |
-@@ -25,8 +25,8 @@ |
1299 |
- These are independent of the other SDL routines. |
1300 |
- */ |
1301 |
- |
1302 |
--public import SDL_types; |
1303 |
--public import SDL_mutex; |
1304 |
-+import SDL_types; |
1305 |
-+import SDL_mutex; |
1306 |
- |
1307 |
- extern(C): |
1308 |
- |
1309 |
-diff -Naur a2k_src/import/SDL_timer.d a2k_src/import/SDL_timer.d |
1310 |
---- a2k_src/import/SDL_timer.d 2006-07-26 23:25:38.000000000 +0200 |
1311 |
-+++ a2k_src/import/SDL_timer.d 2009-08-27 15:18:28.000000000 +0200 |
1312 |
-@@ -20,7 +20,7 @@ |
1313 |
- slouken@××××××××××.com |
1314 |
- */ |
1315 |
- |
1316 |
--public import SDL_types; |
1317 |
-+import SDL_types; |
1318 |
- |
1319 |
- extern(C): |
1320 |
- |
1321 |
-diff -Naur a2k_src/import/SDL_version.d a2k_src/import/SDL_version.d |
1322 |
---- a2k_src/import/SDL_version.d 2006-07-26 23:25:40.000000000 +0200 |
1323 |
-+++ a2k_src/import/SDL_version.d 1970-01-01 01:00:00.000000000 +0100 |
1324 |
-@@ -1,75 +0,0 @@ |
1325 |
--/* |
1326 |
-- SDL - Simple DirectMedia Layer |
1327 |
-- Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga |
1328 |
-- |
1329 |
-- This library is free software; you can redistribute it and/or |
1330 |
-- modify it under the terms of the GNU Library General Public |
1331 |
-- License as published by the Free Software Foundation; either |
1332 |
-- version 2 of the License, or (at your option) any later version. |
1333 |
-- |
1334 |
-- This library is distributed in the hope that it will be useful, |
1335 |
-- but WITHOUT ANY WARRANTY; without even the implied warranty of |
1336 |
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1337 |
-- Library General Public License for more details. |
1338 |
-- |
1339 |
-- You should have received a copy of the GNU Library General Public |
1340 |
-- License along with this library; if not, write to the Free |
1341 |
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
1342 |
-- |
1343 |
-- Sam Lantinga |
1344 |
-- slouken@××××××××××.com |
1345 |
--*/ |
1346 |
-- |
1347 |
--/* This header defines the current SDL version */ |
1348 |
-- |
1349 |
--public import SDL_types; |
1350 |
-- |
1351 |
--extern(C): |
1352 |
-- |
1353 |
--/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL |
1354 |
--*/ |
1355 |
--const uint SDL_MAJOR_VERSION = 1; |
1356 |
--const uint SDL_MINOR_VERSION = 2; |
1357 |
--const uint SDL_PATCHLEVEL = 6; |
1358 |
-- |
1359 |
--struct SDL_version { |
1360 |
-- Uint8 major; |
1361 |
-- Uint8 minor; |
1362 |
-- Uint8 patch; |
1363 |
--} |
1364 |
-- |
1365 |
--/* This macro can be used to fill a version structure with the compile-time |
1366 |
-- * version of the SDL library. |
1367 |
-- */ |
1368 |
--void SDL_VERSION(SDL_version* X) |
1369 |
--{ |
1370 |
-- X.major = SDL_MAJOR_VERSION; |
1371 |
-- X.minor = SDL_MINOR_VERSION; |
1372 |
-- X.patch = SDL_PATCHLEVEL; |
1373 |
--} |
1374 |
-- |
1375 |
--/* This macro turns the version numbers into a numeric value: |
1376 |
-- (1,2,3) -> (1203) |
1377 |
-- This assumes that there will never be more than 100 patchlevels |
1378 |
--*/ |
1379 |
--uint SDL_VERSIONNUM(Uint8 X, Uint8 Y, Uint8 Z) |
1380 |
--{ |
1381 |
-- return X * 1000 + Y * 100 + Z; |
1382 |
--} |
1383 |
-- |
1384 |
--/* This is the version number macro for the current SDL version */ |
1385 |
--const uint SDL_COMPILEDVERSION = SDL_MAJOR_VERSION * 1000 + |
1386 |
-- SDL_MINOR_VERSION * 100 + |
1387 |
-- SDL_PATCHLEVEL; |
1388 |
-- |
1389 |
--/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */ |
1390 |
--bit SDL_VERSION_ATLEAST(Uint8 X, Uint8 Y, Uint8 Z) |
1391 |
--{ |
1392 |
-- return (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)); |
1393 |
--} |
1394 |
-- |
1395 |
--/* This function gets the version of the dynamically linked SDL library. |
1396 |
-- it should NOT be used to fill a version structure, instead you should |
1397 |
-- use the SDL_Version() macro. |
1398 |
-- */ |
1399 |
--SDL_version * SDL_Linked_Version(); |
1400 |
-diff -Naur a2k_src/import/SDL_Version.d a2k_src/import/SDL_Version.d |
1401 |
---- a2k_src/import/SDL_Version.d 1970-01-01 01:00:00.000000000 +0100 |
1402 |
-+++ a2k_src/import/SDL_Version.d 2009-08-27 15:18:28.000000000 +0200 |
1403 |
-@@ -0,0 +1,75 @@ |
1404 |
-+/* |
1405 |
-+ SDL - Simple DirectMedia Layer |
1406 |
-+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga |
1407 |
-+ |
1408 |
-+ This library is free software; you can redistribute it and/or |
1409 |
-+ modify it under the terms of the GNU Library General Public |
1410 |
-+ License as published by the Free Software Foundation; either |
1411 |
-+ version 2 of the License, or (at your option) any later version. |
1412 |
-+ |
1413 |
-+ This library is distributed in the hope that it will be useful, |
1414 |
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
1415 |
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1416 |
-+ Library General Public License for more details. |
1417 |
-+ |
1418 |
-+ You should have received a copy of the GNU Library General Public |
1419 |
-+ License along with this library; if not, write to the Free |
1420 |
-+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
1421 |
-+ |
1422 |
-+ Sam Lantinga |
1423 |
-+ slouken@××××××××××.com |
1424 |
-+*/ |
1425 |
-+ |
1426 |
-+/* This header defines the current SDL version */ |
1427 |
-+ |
1428 |
-+import SDL_types; |
1429 |
-+ |
1430 |
-+extern(C): |
1431 |
-+ |
1432 |
-+/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL |
1433 |
-+*/ |
1434 |
-+const uint SDL_MAJOR_VERSION = 1; |
1435 |
-+const uint SDL_MINOR_VERSION = 2; |
1436 |
-+const uint SDL_PATCHLEVEL = 6; |
1437 |
-+ |
1438 |
-+struct SDL_version { |
1439 |
-+ Uint8 major; |
1440 |
-+ Uint8 minor; |
1441 |
-+ Uint8 patch; |
1442 |
-+} |
1443 |
-+ |
1444 |
-+/* This macro can be used to fill a version structure with the compile-time |
1445 |
-+ * version of the SDL library. |
1446 |
-+ */ |
1447 |
-+void SDL_VERSION(SDL_version* X) |
1448 |
-+{ |
1449 |
-+ X.major = SDL_MAJOR_VERSION; |
1450 |
-+ X.minor = SDL_MINOR_VERSION; |
1451 |
-+ X.patch = SDL_PATCHLEVEL; |
1452 |
-+} |
1453 |
-+ |
1454 |
-+/* This macro turns the version numbers into a numeric value: |
1455 |
-+ (1,2,3) -> (1203) |
1456 |
-+ This assumes that there will never be more than 100 patchlevels |
1457 |
-+*/ |
1458 |
-+uint SDL_VERSIONNUM(Uint8 X, Uint8 Y, Uint8 Z) |
1459 |
-+{ |
1460 |
-+ return X * 1000 + Y * 100 + Z; |
1461 |
-+} |
1462 |
-+ |
1463 |
-+/* This is the version number macro for the current SDL version */ |
1464 |
-+const uint SDL_COMPILEDVERSION = SDL_MAJOR_VERSION * 1000 + |
1465 |
-+ SDL_MINOR_VERSION * 100 + |
1466 |
-+ SDL_PATCHLEVEL; |
1467 |
-+ |
1468 |
-+/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */ |
1469 |
-+bit SDL_VERSION_ATLEAST(Uint8 X, Uint8 Y, Uint8 Z) |
1470 |
-+{ |
1471 |
-+ return (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)); |
1472 |
-+} |
1473 |
-+ |
1474 |
-+/* This function gets the version of the dynamically linked SDL library. |
1475 |
-+ it should NOT be used to fill a version structure, instead you should |
1476 |
-+ use the SDL_Version() macro. |
1477 |
-+ */ |
1478 |
-+SDL_version * SDL_Linked_Version(); |
1479 |
-diff -Naur a2k_src/import/SDL_video.d a2k_src/import/SDL_video.d |
1480 |
---- a2k_src/import/SDL_video.d 2006-07-26 23:25:42.000000000 +0200 |
1481 |
-+++ a2k_src/import/SDL_video.d 2009-08-27 15:18:28.000000000 +0200 |
1482 |
-@@ -22,9 +22,9 @@ |
1483 |
- |
1484 |
- /* Header file for access to the SDL raw framebuffer window */ |
1485 |
- |
1486 |
--public import SDL_types; |
1487 |
--public import SDL_mutex; |
1488 |
--public import SDL_rwops; |
1489 |
-+import SDL_types; |
1490 |
-+import SDL_mutex; |
1491 |
-+import SDL_rwops; |
1492 |
- |
1493 |
- extern(C): |
1494 |
- |
1495 |
|
1496 |
diff --git a/games-action/area2048/files/area2048-1.03-makefile.patch b/games-action/area2048/files/area2048-1.03-makefile.patch |
1497 |
deleted file mode 100644 |
1498 |
index 47d8659..0000000 |
1499 |
--- a/games-action/area2048/files/area2048-1.03-makefile.patch |
1500 |
+++ /dev/null |
1501 |
@@ -1,22 +0,0 @@ |
1502 |
-diff -Naur Makefile a2k_Makefile |
1503 |
---- Makefile 1970-01-01 01:00:00.000000000 +0100 |
1504 |
-+++ Makefile 2008-10-07 09:53:29.000000000 +0200 |
1505 |
-@@ -0,0 +1,18 @@ |
1506 |
-+DSRC=$(shell find a2k_src/src -name "*.d") |
1507 |
-+SOURCES=$(DSRC) a2k_src/import/SDL_video.d a2k_src/import/SDL_mixer.d |
1508 |
-+OBJS=$(SOURCES:.d=.o) |
1509 |
-+CFLAGS= |
1510 |
-+DFLAGS=-O -Ia2k_src/import -Ia2k_src/src -I/usr/X11R6/include/ |
1511 |
-+EXE=area2048 |
1512 |
-+ |
1513 |
-+all: $(EXE) |
1514 |
-+ |
1515 |
-+$(EXE): $(OBJS) |
1516 |
-+ gcc $(CFLAGS) -o $@ $(OBJS) $(COBJS) -lbulletml -L/usr/local/lib -L/usr/lib -lgphobos -lpthread -lGLU -lGL -lglut -lm -lstdc++ -lSDL -lSDL_mixer |
1517 |
-+ |
1518 |
-+$(OBJS): %.o: %.d |
1519 |
-+ gdmd -d -c -of$@ $(DFLAGS) $< |
1520 |
-+ |
1521 |
-+clean: |
1522 |
-+ rm a2k_src/src/*.o |
1523 |
-+ |
1524 |
|
1525 |
diff --git a/games-action/area2048/files/area2048-1.03-src.patch b/games-action/area2048/files/area2048-1.03-src.patch |
1526 |
deleted file mode 100644 |
1527 |
index 4913331..0000000 |
1528 |
--- a/games-action/area2048/files/area2048-1.03-src.patch |
1529 |
+++ /dev/null |
1530 |
@@ -1,1217 +0,0 @@ |
1531 |
-diff -Naur a2k_src/src/bg.d a2k_src-p/src/bg.d |
1532 |
---- a2k_src/src/bg.d 2005-01-18 00:34:48.000000000 +0100 |
1533 |
-+++ a2k_src-p/src/bg.d 2009-08-27 15:18:28.000000000 +0200 |
1534 |
-@@ -14,7 +14,12 @@ |
1535 |
- private import util_snd; |
1536 |
- private import define; |
1537 |
- private import task; |
1538 |
--private import stg; |
1539 |
-+private import stg; |
1540 |
-+private import stg01; |
1541 |
-+private import stg02; |
1542 |
-+private import stg03; |
1543 |
-+private import stg04; |
1544 |
-+private import stg05; |
1545 |
- private import effect; |
1546 |
- private import ship; |
1547 |
- |
1548 |
-@@ -79,20 +84,20 @@ |
1549 |
- TskBuf[fade_id].tx = 1.0f; |
1550 |
- TskBuf[fade_id].wait = 60; |
1551 |
- TskBuf[fade_id].step = 2; |
1552 |
-- TskBuf[id].px = cast(float)(rand() % 1536 - 768.0f); |
1553 |
-+ TskBuf[id].px = cast(float)(rand() % 1536 - 768.0f); |
1554 |
- TskBuf[id].py = cast(float)(rand() % 1536 - 768.0f); |
1555 |
- if((rand() % 100) & 0x01){ |
1556 |
- if(TskBuf[id].px < 0.0f){ |
1557 |
- TskBuf[id].tx = +(cast(float)(rand() % 768)); |
1558 |
- }else{ |
1559 |
-- TskBuf[id].tx = -(cast(float)(rand() % 768)); |
1560 |
-+ TskBuf[id].tx = +(cast(float)(rand() % 768)); |
1561 |
- } |
1562 |
- TskBuf[id].ty = TskBuf[id].py; |
1563 |
- }else{ |
1564 |
- if(TskBuf[id].py < 0.0f){ |
1565 |
- TskBuf[id].ty = +(cast(float)(rand() % 768)); |
1566 |
- }else{ |
1567 |
-- TskBuf[id].ty = -(cast(float)(rand() % 768)); |
1568 |
-+ TskBuf[id].ty = +(cast(float)(rand() % 768)); |
1569 |
- } |
1570 |
- TskBuf[id].tx = TskBuf[id].px; |
1571 |
- } |
1572 |
-@@ -104,7 +109,7 @@ |
1573 |
- cam_pos = BASE_Z + cam_scr; |
1574 |
- eid = setTSK(GROUP_08,&TSKbgZoom); |
1575 |
- TskBuf[eid].wait = 600; |
1576 |
-- TskBuf[eid].tx = BASE_Z - (cast(float)((rand() % 5000) - 2500 + 10000) / 10000.0f); |
1577 |
-+ TskBuf[eid].tx = BASE_Z - ((cast(float)(rand() % 5000) - 2500 + 10000) / 10000.0f); |
1578 |
- TskBuf[id].step++; |
1579 |
- break; |
1580 |
- case 2: |
1581 |
-@@ -202,22 +207,34 @@ |
1582 |
- scr_base[Y] = START_Y; |
1583 |
- scr_ofs[X] = 0.0f; |
1584 |
- scr_ofs[Y] = 0.0f; |
1585 |
-- cam_pos = BASE_Z + cam_scr; |
1586 |
-+ cam_pos = BASE_Z + cam_scr; |
1587 |
-+ bg_mode = 0; |
1588 |
-+ stg_ctrl = STG_MAIN; |
1589 |
- switch(area_num){ |
1590 |
- case AREA_01: |
1591 |
-- bg_mode = 0; |
1592 |
-+ bg_mode = 0; |
1593 |
-+ stg_ctrl = STG_MAIN; |
1594 |
-+ setTSK(GROUP_01,&TSKstg01); |
1595 |
- break; |
1596 |
- case AREA_02: |
1597 |
-- bg_mode = 1; |
1598 |
-+ bg_mode = 1; |
1599 |
-+ stg_ctrl = STG_MAIN; |
1600 |
-+ setTSK(GROUP_01,&TSKstg02); |
1601 |
- break; |
1602 |
- case AREA_03: |
1603 |
-- bg_mode = 2; |
1604 |
-+ bg_mode = 2; |
1605 |
-+ stg_ctrl = STG_MAIN; |
1606 |
-+ setTSK(GROUP_01,&TSKstg03); |
1607 |
- break; |
1608 |
- case AREA_04: |
1609 |
-- bg_mode = 3; |
1610 |
-+ bg_mode = 3; |
1611 |
-+ stg_ctrl = STG_MAIN; |
1612 |
-+ setTSK(GROUP_01,&TSKstg04); |
1613 |
- break; |
1614 |
- case AREA_05: |
1615 |
-- bg_mode = 4; |
1616 |
-+ bg_mode = 4; |
1617 |
-+ stg_ctrl = STG_MAIN; |
1618 |
-+ setTSK(GROUP_01,&TSKstg05); |
1619 |
- break; |
1620 |
- default: |
1621 |
- break; |
1622 |
-@@ -296,7 +313,7 @@ |
1623 |
- bg_obj[i].line_list.length = 1; |
1624 |
- bg_obj[i].line_list[0][X] = +0.0f; |
1625 |
- bg_obj[i].line_list[0][Y] = +0.0f; |
1626 |
-- bg_obj[i].line_list[0][Z] = -(cast(float)(rand() % 75)) / 100.0f + 0.25f; |
1627 |
-+ bg_obj[i].line_list[0][Z] = -cast(float)(rand() % 75) / 100.0f + 0.25f; |
1628 |
- } |
1629 |
- break; |
1630 |
- case 4: |
1631 |
-@@ -600,8 +617,8 @@ |
1632 |
- break; |
1633 |
- case 1: |
1634 |
- if(TskBuf[id].wait){ |
1635 |
-- TskBuf[id].px = ((rand() % (256.0f * TskBuf[id].vx)) - ((256.0f * TskBuf[id].vx) / 2)) / 256.0f; |
1636 |
-- TskBuf[id].py = ((rand() % (256.0f * TskBuf[id].vy)) - ((256.0f * TskBuf[id].vy) / 2)) / 256.0f; |
1637 |
-+ TskBuf[id].px = (cast(float)(rand() % (256.0f * TskBuf[id].vx)) - ((256.0f * TskBuf[id].vx) / 2)) / 256.0f; |
1638 |
-+ TskBuf[id].py = (cast(float)(rand() % (256.0f * TskBuf[id].vy)) - ((256.0f * TskBuf[id].vy) / 2)) / 256.0f; |
1639 |
- TskBuf[id].vx += (0.0f - TskBuf[id].vx) / TskBuf[id].cnt; |
1640 |
- TskBuf[id].vy += (0.0f - TskBuf[id].vy) / TskBuf[id].cnt; |
1641 |
- scr_ofs[X] = TskBuf[id].px; |
1642 |
-diff -Naur a2k_src/src/boss01.d a2k_src-p/src/boss01.d |
1643 |
---- a2k_src/src/boss01.d 2008-02-06 01:34:54.000000000 +0100 |
1644 |
-+++ a2k_src-p/src/boss01.d 2009-08-27 15:18:28.000000000 +0200 |
1645 |
-@@ -7,7 +7,7 @@ |
1646 |
- */ |
1647 |
- |
1648 |
- private import std.stdio; |
1649 |
--private import std.math; |
1650 |
-+private import std.c.math; |
1651 |
- private import std.random; |
1652 |
- private import std.string; |
1653 |
- private import SDL; |
1654 |
-diff -Naur a2k_src/src/boss02.d a2k_src-p/src/boss02.d |
1655 |
---- a2k_src/src/boss02.d 2008-02-06 01:35:18.000000000 +0100 |
1656 |
-+++ a2k_src-p/src/boss02.d 2009-08-27 15:18:28.000000000 +0200 |
1657 |
-@@ -6,7 +6,7 @@ |
1658 |
- 2004/04/16 jumpei isshiki |
1659 |
- */ |
1660 |
- |
1661 |
--private import std.math; |
1662 |
-+private import std.c.math; |
1663 |
- private import std.random; |
1664 |
- private import std.string; |
1665 |
- private import SDL; |
1666 |
-diff -Naur a2k_src/src/boss03.d a2k_src-p/src/boss03.d |
1667 |
---- a2k_src/src/boss03.d 2008-02-06 01:35:30.000000000 +0100 |
1668 |
-+++ a2k_src-p/src/boss03.d 2009-08-27 15:18:28.000000000 +0200 |
1669 |
-@@ -6,7 +6,7 @@ |
1670 |
- 2004/06/08 jumpei isshiki |
1671 |
- */ |
1672 |
- |
1673 |
--private import std.math; |
1674 |
-+private import std.c.math; |
1675 |
- private import std.random; |
1676 |
- private import std.string; |
1677 |
- private import SDL; |
1678 |
-@@ -358,7 +358,7 @@ |
1679 |
- } |
1680 |
- if(!cmd.isEnd()) cmd.run(); |
1681 |
- break; |
1682 |
-- TskBuf[id].ang_x = rand() % 65536; |
1683 |
-+ TskBuf[id].ang_x = cast(float)rand() % 65536; |
1684 |
- TskBuf[id].ang_x *= PI / 65536.0f; |
1685 |
- TskBuf[id].ax = |
1686 |
- TskBuf[id].ay = sin(TskBuf[id].ang_x) * 5.0f / PI; |
1687 |
-diff -Naur a2k_src/src/boss04.d a2k_src-p/src/boss04.d |
1688 |
---- a2k_src/src/boss04.d 2008-02-06 01:35:34.000000000 +0100 |
1689 |
-+++ a2k_src-p/src/boss04.d 2009-08-27 15:18:28.000000000 +0200 |
1690 |
-@@ -6,7 +6,7 @@ |
1691 |
- 2004/06/06 jumpei isshiki |
1692 |
- */ |
1693 |
- |
1694 |
--private import std.math; |
1695 |
-+private import std.c.math; |
1696 |
- private import std.random; |
1697 |
- private import std.string; |
1698 |
- private import SDL; |
1699 |
-diff -Naur a2k_src/src/boss05.d a2k_src-p/src/boss05.d |
1700 |
---- a2k_src/src/boss05.d 2008-02-06 01:35:38.000000000 +0100 |
1701 |
-+++ a2k_src-p/src/boss05.d 2009-08-27 15:18:28.000000000 +0200 |
1702 |
-@@ -6,7 +6,7 @@ |
1703 |
- 2004/06/09 jumpei isshiki |
1704 |
- */ |
1705 |
- |
1706 |
--private import std.math; |
1707 |
-+private import std.c.math; |
1708 |
- private import std.random; |
1709 |
- private import std.string; |
1710 |
- private import SDL; |
1711 |
-diff -Naur a2k_src/src/bulletcommand.d a2k_src-p/src/bulletcommand.d |
1712 |
---- a2k_src/src/bulletcommand.d 2008-02-06 01:37:56.000000000 +0100 |
1713 |
-+++ a2k_src-p/src/bulletcommand.d 2009-08-27 15:18:28.000000000 +0200 |
1714 |
-@@ -247,7 +247,7 @@ |
1715 |
- double getRand_(BulletMLRunner* runner){ |
1716 |
- double rand_val; |
1717 |
- //printf("getRand_(%d)\n",BulletCommand.now.id); |
1718 |
-- rand_val = rand() % 10000; |
1719 |
-+ rand_val = cast(float)rand() % 10000; |
1720 |
- rand_val /= 10000; |
1721 |
- return rand_val; |
1722 |
- } |
1723 |
-diff -Naur a2k_src/src/effect.d a2k_src-p/src/effect.d |
1724 |
---- a2k_src/src/effect.d 2008-02-06 01:35:40.000000000 +0100 |
1725 |
-+++ a2k_src-p/src/effect.d 2009-08-27 15:18:28.000000000 +0200 |
1726 |
-@@ -6,14 +6,15 @@ |
1727 |
- 2004/03/31 jumpei isshiki |
1728 |
- */ |
1729 |
- |
1730 |
--private import std.math; |
1731 |
-+private import std.c.math; |
1732 |
- private import std.random; |
1733 |
- private import std.string; |
1734 |
- private import SDL; |
1735 |
- private import opengl; |
1736 |
- private import util_sdl; |
1737 |
- private import task; |
1738 |
--private import bg; |
1739 |
-+private import bg; |
1740 |
-+private import system; |
1741 |
- |
1742 |
- float fade_r = 0.0f; |
1743 |
- float fade_g = 0.0f; |
1744 |
-@@ -53,16 +54,16 @@ |
1745 |
- for(int i = 0; i < 3; i++){ |
1746 |
- switch(i){ |
1747 |
- case 0: |
1748 |
-- tpos[X] = -((rand() % 4096) / 1024.0f + 1.0f); |
1749 |
-- tpos[Y] = +((rand() % 4096) / 1024.0f + 1.0f); |
1750 |
-+ tpos[X] = -cast(float)((rand() % 4096) / 1024.0f + 1.0f); |
1751 |
-+ tpos[Y] = +cast(float)((rand() % 4096) / 1024.0f + 1.0f); |
1752 |
- break; |
1753 |
- case 1: |
1754 |
-- tpos[X] = ((rand() % 2048) / 1024.0f - 1.0f); |
1755 |
-- tpos[Y] = -((rand() % 4096) / 1024.0f + 1.0f); |
1756 |
-+ tpos[X] = cast(float)((rand() % 2048) / 1024.0f - 1.0f); |
1757 |
-+ tpos[Y] = -cast(float)((rand() % 4096) / 1024.0f + 1.0f); |
1758 |
- break; |
1759 |
- case 2: |
1760 |
-- tpos[X] = +((rand() % 4096) / 1024.0f + 1.0f); |
1761 |
-- tpos[Y] = +((rand() % 4096) / 1024.0f + 1.0f); |
1762 |
-+ tpos[X] = +cast(float)((rand() % 4096) / 1024.0f + 1.0f); |
1763 |
-+ tpos[Y] = +cast(float)((rand() % 4096) / 1024.0f + 1.0f); |
1764 |
- break; |
1765 |
- default: |
1766 |
- break; |
1767 |
-@@ -74,8 +75,8 @@ |
1768 |
- tpos[Y] = fabs(tpos[Y]); |
1769 |
- TskBuf[id].body_ang[i][W] = sqrt(pow(tpos[X],2.0) + pow(tpos[Y],2.0)); |
1770 |
- } |
1771 |
-- TskBuf[id].tx = (rand() % 256000) / 1000.0f - 128.0f; |
1772 |
-- TskBuf[id].ty = (rand() % 256000) / 1000.0f - 128.0f; |
1773 |
-+ TskBuf[id].tx = cast(float)(rand() % 256000) / 1000.0f - 128.0f; |
1774 |
-+ TskBuf[id].ty = cast(float)(rand() % 256000) / 1000.0f - 128.0f; |
1775 |
- TskBuf[id].tx += TskBuf[id].px; |
1776 |
- TskBuf[id].ty += TskBuf[id].py; |
1777 |
- TskBuf[id].wait = 60; |
1778 |
-@@ -165,16 +166,16 @@ |
1779 |
- for(int i = 0; i < 3; i++){ |
1780 |
- switch(i){ |
1781 |
- case 0: |
1782 |
-- tpos[X] = -((rand() % 12288) / 1024.0f + 3.0f); |
1783 |
-- tpos[Y] = +((rand() % 12288) / 1024.0f + 3.0f); |
1784 |
-+ tpos[X] = -(cast(float)(rand() % 12288) / 1024.0f + 3.0f); |
1785 |
-+ tpos[Y] = +(cast(float)(rand() % 12288) / 1024.0f + 3.0f); |
1786 |
- break; |
1787 |
- case 1: |
1788 |
-- tpos[X] = ((rand() % 6144) / 1024.0f - 3.0f); |
1789 |
-- tpos[Y] = -((rand() % 12288) / 1024.0f + 3.0f); |
1790 |
-+ tpos[X] = (cast(float)(rand() % 6144) / 1024.0f - 3.0f); |
1791 |
-+ tpos[Y] = -(cast(float)(rand() % 12288) / 1024.0f + 3.0f); |
1792 |
- break; |
1793 |
- case 2: |
1794 |
-- tpos[X] = +((rand() % 12288) / 1024.0f + 3.0f); |
1795 |
-- tpos[Y] = +((rand() % 12288) / 1024.0f + 3.0f); |
1796 |
-+ tpos[X] = +(cast(float)(rand() % 12288) / 1024.0f + 3.0f); |
1797 |
-+ tpos[Y] = +(cast(float)(rand() % 12288) / 1024.0f + 3.0f); |
1798 |
- break; |
1799 |
- default: |
1800 |
- break; |
1801 |
-@@ -186,8 +187,8 @@ |
1802 |
- tpos[Y] = fabs(tpos[Y]); |
1803 |
- TskBuf[id].body_ang[i][W] = sqrt(pow(tpos[X],2.0) + pow(tpos[Y],2.0)); |
1804 |
- } |
1805 |
-- TskBuf[id].tx = (rand() % 512000) / 1000.0f - 256.0f; |
1806 |
-- TskBuf[id].ty = (rand() % 512000) / 1000.0f - 256.0f; |
1807 |
-+ TskBuf[id].tx = cast(float)(rand() % 512000) / 1000.0f - 256.0f; |
1808 |
-+ TskBuf[id].ty = cast(float)(rand() % 512000) / 1000.0f - 256.0f; |
1809 |
- TskBuf[id].tx += TskBuf[id].px; |
1810 |
- TskBuf[id].ty += TskBuf[id].py; |
1811 |
- TskBuf[id].wait = 60; |
1812 |
-@@ -279,13 +280,13 @@ |
1813 |
- TskBuf[id].fp_draw = &TSKBrokenBodyDraw; |
1814 |
- TskBuf[id].fp_exit = &TSKBrokenBodyExit; |
1815 |
- TskBuf[id].alpha = 1.0f; |
1816 |
-- TskBuf[id].tx = (rand() % 256000) / 1000.0f - 128.0f; |
1817 |
-- TskBuf[id].ty = (rand() % 256000) / 1000.0f - 128.0f; |
1818 |
-+ TskBuf[id].tx = cast(float)(rand() % 256000) / 1000.0f - 128.0f; |
1819 |
-+ TskBuf[id].ty = cast(float)(rand() % 256000) / 1000.0f - 128.0f; |
1820 |
- TskBuf[id].tx *= 2.0f; |
1821 |
- TskBuf[id].ty *= 2.0f; |
1822 |
- TskBuf[id].tx += TskBuf[id].px; |
1823 |
- TskBuf[id].ty += TskBuf[id].py; |
1824 |
-- TskBuf[id].rot_add = (rand % 30) - 15; |
1825 |
-+ TskBuf[id].rot_add = cast(float)(rand % 30) - 15; |
1826 |
- if(!(TskBuf[id].rot_add - 15)) TskBuf[id].rot_add = -1; |
1827 |
- else if(!(TskBuf[id].rot_add + 15)) TskBuf[id].rot_add = +1; |
1828 |
- if(TskBuf[id].rot_add < 0) TskBuf[id].rot_add = PI / (TskBuf[id].rot_add - 15); |
1829 |
-@@ -410,13 +411,13 @@ |
1830 |
- TskBuf[id].fp_draw = &TSKBrokenLineDraw; |
1831 |
- TskBuf[id].fp_exit = &TSKBrokenLineExit; |
1832 |
- TskBuf[id].alpha = 1.0f; |
1833 |
-- TskBuf[id].tx = (rand() % 256000) / 1000.0f - 128.0f; |
1834 |
-- TskBuf[id].ty = (rand() % 256000) / 1000.0f - 128.0f; |
1835 |
-+ TskBuf[id].tx = cast(float)(rand() % 256000) / 1000.0f - 128.0f; |
1836 |
-+ TskBuf[id].ty = cast(float)(rand() % 256000) / 1000.0f - 128.0f; |
1837 |
- TskBuf[id].tx *= 2.0f; |
1838 |
- TskBuf[id].ty *= 2.0f; |
1839 |
- TskBuf[id].tx += TskBuf[id].px; |
1840 |
- TskBuf[id].ty += TskBuf[id].py; |
1841 |
-- TskBuf[id].rot_add = (rand % 30) - 15; |
1842 |
-+ TskBuf[id].rot_add = cast(float)(rand % 30) - 15; |
1843 |
- if(!(TskBuf[id].rot_add - 15)) TskBuf[id].rot_add = -1; |
1844 |
- else if(!(TskBuf[id].rot_add + 15)) TskBuf[id].rot_add = +1; |
1845 |
- if(TskBuf[id].rot_add < 0) TskBuf[id].rot_add = PI / (TskBuf[id].rot_add - 15); |
1846 |
-diff -Naur a2k_src/src/enemy01.d a2k_src-p/src/enemy01.d |
1847 |
---- a2k_src/src/enemy01.d 2008-02-06 01:35:46.000000000 +0100 |
1848 |
-+++ a2k_src-p/src/enemy01.d 2009-08-27 15:18:28.000000000 +0200 |
1849 |
-@@ -6,7 +6,7 @@ |
1850 |
- 2004/03/27 jumpei isshiki |
1851 |
- */ |
1852 |
- |
1853 |
--private import std.math; |
1854 |
-+private import std.c.math; |
1855 |
- private import std.random; |
1856 |
- private import SDL; |
1857 |
- private import opengl; |
1858 |
-@@ -63,8 +63,8 @@ |
1859 |
- switch(TskBuf[id].step){ |
1860 |
- case 0: |
1861 |
- TskBuf[id].tskid |= TSKID_ZAKO; |
1862 |
-- TskBuf[id].px = (rand() % 1536) - 768.0f; |
1863 |
-- TskBuf[id].py = (rand() % 1536) - 768.0f; |
1864 |
-+ TskBuf[id].px = (cast(float)(rand() % 1536) - 768.0f); |
1865 |
-+ TskBuf[id].py = (cast(float)(rand() % 1536) - 768.0f); |
1866 |
- TskBuf[id].fp_int = null; |
1867 |
- TskBuf[id].fp_draw = &TSKenemy01Draw; |
1868 |
- TskBuf[id].fp_exit = &TSKenemy01Exit; |
1869 |
-diff -Naur a2k_src/src/enemy02.d a2k_src-p/src/enemy02.d |
1870 |
---- a2k_src/src/enemy02.d 2008-02-06 01:35:48.000000000 +0100 |
1871 |
-+++ a2k_src-p/src/enemy02.d 2009-08-27 15:18:28.000000000 +0200 |
1872 |
-@@ -6,7 +6,7 @@ |
1873 |
- 2004/04/11 jumpei isshiki |
1874 |
- */ |
1875 |
- |
1876 |
--private import std.math; |
1877 |
-+private import std.c.math; |
1878 |
- private import std.random; |
1879 |
- private import SDL; |
1880 |
- private import opengl; |
1881 |
-@@ -63,8 +63,8 @@ |
1882 |
- switch(TskBuf[id].step){ |
1883 |
- case 0: |
1884 |
- TskBuf[id].tskid |= TSKID_ZAKO; |
1885 |
-- TskBuf[id].px = (rand() % 1536) - 768.0f; |
1886 |
-- TskBuf[id].py = (rand() % 1536) - 768.0f; |
1887 |
-+ TskBuf[id].px = (cast(float)(rand() % 1536) - 768.0f); |
1888 |
-+ TskBuf[id].py = (cast(float)(rand() % 1536) - 768.0f); |
1889 |
- TskBuf[id].fp_int = null; |
1890 |
- TskBuf[id].fp_draw = &TSKenemy02Draw; |
1891 |
- TskBuf[id].fp_exit = &TSKenemy02Exit; |
1892 |
-diff -Naur a2k_src/src/enemy03.d a2k_src-p/src/enemy03.d |
1893 |
---- a2k_src/src/enemy03.d 2008-02-06 01:35:52.000000000 +0100 |
1894 |
-+++ a2k_src-p/src/enemy03.d 2009-08-27 15:18:28.000000000 +0200 |
1895 |
-@@ -6,7 +6,7 @@ |
1896 |
- 2004/04/11 jumpei isshiki |
1897 |
- */ |
1898 |
- |
1899 |
--private import std.math; |
1900 |
-+private import std.c.math; |
1901 |
- private import std.random; |
1902 |
- private import SDL; |
1903 |
- private import opengl; |
1904 |
-@@ -63,8 +63,8 @@ |
1905 |
- switch(TskBuf[id].step){ |
1906 |
- case 0: |
1907 |
- TskBuf[id].tskid |= TSKID_ZAKO; |
1908 |
-- TskBuf[id].px = (rand() % 1536) - 768.0f; |
1909 |
-- TskBuf[id].py = (rand() % 1536) - 768.0f; |
1910 |
-+ TskBuf[id].px = (cast(float)(rand() % 1536) - 768.0f); |
1911 |
-+ TskBuf[id].py = (cast(float)(rand() % 1536) - 768.0f); |
1912 |
- TskBuf[id].tid = ship_id; |
1913 |
- TskBuf[id].fp_int = null; |
1914 |
- TskBuf[id].fp_draw = &TSKenemy03Draw; |
1915 |
-diff -Naur a2k_src/src/enemy04.d a2k_src-p/src/enemy04.d |
1916 |
---- a2k_src/src/enemy04.d 2008-02-06 01:35:56.000000000 +0100 |
1917 |
-+++ a2k_src-p/src/enemy04.d 2009-08-27 15:18:28.000000000 +0200 |
1918 |
-@@ -6,7 +6,7 @@ |
1919 |
- 2004/04/11 jumpei isshiki |
1920 |
- */ |
1921 |
- |
1922 |
--private import std.math; |
1923 |
-+private import std.c.math; |
1924 |
- private import std.random; |
1925 |
- private import SDL; |
1926 |
- private import opengl; |
1927 |
-@@ -53,8 +53,8 @@ |
1928 |
- switch(TskBuf[id].step){ |
1929 |
- case 0: |
1930 |
- TskBuf[id].tskid |= TSKID_ZAKO; |
1931 |
-- TskBuf[id].px = (rand() % 1536) - 768.0f; |
1932 |
-- TskBuf[id].py = (rand() % 1536) - 768.0f; |
1933 |
-+ TskBuf[id].px = (cast(float)(rand() % 1536) - 768.0f); |
1934 |
-+ TskBuf[id].py = (cast(float)(rand() % 1536) - 768.0f); |
1935 |
- TskBuf[id].tid = ship_id; |
1936 |
- TskBuf[id].fp_int = null; |
1937 |
- TskBuf[id].fp_draw = &TSKenemy04Draw; |
1938 |
-@@ -132,14 +132,14 @@ |
1939 |
- TskBuf[id].vx = TskBuf[id].px; |
1940 |
- TskBuf[id].vy = TskBuf[id].py; |
1941 |
- if(!TskBuf[id].cnt){ |
1942 |
-- TskBuf[id].tx = (rand() % 512) + 256.0f; |
1943 |
-- TskBuf[id].ty = (rand() % 512) + 256.0f; |
1944 |
-+ TskBuf[id].tx = cast(float)(rand() % 512) + 256.0f; |
1945 |
-+ TskBuf[id].ty = cast(float)(rand() % 512) + 256.0f; |
1946 |
- if(TskBuf[id].px < ship_px) TskBuf[id].tx = +TskBuf[id].tx; |
1947 |
- else TskBuf[id].tx = -TskBuf[id].tx; |
1948 |
- if(TskBuf[id].py < ship_py) TskBuf[id].ty = +TskBuf[id].ty; |
1949 |
- else TskBuf[id].ty = -TskBuf[id].ty; |
1950 |
-- if((rand() % 100) > 97) TskBuf[id].tx = -TskBuf[id].tx; |
1951 |
-- if((rand() % 100) > 97) TskBuf[id].ty = -TskBuf[id].ty; |
1952 |
-+ if(cast(float)(rand() % 100) > 97) TskBuf[id].tx = -TskBuf[id].tx; |
1953 |
-+ if(cast(float)(rand() % 100) > 97) TskBuf[id].ty = -TskBuf[id].ty; |
1954 |
- TskBuf[id].tx = TskBuf[id].px + TskBuf[id].tx; |
1955 |
- TskBuf[id].ty = TskBuf[id].py + TskBuf[id].ty; |
1956 |
- if(TskBuf[id].tx < -ENEMY_AREAMAX) TskBuf[id].tx = -ENEMY_AREAMAX + 1.0f; |
1957 |
-diff -Naur a2k_src/src/enemy05.d a2k_src-p/src/enemy05.d |
1958 |
---- a2k_src/src/enemy05.d 2008-02-06 01:35:58.000000000 +0100 |
1959 |
-+++ a2k_src-p/src/enemy05.d 2009-08-27 15:18:28.000000000 +0200 |
1960 |
-@@ -6,7 +6,7 @@ |
1961 |
- 2004/05/30 jumpei isshiki |
1962 |
- */ |
1963 |
- |
1964 |
--private import std.math; |
1965 |
-+private import std.c.math; |
1966 |
- private import std.random; |
1967 |
- private import SDL; |
1968 |
- private import opengl; |
1969 |
-@@ -53,8 +53,8 @@ |
1970 |
- switch(TskBuf[id].step){ |
1971 |
- case 0: |
1972 |
- TskBuf[id].tskid |= TSKID_ZAKO; |
1973 |
-- TskBuf[id].px = (rand() % 1536) - 768.0f; |
1974 |
-- TskBuf[id].py = (rand() % 1536) - 768.0f; |
1975 |
-+ TskBuf[id].px = (cast(float)(rand() % 1536) - 768.0f); |
1976 |
-+ TskBuf[id].py = (cast(float)(rand() % 1536) - 768.0f); |
1977 |
- TskBuf[id].tid = ship_id; |
1978 |
- TskBuf[id].fp_int = null; |
1979 |
- TskBuf[id].fp_draw = &TSKenemy05Draw; |
1980 |
-@@ -127,42 +127,31 @@ |
1981 |
- } |
1982 |
- } |
1983 |
- /* 座標更新 */ |
1984 |
-- if(TskBuf[id].px < ship_px){ |
1985 |
-- if(TskBuf[id].vx > +0.0f) TskBuf[id].vx += 1.0f / SPEED_RATE * 2.0f; |
1986 |
-- else TskBuf[id].vx += 1.0f / SPEED_RATE * 1.5f; |
1987 |
-- if(TskBuf[id].vx > +MAX_SPEED) TskBuf[id].vx = +MAX_SPEED; |
1988 |
-- }else{ |
1989 |
-- if(TskBuf[id].vx < +0.0f) TskBuf[id].vx -= 1.0f / SPEED_RATE * 2.0f; |
1990 |
-- else TskBuf[id].vx -= 1.0f / SPEED_RATE * 1.5f; |
1991 |
-- if(TskBuf[id].vx < -MAX_SPEED) TskBuf[id].vx = -MAX_SPEED; |
1992 |
-- } |
1993 |
-- if(TskBuf[id].py < ship_py){ |
1994 |
-- if(TskBuf[id].vy > +0.0f) TskBuf[id].vy += 1.0f / SPEED_RATE * 2.0f; |
1995 |
-- else TskBuf[id].vy += 1.0f / SPEED_RATE * 1.5f; |
1996 |
-- if(TskBuf[id].vy > +MAX_SPEED) TskBuf[id].vy = +MAX_SPEED; |
1997 |
-- }else{ |
1998 |
-- if(TskBuf[id].vy < +0.0f) TskBuf[id].vy -= 1.0f / SPEED_RATE * 2.0f; |
1999 |
-- else TskBuf[id].vy -= 1.0f / SPEED_RATE * 1.5f; |
2000 |
-- if(TskBuf[id].vy < -MAX_SPEED) TskBuf[id].vy = -MAX_SPEED; |
2001 |
-- } |
2002 |
-- TskBuf[id].px += TskBuf[id].vx; |
2003 |
-- TskBuf[id].py += TskBuf[id].vy; |
2004 |
-- if(TskBuf[id].px < -ENEMY_AREAMAX){ |
2005 |
-- TskBuf[id].px = -ENEMY_AREAMAX; |
2006 |
-- TskBuf[id].vx = -TskBuf[id].vx / 2; |
2007 |
-- } |
2008 |
-- if(TskBuf[id].px > +ENEMY_AREAMAX){ |
2009 |
-- TskBuf[id].px = +ENEMY_AREAMAX; |
2010 |
-- TskBuf[id].vx = -TskBuf[id].vx / 2; |
2011 |
-- } |
2012 |
-- if(TskBuf[id].py < -ENEMY_AREAMAX){ |
2013 |
-- TskBuf[id].py = -ENEMY_AREAMAX; |
2014 |
-- TskBuf[id].vy = -TskBuf[id].vy / 2; |
2015 |
-- } |
2016 |
-- if(TskBuf[id].py > +ENEMY_AREAMAX){ |
2017 |
-- TskBuf[id].py = +ENEMY_AREAMAX; |
2018 |
-- TskBuf[id].vy = -TskBuf[id].vy / 2; |
2019 |
-- } |
2020 |
-+ TskBuf[id].vx = TskBuf[id].px; |
2021 |
-+ TskBuf[id].vy = TskBuf[id].py; |
2022 |
-+ if(!TskBuf[id].cnt){ |
2023 |
-+ TskBuf[id].tx = cast(float)(rand() % 512) + 256.0f; |
2024 |
-+ TskBuf[id].ty = cast(float)(rand() % 512) + 256.0f; |
2025 |
-+ if(TskBuf[id].px < ship_px) TskBuf[id].tx = +TskBuf[id].tx; |
2026 |
-+ else TskBuf[id].tx = -TskBuf[id].tx; |
2027 |
-+ if(TskBuf[id].py < ship_py) TskBuf[id].ty = +TskBuf[id].ty; |
2028 |
-+ else TskBuf[id].ty = -TskBuf[id].ty; |
2029 |
-+ if(cast(float)(rand() % 100) > 97) TskBuf[id].tx = -TskBuf[id].tx; |
2030 |
-+ if(cast(float)(rand() % 100) > 97) TskBuf[id].ty = -TskBuf[id].ty; |
2031 |
-+ TskBuf[id].tx = TskBuf[id].px + TskBuf[id].tx; |
2032 |
-+ TskBuf[id].ty = TskBuf[id].py + TskBuf[id].ty; |
2033 |
-+ if(TskBuf[id].tx < -ENEMY_AREAMAX) TskBuf[id].tx = -ENEMY_AREAMAX + 1.0f; |
2034 |
-+ if(TskBuf[id].tx > +ENEMY_AREAMAX) TskBuf[id].tx = +ENEMY_AREAMAX - 1.0f; |
2035 |
-+ if(TskBuf[id].ty < -ENEMY_AREAMAX) TskBuf[id].ty = -ENEMY_AREAMAX + 1.0f; |
2036 |
-+ if(TskBuf[id].ty > +ENEMY_AREAMAX) TskBuf[id].ty = +ENEMY_AREAMAX - 1.0f; |
2037 |
-+ TskBuf[id].cnt = 180; |
2038 |
-+ }else{ |
2039 |
-+ TskBuf[id].cnt--; |
2040 |
-+ } |
2041 |
-+ TskBuf[id].px += (TskBuf[id].tx - TskBuf[id].px) / (180 / 4); |
2042 |
-+ TskBuf[id].py += (TskBuf[id].ty - TskBuf[id].py) / (180 / 4); |
2043 |
-+ TskBuf[id].vx -= TskBuf[id].px; |
2044 |
-+ TskBuf[id].vy -= TskBuf[id].py; |
2045 |
- TskBuf[id].rot = atan2(-TskBuf[id].vx, -TskBuf[id].vy); |
2046 |
- break; |
2047 |
- default: |
2048 |
-diff -Naur a2k_src/src/enemy06.d a2k_src-p/src/enemy06.d |
2049 |
---- a2k_src/src/enemy06.d 2008-02-06 01:36:00.000000000 +0100 |
2050 |
-+++ a2k_src-p/src/enemy06.d 2009-08-27 15:18:28.000000000 +0200 |
2051 |
-@@ -6,7 +6,7 @@ |
2052 |
- 2004/06/04 jumpei isshiki |
2053 |
- */ |
2054 |
- |
2055 |
--private import std.math; |
2056 |
-+private import std.c.math; |
2057 |
- private import std.random; |
2058 |
- private import SDL; |
2059 |
- private import opengl; |
2060 |
-@@ -65,8 +65,8 @@ |
2061 |
- switch(TskBuf[id].step){ |
2062 |
- case 0: |
2063 |
- TskBuf[id].tskid |= TSKID_ZAKO; |
2064 |
-- TskBuf[id].px = (rand() % 1536) - 768.0f; |
2065 |
-- TskBuf[id].py = (rand() % 1536) - 768.0f; |
2066 |
-+ TskBuf[id].px = (cast(float)(rand() % 1536) - 768.0f); |
2067 |
-+ TskBuf[id].py = (cast(float)(rand() % 1536) - 768.0f); |
2068 |
- TskBuf[id].tid = ship_id; |
2069 |
- TskBuf[id].fp_int = null; |
2070 |
- TskBuf[id].fp_draw = &TSKenemy06Draw; |
2071 |
-@@ -145,14 +145,14 @@ |
2072 |
- TskBuf[id].vx = TskBuf[id].px; |
2073 |
- TskBuf[id].vy = TskBuf[id].py; |
2074 |
- if(TskBuf[id].cnt == TskBuf[id].mov_cnt){ |
2075 |
-- TskBuf[id].tx = (rand() % 512) + 256.0f; |
2076 |
-- TskBuf[id].ty = (rand() % 512) + 256.0f; |
2077 |
-+ TskBuf[id].tx = cast(float)(rand() % 512) + 256.0f; |
2078 |
-+ TskBuf[id].ty = cast(float)(rand() % 512) + 256.0f; |
2079 |
- if(TskBuf[id].px < ship_px) TskBuf[id].tx = +TskBuf[id].tx; |
2080 |
- else TskBuf[id].tx = -TskBuf[id].tx; |
2081 |
- if(TskBuf[id].py < ship_py) TskBuf[id].ty = +TskBuf[id].ty; |
2082 |
- else TskBuf[id].ty = -TskBuf[id].ty; |
2083 |
-- if((rand() % 100) > 97) TskBuf[id].tx = -TskBuf[id].tx; |
2084 |
-- if((rand() % 100) > 97) TskBuf[id].ty = -TskBuf[id].ty; |
2085 |
-+ if(cast(float)(rand() % 100) > 97) TskBuf[id].tx = -TskBuf[id].tx; |
2086 |
-+ if(cast(float)(rand() % 100) > 97) TskBuf[id].ty = -TskBuf[id].ty; |
2087 |
- TskBuf[id].tx = TskBuf[id].px + TskBuf[id].tx; |
2088 |
- TskBuf[id].ty = TskBuf[id].py + TskBuf[id].ty; |
2089 |
- if(TskBuf[id].tx < -ENEMY_AREAMAX) TskBuf[id].tx = -ENEMY_AREAMAX + 1.0f; |
2090 |
-diff -Naur a2k_src/src/enemy07.d a2k_src-p/src/enemy07.d |
2091 |
---- a2k_src/src/enemy07.d 2008-02-06 01:36:02.000000000 +0100 |
2092 |
-+++ a2k_src-p/src/enemy07.d 2009-08-27 15:18:28.000000000 +0200 |
2093 |
-@@ -6,7 +6,7 @@ |
2094 |
- 2004/06/05 jumpei isshiki |
2095 |
- */ |
2096 |
- |
2097 |
--private import std.math; |
2098 |
-+private import std.c.math; |
2099 |
- private import std.random; |
2100 |
- private import SDL; |
2101 |
- private import opengl; |
2102 |
-@@ -63,8 +63,8 @@ |
2103 |
- switch(TskBuf[id].step){ |
2104 |
- case 0: |
2105 |
- TskBuf[id].tskid |= TSKID_ZAKO; |
2106 |
-- TskBuf[id].px = (rand() % 1536) - 768.0f; |
2107 |
-- TskBuf[id].py = (rand() % 1536) - 768.0f; |
2108 |
-+ TskBuf[id].px = (cast(float)(rand() % 1536) - 768.0f); |
2109 |
-+ TskBuf[id].py = (cast(float)(rand() % 1536) - 768.0f); |
2110 |
- TskBuf[id].tid = ship_id; |
2111 |
- TskBuf[id].fp_int = null; |
2112 |
- TskBuf[id].fp_draw = &TSKenemy07Draw; |
2113 |
-@@ -137,42 +137,31 @@ |
2114 |
- } |
2115 |
- } |
2116 |
- /* 座標更新 */ |
2117 |
-- if(TskBuf[id].px < ship_px){ |
2118 |
-- if(TskBuf[id].vx > +0.0f) TskBuf[id].vx += 1.0f / SPEED_RATE * 2.0f; |
2119 |
-- else TskBuf[id].vx += 1.0f / SPEED_RATE * 1.5f; |
2120 |
-- if(TskBuf[id].vx > +MAX_SPEED) TskBuf[id].vx = +MAX_SPEED; |
2121 |
-- }else{ |
2122 |
-- if(TskBuf[id].vx < +0.0f) TskBuf[id].vx -= 1.0f / SPEED_RATE * 2.0f; |
2123 |
-- else TskBuf[id].vx -= 1.0f / SPEED_RATE * 1.5f; |
2124 |
-- if(TskBuf[id].vx < -MAX_SPEED) TskBuf[id].vx = -MAX_SPEED; |
2125 |
-- } |
2126 |
-- if(TskBuf[id].py < ship_py){ |
2127 |
-- if(TskBuf[id].vy > +0.0f) TskBuf[id].vy += 1.0f / SPEED_RATE * 2.0f; |
2128 |
-- else TskBuf[id].vy += 1.0f / SPEED_RATE * 1.5f; |
2129 |
-- if(TskBuf[id].vy > +MAX_SPEED) TskBuf[id].vy = +MAX_SPEED; |
2130 |
-- }else{ |
2131 |
-- if(TskBuf[id].vy < +0.0f) TskBuf[id].vy -= 1.0f / SPEED_RATE * 2.0f; |
2132 |
-- else TskBuf[id].vy -= 1.0f / SPEED_RATE * 1.5f; |
2133 |
-- if(TskBuf[id].vy < -MAX_SPEED) TskBuf[id].vy = -MAX_SPEED; |
2134 |
-- } |
2135 |
-- TskBuf[id].px += TskBuf[id].vx; |
2136 |
-- TskBuf[id].py += TskBuf[id].vy; |
2137 |
-- if(TskBuf[id].px < -ENEMY_AREAMAX){ |
2138 |
-- TskBuf[id].px = -ENEMY_AREAMAX; |
2139 |
-- TskBuf[id].vx = -TskBuf[id].vx / 2; |
2140 |
-- } |
2141 |
-- if(TskBuf[id].px > +ENEMY_AREAMAX){ |
2142 |
-- TskBuf[id].px = +ENEMY_AREAMAX; |
2143 |
-- TskBuf[id].vx = -TskBuf[id].vx / 2; |
2144 |
-- } |
2145 |
-- if(TskBuf[id].py < -ENEMY_AREAMAX){ |
2146 |
-- TskBuf[id].py = -ENEMY_AREAMAX; |
2147 |
-- TskBuf[id].vy = -TskBuf[id].vy / 2; |
2148 |
-- } |
2149 |
-- if(TskBuf[id].py > +ENEMY_AREAMAX){ |
2150 |
-- TskBuf[id].py = +ENEMY_AREAMAX; |
2151 |
-- TskBuf[id].vy = -TskBuf[id].vy / 2; |
2152 |
-- } |
2153 |
-+ TskBuf[id].vx = TskBuf[id].px; |
2154 |
-+ TskBuf[id].vy = TskBuf[id].py; |
2155 |
-+ if(!TskBuf[id].cnt){ |
2156 |
-+ TskBuf[id].tx = cast(float)(rand() % 512) + 256.0f; |
2157 |
-+ TskBuf[id].ty = cast(float)(rand() % 512) + 256.0f; |
2158 |
-+ if(TskBuf[id].px < ship_px) TskBuf[id].tx = +TskBuf[id].tx; |
2159 |
-+ else TskBuf[id].tx = -TskBuf[id].tx; |
2160 |
-+ if(TskBuf[id].py < ship_py) TskBuf[id].ty = +TskBuf[id].ty; |
2161 |
-+ else TskBuf[id].ty = -TskBuf[id].ty; |
2162 |
-+ if(cast(float)(rand() % 100) > 97) TskBuf[id].tx = -TskBuf[id].tx; |
2163 |
-+ if(cast(float)(rand() % 100) > 97) TskBuf[id].ty = -TskBuf[id].ty; |
2164 |
-+ TskBuf[id].tx = TskBuf[id].px + TskBuf[id].tx; |
2165 |
-+ TskBuf[id].ty = TskBuf[id].py + TskBuf[id].ty; |
2166 |
-+ if(TskBuf[id].tx < -ENEMY_AREAMAX) TskBuf[id].tx = -ENEMY_AREAMAX + 1.0f; |
2167 |
-+ if(TskBuf[id].tx > +ENEMY_AREAMAX) TskBuf[id].tx = +ENEMY_AREAMAX - 1.0f; |
2168 |
-+ if(TskBuf[id].ty < -ENEMY_AREAMAX) TskBuf[id].ty = -ENEMY_AREAMAX + 1.0f; |
2169 |
-+ if(TskBuf[id].ty > +ENEMY_AREAMAX) TskBuf[id].ty = +ENEMY_AREAMAX - 1.0f; |
2170 |
-+ TskBuf[id].cnt = 180; |
2171 |
-+ }else{ |
2172 |
-+ TskBuf[id].cnt--; |
2173 |
-+ } |
2174 |
-+ TskBuf[id].px += (TskBuf[id].tx - TskBuf[id].px) / (180 / 4); |
2175 |
-+ TskBuf[id].py += (TskBuf[id].ty - TskBuf[id].py) / (180 / 4); |
2176 |
-+ TskBuf[id].vx -= TskBuf[id].px; |
2177 |
-+ TskBuf[id].vy -= TskBuf[id].py; |
2178 |
- TskBuf[id].rot = atan2(-TskBuf[id].vx, -TskBuf[id].vy); |
2179 |
- break; |
2180 |
- default: |
2181 |
-diff -Naur a2k_src/src/enemy08.d a2k_src-p/src/enemy08.d |
2182 |
---- a2k_src/src/enemy08.d 2008-02-06 01:36:04.000000000 +0100 |
2183 |
-+++ a2k_src-p/src/enemy08.d 2009-08-27 15:18:28.000000000 +0200 |
2184 |
-@@ -6,7 +6,7 @@ |
2185 |
- 2004/06/05 jumpei isshiki |
2186 |
- */ |
2187 |
- |
2188 |
--private import std.math; |
2189 |
-+private import std.c.math; |
2190 |
- private import std.random; |
2191 |
- private import SDL; |
2192 |
- private import opengl; |
2193 |
-@@ -65,8 +65,8 @@ |
2194 |
- switch(TskBuf[id].step){ |
2195 |
- case 0: |
2196 |
- TskBuf[id].tskid |= TSKID_ZAKO; |
2197 |
-- TskBuf[id].px = (rand() % 1536) - 768.0f; |
2198 |
-- TskBuf[id].py = (rand() % 1536) - 768.0f; |
2199 |
-+ TskBuf[id].px = (cast(float)(rand() % 1536) - 768.0f); |
2200 |
-+ TskBuf[id].py = (cast(float)(rand() % 1536) - 768.0f); |
2201 |
- TskBuf[id].tid = ship_id; |
2202 |
- TskBuf[id].fp_int = null; |
2203 |
- TskBuf[id].fp_draw = &TSKenemy08Draw; |
2204 |
-diff -Naur a2k_src/src/enemy.d a2k_src-p/src/enemy.d |
2205 |
---- a2k_src/src/enemy.d 2008-02-06 01:35:42.000000000 +0100 |
2206 |
-+++ a2k_src-p/src/enemy.d 2009-08-27 15:18:28.000000000 +0200 |
2207 |
-@@ -6,7 +6,7 @@ |
2208 |
- 2004/04/14 jumpei isshiki |
2209 |
- */ |
2210 |
- |
2211 |
--private import std.math; |
2212 |
-+private import std.c.math; |
2213 |
- private import SDL; |
2214 |
- private import opengl; |
2215 |
- private import util_sdl; |
2216 |
-@@ -158,6 +158,7 @@ |
2217 |
- return; |
2218 |
- } |
2219 |
- |
2220 |
-+ |
2221 |
- void TSKeshotInt(int id) |
2222 |
- { |
2223 |
- TskBuf[id].step = -1; |
2224 |
-@@ -165,6 +166,7 @@ |
2225 |
- return; |
2226 |
- } |
2227 |
- |
2228 |
-+ |
2229 |
- void TSKeshotDrawSimple(int id) |
2230 |
- { |
2231 |
- float[XYZ] pos; |
2232 |
-@@ -198,6 +200,7 @@ |
2233 |
- glEnd(); |
2234 |
- } |
2235 |
- |
2236 |
-+ |
2237 |
- void TSKeshotDrawActive(int id) |
2238 |
- { |
2239 |
- float[XYZ] pos; |
2240 |
-@@ -231,6 +234,7 @@ |
2241 |
- glEnd(); |
2242 |
- } |
2243 |
- |
2244 |
-+ |
2245 |
- void TSKeshotExit(int id) |
2246 |
- { |
2247 |
- BulletCommand cmd = TskBuf[id].bullet_command; |
2248 |
-@@ -243,6 +247,7 @@ |
2249 |
- } |
2250 |
- } |
2251 |
- |
2252 |
-+ |
2253 |
- float getShipDirection(int id) |
2254 |
- { |
2255 |
- float px,py; |
2256 |
-@@ -257,3 +262,4 @@ |
2257 |
- return dir; |
2258 |
- } |
2259 |
- |
2260 |
-+ |
2261 |
-diff -Naur a2k_src/src/init.d a2k_src-p/src/init.d |
2262 |
---- a2k_src/src/init.d 2005-05-19 22:31:30.000000000 +0200 |
2263 |
-+++ a2k_src-p/src/init.d 2009-08-27 15:18:28.000000000 +0200 |
2264 |
-@@ -6,7 +6,7 @@ |
2265 |
- 2003/12/01 jumpei isshiki |
2266 |
- */ |
2267 |
- |
2268 |
--private import std.stdio; |
2269 |
-+private import std.c.stdio; |
2270 |
- private import std.stream; |
2271 |
- private import util_sdl; |
2272 |
- private import util_snd; |
2273 |
-@@ -101,7 +101,7 @@ |
2274 |
- fd.open("score.dat"); |
2275 |
- if(fd.size() != 12){ |
2276 |
- fd.close(); |
2277 |
-- writefln("score.dat initialized"); |
2278 |
-+ printf("score.dat initialized"); |
2279 |
- fd.create("score.dat"); |
2280 |
- fd.write(high_easy); |
2281 |
- fd.write(high_normal); |
2282 |
-@@ -112,7 +112,7 @@ |
2283 |
- fd.read(high_hard); |
2284 |
- } |
2285 |
- } catch (Error e) { |
2286 |
-- writefln("score.dat initialized"); |
2287 |
-+ printf("score.dat initialized"); |
2288 |
- fd.create("score.dat"); |
2289 |
- fd.write(high_easy); |
2290 |
- fd.write(high_normal); |
2291 |
-@@ -126,7 +126,7 @@ |
2292 |
- try { |
2293 |
- if(fd.size() != 12){ |
2294 |
- fd.close(); |
2295 |
-- writefln("config.dat initialized"); |
2296 |
-+ printf("config.dat initialized"); |
2297 |
- fd.create("config.dat"); |
2298 |
- fd.write(pad_type); |
2299 |
- fd.write(vol_se); |
2300 |
-@@ -139,7 +139,7 @@ |
2301 |
- volumeSNDmusic(vol_music); |
2302 |
- } |
2303 |
- } catch (Error e) { |
2304 |
-- writefln("config.dat initialized"); |
2305 |
-+ printf("config.dat initialized"); |
2306 |
- fd.create("config.dat"); |
2307 |
- fd.write(pad_type); |
2308 |
- fd.write(vol_se); |
2309 |
-diff -Naur a2k_src/src/luminous.d a2k_src-p/src/luminous.d |
2310 |
---- a2k_src/src/luminous.d 2008-02-06 01:39:52.000000000 +0100 |
2311 |
-+++ a2k_src-p/src/luminous.d 2009-08-27 15:18:28.000000000 +0200 |
2312 |
-@@ -7,7 +7,7 @@ |
2313 |
- */ |
2314 |
- |
2315 |
- private import std.math; |
2316 |
--private import std.string; |
2317 |
-+private import std.c.string; |
2318 |
- private import opengl; |
2319 |
- private import util_sdl; |
2320 |
- private import task; |
2321 |
-diff -Naur a2k_src/src/main.d a2k_src-p/src/main.d |
2322 |
---- a2k_src/src/main.d 2008-02-07 00:42:58.000000000 +0100 |
2323 |
-+++ a2k_src-p/src/main.d 2009-08-27 15:18:28.000000000 +0200 |
2324 |
-@@ -6,8 +6,9 @@ |
2325 |
- 2003/11/28 jumpei isshiki |
2326 |
- */ |
2327 |
- |
2328 |
--private import std.c.windows.windows; |
2329 |
--private import SDL; |
2330 |
-+//private import std.c.windows.windows; |
2331 |
-+private import SDL; |
2332 |
-+private import SDL_Keysym; |
2333 |
- private import opengl; |
2334 |
- private import util_sdl; |
2335 |
- private import util_pad; |
2336 |
-@@ -31,25 +32,29 @@ |
2337 |
- int pause = 0; |
2338 |
- int pause_flag = 0; |
2339 |
- int skip = 0; |
2340 |
-- |
2341 |
-+/* |
2342 |
- extern (Windows) |
2343 |
- int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) |
2344 |
- { |
2345 |
-+*/ |
2346 |
-+public int main(char[][] args) { |
2347 |
- int result; |
2348 |
-- |
2349 |
-+/* |
2350 |
- gc_init(); |
2351 |
- _minit(); |
2352 |
- |
2353 |
- try{ |
2354 |
- _moduleCtor(); |
2355 |
-- _moduleUnitTests(); |
2356 |
-+ _moduleUnitTests(); |
2357 |
-+*/ |
2358 |
- result = boot(); |
2359 |
-+/* |
2360 |
- }catch (Object o){ |
2361 |
- MessageBoxA(null, cast(char*)o.toString(), "Error", MB_OK | MB_ICONEXCLAMATION); |
2362 |
- result = 0; |
2363 |
- } |
2364 |
- gc_term(); |
2365 |
-- |
2366 |
-+*/ |
2367 |
- return result; |
2368 |
- } |
2369 |
- |
2370 |
-diff -Naur a2k_src/src/middle01.d a2k_src-p/src/middle01.d |
2371 |
---- a2k_src/src/middle01.d 2008-02-06 01:36:06.000000000 +0100 |
2372 |
-+++ a2k_src-p/src/middle01.d 2009-08-27 15:18:28.000000000 +0200 |
2373 |
-@@ -6,7 +6,7 @@ |
2374 |
- 2004/05/05 jumpei isshiki |
2375 |
- */ |
2376 |
- |
2377 |
--private import std.math; |
2378 |
-+private import std.c.math; |
2379 |
- private import std.random; |
2380 |
- private import std.string; |
2381 |
- private import SDL; |
2382 |
-diff -Naur a2k_src/src/middle02.d a2k_src-p/src/middle02.d |
2383 |
---- a2k_src/src/middle02.d 2008-02-06 01:36:08.000000000 +0100 |
2384 |
-+++ a2k_src-p/src/middle02.d 2009-08-27 15:18:28.000000000 +0200 |
2385 |
-@@ -6,7 +6,7 @@ |
2386 |
- 2004/06/03 jumpei isshiki |
2387 |
- */ |
2388 |
- |
2389 |
--private import std.math; |
2390 |
-+private import std.c.math; |
2391 |
- private import std.random; |
2392 |
- private import std.string; |
2393 |
- private import SDL; |
2394 |
-diff -Naur a2k_src/src/middle03.d a2k_src-p/src/middle03.d |
2395 |
---- a2k_src/src/middle03.d 2008-02-06 01:36:12.000000000 +0100 |
2396 |
-+++ a2k_src-p/src/middle03.d 2009-08-27 15:18:28.000000000 +0200 |
2397 |
-@@ -6,7 +6,7 @@ |
2398 |
- 2004/06/07 jumpei isshiki |
2399 |
- */ |
2400 |
- |
2401 |
--private import std.math; |
2402 |
-+private import std.c.math; |
2403 |
- private import std.random; |
2404 |
- private import std.string; |
2405 |
- private import SDL; |
2406 |
-diff -Naur a2k_src/src/middle04.d a2k_src-p/src/middle04.d |
2407 |
---- a2k_src/src/middle04.d 2008-02-06 01:36:14.000000000 +0100 |
2408 |
-+++ a2k_src-p/src/middle04.d 2009-08-27 15:18:28.000000000 +0200 |
2409 |
-@@ -6,7 +6,7 @@ |
2410 |
- 2004/07/05 jumpei isshiki |
2411 |
- */ |
2412 |
- |
2413 |
--private import std.math; |
2414 |
-+private import std.c.math; |
2415 |
- private import std.random; |
2416 |
- private import std.string; |
2417 |
- private import SDL; |
2418 |
-diff -Naur a2k_src/src/middle05.d a2k_src-p/src/middle05.d |
2419 |
---- a2k_src/src/middle05.d 2008-02-06 01:36:16.000000000 +0100 |
2420 |
-+++ a2k_src-p/src/middle05.d 2009-08-27 15:18:28.000000000 +0200 |
2421 |
-@@ -6,7 +6,7 @@ |
2422 |
- 2004/07/06 jumpei isshiki |
2423 |
- */ |
2424 |
- |
2425 |
--private import std.math; |
2426 |
-+private import std.c.math; |
2427 |
- private import std.random; |
2428 |
- private import std.string; |
2429 |
- private import SDL; |
2430 |
-diff -Naur a2k_src/src/ship.d a2k_src-p/src/ship.d |
2431 |
---- a2k_src/src/ship.d 2008-02-12 23:41:50.000000000 +0100 |
2432 |
-+++ a2k_src-p/src/ship.d 2009-08-27 15:18:28.000000000 +0200 |
2433 |
-@@ -6,7 +6,7 @@ |
2434 |
- 2003/12/01 jumpei isshiki |
2435 |
- */ |
2436 |
- |
2437 |
--private import std.math; |
2438 |
-+private import std.c.math; |
2439 |
- private import std.intrinsic; |
2440 |
- private import std.random; |
2441 |
- private import SDL; |
2442 |
-diff -Naur a2k_src/src/stg.d a2k_src-p/src/stg.d |
2443 |
---- a2k_src/src/stg.d 2005-05-19 22:52:14.000000000 +0200 |
2444 |
-+++ a2k_src-p/src/stg.d 2009-08-27 15:18:28.000000000 +0200 |
2445 |
-@@ -91,25 +91,36 @@ |
2446 |
- void TSKstgCtrl(int id) |
2447 |
- { |
2448 |
- switch(TskBuf[id].step){ |
2449 |
-- case 0: |
2450 |
-+ case 0: |
2451 |
- area_num = AREA_01; |
2452 |
-- scene_num = SCENE_01; |
2453 |
-- debug{ |
2454 |
-- //area_num = AREA_02; |
2455 |
-- //area_num = AREA_03; |
2456 |
-- //area_num = AREA_04; |
2457 |
-- //area_num = AREA_05; |
2458 |
-- //scene_num = SCENE_02; |
2459 |
-- //scene_num = SCENE_03; |
2460 |
-- //scene_num = SCENE_04; |
2461 |
-- //scene_num = SCENE_05; |
2462 |
-- //scene_num = SCENE_06; |
2463 |
-- //scene_num = SCENE_07; |
2464 |
-- //scene_num = SCENE_08; |
2465 |
-- //scene_num = SCENE_09; |
2466 |
-- //scene_num = SCENE_10; |
2467 |
-- } |
2468 |
-- stg_bgm = -1; |
2469 |
-+ scene_num = SCENE_01; |
2470 |
-+ |
2471 |
-+ switch(area_num){ |
2472 |
-+ case AREA_01: |
2473 |
-+ stg_ctrl = STG_MAIN; |
2474 |
-+ setTSK(GROUP_01,&TSKstg01); |
2475 |
-+ break; |
2476 |
-+ case AREA_02: |
2477 |
-+ stg_ctrl = STG_MAIN; |
2478 |
-+ setTSK(GROUP_01,&TSKstg02); |
2479 |
-+ break; |
2480 |
-+ case AREA_03: |
2481 |
-+ stg_ctrl = STG_MAIN; |
2482 |
-+ setTSK(GROUP_01,&TSKstg03); |
2483 |
-+ break; |
2484 |
-+ case AREA_04: |
2485 |
-+ stg_ctrl = STG_MAIN; |
2486 |
-+ setTSK(GROUP_01,&TSKstg04); |
2487 |
-+ break; |
2488 |
-+ case AREA_05: |
2489 |
-+ stg_ctrl = STG_MAIN; |
2490 |
-+ setTSK(GROUP_01,&TSKstg05); |
2491 |
-+ break; |
2492 |
-+ default: |
2493 |
-+ g_step = GSTEP_CLEAR; |
2494 |
-+ break; |
2495 |
-+ } |
2496 |
-+ stg_bgm = -1; |
2497 |
- stg_ctrl = STG_INIT; |
2498 |
- TskBuf[id].step++; |
2499 |
- break; |
2500 |
-@@ -177,7 +188,7 @@ |
2501 |
- { |
2502 |
- switch(TskBuf[id].step){ |
2503 |
- case 0: |
2504 |
-- stg_ctrl = STG_INIT; |
2505 |
-+// stg_ctrl = ; |
2506 |
- TskBuf[id].step++; |
2507 |
- break; |
2508 |
- case 1: |
2509 |
-diff -Naur a2k_src/src/system.d a2k_src-p/src/system.d |
2510 |
---- a2k_src/src/system.d 2005-05-19 22:31:20.000000000 +0200 |
2511 |
-+++ a2k_src-p/src/system.d 2009-08-27 15:18:28.000000000 +0200 |
2512 |
-@@ -6,7 +6,7 @@ |
2513 |
- 2004/03/24 jumpei isshiki |
2514 |
- */ |
2515 |
- |
2516 |
--private import std.stdio; |
2517 |
-+private import std.c.stdio; |
2518 |
- private import std.math; |
2519 |
- private import std.random; |
2520 |
- private import std.string; |
2521 |
-@@ -22,6 +22,11 @@ |
2522 |
- private import stg; |
2523 |
- private import bg; |
2524 |
- private import ship; |
2525 |
-+ |
2526 |
-+const real PI = 0x1.921fb54442d1846ap+1; |
2527 |
-+const real PI_2 = 1.57079632679489661923; |
2528 |
-+const real PI_4 = 0.78539816339744830962; |
2529 |
-+const real SQRT2 = 1.41421356237309504880; |
2530 |
- |
2531 |
- private char[] str_buf; |
2532 |
- private int wrk1_time; |
2533 |
-diff -Naur a2k_src/src/task.d a2k_src-p/src/task.d |
2534 |
---- a2k_src/src/task.d 2008-02-07 00:38:58.000000000 +0100 |
2535 |
-+++ a2k_src-p/src/task.d 2009-08-27 15:18:28.000000000 +0200 |
2536 |
-@@ -153,7 +153,9 @@ |
2537 |
- TskBuf[i].fp_exit = null; |
2538 |
- TskBuf[i].image = null; |
2539 |
- TskBuf[i].bullet_command = null; |
2540 |
-- TskBuf[i].bullet_state = null; |
2541 |
-+ TskBuf[i].bullet_state = null; |
2542 |
-+ TskBuf[i].bullet_accx = 0; |
2543 |
-+ TskBuf[i].bullet_accy = 0; |
2544 |
- } |
2545 |
- TskBuf[i].tskid = TSKID_NONE; |
2546 |
- TskBuf[i].entry = -1; |
2547 |
-diff -Naur a2k_src/src/title.d a2k_src-p/src/title.d |
2548 |
---- a2k_src/src/title.d 2008-02-12 23:50:14.000000000 +0100 |
2549 |
-+++ a2k_src-p/src/title.d 2009-08-27 15:18:28.000000000 +0200 |
2550 |
-@@ -6,7 +6,7 @@ |
2551 |
- 2004/04/08 jumpei isshiki |
2552 |
- */ |
2553 |
- |
2554 |
--private import std.stdio; |
2555 |
-+private import std.c.stdio; |
2556 |
- private import std.math; |
2557 |
- private import std.string; |
2558 |
- private import SDL; |
2559 |
-diff -Naur a2k_src/src/util_ascii.d a2k_src-p/src/util_ascii.d |
2560 |
---- a2k_src/src/util_ascii.d 2005-05-19 22:30:50.000000000 +0200 |
2561 |
-+++ a2k_src-p/src/util_ascii.d 2009-08-27 15:18:28.000000000 +0200 |
2562 |
-@@ -13,7 +13,15 @@ |
2563 |
- |
2564 |
- const float ASC_SIZE = (16.0f + 2.0f); |
2565 |
- |
2566 |
--private float[][] ascii_font = [ |
2567 |
-+float[][] ascii_font; |
2568 |
-+ |
2569 |
-+ |
2570 |
-+ |
2571 |
-+private char[] ascii_dict = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.:!?\"'-=+ 0123456789"; |
2572 |
-+ |
2573 |
-+void initASCII() |
2574 |
-+{ |
2575 |
-+static float[][] af = [ |
2576 |
- /* 'A' */ |
2577 |
- [ |
2578 |
- 3, 0, 11, 2, |
2579 |
-@@ -328,10 +336,14 @@ |
2580 |
- ], |
2581 |
- ]; |
2582 |
- |
2583 |
--private char[] ascii_dict = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.:!?\"'-=+ 0123456789"; |
2584 |
-+ ascii_font.length = af.length; |
2585 |
-+ for (int i = 0; i < ascii_font.length; i++) { |
2586 |
-+ ascii_font[i].length = af[i].length; |
2587 |
-+ for (int j = 0; j < ascii_font[i].length; j++) { |
2588 |
-+ ascii_font[i][j] = af[i][j]; |
2589 |
-+ } |
2590 |
-+ } |
2591 |
- |
2592 |
--void initASCII() |
2593 |
--{ |
2594 |
- for(int i = 0; i < ascii_font.length; i++){ |
2595 |
- for(int j = 0; j < ascii_font[i].length; j += 4){ |
2596 |
- ascii_font[i][j+2] += 1.0f; |
2597 |
-diff -Naur a2k_src/src/util_pad.d a2k_src-p/src/util_pad.d |
2598 |
---- a2k_src/src/util_pad.d 2008-02-12 23:46:38.000000000 +0100 |
2599 |
-+++ a2k_src-p/src/util_pad.d 2009-08-27 15:18:28.000000000 +0200 |
2600 |
-@@ -7,7 +7,8 @@ |
2601 |
- */ |
2602 |
- |
2603 |
- private import SDL; |
2604 |
-- |
2605 |
-+private import SDL_Keysym; |
2606 |
-+private import SDL_keyboard; |
2607 |
- enum{ |
2608 |
- PAD_UP = 0x01, |
2609 |
- PAD_DOWN = 0x02, |
2610 |
-diff -Naur a2k_src/src/util_sdl.d a2k_src-p/src/util_sdl.d |
2611 |
---- a2k_src/src/util_sdl.d 2008-02-06 01:41:02.000000000 +0100 |
2612 |
-+++ a2k_src-p/src/util_sdl.d 2009-08-27 15:18:28.000000000 +0200 |
2613 |
-@@ -6,9 +6,12 @@ |
2614 |
- 2003/11/28 jumpei isshiki |
2615 |
- */ |
2616 |
- |
2617 |
-+private import std.stdio; |
2618 |
- private import std.string; |
2619 |
--private import SDL; |
2620 |
-+private import SDL; |
2621 |
-+private import SDL_mouse; |
2622 |
- private import opengl; |
2623 |
-+private import util_pad; |
2624 |
- private import define; |
2625 |
- |
2626 |
- enum{ |
2627 |
-@@ -30,11 +33,18 @@ |
2628 |
- EX, |
2629 |
- EY, |
2630 |
- } |
2631 |
-- |
2632 |
-+ |
2633 |
-+struct VEC_POS { |
2634 |
-+ float px; |
2635 |
-+ float py; |
2636 |
-+ float pz; |
2637 |
-+} |
2638 |
- |
2639 |
- SDL_Surface* primary; |
2640 |
- SDL_Surface*[] offscreen; |
2641 |
-- |
2642 |
-+ |
2643 |
-+const float SCREEN_RATIOX = cast(float)(SCREEN_X / 2.0f); |
2644 |
-+const float SCREEN_RATIOY = cast(float)(SCREEN_Y / 2.0f); |
2645 |
- const float BASE_Z = 2.0f; |
2646 |
- float cam_scr = -0.75f; |
2647 |
- float cam_pos; |
2648 |
-@@ -43,20 +53,27 @@ |
2649 |
- private int height = SCREEN_Y; |
2650 |
- private float nearPlane = 0.0f; |
2651 |
- private float farPlane = 1000.0f; |
2652 |
-- |
2653 |
-+private GLuint TEXTURE_NONE = 0xffffffff; |
2654 |
- private GLuint[] tex_bank; |
2655 |
- |
2656 |
--int initSDL() |
2657 |
-+int initSDL() |
2658 |
-+ |
2659 |
- { |
2660 |
- if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK) < 0){ |
2661 |
- return 0; |
2662 |
- } |
2663 |
- |
2664 |
- Uint32 videoFlags; |
2665 |
-- videoFlags = SDL_OPENGL | SDL_FULLSCREEN; |
2666 |
-+// videoFlags = SDL_OPENGL | SDL_FULLSCREEN; |
2667 |
- //videoFlags = SDL_OPENGL | SDL_RESIZABLE; |
2668 |
- debug{ |
2669 |
-- videoFlags = SDL_OPENGL | SDL_RESIZABLE; |
2670 |
-+ if((pads & PAD_BUTTON1)){ |
2671 |
-+ videoFlags = SDL_OPENGL | SDL_FULLSCREEN; |
2672 |
-+ }else{ |
2673 |
-+ videoFlags = SDL_OPENGL | SDL_RESIZABLE; |
2674 |
-+ } |
2675 |
-+ }else{ |
2676 |
-+ videoFlags = SDL_OPENGL | SDL_FULLSCREEN; |
2677 |
- } |
2678 |
- primary = SDL_SetVideoMode(width, height, 0, videoFlags); |
2679 |
- if(primary == null){ |
2680 |
-@@ -67,14 +84,15 @@ |
2681 |
- tex_bank.length = SURFACE_MAX; |
2682 |
- for(int i = 0; i < SURFACE_MAX; i++){ |
2683 |
- offscreen[i] = null; |
2684 |
-- tex_bank[i] = cast(GLuint)-1; |
2685 |
-+ tex_bank[i] = TEXTURE_NONE; |
2686 |
- } |
2687 |
- |
2688 |
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f); |
2689 |
- resizedSDL(width, height); |
2690 |
- SDL_ShowCursor(SDL_DISABLE); |
2691 |
- |
2692 |
-- SDL_WM_SetCaption(cast(char*)PROJECT_NAME, null); |
2693 |
-+ SDL_WM_SetCaption(cast(char*)PROJECT_NAME, null); |
2694 |
-+ SDL_WM_SetIcon(SDL_LoadBMP("icon.bmp"), null); |
2695 |
- |
2696 |
- return 1; |
2697 |
- } |
2698 |
-@@ -96,9 +114,9 @@ |
2699 |
- SDL_ShowCursor(SDL_ENABLE); |
2700 |
- SDL_Quit(); |
2701 |
- } |
2702 |
-+ |
2703 |
- |
2704 |
-- |
2705 |
--void readSDLtexture(char[] fname, int bank) |
2706 |
-+void readSDLtexture(char[] fname, int bank) |
2707 |
- { |
2708 |
- offscreen[bank] = SDL_LoadBMP(toStringz(fname)); |
2709 |
- if(offscreen[bank]){ |
2710 |
-@@ -110,31 +128,28 @@ |
2711 |
- } |
2712 |
- } |
2713 |
- |
2714 |
-- |
2715 |
--void bindSDLtexture(int bank) |
2716 |
-+void bindSDLtexture(int bank) |
2717 |
- { |
2718 |
-- if(tex_bank[bank] != -1) glBindTexture(GL_TEXTURE_2D, tex_bank[bank]); |
2719 |
-+ if(tex_bank[bank] != TEXTURE_NONE) glBindTexture(GL_TEXTURE_2D, tex_bank[bank]); |
2720 |
- } |
2721 |
- |
2722 |
-- |
2723 |
--void clearSDL() |
2724 |
-+void clearSDL() |
2725 |
- { |
2726 |
- glClear(GL_COLOR_BUFFER_BIT); |
2727 |
- } |
2728 |
- |
2729 |
-- |
2730 |
--void flipSDL() |
2731 |
-+void flipSDL() |
2732 |
- { |
2733 |
- glFlush(); |
2734 |
- SDL_GL_SwapBuffers(); |
2735 |
- } |
2736 |
- |
2737 |
-- |
2738 |
--void resizedSDL(int w, int h) |
2739 |
-+void resizedSDL(int w, int h) |
2740 |
- { |
2741 |
- glViewport(0, 0, w, h); |
2742 |
- glMatrixMode(GL_PROJECTION); |
2743 |
- glLoadIdentity(); |
2744 |
-+ w = (w ? w : 1); |
2745 |
- glFrustum(-nearPlane,nearPlane, |
2746 |
- -nearPlane * h / w, |
2747 |
- nearPlane * h / w, |
2748 |
|
2749 |
diff --git a/games-action/area2048/files/area2048.png b/games-action/area2048/files/area2048.png |
2750 |
deleted file mode 100644 |
2751 |
index 7dd52e2..0000000 |
2752 |
Binary files a/games-action/area2048/files/area2048.png and /dev/null differ |
2753 |
|
2754 |
diff --git a/games-action/area2048/metadata.xml b/games-action/area2048/metadata.xml |
2755 |
deleted file mode 100644 |
2756 |
index 1811bf7..0000000 |
2757 |
--- a/games-action/area2048/metadata.xml |
2758 |
+++ /dev/null |
2759 |
@@ -1,8 +0,0 @@ |
2760 |
-<?xml version="1.0" encoding="UTF-8"?> |
2761 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
2762 |
-<pkgmetadata> |
2763 |
-<maintainer type="person"> |
2764 |
- <email>frostworks@×××.de</email> |
2765 |
- <name>Marcel Unbehaun</name> |
2766 |
-</maintainer> |
2767 |
-</pkgmetadata> |