From 5c2be94bff8485a362b7f299518cba77f6632813 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 18 Aug 2011 22:01:01 +0000 Subject: [PATCH] Make Ctrl-Alt-A also remove gray walls in the side-view mode. This makes TROR-heavy maps look much less cramped when used in conjunction with Ctrl-A. git-svn-id: https://svn.eduke32.com/eduke32@1970 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 12 +++++++++--- polymer/eduke32/build/src/engine.c | 10 +++++++++- polymer/eduke32/source/namesdyn.c | 5 +++-- polymer/eduke32/source/sector.c | 10 ++++------ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 95d65fa2c..ceab895b6 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -2776,6 +2776,10 @@ void overheadeditor(void) } if (zoom >= 768) + { + int32_t alwaysshowgray = + (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT_MAX)); + for (i=0, k=0; (m32_sideview && k= 0) + if ((!m32_sideview || !alwaysshowgray) && sprite[i].sectnum >= 0) YAX_SKIPSECTOR(sprite[i].sectnum); dabuffer = ExtGetSpriteCaption(i); @@ -2808,6 +2812,7 @@ void overheadeditor(void) sprite[i].x, sprite[i].y, sprite[i].z); } } + } } // stick this event right between begin- end enddrawing()... @@ -7080,6 +7085,7 @@ int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point) { int32_t i, j, dst, dist = 512, closest = -1; int32_t dax,day; + int32_t alwaysshowgray = (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT_MAX)); if (numwalls == 0) return -1; @@ -7092,7 +7098,7 @@ int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point) for (i=0; i= 0) + if ((!m32_sideview || !alwaysshowgray) && sprite[i].sectnum >= 0) YAX_SKIPSECTOR(sprite[i].sectnum); if (!m32_sideview) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 40acac93a..0dddc74a2 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -14852,9 +14852,17 @@ void draw2dscreen(const vec3_t *pos, int16_t cursectnum, int16_t ange, int32_t z { j = m32_wallsprite[i]; if (j>3]&(1<<(j&7)))); + { + if (alwaysshowgray || !(graybitmap[j>>3]&(1<<(j&7)))) + drawscreen_drawwall(j,posxe,posye,posze,zoome,!!(graybitmap[j>>3]&(1<<(j&7)))); + } else + { + if (!alwaysshowgray && sprite[j-MAXWALLS].sectnum>=0) + YAX_SKIPSECTOR(sprite[j-MAXWALLS].sectnum); + drawscreen_drawsprite(j-MAXWALLS,posxe,posye,posze,zoome); + } } faketimerhandler(); diff --git a/polymer/eduke32/source/namesdyn.c b/polymer/eduke32/source/namesdyn.c index 7f4663ade..6b84389eb 100644 --- a/polymer/eduke32/source/namesdyn.c +++ b/polymer/eduke32/source/namesdyn.c @@ -33,9 +33,10 @@ struct dynitem const int16_t vstat; int16_t val; }; -hashtable_t h_names = {512, NULL}; -struct dynitem list[]= +static hashtable_t h_names = {512, NULL}; + +static struct dynitem list[]= { {"SECTOREFFECTOR",&SECTOREFFECTOR,SECTOREFFECTOR__STATIC,1}, {"ACTIVATOR",&ACTIVATOR,ACTIVATOR__STATIC,2}, diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index a8ec67c0b..2453f117e 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -273,7 +273,7 @@ void G_DoSectorAnimations(void) // elevator had stopped. if (animateptr[i] == §or[animatesect[i]].floorz) for (j=headspritesect[dasect]; j>=0; j=nextspritesect[j]) - if (sprite[j].statnum != 3) + if (sprite[j].statnum != STAT_EFFECTOR) actor[j].bposz = sprite[j].z; g_animateCount--; @@ -1111,18 +1111,16 @@ void G_OperateForceFields(int32_t s, int32_t low) i = animwall[p].wallnum; if (low == wall[i].lotag || low == -1) - if (((wall[i].overpicnum >= W_FORCEFIELD)&&(wall[i].overpicnum <= W_FORCEFIELD+2))||(wall[i].overpicnum == BIGFORCE)) + if (((wall[i].overpicnum >= W_FORCEFIELD) && (wall[i].overpicnum <= W_FORCEFIELD+2)) + || (wall[i].overpicnum == BIGFORCE)) { - - animwall[p].tag = 0; if (wall[i].cstat) { wall[i].cstat = 0; - if (s >= 0 && sprite[s].picnum == SECTOREFFECTOR && - sprite[s].lotag == 30) + if (s >= 0 && sprite[s].picnum == SECTOREFFECTOR && sprite[s].lotag == 30) wall[i].lotag = 0; } else