mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 22:10:59 +00:00
Provide the gl_retexturing CVAR to switch retexturing off. Default is
"1", retexturing enabled.
This commit is contained in:
parent
48a0d6a50d
commit
d0133509e1
3 changed files with 46 additions and 27 deletions
|
@ -200,6 +200,8 @@ extern cvar_t *gl_mode;
|
|||
extern cvar_t *gl_customwidth;
|
||||
extern cvar_t *gl_customheight;
|
||||
|
||||
extern cvar_t *gl_retexturing;
|
||||
|
||||
extern cvar_t *gl_log;
|
||||
extern cvar_t *gl_lightmap;
|
||||
extern cvar_t *gl_shadows;
|
||||
|
|
|
@ -1079,6 +1079,8 @@ R_FindImage ( char *name, imagetype_t type )
|
|||
image = R_LoadPic( name, pic, width, 0, height, 0, type, 8 );
|
||||
}
|
||||
else if ( !strcmp( name + len - 4, ".wal" ) )
|
||||
{
|
||||
if (gl_retexturing->value)
|
||||
{
|
||||
/* Get size of the original texture */
|
||||
GetWalInfo(name, &realwidth, &realheight);
|
||||
|
@ -1114,6 +1116,17 @@ R_FindImage ( char *name, imagetype_t type )
|
|||
return ( NULL );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
image = LoadWal( name );
|
||||
|
||||
if ( !image )
|
||||
{
|
||||
/* No texture found */
|
||||
return ( NULL );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( name + len - 4, ".tga" ) )
|
||||
{
|
||||
LoadTGA( name, &pic, &width, &height );
|
||||
|
|
|
@ -134,6 +134,8 @@ cvar_t *gl_mode;
|
|||
cvar_t *gl_customwidth;
|
||||
cvar_t *gl_customheight;
|
||||
|
||||
cvar_t *gl_retexturing;
|
||||
|
||||
cvar_t *gl_dynamic;
|
||||
cvar_t *gl_modulate;
|
||||
cvar_t *gl_nobind;
|
||||
|
@ -1010,6 +1012,8 @@ R_Register ( void )
|
|||
gl_customwidth = ri.Cvar_Get( "gl_customwidth", "1024", CVAR_ARCHIVE );
|
||||
gl_customheight = ri.Cvar_Get( "gl_customheight", "768", CVAR_ARCHIVE );
|
||||
|
||||
gl_retexturing = ri.Cvar_Get( "gl_retexturing", "1", CVAR_ARCHIVE );
|
||||
|
||||
ri.Cmd_AddCommand( "imagelist", R_ImageList_f );
|
||||
ri.Cmd_AddCommand( "screenshot", R_ScreenShot );
|
||||
ri.Cmd_AddCommand( "modellist", Mod_Modellist_f );
|
||||
|
|
Loading…
Reference in a new issue