summaryrefslogtreecommitdiff
path: root/src/engine/octaedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/octaedit.cpp')
-rw-r--r--src/engine/octaedit.cpp48
1 files changed, 4 insertions, 44 deletions
diff --git a/src/engine/octaedit.cpp b/src/engine/octaedit.cpp
index 239c6a4..af8e9ec 100644
--- a/src/engine/octaedit.cpp
+++ b/src/engine/octaedit.cpp
@@ -170,7 +170,6 @@ void toggleedit(bool force)
player->state = CS_EDITING;
}
cancelsel();
- stoppaintblendmap();
keyrepeat(editmode);
editing = entediting = editmode;
extern int fullbright;
@@ -353,7 +352,7 @@ void rendereditcursor()
od = dimension(orient),
odc = dimcoord(orient);
- bool hidecursor = g3d_windowhit(true, false) || blendpaintmode, hovering = false;
+ bool hidecursor = g3d_windowhit(true, false), hovering = false;
if(moving)
{
@@ -531,7 +530,6 @@ void tryedit()
{
extern int hidehud;
if(!editmode || hidehud || mainmenu) return;
- if(blendpaintmode) trypaintblendmap();
}
//////////// ready changes to vertex arrays ////////////
@@ -2333,7 +2331,7 @@ void mpeditmat(int matid, int filter, selinfo &sel, bool local)
if(filter >= 0)
{
filtermat = filter&0xFFFF;
- filtermask = filtermat&(MATF_VOLUME|MATF_INDEX) ? (int) MATF_VOLUME|MATF_INDEX : (filtermat&MATF_CLIP ? (int) MATF_CLIP : (int) filtermat);
+ filtermask = filtermat&(MATF_INDEX) ? (int) MATF_INDEX : (filtermat&MATF_CLIP ? (int) MATF_CLIP : (int) filtermat);
filtergeom = filter&~0xFFFF;
}
if(matid < 0)
@@ -2343,7 +2341,7 @@ void mpeditmat(int matid, int filter, selinfo &sel, bool local)
}
else
{
- matmask = matid&(MATF_VOLUME|MATF_INDEX) ? 0 : (matid&MATF_CLIP ? ~MATF_CLIP : ~matid);
+ matmask = matid&MATF_INDEX ? 0 : (matid&MATF_CLIP ? ~MATF_CLIP : ~matid);
}
loopselxyz(setmat(c, matid, matmask, filtermat, filtermask, filtergeom));
}
@@ -2524,11 +2522,7 @@ void rendertexturepanel(int w, int h)
{
VSlot &vslot = lookupvslot(texmru[ti]), *layer = NULL;
Slot &slot = *vslot.slot;
- Texture *tex = slot.sts.empty() ? notexture : slot.sts[0].t, *glowtex = NULL, *layertex = NULL;
- if(slot.texmask&(1<<TEX_GLOW))
- {
- loopvj(slot.sts) if(slot.sts[j].type==TEX_GLOW) { glowtex = slot.sts[j].t; break; }
- }
+ Texture *tex = slot.sts.empty() ? notexture : slot.sts[0].t, *layertex = NULL;
if(vslot.layer)
{
layer = &lookupvslot(vslot.layer);
@@ -2547,40 +2541,6 @@ void rendertexturepanel(int w, int h)
}
loopk(4) { tc[k].x = tc[k].x/sx - xoff/tex->xs; tc[k].y = tc[k].y/sy - yoff/tex->ys; }
glBindTexture(GL_TEXTURE_2D, tex->id);
- loopj(glowtex ? 3 : 2)
- {
- if(j < 2) gle::color(vec(vslot.colorscale).mul(j), texpaneltimer/1000.0f);
- else
- {
- glBindTexture(GL_TEXTURE_2D, glowtex->id);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
- gle::color(vslot.glowcolor, texpaneltimer/1000.0f);
- }
- gle::begin(GL_TRIANGLE_STRIP);
- gle::attribf(x, y); gle::attrib(tc[0]);
- gle::attribf(x+r, y); gle::attrib(tc[1]);
- gle::attribf(x, y+r); gle::attrib(tc[3]);
- gle::attribf(x+r, y+r); gle::attrib(tc[2]);
- xtraverts += gle::end();
- if(j==1 && layertex)
- {
- gle::color(layer->colorscale, texpaneltimer/1000.0f);
- glBindTexture(GL_TEXTURE_2D, layertex->id);
- gle::begin(GL_TRIANGLE_STRIP);
- gle::attribf(x+r/2, y+r/2); gle::attrib(tc[0]);
- gle::attribf(x+r, y+r/2); gle::attrib(tc[1]);
- gle::attribf(x+r/2, y+r); gle::attrib(tc[3]);
- gle::attribf(x+r, y+r); gle::attrib(tc[2]);
- xtraverts += gle::end();
- }
- if(!j)
- {
- r -= 10;
- x += 5;
- y += 5;
- }
- else if(j == 2) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
}
y += s+gap;
}