From 3fc196e0c04d4595a3b8fcb58b34733b1209ce0b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 5 Jan 2018 17:30:03 +0100 Subject: [PATCH] fixed CAP_TEXTURE disabling --- graph.cpp | 6 +++++- init.cpp | 2 +- mapeditor.cpp | 10 ++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/graph.cpp b/graph.cpp index e816eac2..474d224d 100644 --- a/graph.cpp +++ b/graph.cpp @@ -3279,10 +3279,12 @@ int getSnakelevColor(cell *c, int i, int last, int fd, int wcol) { void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { +#if CAP_TEXTURE if(texture::saving) { texture::apply(c, V, 0xFFFFFFFF); return; } +#endif qfi.shape = NULL; qfi.special = false; ivoryz = isGravityLand(c->land); @@ -5368,8 +5370,10 @@ void gamescreen(int _darken) { darken = 0; +#if CAP_TEXTURE if(texture::tstate == texture::tsAdjusting) - texture::drawRawTexture(); + texture::drawRawTexture(); +#endif } void normalscreen() { diff --git a/init.cpp b/init.cpp index 1f971bd1..6cbb6a72 100644 --- a/init.cpp +++ b/init.cpp @@ -121,7 +121,7 @@ #endif #ifndef CAP_TEXTURE -#define CAP_TEXTURE CAP_GL && CAP_PNG || CAP_SDL_IMG +#define CAP_TEXTURE (CAP_GL && (CAP_PNG || CAP_SDL_IMG)) #endif #ifndef CAP_MODEL diff --git a/mapeditor.cpp b/mapeditor.cpp index 92804ba2..1c6b1f3c 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -1028,16 +1028,16 @@ namespace mapeditor { } displaymm('g', vid.xres-8, 8+fs*4, 2, vid.fsize, XLAT("g = grid"), 16); - + +#if CAP_TEXTURE if(intexture) for(int i=0; i<10; i++) { if(8 + fs * (6+i) < vid.yres - 8 - fs * 7) displayColorButton(vid.xres-8, 8+fs*(6+i), "###", 1000 + i, 16, 1, dialog::displaycolor(texture_colors[i+1])); - + if(displayfr(vid.xres-8 - fs * 3, 8+fs*(6+i), 0, vid.fsize, its(i+1), texture::penwidth == brush_sizes[i] ? 0xFF8000 : 0xC0C0C0, 16)) getcstat = 2000+i; } -#if CAP_TEXTURE if(texture::tstate != texture::tsActive) displaymm('e', vid.xres-8, 8+fs, 2, vid.fsize, XLAT("e = edit this"), 16); #endif @@ -1604,6 +1604,7 @@ namespace mapeditor { transmatrix textrans; +#if CAP_TEXTURE void queue_hcircle(transmatrix Ctr, ld radius) { vector pts; int circp = 6; @@ -1615,7 +1616,8 @@ namespace mapeditor { for(int j=0; j