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

View file

@ -4472,13 +4472,15 @@ RECHECK:
updatesector(tspr->x+x,tspr->y+y,&datempsectnum); updatesector(tspr->x+x,tspr->y+y,&datempsectnum);
} }
for (i=4;i>-1;i--) i = 4;
do
{ {
cullcheckcnt++; cullcheckcnt++;
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+x, tspr->y+y, tspr->z-(j*i)-512, datempsectnum)) tspr->x+x, tspr->y+y, tspr->z-(j*i)-512, datempsectnum))
return 1; return 1;
} }
while (--i > -1);
if (x != y && x == oldx) if (x != y && x == oldx)
{ {

View file

@ -7593,8 +7593,10 @@ void moveobjects(void)
pl=findplayer(&sprite[i],&p); pl=findplayer(&sprite[i],&p);
OnEvent(EVENT_GAME,i, pl, p); OnEvent(EVENT_GAME,i, pl, p);
i = j; i = j;
} while (i >= 0); }
} while (--k); while (i >= 0);
}
while (--k);
} }
doanimations(); doanimations();

View file

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

View file

@ -7025,10 +7025,12 @@ static int parse(void)
} }
} }
j = nextspritestat[j]; j = nextspritestat[j];
} while (j>=0); }
while (j>=0);
if ((tw==CON_FINDNEARACTOR||tw==CON_FINDNEARACTOR3D) || j == MAXSPRITES) if ((tw==CON_FINDNEARACTOR||tw==CON_FINDNEARACTOR3D) || j == MAXSPRITES)
break; break;
} while (k--); }
while (k--);
SetGameVarID(lVarID, lFound, g_i, g_p); SetGameVarID(lVarID, lFound, g_i, g_p);
break; break;
} }
@ -7067,10 +7069,12 @@ static int parse(void)
} }
} }
j = nextspritestat[j]; j = nextspritestat[j];
} while (j >= 0); }
while (j >= 0);
if ((tw==CON_FINDNEARACTORVAR||tw==CON_FINDNEARACTOR3DVAR) || j == MAXSPRITES) if ((tw==CON_FINDNEARACTORVAR||tw==CON_FINDNEARACTOR3DVAR) || j == MAXSPRITES)
break; break;
} while (k--); }
while (k--);
SetGameVarID(lVarID, lFound, g_i, g_p); SetGameVarID(lVarID, lFound, g_i, g_p);
break; break;
} }
@ -7109,10 +7113,12 @@ static int parse(void)
} }
} }
j = nextspritestat[j]; j = nextspritestat[j];
} while (j>=0); }
while (j>=0);
if (tw==CON_FINDNEARACTORZVAR || j == MAXSPRITES) if (tw==CON_FINDNEARACTORZVAR || j == MAXSPRITES)
break; break;
} while (k--); }
while (k--);
SetGameVarID(lVarID, lFound, g_i, g_p); SetGameVarID(lVarID, lFound, g_i, g_p);
break; break;
@ -7152,10 +7158,12 @@ static int parse(void)
} }
} }
j = nextspritestat[j]; j = nextspritestat[j];
} while (j>=0); }
while (j>=0);
if (tw==CON_FINDNEARACTORZ || j == MAXSPRITES) if (tw==CON_FINDNEARACTORZ || j == MAXSPRITES)
break; break;
} while (k--); }
while (k--);
SetGameVarID(lVarID, lFound, g_i, g_p); SetGameVarID(lVarID, lFound, g_i, g_p);
break; break;
} }

View file

@ -666,7 +666,8 @@ void CONTROL_PollDevices(ControlInfo *info)
CONTROL_ScaleAxis(i, controldevice_mouse); CONTROL_ScaleAxis(i, controldevice_mouse);
LIMITCONTROL(&CONTROL_MouseAxes[i].analog); LIMITCONTROL(&CONTROL_MouseAxes[i].analog);
CONTROL_ApplyAxis(i, info, controldevice_mouse); CONTROL_ApplyAxis(i, info, controldevice_mouse);
} while (--i >= 0); }
while (--i >= 0);
} }
if (CONTROL_JoystickEnabled) if (CONTROL_JoystickEnabled)
@ -684,7 +685,8 @@ void CONTROL_PollDevices(ControlInfo *info)
CONTROL_ScaleAxis(i, controldevice_joystick); CONTROL_ScaleAxis(i, controldevice_joystick);
LIMITCONTROL(&CONTROL_JoyAxes[i].analog); LIMITCONTROL(&CONTROL_JoyAxes[i].analog);
CONTROL_ApplyAxis(i, info, controldevice_joystick); CONTROL_ApplyAxis(i, info, controldevice_joystick);
} while (--i >= 0); }
while (--i >= 0);
} }
CONTROL_GetDeviceButtons(); CONTROL_GetDeviceButtons();
@ -707,7 +709,8 @@ void CONTROL_AxisFunctionState(int32 *p1)
if (j != AXISUNDEFINED) if (j != AXISUNDEFINED)
p1[j] = 1; p1[j] = 1;
} while (--i >= 0); }
while (--i >= 0);
} }
if (CONTROL_NumJoyAxes) if (CONTROL_NumJoyAxes)
@ -725,7 +728,8 @@ void CONTROL_AxisFunctionState(int32 *p1)
if (j != AXISUNDEFINED) if (j != AXISUNDEFINED)
p1[j] = 1; p1[j] = 1;
} while (--i >= 0); }
while (--i >= 0);
} }
} }
@ -735,16 +739,6 @@ void CONTROL_ButtonFunctionState(int32 *p1)
do 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]) if (!mousebind[i].cmd[0])
{ {
j = CONTROL_MouseButtonMapping[i].doubleclicked; j = CONTROL_MouseButtonMapping[i].doubleclicked;
@ -755,7 +749,18 @@ void CONTROL_ButtonFunctionState(int32 *p1)
if (j != KEYUNDEFINED) if (j != KEYUNDEFINED)
p1[j] |= CONTROL_MouseButtonState[i]; 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; i=CONTROL_NumJoyButtons-1;
do do
@ -767,7 +772,8 @@ void CONTROL_ButtonFunctionState(int32 *p1)
j = CONTROL_JoyButtonMapping[i].singleclicked; j = CONTROL_JoyButtonMapping[i].singleclicked;
if (j != KEYUNDEFINED) if (j != KEYUNDEFINED)
p1[j] |= CONTROL_JoyButtonState[i]; p1[j] |= CONTROL_JoyButtonState[i];
} while (--i >= 0); }
while (--i >= 0);
} }
/* /*
void CONTROL_GetUserInput( UserInput *info ) void CONTROL_GetUserInput( UserInput *info )
@ -876,7 +882,8 @@ void CONTROL_ProcessBinds(void)
OSD_Dispatch(boundkeys[i].cmd); OSD_Dispatch(boundkeys[i].cmd);
} }
boundkeys[i].laststate = KB_KeyPressed(i); boundkeys[i].laststate = KB_KeyPressed(i);
} while (--i); }
while (--i);
if (boundkeys[0].cmd[0] && KB_KeyPressed(0)) 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); if (CONTROL_Flags[i].cleared == false) BUTTONSET(i, CONTROL_Flags[i].active);
else if (CONTROL_Flags[i].active == false) CONTROL_Flags[i].cleared = 0; 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]); CONTROL_SetFlag(0, CONTROL_KeyboardFunctionPressed(0) | periphs[0] | extinput[0]);
if (CONTROL_Flags[0].cleared == false) BUTTONSET(0, CONTROL_Flags[0].active); 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); *(ch-ptr+fmt)&~0xE0, 8|16, 0, 0, xdim-1, ydim-1);
x += OSDCHAR_WIDTH+1; x += OSDCHAR_WIDTH+1;
ch++; ch++;
} while (--len); }
while (--len);
usehightile = ht; usehightile = ht;
return; 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); rotatesprite(x<<16, (y<<3)<<16, 65536, 0, ac, shade, pal, 8|16, 0, 0, xdim-1, ydim-1);
x += OSDCHAR_WIDTH+1; x += OSDCHAR_WIDTH+1;
ch++; ch++;
} while (--len); }
while (--len);
usehightile = ht; usehightile = ht;
} }