diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 1f8ced013..da2baedbf 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -803,8 +803,8 @@ int32_t md_loadmodel(const char *fn); int32_t md_setmisc(int32_t modelid, float scale, int32_t shadeoff, float zadd, float yoffset, int32_t flags); // int32_t md_tilehasmodel(int32_t tilenume, int32_t pal); -extern char *G_DefaultDefFile(void); -extern char *G_DefFile(void); +extern const char *G_DefaultDefFile(void); +extern const char *G_DefFile(void); extern char *g_defNamePtr; extern char **g_defModules; diff --git a/polymer/eduke32/build/include/osd.h b/polymer/eduke32/build/include/osd.h index a2c668267..005d18ff7 100644 --- a/polymer/eduke32/build/include/osd.h +++ b/polymer/eduke32/build/include/osd.h @@ -108,7 +108,7 @@ int32_t OSD_GetRowsCur(void); void OSD_Init(void); // sets the file to echo output to -void OSD_SetLogFile(char *fn); +void OSD_SetLogFile(const char *fn); // sets the functions the OSD will call to interrogate the environment void OSD_SetFunctions( diff --git a/polymer/eduke32/build/include/polymer.h b/polymer/eduke32/build/include/polymer.h index 5911d0320..3cb354460 100644 --- a/polymer/eduke32/build/include/polymer.h +++ b/polymer/eduke32/build/include/polymer.h @@ -174,10 +174,10 @@ typedef struct s_prrograminfo { typedef struct s_prprogrambit { int32_t bit; - char* vert_def; - char* vert_prog; - char* frag_def; - char* frag_prog; + const char* vert_def; + const char* vert_prog; + const char* frag_def; + const char* frag_prog; } _prprogrambit; #include "prlights.h" diff --git a/polymer/eduke32/build/src/osd.c b/polymer/eduke32/build/src/osd.c index cebfc90f0..d190ffea1 100644 --- a/polymer/eduke32/build/src/osd.c +++ b/polymer/eduke32/build/src/osd.c @@ -774,7 +774,7 @@ void OSD_Init(void) // // OSD_SetLogFile() -- Sets the text file where printed text should be echoed // -void OSD_SetLogFile(char *fn) +void OSD_SetLogFile(const char *fn) { if (osdlog) { diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index a3a2c1061..ee1d0e03e 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -4949,7 +4949,7 @@ static void polymer_compileprogram(int32_t programbits) { int32_t i, enabledbits; GLhandleARB vert, frag, program; - GLcharARB* source[PR_BIT_COUNT * 2]; + const GLcharARB* source[PR_BIT_COUNT * 2]; GLcharARB infobuffer[PR_INFO_LOG_BUFFER_SIZE]; GLint linkstatus; @@ -4971,7 +4971,7 @@ static void polymer_compileprogram(int32_t programbits) i++; } - bglShaderSourceARB(vert, enabledbits, (const GLcharARB**)source, NULL); + bglShaderSourceARB(vert, enabledbits, source, NULL); bglCompileShaderARB(vert); diff --git a/polymer/eduke32/source/_functio.h b/polymer/eduke32/source/_functio.h index 091ad84a0..0758be274 100644 --- a/polymer/eduke32/source/_functio.h +++ b/polymer/eduke32/source/_functio.h @@ -217,7 +217,7 @@ const char oldkeydefaults[NUMGAMEFUNCTIONS*3][MAXGAMEFUNCLEN] = "Dpad_Aiming", "", "", }; -static char * mousedefaults[] = +static const char * mousedefaults[] = { "Fire", "MedKit", @@ -232,7 +232,7 @@ static char * mousedefaults[] = }; -static char * mouseclickeddefaults[] = +static const char * mouseclickeddefaults[] = { "", "", @@ -247,14 +247,14 @@ static char * mouseclickeddefaults[] = }; -static char * mouseanalogdefaults[] = +static const char * mouseanalogdefaults[] = { "analog_turning", "analog_moving", }; -static char * mousedigitaldefaults[] = +static const char * mousedigitaldefaults[] = { "", "", @@ -263,7 +263,7 @@ static char * mousedigitaldefaults[] = }; #if defined(GEKKO) -static char * joystickdefaults[] = +static const char * joystickdefaults[] = { "Open", // A "Fire", // B @@ -304,7 +304,7 @@ static char * joystickdefaults[] = }; -static char * joystickclickeddefaults[] = +static const char * joystickclickeddefaults[] = { "", "", @@ -345,7 +345,7 @@ static char * joystickclickeddefaults[] = }; -static char * joystickanalogdefaults[] = +static const char * joystickanalogdefaults[] = { "analog_strafing", "analog_moving", @@ -366,7 +366,7 @@ static char * joystickanalogdefaults[] = }; -static char * joystickdigitaldefaults[] = +static const char * joystickdigitaldefaults[] = { "", "", @@ -386,7 +386,7 @@ static char * joystickdigitaldefaults[] = "", }; #else -static char * joystickdefaults[] = +static const char * joystickdefaults[] = { "Fire", "Strafe", @@ -427,7 +427,7 @@ static char * joystickdefaults[] = }; -static char * joystickclickeddefaults[] = +static const char * joystickclickeddefaults[] = { "", "Inventory", @@ -468,7 +468,7 @@ static char * joystickclickeddefaults[] = }; -static char * joystickanalogdefaults[] = +static const char * joystickanalogdefaults[] = { "analog_turning", "analog_moving", @@ -481,7 +481,7 @@ static char * joystickanalogdefaults[] = }; -static char * joystickdigitaldefaults[] = +static const char * joystickdigitaldefaults[] = { "", "", diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 74576efa9..031db583e 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -9617,9 +9617,9 @@ enum T_INCLUDEDEFAULT, }; -int32_t parsegroupfiles(scriptfile *script); +static int32_t parsegroupfiles(scriptfile *script); -void parsegroupfiles_include(const char *fn, scriptfile *script, char *cmdtokptr) +static void parsegroupfiles_include(const char *fn, scriptfile *script, const char *cmdtokptr) { scriptfile *included; @@ -9639,7 +9639,7 @@ void parsegroupfiles_include(const char *fn, scriptfile *script, char *cmdtokptr } } -int32_t parsegroupfiles(scriptfile *script) +static int32_t parsegroupfiles(scriptfile *script) { int32_t tokn; char *cmdtokptr; @@ -10074,7 +10074,7 @@ static int32_t loadtilegroups(const char *fn) /// vvv Parse CON files partially to get sound definitions static int32_t parseconsounds(scriptfile *script); -static void parseconsounds_include(const char *fn, scriptfile *script, char *cmdtokptr) +static void parseconsounds_include(const char *fn, scriptfile *script, const char *cmdtokptr) { scriptfile *included; diff --git a/polymer/eduke32/source/common.c b/polymer/eduke32/source/common.c index e82c254d7..bd369044b 100644 --- a/polymer/eduke32/source/common.c +++ b/polymer/eduke32/source/common.c @@ -16,10 +16,10 @@ int32_t g_gameType = GAMEFLAG_DUKE; // grp/con/def handling -char *defaultgamegrp[GAMECOUNT] = { "DUKE3D.GRP", "NAM.GRP", "NAPALM.GRP", "WW2GI.GRP" }; -char *defaultdeffilename[GAMECOUNT] = { "duke3d.def", "nam.def", "napalm.def", "ww2gi.def" }; -char *defaultconfilename = "GAME.CON"; -char *defaultgameconfilename[GAMECOUNT] = { "EDUKE.CON", "NAM.CON", "NAPALM.CON", "WW2GI.CON" }; +const char *defaultgamegrp[GAMECOUNT] = { "DUKE3D.GRP", "NAM.GRP", "NAPALM.GRP", "WW2GI.GRP" }; +const char *defaultdeffilename[GAMECOUNT] = { "duke3d.def", "nam.def", "napalm.def", "ww2gi.def" }; +const char *defaultconfilename = "GAME.CON"; +const char *defaultgameconfilename[GAMECOUNT] = { "EDUKE.CON", "NAM.CON", "NAPALM.CON", "WW2GI.CON" }; // g_grpNamePtr can ONLY point to a malloc'd block (length BMAX_PATH) char *g_grpNamePtr = NULL; @@ -49,7 +49,7 @@ void clearScriptNamePtr(void) // g_scriptNamePtr assumed to be assigned to right after } -char *G_DefaultGrpFile(void) +const char *G_DefaultGrpFile(void) { if (DUKE) return defaultgamegrp[GAME_DUKE]; @@ -63,7 +63,7 @@ char *G_DefaultGrpFile(void) return defaultgamegrp[0]; } -char *G_DefaultDefFile(void) +const char *G_DefaultDefFile(void) { if (DUKE) return defaultdeffilename[GAME_DUKE]; @@ -86,7 +86,7 @@ char *G_DefaultDefFile(void) return defaultdeffilename[0]; } -char *G_DefaultConFile(void) +const char *G_DefaultConFile(void) { if (DUKE && testkopen(defaultgameconfilename[GAME_DUKE],0)) return defaultgameconfilename[GAME_DUKE]; @@ -116,21 +116,21 @@ char *G_DefaultConFile(void) return defaultconfilename; } -char *G_GrpFile(void) +const char *G_GrpFile(void) { if (g_grpNamePtr == NULL) return G_DefaultGrpFile(); else return g_grpNamePtr; } -char *G_DefFile(void) +const char *G_DefFile(void) { if (g_defNamePtr == NULL) return G_DefaultDefFile(); else return g_defNamePtr; } -char *G_ConFile(void) +const char *G_ConFile(void) { if (g_scriptNamePtr == NULL) return G_DefaultConFile(); diff --git a/polymer/eduke32/source/common_game.h b/polymer/eduke32/source/common_game.h index deaac226f..559b8c258 100644 --- a/polymer/eduke32/source/common_game.h +++ b/polymer/eduke32/source/common_game.h @@ -27,19 +27,19 @@ enum Games_t { GAMECOUNT }; -extern char *defaultgamegrp[GAMECOUNT]; -extern char *defaultdeffilename[GAMECOUNT]; -extern char *defaultconfilename; -extern char *defaultgameconfilename[GAMECOUNT]; +extern const char *defaultgamegrp[GAMECOUNT]; +extern const char *defaultdeffilename[GAMECOUNT]; +extern const char *defaultconfilename; +extern const char *defaultgameconfilename[GAMECOUNT]; extern char *g_grpNamePtr; extern char *g_scriptNamePtr; -extern char *G_DefaultGrpFile(void); -extern char *G_GrpFile(void); +extern const char *G_DefaultGrpFile(void); +extern const char *G_GrpFile(void); -extern char *G_DefaultConFile(void); -extern char *G_ConFile(void); +extern const char *G_DefaultConFile(void); +extern const char *G_ConFile(void); extern void clearGrpNamePtr(void); extern void clearDefNamePtr(void); diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 279735a7d..f186c40e9 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -53,7 +53,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. hashtable_t h_gamefuncs = { NUMGAMEFUNCTIONS<<1, NULL }; -int32_t CONFIG_FunctionNameToNum(char *func) +int32_t CONFIG_FunctionNameToNum(const char *func) { int32_t i; @@ -95,7 +95,7 @@ char *CONFIG_FunctionNumToName(int32_t func) */ -int32_t CONFIG_AnalogNameToNum(char *func) +int32_t CONFIG_AnalogNameToNum(const char *func) { if (!Bstrcasecmp(func,"analog_turning")) @@ -119,7 +119,7 @@ int32_t CONFIG_AnalogNameToNum(char *func) } -char *CONFIG_AnalogNumToName(int32_t func) +const char *CONFIG_AnalogNumToName(int32_t func) { switch (func) { diff --git a/polymer/eduke32/source/config.h b/polymer/eduke32/source/config.h index f993e9261..7e6ab524b 100644 --- a/polymer/eduke32/source/config.h +++ b/polymer/eduke32/source/config.h @@ -37,10 +37,10 @@ int32_t CONFIG_SetMapBestTime(char *mapname, int32_t tm); void CONFIG_MapKey(int32_t which, kb_scancode key1, kb_scancode oldkey1, kb_scancode key2, kb_scancode oldkey2); -int32_t CONFIG_FunctionNameToNum(char *func); +int32_t CONFIG_FunctionNameToNum(const char *func); char *CONFIG_FunctionNumToName(int32_t func); -int32_t CONFIG_AnalogNameToNum(char *func); -char *CONFIG_AnalogNumToName(int32_t func); +int32_t CONFIG_AnalogNameToNum(const char *func); +const char *CONFIG_AnalogNumToName(int32_t func); void CONFIG_SetDefaults(void); void CONFIG_ReadKeys(void); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index d2b5a62aa..41a02f721 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7358,7 +7358,7 @@ FOUNDCHEAT: case CHEAT_MONSTERS: { - char *s[] = { "On", "Off" }; + const char *s[] = { "On", "Off" }; if (++g_noEnemies == 3) g_noEnemies = 0; @@ -8046,7 +8046,7 @@ FAKE_F3: static void G_ShowParameterHelp(void) { - char *s = "Usage: eduke32 [files] [options]\n" + const char *s = "Usage: eduke32 [files] [options]\n" "Example: eduke32 -q4 -a -m -tx -map nukeland.map\n\n" "Files can be *.grp/zip/con/def/rts\n" "\n" @@ -8096,7 +8096,7 @@ static void G_ShowParameterHelp(void) static void G_ShowDebugHelp(void) { - char *s = "Usage: eduke32 [files] [options]\n" + const char *s = "Usage: eduke32 [files] [options]\n" "\n" "-a\t\tUse fake player AI (fake multiplayer only)\n" "-cachesize #\tSets cache size, in Kb\n" @@ -8200,7 +8200,7 @@ static int32_t S_DefineMusic(char *ID,char *name) static int32_t parsedefinitions_game(scriptfile *script, int32_t preload); -static void parsedefinitions_game_include(const char *fn, scriptfile *script, char *cmdtokptr, const int32_t preload) +static void parsedefinitions_game_include(const char *fn, scriptfile *script, const char *cmdtokptr, const int32_t preload) { scriptfile *included = scriptfile_fromfile(fn); @@ -10314,7 +10314,7 @@ CLEAN_DIRECTORY: if (quitevent) return 4; { - char *defsfile = G_DefFile(); + const char *defsfile = G_DefFile(); if (!loaddefinitionsfile(defsfile)) { initprintf("Definitions file \"%s\" loaded.\n",defsfile); diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 44c99f271..51e2f13ab 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -81,7 +81,7 @@ extern intptr_t *g_scriptPtr; typedef struct { - char *name; + const char *name; int32_t lId; int32_t flags; int32_t maxParm2; diff --git a/polymer/eduke32/source/jaudiolib/include/music.h b/polymer/eduke32/source/jaudiolib/include/music.h index f47aa08a4..d0f01c706 100644 --- a/polymer/eduke32/source/jaudiolib/include/music.h +++ b/polymer/eduke32/source/jaudiolib/include/music.h @@ -62,7 +62,7 @@ typedef struct #define MUSIC_LoopSong ( 1 == 1 ) #define MUSIC_PlayOnce ( !MUSIC_LoopSong ) -char *MUSIC_ErrorString( int32_t ErrorNumber ); +const char *MUSIC_ErrorString( int32_t ErrorNumber ); int32_t MUSIC_Init( int32_t SoundCard, int32_t Address ); int32_t MUSIC_Shutdown( void ); void MUSIC_SetVolume( int32_t volume ); diff --git a/polymer/eduke32/source/jmact/control.h b/polymer/eduke32/source/jmact/control.h index 487595f43..c08dcb622 100644 --- a/polymer/eduke32/source/jmact/control.h +++ b/polymer/eduke32/source/jmact/control.h @@ -202,7 +202,7 @@ void CONTROL_PrintAxes( void ); #define MAXBOUNDKEYS 256 typedef struct binding { - char *key; + const char *key; char cmd[MAXBINDSTRINGLENGTH]; char repeat; char laststate; diff --git a/polymer/eduke32/source/jmact/keyboard.c b/polymer/eduke32/source/jmact/keyboard.c index 1b6083325..4d5b68b47 100644 --- a/polymer/eduke32/source/jmact/keyboard.c +++ b/polymer/eduke32/source/jmact/keyboard.c @@ -45,7 +45,7 @@ static int32_t numpad = 0; // translation table for taking key names to scancodes and back again static struct { - char *key; + const char *key; kb_scancode sc; } sctokeylut[] = { @@ -233,7 +233,7 @@ void KB_ClearKeysDown(void) //bflushchars(); } -char *KB_ScanCodeToString(kb_scancode scancode) +const char *KB_ScanCodeToString(kb_scancode scancode) { uint32_t s; diff --git a/polymer/eduke32/source/jmact/keyboard.h b/polymer/eduke32/source/jmact/keyboard.h index 80bab1ccb..b5ad6e145 100644 --- a/polymer/eduke32/source/jmact/keyboard.h +++ b/polymer/eduke32/source/jmact/keyboard.h @@ -92,7 +92,7 @@ int32_t KB_KeyWaiting( void ); // Checks if a character is waiting in th char KB_Getch( void ); // Gets the next keypress void KB_FlushKeyboardQueue( void ); // Empties the keyboard queue of all waiting characters. void KB_ClearKeysDown( void ); // Clears all keys down flags. -char * KB_ScanCodeToString( kb_scancode scancode ); // convert scancode into a string +const char * KB_ScanCodeToString( kb_scancode scancode ); // convert scancode into a string kb_scancode KB_StringToScanCode( char * string ); // convert a string into a scancode void KB_TurnKeypadOn( void ); // turn the keypad on void KB_TurnKeypadOff( void ); // turn the keypad off diff --git a/polymer/eduke32/source/jmact/scriplib.c b/polymer/eduke32/source/jmact/scriplib.c index d9a974a61..c13fb8ffa 100644 --- a/polymer/eduke32/source/jmact/scriplib.c +++ b/polymer/eduke32/source/jmact/scriplib.c @@ -814,10 +814,11 @@ void SCRIPT_PutString int32_t scripthandle, char * sectionname, char * entryname, - char * string + const char * string ) { - char *raw,*q,*p; + const char *q; + char *raw,*p; int32_t len = 3; if (!string) string = ""; diff --git a/polymer/eduke32/source/jmact/scriplib.h b/polymer/eduke32/source/jmact/scriplib.h index a5d0033b7..25eec2d2c 100644 --- a/polymer/eduke32/source/jmact/scriplib.h +++ b/polymer/eduke32/source/jmact/scriplib.h @@ -218,7 +218,7 @@ void SCRIPT_PutString int32_t scripthandle, char * sectionname, char * entryname, - char * string + const char * string ); /* diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index e03c26a07..48c73ac09 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -80,7 +80,10 @@ static int32_t soundbits, soundvoices, soundrate; #define NUMDOUBLEMBTNS 3 // # of mouse buttons that can be double-clicked (mouse1 - mouse3) #define NUMSINGLEMBTNS 4 // # of mouse buttons that can only be single-clicked (the rest) #define NUMMOUSEFUNCTIONS (NUMDOUBLEMBTNS*2+NUMSINGLEMBTNS) -static char *mousebuttonnames[] = { "Mouse1", "Mouse2", "Mouse3", "Mouse4", "Wheel Up", "Wheel Down", "Mouse5", "Mouse6", "Mouse7", "Mouse8"}; +static const char *mousebuttonnames[] = +{ "Mouse1", "Mouse2", "Mouse3", "Mouse4", "Wheel Up", + "Wheel Down", "Mouse5", "Mouse6", "Mouse7", "Mouse8" +}; extern int32_t voting; @@ -688,7 +691,7 @@ void M_DisplayMenus(void) CACHE1D_FIND_REC *dir; int32_t c,x,i; int32_t l,m; - char *p = NULL; + const char *p = NULL; Net_GetPackets(); @@ -839,7 +842,7 @@ void M_DisplayMenus(void) c = (320>>1)-120; { int32_t io, ii, yy = 37, d=c+140, enabled; - char *opts[] = + const char *opts[] = { "Name", "-", @@ -1043,23 +1046,24 @@ void M_DisplayMenus(void) case 1: { - char *s[] = { "Auto","","","","","","","","","Blue","Red","Green","Gray","Dark gray","Dark green","Brown", - "Dark blue","","","","","Bright red","","Yellow","","" - }; + const char *s[] = + { "Auto","","","","","","","","","Blue","Red","Green","Gray","Dark gray","Dark green","Brown", + "Dark blue","","","","","Bright red","","Yellow","","" + }; mgametext(d-50,yy,s[ud.color],MENUHIGHLIGHT(io),2+8+16); } break; case 2: { - char *s[] = { "Blue", "Red", "Green", "Gray" }; + const char *s[] = { "Blue", "Red", "Green", "Gray" }; mgametext(d-50,yy,s[ud.team],MENUHIGHLIGHT(io),2+8+16); } break; case 3: { - char *s[] = { "Off", "All weapons", "Bullets only" }; + const char *s[] = { "Off", "All weapons", "Bullets only" }; mgametext(d-50,yy,s[ud.config.AutoAim],MENUHIGHLIGHT(io),2+8+16); } break; @@ -2686,7 +2690,7 @@ cheat_for_port_credits: break; case 7: { - char *s[] = { "Off", "On", "Compress" }; + const char *s[] = { "Off", "On", "Compress" }; enabled = (glusetexcompr && usehightile); if (enabled && x==io) { @@ -2818,7 +2822,7 @@ cheat_for_port_credits: { int32_t io, ii, yy, d=c+160+40, enabled; - char *opts[] = + const char *opts[] = { "Show setup window at start", "Show crosshair", @@ -2991,7 +2995,7 @@ cheat_for_port_credits: { int32_t io, ii, yy, d=c+160+40, enabled; - char *opts[] = + const char *opts[] = { "Parental lock", "-", @@ -3071,7 +3075,7 @@ cheat_for_port_credits: } modval(0,2,(int32_t *)&ud.drawweapon,1,probey==io); { - char *s[] = { "Off", "On", "Icon only" }; + const char *s[] = { "Off", "On", "Icon only" }; mgametextpal(d,yy, s[ud.drawweapon], MENUHIGHLIGHT(io), 0); break; } @@ -3092,7 +3096,7 @@ cheat_for_port_credits: } modval(0,2,(int32_t *)&ud.autovote,1,probey==io); { - char *s[] = { "Off", "Vote No", "Vote Yes" }; + const char *s[] = { "Off", "Vote No", "Vote Yes" }; mgametextpal(d,yy, s[ud.autovote], MENUHIGHLIGHT(io), 0); break; } @@ -3965,7 +3969,7 @@ cheat_for_port_credits: } else if (function == 2) { - static char *directions[] = + static const char *directions[] = { "Up", "Right", "Down", "Left" }; @@ -4217,7 +4221,7 @@ cheat_for_port_credits: } else { - static char *directions[] = + static const char *directions[] = { "Up", "Right", "Down", "Left" }; @@ -4510,7 +4514,7 @@ cheat_for_port_credits: { int32_t io, ii, yy, d=c+160+40, enabled, j; - char *opts[] = + const char *opts[] = { "Sound", "Sound volume", diff --git a/polymer/eduke32/source/namesdyn.c b/polymer/eduke32/source/namesdyn.c index 86e6a9f60..7c5a48510 100644 --- a/polymer/eduke32/source/namesdyn.c +++ b/polymer/eduke32/source/namesdyn.c @@ -38,7 +38,7 @@ int16_t DynamicTileMap[MAXTILES]; struct dynitem { - char *str; + const char *str; int32_t *dynvalptr; const int16_t staticval; }; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index a4f80dc7a..56cbb1f3d 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -854,7 +854,11 @@ keydef_t ConsoleKeys[]= {0,0} }; -char *ConsoleButtons[] = { "mouse1", "mouse2", "mouse3", "mouse4", "mwheelup", "mwheeldn", "mouse5", "mouse6", "mouse7", "mouse8" }; +const char *ConsoleButtons[] = +{ + "mouse1", "mouse2", "mouse3", "mouse4", "mwheelup", + "mwheeldn", "mouse5", "mouse6", "mouse7", "mouse8" +}; static int32_t osdcmd_bind(const osdfuncparm_t *parm) { diff --git a/polymer/eduke32/source/osdcmds.h b/polymer/eduke32/source/osdcmds.h index 53590af6e..c4adfdfc4 100644 --- a/polymer/eduke32/source/osdcmds.h +++ b/polymer/eduke32/source/osdcmds.h @@ -38,12 +38,12 @@ extern float r_ambientlight,r_ambientlightrecip; #pragma pack(push,1) // key bindings stuff typedef struct { - char *name; + const char *name; int32_t id; } keydef_t; extern keydef_t ConsoleKeys[]; -extern char *ConsoleButtons[]; +extern const char *ConsoleButtons[]; #pragma pack(pop) #endif // __osdcmds_h__ diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 558445fa4..e18373441 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -338,7 +338,7 @@ static void G_PrecacheSounds(void) } } -static void G_DoLoadScreen(char *statustext, int32_t percent) +static void G_DoLoadScreen(const char *statustext, int32_t percent) { int32_t i=0,j; diff --git a/polymer/eduke32/source/sdlmusic.c b/polymer/eduke32/source/sdlmusic.c index d883c05c5..441beb9e9 100644 --- a/polymer/eduke32/source/sdlmusic.c +++ b/polymer/eduke32/source/sdlmusic.c @@ -75,7 +75,7 @@ static void setErrorMessage(const char *msg) // The music functions... -char *MUSIC_ErrorString(int32_t ErrorNumber) +const char *MUSIC_ErrorString(int32_t ErrorNumber) { switch (ErrorNumber) {