Blah blah blah

git-svn-id: https://svn.eduke32.com/eduke32@400 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-12-10 21:53:33 +00:00
parent 7017166f2d
commit c4147db020
8 changed files with 24 additions and 28 deletions

View File

@ -597,7 +597,7 @@ int32 CONFIG_ReadSetup(void)
SCRIPT_GetString(scripthandle, "Comm Setup","PlayerName",&tempbuf[0]);
while (Bstrlen(strip_color_codes(tempbuf)) > 10)
while (Bstrlen(stripcolorcodes(tempbuf)) > 10)
tempbuf[Bstrlen(tempbuf)-1] = '\0';
Bstrncpy(myname,tempbuf,sizeof(myname)-1);

View File

@ -241,6 +241,6 @@ extern void sendboardname(void);
extern void sendquit(void);
extern void adduserquote(char *daquote);
extern char *strip_color_codes(char *t);
extern char *stripcolorcodes(char *t);
#endif // __funct_h__

View File

@ -251,7 +251,7 @@ void setgamepalette(struct player_struct *player, char *pal, int set)
#define TEXTWRAPLEN (scale(35,ScreenWidth,320))
char *strip_color_codes(char *t)
char *stripcolorcodes(char *t)
{
int i = 0;
@ -403,12 +403,12 @@ static int minitext_(int x,int y,char *t,char s,char p,short sb)
inline int minitextshade(int x,int y,char *t,char s,char p,short sb)
{
return (minitext_(x,y,(char *)strip_color_codes(t),s,p,sb));
return (minitext_(x,y,(char *)stripcolorcodes(t),s,p,sb));
}
inline int minitext(int x,int y,char *t,char p,short sb)
{
return (minitext_(x,y,(char *)strip_color_codes(t),0,p,sb));
return (minitext_(x,y,(char *)stripcolorcodes(t),0,p,sb));
}
#if 0
@ -458,7 +458,7 @@ void adduserquote(char *daquote)
user_quote_time[i] = user_quote_time[i-1];
}
Bstrcpy(user_quote[0],daquote);
OSD_Printf("%s\n",strip_color_codes(daquote));
OSD_Printf("%s\n",stripcolorcodes(daquote));
user_quote_time[0] = ud.msgdisptime;
pub = NUMPAGES;
@ -2510,7 +2510,7 @@ void FTA(short q,struct player_struct *p)
{
if (p->ftq != q)
if (p == &ps[screenpeek])
OSD_Printf("%s\n",strip_color_codes(fta_quotes[q]));
OSD_Printf("%s\n",stripcolorcodes(fta_quotes[q]));
p->ftq = q;
pub = NUMPAGES;
@ -9095,7 +9095,7 @@ static void freeconmem(void)
{
int i;
for (i=MAXLEVELS*MAXVOLUMES;i>0;i--)
for (i=(MAXLEVELS*MAXVOLUMES)-1;i>=0;i--)
{
if (level_names[i] != NULL)
Bfree(level_names[i]);
@ -9105,7 +9105,7 @@ static void freeconmem(void)
Bfree(music_fn[0][i]);
}
for (i=MAXQUOTES;i>0;i--)
for (i=MAXQUOTES-1;i>=0;i--)
{
if (fta_quotes[i] != NULL)
Bfree(fta_quotes[i]);
@ -9113,7 +9113,7 @@ static void freeconmem(void)
Bfree(redefined_quotes[i]);
}
for (i=iGameVarCount;i>0;i--)
for (i=iGameVarCount-1;i>=0;i--)
{
if (aGameVars[i].szLabel != NULL)
Bfree(aGameVars[i].szLabel);
@ -9303,7 +9303,7 @@ static void Startup(long argc, char **argv)
// myname[10] = '\0';
Bstrcpy(tempbuf,CommandName);
while (Bstrlen(strip_color_codes(tempbuf)) > 10)
while (Bstrlen(stripcolorcodes(tempbuf)) > 10)
tempbuf[Bstrlen(tempbuf)-1] = '\0';
Bstrncpy(myname,tempbuf,sizeof(myname)-1);

View File

@ -94,16 +94,12 @@ extern "C" {
// Number of JOY axes
#define MAXJOYAXES 6
#define MAXJOYAXES 8
// Number of GamePad axes
#define MAXGAMEPADAXES 2
// Number of axes
#define MAXAXES 6
// NORMAL axis scale
#define NORMALAXISSCALE (65536)

View File

@ -307,7 +307,7 @@ static int menutext_(int x,int y,short s,short p,char *t)
int menutext(int x,int y,short s,short p,char *t)
{
return(menutext_(x,y,s,p,strip_color_codes(t)));
return(menutext_(x,y,s,p,stripcolorcodes(t)));
}
static void bar_(int type, int x,int y,short *p,short dainc,char damodify,short s, short pa)
@ -740,7 +740,7 @@ void menus(void)
{
x = strget(200,50-9,buf,30,0);
while (Bstrlen(strip_color_codes(buf)) > 10)
while (Bstrlen(stripcolorcodes(buf)) > 10)
{
buf[Bstrlen(buf)-1] = '\0';
inputloc--;

View File

@ -785,7 +785,7 @@ int osdcmd_name(const osdfuncparm_t *parm)
Bstrcpy(tempbuf,parm->parms[0]);
while (Bstrlen(strip_color_codes(tempbuf)) > 10)
while (Bstrlen(stripcolorcodes(tempbuf)) > 10)
tempbuf[Bstrlen(tempbuf)-1] = '\0';
Bstrncpy(myname,tempbuf,sizeof(myname)-1);

View File

@ -3564,7 +3564,7 @@ void processinput(short snum)
Bsprintf(tempbuf,fta_quotes[PPDEATHSTRINGS+i+(mulscale(krand(), 3, 16)*10)],name1,name2);
if (ScreenWidth >= 800)
adduserquote(tempbuf);
else OSD_Printf("%s\n",strip_color_codes(tempbuf));
else OSD_Printf("%s\n",stripcolorcodes(tempbuf));
}
}
else
@ -3583,7 +3583,7 @@ void processinput(short snum)
if (ScreenWidth >= 800)
adduserquote(tempbuf);
else OSD_Printf("%s\n",strip_color_codes(tempbuf));
else OSD_Printf("%s\n",stripcolorcodes(tempbuf));
}
if (myconnectindex == connecthead)

View File

@ -1425,12 +1425,12 @@ static void resetpspritevars(char g)
}
}
static void clearfrags(void)
static inline void clearfrags(void)
{
short i;
short i = 0;
for (i = 0;i<MAXPLAYERS;i++)
ps[i].frag = ps[i].fraggedself = 0;
while (i<MAXPLAYERS)
ps[i].frag = ps[i].fraggedself = 0, i++;
clearbufbyte(&frags[0][0],(MAXPLAYERS*MAXPLAYERS)<<1,0L);
}
@ -1535,7 +1535,7 @@ extern void adduserquote(char *daquote);
extern int gotvote[MAXPLAYERS], votes[MAXPLAYERS], voting, vote_map, vote_episode;
static void get_level_from_filename(char *fn, int *volume, int *level)
static void getlevelfromfilename(char *fn, char *volume, char *level)
{
for ((*volume)=0;(*volume)<MAXVOLUMES;(*volume)++)
{
@ -1586,9 +1586,9 @@ int enterlevel(char g)
if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0)
{
int volume, level;
char volume, level;
get_level_from_filename(boardfilename,&volume,&level);
getlevelfromfilename(boardfilename,&volume,&level);
if (level != MAXLEVELS)
{