diff --git a/polymer/eduke32/build/include/editor.h b/polymer/eduke32/build/include/editor.h index b29ddf8ba..8d7eaa126 100644 --- a/polymer/eduke32/build/include/editor.h +++ b/polymer/eduke32/build/include/editor.h @@ -449,6 +449,8 @@ FORCE_INLINE void inpclamp(int32_t *x, int32_t mi, int32_t ma) extern char *blendtable[MAXBLENDTABS]; #define drawtranspixel(p, col) drawpixel(p, blendtable[0][(readpixel(p) * 256) + col]) +#define M32_THROB klabs(sintable[((totalclock << 4) & 2047)] >> 10) + #ifdef __cplusplus } #endif diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 631d82962..1d06bf78c 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -703,11 +703,10 @@ int32_t app_main(int32_t argc, const char **argv) Bstrcpy(kensig,"Uses BUILD technology by Ken Silverman"); initcrc(); - { - const char *defsfile = G_DefFile(); - if (!loaddefinitionsfile(defsfile)) - initprintf("Definitions file \"%s\" loaded.\n",defsfile); - } + const char *defsfile = G_DefFile(); + + if (!loaddefinitionsfile(defsfile)) + initprintf("Definitions file \"%s\" loaded.\n",defsfile); for (i=0; i < g_defModulesNum; ++i) Bfree (g_defModules[i]); @@ -2101,7 +2100,7 @@ static void duplicate_selected_sectors(void) printmessage16("Sectors duplicated, creating %d new bunches.", numyaxbunches-onumyaxbunches); else #endif - printmessage16("Sectors duplicated and stamped."); + printmessage16("Sectors duplicated."); asksave = 1; #ifdef YAX_ENABLE @@ -2133,7 +2132,7 @@ static void duplicate_selected_sprites(void) // setsprite(j,(vec3_t *)&sprite[j]); } - printmessage16("Sprites duplicated and stamped."); + printmessage16("Sprites duplicated."); asksave = 1; } else @@ -3278,8 +3277,10 @@ static void drawspritelabel(int i) int col = spritecol2d[sprite[i].picnum][0] ? editorcolors[spritecol2d[sprite[i].picnum][0]] : getspritecol(i); - if ((i == pointhighlight - 16384) && (totalclock & 32)) - col += 4; + if (show2dsprite[i>>3]&pow2char[i&7]) + col = editorcolors[14] - (M32_THROB>>1); + else if (i == pointhighlight - 16384) + col += M32_THROB>>2; else if (sprite[i].sectnum < 0) col = editorcolors[4]; // red @@ -3368,7 +3369,7 @@ void overheadeditor(void) zoom = max(zoom, ztarget); } - if (!((vel|angvel|svel) || ztarget != zoom//DOWN_BK(MOVEFORWARD) || DOWN_BK(MOVEBACKWARD) || DOWN_BK(TURNLEFT) || DOWN_BK(TURNRIGHT) + if (!((vel|angvel|svel) || m32_is2d3dmode() || ztarget != zoom//DOWN_BK(MOVEFORWARD) || DOWN_BK(MOVEBACKWARD) || DOWN_BK(TURNLEFT) || DOWN_BK(TURNRIGHT) || DOWN_BK(MOVEUP) || DOWN_BK(MOVEDOWN) || keystatus[0x10] || keystatus[0x11] || keystatus[0x48] || keystatus[0x4b] || keystatus[0x4d] || keystatus[0x50] // keypad keys || bstatus || OSD_IsMoving())) @@ -3800,7 +3801,7 @@ void overheadeditor(void) drawline16(0,searchy, 8,searchy, editorcolors[15]); // 2d3d mode - if (m32_2d3dmode && xdimgame == xdim2d && ydimgame == ydim2d) + if (m32_2d3dmode && m32_2d3d_resolutions_match()) { int bakrendmode = rendmode; vec2_t bdim ={ xdim, ydim }; @@ -3815,33 +3816,57 @@ void overheadeditor(void) if (m32_2d3d.y + YSIZE_2D3D > ydim2d - 4 - STATUS2DSIZ2) m32_2d3d.y = ydim2d - 4 - YSIZE_2D3D - STATUS2DSIZ2; - setview(m32_2d3d.x, m32_2d3d.y, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y + YSIZE_2D3D); - clearview(-1); + updatesectorz(pos.x, pos.y, pos.z, &cursectnum); - vec2_t osearch ={ searchx, searchy }; + if (cursectnum == -1) + updatesector(pos.x, pos.y, &cursectnum); - searchx -= m32_2d3d.x; - searchy -= m32_2d3d.y; + if (cursectnum != -1) + { + int32_t cz, fz; - M32_DrawRoomsAndMasks(); - setview(0, 0, xdim2d-1, ydim2d-1); + getzsofslope(cursectnum, pos.x, pos.y, &cz, &fz); - rendmode = bakrendmode; - xdim = bdim.x; - ydim = bdim.y; - searchx = osearch.x; - searchy = osearch.y; + inpclamp(&pos.z, cz+(4<<8), fz-(4<<8)); - drawline16(m32_2d3d.x, m32_2d3d.y, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y, editorcolors[15]); - drawline16(m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y + YSIZE_2D3D, editorcolors[15]); - drawline16(m32_2d3d.x, m32_2d3d.y, m32_2d3d.x, m32_2d3d.y + YSIZE_2D3D, editorcolors[15]); - drawline16(m32_2d3d.x, m32_2d3d.y + YSIZE_2D3D, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y + YSIZE_2D3D, editorcolors[15]); + setview(m32_2d3d.x, m32_2d3d.y, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y + YSIZE_2D3D); + clearview(-1); + + vec2_t osearch ={ searchx, searchy }; + + searchx -= m32_2d3d.x; + searchy -= m32_2d3d.y; + + M32_DrawRoomsAndMasks(); + setview(0, 0, xdim2d-1, ydim2d-1); + + rendmode = bakrendmode; + xdim = bdim.x; + ydim = bdim.y; + searchx = osearch.x; + searchy = osearch.y; + + drawline16(m32_2d3d.x, m32_2d3d.y, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y, editorcolors[15]); + drawline16(m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y + YSIZE_2D3D, editorcolors[15]); + drawline16(m32_2d3d.x, m32_2d3d.y, m32_2d3d.x, m32_2d3d.y + YSIZE_2D3D, editorcolors[15]); + drawline16(m32_2d3d.x, m32_2d3d.y + YSIZE_2D3D, m32_2d3d.x + XSIZE_2D3D, m32_2d3d.y + YSIZE_2D3D, editorcolors[15]); + } } if (!m32_is2d3dmode()) { ////// draw mouse pointer + + col = editorcolors[0]; + + drawline16base(searchx+1, searchy+1, +0, -8, +0, -1, col); + drawline16base(searchx+1, searchy+1, +0, 1, +0, 8, col); + + drawline16base(searchx+1, searchy+1, -8, 0, -1, 0, col); + drawline16base(searchx+1, searchy+1, 1, 0, 8, 0, col); + col = searchlock ? editorcolors[13] : editorcolors[15 - 3*gridlock]; + if (joinsector[0] >= 0) col = editorcolors[11]; @@ -3865,7 +3890,7 @@ void overheadeditor(void) Bsprintf(cbuf, "Map corrupt (level %d): %s%d errors", corruptlevel, numcorruptthings>=MAXCORRUPTTHINGS ? ">=" : "", numcorruptthings); - printext16(8, 8, editorcolors[13], editorcolors[0], cbuf, 0); + printext16(8, 8, editorcolors[13]+(M32_THROB>>2), editorcolors[0], cbuf, 0); } if (highlightsectorcnt==0 || highlightcnt==0) @@ -4890,7 +4915,7 @@ end_yax: ; if (highlightsectorcnt < 0) { - if ((bstatus & 1 && highlightcnt <= 0) || (bstatus & 1 && pointhighlight == -1) || keystatus[0x36]) //Right shift (point highlighting) + if (((bstatus & 5) == 1 && highlightcnt <= 0) || ((bstatus & 5) == 1 && pointhighlight == -1) || keystatus[0x36]) //Right shift (point highlighting) { if (highlightcnt == 0) { @@ -4901,7 +4926,7 @@ end_yax: ; highlighty2 = searchy; ydim16 = ydim-STATUS2DSIZ2; - plotlines2d(xx, yy, 5, editorcolors[14]); + plotlines2d(xx, yy, 5, -editorcolors[14]); } else if (pointhighlight == -1 || keystatus[0x36]) { @@ -5076,7 +5101,7 @@ end_yax: ; if (highlightcnt < 0) { - if (keystatus[0xb8]) //Right alt (sector highlighting) + if (((bstatus & 4) && highlightsectorcnt <= 0) || (bstatus & 4) && linehighlight == -1 || keystatus[0xb8]) //Right alt (sector highlighting) { if (highlightsectorcnt == 0) { @@ -5089,7 +5114,7 @@ end_yax: ; highlighty2 = searchy; ydim16 = ydim-STATUS2DSIZ2; - plotlines2d(xx, yy, 5, editorcolors[10]); + plotlines2d(xx, yy, 5, -editorcolors[10]); } } else @@ -5763,7 +5788,7 @@ end_after_dragging: } end_point_dragging: - if (bstatus&(2|4)) // change arrow position + if (bstatus&(2) && !(bstatus&1)) // change arrow position { if (eitherCTRL) { @@ -5783,7 +5808,7 @@ end_point_dragging: CallExtEditSectorData(cursectornum); } - bstatus &= ~6; + bstatus &= ~2; } else { @@ -9927,14 +9952,17 @@ static inline int32_t imod(int32_t a, int32_t b) int32_t fillsector(int16_t sectnum, int32_t fillcolor) { + if (sectnum == -1) + return 0; + int32_t x1, x2, y1, y2, sy, y, daminy; int32_t lborder, rborder, uborder, dborder, miny, maxy, dax; int16_t z, zz, startwall, endwall, fillcnt; char col; - if (fillcolor < 0) - col = 159-klabs(sintable[((totalclock<<3)&2047)]>>11); + if (fillcolor == -1) + col = editorcolors[14]-(M32_THROB>>1); else col = fillcolor; @@ -9942,8 +9970,6 @@ int32_t fillsector(int16_t sectnum, int32_t fillcolor) y = OSD_GetRowsCur(); uborder = (y>=0)?(y+1)*8:0; dborder = ydim16-STATUS2DSIZ2; - if (sectnum == -1) - return 0; miny = dborder-1; maxy = uborder; @@ -9972,12 +9998,12 @@ int32_t fillsector(int16_t sectnum, int32_t fillcolor) if (miny < uborder) miny = uborder; if (maxy >= dborder) maxy = dborder-1; - daminy = miny+2 - imod(miny+2,3); + daminy = miny;// +2 - imod(miny+2, 3); if (sector[sectnum].floorz > minhlsectorfloorz) daminy++; //+((totalclock>>2)&3) - for (sy=daminy; sy<=maxy; sy+=3) // JBF 20040116: numframes%3 -> (totalclock>>2)&3 + for (sy=daminy; sy<=maxy; sy++) // JBF 20040116: numframes%3 -> (totalclock>>2)&3 { y = pos.y + ((sy-midydim16)<<14)/zoom; @@ -10047,7 +10073,7 @@ int32_t fillsector(int16_t sectnum, int32_t fillcolor) if (fillist[z+1] > rborder) fillist[z+1] = rborder; - drawline16(fillist[z]+1,sy, fillist[z+1]-1,sy, col); //editorcolors[fillcolor] + drawline16(fillist[z]+1,sy, fillist[z+1]-1,sy, -col); //editorcolors[fillcolor] } } } diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 50a40acb3..c8b690961 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -17090,20 +17090,19 @@ static void drawscreen_drawwall(int32_t i, int32_t posxe, int32_t posye, int32_t char col; if (grayp&1) - col = 8; + col = editorcolors[8]; else if (j < 0) - col = (i == linehighlight) && !(totalclock & 16) ? 7 : 15; + col = (i == linehighlight) ? editorcolors[15] - M32_THROB : editorcolors[15]; else { if ((unsigned)wal->nextwall < MAXWALLS && ((wal->cstat^wall[j].cstat)&1)) - col = 2; + col = editorcolors[2]; else if ((wal->cstat&1) != 0) - col = 5; - else col = 33; + col = editorcolors[5]; + else col = editorcolors[4]; if ((i == linehighlight) || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall))) - if (totalclock & 16) - col += (2<<2); + col += M32_THROB>>2; } int32_t x1, y1, x2, y2; @@ -17116,18 +17115,22 @@ static void drawscreen_drawwall(int32_t i, int32_t posxe, int32_t posye, int32_t if (dist > INT32_MAX) { - col=9; + col=editorcolors[9]; if (i == linehighlight || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall))) if (totalclock & 16) col -= (2<<2); } - else if (showfirstwall && searchsector>=0 && (sector[searchsector].wallptr == i || - sector[searchsector].wallptr == wall[i].nextwall)) + else if ((showfirstwall && searchsector>=0 && (sector[searchsector].wallptr == i || + sector[searchsector].wallptr == wall[i].nextwall)) || + ((show2dwall[i>>3]&pow2char[i&7]) && (show2dwall[wall[i].point2>>3]&pow2char[wall[i].point2&7]))) + { - col = 14; - if (i == linehighlight) if (totalclock & 16) col -= (2<<2); + col = editorcolors[14]; + if (i == linehighlight || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall)) || + ((show2dwall[i>>3]&pow2char[i&7]) && (show2dwall[wall[i].point2>>3]&pow2char[wall[i].point2&7]))) + col -= M32_THROB>>1; } else if (circlewall >= 0 && (i == circlewall || wal->nextwall == circlewall)) - col = 14; + col = editorcolors[14]; int32_t fz=0, fzn=0; @@ -17149,7 +17152,7 @@ static void drawscreen_drawwall(int32_t i, int32_t posxe, int32_t posye, int32_t { fzn = getflorzofslope(wal->nextsector, wal->x,wal->y); // if (i < wall[j].point2) - drawline16mid(x1,y1, x1,y1+getscreenvdisp(fzn-fz,zoome), editorcolors[col]); + drawline16mid(x1,y1, x1,y1+getscreenvdisp(fzn-fz,zoome), col); } #ifdef YAX_ENABLE { @@ -17160,7 +17163,7 @@ static void drawscreen_drawwall(int32_t i, int32_t posxe, int32_t posye, int32_t int32_t odrawlinepat = drawlinepat; fz2 = getflorzofslope(sectorofwall(nw), wall[nw].x,wall[nw].y); drawlinepat = 0x11111111; - drawline16mid(x1,y1, x1,y1+getscreenvdisp(fz2-fz,zoome), editorcolors[col]); + drawline16mid(x1,y1, x1,y1+getscreenvdisp(fz2-fz,zoome), col); drawlinepat = odrawlinepat; } } @@ -17174,13 +17177,13 @@ static void drawscreen_drawwall(int32_t i, int32_t posxe, int32_t posye, int32_t { int32_t one=(klabs(x2-x1) >= klabs(y2-y1)), no=!one; - drawline16mid(x1+no,y1+one, x2+no,y2+one, editorcolors[col]); - drawline16mid(x1-no,y1-one, x2-no,y2-one, editorcolors[col]); + drawline16mid(x1+no,y1+one, x2+no,y2+one, col); + drawline16mid(x1-no,y1-one, x2-no,y2-one, col); col += 8; } - drawline16mid(x1,y1, x2,y2, editorcolors[col]); + drawline16mid(x1,y1, x2,y2, col); // Draw height indicators at center of walls if requested and if not in // side-view mode. @@ -17205,7 +17208,7 @@ static void drawscreen_drawwall(int32_t i, int32_t posxe, int32_t posye, int32_t int32_t const dx = mulscale11(sintable[(k+1024 + 1024*bb)&2047],min(4096, zoome)) / 2560; int32_t const dy = scalescreeny(mulscale11(sintable[(k+512 + 1024*bb)&2047], min(4096, zoome)) / 2560); - drawline16mid(dax,day, dax+dx,day+dy, editorcolors[col]); + drawline16mid(dax,day, dax+dx,day+dy, col); } } else if (showheightindicators == 2) @@ -17214,47 +17217,42 @@ static void drawscreen_drawwall(int32_t i, int32_t posxe, int32_t posye, int32_t int32_t const dx = mulscale11(sintable[(k+2048)&2047],min(4096, zoome)) / 2560; int32_t const dy = scalescreeny(mulscale11(sintable[(k+1536)&2047], min(4096, zoome)) / 2560); - drawline16mid(dax,day, dax+dx,day+dy, editorcolors[col]); + drawline16mid(dax,day, dax+dx,day+dy, col); } } - if (zoome >= 256 && editstatus == 1) + if ((zoome >= 256 && editstatus == 1) || show2dwall[i>>3]&pow2char[i&7]) if ((halfxdim16+x1 >= 2) && (halfxdim16+x1 <= xdim-3) && (midydim16+y1 >= 2) && (midydim16+y1 <= ydim16-3)) { int32_t pointsize = 2; - col = 15; + col = editorcolors[15]; if (i == pointhighlight || ((pointhighlight < MAXWALLS) && (pointhighlight >= 0) && (wall[i].x == wall[pointhighlight].x) && (wall[i].y == wall[pointhighlight].y))) { + col = editorcolors[15] - (M32_THROB>>1); + if (totalclock & 16) pointsize++; - else col = 7; - } - else //if (highlightcnt > 0) - { - if (show2dwall[i>>3]&pow2char[i&7]) - { - if (totalclock & 16) - pointsize++; - else col = 7; - } } + + if (show2dwall[i>>3]&pow2char[i&7]) + col = editorcolors[14] - (M32_THROB>>1); if (m32_sideview) { if (wal->nextwall >= 0) { if (fz < fzn) - col = 7; + col = editorcolors[7]; else if (fz == fzn) - col = 4; + col = editorcolors[4]; } } - drawcircle16(halfxdim16+x1, midydim16+y1, pointsize, 16384, editorcolors[col]); + drawcircle16(halfxdim16+x1, midydim16+y1, pointsize, 16384, col); } } @@ -17324,12 +17322,17 @@ static void drawscreen_drawsprite(int32_t j, int32_t posxe, int32_t posye, int32 (!m32_sideview && ((sprite[j].x == sprite[pointhighlight-16384].x) && (sprite[j].y == sprite[pointhighlight-16384].y))))) { - if (totalclock & 32) col += 4; + col += M32_THROB>>2; } else // if (highlightcnt > 0) { if (show2dsprite[j>>3]&pow2char[j&7]) - if (totalclock & 32) col += 4; + { + col = editorcolors[14]; + +// if ((totalclock & 16) == 0) + col -= (M32_THROB>>1); + } } } diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index b382540a0..25211f4fc 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -117,7 +117,7 @@ sound_t g_sounds[MAXSOUNDS]; static int16_t g_definedsndnum[MAXSOUNDS]; // maps parse order index to g_sounds index static int16_t g_sndnum[MAXSOUNDS]; // maps current order index to g_sounds index int32_t g_numsounds = 0; -static int32_t lastupdate, mousecol, mouseadd = 1, bstatus; +static int32_t lastupdate, mousecol, bstatus; static int32_t corruptchecktimer; static int32_t curcorruptthing=-1; @@ -2357,30 +2357,13 @@ static void m32_showmouse(void) { int32_t i, col; - if (totalclock > lastupdate) - { - mousecol += mouseadd; - if (mousecol >= 30 || mousecol <= 0) - { - mouseadd = -mouseadd; - mousecol += mouseadd; - } - lastupdate = totalclock + 3; - } + mousecol = M32_THROB; - switch (whitecol) - { - case 1: // Shadow Warrior - col = whitecol+mousecol; - break; - case 31: // Duke Nukem 3D - col = whitecol-mousecol; - break; - default: - col = whitecol; - break; - } + if (whitecol > editorcolors[0]) + col = whitecol - mousecol; + else col = whitecol + mousecol; + OSD_Printf("%d\n", col); #ifdef USE_OPENGL if (getrendermode() >= REND_POLYMOST) { @@ -2389,7 +2372,7 @@ static void m32_showmouse(void) } #endif - if (col != whitecol) +// if (col != whitecol) { for (i=((xdim > 640)?3:2); i<=((xdim > 640)?7:3); i++) { @@ -2409,10 +2392,10 @@ static void m32_showmouse(void) i = (xdim > 640)?8:4; - plotpixel(searchx+i,searchy,0); - plotpixel(searchx-i,searchy,0); - plotpixel(searchx,searchy-i,0); - plotpixel(searchx,searchy+i,0); + plotpixel(searchx+i,searchy,editorcolors[0]); + plotpixel(searchx-i,searchy,editorcolors[0]); + plotpixel(searchx,searchy-i,editorcolors[0]); + plotpixel(searchx,searchy+i,editorcolors[0]); } if (xdim > 640) @@ -4323,7 +4306,7 @@ static void Keys3d(void) #ifdef YAX_ENABLE__COMPAT flags |= (yax_getnextwall(searchwall, YAX_CEILING)>=0) + 2*(yax_getnextwall(searchwall, YAX_FLOOR)>=0); #endif - drawtileinfo("Current", WIND1X,WIND1Y, + drawtileinfo("Selected", WIND1X,WIND1Y, AIMING_AT_WALL ? wall[w].picnum : wall[w].overpicnum, wall[w].shade, wall[w].pal, wall[w].cstat, wall[searchwall].lotag, wall[searchwall].hitag, wall[searchwall].extra, flags); @@ -4361,7 +4344,7 @@ static void Keys3d(void) case SEARCH_CEILING: case SEARCH_FLOOR: - drawtileinfo("Current", WIND1X, WIND1Y, AIMED_CEILINGFLOOR(picnum), AIMED_CEILINGFLOOR(shade), + drawtileinfo("Selected", WIND1X, WIND1Y, AIMED_CEILINGFLOOR(picnum), AIMED_CEILINGFLOOR(shade), AIMED_CEILINGFLOOR(pal), AIMED_CEILINGFLOOR(stat), sector[searchsector].lotag, sector[searchsector].hitag, sector[searchsector].extra,0); @@ -4388,7 +4371,7 @@ static void Keys3d(void) break; case SEARCH_SPRITE: - drawtileinfo("Current", WIND1X, WIND1Y, sprite[searchwall].picnum, sprite[searchwall].shade, + drawtileinfo("Selected", WIND1X, WIND1Y, sprite[searchwall].picnum, sprite[searchwall].shade, sprite[searchwall].pal, sprite[searchwall].cstat, sprite[searchwall].lotag, sprite[searchwall].hitag, sprite[searchwall].extra,0); @@ -5407,15 +5390,18 @@ static void Keys3d(void) int32_t x = (xdim <= 640); int32_t chars = Bsprintf(tempbuf, "%2u ms (%3u fps)", howlong, LastCount); + int32_t const dax = m32_is2d3dmode() ? m32_2d3d.x + XSIZE_2D3D - 3: windowx2; + int32_t const day = m32_is2d3dmode() ? m32_2d3d.y + 4 : windowy1; + if (!x) { - printext256(windowx2-(chars<<3)+1,windowy1+2,0,-1,tempbuf,x); - printext256(windowx2-(chars<<3),windowy1+1,COLOR_WHITE,-1,tempbuf,x); + printext256(dax-(chars<<3)+1, day+2,0,-1,tempbuf,x); + printext256(dax-(chars<<3), day+1,COLOR_WHITE,-1,tempbuf,x); } else { - printext256(windowx2-(chars<<2)+1,windowy1+2,0,-1,tempbuf,x); - printext256(windowx2-(chars<<2),windowy1+1,COLOR_WHITE,-1,tempbuf,x); + printext256(dax-(chars<<2)+1, day+2,0,-1,tempbuf,x); + printext256(dax-(chars<<2), day+1,COLOR_WHITE,-1,tempbuf,x); } if (LastSec < thisSec) @@ -5532,15 +5518,6 @@ static void Keys3d(void) } } - if (cursectnum>=0 && sector[cursectnum].lotag==2) - { - if (sector[cursectnum].ceilingpicnum==FLOORSLIME) - SetGamePalette(SLIMEPAL); - else - SetGamePalette(WATERPAL); - } - else SetGamePalette(BASEPAL); - if (keystatus[buildkeys[BK_MODE2D_3D]]) // Enter { SetGamePalette(BASEPAL); @@ -7892,7 +7869,7 @@ static void InitCustomColors(void) for (i = 0; i<256; i++) { edcol = (palette_t *)&vgapal16[4*i]; - editorcolors[i] = getclosestcol(edcol->b,edcol->g,edcol->r); + editorcolors[i] = getclosestcol_lim(edcol->b,edcol->g,edcol->r, 239); } } @@ -10232,12 +10209,7 @@ void ExtPreCheckKeys(void) // just before drawrooms break; } - if (i+16384 != pointhighlight || !(totalclock&32)) - { - shade = sprite[i].shade; - if (shade < 6) - shade = 6; - } + shade = (i+16384 == pointhighlight) ? 7 - (M32_THROB>>1) : sprite[i].shade; if (m32_sideview) { @@ -10272,7 +10244,7 @@ void ExtPreCheckKeys(void) // just before drawrooms int32_t radius, col; int32_t xp1, yp1; - if (sprite[i].picnum != MUSICANDSFX /*|| zoom < 256*/ ) + if (sprite[i].picnum != MUSICANDSFX /*|| zoom < 256*/ || sprite[i].hitag < 1000) continue; if (showambiencesounds==1 && sprite[i].sectnum!=cursectnum) @@ -10282,12 +10254,17 @@ void ExtPreCheckKeys(void) // just before drawrooms if (m32_sideview) yp1 += getscreenvdisp(sprite[i].z-pos.z, zoom); - radius = mulscale14(sprite[i].hitag,zoom); - col = 6; - if (i+16384 == pointhighlight) - if (totalclock & 32) col += (2<<2); drawlinepat = 0xf0f0f0f0; - drawcircle16(halfxdim16+xp1, midydim16+yp1, radius, scalescreeny(16384), editorcolors[col]); + + col = editorcolors[6]; + if (i+16384 == pointhighlight) + { + radius = mulscale14(sprite[i].hitag - (M32_THROB<<2), zoom); + col += M32_THROB>>1; + } + else radius = mulscale14(sprite[i].hitag, zoom); + + drawcircle16(halfxdim16+xp1, midydim16+yp1, radius, scalescreeny(16384), col); drawlinepat = 0xffffffff; } } @@ -10481,6 +10458,16 @@ static void Keys2d3d(void) // mapstate = mapstate->prev; } #endif + + if (cursectnum>=0 && sector[cursectnum].lotag==2) + { + if (sector[cursectnum].ceilingpicnum==FLOORSLIME) + SetGamePalette(SLIMEPAL); + else + SetGamePalette(WATERPAL); + } + else SetGamePalette(BASEPAL); + if (keystatus[KEYSC_F10]) { keystatus[KEYSC_F10]=0;