Merge separate RGSS version build configs into one

Setup active RGSS version at runtime. Desired version can be
specified via config, or as default, auto detected from the game
files. This removes the need to build specifically for each
version, which should help packaging a lot.

This also greatly reduces the danger of introducing code that
wouldn't compile on all RGSS version paths (as certain code paths
were completely ifdef'd out).

This can be optimized more, eg. not compiling shaders that aren't
needed in the active version.
This commit is contained in:
Jonas Kulla 2014-08-28 23:11:10 +02:00
parent b1981055e1
commit 55f1542c76
41 changed files with 460 additions and 465 deletions

View file

@ -42,14 +42,11 @@
#include "../simpleColor.vert.xxd"
#include "../sprite.vert.xxd"
#include "../tilemap.vert.xxd"
#ifdef RGSS2
#include "../blur.frag.xxd"
#include "../simpleMatrix.vert.xxd"
#include "../blurH.vert.xxd"
#include "../blurV.vert.xxd"
#include "../tilemapvx.vert.xxd"
#endif
#define INIT_SHADER(vert, frag, name) \
@ -505,8 +502,6 @@ void HueShader::setInputTexture(TEX::ID tex)
}
#ifdef RGSS2
SimpleMatrixShader::SimpleMatrixShader()
{
INIT_SHADER(simpleMatrix, simpleAlpha, SimpleMatrixShader);
@ -551,8 +546,6 @@ void TilemapVXShader::setAniOffset(const Vec2 &value)
gl.Uniform2f(u_aniOffset, value.x, value.y);
}
#endif
BltShader::BltShader()
{