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
This commit is contained in:
helixhorned 2011-08-18 22:01:01 +00:00
parent 5262a0f24c
commit 5c2be94bff
4 changed files with 25 additions and 12 deletions

View file

@ -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<m32_swcnt) || (!m32_sideview && i<MAXSPRITES); i++, k++)
{
if (m32_sideview)
@ -2789,7 +2793,7 @@ void overheadeditor(void)
if (sprite[i].statnum == MAXSTATUS)
continue;
if (!m32_sideview && sprite[i].sectnum >= 0)
if ((!m32_sideview || !alwaysshowgray) && sprite[i].sectnum >= 0)
YAX_SKIPSECTOR(sprite[i].sectnum);
dabuffer = ExtGetSpriteCaption(i);
@ -2809,6 +2813,7 @@ void overheadeditor(void)
}
}
}
}
// stick this event right between begin- end enddrawing()...
// also after the above label stuff so users can redefine them
@ -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<numsectors; i++)
{
if (!m32_sideview)
if (!m32_sideview || !alwaysshowgray)
YAX_SKIPSECTOR(i);
for (j=sector[i].wallptr; j<sector[i].wallptr+sector[i].wallnum; j++)
@ -7123,7 +7129,7 @@ int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point)
for (i=0; i<MAXSPRITES; i++)
if (sprite[i].statnum < MAXSTATUS)
{
if (!m32_sideview && sprite[i].sectnum >= 0)
if ((!m32_sideview || !alwaysshowgray) && sprite[i].sectnum >= 0)
YAX_SKIPSECTOR(sprite[i].sectnum);
if (!m32_sideview)

View file

@ -14852,10 +14852,18 @@ void draw2dscreen(const vec3_t *pos, int16_t cursectnum, int16_t ange, int32_t z
{
j = m32_wallsprite[i];
if (j<MAXWALLS)
{
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();
}

View file

@ -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},

View file

@ -273,7 +273,7 @@ void G_DoSectorAnimations(void)
// elevator had stopped.
if (animateptr[i] == &sector[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