Author: pdewacht-guest
Date: 2007-08-29 17:17:04 +0000 (Wed, 29 Aug 2007)
New Revision: 3951

Modified:
   packages/trunk/torus-trooper/debian/patches/directories.patch
   packages/trunk/torus-trooper/debian/patches/fixes.patch
Log:
fix crash at startup. remove many unnecessary patches.


Modified: packages/trunk/torus-trooper/debian/patches/directories.patch
===================================================================
--- packages/trunk/torus-trooper/debian/patches/directories.patch       
2007-08-29 17:12:03 UTC (rev 3950)
+++ packages/trunk/torus-trooper/debian/patches/directories.patch       
2007-08-29 17:17:04 UTC (rev 3951)
@@ -1,23 +1,23 @@
 # Copyright (C) 2007  Miriam Ruiz <[EMAIL PROTECTED]>
 # Distributed under the same license as the game. See debian/copyright.
 
-Index: torus-trooper-0.22.dfsg1/src/abagames/tt/barrage.d
+Index: torus-trooper_0.22.dfsg1/src/abagames/tt/barrage.d
 ===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/tt/barrage.d    2007-08-26 
18:11:25.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/tt/barrage.d 2007-08-26 
18:13:01.000000000 +0000
-@@ -96,7 +96,7 @@
+--- torus-trooper_0.22.dfsg1.orig/src/abagames/tt/barrage.d    2007-08-29 
18:58:00.000000000 +0200
++++ torus-trooper_0.22.dfsg1/src/abagames/tt/barrage.d 2007-08-29 
19:06:28.000000000 +0200
+@@ -93,7 +93,7 @@
+ public class BarrageManager {
   private:
    static BulletMLParserTinyXML *parser[char[]][char[]];
-   static BulletMLParserTinyXML *parser2[char[]];
 -  static const char[] BARRAGE_DIR_NAME = "barrage";
 +  static const char[] BARRAGE_DIR_NAME = 
"/usr/share/games/torus-trooper/barrage";
  
    public static void load() {
-     char[][] dirs = linux_listdir.listdir(BARRAGE_DIR_NAME);
-Index: torus-trooper-0.22.dfsg1/src/abagames/util/sdl/sound.d
+     char[][] dirs = listdir(BARRAGE_DIR_NAME);
+Index: torus-trooper_0.22.dfsg1/src/abagames/util/sdl/sound.d
 ===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/util/sdl/sound.d        
2007-08-26 18:09:49.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/util/sdl/sound.d     2007-08-26 
18:10:56.000000000 +0000
+--- torus-trooper_0.22.dfsg1.orig/src/abagames/util/sdl/sound.d        
2004-11-10 23:45:22.000000000 +0100
++++ torus-trooper_0.22.dfsg1/src/abagames/util/sdl/sound.d     2007-08-29 
19:06:28.000000000 +0200
 @@ -67,7 +67,7 @@
  public class Music: Sound {
   public:
@@ -36,10 +36,10 @@
   private:
    Mix_Chunk* chunk;
    int chunkChannel;
-Index: torus-trooper-0.22.dfsg1/src/abagames/util/sdl/texture.d
+Index: torus-trooper_0.22.dfsg1/src/abagames/util/sdl/texture.d
 ===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/util/sdl/texture.d      
2007-08-26 18:08:31.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/util/sdl/texture.d   2007-08-26 
18:09:11.000000000 +0000
+--- torus-trooper_0.22.dfsg1.orig/src/abagames/util/sdl/texture.d      
2004-11-10 23:45:22.000000000 +0100
++++ torus-trooper_0.22.dfsg1/src/abagames/util/sdl/texture.d   2007-08-29 
19:06:28.000000000 +0200
 @@ -15,7 +15,7 @@
   */
  public class Texture {

Modified: packages/trunk/torus-trooper/debian/patches/fixes.patch
===================================================================
--- packages/trunk/torus-trooper/debian/patches/fixes.patch     2007-08-29 
17:12:03 UTC (rev 3950)
+++ packages/trunk/torus-trooper/debian/patches/fixes.patch     2007-08-29 
17:17:04 UTC (rev 3951)
@@ -1,7 +1,7 @@
-Index: torus-trooper-0.22.dfsg1/import/SDL.d
+Index: torus-trooper_0.22.dfsg1/import/SDL.d
 ===================================================================
---- torus-trooper-0.22.dfsg1.orig/import/SDL.d 2004-11-10 22:45:22.000000000 
+0000
-+++ torus-trooper-0.22.dfsg1/import/SDL.d      2007-08-26 17:39:19.000000000 
+0000
+--- torus-trooper_0.22.dfsg1.orig/import/SDL.d 2007-08-29 19:11:03.000000000 
+0200
++++ torus-trooper_0.22.dfsg1/import/SDL.d      2007-08-29 19:11:05.000000000 
+0200
 @@ -20,18 +20,28 @@
      [EMAIL PROTECTED]
  */
@@ -18,8 +18,8 @@
 -import SDL_video;
 -import SDL_byteorder;
 -import SDL_Version;
-+public import SDL_keysym_;
-+public import SDL_version_;
++public import SDL_Keysym;
++public import SDL_Version;
 +public import SDL_active;
 +public import SDL_audio;
 +public import SDL_byteorder;
@@ -64,10 +64,10 @@
 -      SDL_Quit();
 -}
 -+/
-Index: torus-trooper-0.22.dfsg1/import/SDL_events.d
+Index: torus-trooper_0.22.dfsg1/import/SDL_events.d
 ===================================================================
---- torus-trooper-0.22.dfsg1.orig/import/SDL_events.d  2005-01-01 
21:40:28.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/import/SDL_events.d       2007-08-26 
17:39:19.000000000 +0000
+--- torus-trooper_0.22.dfsg1.orig/import/SDL_events.d  2007-08-29 
19:11:03.000000000 +0200
++++ torus-trooper_0.22.dfsg1/import/SDL_events.d       2007-08-29 
19:11:05.000000000 +0200
 @@ -304,8 +304,8 @@
    If 'state' is set to SDL_QUERY, SDL_EventState() will return the 
    current processing state of the specified event.
@@ -81,442 +81,10 @@
 +const int SDL_DISABLE = 0;
 +const int SDL_ENABLE  = 1;
  Uint8 SDL_EventState(Uint8 type, int state);
-Index: torus-trooper-0.22.dfsg1/import/SDL_keyboard.d
+Index: torus-trooper_0.22.dfsg1/Makefile
 ===================================================================
---- torus-trooper-0.22.dfsg1.orig/import/SDL_keyboard.d        2004-11-10 
22:45:22.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/import/SDL_keyboard.d     2007-08-26 
17:39:19.000000000 +0000
-@@ -26,7 +26,7 @@
- // !!! A hack! struct SDL_keysym is defined in this module,
- // !!! so we need to resolve the nameclash...
- // !!! Definitely won't work on *NIX but for now will do.
--import SDL_Keysym;
-+import SDL_keysym_;
- 
- extern(C):
- 
-Index: torus-trooper-0.22.dfsg1/import/SDL_keysym_.d
-===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/import/SDL_keysym_.d      2007-08-26 
17:39:19.000000000 +0000
-@@ -0,0 +1,308 @@
-+/*
-+    SDL - Simple DirectMedia Layer
-+    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Library General Public
-+    License as published by the Free Software Foundation; either
-+    version 2 of the License, or (at your option) any later version.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Library General Public License for more details.
-+
-+    You should have received a copy of the GNU Library General Public
-+    License along with this library; if not, write to the Free
-+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-+
-+    Sam Lantinga
-+    [EMAIL PROTECTED]
-+*/
-+
-+/* What we really want is a mapping of every raw key on the keyboard.
-+   To support international keyboards, we use the range 0xA1 - 0xFF
-+   as international virtual keycodes.  We'll follow in the footsteps of X11...
-+   The names of the keys
-+ */
-+ 
-+alias int SDLKey;
-+enum {
-+      /* The keyboard syms have been cleverly chosen to map to ASCII */
-+      SDLK_UNKNOWN            = 0,
-+      SDLK_FIRST              = 0,
-+      SDLK_BACKSPACE          = 8,
-+      SDLK_TAB                = 9,
-+      SDLK_CLEAR              = 12,
-+      SDLK_RETURN             = 13,
-+      SDLK_PAUSE              = 19,
-+      SDLK_ESCAPE             = 27,
-+      SDLK_SPACE              = 32,
-+      SDLK_EXCLAIM            = 33,
-+      SDLK_QUOTEDBL           = 34,
-+      SDLK_HASH               = 35,
-+      SDLK_DOLLAR             = 36,
-+      SDLK_AMPERSAND          = 38,
-+      SDLK_QUOTE              = 39,
-+      SDLK_LEFTPAREN          = 40,
-+      SDLK_RIGHTPAREN         = 41,
-+      SDLK_ASTERISK           = 42,
-+      SDLK_PLUS               = 43,
-+      SDLK_COMMA              = 44,
-+      SDLK_MINUS              = 45,
-+      SDLK_PERIOD             = 46,
-+      SDLK_SLASH              = 47,
-+      SDLK_0                  = 48,
-+      SDLK_1                  = 49,
-+      SDLK_2                  = 50,
-+      SDLK_3                  = 51,
-+      SDLK_4                  = 52,
-+      SDLK_5                  = 53,
-+      SDLK_6                  = 54,
-+      SDLK_7                  = 55,
-+      SDLK_8                  = 56,
-+      SDLK_9                  = 57,
-+      SDLK_COLON              = 58,
-+      SDLK_SEMICOLON          = 59,
-+      SDLK_LESS               = 60,
-+      SDLK_EQUALS             = 61,
-+      SDLK_GREATER            = 62,
-+      SDLK_QUESTION           = 63,
-+      SDLK_AT                 = 64,
-+      /* 
-+         Skip uppercase letters
-+       */
-+      SDLK_LEFTBRACKET        = 91,
-+      SDLK_BACKSLASH          = 92,
-+      SDLK_RIGHTBRACKET       = 93,
-+      SDLK_CARET              = 94,
-+      SDLK_UNDERSCORE         = 95,
-+      SDLK_BACKQUOTE          = 96,
-+      SDLK_a                  = 97,
-+      SDLK_b                  = 98,
-+      SDLK_c                  = 99,
-+      SDLK_d                  = 100,
-+      SDLK_e                  = 101,
-+      SDLK_f                  = 102,
-+      SDLK_g                  = 103,
-+      SDLK_h                  = 104,
-+      SDLK_i                  = 105,
-+      SDLK_j                  = 106,
-+      SDLK_k                  = 107,
-+      SDLK_l                  = 108,
-+      SDLK_m                  = 109,
-+      SDLK_n                  = 110,
-+      SDLK_o                  = 111,
-+      SDLK_p                  = 112,
-+      SDLK_q                  = 113,
-+      SDLK_r                  = 114,
-+      SDLK_s                  = 115,
-+      SDLK_t                  = 116,
-+      SDLK_u                  = 117,
-+      SDLK_v                  = 118,
-+      SDLK_w                  = 119,
-+      SDLK_x                  = 120,
-+      SDLK_y                  = 121,
-+      SDLK_z                  = 122,
-+      SDLK_DELETE             = 127,
-+      /* End of ASCII mapped keysyms */
-+
-+      /* International keyboard syms */
-+      SDLK_WORLD_0            = 160,          /* 0xA0 */
-+      SDLK_WORLD_1            = 161,
-+      SDLK_WORLD_2            = 162,
-+      SDLK_WORLD_3            = 163,
-+      SDLK_WORLD_4            = 164,
-+      SDLK_WORLD_5            = 165,
-+      SDLK_WORLD_6            = 166,
-+      SDLK_WORLD_7            = 167,
-+      SDLK_WORLD_8            = 168,
-+      SDLK_WORLD_9            = 169,
-+      SDLK_WORLD_10           = 170,
-+      SDLK_WORLD_11           = 171,
-+      SDLK_WORLD_12           = 172,
-+      SDLK_WORLD_13           = 173,
-+      SDLK_WORLD_14           = 174,
-+      SDLK_WORLD_15           = 175,
-+      SDLK_WORLD_16           = 176,
-+      SDLK_WORLD_17           = 177,
-+      SDLK_WORLD_18           = 178,
-+      SDLK_WORLD_19           = 179,
-+      SDLK_WORLD_20           = 180,
-+      SDLK_WORLD_21           = 181,
-+      SDLK_WORLD_22           = 182,
-+      SDLK_WORLD_23           = 183,
-+      SDLK_WORLD_24           = 184,
-+      SDLK_WORLD_25           = 185,
-+      SDLK_WORLD_26           = 186,
-+      SDLK_WORLD_27           = 187,
-+      SDLK_WORLD_28           = 188,
-+      SDLK_WORLD_29           = 189,
-+      SDLK_WORLD_30           = 190,
-+      SDLK_WORLD_31           = 191,
-+      SDLK_WORLD_32           = 192,
-+      SDLK_WORLD_33           = 193,
-+      SDLK_WORLD_34           = 194,
-+      SDLK_WORLD_35           = 195,
-+      SDLK_WORLD_36           = 196,
-+      SDLK_WORLD_37           = 197,
-+      SDLK_WORLD_38           = 198,
-+      SDLK_WORLD_39           = 199,
-+      SDLK_WORLD_40           = 200,
-+      SDLK_WORLD_41           = 201,
-+      SDLK_WORLD_42           = 202,
-+      SDLK_WORLD_43           = 203,
-+      SDLK_WORLD_44           = 204,
-+      SDLK_WORLD_45           = 205,
-+      SDLK_WORLD_46           = 206,
-+      SDLK_WORLD_47           = 207,
-+      SDLK_WORLD_48           = 208,
-+      SDLK_WORLD_49           = 209,
-+      SDLK_WORLD_50           = 210,
-+      SDLK_WORLD_51           = 211,
-+      SDLK_WORLD_52           = 212,
-+      SDLK_WORLD_53           = 213,
-+      SDLK_WORLD_54           = 214,
-+      SDLK_WORLD_55           = 215,
-+      SDLK_WORLD_56           = 216,
-+      SDLK_WORLD_57           = 217,
-+      SDLK_WORLD_58           = 218,
-+      SDLK_WORLD_59           = 219,
-+      SDLK_WORLD_60           = 220,
-+      SDLK_WORLD_61           = 221,
-+      SDLK_WORLD_62           = 222,
-+      SDLK_WORLD_63           = 223,
-+      SDLK_WORLD_64           = 224,
-+      SDLK_WORLD_65           = 225,
-+      SDLK_WORLD_66           = 226,
-+      SDLK_WORLD_67           = 227,
-+      SDLK_WORLD_68           = 228,
-+      SDLK_WORLD_69           = 229,
-+      SDLK_WORLD_70           = 230,
-+      SDLK_WORLD_71           = 231,
-+      SDLK_WORLD_72           = 232,
-+      SDLK_WORLD_73           = 233,
-+      SDLK_WORLD_74           = 234,
-+      SDLK_WORLD_75           = 235,
-+      SDLK_WORLD_76           = 236,
-+      SDLK_WORLD_77           = 237,
-+      SDLK_WORLD_78           = 238,
-+      SDLK_WORLD_79           = 239,
-+      SDLK_WORLD_80           = 240,
-+      SDLK_WORLD_81           = 241,
-+      SDLK_WORLD_82           = 242,
-+      SDLK_WORLD_83           = 243,
-+      SDLK_WORLD_84           = 244,
-+      SDLK_WORLD_85           = 245,
-+      SDLK_WORLD_86           = 246,
-+      SDLK_WORLD_87           = 247,
-+      SDLK_WORLD_88           = 248,
-+      SDLK_WORLD_89           = 249,
-+      SDLK_WORLD_90           = 250,
-+      SDLK_WORLD_91           = 251,
-+      SDLK_WORLD_92           = 252,
-+      SDLK_WORLD_93           = 253,
-+      SDLK_WORLD_94           = 254,
-+      SDLK_WORLD_95           = 255,          /* 0xFF */
-+
-+      /* Numeric keypad */
-+      SDLK_KP0                = 256,
-+      SDLK_KP1                = 257,
-+      SDLK_KP2                = 258,
-+      SDLK_KP3                = 259,
-+      SDLK_KP4                = 260,
-+      SDLK_KP5                = 261,
-+      SDLK_KP6                = 262,
-+      SDLK_KP7                = 263,
-+      SDLK_KP8                = 264,
-+      SDLK_KP9                = 265,
-+      SDLK_KP_PERIOD          = 266,
-+      SDLK_KP_DIVIDE          = 267,
-+      SDLK_KP_MULTIPLY        = 268,
-+      SDLK_KP_MINUS           = 269,
-+      SDLK_KP_PLUS            = 270,
-+      SDLK_KP_ENTER           = 271,
-+      SDLK_KP_EQUALS          = 272,
-+
-+      /* Arrows + Home/End pad */
-+      SDLK_UP                 = 273,
-+      SDLK_DOWN               = 274,
-+      SDLK_RIGHT              = 275,
-+      SDLK_LEFT               = 276,
-+      SDLK_INSERT             = 277,
-+      SDLK_HOME               = 278,
-+      SDLK_END                = 279,
-+      SDLK_PAGEUP             = 280,
-+      SDLK_PAGEDOWN           = 281,
-+
-+      /* Function keys */
-+      SDLK_F1                 = 282,
-+      SDLK_F2                 = 283,
-+      SDLK_F3                 = 284,
-+      SDLK_F4                 = 285,
-+      SDLK_F5                 = 286,
-+      SDLK_F6                 = 287,
-+      SDLK_F7                 = 288,
-+      SDLK_F8                 = 289,
-+      SDLK_F9                 = 290,
-+      SDLK_F10                = 291,
-+      SDLK_F11                = 292,
-+      SDLK_F12                = 293,
-+      SDLK_F13                = 294,
-+      SDLK_F14                = 295,
-+      SDLK_F15                = 296,
-+
-+      /* Key state modifier keys */
-+      SDLK_NUMLOCK            = 300,
-+      SDLK_CAPSLOCK           = 301,
-+      SDLK_SCROLLOCK          = 302,
-+      SDLK_RSHIFT             = 303,
-+      SDLK_LSHIFT             = 304,
-+      SDLK_RCTRL              = 305,
-+      SDLK_LCTRL              = 306,
-+      SDLK_RALT               = 307,
-+      SDLK_LALT               = 308,
-+      SDLK_RMETA              = 309,
-+      SDLK_LMETA              = 310,
-+      SDLK_LSUPER             = 311,          /* Left "Windows" key */
-+      SDLK_RSUPER             = 312,          /* Right "Windows" key */
-+      SDLK_MODE               = 313,          /* "Alt Gr" key */
-+      SDLK_COMPOSE            = 314,          /* Multi-key compose key */
-+
-+      /* Miscellaneous function keys */
-+      SDLK_HELP               = 315,
-+      SDLK_PRINT              = 316,
-+      SDLK_SYSREQ             = 317,
-+      SDLK_BREAK              = 318,
-+      SDLK_MENU               = 319,
-+      SDLK_POWER              = 320,          /* Power Macintosh power key */
-+      SDLK_EURO               = 321,          /* Some european keyboards */
-+      SDLK_UNDO               = 322,          /* Atari keyboard has Undo */
-+
-+      /* Add any other keys here */
-+
-+      SDLK_LAST
-+}
-+
-+/* Enumeration of valid key mods (possibly OR'd together) */
-+alias int SDLMod;
-+enum {
-+      KMOD_NONE  = 0x0000,
-+      KMOD_LSHIFT= 0x0001,
-+      KMOD_RSHIFT= 0x0002,
-+      KMOD_LCTRL = 0x0040,
-+      KMOD_RCTRL = 0x0080,
-+      KMOD_LALT  = 0x0100,
-+      KMOD_RALT  = 0x0200,
-+      KMOD_LMETA = 0x0400,
-+      KMOD_RMETA = 0x0800,
-+      KMOD_NUM   = 0x1000,
-+      KMOD_CAPS  = 0x2000,
-+      KMOD_MODE  = 0x4000,
-+      KMOD_RESERVED = 0x8000
-+}
-+
-+const uint KMOD_CTRL  = (KMOD_LCTRL|KMOD_RCTRL);
-+const uint KMOD_SHIFT = (KMOD_LSHIFT|KMOD_RSHIFT);
-+const uint KMOD_ALT           = (KMOD_LALT|KMOD_RALT);
-+const uint KMOD_META  = (KMOD_LMETA|KMOD_RMETA);
-Index: torus-trooper-0.22.dfsg1/import/SDL_mixer.d
-===================================================================
---- torus-trooper-0.22.dfsg1.orig/import/SDL_mixer.d   2004-11-10 
22:45:22.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/import/SDL_mixer.d        2007-08-26 
17:39:19.000000000 +0000
-@@ -22,7 +22,7 @@
- 
- // convert to D by shinichiro.h
- 
--/* $Id: SDL_mixer.d,v 1.1.1.1 2004/11/10 13:45:22 kenta Exp $ */
-+/* $Id: SDL_mixer.d,v 1.1.1.1 2006/11/19 07:54:54 kenta Exp $ */
- 
- import SDL;
- 
-Index: torus-trooper-0.22.dfsg1/import/SDL_syswm.d
-===================================================================
---- torus-trooper-0.22.dfsg1.orig/import/SDL_syswm.d   2004-11-10 
22:45:22.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/import/SDL_syswm.d        2007-08-26 
17:39:19.000000000 +0000
-@@ -22,7 +22,7 @@
- 
- /* Include file for SDL custom system window manager hooks */
- 
--import SDL_Version;
-+import SDL_version_;
- 
- extern(C):
- 
-Index: torus-trooper-0.22.dfsg1/import/SDL_version_.d
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/import/SDL_version_.d     2007-08-26 
17:39:19.000000000 +0000
-@@ -0,0 +1,75 @@
-+/*
-+    SDL - Simple DirectMedia Layer
-+    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
-+
-+    This library is free software; you can redistribute it and/or
-+    modify it under the terms of the GNU Library General Public
-+    License as published by the Free Software Foundation; either
-+    version 2 of the License, or (at your option) any later version.
-+
-+    This library is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+    Library General Public License for more details.
-+
-+    You should have received a copy of the GNU Library General Public
-+    License along with this library; if not, write to the Free
-+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-+
-+    Sam Lantinga
-+    [EMAIL PROTECTED]
-+*/
-+
-+/* This header defines the current SDL version */
-+
-+import SDL_types;
-+
-+extern(C):
-+
-+/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
-+*/
-+const uint SDL_MAJOR_VERSION  = 1;
-+const uint SDL_MINOR_VERSION  = 2;
-+const uint SDL_PATCHLEVEL             = 6;
-+
-+struct SDL_version {
-+      Uint8 major;
-+      Uint8 minor;
-+      Uint8 patch;
-+}
-+
-+/* This macro can be used to fill a version structure with the compile-time
-+ * version of the SDL library.
-+ */
-+void SDL_VERSION(SDL_version* X)
-+{
-+      X.major = SDL_MAJOR_VERSION;
-+      X.minor = SDL_MINOR_VERSION;
-+      X.patch = SDL_PATCHLEVEL;
-+}
-+
-+/* This macro turns the version numbers into a numeric value:
-+   (1,2,3) -> (1203)
-+   This assumes that there will never be more than 100 patchlevels
-+*/
-+uint SDL_VERSIONNUM(Uint8 X, Uint8 Y, Uint8 Z)
-+{
-+      return X * 1000 + Y * 100 + Z;
-+}
-+
-+/* This is the version number macro for the current SDL version */
-+const uint SDL_COMPILEDVERSION = SDL_MAJOR_VERSION * 1000 +
-+                                                                      
SDL_MINOR_VERSION * 100 +
-+                                                                      
SDL_PATCHLEVEL;
-+
-+/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */
-+bit SDL_VERSION_ATLEAST(Uint8 X, Uint8 Y, Uint8 Z)
-+{
-+      return (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z));
-+}
-+
-+/* This function gets the version of the dynamically linked SDL library.
-+   it should NOT be used to fill a version structure, instead you should
-+   use the SDL_Version() macro.
-+ */
-+SDL_version * SDL_Linked_Version();
-Index: torus-trooper-0.22.dfsg1/Makefile
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/Makefile  2007-08-26 17:39:19.000000000 +0000
++++ torus-trooper_0.22.dfsg1/Makefile  2007-08-29 19:11:24.000000000 +0200
 @@ -0,0 +1,27 @@
 +DC=gdmd
 +#DC=gdc
@@ -545,204 +113,10 @@
 +
 +
 +
-Index: torus-trooper-0.22.dfsg1/src/abagames/tt/barrage.d
+Index: torus-trooper_0.22.dfsg1/src/abagames/util/logger.d
 ===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/tt/barrage.d    2005-01-01 
21:40:28.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/tt/barrage.d 2007-08-26 
17:39:19.000000000 +0000
-@@ -17,6 +17,7 @@
- private import abagames.tt.bulletimpl;
- private import abagames.tt.bullettarget;
- private import abagames.tt.shape;
-+import linux_listdir;
- 
- /**
-  * Barrage pattern.
-@@ -30,11 +31,12 @@
-   int prevWait, postWait;
-   bool noXReverse = false;
- 
--  public static this() {
-+  public static void randInit() {
-     rand = new Rand;
-   }
- 
-   public static void setRandSeed(long seed) {
-+  if (!rand) rand = new Rand;
-     rand.setSeed(seed);
-   }
- 
-@@ -93,29 +95,31 @@
- public class BarrageManager {
-  private:
-   static BulletMLParserTinyXML *parser[char[]][char[]];
-+  static BulletMLParserTinyXML *parser2[char[]];
-   static const char[] BARRAGE_DIR_NAME = "barrage";
- 
-   public static void load() {
--    char[][] dirs = listdir(BARRAGE_DIR_NAME);
-+    char[][] dirs = linux_listdir.listdir(BARRAGE_DIR_NAME);
-     foreach (char[] dirName; dirs) {
--      char[][] files = listdir(BARRAGE_DIR_NAME ~ "/" ~ dirName);
-+      char[][] files = linux_listdir.listdir(BARRAGE_DIR_NAME ~ "/" ~ 
dirName);
-       foreach (char[] fileName; files) {
-         if (getExt(fileName) != "xml")
-           continue;
--        parser[dirName][fileName] = getInstance(dirName, fileName);
-+      char[] barrageName = dirName ~ "/" ~ fileName;
-+        parser2[barrageName] = getInstance(dirName, fileName);
-       }
-     }
-   }
- 
-   public static BulletMLParserTinyXML* getInstance(char[] dirName, char[] 
fileName) {
--    if (!parser[dirName][fileName]) {
--      char[] barrageName = dirName ~ "/" ~ fileName;
--      Logger.info("Load BulletML: " ~ barrageName);
--      parser[dirName][fileName] = 
--        BulletMLParserTinyXML_new(std.string.toStringz(BARRAGE_DIR_NAME ~ "/" 
~ barrageName));
--      BulletMLParserTinyXML_parse(parser[dirName][fileName]);
-+      char[] barrageName = dirName ~ "/" ~ fileName;
-+    if (!parser2[barrageName]) {
-+      Logger.info("Load BulletML: " ~ barrageName);
-+      parser2[barrageName] = 
-+        BulletMLParserTinyXML_new(std.string.toStringz(BARRAGE_DIR_NAME ~ "/" 
~ barrageName));
-+      BulletMLParserTinyXML_parse(parser2[barrageName]);
-     }
--    return parser[dirName][fileName];
-+    return parser2[barrageName];
-   }
- 
-   public static BulletMLParserTinyXML*[] getInstanceList(char[] dirName) {
-Index: torus-trooper-0.22.dfsg1/src/abagames/tt/enemy.d
-===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/tt/enemy.d      2005-01-09 
12:50:00.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/tt/enemy.d   2007-08-26 
17:39:19.000000000 +0000
-@@ -59,6 +59,9 @@
- 
-   public static this() {
-     rand = new Rand;
-+    ShipShape.randInit();
-+    Particle.randInit();
-+    Barrage.randInit();
-   }
- 
-   public static void setRandSeed(long seed) {
-Index: torus-trooper-0.22.dfsg1/src/abagames/tt/particle.d
-===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/tt/particle.d   2005-01-01 
21:40:28.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/tt/particle.d        2007-08-26 
17:39:19.000000000 +0000
-@@ -42,7 +42,7 @@
-   float d1, d2, md1, md2;
-   float width, height;
- 
--  public static this() {
-+  public static void randInit() {
-     rand = new Rand;
-   }
- 
-Index: torus-trooper-0.22.dfsg1/src/abagames/tt/shape.d
-===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/tt/shape.d      2004-11-12 
23:46:02.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/tt/shape.d   2007-08-26 
17:39:19.000000000 +0000
-@@ -66,10 +66,10 @@
-   Vector rocketPos, fragmentPos;
-   int color;
- 
--  static this() {
-+  public static void randInit() {
-     rand = new Rand;
-   }
--  
-+
-   public this(long randSeed) {
-     rand.setSeed(randSeed);
-   }
-@@ -809,7 +809,7 @@
-     _collision = new Vector;
-     return _shape = v;
-   }
--  
-+
-   public float size(float v) {
-     return _size = v;
-   }
-Index: torus-trooper-0.22.dfsg1/src/abagames/tt/stagemanager.d
-===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/tt/stagemanager.d       
2005-01-09 12:50:00.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/tt/stagemanager.d    2007-08-26 
17:39:19.000000000 +0000
-@@ -435,25 +435,25 @@
-     br.setLongRange(longRange);
-     BulletMLParserTinyXML*[] ps;
-     int psn;
--    if (baseDir) {
--      ps = BarrageManager.getInstanceList(baseDir);
--      int pi = rand.nextInt(ps.length);
--      br.addBml(ps[pi], rank, true, speedRank);
--    } else {
-+  //  if (baseDir) {
-+    //  ps = BarrageManager.getInstanceList(baseDir);
-+    //  int pi = rand.nextInt(ps.length);
-+    //  br.addBml(ps[pi], rank, true, speedRank);
-+  //  } else {
-       br.addBml("basic", "straight.xml", rank, true, speedRank);
--    }
--    ps = BarrageManager.getInstanceList("morph");
--    psn = ps.length;
-+  //  }
-+ //   ps = BarrageManager.getInstanceList("morph");
-+    psn = 13;
-     for (int i = 0; i < morphCnt; i++) {
--      int pi = rand.nextInt(ps.length);
--      while (!ps[pi]) {
--        pi--;
-+      int pi = rand.nextInt(13);
-+    //  while (!ps[pi]) {
-+      //  pi--;
-         if (pi < 0)
--          pi = ps.length - 1;
--      }
--      br.addBml(ps[pi], morphRank, true, speedRank);
--      delete ps[pi];
--      psn--;
-+          pi = 13 - 1;
-+  //    }
-+//      br.addBml(ps[pi], morphRank, true, speedRank);
-+  //    delete ps[pi];
-+    //  psn--;
-     }
-     return br;
-   }
-Index: torus-trooper-0.22.dfsg1/src/abagames/util/bulletml/bullet.d
-===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/util/bulletml/bullet.d  
2005-01-01 21:40:28.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/util/bulletml/bullet.d       
2007-08-26 17:39:19.000000000 +0000
-@@ -77,7 +77,7 @@
-     this.runner = runner;
-   }
- 
--  public void set(BulletMLRunner* runner, 
-+  public void set(BulletMLRunner* runner,
-                 float x, float y, float deg, float speed, float rank) {
-     set(x, y, deg, speed, rank);
-     setRunner(runner);
-Index: torus-trooper-0.22.dfsg1/src/abagames/util/iterator.d
-===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/util/iterator.d 2005-01-01 
21:40:28.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/util/iterator.d      2007-08-26 
17:39:19.000000000 +0000
-@@ -35,4 +35,7 @@
-   }
- }
- 
--alias ArrayIterator!(char[]) StringIterator;
-+//alias ArrayIterator!(char[]) StringIterator;
-+class StringIterator : ArrayIterator!(char[]) {
-+    this(char[][] d) { super(d); }
-+}
-\ No newline at end of file
-Index: torus-trooper-0.22.dfsg1/src/abagames/util/logger.d
-===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/util/logger.d   2004-11-10 
22:45:22.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/util/logger.d        2007-08-26 
17:39:19.000000000 +0000
+--- torus-trooper_0.22.dfsg1.orig/src/abagames/util/logger.d   2007-08-29 
19:11:03.000000000 +0200
++++ torus-trooper_0.22.dfsg1/src/abagames/util/logger.d        2007-08-29 
19:11:05.000000000 +0200
 @@ -5,7 +5,7 @@
   */
  module abagames.util.logger;
@@ -788,10 +162,10 @@
      if (e.next)
        error(e.next);
    }
-Index: torus-trooper-0.22.dfsg1/src/abagames/util/sdl/luminous.d
+Index: torus-trooper_0.22.dfsg1/src/abagames/util/sdl/luminous.d
 ===================================================================
---- torus-trooper-0.22.dfsg1.orig/src/abagames/util/sdl/luminous.d     
2005-01-01 21:40:28.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/abagames/util/sdl/luminous.d  2007-08-26 
17:39:19.000000000 +0000
+--- torus-trooper_0.22.dfsg1.orig/src/abagames/util/sdl/luminous.d     
2007-08-29 19:11:03.000000000 +0200
++++ torus-trooper_0.22.dfsg1/src/abagames/util/sdl/luminous.d  2007-08-29 
19:11:05.000000000 +0200
 @@ -9,6 +9,7 @@
  private import std.string;
  private import opengl;
@@ -800,53 +174,107 @@
  
  /**
   * Luminous effect texture.
-Index: torus-trooper-0.22.dfsg1/src/linux_listdir.d
+@@ -30,7 +31,7 @@
+   }
+ 
+   private void makeLuminousTexture() {
+-    uint *data = td;
++    uint *data = td.ptr;
+     int i;
+     memset(data, 0, luminousTextureWidth * luminousTextureHeight * 4 * 
uint.sizeof);
+     glGenTextures(1, &luminousTexture);
+Index: torus-trooper_0.22.dfsg1/src/abagames/tt/barrage.d
 ===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ torus-trooper-0.22.dfsg1/src/linux_listdir.d       2007-08-26 
17:39:19.000000000 +0000
-@@ -0,0 +1,45 @@
-+private import std.string;
-+
-+/***************************************************
-+ * Return contents of directory.
-+ */
-+
-+extern (C)
-+{
-+      struct DIR;
-+
-+      struct Dirent
-+      {
-+              uint d_ino;
-+              uint d_off;
-+              ushort d_reclen;
-+              char d_type;
-+              char[256] d_name;       /* NAME_MAX+1 from linux/limits.h */
-+      };
-+      
-+      DIR* opendir(char* name);
-+      int closedir(DIR* dir);
-+      Dirent* readdir(DIR* dir);
-+}
-+
-+char[][] listdir(char[] pathname)
-+{
-+
-+      Dirent* entry;
-+      DIR* dir = opendir(toStringz(pathname));
-+      char[][] result;
-+      entry = readdir(dir);
-+      while ( entry !is null )
-+      {
-+              
-+              if ( std.string.strcmp(entry.d_name.ptr, ".") != 0
-+                      && std.string.strcmp(entry.d_name.ptr, "..") != 0)
-+              {
-+                      result ~= std.string.toString(entry.d_name.ptr).dup;
-+              }
-+              entry = readdir(dir);
-+      }
-+      closedir(dir);
-+      return result;
-+
-+}
+--- torus-trooper_0.22.dfsg1.orig/src/abagames/tt/barrage.d    2007-08-29 
19:11:03.000000000 +0200
++++ torus-trooper_0.22.dfsg1/src/abagames/tt/barrage.d 2007-08-29 
19:11:05.000000000 +0200
+@@ -98,6 +98,7 @@
+   public static void load() {
+     char[][] dirs = listdir(BARRAGE_DIR_NAME);
+     foreach (char[] dirName; dirs) {
++      parser[dirName] = null;
+       char[][] files = listdir(BARRAGE_DIR_NAME ~ "/" ~ dirName);
+       foreach (char[] fileName; files) {
+         if (getExt(fileName) != "xml")
+Index: torus-trooper_0.22.dfsg1/src/abagames/tt/camera.d
+===================================================================
+--- torus-trooper_0.22.dfsg1.orig/src/abagames/tt/camera.d     2007-08-29 
19:11:03.000000000 +0200
++++ torus-trooper_0.22.dfsg1/src/abagames/tt/camera.d  2007-08-29 
19:11:05.000000000 +0200
+@@ -155,10 +155,10 @@
+     moveCnt--;
+     if (moveCnt < 0) {
+       moveCnt = 15 + rand.nextInt(15);
+-      float lox = fabs(_lookAtPos.x - _cameraPos.x);
+-      if (lox > PI)
+-        lox = PI * 2 - lox;
+-      float ofs = lox * 3 + fabs(_lookAtPos.y - _cameraPos.y);
++      float newlox = fabs(_lookAtPos.x - _cameraPos.x);
++      if (newlox > PI)
++        newlox = PI * 2 - newlox;
++      float ofs = newlox * 3 + fabs(_lookAtPos.y - _cameraPos.y);
+       zoomTrg = 3.0f / ofs;
+       if (zoomTrg < zoomMin)
+         zoomTrg = zoomMin;
+Index: torus-trooper_0.22.dfsg1/src/abagames/tt/shape.d
+===================================================================
+--- torus-trooper_0.22.dfsg1.orig/src/abagames/tt/shape.d      2007-08-29 
19:11:03.000000000 +0200
++++ torus-trooper_0.22.dfsg1/src/abagames/tt/shape.d   2007-08-29 
19:11:05.000000000 +0200
+@@ -248,21 +248,23 @@
+                                   float wingD1, float wingD2, int color, int 
shp, int divNum,
+                                   int rev, bool damaged = false) {
+     Structure[] sts;
+-    Structure st = new Structure;
+-    st.pos.x = ox;
+-    st.pos.y = oy;
+-    st.d1 = st.d2 = 0;
+-    st.width = rocketLength * 0.15;
+-    st.height = rocketLength;
+-    st.shape = Structure.Shape.ROCKET;
+-    st.shapeXReverse = 1;
+-    if (!damaged)
+-      st.color = 1;
+-    else
+-      st.color = 0;
+-    if (rev == -1)
+-      st.pos.x *= -1;
+-    sts ~= st;
++    {
++      Structure st = new Structure;
++      st.pos.x = ox;
++      st.pos.y = oy;
++      st.d1 = st.d2 = 0;
++      st.width = rocketLength * 0.15;
++      st.height = rocketLength;
++      st.shape = Structure.Shape.ROCKET;
++      st.shapeXReverse = 1;
++      if (!damaged)
++        st.color = 1;
++      else
++        st.color = 0;
++      if (rev == -1)
++        st.pos.x *= -1;
++      sts ~= st;
++    }
+     float wofs = offset;
+     float whgt = rocketLength * (rand.nextFloat(0.5) + 1.5);
+     for (int i = 0; i < wingNum; i++) {
+Index: torus-trooper_0.22.dfsg1/src/abagames/util/rand.d
+===================================================================
+--- torus-trooper_0.22.dfsg1.orig/src/abagames/util/rand.d     2007-08-29 
19:11:03.000000000 +0200
++++ torus-trooper_0.22.dfsg1/src/abagames/util/rand.d  2007-08-29 
19:11:05.000000000 +0200
+@@ -165,14 +165,14 @@
+ 
+ void next_state()
+ {
+-    uint *p=state;
++    uint *p=state.ptr;
+ 
+     /* if init_genrand() has not been called, */
+     /* a default initial seed is used         */
+     if (initf==0) init_genrand(5489UL);
+ 
+     left = N;
+-    next = state;
++    next = state.ptr;
+     
+     for (int j=N-M+1; --j; p++) 
+         *p = p[M] ^ TWIST(p[0], p[1]);


_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

Reply via email to