mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Enable -Wwrite-strings and fix all instances where string constants were passed to functions accepting a char ptr.
git-svn-id: https://svn.eduke32.com/eduke32@5547 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e27eb7a7e5
commit
db8b4a00b6
20 changed files with 160 additions and 225 deletions
|
@ -526,12 +526,13 @@ CWARNS := -W -Wall \
|
|||
-Wextra \
|
||||
-Wno-char-subscripts \
|
||||
-Wno-missing-braces \
|
||||
-Wno-unknown-warning-option \
|
||||
-Wuninitialized \
|
||||
-Wlogical-op \
|
||||
-Wcast-qual \
|
||||
-Wwrite-strings \
|
||||
#-Wstrict-prototypes \
|
||||
#-Waggregate-return \
|
||||
#-Wwrite-strings \
|
||||
#-Wcast-align \
|
||||
#-Waddress
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ scriptfile *scriptfile_fromstring(const char *string);
|
|||
void scriptfile_close(scriptfile *sf);
|
||||
int32_t scriptfile_eof(scriptfile *sf);
|
||||
|
||||
int32_t scriptfile_getsymbolvalue(char *name, int32_t *val);
|
||||
int32_t scriptfile_addsymbolvalue(char *name, int32_t val);
|
||||
int32_t scriptfile_getsymbolvalue(char const *name, int32_t *val);
|
||||
int32_t scriptfile_addsymbolvalue(char const *name, int32_t val);
|
||||
void scriptfile_clearsymbols(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -324,13 +324,11 @@ int32_t (*baselayer_osdcmd_vidmode_func)(const osdfuncparm_t *parm);
|
|||
|
||||
static int32_t osdfunc_setrendermode(const osdfuncparm_t *parm)
|
||||
{
|
||||
int32_t m;
|
||||
char *p;
|
||||
|
||||
if (parm->numparms != 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
||||
m = Bstrtol(parm->parms[0], &p, 10);
|
||||
char *p;
|
||||
int32_t m = Bstrtol(parm->parms[0], &p, 10);
|
||||
|
||||
if (m != REND_CLASSIC && m != REND_POLYMOST && m != REND_POLYMER)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
@ -361,20 +359,22 @@ static int32_t osdfunc_setrendermode(const osdfuncparm_t *parm)
|
|||
|
||||
setrendermode(m);
|
||||
|
||||
char const *renderer;
|
||||
|
||||
switch (getrendermode())
|
||||
{
|
||||
case REND_CLASSIC:
|
||||
p = "classic software";
|
||||
renderer = "classic software";
|
||||
break;
|
||||
case REND_POLYMOST:
|
||||
p = "polygonal OpenGL";
|
||||
renderer = "polygonal OpenGL";
|
||||
break;
|
||||
case REND_POLYMER:
|
||||
p = "great justice (Polymer)";
|
||||
renderer = "great justice (Polymer)";
|
||||
break;
|
||||
}
|
||||
|
||||
OSD_Printf("Rendering method changed to %s\n", p);
|
||||
OSD_Printf("Rendering method changed to %s\n", renderer);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
|
|
@ -10914,7 +10914,7 @@ void test_map(int32_t mode)
|
|||
|
||||
if ((!mode && cursectnum >= 0) || (mode && startsectnum >= 0))
|
||||
{
|
||||
char *param = " -map " PLAYTEST_MAPNAME " -noinstancechecking";
|
||||
char const *param = " -map " PLAYTEST_MAPNAME " -noinstancechecking";
|
||||
char *fullparam;
|
||||
char current_cwd[BMAX_PATH];
|
||||
int32_t slen = 0;
|
||||
|
|
|
@ -18051,14 +18051,12 @@ static int32_t screencapture_png(const char *filename, char inverseit, const cha
|
|||
text = (png_textp)png_malloc(png_ptr, 2*png_sizeof(png_text));
|
||||
#endif
|
||||
text[0].compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text[0].key = "Title";
|
||||
char *pngtext = Bstrdup((editstatus ? "Mapster32 screenshot" : "EDuke32 screenshot"));
|
||||
text[0].text = pngtext;
|
||||
text[0].key = Bstrdup("Title");
|
||||
text[0].text = Bstrdup((editstatus ? "Mapster32 screenshot" : "EDuke32 screenshot"));
|
||||
|
||||
text[1].compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text[1].key = "Software";
|
||||
char *pngversion = Bstrdup(versionstr);
|
||||
text[1].text = pngversion;
|
||||
text[1].key = Bstrdup("Software");
|
||||
text[1].text = Bstrdup(versionstr);
|
||||
png_set_text(png_ptr, info_ptr, text, 2);
|
||||
|
||||
// get/set the pixel data
|
||||
|
@ -18096,10 +18094,14 @@ static int32_t screencapture_png(const char *filename, char inverseit, const cha
|
|||
|
||||
Bfclose(fp);
|
||||
if (palette) png_free(png_ptr, palette);
|
||||
if (text) png_free(png_ptr, text);
|
||||
|
||||
DO_FREE_AND_NULL(pngtext);
|
||||
DO_FREE_AND_NULL(pngversion);
|
||||
DO_FREE_AND_NULL(text[0].key);
|
||||
DO_FREE_AND_NULL(text[0].text);
|
||||
|
||||
DO_FREE_AND_NULL(text[1].key);
|
||||
DO_FREE_AND_NULL(text[1].text);
|
||||
|
||||
if (text) png_free(png_ptr, text);
|
||||
|
||||
if (buf) png_free(png_ptr, buf);
|
||||
if (rowptrs) png_free(png_ptr, rowptrs);
|
||||
|
|
|
@ -347,7 +347,7 @@ static char *getsymbtabspace(int32_t reqd)
|
|||
return pos;
|
||||
}
|
||||
|
||||
int32_t scriptfile_getsymbolvalue(char *name, int32_t *val)
|
||||
int32_t scriptfile_getsymbolvalue(char const *name, int32_t *val)
|
||||
{
|
||||
char *scanner = symbtab;
|
||||
|
||||
|
@ -366,7 +366,7 @@ int32_t scriptfile_getsymbolvalue(char *name, int32_t *val)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int32_t scriptfile_addsymbolvalue(char *name, int32_t val)
|
||||
int32_t scriptfile_addsymbolvalue(char const *name, int32_t val)
|
||||
{
|
||||
char *sp;
|
||||
// if (scriptfile_getsymbolvalue(name, &x)) return -1; // already exists
|
||||
|
|
|
@ -234,12 +234,13 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
|
||||
ZeroMemory(&tab, sizeof(tab));
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Setup");
|
||||
tab.pszText = Bstrdup(TEXT("Setup"));
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)0, (LPARAM)&tab);
|
||||
Bfree(tab.pszText);
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Message Log");
|
||||
tab.pszText = Bstrdup(TEXT("Message Log"));
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)1, (LPARAM)&tab);
|
||||
|
||||
Bfree(tab.pszText);
|
||||
// Work out the position and size of the area inside the tab control for the pages
|
||||
ZeroMemory(&r, sizeof(r));
|
||||
GetClientRect(hwnd, &r);
|
||||
|
|
|
@ -104,7 +104,7 @@ static int32_t lastsave = -180*60;
|
|||
static int32_t NoAutoLoad = 0;
|
||||
static int32_t spnoclip=1;
|
||||
|
||||
static char *default_tiles_cfg = "tiles.cfg";
|
||||
static char const *default_tiles_cfg = "tiles.cfg";
|
||||
static int32_t pathsearchmode_oninit;
|
||||
|
||||
#ifdef LUNATIC
|
||||
|
@ -3626,7 +3626,7 @@ restart:
|
|||
#define WIND1X 3
|
||||
#define WIND1Y 150
|
||||
|
||||
static char *tileinfo_colorstr = "";
|
||||
static char const *tileinfo_colorstr = "";
|
||||
|
||||
static void tileinfo_doprint(int32_t x, int32_t y, char *buf, const char *label, int32_t value, int32_t pos)
|
||||
{
|
||||
|
|
|
@ -9598,7 +9598,7 @@ static int32_t parsedefinitions_game(scriptfile *script, int32_t preload)
|
|||
case T_MUSIC:
|
||||
{
|
||||
char *tinttokptr = script->ltextptr;
|
||||
char *ID=NULL, *fn="";
|
||||
char *ID = NULL, *fn = NULL;
|
||||
char *musicend;
|
||||
|
||||
if (scriptfile_getbraces(script,&musicend)) break;
|
||||
|
@ -9625,7 +9625,7 @@ static int32_t parsedefinitions_game(scriptfile *script, int32_t preload)
|
|||
break;
|
||||
}
|
||||
|
||||
if (check_file_exist(fn))
|
||||
if (fn == NULL || check_file_exist(fn))
|
||||
break;
|
||||
|
||||
res = S_DefineMusic(ID, fn);
|
||||
|
@ -9802,7 +9802,7 @@ static int32_t parsedefinitions_game(scriptfile *script, int32_t preload)
|
|||
case T_SOUND:
|
||||
{
|
||||
char *tinttokptr = script->ltextptr;
|
||||
char *fn="";
|
||||
char *fn = NULL;
|
||||
int32_t num=-1;
|
||||
char *musicend;
|
||||
|
||||
|
@ -9827,7 +9827,7 @@ static int32_t parsedefinitions_game(scriptfile *script, int32_t preload)
|
|||
break;
|
||||
}
|
||||
|
||||
if (check_file_exist(fn))
|
||||
if (fn == NULL || check_file_exist(fn))
|
||||
break;
|
||||
|
||||
if (S_DefineSound(num,fn) == -1)
|
||||
|
@ -11222,7 +11222,7 @@ static void G_Startup(void)
|
|||
if (wm_ynbox("Upgrade to the full version of Duke Nukem 3D","%s",tempbuf))
|
||||
{
|
||||
SHELLEXECUTEINFOA sinfo;
|
||||
char *p = "http://store.steampowered.com/app/225140";
|
||||
char const *p = "http://store.steampowered.com/app/225140";
|
||||
|
||||
Bmemset(&sinfo, 0, sizeof(sinfo));
|
||||
sinfo.cbSize = sizeof(sinfo);
|
||||
|
@ -11573,7 +11573,7 @@ int32_t app_main(int32_t argc, const char **argv)
|
|||
"Browse to http://www.eduke32.com now?"))
|
||||
{
|
||||
SHELLEXECUTEINFOA sinfo;
|
||||
char *p = "http://www.eduke32.com";
|
||||
char const *p = "http://www.eduke32.com";
|
||||
|
||||
Bmemset(&sinfo, 0, sizeof(sinfo));
|
||||
sinfo.cbSize = sizeof(sinfo);
|
||||
|
|
|
@ -6129,7 +6129,7 @@ void C_InitProjectiles(void)
|
|||
extern int32_t g_numObituaries;
|
||||
extern int32_t g_numSelfObituaries;
|
||||
|
||||
static char * C_ScriptVersionString(int32_t version)
|
||||
static char const * C_ScriptVersionString(int32_t version)
|
||||
{
|
||||
switch (version)
|
||||
{
|
||||
|
|
|
@ -36,34 +36,34 @@ static void process_vacapp15(int32_t crcval);
|
|||
|
||||
// custom GRP support for the startup window, file format reflects the structure below
|
||||
#define GAMELISTFILE "games.list"
|
||||
// name crc size flags dependency scriptname defname postprocessing
|
||||
static grpinfo_t const internalgrpfiles[] =
|
||||
// name crc size flags dependency scriptname postprocessing
|
||||
static internalgrpinfo_t const internalgrpfiles[] =
|
||||
{
|
||||
{ "Duke Nukem 3D", DUKE13_CRC, 26524524, GAMEFLAG_DUKE, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Nukem 3D (South Korean Censored)", DUKEKR_CRC, 26385383, GAMEFLAG_DUKE, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Nukem 3D: Atomic Edition", DUKE15_CRC, 44356548, GAMEFLAG_DUKE, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Nukem 3D: Plutonium Pak", DUKEPP_CRC, 44348015, GAMEFLAG_DUKE, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Nukem 3D Shareware 0.99", DUKE099_CRC, 9690241, GAMEFLAG_DUKE|GAMEFLAG_DUKEBETA, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Nukem 3D Shareware 1.0", DUKE10_CRC, 10429258, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Nukem 3D Shareware 1.1", DUKE11_CRC, 10442980, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Nukem 3D Shareware 1.3D", DUKESW_CRC, 11035779, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Nukem 3D Mac Demo", DUKEMD_CRC, 10444391, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke it out in D.C. (1.3D)", DUKEDC13_CRC, 7926624, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE13_CRC, NULL, NULL, NULL, NULL },
|
||||
{ "Duke it out in D.C.", DUKEDCPP_CRC, 8225517, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL, NULL, NULL },
|
||||
{ "Duke it out in D.C.", DUKEDC_CRC, 8410183, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL, NULL, NULL },
|
||||
{ "Duke it out in D.C.", (int32_t)0x39A692BF, 8410187, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "DUKEDC.CON", NULL, NULL, NULL },
|
||||
{ "Duke Caribbean: Life's a Beach (1.3D)", VACA13_CRC, 23559381, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE13_CRC, NULL, NULL, process_vaca13, NULL },
|
||||
{ "Duke Caribbean: Life's a Beach (PPak)", VACAPP_CRC, 22551333, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKEPP_CRC, NULL, NULL, process_vacapp15, NULL },
|
||||
{ "Duke Caribbean: Life's a Beach", VACA15_CRC, 22521880, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL, process_vacapp15, NULL },
|
||||
{ "Duke Caribbean: Life's a Beach", DUKECB_CRC, 22213819, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Caribbean: Life's a Beach", (int32_t)0x65B5F690, 22397273, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "VACATION.CON", NULL, NULL, NULL },
|
||||
{ "Duke: Nuclear Winter", DUKENW_CRC, 16169365, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "NWINTER.CON", NULL, NULL, NULL },
|
||||
{ "Duke!ZONE II (1.3D)", DZ2_13_CRC, 26135388, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE13_CRC, "DZ-GAME.CON", NULL, NULL, NULL },
|
||||
{ "Duke!ZONE II", DZ2_PP_CRC, 44100411, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "DZ-GAME.CON", NULL, NULL, NULL },
|
||||
{ "Duke!ZONE II", (int32_t)0x1E9516F1, 3186656, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "DZ-GAME.CON", NULL, NULL, NULL },
|
||||
{ "NAM", NAM_CRC, 43448927, GAMEFLAG_NAM, 0, NULL, NULL, NULL, NULL },
|
||||
{ "NAPALM", NAPALM_CRC, 44365728, GAMEFLAG_NAM|GAMEFLAG_NAPALM, 0, NULL, NULL, NULL, NULL },
|
||||
{ "WWII GI", WW2GI_CRC, 77939508, GAMEFLAG_WW2GI, 0, NULL, NULL, NULL, NULL },
|
||||
{ "Duke Nukem 3D", DUKE13_CRC, 26524524, GAMEFLAG_DUKE, 0, NULL, NULL},
|
||||
{ "Duke Nukem 3D (South Korean Censored)", DUKEKR_CRC, 26385383, GAMEFLAG_DUKE, 0, NULL, NULL},
|
||||
{ "Duke Nukem 3D: Atomic Edition", DUKE15_CRC, 44356548, GAMEFLAG_DUKE, 0, NULL, NULL},
|
||||
{ "Duke Nukem 3D: Plutonium Pak", DUKEPP_CRC, 44348015, GAMEFLAG_DUKE, 0, NULL, NULL},
|
||||
{ "Duke Nukem 3D Shareware 0.99", DUKE099_CRC, 9690241, GAMEFLAG_DUKE|GAMEFLAG_DUKEBETA, 0, NULL, NULL},
|
||||
{ "Duke Nukem 3D Shareware 1.0", DUKE10_CRC, 10429258, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL},
|
||||
{ "Duke Nukem 3D Shareware 1.1", DUKE11_CRC, 10442980, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL},
|
||||
{ "Duke Nukem 3D Shareware 1.3D", DUKESW_CRC, 11035779, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL},
|
||||
{ "Duke Nukem 3D Mac Demo", DUKEMD_CRC, 10444391, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE, 0, NULL, NULL},
|
||||
{ "Duke it out in D.C. (1.3D)", DUKEDC13_CRC, 7926624, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE13_CRC, NULL, NULL},
|
||||
{ "Duke it out in D.C.", DUKEDCPP_CRC, 8225517, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL},
|
||||
{ "Duke it out in D.C.", DUKEDC_CRC, 8410183, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL},
|
||||
{ "Duke it out in D.C.", (int32_t) 0x39A692BF, 8410187, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "DUKEDC.CON", NULL},
|
||||
{ "Duke Caribbean: Life's a Beach (1.3D)", VACA13_CRC, 23559381, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE13_CRC, NULL, process_vaca13},
|
||||
{ "Duke Caribbean: Life's a Beach (PPak)", VACAPP_CRC, 22551333, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKEPP_CRC, NULL, process_vacapp15},
|
||||
{ "Duke Caribbean: Life's a Beach", VACA15_CRC, 22521880, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, process_vacapp15},
|
||||
{ "Duke Caribbean: Life's a Beach", DUKECB_CRC, 22213819, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, NULL, NULL},
|
||||
{ "Duke Caribbean: Life's a Beach", (int32_t) 0x65B5F690, 22397273, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "VACATION.CON", NULL},
|
||||
{ "Duke: Nuclear Winter", DUKENW_CRC, 16169365, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "NWINTER.CON", NULL},
|
||||
{ "Duke!ZONE II (1.3D)", DZ2_13_CRC, 26135388, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE13_CRC, "DZ-GAME.CON", NULL},
|
||||
{ "Duke!ZONE II", DZ2_PP_CRC, 44100411, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "DZ-GAME.CON", NULL},
|
||||
{ "Duke!ZONE II", (int32_t) 0x1E9516F1, 3186656, GAMEFLAG_DUKE|GAMEFLAG_ADDON, DUKE15_CRC, "DZ-GAME.CON", NULL},
|
||||
{ "NAM", NAM_CRC, 43448927, GAMEFLAG_NAM, 0, NULL, NULL},
|
||||
{ "NAPALM", NAPALM_CRC, 44365728, GAMEFLAG_NAM|GAMEFLAG_NAPALM, 0, NULL, NULL},
|
||||
{ "WWII GI", WW2GI_CRC, 77939508, GAMEFLAG_WW2GI, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
struct grpfile_t *foundgrps = NULL;
|
||||
|
@ -210,9 +210,6 @@ static void LoadGameList(void)
|
|||
if (internalgrpfiles[i].scriptname)
|
||||
fg->scriptname = dup_filename(internalgrpfiles[i].scriptname);
|
||||
|
||||
if (internalgrpfiles[i].defname)
|
||||
fg->defname = dup_filename(internalgrpfiles[i].defname);
|
||||
|
||||
fg->postprocessing = internalgrpfiles[i].postprocessing;
|
||||
|
||||
fg->next = listgrps;
|
||||
|
|
|
@ -61,6 +61,16 @@ enum addon_t {
|
|||
NUMADDONS
|
||||
};
|
||||
|
||||
typedef struct internalgrpinfo_t {
|
||||
char const *name;
|
||||
int32_t const crcval;
|
||||
int32_t const size;
|
||||
int32_t const game;
|
||||
int32_t const dependency;
|
||||
char const *scriptname;
|
||||
void(*postprocessing)(int32_t);
|
||||
} internalgrpinfo_t;
|
||||
|
||||
typedef struct grpinfo_t {
|
||||
char *name;
|
||||
int32_t crcval;
|
||||
|
|
|
@ -230,7 +230,7 @@ int32_t SCRIPT_ParseBuffer(int32_t scripthandle, char *data, int32_t length)
|
|||
{
|
||||
char *fence = data + length;
|
||||
char *dp, *sp, ch=0, lastch=0;
|
||||
char *currentsection = "";
|
||||
char const *currentsection = "";
|
||||
char *currententry = NULL;
|
||||
char *currentvalue = NULL;
|
||||
enum
|
||||
|
@ -423,7 +423,7 @@ int32_t SCRIPT_ParseBuffer(int32_t scripthandle, char *data, int32_t length)
|
|||
|
||||
//---
|
||||
|
||||
int32_t SCRIPT_Init(char * name)
|
||||
int32_t SCRIPT_Init(char const * name)
|
||||
{
|
||||
int32_t h = SCRIPT_New();
|
||||
|
||||
|
@ -437,7 +437,7 @@ void SCRIPT_Free(int32_t scripthandle)
|
|||
SCRIPT_Delete(scripthandle);
|
||||
}
|
||||
|
||||
int32_t SCRIPT_Load(char * filename)
|
||||
int32_t SCRIPT_Load(char const * filename)
|
||||
{
|
||||
int32_t s,h,l;
|
||||
char *b;
|
||||
|
@ -463,9 +463,9 @@ int32_t SCRIPT_Load(char * filename)
|
|||
return s;
|
||||
}
|
||||
|
||||
void SCRIPT_Save(int32_t scripthandle, char * filename)
|
||||
void SCRIPT_Save(int32_t scripthandle, char const * filename)
|
||||
{
|
||||
char *section, *entry, *value;
|
||||
char const *section, *entry, *value;
|
||||
int32_t sec, ent, numsect, nument;
|
||||
FILE *fp;
|
||||
|
||||
|
@ -510,7 +510,7 @@ int32_t SCRIPT_NumberSections(int32_t scripthandle)
|
|||
return c;
|
||||
}
|
||||
|
||||
char * SCRIPT_Section(int32_t scripthandle, int32_t which)
|
||||
char const * SCRIPT_Section(int32_t scripthandle, int32_t which)
|
||||
{
|
||||
ScriptSectionType *s,*ls=NULL;
|
||||
|
||||
|
@ -522,7 +522,7 @@ char * SCRIPT_Section(int32_t scripthandle, int32_t which)
|
|||
return s->name;
|
||||
}
|
||||
|
||||
int32_t SCRIPT_NumberEntries(int32_t scripthandle, char * sectionname)
|
||||
int32_t SCRIPT_NumberEntries(int32_t scripthandle, char const * sectionname)
|
||||
{
|
||||
ScriptSectionType *s;
|
||||
ScriptEntryType *e,*le=NULL;
|
||||
|
@ -538,7 +538,7 @@ int32_t SCRIPT_NumberEntries(int32_t scripthandle, char * sectionname)
|
|||
return c;
|
||||
}
|
||||
|
||||
char * SCRIPT_Entry(int32_t scripthandle, char * sectionname, int32_t which)
|
||||
char const * SCRIPT_Entry(int32_t scripthandle, char const * sectionname, int32_t which)
|
||||
{
|
||||
ScriptSectionType *s;
|
||||
ScriptEntryType *e,*le=NULL;
|
||||
|
@ -553,7 +553,7 @@ char * SCRIPT_Entry(int32_t scripthandle, char * sectionname, int32_t which)
|
|||
return e->name;
|
||||
}
|
||||
|
||||
char * SCRIPT_GetRaw(int32_t scripthandle, char * sectionname, char * entryname)
|
||||
char const * SCRIPT_GetRaw(int32_t scripthandle, char const * sectionname, char const * entryname)
|
||||
{
|
||||
ScriptSectionType *s;
|
||||
ScriptEntryType *e;
|
||||
|
@ -647,7 +647,7 @@ static char * SCRIPT_ParseString(char ** dest, char * p)
|
|||
return p;
|
||||
}
|
||||
|
||||
int32_t SCRIPT_GetStringPtr(int32_t scripthandle, char * sectionname, char * entryname, char ** dest)
|
||||
int32_t SCRIPT_GetStringPtr(int32_t scripthandle, char const * sectionname, char const * entryname, char ** dest)
|
||||
{
|
||||
ScriptSectionType *s;
|
||||
ScriptEntryType *e;
|
||||
|
@ -669,7 +669,7 @@ int32_t SCRIPT_GetStringPtr(int32_t scripthandle, char * sectionname, char * ent
|
|||
return 0;
|
||||
}
|
||||
|
||||
int32_t SCRIPT_GetString(int32_t scripthandle, char * sectionname, char * entryname, char * dest)
|
||||
int32_t SCRIPT_GetString(int32_t scripthandle, char const * sectionname, char const * entryname, char * dest)
|
||||
{
|
||||
return SCRIPT_GetStringPtr(scripthandle, sectionname, entryname, &dest);
|
||||
}
|
||||
|
@ -737,7 +737,7 @@ int32_t SCRIPT_GetNumber(int32_t scripthandle, const char * sectionname, const c
|
|||
return 0;
|
||||
}
|
||||
|
||||
int32_t SCRIPT_GetBoolean(int32_t scripthandle, char * sectionname, char * entryname, int32_t * boole)
|
||||
int32_t SCRIPT_GetBoolean(int32_t scripthandle, char const * sectionname, char const * entryname, int32_t * boole)
|
||||
{
|
||||
ScriptSectionType *s;
|
||||
ScriptEntryType *e;
|
||||
|
@ -760,29 +760,16 @@ int32_t SCRIPT_GetBoolean(int32_t scripthandle, char * sectionname, char * entry
|
|||
return 0;
|
||||
}
|
||||
|
||||
void SCRIPT_PutSection(int32_t scripthandle, char * sectionname)
|
||||
void SCRIPT_PutSection(int32_t scripthandle, char const * sectionname)
|
||||
{
|
||||
SCRIPT_AddSection(scripthandle, sectionname);
|
||||
}
|
||||
|
||||
void SCRIPT_PutRaw
|
||||
(
|
||||
int32_t scripthandle,
|
||||
char * sectionname,
|
||||
char * entryname,
|
||||
char * raw
|
||||
)
|
||||
void SCRIPT_PutRaw(int32_t scripthandle, char const *sectionname, char const *entryname, char const *raw)
|
||||
{
|
||||
SCRIPT_AddEntry(scripthandle, sectionname, entryname, raw);
|
||||
}
|
||||
|
||||
void SCRIPT_PutString
|
||||
(
|
||||
int32_t scripthandle,
|
||||
char * sectionname,
|
||||
char * entryname,
|
||||
const char * string
|
||||
)
|
||||
void SCRIPT_PutString(int32_t scripthandle, char const *sectionname, char const *entryname, const char *string)
|
||||
{
|
||||
const char *q;
|
||||
char *raw,*p;
|
||||
|
|
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
=
|
||||
==============
|
||||
*/
|
||||
int32_t SCRIPT_Init( char * name );
|
||||
int32_t SCRIPT_Init( char const * name );
|
||||
|
||||
|
||||
/*
|
||||
|
@ -59,7 +59,7 @@ void SCRIPT_Free( int32_t scripthandle );
|
|||
==============
|
||||
*/
|
||||
|
||||
int32_t SCRIPT_Load ( char * filename );
|
||||
int32_t SCRIPT_Load ( char const * filename );
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -68,7 +68,7 @@ int32_t SCRIPT_Load ( char * filename );
|
|||
=
|
||||
==============
|
||||
*/
|
||||
void SCRIPT_Save (int32_t scripthandle, char * filename);
|
||||
void SCRIPT_Save (int32_t scripthandle, char const * filename);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -89,7 +89,7 @@ int32_t SCRIPT_NumberSections( int32_t scripthandle );
|
|||
==============
|
||||
*/
|
||||
|
||||
char * SCRIPT_Section( int32_t scripthandle, int32_t which );
|
||||
char const * SCRIPT_Section( int32_t scripthandle, int32_t which );
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -99,7 +99,7 @@ char * SCRIPT_Section( int32_t scripthandle, int32_t which );
|
|||
==============
|
||||
*/
|
||||
|
||||
int32_t SCRIPT_NumberEntries( int32_t scripthandle, char * sectionname );
|
||||
int32_t SCRIPT_NumberEntries( int32_t scripthandle, char const * sectionname );
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -109,7 +109,7 @@ int32_t SCRIPT_NumberEntries( int32_t scripthandle, char * sectionname );
|
|||
==============
|
||||
*/
|
||||
|
||||
char * SCRIPT_Entry( int32_t scripthandle, char * sectionname, int32_t which );
|
||||
char const * SCRIPT_Entry( int32_t scripthandle, char const * sectionname, int32_t which );
|
||||
|
||||
|
||||
/*
|
||||
|
@ -119,7 +119,7 @@ char * SCRIPT_Entry( int32_t scripthandle, char * sectionname, int32_t which );
|
|||
=
|
||||
==============
|
||||
*/
|
||||
char * SCRIPT_GetRaw(int32_t scripthandle, char * sectionname, char * entryname);
|
||||
char const * SCRIPT_GetRaw(int32_t scripthandle, char const * sectionname, char const * entryname);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -128,20 +128,8 @@ char * SCRIPT_GetRaw(int32_t scripthandle, char * sectionname, char * entryname)
|
|||
=
|
||||
==============
|
||||
*/
|
||||
int32_t SCRIPT_GetStringPtr
|
||||
(
|
||||
int32_t scripthandle,
|
||||
char * sectionname,
|
||||
char * entryname,
|
||||
char ** dest
|
||||
);
|
||||
int32_t SCRIPT_GetString
|
||||
(
|
||||
int32_t scripthandle,
|
||||
char * sectionname,
|
||||
char * entryname,
|
||||
char * dest
|
||||
);
|
||||
int32_t SCRIPT_GetStringPtr(int32_t scripthandle, char const *sectionname, char const *entryname, char **dest);
|
||||
int32_t SCRIPT_GetString(int32_t scripthandle, char const *sectionname, char const *entryname, char *dest);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -150,14 +138,8 @@ int32_t SCRIPT_GetString
|
|||
=
|
||||
==============
|
||||
*/
|
||||
int32_t SCRIPT_GetDoubleString
|
||||
(
|
||||
int32_t scripthandle,
|
||||
const char * sectionname,
|
||||
const char * entryname,
|
||||
char * dest1,
|
||||
char * dest2
|
||||
);
|
||||
int32_t SCRIPT_GetDoubleString(int32_t scripthandle, const char *sectionname, const char *entryname, char *dest1,
|
||||
char *dest2);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -166,13 +148,7 @@ int32_t SCRIPT_GetDoubleString
|
|||
=
|
||||
==============
|
||||
*/
|
||||
int32_t SCRIPT_GetNumber
|
||||
(
|
||||
int32_t scripthandle,
|
||||
const char * sectionname,
|
||||
const char * entryname,
|
||||
int32_t * number
|
||||
);
|
||||
int32_t SCRIPT_GetNumber(int32_t scripthandle, const char *sectionname, const char *entryname, int32_t *number);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -181,13 +157,7 @@ int32_t SCRIPT_GetNumber
|
|||
=
|
||||
==============
|
||||
*/
|
||||
int32_t SCRIPT_GetBoolean
|
||||
(
|
||||
int32_t scripthandle,
|
||||
char * sectionname,
|
||||
char * entryname,
|
||||
int32_t * boole
|
||||
);
|
||||
int32_t SCRIPT_GetBoolean(int32_t scripthandle, char const *sectionname, char const *entryname, int32_t *boole);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -196,7 +166,7 @@ int32_t SCRIPT_GetBoolean
|
|||
=
|
||||
==============
|
||||
*/
|
||||
void SCRIPT_PutSection( int32_t scripthandle, char * sectionname );
|
||||
void SCRIPT_PutSection( int32_t scripthandle, char const * sectionname );
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -205,13 +175,7 @@ void SCRIPT_PutSection( int32_t scripthandle, char * sectionname );
|
|||
=
|
||||
==============
|
||||
*/
|
||||
void SCRIPT_PutRaw
|
||||
(
|
||||
int32_t scripthandle,
|
||||
char * sectionname,
|
||||
char * entryname,
|
||||
char * raw
|
||||
);
|
||||
void SCRIPT_PutRaw(int32_t scripthandle, char const * sectionname, char const * entryname, char const * raw);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -220,13 +184,7 @@ void SCRIPT_PutRaw
|
|||
=
|
||||
==============
|
||||
*/
|
||||
void SCRIPT_PutString
|
||||
(
|
||||
int32_t scripthandle,
|
||||
char * sectionname,
|
||||
char * entryname,
|
||||
const char * string
|
||||
);
|
||||
void SCRIPT_PutString(int32_t scripthandle, char const *sectionname, char const *entryname, const char *string);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -235,14 +193,8 @@ void SCRIPT_PutString
|
|||
=
|
||||
==============
|
||||
*/
|
||||
void SCRIPT_PutDoubleString
|
||||
(
|
||||
int32_t scripthandle,
|
||||
const char * sectionname,
|
||||
const char * entryname,
|
||||
const char * string1,
|
||||
const char * string2
|
||||
);
|
||||
void SCRIPT_PutDoubleString(int32_t scripthandle, const char *sectionname, const char *entryname, const char *string1,
|
||||
const char *string2);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -251,15 +203,8 @@ void SCRIPT_PutDoubleString
|
|||
=
|
||||
==============
|
||||
*/
|
||||
void SCRIPT_PutNumber
|
||||
(
|
||||
int32_t scripthandle,
|
||||
const char * sectionname,
|
||||
const char * entryname,
|
||||
int32_t number,
|
||||
int32_t hexadecimal,
|
||||
int32_t defaultvalue
|
||||
);
|
||||
void SCRIPT_PutNumber(int32_t scripthandle, const char *sectionname, const char *entryname, int32_t number,
|
||||
int32_t hexadecimal, int32_t defaultvalue);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -268,13 +213,7 @@ void SCRIPT_PutNumber
|
|||
=
|
||||
==============
|
||||
*/
|
||||
void SCRIPT_PutBoolean
|
||||
(
|
||||
int32_t scripthandle,
|
||||
char * sectionname,
|
||||
char * entryname,
|
||||
int32_t boole
|
||||
);
|
||||
void SCRIPT_PutBoolean(int32_t scripthandle, char *sectionname, char *entryname, int32_t boole);
|
||||
|
||||
/*
|
||||
==============
|
||||
|
@ -284,14 +223,7 @@ void SCRIPT_PutBoolean
|
|||
==============
|
||||
*/
|
||||
|
||||
void SCRIPT_PutDouble
|
||||
(
|
||||
int32_t scripthandle,
|
||||
char * sectionname,
|
||||
char * entryname,
|
||||
double number,
|
||||
int32_t defaultvalue
|
||||
);
|
||||
void SCRIPT_PutDouble(int32_t scripthandle, char *sectionname, char *entryname, double number, int32_t defaultvalue);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -227,19 +227,19 @@ static MenuEntryFormat_t MEF_NetSetup = { 4<<16, 0, 112<<16, 20<<
|
|||
#define MAKE_MENUOPTIONSETDYN(optionNames, optionValues, numOptions, features) { optionNames, optionValues, &MMF_FuncList, &MEF_FuncList, &MF_Minifont, numOptions, -1, 0, features }
|
||||
#define MAKE_MENUOPTIONSETNULL { NULL, NULL, &MMF_FuncList, &MEF_FuncList, &MF_Minifont, 0, -1, 0, 0 }
|
||||
|
||||
static char *MEOSN_OffOn[] = { "Off", "On", };
|
||||
static char const *MEOSN_OffOn[] = { "Off", "On", };
|
||||
static MenuOptionSet_t MEOS_OffOn = MAKE_MENUOPTIONSET( MEOSN_OffOn, NULL, 0x3 );
|
||||
static char *MEOSN_OnOff[] = { "On", "Off", };
|
||||
static char const *MEOSN_OnOff[] = { "On", "Off", };
|
||||
static MenuOptionSet_t MEOS_OnOff = MAKE_MENUOPTIONSET( MEOSN_OnOff, NULL, 0x3 );
|
||||
static char *MEOSN_NoYes[] = { "No", "Yes", };
|
||||
static char const *MEOSN_NoYes[] = { "No", "Yes", };
|
||||
static MenuOptionSet_t MEOS_NoYes = MAKE_MENUOPTIONSET( MEOSN_NoYes, NULL, 0x3 );
|
||||
static char *MEOSN_YesNo[] = { "Yes", "No", };
|
||||
static char const *MEOSN_YesNo[] = { "Yes", "No", };
|
||||
static MenuOptionSet_t MEOS_YesNo = MAKE_MENUOPTIONSET( MEOSN_YesNo, NULL, 0x3 );
|
||||
|
||||
|
||||
static char MenuGameFuncs[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
|
||||
static char *MenuGameFuncNone = " -None-";
|
||||
static char *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
|
||||
static char const *MenuGameFuncNone = " -None-";
|
||||
static char const *MEOSN_Gamefuncs[NUMGAMEFUNCTIONS+1];
|
||||
static MenuOptionSet_t MEOS_Gamefuncs = MAKE_MENUOPTIONSET( MEOSN_Gamefuncs, NULL, 0x1 );
|
||||
|
||||
|
||||
|
@ -342,7 +342,7 @@ static MenuOption_t MEO_GAMESETUP_STARTWIN = MAKE_MENUOPTION( &MF_Redfont, &MEOS
|
|||
static MenuEntry_t ME_GAMESETUP_STARTWIN = MAKE_MENUENTRY( "Startup window:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_STARTWIN, Option );
|
||||
#endif
|
||||
|
||||
static char *MEOSN_GAMESETUP_AIM_AUTO[] = { "None", "Regular", "Bullets only",
|
||||
static char const *MEOSN_GAMESETUP_AIM_AUTO[] = { "None", "Regular", "Bullets only",
|
||||
#ifdef DROIDMENU
|
||||
"Extra wide"
|
||||
#endif
|
||||
|
@ -357,12 +357,12 @@ static MenuOptionSet_t MEOS_GAMESETUP_AIM_AUTO = MAKE_MENUOPTIONSET( MEOSN_GAMES
|
|||
static MenuOption_t MEO_GAMESETUP_AIM_AUTO = MAKE_MENUOPTION( &MF_Redfont, &MEOS_GAMESETUP_AIM_AUTO, &ud.config.AutoAim );
|
||||
static MenuEntry_t ME_GAMESETUP_AIM_AUTO = MAKE_MENUENTRY( "Auto aim:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_AIM_AUTO, Option );
|
||||
|
||||
static char *MEOSN_GAMESETUP_WEAPSWITCH_PICKUP[] = { "Never", "If new", "By rating", };
|
||||
static char const *MEOSN_GAMESETUP_WEAPSWITCH_PICKUP[] = { "Never", "If new", "By rating", };
|
||||
static MenuOptionSet_t MEOS_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTIONSET( MEOSN_GAMESETUP_WEAPSWITCH_PICKUP, NULL, 0x2 );
|
||||
static MenuOption_t MEO_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUOPTION( &MF_Redfont, &MEOS_GAMESETUP_WEAPSWITCH_PICKUP, NULL );
|
||||
static MenuEntry_t ME_GAMESETUP_WEAPSWITCH_PICKUP = MAKE_MENUENTRY( "Equip pickups:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_WEAPSWITCH_PICKUP, Option );
|
||||
|
||||
static char *MEOSN_DemoRec[] = { "Off", "Running", };
|
||||
static char const *MEOSN_DemoRec[] = { "Off", "Running", };
|
||||
static MenuOptionSet_t MEOS_DemoRec = MAKE_MENUOPTIONSET( MEOSN_DemoRec, NULL, 0x3 );
|
||||
static MenuOption_t MEO_GAMESETUP_DEMOREC = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.m_recstat );
|
||||
static MenuEntry_t ME_GAMESETUP_DEMOREC = MAKE_MENUENTRY( "Record demo:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_DEMOREC, Option );
|
||||
|
@ -439,17 +439,17 @@ typedef struct resolution_t {
|
|||
|
||||
resolution_t resolution[MAXVALIDMODES];
|
||||
|
||||
static char *MEOSN_VIDEOSETUP_RESOLUTION[MAXVALIDMODES];
|
||||
static char const *MEOSN_VIDEOSETUP_RESOLUTION[MAXVALIDMODES];
|
||||
static MenuOptionSet_t MEOS_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTIONSETDYN( MEOSN_VIDEOSETUP_RESOLUTION, NULL, 0, 0x0 );
|
||||
static MenuOption_t MEO_VIDEOSETUP_RESOLUTION = MAKE_MENUOPTION( &MF_Redfont, &MEOS_VIDEOSETUP_RESOLUTION, &newresolution );
|
||||
static MenuEntry_t ME_VIDEOSETUP_RESOLUTION = MAKE_MENUENTRY( "Resolution:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_RESOLUTION, Option );
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
#ifdef POLYMER
|
||||
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "Polymost", "Polymer", };
|
||||
static char const *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "Polymost", "Polymer", };
|
||||
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, REND_POLYMER, };
|
||||
#else
|
||||
static char *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "OpenGL", };
|
||||
static char const *MEOSN_VIDEOSETUP_RENDERER[] = { "Classic", "OpenGL", };
|
||||
static int32_t MEOSV_VIDEOSETUP_RENDERER[] = { REND_CLASSIC, REND_POLYMOST, };
|
||||
#endif
|
||||
|
||||
|
@ -463,7 +463,7 @@ static MenuOption_t MEO_VIDEOSETUP_FULLSCREEN = MAKE_MENUOPTION( &MF_Redfont, &M
|
|||
static MenuEntry_t ME_VIDEOSETUP_FULLSCREEN = MAKE_MENUENTRY( "Fullscreen:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FULLSCREEN, Option );
|
||||
|
||||
|
||||
static char *MEOSN_VIDEOSETUP_VSYNC [] ={ "Adaptive", "Off", "On", };
|
||||
static char const *MEOSN_VIDEOSETUP_VSYNC [] ={ "Adaptive", "Off", "On", };
|
||||
static int32_t MEOSV_VIDEOSETUP_VSYNC [] ={ -1, 0, 1, };
|
||||
static MenuOptionSet_t MEOS_VIDEOSETUP_VSYNC = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_VSYNC, MEOSV_VIDEOSETUP_VSYNC, 0x2);
|
||||
static MenuOption_t MEO_VIDEOSETUP_VSYNC = MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_VSYNC, &newvsync);
|
||||
|
@ -485,7 +485,7 @@ static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUOPTION(&MF_Redfont,
|
|||
#endif
|
||||
static MenuEntry_t ME_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUENTRY( "Widescreen:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ASPECTRATIO, Option );
|
||||
#ifdef POLYMER
|
||||
static char *MEOSN_DISPLAYSETUP_ASPECTRATIO_POLYMER[] = { "Auto", "4:3", "16:10", "5:3", "16:9", "1.85:1", "2.39:1", };
|
||||
static char const *MEOSN_DISPLAYSETUP_ASPECTRATIO_POLYMER[] = { "Auto", "4:3", "16:10", "5:3", "16:9", "1.85:1", "2.39:1", };
|
||||
static double MEOSV_DISPLAYSETUP_ASPECTRATIO_POLYMER[] = { 0., 1.33, 1.6, 1.66, 1.78, 1.85, 2.39, };
|
||||
static MenuOptionSet_t MEOS_DISPLAYSETUP_ASPECTRATIO_POLYMER = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_ASPECTRATIO_POLYMER, NULL, 0x1 );
|
||||
static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO_POLYMER = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ASPECTRATIO_POLYMER, NULL);
|
||||
|
@ -494,13 +494,13 @@ static MenuEntry_t ME_DISPLAYSETUP_ASPECTRATIO_POLYMER = MAKE_MENUENTRY( "Aspect
|
|||
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
static char *MEOSN_DISPLAYSETUP_TEXFILTER[] = { "Classic", "Filtered" };
|
||||
static char const *MEOSN_DISPLAYSETUP_TEXFILTER[] = { "Classic", "Filtered" };
|
||||
static MenuOptionSet_t MEOS_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_TEXFILTER, NULL, 0x2 );
|
||||
int32_t menufiltermode;
|
||||
static MenuOption_t MEO_DISPLAYSETUP_TEXFILTER = MAKE_MENUOPTION( &MF_Redfont, &MEOS_DISPLAYSETUP_TEXFILTER, &menufiltermode );
|
||||
static MenuEntry_t ME_DISPLAYSETUP_TEXFILTER = MAKE_MENUENTRY( "Texture Mode:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_TEXFILTER, Option );
|
||||
|
||||
static char *MEOSN_DISPLAYSETUP_ANISOTROPY[] = { "None", "2x", "4x", "8x", "16x", };
|
||||
static char const *MEOSN_DISPLAYSETUP_ANISOTROPY[] = { "None", "2x", "4x", "8x", "16x", };
|
||||
static int32_t MEOSV_DISPLAYSETUP_ANISOTROPY[] = { 1, 2, 4, 8, 16, };
|
||||
static MenuOptionSet_t MEOS_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTIONSET( MEOSN_DISPLAYSETUP_ANISOTROPY, MEOSV_DISPLAYSETUP_ANISOTROPY, 0x0 );
|
||||
static MenuOption_t MEO_DISPLAYSETUP_ANISOTROPY = MAKE_MENUOPTION(&MF_Redfont, &MEOS_DISPLAYSETUP_ANISOTROPY, &glanisotropy);
|
||||
|
@ -533,7 +533,7 @@ static MenuEntry_t ME_SCREENSETUP_LEVELSTATS = MAKE_MENUENTRY( "Level stats:", &
|
|||
static MenuOption_t MEO_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.fta_on);
|
||||
static MenuEntry_t ME_SCREENSETUP_SHOWPICKUPMESSAGES = MAKE_MENUENTRY( "Game messages:", &MF_Redfont, &MEF_BigOptions, &MEO_SCREENSETUP_SHOWPICKUPMESSAGES, Option );
|
||||
|
||||
static char *MEOSN_SCREENSETUP_NEWSTATUSBAR[] = { "Classic", "New",
|
||||
static char const *MEOSN_SCREENSETUP_NEWSTATUSBAR[] = { "Classic", "New",
|
||||
#ifdef DROIDMENU
|
||||
"On top",
|
||||
#endif
|
||||
|
@ -692,8 +692,8 @@ static MenuEntry_t *MEL_DISPLAYSETUP_GL_POLYMER[] = {
|
|||
|
||||
|
||||
|
||||
static char *MenuKeyNone = " -";
|
||||
static char *MEOSN_Keys[NUMKEYS];
|
||||
static char const *MenuKeyNone = " -";
|
||||
static char const *MEOSN_Keys[NUMKEYS];
|
||||
|
||||
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS_TEMPLATE = { { NULL, NULL, }, MEOSN_Keys, &MF_MinifontRed, NUMKEYS, 54<<16, 0 };
|
||||
static MenuCustom2Col_t MEO_KEYBOARDSETUPFUNCS[NUMGAMEFUNCTIONS];
|
||||
|
@ -717,7 +717,7 @@ static MenuEntry_t *MEL_KEYBOARDSETUP[] = {
|
|||
|
||||
#define MENUMOUSEFUNCTIONS 12
|
||||
|
||||
static char *MenuMouseNames[MENUMOUSEFUNCTIONS] = {
|
||||
static char const *MenuMouseNames[MENUMOUSEFUNCTIONS] = {
|
||||
"Button 1",
|
||||
"Double Button 1",
|
||||
"Button 2",
|
||||
|
@ -862,7 +862,7 @@ static MenuEntry_t *MEL_INTERNAL_MOUSEADVANCED_DAXES[] = {
|
|||
|
||||
static const char *MenuJoystickHatDirections[] = { "Up", "Right", "Down", "Left", };
|
||||
|
||||
static char *MEOSN_JOYSTICKAXIS_ANALOG[] = { " -None-", "Turning", "Strafing", "Looking", "Moving", };
|
||||
static char const *MEOSN_JOYSTICKAXIS_ANALOG[] = { " -None-", "Turning", "Strafing", "Looking", "Moving", };
|
||||
static int32_t MEOSV_JOYSTICKAXIS_ANALOG[] = { -1, analog_turning, analog_strafing, analog_lookingupanddown, analog_moving, };
|
||||
static MenuOptionSet_t MEOS_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTIONSET( MEOSN_JOYSTICKAXIS_ANALOG, MEOSV_JOYSTICKAXIS_ANALOG, 0x0 );
|
||||
static MenuOption_t MEO_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_JOYSTICKAXIS_ANALOG, NULL );
|
||||
|
@ -898,7 +898,7 @@ static MenuEntry_t *MEL_INTERNAL_JOYSTICKAXIS_DIGITAL[] = {
|
|||
static MenuOption_t MEO_RENDERERSETUP_HIGHTILE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_NoYes, &usehightile );
|
||||
static MenuEntry_t ME_RENDERERSETUP_HIGHTILE = MAKE_MENUENTRY( "Truecolor textures:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_HIGHTILE, Option );
|
||||
|
||||
static char *MEOSN_RENDERERSETUP_TEXQUALITY [] ={ "Full", "Half", "Barf", };
|
||||
static char const *MEOSN_RENDERERSETUP_TEXQUALITY [] ={ "Full", "Half", "Barf", };
|
||||
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTIONSET(MEOSN_RENDERERSETUP_TEXQUALITY, NULL, 0x2);
|
||||
static MenuOption_t MEO_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_RENDERERSETUP_TEXQUALITY, &r_downsize);
|
||||
static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY("GL texture quality:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXQUALITY, Option);
|
||||
|
@ -907,7 +907,7 @@ static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY("GL texture qual
|
|||
static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.config.useprecache );
|
||||
static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( "Pre-load map textures:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_PRECACHE, Option );
|
||||
# ifndef EDUKE32_GLES
|
||||
static char *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compr.", };
|
||||
static char const *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compr.", };
|
||||
static MenuOptionSet_t MEOS_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTIONSET( MEOSN_RENDERERSETUP_TEXCACHE, NULL, 0x2 );
|
||||
static MenuOption_t MEO_RENDERERSETUP_TEXCACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_RENDERERSETUP_TEXCACHE, &glusetexcache );
|
||||
static MenuEntry_t ME_RENDERERSETUP_TEXCACHE = MAKE_MENUENTRY( "On-disk texture cache:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXCACHE, Option );
|
||||
|
@ -923,7 +923,7 @@ static MenuEntry_t ME_RENDERERSETUP_MODELS = MAKE_MENUENTRY( "Use 3d models:", &
|
|||
#endif
|
||||
|
||||
#ifdef POLYMER
|
||||
static char *MEOSN_POLYMER_LIGHTS [] ={ "Off", "Full", "Map only", };
|
||||
static char const *MEOSN_POLYMER_LIGHTS [] ={ "Off", "Full", "Map only", };
|
||||
static MenuOptionSet_t MEOS_POLYMER_LIGHTS = MAKE_MENUOPTIONSET(MEOSN_POLYMER_LIGHTS, NULL, 0x2);
|
||||
static MenuOption_t MEO_POLYMER_LIGHTS = MAKE_MENUOPTION(&MF_Bluefont, &MEOS_POLYMER_LIGHTS, &pr_lighting);
|
||||
static MenuEntry_t ME_POLYMER_LIGHTS = MAKE_MENUENTRY("Dynamic lights:", &MF_BluefontRed, &MEF_SmallOptions, &MEO_POLYMER_LIGHTS, Option);
|
||||
|
@ -1057,7 +1057,7 @@ static MenuEntry_t ME_SOUND_VOLUME_MUSIC = MAKE_MENUENTRY( "Music:", &MF_Redfont
|
|||
static MenuOption_t MEO_SOUND_DUKETALK = MAKE_MENUOPTION(&MF_Redfont, &MEOS_NoYes, NULL);
|
||||
static MenuEntry_t ME_SOUND_DUKETALK = MAKE_MENUENTRY( "Duke talk:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SOUND_DUKETALK, Option );
|
||||
|
||||
static char *MEOSN_SOUND_SAMPLINGRATE[] = { "22050Hz", "44100Hz", "48000Hz", };
|
||||
static char const *MEOSN_SOUND_SAMPLINGRATE[] = { "22050Hz", "44100Hz", "48000Hz", };
|
||||
static int32_t MEOSV_SOUND_SAMPLINGRATE[] = { 22050, 44100, 48000, };
|
||||
static MenuOptionSet_t MEOS_SOUND_SAMPLINGRATE = MAKE_MENUOPTIONSET( MEOSN_SOUND_SAMPLINGRATE, MEOSV_SOUND_SAMPLINGRATE, 0x3 );
|
||||
static MenuOption_t MEO_SOUND_SAMPLINGRATE = MAKE_MENUOPTION( &MF_Redfont, &MEOS_SOUND_SAMPLINGRATE, &soundrate );
|
||||
|
@ -1105,12 +1105,12 @@ static MenuEntry_t *MEL_NETWORK[] = {
|
|||
|
||||
static MenuString_t MEO_PLAYER_NAME = MAKE_MENUSTRING( szPlayerName, &MF_Bluefont, MAXPLAYERNAME, 0 );
|
||||
static MenuEntry_t ME_PLAYER_NAME = MAKE_MENUENTRY( "Name", &MF_BluefontRed, &MEF_PlayerNarrow, &MEO_PLAYER_NAME, String );
|
||||
static char *MEOSN_PLAYER_COLOR[] = { "Auto", "Blue", "Red", "Green", "Gray", "Dark gray", "Dark green", "Brown", "Dark blue", "Bright red", "Yellow", };
|
||||
static char const *MEOSN_PLAYER_COLOR[] = { "Auto", "Blue", "Red", "Green", "Gray", "Dark gray", "Dark green", "Brown", "Dark blue", "Bright red", "Yellow", };
|
||||
static int32_t MEOSV_PLAYER_COLOR[] = { 0, 9, 10, 11, 12, 13, 14, 15, 16, 21, 23, };
|
||||
static MenuOptionSet_t MEOS_PLAYER_COLOR = MAKE_MENUOPTIONSET( MEOSN_PLAYER_COLOR, MEOSV_PLAYER_COLOR, 0x2 );
|
||||
static MenuOption_t MEO_PLAYER_COLOR = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_COLOR, &ud.color );
|
||||
static MenuEntry_t ME_PLAYER_COLOR = MAKE_MENUENTRY( "Color", &MF_BluefontRed, &MEF_PlayerNarrow, &MEO_PLAYER_COLOR, Option );
|
||||
static char *MEOSN_PLAYER_TEAM[] = { "Blue", "Red", "Green", "Gray", };
|
||||
static char const *MEOSN_PLAYER_TEAM[] = { "Blue", "Red", "Green", "Gray", };
|
||||
static MenuOptionSet_t MEOS_PLAYER_TEAM = MAKE_MENUOPTIONSET( MEOSN_PLAYER_TEAM, NULL, 0x2 );
|
||||
static MenuOption_t MEO_PLAYER_TEAM = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_PLAYER_TEAM, &ud.team );
|
||||
static MenuEntry_t ME_PLAYER_TEAM = MAKE_MENUENTRY( "Team", &MF_BluefontRed, &MEF_PlayerNarrow, &MEO_PLAYER_TEAM, Option );
|
||||
|
@ -1137,14 +1137,14 @@ static MenuEntry_t ME_MACROS_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Bluefont, &MEF
|
|||
static MenuEntry_t ME_MACROS[MAXRIDECULE];
|
||||
static MenuEntry_t *MEL_MACROS[MAXRIDECULE];
|
||||
|
||||
static char *MenuUserMap = "User Map";
|
||||
static char *MenuSkillNone = "None";
|
||||
static char const *MenuUserMap = "User Map";
|
||||
static char const *MenuSkillNone = "None";
|
||||
|
||||
static char *MEOSN_NetGametypes[MAXGAMETYPES];
|
||||
static char *MEOSN_NetEpisodes[MAXVOLUMES+1];
|
||||
static char const *MEOSN_NetGametypes[MAXGAMETYPES];
|
||||
static char const *MEOSN_NetEpisodes[MAXVOLUMES+1];
|
||||
static int32_t MEOSV_NetEpisodes[MAXVOLUMES+1];
|
||||
static char *MEOSN_NetLevels[MAXVOLUMES][MAXLEVELS];
|
||||
static char *MEOSN_NetSkills[MAXSKILLS+1];
|
||||
static char const *MEOSN_NetLevels[MAXVOLUMES][MAXLEVELS];
|
||||
static char const *MEOSN_NetSkills[MAXSKILLS+1];
|
||||
|
||||
static MenuLink_t MEO_NETHOST_OPTIONS = { MENU_NETOPTIONS, MA_Advance, };
|
||||
static MenuEntry_t ME_NETHOST_OPTIONS = MAKE_MENUENTRY( "Game Options", &MF_Redfont, &MEF_VideoSetup, &MEO_NETHOST_OPTIONS, Link );
|
||||
|
|
|
@ -166,7 +166,7 @@ typedef struct MenuLink_t
|
|||
typedef struct MenuOptionSet_t
|
||||
{
|
||||
// traits
|
||||
char **optionNames;
|
||||
char const **optionNames;
|
||||
int32_t *optionValues; // If NULL, the identity of currentOption is assumed.
|
||||
|
||||
// pop-up list appearance
|
||||
|
@ -202,7 +202,7 @@ typedef struct MenuCustom2Col_t
|
|||
{
|
||||
// effect
|
||||
uint8_t *column[2];
|
||||
char **key;
|
||||
char const **key;
|
||||
|
||||
// appearance
|
||||
MenuFont_t *font;
|
||||
|
|
|
@ -1754,7 +1754,8 @@ static void G_LoadMapHack(char *outbuf, const char *filename)
|
|||
// levnamebuf should have at least size BMAX_PATH
|
||||
void G_SetupFilenameBasedMusic(char *levnamebuf, const char *boardfilename, int32_t level_number)
|
||||
{
|
||||
char *p, *exts[] = {
|
||||
char *p;
|
||||
char const *exts [] ={
|
||||
#ifdef HAVE_FLAC
|
||||
"flac",
|
||||
#endif
|
||||
|
|
|
@ -1188,10 +1188,12 @@ static uint8_t *svdiff;
|
|||
#if !defined LUNATIC
|
||||
# define SV_SKIPMASK (/*GAMEVAR_SYSTEM|*/GAMEVAR_READONLY|GAMEVAR_INTPTR| \
|
||||
GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR /*|GAMEVAR_NORESET*/ |GAMEVAR_SPECIAL)
|
||||
|
||||
static char svgm_vars_string [] = "blK:vars";
|
||||
// setup gamevar data spec for snapshotting and diffing... gamevars must be loaded when called
|
||||
static void sv_makevarspec()
|
||||
{
|
||||
static char *magic = "blK:vars";
|
||||
static char *magic = svgm_vars_string;
|
||||
int32_t i, j, numsavedvars=0, numsavedarrays=0, per;
|
||||
|
||||
for (i=0; i<g_gameVarCount; i++)
|
||||
|
|
|
@ -80,7 +80,7 @@ static inline void clearfilenames(void)
|
|||
finddirs = NULL;
|
||||
}
|
||||
|
||||
static inline int32_t getfilenames(char *path)
|
||||
static inline int32_t getfilenames(char const *path)
|
||||
{
|
||||
clearfilenames();
|
||||
finddirs = klistpath(path,"*",CACHE1D_FIND_DIR);
|
||||
|
@ -499,11 +499,13 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
|
||||
ZeroMemory(&tab, sizeof(tab));
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Setup");
|
||||
tab.pszText = Bstrdup(TEXT("Setup"));
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_CONFIG, (LPARAM)&tab);
|
||||
Bfree(tab.pszText);
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Message Log");
|
||||
tab.pszText = Bstrdup(TEXT("Message Log"));
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_MESSAGES, (LPARAM)&tab);
|
||||
Bfree(tab.pszText);
|
||||
|
||||
// Work out the position and size of the area inside the tab control for the pages
|
||||
ZeroMemory(&r, sizeof(r));
|
||||
|
|
|
@ -40,8 +40,8 @@ int32_t G_GetVersionFromWebsite(char *buffer)
|
|||
int32_t bytes_sent, i=0, j=0;
|
||||
struct sockaddr_in dest_addr;
|
||||
struct hostent *h;
|
||||
char *host = "www.eduke32.com";
|
||||
char *req = "GET http://www.eduke32.com/VERSION HTTP/1.0\r\n\r\n\r\n";
|
||||
char const *host = "www.eduke32.com";
|
||||
char const *req = "GET http://www.eduke32.com/VERSION HTTP/1.0\r\n\r\n\r\n";
|
||||
char *tok;
|
||||
char tempbuf[2048],otherbuf[16],ver[16];
|
||||
SOCKET mysock;
|
||||
|
|
Loading…
Reference in a new issue