r4035 - packages/trunk/torus-trooper/debian/patches

Peter De Wachter pdewacht-guest at alioth.debian.org
Sun Sep 2 18:27:45 UTC 2007


Author: pdewacht-guest
Date: 2007-09-02 18:27:45 +0000 (Sun, 02 Sep 2007)
New Revision: 4035

Added:
   packages/trunk/torus-trooper/debian/patches/window-resizing.patch
Modified:
   packages/trunk/torus-trooper/debian/patches/series
Log:
fix window resizing code


Modified: packages/trunk/torus-trooper/debian/patches/series
===================================================================
--- packages/trunk/torus-trooper/debian/patches/series	2007-09-02 18:19:32 UTC (rev 4034)
+++ packages/trunk/torus-trooper/debian/patches/series	2007-09-02 18:27:45 UTC (rev 4035)
@@ -3,3 +3,4 @@
 windowed.patch
 dotfile.patch
 gdc-0.24-semantics-for-version.patch
+window-resizing.patch

Added: packages/trunk/torus-trooper/debian/patches/window-resizing.patch
===================================================================
--- packages/trunk/torus-trooper/debian/patches/window-resizing.patch	                        (rev 0)
+++ packages/trunk/torus-trooper/debian/patches/window-resizing.patch	2007-09-02 18:27:45 UTC (rev 4035)
@@ -0,0 +1,34 @@
+Index: torus-trooper-0.22.dfsg1/src/abagames/util/sdl/screen3d.d
+===================================================================
+--- torus-trooper-0.22.dfsg1.orig/src/abagames/util/sdl/screen3d.d	2007-09-02 20:25:30.000000000 +0200
++++ torus-trooper-0.22.dfsg1/src/abagames/util/sdl/screen3d.d	2007-09-02 20:26:08.000000000 +0200
+@@ -23,7 +23,9 @@
+   static bool windowMode = true;
+   static float nearPlane = 0.1;
+   static float farPlane = 1000;
++
+  private:
++  static Uint32 videoFlags;
+ 
+   protected abstract void init();
+   protected abstract void close();
+@@ -35,7 +37,6 @@
+         "Unable to initialize SDL: " ~ std.string.toString(SDL_GetError()));
+     }
+     // Create an OpenGL screen.
+-    Uint32 videoFlags;
+     if (windowMode) {
+       videoFlags = SDL_OPENGL | SDL_RESIZABLE;
+     } else {
+@@ -55,6 +56,11 @@
+   // Reset viewport when the screen is resized.
+ 
+   public void screenResized() {
++    if (SDL_SetVideoMode(width, height, 0, videoFlags) == null) {
++      throw new Exception
++        ("Unable to resize SDL screen: " ~ std.string.toString(SDL_GetError()));
++    }
++
+     glViewport(0, 0, width, height);
+     glMatrixMode(GL_PROJECTION);
+     glLoadIdentity();




More information about the Pkg-games-commits mailing list