r4073 - packages/trunk/val-and-rick/debian/patches

Miriam Ruiz baby-guest at alioth.debian.org
Wed Sep 5 08:13:59 UTC 2007


Author: baby-guest
Date: 2007-09-05 08:13:59 +0000 (Wed, 05 Sep 2007)
New Revision: 4073

Added:
   packages/trunk/val-and-rick/debian/patches/resizable.patch
Modified:
   packages/trunk/val-and-rick/debian/patches/series
Log:
Added patch to make window resizeable



Added: packages/trunk/val-and-rick/debian/patches/resizable.patch
===================================================================
--- packages/trunk/val-and-rick/debian/patches/resizable.patch	                        (rev 0)
+++ packages/trunk/val-and-rick/debian/patches/resizable.patch	2007-09-05 08:13:59 UTC (rev 4073)
@@ -0,0 +1,45 @@
+# Copyright (C) 2007  Peter De Wachter <pdewacht at gmail.com>
+# Copyright (C) 2007  Miriam Ruiz <little_miry at yahoo.es>
+# Distributed under the same license as the game. See debian/copyright.
+
+Index: val-and-rick-0.1a.dfsg1/src/abagames/util/sdl/screen3d.d
+===================================================================
+--- val-and-rick-0.1a.dfsg1.orig/src/abagames/util/sdl/screen3d.d	2007-09-05 08:09:38.000000000 +0000
++++ val-and-rick-0.1a.dfsg1/src/abagames/util/sdl/screen3d.d	2007-09-05 08:10:56.000000000 +0000
+@@ -23,6 +23,7 @@
+   int _width = 640;
+   int _height = 480;
+   bool _windowMode = true;
++  Uint32 _videoFlags;
+ 
+   protected abstract void init();
+   protected abstract void close();
+@@ -34,13 +35,12 @@
+         "Unable to initialize SDL: " ~ std.string.toString(SDL_GetError()));
+     }
+     // Create an OpenGL screen.
+-    Uint32 videoFlags;
+     if (_windowMode) {
+-      videoFlags = SDL_OPENGL | SDL_RESIZABLE;
++      _videoFlags = SDL_OPENGL | SDL_RESIZABLE;
+     } else {
+-      videoFlags = SDL_OPENGL | SDL_FULLSCREEN;
++      _videoFlags = SDL_OPENGL | SDL_FULLSCREEN;
+     } 
+-    if (SDL_SetVideoMode(_width, _height, 0, videoFlags) == null) {
++    if (SDL_SetVideoMode(_width, _height, 0, _videoFlags) == null) {
+       throw new SDLInitFailedException
+         ("Unable to create SDL screen: " ~ std.string.toString(SDL_GetError()));
+     }
+@@ -53,6 +53,11 @@
+ 
+   // Reset a 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();

Modified: packages/trunk/val-and-rick/debian/patches/series
===================================================================
--- packages/trunk/val-and-rick/debian/patches/series	2007-09-05 08:07:16 UTC (rev 4072)
+++ packages/trunk/val-and-rick/debian/patches/series	2007-09-05 08:13:59 UTC (rev 4073)
@@ -4,3 +4,4 @@
 directories.patch
 windowed.patch
 homedir.patch
+resizable.patch




More information about the Pkg-games-commits mailing list