04 Jul 2017

This commit is contained in:
g-cont 2017-07-04 00:00:00 +03:00 committed by Alibek Omarov
parent f27590012c
commit e766096ba4
6 changed files with 28 additions and 9 deletions

View File

@ -33,6 +33,7 @@ infotable dlumpinfo_t[dwadinfo_t->numlumps]
========================================================================
*/
#define IDWAD2HEADER (('2'<<24)+('D'<<16)+('A'<<8)+'W') // little-endian "WAD2" quake wads
#define IDWAD3HEADER (('3'<<24)+('D'<<16)+('A'<<8)+'W') // little-endian "WAD3" half-life wads
// dlumpinfo_t->attribs

View File

@ -545,10 +545,25 @@ void SCR_InstallParticlePalette( void )
void SCR_RegisterTextures( void )
{
// register gfx.wad images
cls.pauseIcon = GL_LoadTexture( "gfx/paused.lmp", NULL, 0, TF_IMAGE, NULL );
if( cl_allow_levelshots->value )
cls.loadingBar = GL_LoadTexture( "gfx/lambda.lmp", NULL, 0, TF_IMAGE|TF_LUMINANCE, NULL );
else cls.loadingBar = GL_LoadTexture( "gfx/lambda.lmp", NULL, 0, TF_IMAGE, NULL );
if( FS_FileExists( "gfx/paused.lmp", false ))
cls.pauseIcon = GL_LoadTexture( "gfx/paused.lmp", NULL, 0, TF_IMAGE, NULL );
else if( FS_FileExists( "gfx/pause.lmp", false ))
cls.pauseIcon = GL_LoadTexture( "gfx/pause.lmp", NULL, 0, TF_IMAGE, NULL );
if( FS_FileExists( "gfx/lambda.lmp", false ))
{
if( cl_allow_levelshots->value )
cls.loadingBar = GL_LoadTexture( "gfx/lambda.lmp", NULL, 0, TF_IMAGE|TF_LUMINANCE, NULL );
else cls.loadingBar = GL_LoadTexture( "gfx/lambda.lmp", NULL, 0, TF_IMAGE, NULL );
}
else if( FS_FileExists( "gfx/loading.lmp", false ))
{
if( cl_allow_levelshots->value )
cls.loadingBar = GL_LoadTexture( "gfx/loading.lmp", NULL, 0, TF_IMAGE|TF_LUMINANCE, NULL );
else cls.loadingBar = GL_LoadTexture( "gfx/loading.lmp", NULL, 0, TF_IMAGE, NULL );
}
cls.tileImage = GL_LoadTexture( "gfx/backtile.lmp", NULL, 0, TF_IMAGE, NULL );
}

View File

@ -2146,7 +2146,8 @@ void Con_VidInit( void )
{
if( FS_FileExists( "cached/conback640", false ))
con.background = GL_LoadTexture( "cached/conback640", NULL, 0, TF_IMAGE, NULL );
else con.background = GL_LoadTexture( "cached/conback", NULL, 0, TF_IMAGE, NULL );
else if( FS_FileExists( "cached/conback", false ))
con.background = GL_LoadTexture( "cached/conback", NULL, 0, TF_IMAGE, NULL );
}
}
else
@ -2159,7 +2160,8 @@ void Con_VidInit( void )
{
if( FS_FileExists( "cached/loading640", false ))
con.background = GL_LoadTexture( "cached/loading640", NULL, 0, TF_IMAGE, NULL );
else con.background = GL_LoadTexture( "cached/loading", NULL, 0, TF_IMAGE, NULL );
else if( FS_FileExists( "cached/loading", false ))
con.background = GL_LoadTexture( "cached/loading", NULL, 0, TF_IMAGE, NULL );
}
}

View File

@ -3324,9 +3324,9 @@ wfile_t *W_Open( const char *filename, const char *mode, int *error )
return NULL;
}
if( header.ident != IDWAD3HEADER )
if( header.ident != IDWAD2HEADER && header.ident != IDWAD3HEADER )
{
MsgDev( D_ERROR, "W_Open: %s is not a WAD3 file\n", filename );
MsgDev( D_ERROR, "W_Open: %s is not a WAD2 or WAD3 file\n", filename );
if( error ) *error = WAD_LOAD_BAD_HEADER;
W_Close( wad );
return NULL;

View File

@ -134,7 +134,7 @@ static const loadpixformat_t load_game[] =
{ "%s%s.%s", "mip", Image_LoadMIP, IL_HINT_NO }, // hl textures from wad or buffer
{ "%s%s.%s", "mdl", Image_LoadMDL, IL_HINT_HL }, // hl studio model skins
{ "%s%s.%s", "spr", Image_LoadSPR, IL_HINT_HL }, // hl sprite frames
{ "%s%s.%s", "lmp", Image_LoadLMP, IL_HINT_HL }, // hl menu images (cached.wad etc)
{ "%s%s.%s", "lmp", Image_LoadLMP, IL_HINT_NO }, // hl menu images (cached.wad etc)
{ "%s%s.%s", "fnt", Image_LoadFNT, IL_HINT_HL }, // hl console font (fonts.wad etc)
{ "%s%s.%s", "pal", Image_LoadPAL, IL_HINT_NO }, // install studio\sprite palette
{ NULL, NULL, NULL, IL_HINT_NO }

View File

@ -286,6 +286,7 @@ qboolean Image_LoadLMP( const char *name, const byte *buffer, size_t filesize )
}
else if( image.hint != IL_HINT_HL )
{
rendermode = LUMP_QUAKE1;
pal = NULL;
}
else