fixup the q2w patch

This commit is contained in:
Timothee Besset 2013-06-22 23:11:25 +01:00
parent b7788b51fd
commit 68a2a18ec8
2 changed files with 10 additions and 10 deletions

View File

@ -854,12 +854,13 @@ CGameDescription::CGameDescription( xmlDocPtr pDoc, const Str &GameFile ){
#if defined ( __linux__ ) || defined ( __APPLE__ )
prop = (char*)xmlGetProp( pNode, (const xmlChar *)"prefix" );
#elif defined ( __WIN32 )
#elif defined ( _WIN32 )
prop = (char*)xmlGetProp( pNode, (const xmlChar *)"prefix_win32" );
#endif
if ( prop != NULL ) {
mUserPathPrefix = prop;
xmlFree( prop );
prop = NULL;
}
mShaderPath = xmlGetProp( pNode, (const xmlChar *)"shaderpath" );
@ -877,6 +878,7 @@ CGameDescription::CGameDescription( xmlDocPtr pDoc, const Str &GameFile ){
if ( default_scale ) {
mTextureDefaultScale = atof( (const char *)default_scale );
xmlFree( default_scale );
default_scale = NULL;
}
else{
mTextureDefaultScale = 0.5f;
@ -885,24 +887,24 @@ CGameDescription::CGameDescription( xmlDocPtr pDoc, const Str &GameFile ){
if ( eclass_singleload ) {
mEClassSingleLoad = true;
xmlFree( eclass_singleload );
}
else{
eclass_singleload = NULL;
} else {
mEClassSingleLoad = false;
}
xmlChar* no_patch = xmlGetProp( pNode, (const xmlChar *)"no_patch" );
if ( no_patch ) {
mNoPatch = true;
xmlFree( no_patch );
}
else{
no_patch = NULL;
} else {
mNoPatch = false;
}
xmlChar* caulk_shader = xmlGetProp( pNode, (const xmlChar *)"caulk_shader" );
if ( caulk_shader ) {
mCaulkShader = caulk_shader;
xmlFree( caulk_shader );
}
else{
caulk_shader = NULL;
} else {
mCaulkShader = "textures/common/caulk";
}
}

View File

@ -175,9 +175,7 @@ Str mBaseGame; ///< basegame directory
Str mEnginePath; ///< path to the engine
Str mEngine; ///< engine name
Str mMultiplayerEngine; ///< engine name
#if defined ( __linux__ ) || defined ( __APPLE__ )
Str mUserPathPrefix; ///< prefix for ~/.q3a ~/.wolf init, only on *nix
#endif
Str mUserPathPrefix; ///< prefix for ~/.q3a ~/.wolf init on *nix, or \My Document\My Games\ on Windows
Str mShaderPath; ///< the path in which to look for shaders
Str mShaderlist; ///< shaderlist file
float mTextureDefaultScale; ///< default scale (0.5 in q3, 1.0 in q1/q2, 0.25 in JK2 ..)