r_dodgypcxfiles, for use with some Quake 2 mods
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1751 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
a8889d8f24
commit
4a0c9a0e79
2 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,9 @@ cvar_t r_dodgytgafiles = {"r_dodgytgafiles", "0"}; //Certain tgas are upside dow
|
|||
//but some people have gone and 'fixed' those broken ones by flipping.
|
||||
//these images appear upside down in any editor but correct in tenebrae
|
||||
//set this to 1 to emulate tenebrae's bug.
|
||||
cvar_t r_dodgypcxfiles = {"r_dodgypcxfiles", "0"}; //Quake 2's PCX loading isn't complete,
|
||||
//and some Q2 mods include PCX files
|
||||
//that only work with this assumption
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
|
@ -1211,7 +1214,10 @@ qbyte *ReadPCXFile(qbyte *buf, int length, int *width, int *height)
|
|||
*width = xmax-xmin+1;
|
||||
*height = ymax-ymin+1;
|
||||
|
||||
palette = buf + length-768;
|
||||
if (r_dodgypcxfiles.value)
|
||||
palette = host_basepal;
|
||||
else
|
||||
palette = buf + length-768;
|
||||
|
||||
data = (char *)(pcx+1);
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ cvar_t gl_skyboxdist = {"gl_skyboxdist", "2300"};
|
|||
cvar_t r_vertexdlights = {"r_vertexdlights", "1"};
|
||||
|
||||
extern cvar_t r_dodgytgafiles;
|
||||
extern cvar_t r_dodgypcxfiles;
|
||||
|
||||
cvar_t r_nolerp = {"r_nolerp", "0"};
|
||||
cvar_t r_nolightdir = {"r_nolightdir", "0"};
|
||||
|
@ -464,6 +465,7 @@ void Renderer_Init(void)
|
|||
Cvar_Register (&gl_skyboxname, GRAPHICALNICETIES);
|
||||
|
||||
Cvar_Register(&r_dodgytgafiles, "Bug fixes");
|
||||
Cvar_Register(&r_dodgypcxfiles, "Bug fixes");
|
||||
Cvar_Register(&r_loadlits, GRAPHICALNICETIES);
|
||||
Cvar_Register(&r_lightstylesmooth, GRAPHICALNICETIES);
|
||||
Cvar_Register(&r_lightstylespeed, GRAPHICALNICETIES);
|
||||
|
|
Loading…
Reference in a new issue