rpms/dhewm3/EL-6 dhewm3-README.txt, NONE, 1.1 dhewm3-carmack.patch, NONE, 1.1 dhewm3-def-eax-on.patch, NONE, 1.1 dhewm3-def-fixedtic.patch, NONE, 1.1 dhewm3-no-cdkey.patch, NONE, 1.1 dhewm3.spec, NONE, 1.1 sources, 1.1, 1.2

Simone Caronni slaanesh at rpmfusion.org
Thu Jan 9 15:27:35 CET 2014


Author: slaanesh

Update of /cvs/free/rpms/dhewm3/EL-6
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv11230

Modified Files:
	sources 
Added Files:
	dhewm3-README.txt dhewm3-carmack.patch dhewm3-def-eax-on.patch 
	dhewm3-def-fixedtic.patch dhewm3-no-cdkey.patch dhewm3.spec 
Log Message:
* Mon Dec 02 2013 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-21.git6d8108c
- Review fixes.



--- NEW FILE dhewm3-README.txt ---
____  ____  ____                        _____ ____  _____ ____ 
|  _ \| __ )|  _ \  ___   ___  _ __ ___ |___ /| __ )|  ___/ ___|
| |_) |  _ \| | | |/ _ \ / _ \| '_ ` _ \  |_ \|  _ \| |_ | |  _ 
|  _ <| |_) | |_| | (_) | (_) | | | | | |___) | |_) |  _|| |_| |
|_| \_\____/|____/ \___/ \___/|_| |_| |_|____/|____/|_|   \____|
                                                                
** Doom 3 BFG Edition GPL source modification

For the additional features and fixes introduced by this great modification,
please see the original page at:

 https://github.com/RobertBeckebans/RBDOOM-3-BFG

======== Game data

It DOES NOT include game data required to run the game, you have to get the data
yourself buying the game.

To launch the engine pointing at your data files you can use the following
command:

 doom3bfg-engine +set fs_basepath "/path/to/game/content" "$@"

A sample nosrc rpm that can be used to build a binary rpm using the DVD data
files is at: http://slaanesh.fedorapeople.org/

To rebuild it, add the required files to your SOURCES directory and remove the
"NoSource" lines in the spec file.

A high resolution icon has been generated from the game assets, to have a look
at how the resulting menu entries look like see:
http://slaanesh.fedorapeople.org/doom3bfg-menus.png

You should end up with something like this:

 $ rpm -qa dhewm3* doom3*
 dhewm3-1.3.1.1304-19.gitfa231898.fc19.x86_64
 doom3-1.3.1.1304-4.fc18.noarch
 doom3-roe-1.3.1.1304-4.fc18.noarch

======== Options defined at compile time

- Uses unbundled Fedora libraries for the following components:
    OpenAL
    Curl
    Ogg Vorbis
    SDL
    zlib
- Uses SDL2 on Fedora 19+ and RHEL/CentOS 7+.
- Provides a doom3bfg-engine symlink through the alternatives system to easily
  switch between additional variations.
- Removes the bundled libraries and tools required for compiling Doom Classic
  (not working in the current source code). 

======== Notes

- The Doom Classic icons in the main menu do not work; they are not selectable.
  This is by design.
- Bink Videos do not work, the code is patented and not present in the current
  source code.

dhewm3-carmack.patch:
 CMakeLists.txt           |    4 ++++
 renderer/draw_common.cpp |   12 ++++++++++++
 2 files changed, 16 insertions(+)

--- NEW FILE dhewm3-carmack.patch ---
diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt
index 57d27d4..7ed0ab0 100644
--- a/neo/CMakeLists.txt
+++ b/neo/CMakeLists.txt
@@ -30,6 +30,7 @@ option(D3XP			"Build the d3xp game code" ON)
 option(DEDICATED	"Build the dedicated server" OFF)
 option(ONATIVE		"Optimize for the host CPU" OFF)
 option(SDL2			"Use SDL2 instead of SDL1.2" OFF)
+option(ZFAIL			"Use Carmack's reverse" OFF)
 
 if(NOT CMAKE_SYSTEM_PROCESSOR)
 	message(FATAL_ERROR "No target CPU architecture set")
@@ -738,6 +739,9 @@ if(CORE)
 		${src_sys_base}
 		${src_sys_core}
 	)
+	if(ZFAIL)
+		add_definitions( -DDEFY_PATENTS )
+	endif()
 
 	set_target_properties(dhewm3 PROPERTIES COMPILE_DEFINITIONS "__DOOM_DLL__")
 	set_target_properties(dhewm3 PROPERTIES LINK_FLAGS "${ldflags}")
diff --git a/neo/renderer/draw_common.cpp b/neo/renderer/draw_common.cpp
index 70bcc1d..ce48ea1 100644
--- a/neo/renderer/draw_common.cpp
+++ b/neo/renderer/draw_common.cpp
@@ -1140,6 +1140,7 @@ static void RB_T_Shadow( const drawSurf_t *surf ) {
 		return;
 	}
 
+#ifndef DEFY_PATENTS
 	// patent-free work around
 	if ( !external ) {
 		// "preload" the stencil buffer with the number of volumes
@@ -1151,6 +1152,17 @@ static void RB_T_Shadow( const drawSurf_t *surf ) {
 		GL_Cull( CT_BACK_SIDED );
 		RB_DrawShadowElementsWithCounters( tri, numIndexes );
 	}
+#else
+	// Z-fail, uses stuff described in US6384822 held by Creative Labs in the United States
+	if ( !external ) {
+		qglStencilOp( GL_KEEP, tr.stencilDecr, GL_KEEP );
+		GL_Cull( CT_FRONT_SIDED );
+		RB_DrawShadowElementsWithCounters( tri, numIndexes );
+		qglStencilOp( GL_KEEP, tr.stencilIncr, GL_KEEP );
+		GL_Cull( CT_BACK_SIDED );
+		RB_DrawShadowElementsWithCounters( tri, numIndexes );
+	}
+#endif
 
 	// traditional depth-pass stencil shadows
 	qglStencilOp( GL_KEEP, GL_KEEP, tr.stencilIncr );

dhewm3-def-eax-on.patch:
 snd_system.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE dhewm3-def-eax-on.patch ---
diff -Naur dhewm3.old/neo/sound/snd_system.cpp dhewm3/neo/sound/snd_system.cpp
--- dhewm3.old/neo/sound/snd_system.cpp	2012-08-29 15:27:03.920780581 +0200
+++ dhewm3/neo/sound/snd_system.cpp	2012-08-29 15:26:41.279324291 +0200
@@ -70,7 +70,7 @@
 idCVar idSoundSystemLocal::s_skipHelltimeFX( "s_skipHelltimeFX", "0", CVAR_SOUND | CVAR_BOOL, "" );
 
 #if !defined(ID_DEDICATED)
-idCVar idSoundSystemLocal::s_useEAXReverb( "s_useEAXReverb", "0", CVAR_SOUND | CVAR_BOOL | CVAR_ARCHIVE, "use EFX reverb" );
+idCVar idSoundSystemLocal::s_useEAXReverb( "s_useEAXReverb", "1", CVAR_SOUND | CVAR_BOOL | CVAR_ARCHIVE, "use EFX reverb" );
 idCVar idSoundSystemLocal::s_decompressionLimit( "s_decompressionLimit", "6", CVAR_SOUND | CVAR_INTEGER | CVAR_ARCHIVE, "specifies maximum uncompressed sample length in seconds" );
 #else
 idCVar idSoundSystemLocal::s_useEAXReverb( "s_useEAXReverb", "0", CVAR_SOUND | CVAR_BOOL | CVAR_ROM, "EFX not available in this build" );

dhewm3-def-fixedtic.patch:
 Session.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE dhewm3-def-fixedtic.patch ---
--- dhewm3/neo/framework/Session.cpp	2013-01-03 11:33:59.589307803 +0100
+++ dhewm3.dg/neo/framework/Session.cpp	2013-01-04 01:05:22.303604034 +0100
@@ -40,7 +40,7 @@
 idCVar	idSessionLocal::com_showAngles( "com_showAngles", "0", CVAR_SYSTEM | CVAR_BOOL, "" );
 idCVar	idSessionLocal::com_minTics( "com_minTics", "1", CVAR_SYSTEM, "" );
 idCVar	idSessionLocal::com_showTics( "com_showTics", "0", CVAR_SYSTEM | CVAR_BOOL, "" );
-idCVar	idSessionLocal::com_fixedTic( "com_fixedTic", "0", CVAR_SYSTEM | CVAR_INTEGER, "", 0, 10 );
+idCVar	idSessionLocal::com_fixedTic( "com_fixedTic", "0", CVAR_SYSTEM | CVAR_INTEGER, "", -1, 10 );
 idCVar	idSessionLocal::com_showDemo( "com_showDemo", "0", CVAR_SYSTEM | CVAR_BOOL, "" );
 idCVar	idSessionLocal::com_skipGameDraw( "com_skipGameDraw", "0", CVAR_SYSTEM | CVAR_BOOL, "" );
 idCVar	idSessionLocal::com_aviDemoSamples( "com_aviDemoSamples", "16", CVAR_SYSTEM, "" );

dhewm3-no-cdkey.patch:
 BuildDefines.h             |   18 
 BuildDefines.h.rej         |   17 
 Common.cpp                 |    5 
 Common.cpp.orig            | 3109 +++++++++++++++++++++++++++++++++++
 FileSystem.cpp             |    6 
 FileSystem.cpp.orig        | 3914 +++++++++++++++++++++++++++++++++++++++++++++
 Licensee.h                 |    8 
 Session.cpp                |  437 -----
 Session.cpp.orig           | 3304 +++++++++++++++++++++++++++++++++++++
 Session.cpp.rej            |  338 +++
 Session.h                  |   28 
 Session_local.h            |   28 
 Session_menu.cpp           |   55 
 async/AsyncClient.cpp      |  122 -
 async/AsyncClient.cpp.orig | 2317 ++++++++++++++++++++++++++
 async/AsyncClient.h        |    4 
 16 files changed, 13000 insertions(+), 710 deletions(-)

--- NEW FILE dhewm3-no-cdkey.patch ---
diff -Naur dhewm3.old/neo/framework/async/AsyncClient.cpp dhewm3/neo/framework/async/AsyncClient.cpp
--- dhewm3.old/neo/framework/async/AsyncClient.cpp	2013-08-15 23:27:20.000000000 +0200
+++ dhewm3/neo/framework/async/AsyncClient.cpp	2013-08-22 13:23:32.995219604 +0200
@@ -1262,93 +1262,6 @@
 
 /*
 ==================
-idAsyncClient::ProcessAuthKeyMessage
-==================
-*/
-void idAsyncClient::ProcessAuthKeyMessage( const netadr_t from, const idBitMsg &msg ) {
-	authKeyMsg_t		authMsg;
-	char				read_string[ MAX_STRING_CHARS ];
-	const char			*retkey;
-	authBadKeyStatus_t	authBadStatus;
-	int					key_index;
-	bool				valid[ 2 ];
-	idStr				auth_msg;
-
-	if ( clientState != CS_CONNECTING && !session->WaitingForGameAuth() ) {
-		common->Printf( "clientState != CS_CONNECTING, not waiting for game auth, authKey ignored\n" );
-		return;
-	}
-
-	authMsg = (authKeyMsg_t)msg.ReadByte();
-	if ( authMsg == AUTHKEY_BADKEY ) {
-		valid[ 0 ] = valid[ 1 ] = true;
-		key_index = 0;
-		authBadStatus = (authBadKeyStatus_t)msg.ReadByte();
-		switch ( authBadStatus ) {
-		case AUTHKEY_BAD_INVALID:
-			valid[ 0 ] = ( msg.ReadByte() == 1 );
-			valid[ 1 ] = ( msg.ReadByte() == 1 );
-			idAsyncNetwork::BuildInvalidKeyMsg( auth_msg, valid );
-			break;
-		case AUTHKEY_BAD_BANNED:
-			key_index = msg.ReadByte();
-			auth_msg = common->GetLanguageDict()->GetString( va( "#str_0719%1d", 6 + key_index ) );
-			auth_msg += "\n";
-			auth_msg += common->GetLanguageDict()->GetString( "#str_04304" );
-			valid[ key_index ] = false;
-			break;
-		case AUTHKEY_BAD_INUSE:
-			key_index = msg.ReadByte();
-			auth_msg = common->GetLanguageDict()->GetString( va( "#str_0719%1d", 8 + key_index ) );
-			auth_msg += "\n";
-			auth_msg += common->GetLanguageDict()->GetString( "#str_04304" );
-			valid[ key_index ] = false;
-			break;
-		case AUTHKEY_BAD_MSG:
-			// a general message explaining why this key is denied
-			// no specific use for this atm. let's not clear the keys either
-			msg.ReadString( read_string, MAX_STRING_CHARS );
-			auth_msg = read_string;
-			break;
-		}
-		common->DPrintf( "auth deny: %s\n", auth_msg.c_str() );
-
-		// keys to be cleared. applies to both net connect and game auth
-		session->ClearCDKey( valid );
-
-		// get rid of the bad key - at least that's gonna annoy people who stole a fake key
-		if ( clientState == CS_CONNECTING ) {
-			while ( 1 ) {
-				// here we use the auth status message
-				retkey = session->MessageBox( MSG_CDKEY, auth_msg, common->GetLanguageDict()->GetString( "#str_04325" ), true );
-				if ( retkey ) {
-					if ( session->CheckKey( retkey, true, valid ) ) {
-						cmdSystem->BufferCommandText( CMD_EXEC_NOW, "reconnect" );
-					} else {
-						// build a more precise message about the offline check failure
-						idAsyncNetwork::BuildInvalidKeyMsg( auth_msg, valid );
-						session->MessageBox( MSG_OK, auth_msg.c_str(), common->GetLanguageDict()->GetString( "#str_04327" ), true );
-						continue;
-					}
-				} else {
-					cmdSystem->BufferCommandText( CMD_EXEC_NOW, "disconnect" );
-				}
-				break;
-			}
-		} else {
-			// forward the auth status information to the session code
-			session->CDKeysAuthReply( false, auth_msg );
-		}
-	} else {
-		msg.ReadString( read_string, MAX_STRING_CHARS );
-		cvarSystem->SetCVarString( "com_guid", read_string );
-		common->Printf( "guid set to %s\n", read_string );
-		session->CDKeysAuthReply( true, NULL );
-	}
-}
-
-/*
-==================
 idAsyncClient::ProcessVersionMessage
 ==================
 */
@@ -1526,11 +1439,6 @@
 			return;
 		}
 
-		if ( idStr::Icmp( string, "authKey" ) == 0 ) {
-			ProcessAuthKeyMessage( from, msg );
-			return;
-		}
-
 		if ( idStr::Icmp( string, "newVersion" ) == 0 ) {
 			ProcessVersionMessage( from, msg );
 			return;
@@ -1677,13 +1585,7 @@
 			msg.WriteNetadr( serverAddress );
 			// if we don't have a com_guid, this will request a direct reply from auth with it
 			msg.WriteByte( cvarSystem->GetCVarString( "com_guid" )[0] ? 1 : 0 );
-			// send the main key, and flag an extra byte to add XP key
-			msg.WriteString( session->GetCDKey( false ) );
-			const char *xpkey = session->GetCDKey( true );
-			msg.WriteByte( xpkey ? 1 : 0 );
-			if ( xpkey ) {
-				msg.WriteString( xpkey );
-			}
+
 			clientPort.SendPacket( idAsyncNetwork::GetMasterAddress(), msg.GetData(), msg.GetSize() );
 		}
 #else
@@ -2133,28 +2035,6 @@
 }
 
 /*
-===============
-idAsyncClient::SendAuthCheck
-===============
-*/
-bool idAsyncClient::SendAuthCheck( const char *cdkey, const char *xpkey ) {
-	idBitMsg	msg;
-	byte		msgBuf[MAX_MESSAGE_SIZE];
-
-	msg.Init( msgBuf, sizeof( msgBuf ) );
-	msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
-	msg.WriteString( "gameAuth" );
-	msg.WriteInt( ASYNC_PROTOCOL_VERSION );
-	msg.WriteByte( cdkey ? 1 : 0 );
-	msg.WriteString( cdkey ? cdkey : "" );
-	msg.WriteByte( xpkey ? 1 : 0 );
-	msg.WriteString( xpkey ? xpkey : "" );
-	InitPort();
-	clientPort.SendPacket( idAsyncNetwork::GetMasterAddress(), msg.GetData(), msg.GetSize() );
-	return true;
-}
-
-/*
 ===============
 idAsyncClient::CheckTimeout
 ===============
diff -Naur dhewm3.old/neo/framework/async/AsyncClient.cpp.orig dhewm3/neo/framework/async/AsyncClient.cpp.orig
--- dhewm3.old/neo/framework/async/AsyncClient.cpp.orig	1970-01-01 01:00:00.000000000 +0100
+++ dhewm3/neo/framework/async/AsyncClient.cpp.orig	2013-08-22 13:23:32.996219594 +0200
@@ -0,0 +1,2317 @@
+/*
+===========================================================================
+
+Doom 3 GPL Source Code
+Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
+
+This file is part of the Doom 3 GPL Source Code ("Doom 3 Source Code").
+
+Doom 3 Source Code is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Doom 3 Source Code 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Doom 3 Source Code.  If not, see <http://www.gnu.org/licenses/>.
+
+In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code.  If not, please request a copy in writing from id Software at the address below.
+
+If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
+
+===========================================================================
+*/
+
+#include "sys/platform.h"
+#include "idlib/LangDict.h"
+#include "framework/async/AsyncNetwork.h"
+#include "framework/Licensee.h"
+#include "framework/Game.h"
+#include "framework/Session_local.h"
+#include "sound/sound.h"
+
+#include "framework/async/AsyncClient.h"
+
+const int SETUP_CONNECTION_RESEND_TIME	= 1000;
+const int EMPTY_RESEND_TIME				= 500;
+const int PREDICTION_FAST_ADJUST		= 4;
+
[...13567 lines suppressed...]
--- dhewm3.old/neo/framework/Session.h	2013-08-15 23:27:20.000000000 +0200
+++ dhewm3/neo/framework/Session.h	2013-08-22 13:23:33.003219524 +0200
@@ -60,7 +60,6 @@
 	MSG_OKCANCEL,
 	MSG_YESNO,
 	MSG_PROMPT,
-	MSG_CDKEY,
 	MSG_INFO,
 	MSG_WAIT
 } msgBoxType_t;
@@ -113,7 +112,6 @@
 
 	// fires up the optional GUI event, also returns them if you set wait to true
 	// if MSG_PROMPT and wait, returns the prompt string or NULL if aborted
-	// if MSG_CDKEY and want, returns the cd key or NULL if aborted
 	// network tells wether one should still run the network loop in a wait dialog
 	virtual const char *MessageBox( msgBoxType_t type, const char *message, const char *title = NULL, bool wait = false, const char *fire_yes = NULL, const char *fire_no = NULL, bool network = false ) = 0;
 	virtual void	StopBox( void ) = 0;
@@ -126,32 +124,6 @@
 	// doesn't advance and get things out of sync
 	virtual void	TimeHitch( int msec ) = 0;
 
-	// read and write the cd key data to files
-	// doesn't perform any validity checks
-	virtual void	ReadCDKey( void ) = 0;
-	virtual void	WriteCDKey( void ) = 0;
-
-	// returns NULL for if xp is true and xp key is not valid or not present
-	virtual const char *GetCDKey( bool xp ) = 0;
-
-	// check keys for validity when typed in by the user ( with checksum verification )
-	// store the new set of keys if they are found valid
-	virtual bool	CheckKey( const char *key, bool netConnect, bool offline_valid[ 2 ] ) = 0;
-
-	// verify the current set of keys for validity
-	// strict -> keys in state CDKEY_CHECKING state are not ok
-	virtual bool	CDKeysAreValid( bool strict ) = 0;
-	// wipe the key on file if the network check finds it invalid
-	virtual void	ClearCDKey( bool valid[ 2 ] ) = 0;
-
-	// configure gui variables for mainmenu.gui and cd key state
-	virtual void	SetCDKeyGuiVars( void ) = 0;
-
-	virtual bool	WaitingForGameAuth( void ) = 0;
-
-	// got reply from master about the keys. if !valid, auth_msg given
-	virtual void	CDKeysAuthReply( bool valid, const char *auth_msg ) = 0;
-
 	virtual const char *GetCurrentMapName( void ) = 0;
 
 	virtual int		GetSaveGameVersion( void ) = 0;
diff -Naur dhewm3.old/neo/framework/Session_local.h dhewm3/neo/framework/Session_local.h
--- dhewm3.old/neo/framework/Session_local.h	2013-08-15 23:27:20.000000000 +0200
+++ dhewm3/neo/framework/Session_local.h	2013-08-22 13:23:33.004219515 +0200
@@ -124,16 +124,6 @@
 
 	virtual void		TimeHitch( int msec );
 
-	virtual void		ReadCDKey( void );
-	virtual void		WriteCDKey( void );
-	virtual const char *GetCDKey( bool xp );
-	virtual bool		CheckKey( const char *key, bool netConnect, bool offline_valid[ 2 ] );
-	virtual bool		CDKeysAreValid( bool strict );
-	virtual void		ClearCDKey( bool valid[ 2 ] );
-	virtual void		SetCDKeyGuiVars( void );
-	virtual bool		WaitingForGameAuth( void );
-	virtual void		CDKeysAuthReply( bool valid, const char *auth_msg );
-
 	virtual int			GetSaveGameVersion( void );
 
 	virtual const char *GetCurrentMapName();
@@ -312,9 +302,6 @@
 	void				ExecuteMapChange( bool noFadeWipe = false );
 	void				UnloadMap();
 
-	// return true if we actually waiting on an auth reply
-	bool				MaybeWaitOnCDKey( void );
-
 	//------------------
 	// Session_menu.cpp
 
@@ -347,21 +334,6 @@
 	bool				BoxDialogSanityCheck( void );
 	void				EmitGameAuth( void );
 
-	typedef enum {
-		CDKEY_UNKNOWN,	// need to perform checks on the key
-		CDKEY_INVALID,	// that key is wrong
-		CDKEY_OK,		// valid
-		CDKEY_CHECKING, // sent a check request ( gameAuth only )
-		CDKEY_NA		// does not apply, xp key when xp is not present
-	} cdKeyState_t;
-
-	static const int	CDKEY_BUF_LEN = 17;
-	static const int	CDKEY_AUTH_TIMEOUT = 5000;
-
-	char				cdkey[ CDKEY_BUF_LEN ];
-	cdKeyState_t		cdkey_state;
-	char				xpkey[ CDKEY_BUF_LEN ];
-	cdKeyState_t		xpkey_state;
 	int					authEmitTimeout;
 	bool				authWaitBox;
 
diff -Naur dhewm3.old/neo/framework/Session_menu.cpp dhewm3/neo/framework/Session_menu.cpp
--- dhewm3.old/neo/framework/Session_menu.cpp	2013-08-15 23:27:20.000000000 +0200
+++ dhewm3/neo/framework/Session_menu.cpp	2013-08-22 13:23:33.004219515 +0200
@@ -313,7 +313,6 @@
 		guiMainMenu->SetStateString( "inGame", "0" );
 	}
 
-	SetCDKeyGuiVars( );
 	guiMainMenu->SetStateString( "nightmare", cvarSystem->GetCVarBool( "g_nightmare" ) ? "1" : "0" );
 	guiMainMenu->SetStateString( "browser_levelshot", "guis/assets/splash/pdtempa" );
 
@@ -1255,7 +1254,6 @@
 	}
 
 	guiMsg->SetStateString( "visible_entry", "0" );
-	guiMsg->SetStateString( "visible_cdkey", "0" );
 	switch ( type ) {
 		case MSG_INFO:
 			guiMsg->SetStateString( "mid", "" );
@@ -1298,32 +1296,6 @@
 			guiMsg->SetStateString( "visible_entry", "1" );
 			guiMsg->HandleNamedEvent( "Prompt" );
 			break;
-		case MSG_CDKEY:
-			guiMsg->SetStateString( "left", common->GetLanguageDict()->GetString( "#str_04339" ) );
-			guiMsg->SetStateString( "right", common->GetLanguageDict()->GetString( "#str_04340" ) );
-			guiMsg->SetStateString( "visible_msgbox", "0" );
-			guiMsg->SetStateString( "visible_cdkey", "1" );
-			guiMsg->SetStateString( "visible_hasxp", fileSystem->HasD3XP() ? "1" : "0" );
-			// the current cdkey / xpkey values may have bad/random data in them
-			// it's best to avoid printing them completely, unless the key is good
-			if ( cdkey_state == CDKEY_OK ) {
-				guiMsg->SetStateString( "str_cdkey", cdkey );
-				guiMsg->SetStateString( "visible_cdchk", "0" );
-			} else {
-				guiMsg->SetStateString( "str_cdkey", "" );
-				guiMsg->SetStateString( "visible_cdchk", "1" );
-			}
-			guiMsg->SetStateString( "str_cdchk", "" );
-			if ( xpkey_state == CDKEY_OK ) {
-				guiMsg->SetStateString( "str_xpkey", xpkey );
-				guiMsg->SetStateString( "visible_xpchk", "0" );
-			} else {
-				guiMsg->SetStateString( "str_xpkey", "" );
-				guiMsg->SetStateString( "visible_xpchk", "1" );
-			}
-			guiMsg->SetStateString( "str_xpchk", "" );
-			guiMsg->HandleNamedEvent( "CDKey" );
-			break;
 		case MSG_WAIT:
 			break;
 		default:
@@ -1357,20 +1329,6 @@
 			} else {
 				return NULL;
 			}
-		} else if ( type == MSG_CDKEY ) {
-			if ( msgRetIndex == 0 ) {
-				// the visible_ values distinguish looking at a valid key, or editing it
-				sprintf( msgFireBack[ 0 ], "%1s;%16s;%2s;%1s;%16s;%2s",
-						 guiMsg->State().GetString( "visible_cdchk" ),
-						 guiMsg->State().GetString( "str_cdkey" ),
-						 guiMsg->State().GetString( "str_cdchk" ),
-						 guiMsg->State().GetString( "visible_xpchk" ),
-						 guiMsg->State().GetString( "str_xpkey" ),
-						 guiMsg->State().GetString( "str_xpchk" ) );
-				return msgFireBack[ 0 ].c_str();
-			} else {
-				return NULL;
-			}
 		} else {
 			return msgFireBack[ msgRetIndex ].c_str();
 		}
@@ -1397,7 +1355,6 @@
 	guiMsg->SetStateString( "visible_waitbox", "0" );
 
 	guiMsg->SetStateString( "visible_entry", "0" );
-	guiMsg->SetStateString( "visible_cdkey", "0" );
 
 	guiMsg->SetStateString( "mid", "Cancel" );
 	guiMsg->SetStateString( "visible_mid", "1" );
@@ -1625,15 +1582,3 @@
 	}
 }
 
-/*
-===============
-idSessionLocal::SetCDKeyGuiVars
-===============
-*/
-void idSessionLocal::SetCDKeyGuiVars( void ) {
-	if ( !guiMainMenu ) {
-		return;
-	}
-	guiMainMenu->SetStateString( "str_d3key_state", common->GetLanguageDict()->GetString( va( "#str_071%d", 86 + cdkey_state ) ) );
-	guiMainMenu->SetStateString( "str_xpkey_state", common->GetLanguageDict()->GetString( va( "#str_071%d", 86 + xpkey_state ) ) );
-}


--- NEW FILE dhewm3.spec ---
%global commit 6d8108c508a0bde5c2bea4dec58fa2ca583a16e2
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           dhewm3
Version:        1.3.1.1304
Release:        21.git%{shortcommit}%{?dist}
Summary:        Dhewm's Doom 3 engine
License:        GPLv3+ and BSD
URL:            https://github.com/dhewm/%{name}

Source0:        https://github.com/dhewm/dhewm3/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
Source1:        %{name}-README.txt
# Compatibility with stock Doom 3 has been removed long ago and we don't ship
# Doom 3 / Doom 3 Resurrection of Evil content.
Patch0:         %{name}-no-cdkey.patch
Patch1:         %{name}-def-eax-on.patch
Patch2:         %{name}-def-fixedtic.patch
Patch3:         %{name}-carmack.patch

# Generic provider for Doom 3 engine based games
Provides:       doom3-engine = 1.3.1.1304

Provides:       bundled(minizip-idsoftware) = 1.2.7

BuildRequires:  cmake
BuildRequires:  libcurl-devel
BuildRequires:  libjpeg-turbo-devel
BuildRequires:  libogg-devel
BuildRequires:  libvorbis-devel
BuildRequires:  openal-soft-devel
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
BuildRequires:  SDL2-devel
%else
BuildRequires:  SDL-devel
%endif
BuildRequires:  speex-devel
BuildRequires:  zlib-devel

%description
%{name} 3 is a Doom 3 GPL source modification. The goal of %{name} 3 is bring
DOOM 3 with the help of SDL to all suitable platforms. Bugs present in the
original DOOM 3 will be fixed (when identified) without altering the original
game-play.

%prep
%setup -qn %{name}-%{commit}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
cp %{SOURCE1} ./README.txt
iconv -f iso8859-1 -t utf-8 COPYING.txt > COPYING.txt.conv && mv -f COPYING.txt.conv COPYING.txt

%build
# Passing a fake build name avoids default CMAKE_BUILD_TYPE="RelWithDebInfo"
# which has hard coded GCC optimizations.
%cmake \
    -DCMAKE_BUILD_TYPE=Fedora \
    -DDEDICATED=ON \
    -DZFAIL=1 \
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
    -DSDL2=ON \
%endif
    neo
make %{?_smp_mflags}

%post
/usr/sbin/alternatives --install %{_bindir}/doom3-engine doom3-engine %{_bindir}/%{name} 10

%preun
if [ "$1" = 0 ]; then
    /usr/sbin/alternatives --remove doom3-engine %{_bindir}/%{name}
fi

%install
make install DESTDIR=%{buildroot}

%files
%doc README.md COPYING.txt README.txt
%{_bindir}/%{name}
%{_bindir}/%{name}ded
%{_libdir}/%{name}

%changelog
* Mon Dec 02 2013 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-21.git6d8108c
- Review fixes.

* Fri Nov 15 2013 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-20.git6d8108c5
- Updated.
- Added README.txt for game content.

* Thu Aug 22 2013 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-19.gitfa231898
- Updated.
- Remove unzip patch, upstreamed.
- Use SDL2 on Fedora 19+ and CentOS/RHEL 7+.

* Tue May 07 2013 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-18.git6407881c
- Updated.

* Sat Apr 13 2013 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-17.gitcedc129a
- Updated.

* Tue Jan 15 2013 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-16.git92a41322
- Updated.

* Fri Jan 04 2013 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-15.gitf8de7386
- Change fixedTic default.
- Added Z-fail compile time option.
- Update minizip code.

* Fri Dec 07 2012 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-13.git.f8de7386
- Updated.
- Removed display resolution autodetection, included upstream.
- Removed gl fix patch, included upstream.
- Updated no-cdkey patch.

* Tue Aug 28 2012 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-12.git.1b1787bb
- Auto detect resolution of monitor if single screen.
- Remove cd key check.
- Add EAX on by default.

* Thu Aug 09 2012 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-10.git.1b1787bb
- Updated, reverted "Don't use alpha bits for the GL config".
- Added dot in release tag for easier reading.
- Added alternatives system for doom3-engine.

* Mon Jul 23 2012 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-9.gitdf81835d
- Updated.

* Thu Jul 19 2012 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-8.git8aa0a4a9
- Updated, removed upstramed patch.

* Tue Jul 10 2012 Simone Caronni <negativo17 at gmail.com> - 1.3.1.1304-7.gitf3ce725f
- First build.


Index: sources
===================================================================
RCS file: /cvs/free/rpms/dhewm3/EL-6/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	7 Jan 2014 16:57:37 -0000	1.1
+++ sources	9 Jan 2014 14:27:35 -0000	1.2
@@ -0,0 +1 @@
+2819e38f2b44e6eb476397756a1baf6e  dhewm3-1.3.1.1304-6d8108c.tar.gz


More information about the rpmfusion-commits mailing list