mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- use correct indices for the palette tester CVARs.
This commit is contained in:
parent
99c4b6b6d7
commit
be0242e919
1 changed files with 4 additions and 4 deletions
|
@ -43,8 +43,8 @@
|
||||||
#include "../../glbackend/glbackend.h"
|
#include "../../glbackend/glbackend.h"
|
||||||
|
|
||||||
// Test CVARs.
|
// Test CVARs.
|
||||||
CVAR(Int, fixpalette, 0, 0)
|
CVAR(Int, fixpalette, -1, 0)
|
||||||
CVAR(Int, fixpalswap, 0, 0)
|
CVAR(Int, fixpalswap, -1, 0)
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void FlipNonSquareBlock(T* dst, const T* src, int x, int y, int srcpitch)
|
void FlipNonSquareBlock(T* dst, const T* src, int x, int y, int srcpitch)
|
||||||
|
@ -153,8 +153,8 @@ FHardwareTexture* GLInstance::LoadTexture(FTexture* tex, int textype, int palid)
|
||||||
bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int method, int sampleroverride, FTexture *det, float detscale, FTexture *glow)
|
bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int method, int sampleroverride, FTexture *det, float detscale, FTexture *glow)
|
||||||
{
|
{
|
||||||
if (tex->GetWidth() <= 0 || tex->GetHeight() <= 0) return false;
|
if (tex->GetWidth() <= 0 || tex->GetHeight() <= 0) return false;
|
||||||
int usepalette = fixpalette >= 1 ? fixpalette - 1 : curbasepal;
|
int usepalette = fixpalette >= 0 ? fixpalette : curbasepal;
|
||||||
int usepalswap = fixpalswap >= 1 ? fixpalswap - 1 : palette;
|
int usepalswap = fixpalswap >= 0 ? fixpalswap : palette;
|
||||||
GLInterface.SetPalette(usepalette);
|
GLInterface.SetPalette(usepalette);
|
||||||
GLInterface.SetPalswap(usepalswap);
|
GLInterface.SetPalswap(usepalswap);
|
||||||
bool texbound[3] = {};
|
bool texbound[3] = {};
|
||||||
|
|
Loading…
Reference in a new issue