From b6d729a553f4ffe1be46ae9a1ec9c7aca3dac873 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 6 Aug 2011 11:50:45 +0000 Subject: [PATCH] * 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 --- polymer/eduke32/build/src/build.c | 6 +++ polymer/eduke32/build/src/config.c | 4 +- polymer/eduke32/build/src/engine.c | 33 +++++-------- polymer/eduke32/samples/trueror1.map | Bin 37850 -> 37850 bytes polymer/eduke32/source/astub.c | 68 +++++++++++++-------------- 5 files changed, 52 insertions(+), 59 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index aca5e414d..bad5bb9fa 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -3230,6 +3230,8 @@ void overheadeditor(void) for (i=0; i 0) autogray = !!atoi_safe(val); - if (readconfig(fp, "showinnergray", val, VL) > 0) - showinnergray = !!atoi_safe(val); +// if (readconfig(fp, "showinnergray", val, VL) > 0) +// showinnergray = !!atoi_safe(val); if (readconfig(fp, "graphicsmode", val, VL) > 0) graphicsmode = clamp(atoi_safe(val), 0, 2); diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 7d329f364..a0a265fb2 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -104,7 +104,7 @@ int32_t dommxoverlay = 1, beforedrawrooms = 1, indrawroomsandmasks = 0; static int32_t oxdimen = -1, oviewingrange = -1, oxyaspect = -1; // 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 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 #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; } @@ -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; uint8_t *graybitmap = (uint8_t *)tempbuf; + int32_t alwaysshowgray = (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT_MAX)); 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>3]&(1<<(i&7))) || - ((j=wall[i].nextwall)>=0 && (graywallbitmap[j>>3]&(1<<(j&7))))) + j = wall[i].nextwall; + if ((graywallbitmap[i>>3]&(1<<(i&7))) && (j < 0 || (graywallbitmap[j>>3]&(1<<(j&7))))) graybitmap[i>>3] |= (1<<(i&7)); else 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--) drawscreen_drawwall(i,posxe,posye,posze,zoome, 0); #else - int32_t alwaysshowgray = (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT_MAX)); + if (alwaysshowgray) + for (i=numwalls-1; i>=0; i--) + if (graybitmap[i>>3]&(1<<(i&7))) + drawscreen_drawwall(i,posxe,posye,posze,zoome, 1+2); - for (i=numwalls-1; i>=0; i--) - if (graybitmap[i>>3]&(1<<(i&7))) - { - 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--) 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 } else @@ -14856,7 +14847,7 @@ 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)))); + drawscreen_drawwall(j,posxe,posye,posze,zoome,!!(graybitmap[j>>3]&(1<<(j&7)))); else drawscreen_drawsprite(j-MAXWALLS,posxe,posye,posze,zoome); } diff --git a/polymer/eduke32/samples/trueror1.map b/polymer/eduke32/samples/trueror1.map index e786bcfca98737bb728616e2f58827da0b75e9f3..cf87f66a6cda2f883a2295948585a6464645aa2d 100644 GIT binary patch delta 160 zcmcb$oaxqbrVTBeJPr&_j0_B13=9kjjGHHLmMiPB)B!oHjOy$P|0V&Y{{Lr?0Sag^ zFnniNz^KE(1eG^sm-siCak7bSurJGIpgIml8FqnxQz1I+fI6HQ7=#)B0|5hAo`q2Y cC_fD%ZvvF}VPFtJlIH-+PiNeGMVBoN011~UjsO4v delta 160 zcmcb$oaxqbrVTBeJRS^Aj0_B13=9m>%$p~0mMiNr)B!oHjOy$P|9}jJ|Nj|efRqLU z!*_-Sj5-WVP= 0) + { + Bsprintf(buffer,"Sector (%d) Lo-tag: ", tcursectornum); + sector[tcursectornum].lotag = + _getnumber16(buffer, sector[tcursectornum].lotag, BTAG_MAX, 0, (void *)ExtGetSectorType); + } } } @@ -7866,24 +7862,23 @@ static void Keys2d(void) } else { - for (i=0; i= 0) + { + Bsprintf(tempbuf,"Sector %d Extra: ",tcursectornum); + sector[tcursectornum].extra = getnumber16(tempbuf,sector[tcursectornum].extra,BTAG_MAX,1); + } } } if (!eitherCTRL && PRESSED_KEYSC(E)) // E (expand) { - for (i=0; i= 0) + { + sector[tcursectornum].floorstat ^= 8; + message("Sector %d floor texture expansion bit %s", tcursectornum, + ONOFF(sector[tcursectornum].floorstat&8)); + asksave = 1; + } } if (PRESSED_KEYSC(SLASH)) // / Reset panning&repeat to 0 @@ -7898,18 +7893,18 @@ static void Keys2d(void) } else if (graphicsmode != 0) { - for (i=0; i= 0) + { #ifdef YAX_ENABLE - if (yax_getbunch(i, YAX_FLOOR) < 0) + if (yax_getbunch(i, YAX_FLOOR) < 0) #endif - sector[i].floorxpanning = 0; - sector[i].floorypanning = 0; - message("Sector %d floor panning reset", i); - asksave = 1; - break; - } + sector[i].floorxpanning = 0; + sector[i].floorypanning = 0; + message("Sector %d floor panning reset", i); + asksave = 1; + } } } @@ -7937,11 +7932,12 @@ static void Keys2d(void) } else { - for (i=0; i= 0) #ifdef YAX_ENABLE if (k==1 || yax_getbunch(i, YAX_FLOOR) < 0) #endif - if (inside_editor_curpos(i) == 1) { uint8_t *panning = (k==0) ? §or[i].floorxpanning : §or[i].floorypanning; *panning = changechar(*panning, changedir, smooshy, 0);