mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@577 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0da33eeaa0
commit
1753d91046
5 changed files with 18 additions and 13 deletions
|
@ -10842,7 +10842,7 @@ void draw2dscreen(long posxe, long posye, short ange, long zoome, short gride)
|
||||||
char pointsize;
|
char pointsize;
|
||||||
col = 6;
|
col = 6;
|
||||||
pointsize=2;
|
pointsize=2;
|
||||||
if (i == pointhighlight || ((wall[i].x == wall[pointhighlight].x) && (wall[i].y == wall[pointhighlight].y)))
|
if (i == pointhighlight || ((pointhighlight < MAXWALLS) && (wall[i].x == wall[pointhighlight].x) && (wall[i].y == wall[pointhighlight].y)))
|
||||||
{
|
{
|
||||||
if (totalclock & 16)
|
if (totalclock & 16)
|
||||||
{
|
{
|
||||||
|
@ -10887,7 +10887,7 @@ void draw2dscreen(long posxe, long posye, short ange, long zoome, short gride)
|
||||||
}
|
}
|
||||||
if (editstatus == 1)
|
if (editstatus == 1)
|
||||||
{
|
{
|
||||||
if (j+16384 == pointhighlight || ((sprite[j].x == sprite[pointhighlight-16384].x) && (sprite[j].y == sprite[pointhighlight-16384].y))) {
|
if (j+16384 == pointhighlight || ((pointhighlight-16384 < MAXSPRITES) && (sprite[j].x == sprite[pointhighlight-16384].x) && (sprite[j].y == sprite[pointhighlight-16384].y))) {
|
||||||
if (totalclock & 32) col += (2<<2);
|
if (totalclock & 32) col += (2<<2);
|
||||||
}
|
}
|
||||||
else if ((highlightcnt > 0) && (editstatus == 1))
|
else if ((highlightcnt > 0) && (editstatus == 1))
|
||||||
|
|
|
@ -2865,7 +2865,7 @@ static int SetupOpenGL(int width, int height, int bitspp)
|
||||||
0,0,
|
0,0,
|
||||||
width,height,
|
width,height,
|
||||||
hWindow,
|
hWindow,
|
||||||
(HMENU)1,
|
(HMENU)0,
|
||||||
hInstance,
|
hInstance,
|
||||||
NULL);
|
NULL);
|
||||||
if (!hGLWindow) {
|
if (!hGLWindow) {
|
||||||
|
|
|
@ -12108,6 +12108,7 @@ FRAGBONUS:
|
||||||
{
|
{
|
||||||
int yy = 0, zz;
|
int yy = 0, zz;
|
||||||
|
|
||||||
|
getpackets();
|
||||||
handleevents();
|
handleevents();
|
||||||
AudioUpdate();
|
AudioUpdate();
|
||||||
|
|
||||||
|
|
|
@ -4508,15 +4508,18 @@ static int parse(void)
|
||||||
{
|
{
|
||||||
int distvar = *insptr++, xvar = GetGameVarID(*insptr++, g_i, g_p), yvar = GetGameVarID(*insptr++, g_i, g_p), distx=0;
|
int distvar = *insptr++, xvar = GetGameVarID(*insptr++, g_i, g_p), yvar = GetGameVarID(*insptr++, g_i, g_p), distx=0;
|
||||||
|
|
||||||
switch (tw)
|
if (xvar > -1 && xvar < MAXSPRITES && yvar > -1 && yvar < MAXSPRITES)
|
||||||
{
|
{
|
||||||
case CON_DIST:
|
switch (tw)
|
||||||
distx = dist(&sprite[xvar],&sprite[yvar]);
|
{
|
||||||
break;
|
case CON_DIST:
|
||||||
case CON_LDIST:
|
distx = dist(&sprite[xvar],&sprite[yvar]);
|
||||||
distx = ldist(&sprite[xvar],&sprite[yvar]);
|
break;
|
||||||
break;
|
case CON_LDIST:
|
||||||
}
|
distx = ldist(&sprite[xvar],&sprite[yvar]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else OSD_Printf("error: invalid sprite\n");
|
||||||
|
|
||||||
SetGameVarID(distvar, distx, g_i, g_p);
|
SetGameVarID(distvar, distx, g_i, g_p);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -198,10 +198,11 @@ int checkcursectnums(int sect)
|
||||||
|
|
||||||
long ldist(spritetype *s1,spritetype *s2)
|
long ldist(spritetype *s1,spritetype *s2)
|
||||||
{
|
{
|
||||||
long vx,vy;
|
long vx,vy,ret;
|
||||||
vx = s1->x - s2->x;
|
vx = s1->x - s2->x;
|
||||||
vy = s1->y - s2->y;
|
vy = s1->y - s2->y;
|
||||||
return(FindDistance2D(vx,vy) + 1);
|
ret = FindDistance2D(vx,vy);
|
||||||
|
return(ret?ret:1);
|
||||||
}
|
}
|
||||||
|
|
||||||
long dist(spritetype *s1,spritetype *s2)
|
long dist(spritetype *s1,spritetype *s2)
|
||||||
|
|
Loading…
Reference in a new issue