diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 25ceebd98..0b676eacf 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -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); diff --git a/polymer/eduke32/source/funct.h b/polymer/eduke32/source/funct.h index 482fd9342..e6090ed3e 100644 --- a/polymer/eduke32/source/funct.h +++ b/polymer/eduke32/source/funct.h @@ -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__ diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 6fb1becb1..9c9d43482 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -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); diff --git a/polymer/eduke32/source/jmact/_control.h b/polymer/eduke32/source/jmact/_control.h index a917566dc..b4e92f337 100644 --- a/polymer/eduke32/source/jmact/_control.h +++ b/polymer/eduke32/source/jmact/_control.h @@ -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) diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 7c40c5654..ec5233dfe 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -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--; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 309478e0f..65e91f8e3 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -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); diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 06896d004..6a98b0a21 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -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) diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 44e7b1268..5fb176e62 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -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