diff --git a/.cproject b/.cproject index fa0c4e87..d6d6d5a8 100644 --- a/.cproject +++ b/.cproject @@ -20,7 +20,7 @@ - + @@ -486,7 +486,7 @@ - + diff --git a/.project b/.project index 8e0c1001..121d0862 100644 --- a/.project +++ b/.project @@ -28,7 +28,7 @@ org.eclipse.cdt.make.core.buildArguments - + -j3 org.eclipse.cdt.make.core.buildCommand diff --git a/config.py b/config.py index 23b84b12..f5158c5e 100644 --- a/config.py +++ b/config.py @@ -27,7 +27,7 @@ class Config: # platforms for which to assemble a setup self.setup_platforms = [ 'local', 'x86', 'x64', 'win32' ] # paks to assemble in the setup - self.setup_packs = [ 'Q3Pack', 'UrTPack', 'ETPack', 'QLPack', 'Q2WPack' ] + self.setup_packs = [ 'Q3Pack', 'UrTPack', 'ETPack', 'QLPack', 'Q2Pack', 'Q2WPack' ] def __repr__( self ): return 'config: target=%s config=%s' % ( self.target_selected, self.config_selected ) diff --git a/plugins/image/image.h b/plugins/image/image.h index c6a054f7..53513903 100644 --- a/plugins/image/image.h +++ b/plugins/image/image.h @@ -49,6 +49,7 @@ extern _QERFileSystemTable g_FileSystemTable; void LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ); #define Error g_FuncTable.m_pfnError +#define vfsGetFileCount g_FileSystemTable.m_pfnGetFileCount #define vfsLoadFile g_FileSystemTable.m_pfnLoadFile #define vfsFreeFile g_FileSystemTable.m_pfnFreeFile diff --git a/plugins/image/lbmlib.cpp b/plugins/image/lbmlib.cpp index e4d54e11..7ad13114 100644 --- a/plugins/image/lbmlib.cpp +++ b/plugins/image/lbmlib.cpp @@ -743,6 +743,10 @@ void LoadImage( const char *name, byte ** pic, int *width, int *height ){ return; } + if ( vfsGetFileCount( name, 0 ) == 0 ) { + return; + } + if ( !g_ascii_strcasecmp( name + len - 4, ".tga" ) ) { LoadTGA( name, pic, width, height ); } diff --git a/plugins/model/cpicosurface.cpp b/plugins/model/cpicosurface.cpp index 470623fa..7aed8c08 100644 --- a/plugins/model/cpicosurface.cpp +++ b/plugins/model/cpicosurface.cpp @@ -33,6 +33,20 @@ CPicoSurface::CPicoSurface( picoSurface_t *pSurface ){ AccumulateBBox(); m_shader = QERApp_Shader_ForName( GetShaderName() ); + + // jdolan: If the shader fails to load, try skin.tga in the model's + // directory as a fall-back. This is a hack for malformed models. + + if ( m_shader->IsDefault() ) { + gchar *dir = g_path_get_dirname( m_pSurface->model->name ); + gchar *skin = g_strdup_printf( "%s/skin.tga", dir ); + + m_shader->DecRef(); + m_shader = QERApp_Shader_ForName( skin ); + + g_free( skin ); + g_free( dir ); + } } CPicoSurface::~CPicoSurface(){ diff --git a/radiant/main.cpp b/radiant/main.cpp index d41b77e1..96eb5f12 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -499,10 +499,6 @@ int main( int argc, char* argv[] ) { // TODO: Find a better place to call this. gtk_glwidget_create_font(); - if ( ( ptr = getenv( "Q3R_LIBGL" ) ) != NULL ) { - libgl = ptr; - } - for ( i = 1; i < argc; i++ ) { char* param = argv[i]; @@ -510,12 +506,7 @@ int main( int argc, char* argv[] ) { if ( param[0] == '-' && param[1] == '-' ) { param += 2; - if ( ( strcmp( param, "libgl" ) == 0 ) && ( i != argc ) ) { - libgl = argv[i + 1]; - argv[i] = argv[i + 1] = NULL; - i++; - } - else if ( strcmp( param, "builddefs" ) == 0 ) { + if ( strcmp( param, "builddefs" ) == 0 ) { g_bBuildList = true; argv[i] = NULL; } diff --git a/radiant/pluginmanager.cpp b/radiant/pluginmanager.cpp index c3f69ea9..1c77289a 100644 --- a/radiant/pluginmanager.cpp +++ b/radiant/pluginmanager.cpp @@ -75,6 +75,7 @@ filetype_t g_pattern_modelmd3( "md3 models", "*.md3" ); filetype_t g_pattern_modelmdc( "mdc models", "*.mdc" ); filetype_t g_pattern_modelmd2( "md2 models", "*.md2" ); filetype_t g_pattern_modelmdl( "mdl models", "*.mdl" ); +filetype_t g_pattern_modelobj( "obj models", "*.obj" ); filetype_t g_pattern_soundwav( "PCM sound files", "*.wav" ); filetype_t g_pattern_ogg( "OGG sound files", "*.ogg" ); filetype_t g_pattern_regq3( "quake3 region", "*.reg" ); diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index c1191ec8..d0f7a0bb 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -3506,7 +3506,7 @@ void CGameInstall::Run() { fprintf( fg, " "ENGINEPATH_ATTRIBUTE "=\"%s\"\n", m_strEngine.GetBuffer() ); switch ( m_availGames[ m_nComboSelect ] ) { case GAME_Q2: { - fprintf( fg, " "TOOLS_ATTRIBUTE "=\"%sinstalls/Quake2Pack/game\"\n", g_strAppPath.GetBuffer() ); + fprintf( fg, " "TOOLS_ATTRIBUTE "=\"%sinstalls/Q2Pack/game\"\n", g_strAppPath.GetBuffer() ); fprintf( fg, " prefix=\".quake2\"\n" ); Str source = g_strAppPath.GetBuffer(); source += "installs/";