From 01824e44ae7b89f69dcad2197a95aefe6b1ed4bc Mon Sep 17 00:00:00 2001 From: neobrain Date: Sun, 21 Jul 2013 18:35:31 -0700 Subject: [PATCH] Add some texture-related GE accessors. --- GPU/GPUState.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/GPU/GPUState.h b/GPU/GPUState.h index 167b2d955f..8e9cf16087 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -212,8 +212,17 @@ struct GPUgstate bool isDitherEnabled() const { return ditherEnable & 1; } bool isAlphaTestEnabled() const { return alphaTestEnable & 1; } bool isColorTestEnabled() const { return colorTestEnable & 1; } - bool isTextureMapEnabled() const { return textureMapEnable & 1; } + // Texturing + bool isTextureMapEnabled() const { return textureMapEnable & 1; } + int getTextureFunction() const { return texfunc & 0x7; } + bool isColorDoublingEnabled() const { return (texfunc & 0x10000) != 0; } + + int getTextureEnvColR() const { return texenvcolor&0xFF; } + int getTextureEnvColG() const { return (texenvcolor>>8)&0xFF; } + int getTextureEnvColB() const { return (texenvcolor>>16)&0xFF; } + + // Lighting bool isLightingEnabled() const { return lightingEnable & 1; } bool isLightChanEnabled(int chan) const { return lightEnable[chan] & 1;} bool isUsingPoweredDiffuseLight(int chan) const { return (ltype[chan] & 0x3) == 0x2; }