git-svn-id: https://svn.eduke32.com/eduke32@1017 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-08-24 06:17:09 +00:00
parent 57c3cea591
commit 52bb6e84c9
7 changed files with 80 additions and 55 deletions

View file

@ -146,7 +146,8 @@ const char *stripcolorcodes(const char *in, char *out)
continue;
}
*(out++) = *(in++);
} while (*in);
}
while (*in);
*out = '\0';
return(ptr);
@ -1483,7 +1484,8 @@ void OSD_Printf(const char *fmt, ...)
osdpos = 0;
linefeed();
}
} while (*(++chp));
}
while (*(++chp));
}

View file

@ -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)
{

View file

@ -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();

View file

@ -7442,7 +7442,8 @@ PALONLY:
OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1);
spriteext[tsprite[j].owner].tspr = NULL;
}
} while (--j > 0);
}
while (--j > 0);
if (j < 0) return;

View file

@ -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;
}

View file

@ -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);

View file

@ -46,7 +46,8 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
*(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;
}