mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Revert "Prettify the DEF progress meter by relocating '\n' en masse."
This reverts commit c7e51147f1869d42fc8365f748bb8f6bd4c6fc2f. [r3835] Conflicts: eduke32/build/src/defs.c [Dunno what caused this, but I cleaned this out. Also, the change from build.c was not reverted.] git-svn-id: https://svn.eduke32.com/eduke32@4061 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
161217a59a
commit
c7f8dc6efd
1 changed files with 79 additions and 82 deletions
|
@ -115,9 +115,9 @@ static void defsparser_include(const char *fn, const scriptfile *script, const c
|
|||
if (!included)
|
||||
{
|
||||
if (!cmdtokptr)
|
||||
initprintf("Warning: Failed including %s as module", fn);
|
||||
initprintf("Warning: Failed including %s as module\n", fn);
|
||||
else
|
||||
initprintf("\nWarning: Failed including %s on line %s:%d",
|
||||
initprintf("Warning: Failed including %s on line %s:%d\n",
|
||||
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
}
|
||||
else
|
||||
|
@ -125,7 +125,7 @@ static void defsparser_include(const char *fn, const scriptfile *script, const c
|
|||
if (!cmdtokptr)
|
||||
{
|
||||
flushlogwindow = 1;
|
||||
initprintf("Loading module \"%s\"",fn);
|
||||
initprintf("Loading module \"%s\"\n",fn);
|
||||
flushlogwindow = 0;
|
||||
}
|
||||
|
||||
|
@ -140,14 +140,14 @@ static int32_t check_tile_range(const char *defcmd, int32_t *tilebeg, int32_t *t
|
|||
{
|
||||
if (*tileend < *tilebeg)
|
||||
{
|
||||
initprintf("\nWarning: %s: backwards tile range on line %s:%d", defcmd,
|
||||
initprintf("Warning: %s: backwards tile range on line %s:%d\n", defcmd,
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
swaplong(tilebeg, tileend);
|
||||
}
|
||||
|
||||
if ((unsigned)*tilebeg >= MAXTILES || (unsigned)*tileend >= MAXTILES)
|
||||
{
|
||||
initprintf("\nError: %s: Invalid tile range on line %s:%d", defcmd,
|
||||
initprintf("Error: %s: Invalid tile range on line %s:%d\n", defcmd,
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
return 1;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ static int32_t check_tile(const char *defcmd, int32_t *tile, const scriptfile *s
|
|||
{
|
||||
if ((unsigned)*tile >= MAXTILES)
|
||||
{
|
||||
initprintf("\nError: %s: Invalid tile number on line %s:%d", defcmd,
|
||||
initprintf("Error: %s: Invalid tile number on line %s:%d\n", defcmd,
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
return 1;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ static void tile_from_truecolpic(int32_t tile, const palette_t *picptr, int32_t
|
|||
if (col->f < alphacut) { ftd[i*ysiz+j] = 255; continue; }
|
||||
ftd[i*ysiz+j] = getclosestcol(col->b>>2,col->g>>2,col->r>>2);
|
||||
}
|
||||
// initprintf("\n %d %d %d %d",col->r,col->g,col->b,col->f);
|
||||
// initprintf(" %d %d %d %d\n",col->r,col->g,col->b,col->f);
|
||||
}
|
||||
|
||||
faketilesiz[tile] = qlz_compress(ftd, faketiledata[tile], xsiz*ysiz, state_compress);
|
||||
|
@ -282,7 +282,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
switch (tokn)
|
||||
{
|
||||
case T_ERROR:
|
||||
initprintf("\nError on line %s:%d.", script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
initprintf("Error on line %s:%d.\n", script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case T_EOF:
|
||||
return(0);
|
||||
|
@ -307,7 +307,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (scriptfile_getsymbol(script,&number)) break;
|
||||
|
||||
if (scriptfile_addsymbolvalue(name,number) < 0)
|
||||
initprintf("\nWarning: Symbol %s was NOT redefined to %d on line %s:%d",
|
||||
initprintf("Warning: Symbol %s was NOT redefined to %d on line %s:%d\n",
|
||||
name,number,script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (tile2-tile1 > 255)
|
||||
{
|
||||
initprintf("\nError: animtilerange: tile difference can be at most 255 on line %s:%d",
|
||||
initprintf("Error: animtilerange: tile difference can be at most 255 on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
spd = clamp(spd, 0, 15);
|
||||
if (type&~3)
|
||||
{
|
||||
initprintf("\nError: animtilerange: animation type must be 0, 1, 2 or 3 on line %s:%d",
|
||||
initprintf("Error: animtilerange: animation type must be 0, 1, 2 or 3 on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
}
|
||||
|
||||
|
@ -586,7 +586,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if ((unsigned)tile >= MAXTILES)
|
||||
{
|
||||
initprintf("\nError: missing or invalid 'tile number' for texture definition near line %s:%d",
|
||||
initprintf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,texturetokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -616,7 +616,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
palette_t *picptr = NULL;
|
||||
|
||||
kpzload(fn, (intptr_t *)&picptr, &j, &xsiz, &ysiz);
|
||||
// initprintf("\ngot bpl %d xsiz %d ysiz %d",bpl,xsiz,ysiz);
|
||||
// initprintf("got bpl %d xsiz %d ysiz %d\n",bpl,xsiz,ysiz);
|
||||
|
||||
if (!picptr)
|
||||
break;
|
||||
|
@ -646,7 +646,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (scriptfile_getstring(script,&fn)) break;
|
||||
|
||||
kpzload(fn, (intptr_t *)&picptr, &bpl, &xsiz, &ysiz);
|
||||
// initprintf("\ngot bpl %d xsiz %d ysiz %d",bpl,xsiz,ysiz);
|
||||
// initprintf("got bpl %d xsiz %d ysiz %d\n",bpl,xsiz,ysiz);
|
||||
|
||||
if (!picptr)
|
||||
break; // TODO: message
|
||||
|
@ -721,7 +721,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
lastmodelid = md_loadmodel(modelfn);
|
||||
if (lastmodelid < 0)
|
||||
{
|
||||
initprintf("\nWarning: Failed loading MD2/MD3 model \"%s\"", modelfn);
|
||||
initprintf("Warning: Failed loading MD2/MD3 model \"%s\"\n", modelfn);
|
||||
break;
|
||||
}
|
||||
md_setmisc(lastmodelid,(float)scale, shadeoffs,0.0,0.0,0);
|
||||
|
@ -753,7 +753,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (lastmodelid < 0)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("\nWarning: Ignoring frame definition.");
|
||||
initprintf("Warning: Ignoring frame definition.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -765,12 +765,12 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
happy = 0; break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("\nInvalid tile number on line %s:%d",
|
||||
initprintf("Invalid tile number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("\nInvalid frame name on line %s:%d",
|
||||
initprintf("Invalid frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
|
@ -796,7 +796,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (lastmodelid < 0)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("\nWarning: Ignoring animation definition.");
|
||||
initprintf("Warning: Ignoring animation definition.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -808,15 +808,15 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("\nInvalid starting frame name on line %s:%d",
|
||||
initprintf("Invalid starting frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case -3:
|
||||
initprintf("\nInvalid ending frame name on line %s:%d",
|
||||
initprintf("Invalid ending frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case -4:
|
||||
initprintf("\nOut of memory on line %s:%d",
|
||||
initprintf("Out of memory on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -857,15 +857,15 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("\nInvalid skin filename on line %s:%d",
|
||||
initprintf("Invalid skin filename on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case -3:
|
||||
initprintf("\nInvalid palette number on line %s:%d",
|
||||
initprintf("Invalid palette number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
case -4:
|
||||
initprintf("\nOut of memory on line %s:%d",
|
||||
initprintf("Out of memory on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -885,13 +885,13 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (nextvoxid == MAXVOXELS)
|
||||
{
|
||||
initprintf("\nMaximum number of voxels already defined.");
|
||||
initprintf("Maximum number of voxels already defined.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (qloadkvx(nextvoxid, fn))
|
||||
{
|
||||
initprintf("\nFailure loading voxel file \"%s\"",fn);
|
||||
initprintf("Failure loading voxel file \"%s\"\n",fn);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -910,7 +910,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (lastvoxid < 0)
|
||||
{
|
||||
initprintf("\nWarning: Ignoring voxel tiles definition.");
|
||||
initprintf("Warning: Ignoring voxel tiles definition.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -957,7 +957,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
lastmodelid = md_loadmodel(modelfn);
|
||||
if (lastmodelid < 0)
|
||||
{
|
||||
initprintf("\nWarning: Failed loading MD2/MD3 model \"%s\"", modelfn);
|
||||
initprintf("Warning: Failed loading MD2/MD3 model \"%s\"\n", modelfn);
|
||||
script->textptr = modelend+1;
|
||||
break;
|
||||
}
|
||||
|
@ -967,7 +967,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
int32_t token = getatoken(script,modeltokens,sizeof(modeltokens)/sizeof(tokenlist));
|
||||
switch (token)
|
||||
{
|
||||
//case T_ERROR: initprintf("\nError on line %s:%d in model tokens", script->filename,script->linenum); break;
|
||||
//case T_ERROR: initprintf("Error on line %s:%d in model tokens\n", script->filename,script->linenum); break;
|
||||
case T_SCALE:
|
||||
scriptfile_getdouble(script,&scale); break;
|
||||
case T_SHADE:
|
||||
|
@ -1029,7 +1029,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (lastmodelid < 0)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("\nWarning: Ignoring frame definition.");
|
||||
initprintf("Warning: Ignoring frame definition.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -1042,12 +1042,12 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
happy = 0; break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("\nInvalid tile number on line %s:%d",
|
||||
initprintf("Invalid tile number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,frametokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("\nInvalid frame name on line %s:%d",
|
||||
initprintf("Invalid frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,frametokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
|
@ -1093,15 +1093,15 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
}
|
||||
|
||||
if (!startframe) initprintf("\nError: missing 'start frame' for anim definition near line %s:%d", script->filename, scriptfile_getlinum(script,animtokptr)), happy = 0;
|
||||
if (!endframe) initprintf("\nError: missing 'end frame' for anim definition near line %s:%d", script->filename, scriptfile_getlinum(script,animtokptr)), happy = 0;
|
||||
if (!startframe) initprintf("Error: missing 'start frame' for anim definition near line %s:%d\n", script->filename, scriptfile_getlinum(script,animtokptr)), happy = 0;
|
||||
if (!endframe) initprintf("Error: missing 'end frame' for anim definition near line %s:%d\n", script->filename, scriptfile_getlinum(script,animtokptr)), happy = 0;
|
||||
model_ok &= happy;
|
||||
if (!happy) break;
|
||||
|
||||
if (lastmodelid < 0)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("\nWarning: Ignoring animation definition.");
|
||||
initprintf("Warning: Ignoring animation definition.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -1113,17 +1113,17 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("\nInvalid starting frame name on line %s:%d",
|
||||
initprintf("Invalid starting frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,animtokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("\nInvalid ending frame name on line %s:%d",
|
||||
initprintf("Invalid ending frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,animtokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
case -4:
|
||||
initprintf("\nOut of memory on line %s:%d",
|
||||
initprintf("Out of memory on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,animtokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
|
@ -1173,7 +1173,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (!skinfn)
|
||||
{
|
||||
initprintf("\nError: missing 'skin filename' for skin definition near line %s:%d", script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
initprintf("Error: missing 'skin filename' for skin definition near line %s:%d\n", script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
}
|
||||
|
@ -1209,17 +1209,17 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("\nInvalid skin filename on line %s:%d",
|
||||
initprintf("Invalid skin filename on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("\nInvalid palette number on line %s:%d",
|
||||
initprintf("Invalid palette number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
case -4:
|
||||
initprintf("\nOut of memory on line %s:%d",
|
||||
initprintf("Out of memory on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,skintokptr));
|
||||
model_ok = 0;
|
||||
break;
|
||||
|
@ -1295,7 +1295,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if (lastmodelid < 0)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
initprintf("\nWarning: Ignoring frame definition.");
|
||||
initprintf("Warning: Ignoring frame definition.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -1309,12 +1309,12 @@ static int32_t defsparser(scriptfile *script)
|
|||
case -1:
|
||||
happy = 0; break; // invalid model id!?
|
||||
case -2:
|
||||
initprintf("\nInvalid tile number on line %s:%d",
|
||||
initprintf("Invalid tile number on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,hudtokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
case -3:
|
||||
initprintf("\nInvalid frame name on line %s:%d",
|
||||
initprintf("Invalid frame name on line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,hudtokptr));
|
||||
happy = 0;
|
||||
break;
|
||||
|
@ -1333,7 +1333,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
{
|
||||
if (lastmodelid >= 0)
|
||||
{
|
||||
initprintf("\nRemoving model %d due to errors.", lastmodelid);
|
||||
initprintf("Removing model %d due to errors.\n", lastmodelid);
|
||||
md_undefinemodel(lastmodelid);
|
||||
nextmodelid--;
|
||||
}
|
||||
|
@ -1356,9 +1356,9 @@ static int32_t defsparser(scriptfile *script)
|
|||
md_thinoutmodel(lastmodelid, usedframebitmap);
|
||||
# ifdef DEBUG_MODEL_MEM
|
||||
if (i>=0 && i<onumframes)
|
||||
initprintf("\nused %d/%d frames: %s", i, onumframes, modelfn);
|
||||
initprintf("used %d/%d frames: %s\n", i, onumframes, modelfn);
|
||||
else if (i<0)
|
||||
initprintf("\nmd_thinoutmodel returned %d: %s", i, modelfn);
|
||||
initprintf("md_thinoutmodel returned %d: %s\n", i, modelfn);
|
||||
# endif
|
||||
}
|
||||
# endif
|
||||
|
@ -1387,8 +1387,8 @@ static int32_t defsparser(scriptfile *script)
|
|||
};
|
||||
|
||||
if (scriptfile_getstring(script,&fn)) break; //voxel filename
|
||||
if (nextvoxid == MAXVOXELS) { initprintf("\nMaximum number of voxels already defined."); break; }
|
||||
if (qloadkvx(nextvoxid, fn)) { initprintf("\nFailure loading voxel file \"%s\"",fn); break; }
|
||||
if (nextvoxid == MAXVOXELS) { initprintf("Maximum number of voxels already defined.\n"); break; }
|
||||
if (qloadkvx(nextvoxid, fn)) { initprintf("Failure loading voxel file \"%s\"\n",fn); break; }
|
||||
lastvoxid = nextvoxid++;
|
||||
|
||||
if (scriptfile_getbraces(script,&modelend)) break;
|
||||
|
@ -1396,7 +1396,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
{
|
||||
switch (getatoken(script,voxeltokens,sizeof(voxeltokens)/sizeof(tokenlist)))
|
||||
{
|
||||
//case T_ERROR: initprintf("\nError on line %s:%d in voxel tokens", script->filename,linenum); break;
|
||||
//case T_ERROR: initprintf("Error on line %s:%d in voxel tokens\n", script->filename,linenum); break;
|
||||
case T_TILE:
|
||||
scriptfile_getsymbol(script,&tilex);
|
||||
|
||||
|
@ -1460,7 +1460,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
{
|
||||
switch (getatoken(script,skyboxtokens,sizeof(skyboxtokens)/sizeof(tokenlist)))
|
||||
{
|
||||
//case T_ERROR: initprintf("\nError on line %s:%d in skybox tokens",script->filename,linenum); break;
|
||||
//case T_ERROR: initprintf("Error on line %s:%d in skybox tokens\n",script->filename,linenum); break;
|
||||
case T_TILE:
|
||||
scriptfile_getsymbol(script,&tile); break;
|
||||
case T_PAL:
|
||||
|
@ -1480,10 +1480,10 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
}
|
||||
|
||||
if (tile < 0) initprintf("\nError: skybox: missing 'tile number' near line %s:%d", script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy=0;
|
||||
if (tile < 0) initprintf("Error: skybox: missing 'tile number' near line %s:%d\n", script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy=0;
|
||||
for (i=0; i<6; i++)
|
||||
{
|
||||
if (!fn[i]) initprintf("\nError: skybox: missing '%s filename' near line %s:%d", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0;
|
||||
if (!fn[i]) initprintf("Error: skybox: missing '%s filename' near line %s:%d\n", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0;
|
||||
// FIXME?
|
||||
if (check_file_exist(fn[i]))
|
||||
happy = 0;
|
||||
|
@ -1527,21 +1527,21 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
if ((unsigned)basepal >= ((unsigned)basepalcount))
|
||||
{
|
||||
initprintf("\nError: missing or invalid 'base palette number' for highpalookup definition "
|
||||
"near line %s:%d", script->filename, scriptfile_getlinum(script,highpaltokptr));
|
||||
initprintf("Error: missing or invalid 'base palette number' for highpalookup definition "
|
||||
"near line %s:%d\n", script->filename, scriptfile_getlinum(script,highpaltokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if ((unsigned)pal >= MAXPALOOKUPS - RESERVEDPALS)
|
||||
{
|
||||
initprintf("\nError: missing or invalid 'palette number' for highpalookup definition near "
|
||||
"line %s:%d", script->filename, scriptfile_getlinum(script,highpaltokptr));
|
||||
initprintf("Error: missing or invalid 'palette number' for highpalookup definition near "
|
||||
"line %s:%d\n", script->filename, scriptfile_getlinum(script,highpaltokptr));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!fn)
|
||||
{
|
||||
initprintf("\nError: missing 'file name' for highpalookup definition near line %s:%d",
|
||||
initprintf("Error: missing 'file name' for highpalookup definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,highpaltokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -1566,14 +1566,14 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
klseek(fd, 0, SEEK_SET);
|
||||
if (kread(fd, filebuf, filesize)!=filesize)
|
||||
{ kclose(fd); Bfree(highpaldata); initprintf("\nError: didn't read all of \"%s\".", fn); break; }
|
||||
{ kclose(fd); Bfree(highpaldata); initprintf("Error: didn't read all of \"%s\".\n", fn); break; }
|
||||
|
||||
kclose(fd);
|
||||
kpgetdim(filebuf, filesize, &xsiz, &ysiz);
|
||||
|
||||
if (xsiz != PR_HIGHPALOOKUP_DIM*PR_HIGHPALOOKUP_DIM || ysiz != PR_HIGHPALOOKUP_DIM)
|
||||
{
|
||||
initprintf("\nError: image dimensions of \"%s\" must be %dx%d.",
|
||||
initprintf("Error: image dimensions of \"%s\" must be %dx%d.\n",
|
||||
fn, PR_HIGHPALOOKUP_DIM*PR_HIGHPALOOKUP_DIM, PR_HIGHPALOOKUP_DIM);
|
||||
Bfree(filebuf); Bfree(highpaldata);
|
||||
break;
|
||||
|
@ -1582,7 +1582,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
i = kprender(filebuf, filesize, (intptr_t)highpaldata, xsiz*sizeof(coltype), xsiz, ysiz, 0, 0);
|
||||
Bfree(filebuf);
|
||||
if (i)
|
||||
{ Bfree(highpaldata); initprintf("\nError: failed rendering \"%s\".", fn); break; }
|
||||
{ Bfree(highpaldata); initprintf("Error: failed rendering \"%s\".\n", fn); break; }
|
||||
}
|
||||
|
||||
polymer_definehighpalookup(basepal, pal, highpaldata);
|
||||
|
@ -1626,7 +1626,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if (pal < 0)
|
||||
{
|
||||
initprintf("\nError: tint: missing 'palette number' near line %s:%d",
|
||||
initprintf("Error: tint: missing 'palette number' near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,tinttokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -1696,24 +1696,24 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
if ((havepal&1)==0)
|
||||
{
|
||||
initprintf("\nError: missing 'palette number' %s", msgend);
|
||||
initprintf("Error: missing 'palette number' %s\n", msgend);
|
||||
break;
|
||||
}
|
||||
else if (pal==0 || (unsigned)pal >= MAXPALOOKUPS-RESERVEDPALS)
|
||||
{
|
||||
initprintf("\nError: 'palette number' out of range (1 .. %d) %s",
|
||||
initprintf("Error: 'palette number' out of range (1 .. %d) %s\n",
|
||||
MAXPALOOKUPS-RESERVEDPALS-1, msgend);
|
||||
break;
|
||||
}
|
||||
else if (havepal&8)
|
||||
{
|
||||
// will also disallow multiple remappals or remapselfs
|
||||
initprintf("\nError: must have exactly one of either 'remappal' or 'remapself' %s", msgend);
|
||||
initprintf("Error: must have exactly one of either 'remappal' or 'remapself' %s\n", msgend);
|
||||
break;
|
||||
}
|
||||
else if ((havepal&4) && (unsigned)remappal >= MAXPALOOKUPS-RESERVEDPALS)
|
||||
{
|
||||
initprintf("\nError: 'remap palette number' out of range (max=%d) %s",
|
||||
initprintf("Error: 'remap palette number' out of range (max=%d) %s\n",
|
||||
MAXPALOOKUPS-RESERVEDPALS-1, msgend);
|
||||
break;
|
||||
}
|
||||
|
@ -1802,13 +1802,13 @@ static int32_t defsparser(scriptfile *script)
|
|||
if ((unsigned)tile >= MAXTILES) break; // message is printed later
|
||||
if ((unsigned)pal >= MAXPALOOKUPS - RESERVEDPALS)
|
||||
{
|
||||
initprintf("\nError: missing or invalid 'palette number' for texture definition near "
|
||||
"line %s:%d", script->filename, scriptfile_getlinum(script,paltokptr));
|
||||
initprintf("Error: missing or invalid 'palette number' for texture definition near "
|
||||
"line %s:%d\n", script->filename, scriptfile_getlinum(script,paltokptr));
|
||||
break;
|
||||
}
|
||||
if (!fn)
|
||||
{
|
||||
initprintf("\nError: missing 'file name' for texture definition near line %s:%d",
|
||||
initprintf("Error: missing 'file name' for texture definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,paltokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -1875,7 +1875,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
if ((unsigned)tile >= MAXTILES) break; // message is printed later
|
||||
if (!fn)
|
||||
{
|
||||
initprintf("\nError: missing 'file name' for texture definition near line %s:%d",
|
||||
initprintf("Error: missing 'file name' for texture definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,detailtokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -1911,7 +1911,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
if ((unsigned)tile >= MAXTILES)
|
||||
{
|
||||
initprintf("\nError: missing or invalid 'tile number' for texture definition near line %s:%d",
|
||||
initprintf("Error: missing or invalid 'tile number' for texture definition near line %s:%d\n",
|
||||
script->filename, scriptfile_getlinum(script,texturetokptr));
|
||||
break;
|
||||
}
|
||||
|
@ -1958,7 +1958,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
break;
|
||||
|
||||
// XXX: See comment of md_undefinemodel()
|
||||
initprintf("\nWarning: undefmodelof: currently non-functional.");
|
||||
initprintf("Warning: undefmodelof: currently non-functional.\n");
|
||||
break;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
|
@ -2107,12 +2107,12 @@ static int32_t defsparser(scriptfile *script)
|
|||
{
|
||||
char *string = NULL;
|
||||
scriptfile_getstring(script,&string);
|
||||
initprintf("\n%s",string);
|
||||
initprintf("%s\n",string);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
initprintf("\nUnknown token."); break;
|
||||
initprintf("Unknown token.\n"); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2131,19 +2131,14 @@ int32_t loaddefinitionsfile(const char *fn)
|
|||
if (script)
|
||||
{
|
||||
flushlogwindow = 1;
|
||||
initprintf("Loading \"%s\"",fn);
|
||||
initprintf("Loading \"%s\"\n",fn);
|
||||
flushlogwindow = 0;
|
||||
|
||||
defsparser(script);
|
||||
|
||||
initprintf("\n");
|
||||
}
|
||||
|
||||
for (i=0; i < g_defModulesNum; ++i)
|
||||
{
|
||||
defsparser_include(g_defModules[i], NULL, NULL);
|
||||
initprintf("\n");
|
||||
}
|
||||
|
||||
flushlogwindow = f;
|
||||
|
||||
|
@ -2154,6 +2149,8 @@ int32_t loaddefinitionsfile(const char *fn)
|
|||
|
||||
if (!script) return -1;
|
||||
|
||||
initprintf("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue