[chocolate-doom] 19/29: Fix disk icon appearing before palette is set (pink disk!) Cleanup and commenting

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:06:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.0.4
in repository chocolate-doom.

commit 33fa8bcf625e35c8d9afbaf1f87b7f6b463baafd
Author: Simon Howard <fraggle at gmail.com>
Date:   Sun Sep 25 00:31:32 2005 +0000

    Fix disk icon appearing before palette is set (pink disk!)
    Cleanup and commenting
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 133
---
 src/i_video.c | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/src/i_video.c b/src/i_video.c
index cd56989..7de7977 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: i_video.c 130 2005-09-24 23:44:49Z fraggle $
+// $Id: i_video.c 133 2005-09-25 00:31:32Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,10 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.31  2005/09/25 00:31:32  fraggle
+// Fix disk icon appearing before palette is set (pink disk!)
+// Cleanup and commenting
+//
 // Revision 1.30  2005/09/24 23:44:49  fraggle
 // Enforce sane screenmultiply values
 //
@@ -130,7 +134,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: i_video.c 130 2005-09-24 23:44:49Z fraggle $";
+rcsid[] = "$Id: i_video.c 133 2005-09-25 00:31:32Z fraggle $";
 
 #include <SDL.h>
 #include <ctype.h>
@@ -591,8 +595,8 @@ static void UpdateArea(int x1, int y1, int x2, int y2, boolean always_update)
         SDL_UpdateRect(screen, 
                        x1 * screenmultiply, 
                        y1 * screenmultiply, 
-                       (x2-x1) * screenmultiply, 
-                       (y2-y1) * screenmultiply);
+                       w * screenmultiply, 
+                       h * screenmultiply);
     }
 }
 
@@ -812,6 +816,14 @@ void I_InitGraphics(void)
         I_Error("Error setting video mode: %s\n", SDL_GetError());
     }
 
+    // start with a clear black screen
+
+    memset(screens[0], 0, SCREENWIDTH * SCREENHEIGHT);
+    I_SetPalette (W_CacheLumpName ("PLAYPAL",PU_CACHE));
+    SDL_Flip(screen);
+
+    // Setup title and icon
+
     SetCaption();
     SetIcon();
 
@@ -835,13 +847,13 @@ void I_InitGraphics(void)
     else
 	screens[0] = (unsigned char *) Z_Malloc (SCREENWIDTH * SCREENHEIGHT, PU_STATIC, NULL);
 
-    LoadDiskImage();
+    // Loading from disk icon
 
-    SDL_EnableUNICODE(1);
+    LoadDiskImage();
 
-    // start with a clear black screen
+    // We need SDL to give us translated versions of keys as well
 
-    memset(screens[0], 0, SCREENWIDTH * SCREENHEIGHT);
+    SDL_EnableUNICODE(1);
 
     // clear out any events waiting at the start
   

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list