Fix static-main-arrays debug build, which is without the clipshape feature.

git-svn-id: https://svn.eduke32.com/eduke32@2528 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-25 13:54:46 +00:00
parent adc8b302ea
commit 386d34e3b4
2 changed files with 12 additions and 2 deletions

View file

@ -8427,18 +8427,21 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
{ {
int32_t i = 1, j, maxlen=0, *lengths; int32_t i = 1, j, maxlen=0, *lengths;
char *c, *k; char *c, *k;
char clipshape[16] = "_clipshape0.map";
mapster32_fullpath = argv[0]; mapster32_fullpath = argv[0];
#ifdef HAVE_CLIPSHAPE_FEATURE
// pre-form the default 10 clipmaps // pre-form the default 10 clipmaps
for (j = '0'; j<='9'; ++j) for (j = '0'; j<='9'; ++j)
{ {
char clipshape[16] = "_clipshape0.map";
clipshape[10] = j; clipshape[10] = j;
g_clipMapFiles = (char **) Brealloc (g_clipMapFiles, (g_clipMapFilesNum+1) * sizeof(char *)); g_clipMapFiles = (char **) Brealloc (g_clipMapFiles, (g_clipMapFilesNum+1) * sizeof(char *));
g_clipMapFiles[g_clipMapFilesNum] = Bstrdup(clipshape); g_clipMapFiles[g_clipMapFilesNum] = Bstrdup(clipshape);
++g_clipMapFilesNum; ++g_clipMapFilesNum;
} }
#endif
if (argc <= 1) if (argc <= 1)
return; return;
@ -8585,6 +8588,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
i++; i++;
continue; continue;
} }
#ifdef HAVE_CLIPSHAPE_FEATURE
if (!Bstrcasecmp(c+1,"clipmap")) if (!Bstrcasecmp(c+1,"clipmap"))
{ {
if (argc > i+1) if (argc > i+1)
@ -8597,6 +8601,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
i++; i++;
continue; continue;
} }
#endif
if (!Bstrcasecmp(c+1,"nm") || !Bstrcasecmp(c+1,"ns")) if (!Bstrcasecmp(c+1,"nm") || !Bstrcasecmp(c+1,"ns"))
{ {
COPYARG(i); COPYARG(i);

View file

@ -8612,7 +8612,6 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
{ {
int16_t i = 1, j; int16_t i = 1, j;
char *c, *k; char *c, *k;
char clipshape[16] = "_clipshape0.map";
ud.fta_on = 1; ud.fta_on = 1;
ud.god = 0; ud.god = 0;
@ -8633,14 +8632,18 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
g_player[0].wchoice[8] = 9; g_player[0].wchoice[8] = 9;
g_player[0].wchoice[9] = 1; g_player[0].wchoice[9] = 1;
#ifdef HAVE_CLIPSHAPE_FEATURE
// pre-form the default 10 clipmaps // pre-form the default 10 clipmaps
for (j = '0'; j<='9'; ++j) for (j = '0'; j<='9'; ++j)
{ {
char clipshape[16] = "_clipshape0.map";
clipshape[10] = j; clipshape[10] = j;
g_clipMapFiles = (char **) Brealloc (g_clipMapFiles, (g_clipMapFilesNum+1) * sizeof(char *)); g_clipMapFiles = (char **) Brealloc (g_clipMapFiles, (g_clipMapFilesNum+1) * sizeof(char *));
g_clipMapFiles[g_clipMapFilesNum] = Bstrdup(clipshape); g_clipMapFiles[g_clipMapFilesNum] = Bstrdup(clipshape);
++g_clipMapFilesNum; ++g_clipMapFilesNum;
} }
#endif
if (argc > 1) if (argc > 1)
{ {
@ -8869,6 +8872,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
i++; i++;
continue; continue;
} }
#ifdef HAVE_CLIPSHAPE_FEATURE
if (!Bstrcasecmp(c+1,"clipmap")) if (!Bstrcasecmp(c+1,"clipmap"))
{ {
if (argc > i+1) if (argc > i+1)
@ -8881,6 +8885,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
i++; i++;
continue; continue;
} }
#endif
if (!Bstrcasecmp(c+1,"condebug")) if (!Bstrcasecmp(c+1,"condebug"))
{ {
g_scriptDebug = 1; g_scriptDebug = 1;