* skip grayed out sectors when changing tags in 2d mode

* make Ctrl-Alt-A (formerly 'toggle inner gray walls') now remove all gray walls entirely in 2d mode
* make r_usenewaspect enabled by default

git-svn-id: https://svn.eduke32.com/eduke32@1957 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-08-06 11:50:45 +00:00
parent 54f345f78f
commit b6d729a553
5 changed files with 52 additions and 59 deletions

View file

@ -3230,6 +3230,8 @@ void overheadeditor(void)
for (i=0; i<numsectors; i++) for (i=0; i<numsectors; i++)
if (inside_editor_curpos(i) == 1) if (inside_editor_curpos(i) == 1)
{ {
YAX_SKIPSECTOR(i);
ExtEditSectorData(i); ExtEditSectorData(i);
break; break;
} }
@ -3293,6 +3295,8 @@ void overheadeditor(void)
for (i=0; i<numsectors; i++) for (i=0; i<numsectors; i++)
if (inside_editor_curpos(i) == 1) if (inside_editor_curpos(i) == 1)
{ {
YAX_SKIPSECTOR(i);
Bsprintf(buffer, "Sector (%d) Hi-tag: ", i); Bsprintf(buffer, "Sector (%d) Hi-tag: ", i);
sector[i].hitag = getnumber16(buffer, sector[i].hitag, BTAG_MAX, 0); sector[i].hitag = getnumber16(buffer, sector[i].hitag, BTAG_MAX, 0);
break; break;
@ -3307,6 +3311,8 @@ void overheadeditor(void)
for (i=0; i<numsectors; i++) for (i=0; i<numsectors; i++)
if (inside_editor_curpos(i) == 1) if (inside_editor_curpos(i) == 1)
{ {
YAX_SKIPSECTOR(i);
Bsprintf(buffer, "Sector (%d) Ceilingpal: ", i); Bsprintf(buffer, "Sector (%d) Ceilingpal: ", i);
sector[i].ceilingpal = getnumber16(buffer, sector[i].ceilingpal, M32_MAXPALOOKUPS, 0); sector[i].ceilingpal = getnumber16(buffer, sector[i].ceilingpal, M32_MAXPALOOKUPS, 0);

View file

@ -274,8 +274,8 @@ int32_t loadsetup(const char *fn)
if (readconfig(fp, "autogray", val, VL) > 0) if (readconfig(fp, "autogray", val, VL) > 0)
autogray = !!atoi_safe(val); autogray = !!atoi_safe(val);
if (readconfig(fp, "showinnergray", val, VL) > 0) // if (readconfig(fp, "showinnergray", val, VL) > 0)
showinnergray = !!atoi_safe(val); // showinnergray = !!atoi_safe(val);
if (readconfig(fp, "graphicsmode", val, VL) > 0) if (readconfig(fp, "graphicsmode", val, VL) > 0)
graphicsmode = clamp(atoi_safe(val), 0, 2); graphicsmode = clamp(atoi_safe(val), 0, 2);

View file

@ -104,7 +104,7 @@ int32_t dommxoverlay = 1, beforedrawrooms = 1, indrawroomsandmasks = 0;
static int32_t oxdimen = -1, oviewingrange = -1, oxyaspect = -1; static int32_t oxdimen = -1, oviewingrange = -1, oxyaspect = -1;
// r_usenewaspect is the cvar, newaspect_enable to trigger the new behaviour in the code // r_usenewaspect is the cvar, newaspect_enable to trigger the new behaviour in the code
int32_t r_usenewaspect = 0, newaspect_enable=0; int32_t r_usenewaspect = 1, newaspect_enable=0;
uint32_t r_screenxy = 403; // 4:3 aspect ratio uint32_t r_screenxy = 403; // 4:3 aspect ratio
int32_t curbrightness = 0, gammabrightness = 0; int32_t curbrightness = 0, gammabrightness = 0;
@ -14402,10 +14402,10 @@ static void drawscreen_drawwall(int32_t i, int32_t posxe, int32_t posye, int32_t
else else
#endif #endif
{ {
if (!m32_sideview && (j >= 0) && (i > j)) return; if (!m32_sideview && !(grayp&2) && (j >= 0) && (i > j)) return;
} }
if (grayp) if (grayp&1)
{ {
col = 8; col = 8;
} }
@ -14746,6 +14746,7 @@ void draw2dscreen(const vec3_t *pos, int16_t cursectnum, int16_t ange, int32_t z
int32_t posxe=pos->x, posye=pos->y, posze=pos->z; int32_t posxe=pos->x, posye=pos->y, posze=pos->z;
uint8_t *graybitmap = (uint8_t *)tempbuf; uint8_t *graybitmap = (uint8_t *)tempbuf;
int32_t alwaysshowgray = (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT_MAX));
if (qsetmode == 200) return; if (qsetmode == 200) return;
@ -14773,8 +14774,8 @@ void draw2dscreen(const vec3_t *pos, int16_t cursectnum, int16_t ange, int32_t z
{ {
for (i=0; i<numwalls; i++) for (i=0; i<numwalls; i++)
{ {
if ((graywallbitmap[i>>3]&(1<<(i&7))) || j = wall[i].nextwall;
((j=wall[i].nextwall)>=0 && (graywallbitmap[j>>3]&(1<<(j&7))))) if ((graywallbitmap[i>>3]&(1<<(i&7))) && (j < 0 || (graywallbitmap[j>>3]&(1<<(j&7)))))
graybitmap[i>>3] |= (1<<(i&7)); graybitmap[i>>3] |= (1<<(i&7));
else else
graybitmap[i>>3] &= ~(1<<(i&7)); graybitmap[i>>3] &= ~(1<<(i&7));
@ -14787,24 +14788,14 @@ void draw2dscreen(const vec3_t *pos, int16_t cursectnum, int16_t ange, int32_t z
for (i=numwalls-1; i>=0; i--) for (i=numwalls-1; i>=0; i--)
drawscreen_drawwall(i,posxe,posye,posze,zoome, 0); drawscreen_drawwall(i,posxe,posye,posze,zoome, 0);
#else #else
int32_t alwaysshowgray = (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT_MAX)); if (alwaysshowgray)
for (i=numwalls-1; i>=0; i--) for (i=numwalls-1; i>=0; i--)
if (graybitmap[i>>3]&(1<<(i&7))) if (graybitmap[i>>3]&(1<<(i&7)))
{ drawscreen_drawwall(i,posxe,posye,posze,zoome, 1+2);
if (alwaysshowgray)
drawscreen_drawwall(i,posxe,posye,posze,zoome, 1);
else
{
j = sectorofwall(i); // ugh...
if ((yax_getbunch(j,0)<0 || yax_getnextwall(i,0)>=0) &&
(yax_getbunch(j,1)<0 || yax_getnextwall(i,1)>=0))
drawscreen_drawwall(i,posxe,posye,posze,zoome, 1);
}
}
for (i=numwalls-1; i>=0; i--) for (i=numwalls-1; i>=0; i--)
if ((graybitmap[i>>3]&(1<<(i&7)))==0) if ((graybitmap[i>>3]&(1<<(i&7)))==0)
drawscreen_drawwall(i,posxe,posye,posze,zoome, 0); drawscreen_drawwall(i,posxe,posye,posze,zoome, 2);
#endif #endif
} }
else else
@ -14856,7 +14847,7 @@ void draw2dscreen(const vec3_t *pos, int16_t cursectnum, int16_t ange, int32_t z
{ {
j = m32_wallsprite[i]; j = m32_wallsprite[i];
if (j<MAXWALLS) if (j<MAXWALLS)
drawscreen_drawwall(j,posxe,posye,posze,zoome,(graybitmap[j>>3]&(1<<(j&7)))); drawscreen_drawwall(j,posxe,posye,posze,zoome,!!(graybitmap[j>>3]&(1<<(j&7))));
else else
drawscreen_drawsprite(j-MAXWALLS,posxe,posye,posze,zoome); drawscreen_drawsprite(j-MAXWALLS,posxe,posye,posze,zoome);
} }

Binary file not shown.

View file

@ -7691,7 +7691,7 @@ static void Keys2d(void)
if (eitherALT) if (eitherALT)
{ {
showinnergray = !showinnergray; showinnergray = !showinnergray;
printmessage16("Display inner gray walls: %s", ONOFF(showinnergray)); printmessage16("Display grayed out walls: %s", ONOFF(showinnergray));
} }
else else
{ {
@ -7784,15 +7784,11 @@ static void Keys2d(void)
} }
else else
{ {
for (i=0; i<numsectors; i++) if (tcursectornum >= 0)
if (inside_editor_curpos(i) == 1)
{ {
Bsprintf(buffer,"Sector (%d) Lo-tag: ",i); Bsprintf(buffer,"Sector (%d) Lo-tag: ", tcursectornum);
// j = qsetmode; sector[tcursectornum].lotag =
// qsetmode = 200; _getnumber16(buffer, sector[tcursectornum].lotag, BTAG_MAX, 0, (void *)ExtGetSectorType);
sector[i].lotag = _getnumber16(buffer, sector[i].lotag, BTAG_MAX, 0, (void *)ExtGetSectorType);
// qsetmode = j;
// break;
} }
} }
} }
@ -7866,22 +7862,21 @@ static void Keys2d(void)
} }
else else
{ {
for (i=0; i<numsectors; i++) if (tcursectornum >= 0)
if (inside_editor_curpos(i) == 1)
{ {
Bsprintf(tempbuf,"Sector %d Extra: ",i); Bsprintf(tempbuf,"Sector %d Extra: ",tcursectornum);
sector[i].extra = getnumber16(tempbuf,sector[i].extra,BTAG_MAX,1); sector[tcursectornum].extra = getnumber16(tempbuf,sector[tcursectornum].extra,BTAG_MAX,1);
} }
} }
} }
if (!eitherCTRL && PRESSED_KEYSC(E)) // E (expand) if (!eitherCTRL && PRESSED_KEYSC(E)) // E (expand)
{ {
for (i=0; i<numsectors; i++) if (tcursectornum >= 0)
if (inside_editor_curpos(i) == 1)
{ {
sector[i].floorstat ^= 8; sector[tcursectornum].floorstat ^= 8;
message("Sector %d floor texture expansion bit %s", i, ONOFF(sector[i].floorstat&8)); message("Sector %d floor texture expansion bit %s", tcursectornum,
ONOFF(sector[tcursectornum].floorstat&8));
asksave = 1; asksave = 1;
} }
} }
@ -7898,8 +7893,9 @@ static void Keys2d(void)
} }
else if (graphicsmode != 0) else if (graphicsmode != 0)
{ {
for (i=0; i<numsectors; i++) i = tcursectornum;
if (inside_editor_curpos(i) == 1)
if (i >= 0)
{ {
#ifdef YAX_ENABLE #ifdef YAX_ENABLE
if (yax_getbunch(i, YAX_FLOOR) < 0) if (yax_getbunch(i, YAX_FLOOR) < 0)
@ -7908,7 +7904,6 @@ static void Keys2d(void)
sector[i].floorypanning = 0; sector[i].floorypanning = 0;
message("Sector %d floor panning reset", i); message("Sector %d floor panning reset", i);
asksave = 1; asksave = 1;
break;
} }
} }
} }
@ -7937,11 +7932,12 @@ static void Keys2d(void)
} }
else else
{ {
for (i=0; i<numsectors; i++) i = tcursectornum;
if (i >= 0)
#ifdef YAX_ENABLE #ifdef YAX_ENABLE
if (k==1 || yax_getbunch(i, YAX_FLOOR) < 0) if (k==1 || yax_getbunch(i, YAX_FLOOR) < 0)
#endif #endif
if (inside_editor_curpos(i) == 1)
{ {
uint8_t *panning = (k==0) ? &sector[i].floorxpanning : &sector[i].floorypanning; uint8_t *panning = (k==0) ? &sector[i].floorxpanning : &sector[i].floorypanning;
*panning = changechar(*panning, changedir, smooshy, 0); *panning = changechar(*panning, changedir, smooshy, 0);