mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1017 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
57c3cea591
commit
52bb6e84c9
7 changed files with 80 additions and 55 deletions
|
@ -146,7 +146,8 @@ const char *stripcolorcodes(const char *in, char *out)
|
|||
continue;
|
||||
}
|
||||
*(out++) = *(in++);
|
||||
} while (*in);
|
||||
}
|
||||
while (*in);
|
||||
|
||||
*out = '\0';
|
||||
return(ptr);
|
||||
|
@ -1402,12 +1403,12 @@ void OSD_Printf(const char *fmt, ...)
|
|||
|
||||
if (tmpstr[0]=='^' && tmpstr[1]=='1' && tmpstr[2]=='0' && ++OSD_errors > MAX_ERRORS)
|
||||
{
|
||||
if(OSD_errors == MAX_ERRORS+1) Bstrcpy(tmpstr,OSD_ERROR "\nToo many errors. Logging errors stopped.\n");
|
||||
else
|
||||
{
|
||||
OSD_errors=MAX_ERRORS+2;
|
||||
return;
|
||||
}
|
||||
if (OSD_errors == MAX_ERRORS+1) Bstrcpy(tmpstr,OSD_ERROR "\nToo many errors. Logging errors stopped.\n");
|
||||
else
|
||||
{
|
||||
OSD_errors=MAX_ERRORS+2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (linecnt<logcutoff)
|
||||
|
@ -1483,7 +1484,8 @@ void OSD_Printf(const char *fmt, ...)
|
|||
osdpos = 0;
|
||||
linefeed();
|
||||
}
|
||||
} while (*(++chp));
|
||||
}
|
||||
while (*(++chp));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4472,13 +4472,15 @@ RECHECK:
|
|||
updatesector(tspr->x+x,tspr->y+y,&datempsectnum);
|
||||
}
|
||||
|
||||
for (i=4;i>-1;i--)
|
||||
i = 4;
|
||||
do
|
||||
{
|
||||
cullcheckcnt++;
|
||||
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
|
||||
tspr->x+x, tspr->y+y, tspr->z-(j*i)-512, datempsectnum))
|
||||
return 1;
|
||||
}
|
||||
while (--i > -1);
|
||||
|
||||
if (x != y && x == oldx)
|
||||
{
|
||||
|
|
|
@ -7593,8 +7593,10 @@ void moveobjects(void)
|
|||
pl=findplayer(&sprite[i],&p);
|
||||
OnEvent(EVENT_GAME,i, pl, p);
|
||||
i = j;
|
||||
} while (i >= 0);
|
||||
} while (--k);
|
||||
}
|
||||
while (i >= 0);
|
||||
}
|
||||
while (--k);
|
||||
}
|
||||
|
||||
doanimations();
|
||||
|
|
|
@ -7437,20 +7437,21 @@ PALONLY:
|
|||
do
|
||||
{
|
||||
if (display_mirror) tsprite[j].statnum = TSPR_MIRROR;
|
||||
if (spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS && tsprite[j].owner < MAXSPRITES && tsprite[j].owner > 0)
|
||||
{
|
||||
OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1);
|
||||
spriteext[tsprite[j].owner].tspr = NULL;
|
||||
if (spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS && tsprite[j].owner < MAXSPRITES && tsprite[j].owner > 0)
|
||||
{
|
||||
OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1);
|
||||
spriteext[tsprite[j].owner].tspr = NULL;
|
||||
}
|
||||
} while (--j > 0);
|
||||
}
|
||||
while (--j > 0);
|
||||
|
||||
if (j < 0) return;
|
||||
|
||||
if (display_mirror) tsprite[j].statnum = TSPR_MIRROR;
|
||||
if (spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS && tsprite[j].owner < MAXSPRITES && tsprite[j].owner > 0)
|
||||
{
|
||||
OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1);
|
||||
spriteext[tsprite[j].owner].tspr = NULL;
|
||||
if (spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS && tsprite[j].owner < MAXSPRITES && tsprite[j].owner > 0)
|
||||
{
|
||||
OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1);
|
||||
spriteext[tsprite[j].owner].tspr = NULL;
|
||||
}
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -3686,7 +3686,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2)
|
|||
SetGameVarID(lVar2, spriteext[iActor].tspr->owner,g_i,g_p);
|
||||
return;
|
||||
|
||||
#if 1
|
||||
#if 1
|
||||
case ACTOR_XVEL:
|
||||
if (iSet)
|
||||
{
|
||||
|
@ -3722,7 +3722,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2)
|
|||
}
|
||||
SetGameVarID(lVar2, spriteext[iActor].tspr->lotag,g_i,g_p);
|
||||
return;
|
||||
|
||||
|
||||
case ACTOR_HITAG:
|
||||
if (iSet)
|
||||
{
|
||||
|
@ -5313,7 +5313,7 @@ static int parse(void)
|
|||
operatesectors(var1, var2);
|
||||
break;
|
||||
case CON_OPERATEACTIVATORS:
|
||||
if ((var2<0 || var2>=ud.multimode) && checkCON){OSD_Printf(CON_ERROR "Invalid player %d\n",line_num,keyw[g_tw],var2);break;}
|
||||
if ((var2<0 || var2>=ud.multimode) && checkCON) {OSD_Printf(CON_ERROR "Invalid player %d\n",line_num,keyw[g_tw],var2);break;}
|
||||
operateactivators(var1, var2);
|
||||
break;
|
||||
case CON_SETASPECT:
|
||||
|
@ -5573,13 +5573,13 @@ static int parse(void)
|
|||
Bstrcpy(fta_quotes[i],fta_quotes[j]);
|
||||
break;
|
||||
case CON_CHANGESPRITESTAT:
|
||||
if ((i<0 || i>=MAXSPRITES) && checkCON){OSD_Printf(CON_ERROR "Invalid sprite %d\n",line_num,keyw[g_tw],i);break;}
|
||||
if ((i<0 || i>=MAXSPRITES) && checkCON) {OSD_Printf(CON_ERROR "Invalid sprite %d\n",line_num,keyw[g_tw],i);break;}
|
||||
if ((j<0 || j>=MAXSTATUS) && checkCON) {OSD_Printf(CON_ERROR "Invalid status %d\n",line_num,keyw[g_tw],j);break;}
|
||||
changespritestat(i,j);
|
||||
break;
|
||||
case CON_CHANGESPRITESECT:
|
||||
if ((i<0 || i>=MAXSPRITES) && checkCON){OSD_Printf(CON_ERROR "Invalid sprite %d\n",line_num,keyw[g_tw],i);break;}
|
||||
if ((j<0 || j>=numsectors) && checkCON){OSD_Printf(CON_ERROR "Invalid sector %d\n",line_num,keyw[g_tw],j);break;}
|
||||
if ((i<0 || i>=MAXSPRITES) && checkCON) {OSD_Printf(CON_ERROR "Invalid sprite %d\n",line_num,keyw[g_tw],i);break;}
|
||||
if ((j<0 || j>=numsectors) && checkCON) {OSD_Printf(CON_ERROR "Invalid sector %d\n",line_num,keyw[g_tw],j);break;}
|
||||
changespritesect(i,j);
|
||||
break;
|
||||
}
|
||||
|
@ -7025,10 +7025,12 @@ static int parse(void)
|
|||
}
|
||||
}
|
||||
j = nextspritestat[j];
|
||||
} while (j>=0);
|
||||
}
|
||||
while (j>=0);
|
||||
if ((tw==CON_FINDNEARACTOR||tw==CON_FINDNEARACTOR3D) || j == MAXSPRITES)
|
||||
break;
|
||||
} while (k--);
|
||||
}
|
||||
while (k--);
|
||||
SetGameVarID(lVarID, lFound, g_i, g_p);
|
||||
break;
|
||||
}
|
||||
|
@ -7067,10 +7069,12 @@ static int parse(void)
|
|||
}
|
||||
}
|
||||
j = nextspritestat[j];
|
||||
} while (j >= 0);
|
||||
}
|
||||
while (j >= 0);
|
||||
if ((tw==CON_FINDNEARACTORVAR||tw==CON_FINDNEARACTOR3DVAR) || j == MAXSPRITES)
|
||||
break;
|
||||
} while (k--);
|
||||
}
|
||||
while (k--);
|
||||
SetGameVarID(lVarID, lFound, g_i, g_p);
|
||||
break;
|
||||
}
|
||||
|
@ -7109,10 +7113,12 @@ static int parse(void)
|
|||
}
|
||||
}
|
||||
j = nextspritestat[j];
|
||||
} while (j>=0);
|
||||
}
|
||||
while (j>=0);
|
||||
if (tw==CON_FINDNEARACTORZVAR || j == MAXSPRITES)
|
||||
break;
|
||||
} while (k--);
|
||||
}
|
||||
while (k--);
|
||||
SetGameVarID(lVarID, lFound, g_i, g_p);
|
||||
|
||||
break;
|
||||
|
@ -7152,10 +7158,12 @@ static int parse(void)
|
|||
}
|
||||
}
|
||||
j = nextspritestat[j];
|
||||
} while (j>=0);
|
||||
}
|
||||
while (j>=0);
|
||||
if (tw==CON_FINDNEARACTORZ || j == MAXSPRITES)
|
||||
break;
|
||||
} while (k--);
|
||||
}
|
||||
while (k--);
|
||||
SetGameVarID(lVarID, lFound, g_i, g_p);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -666,7 +666,8 @@ void CONTROL_PollDevices(ControlInfo *info)
|
|||
CONTROL_ScaleAxis(i, controldevice_mouse);
|
||||
LIMITCONTROL(&CONTROL_MouseAxes[i].analog);
|
||||
CONTROL_ApplyAxis(i, info, controldevice_mouse);
|
||||
} while (--i >= 0);
|
||||
}
|
||||
while (--i >= 0);
|
||||
}
|
||||
|
||||
if (CONTROL_JoystickEnabled)
|
||||
|
@ -684,7 +685,8 @@ void CONTROL_PollDevices(ControlInfo *info)
|
|||
CONTROL_ScaleAxis(i, controldevice_joystick);
|
||||
LIMITCONTROL(&CONTROL_JoyAxes[i].analog);
|
||||
CONTROL_ApplyAxis(i, info, controldevice_joystick);
|
||||
} while (--i >= 0);
|
||||
}
|
||||
while (--i >= 0);
|
||||
}
|
||||
|
||||
CONTROL_GetDeviceButtons();
|
||||
|
@ -707,7 +709,8 @@ void CONTROL_AxisFunctionState(int32 *p1)
|
|||
|
||||
if (j != AXISUNDEFINED)
|
||||
p1[j] = 1;
|
||||
} while (--i >= 0);
|
||||
}
|
||||
while (--i >= 0);
|
||||
}
|
||||
|
||||
if (CONTROL_NumJoyAxes)
|
||||
|
@ -725,7 +728,8 @@ void CONTROL_AxisFunctionState(int32 *p1)
|
|||
|
||||
if (j != AXISUNDEFINED)
|
||||
p1[j] = 1;
|
||||
} while (--i >= 0);
|
||||
}
|
||||
while (--i >= 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -735,16 +739,6 @@ void CONTROL_ButtonFunctionState(int32 *p1)
|
|||
|
||||
do
|
||||
{
|
||||
if (bindsenabled)
|
||||
{
|
||||
if (mousebind[i].cmd[0] && CONTROL_MouseButtonState[i])
|
||||
{
|
||||
if (mousebind[i].repeat || (mousebind[i].laststate == 0))
|
||||
OSD_Dispatch(mousebind[i].cmd);
|
||||
}
|
||||
mousebind[i].laststate = CONTROL_MouseButtonState[i];
|
||||
}
|
||||
|
||||
if (!mousebind[i].cmd[0])
|
||||
{
|
||||
j = CONTROL_MouseButtonMapping[i].doubleclicked;
|
||||
|
@ -755,7 +749,18 @@ void CONTROL_ButtonFunctionState(int32 *p1)
|
|||
if (j != KEYUNDEFINED)
|
||||
p1[j] |= CONTROL_MouseButtonState[i];
|
||||
}
|
||||
} while (--i >= 0);
|
||||
|
||||
if (!bindsenabled)
|
||||
continue;
|
||||
|
||||
if (mousebind[i].cmd[0] && CONTROL_MouseButtonState[i])
|
||||
{
|
||||
if (mousebind[i].repeat || (mousebind[i].laststate == 0))
|
||||
OSD_Dispatch(mousebind[i].cmd);
|
||||
}
|
||||
mousebind[i].laststate = CONTROL_MouseButtonState[i];
|
||||
}
|
||||
while (--i >= 0);
|
||||
|
||||
i=CONTROL_NumJoyButtons-1;
|
||||
do
|
||||
|
@ -767,7 +772,8 @@ void CONTROL_ButtonFunctionState(int32 *p1)
|
|||
j = CONTROL_JoyButtonMapping[i].singleclicked;
|
||||
if (j != KEYUNDEFINED)
|
||||
p1[j] |= CONTROL_JoyButtonState[i];
|
||||
} while (--i >= 0);
|
||||
}
|
||||
while (--i >= 0);
|
||||
}
|
||||
/*
|
||||
void CONTROL_GetUserInput( UserInput *info )
|
||||
|
@ -876,7 +882,8 @@ void CONTROL_ProcessBinds(void)
|
|||
OSD_Dispatch(boundkeys[i].cmd);
|
||||
}
|
||||
boundkeys[i].laststate = KB_KeyPressed(i);
|
||||
} while (--i);
|
||||
}
|
||||
while (--i);
|
||||
|
||||
if (boundkeys[0].cmd[0] && KB_KeyPressed(0))
|
||||
{
|
||||
|
@ -912,7 +919,8 @@ void CONTROL_GetInput(ControlInfo *info)
|
|||
|
||||
if (CONTROL_Flags[i].cleared == false) BUTTONSET(i, CONTROL_Flags[i].active);
|
||||
else if (CONTROL_Flags[i].active == false) CONTROL_Flags[i].cleared = 0;
|
||||
} while (--i);
|
||||
}
|
||||
while (--i);
|
||||
|
||||
CONTROL_SetFlag(0, CONTROL_KeyboardFunctionPressed(0) | periphs[0] | extinput[0]);
|
||||
if (CONTROL_Flags[0].cleared == false) BUTTONSET(0, CONTROL_Flags[0].active);
|
||||
|
|
|
@ -43,10 +43,11 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
|
|||
|
||||
// use the format byte if the text falls within the bounds of the console buffer
|
||||
rotatesprite(x<<16, (y<<3)<<16, 65536, 0, ac, (*(ch-ptr+fmt)&~0x1F)>>4,
|
||||
*(ch-ptr+fmt)&~0xE0, 8|16, 0, 0, xdim-1, ydim-1);
|
||||
*(ch-ptr+fmt)&~0xE0, 8|16, 0, 0, xdim-1, ydim-1);
|
||||
x += OSDCHAR_WIDTH+1;
|
||||
ch++;
|
||||
} while (--len);
|
||||
}
|
||||
while (--len);
|
||||
|
||||
usehightile = ht;
|
||||
return;
|
||||
|
@ -66,7 +67,8 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
|
|||
rotatesprite(x<<16, (y<<3)<<16, 65536, 0, ac, shade, pal, 8|16, 0, 0, xdim-1, ydim-1);
|
||||
x += OSDCHAR_WIDTH+1;
|
||||
ch++;
|
||||
} while (--len);
|
||||
}
|
||||
while (--len);
|
||||
|
||||
usehightile = ht;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue