[chocolate-doom] 06/26: Allow changing the sky texture names via dehacked patches

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:07:38 UTC 2017


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

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

commit 921399e7a4dd8385cae4e85ecf992b0ab6188c51
Author: Simon Howard <fraggle at gmail.com>
Date:   Sun Jan 22 23:36:21 2006 +0000

    Allow changing the sky texture names via dehacked patches
    
    Subversion-branch: /branches/CHOCOLATE_DOOM_0_1/chocolate-doom
    Subversion-revision: 325
---
 src/g_game.c | 33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)

diff --git a/src/g_game.c b/src/g_game.c
index 8c1da54..7ed7412 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: g_game.c 300 2006-01-19 18:46:24Z fraggle $
+// $Id: g_game.c 325 2006-01-22 23:36:21Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.20.2.1  2006/01/22 23:36:21  fraggle
+// Allow changing the sky texture names via dehacked patches
+//
 // Revision 1.20  2006/01/19 18:46:24  fraggle
 // Move savegame header read/write code into p_saveg.c
 //
@@ -105,7 +108,7 @@
 
 
 static const char
-rcsid[] = "$Id: g_game.c 300 2006-01-19 18:46:24Z fraggle $";
+rcsid[] = "$Id: g_game.c 325 2006-01-22 23:36:21Z fraggle $";
 
 #include <string.h>
 #include <stdlib.h>
@@ -552,6 +555,7 @@ extern  gamestate_t     wipegamestate;
  
 void G_DoLoadLevel (void) 
 { 
+    char *skytexturename;
     int             i; 
 
     // Set the sky map.
@@ -559,37 +563,42 @@ void G_DoLoadLevel (void)
     //  a flat. The data is in the WAD only because
     //  we look for an actual index, instead of simply
     //  setting one.
-    skyflatnum = R_FlatNumForName ( SKYFLATNAME );
+    skyflatnum = R_FlatNumForName(DEH_String(SKYFLATNAME));
 
     // DOOM determines the sky texture to be used
     // depending on the current episode, and the game version.
 
-    if ( gamemode == commercial)
+    if (gamemode == commercial)
     {
-	skytexture = R_TextureNumForName ("SKY3");
+	skytexturename = "SKY3";
 	if (gamemap < 12)
-	    skytexture = R_TextureNumForName ("SKY1");
+	    skytexturename = "SKY1";
 	else
 	    if (gamemap < 21)
-		skytexture = R_TextureNumForName ("SKY2");
+		skytexturename = "SKY2";
     }
     else
+    {
 	switch (gameepisode) 
 	{ 
+	  default:
 	  case 1: 
-	    skytexture = R_TextureNumForName ("SKY1"); 
+	    skytexturename = "SKY1"; 
 	    break; 
 	  case 2: 
-	    skytexture = R_TextureNumForName ("SKY2"); 
+	    skytexturename = "SKY2"; 
 	    break; 
 	  case 3: 
-	    skytexture = R_TextureNumForName ("SKY3"); 
+	    skytexturename = "SKY3"; 
 	    break; 
 	  case 4:	// Special Edition sky
-	    skytexture = R_TextureNumForName ("SKY4");
+	    skytexturename = "SKY4";
 	    break;
 	} 
- 
+    }
+
+    skytexture = R_TextureNumForName(skytexturename);
+
     levelstarttic = gametic;        // for time calculation
     
     if (wipegamestate == GS_LEVEL) 

-- 
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