From 6ff378bb16007ad003b1a71996944a20f2e76556 Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 27 May 2020 20:39:51 +0200 Subject: [PATCH] added matfx functions for fb alpha --- src/matfx.cpp | 17 +++++++++++++++++ src/rwplugins.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src/matfx.cpp b/src/matfx.cpp index 0add6c7..457106f 100644 --- a/src/matfx.cpp +++ b/src/matfx.cpp @@ -225,6 +225,14 @@ MatFX::setEnvCoefficient(float32 coef) this->fx[i].env.coefficient = coef; } +void +MatFX::setEnvFBAlpha(bool32 useFBAlpha) +{ + int32 i = this->getEffectIndex(ENVMAP); + if(i >= 0) + this->fx[i].env.fbAlpha = useFBAlpha; +} + Texture* MatFX::getEnvTexture(void) { @@ -252,6 +260,15 @@ MatFX::getEnvCoefficient(void) return 0.0f; } +bool32 +MatFX::getEnvFBAlpha(void) +{ + int32 i = this->getEffectIndex(ENVMAP); + if(i >= 0) + return this->fx[i].env.fbAlpha; + return 0; +} + void MatFX::setDualTexture(Texture *t) diff --git a/src/rwplugins.h b/src/rwplugins.h index 26091d1..defc3be 100644 --- a/src/rwplugins.h +++ b/src/rwplugins.h @@ -140,9 +140,11 @@ struct MatFX void setEnvTexture(Texture *t); void setEnvFrame(Frame *f); void setEnvCoefficient(float32 coef); + void setEnvFBAlpha(bool32 useFBAlpha); Texture *getEnvTexture(void); Frame *getEnvFrame(void); float32 getEnvCoefficient(void); + bool32 getEnvFBAlpha(void); // Dual void setDualTexture(Texture *t); void setDualSrcBlend(int32 blend);