mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Address complaints from the "Mapster32 problems and bugs" thread.
git-svn-id: https://svn.eduke32.com/eduke32@5283 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f72dffce07
commit
ff466191cb
2 changed files with 26 additions and 16 deletions
|
@ -3323,14 +3323,14 @@ void overheadeditor(void)
|
|||
{
|
||||
if (totalclock > waitdelay)
|
||||
{
|
||||
uint32_t ms = (highlightsectorcnt>0) ? 75 : 200;
|
||||
uint32_t ms = 50;// (highlightsectorcnt>0) ? 75 : 200;
|
||||
// wait for event, timeout after 200 ms - (last loop time)
|
||||
idle_waitevent_timeout(ms - min(getticks()-lasttick, ms));
|
||||
// have synctics reset to 0 after we've slept to avoid zooming out to the max instantly
|
||||
resetsynctics = 1;
|
||||
}
|
||||
}
|
||||
else waitdelay = totalclock + 30; // should be 250 ms
|
||||
else waitdelay = totalclock + 6; // should be 50 ms
|
||||
|
||||
lasttick = getticks();
|
||||
|
||||
|
@ -3593,7 +3593,7 @@ void overheadeditor(void)
|
|||
}
|
||||
|
||||
if ((i == pointhighlight-16384) && (totalclock & 32))
|
||||
col += (2<<2);
|
||||
col += 4;
|
||||
|
||||
drawsmallabel(dabuffer, editorcolors[0], col,
|
||||
sprite[i].x, sprite[i].y, sprite[i].z);
|
||||
|
@ -5904,20 +5904,30 @@ end_point_dragging:
|
|||
{
|
||||
int32_t didzoom=0;
|
||||
|
||||
if ((DOWN_BK(MOVEUP) || (bstatus&16)) && zoom < 32768)
|
||||
if ((DOWN_BK(MOVEUP) || (bstatus&16)) && zoom < 65536)
|
||||
{
|
||||
if (DOWN_BK(MOVEUP))
|
||||
{
|
||||
ztarget += (synctics*(ztarget>>4))>>(eitherSHIFT<<1);
|
||||
|
||||
if (zoom < 64)
|
||||
ztarget += (synctics*(ztarget>>4)) * (eitherSHIFT);
|
||||
}
|
||||
if (bstatus&16)
|
||||
ztarget += 4*(ztarget>>4);
|
||||
|
||||
if (zoom < 24) zoom += 2;
|
||||
didzoom = 1;
|
||||
}
|
||||
if ((DOWN_BK(MOVEDOWN) || (bstatus&32)) && zoom > 32)
|
||||
if ((DOWN_BK(MOVEDOWN) || (bstatus&32)) && zoom > 16)
|
||||
{
|
||||
if (DOWN_BK(MOVEDOWN))
|
||||
{
|
||||
ztarget -= (synctics*(ztarget>>4))>>(eitherSHIFT<<1);
|
||||
|
||||
if (zoom < 64)
|
||||
ztarget -= (synctics * (ztarget >> 4)) * (eitherSHIFT);
|
||||
}
|
||||
if (bstatus&32)
|
||||
ztarget -= 4*(ztarget>>4);
|
||||
|
||||
|
@ -5933,11 +5943,16 @@ end_point_dragging:
|
|||
pos.x = mousxplc;
|
||||
pos.y = mousyplc;
|
||||
}
|
||||
ztarget = clamp(ztarget, 32, 32768);
|
||||
ztarget = clamp(ztarget, 16, 65536);
|
||||
|
||||
_printmessage16("Zoom: %d",ztarget);
|
||||
|
||||
if (ztarget == 16 || ztarget == 65536)
|
||||
message("Ludicrous Zoom!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (keystatus[0x22]) // G (grid on/off)
|
||||
{
|
||||
keystatus[0x22] = 0;
|
||||
|
@ -8996,7 +9011,7 @@ void clearmidstatbar16(void)
|
|||
|
||||
static void clearministatbar16(void)
|
||||
{
|
||||
int32_t i, col = whitecol - 16;
|
||||
int32_t i, col = whitecol - 20;
|
||||
|
||||
begindrawing();
|
||||
|
||||
|
|
|
@ -17261,15 +17261,10 @@ int32_t getspritecol(int32_t spr)
|
|||
if (cols[i] > cnt)
|
||||
col = i, cnt = cols[i];
|
||||
|
||||
float sum = (float)curpalette[col].r * GRAYSCALE_COEFF_RED + (float)curpalette[col].g * GRAYSCALE_COEFF_GREEN +
|
||||
(float)curpalette[col].b * GRAYSCALE_COEFF_BLUE;
|
||||
|
||||
while (col < 240 &&
|
||||
((float)curpalette[col + 1].r * GRAYSCALE_COEFF_RED + (float)curpalette[col + 1].g * GRAYSCALE_COEFF_GREEN +
|
||||
(float)curpalette[col + 1].b * GRAYSCALE_COEFF_BLUE) > sum)
|
||||
while (col < 240 && curpalette[col+1].r > curpalette[col].r)
|
||||
col++;
|
||||
|
||||
tilecols[picnum] = col - 8;
|
||||
tilecols[picnum] = col - 4;
|
||||
|
||||
return palookup[pal][tilecols[picnum]];
|
||||
}
|
||||
|
@ -17311,12 +17306,12 @@ 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 += 8;
|
||||
if (totalclock & 32) col += 4;
|
||||
}
|
||||
else // if (highlightcnt > 0)
|
||||
{
|
||||
if (show2dsprite[j>>3]&pow2char[j&7])
|
||||
if (totalclock & 32) col += 8;
|
||||
if (totalclock & 32) col += 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue