if (num >= cl_max_entities)
{
if (!cl_entities)
- Sys_Error("CL_ExpandEntities: cl_entities not initialized\n");
+ Sys_Error("CL_ExpandEntities: cl_entities not initialized");
if (num >= MAX_EDICTS)
- Host_Error("CL_ExpandEntities: num %i >= %i\n", num, MAX_EDICTS);
+ Host_Error("CL_ExpandEntities: num %i >= %i", num, MAX_EDICTS);
oldmaxentities = cl_max_entities;
oldentities = cl_entities;
cl_max_entities = (num & ~255) + 256;
protocol = Protocol_EnumForNumber(i);
if (protocol == PROTOCOL_UNKNOWN)
{
- Host_Error("CL_ParseServerInfo: Server is unrecognized protocol number (%i)\n", i);
+ Host_Error("CL_ParseServerInfo: Server is unrecognized protocol number (%i)", i);
return;
}
// hack for unmarked Nehahra movie demos which had a custom protocol
cl.maxclients = MSG_ReadByte ();
if (cl.maxclients < 1 || cl.maxclients > MAX_SCOREBOARD)
{
- Host_Error("Bad maxclients (%u) from server\n", cl.maxclients);
+ Host_Error("Bad maxclients (%u) from server", cl.maxclients);
return;
}
cl.scores = (scoreboard_t *)Mem_Alloc(cl_mempool, cl.maxclients*sizeof(*cl.scores));
if (!str[0])
break;
if (nummodels==MAX_MODELS)
- Host_Error ("Server sent too many model precaches\n");
+ Host_Error ("Server sent too many model precaches");
if (strlen(str) >= MAX_QPATH)
Host_Error ("Server sent a precache name of %i characters (max %i)", strlen(str), MAX_QPATH - 1);
strlcpy (parse_model_precache[nummodels], str, sizeof (parse_model_precache[nummodels]));
if (!str[0])
break;
if (numsounds==MAX_SOUNDS)
- Host_Error("Server sent too many sound precaches\n");
+ Host_Error("Server sent too many sound precaches");
if (strlen(str) >= MAX_QPATH)
Host_Error("Server sent a precache name of %i characters (max %i)", strlen(str), MAX_QPATH - 1);
strlcpy (parse_sound_precache[numsounds], str, sizeof (parse_sound_precache[numsounds]));
return;
if (s->modelindex >= MAX_MODELS)
- Host_Error("CL_ValidateState: modelindex (%i) >= MAX_MODELS (%i)\n", s->modelindex, MAX_MODELS);
+ Host_Error("CL_ValidateState: modelindex (%i) >= MAX_MODELS (%i)", s->modelindex, MAX_MODELS);
// colormap is client index + 1
if ((!s->flags & RENDER_COLORMAPPED) && s->colormap > cl.maxclients)
}
description[strlen(description)-1] = '\n'; // replace the last space with a newline
Con_Print(description);
- Host_Error ("CL_ParseServerMessage: Illegible server message\n");
+ Host_Error ("CL_ParseServerMessage: Illegible server message");
}
break;
i = MSG_ReadLong ();
protocol = Protocol_EnumForNumber(i);
if (protocol == PROTOCOL_UNKNOWN)
- Host_Error("CL_ParseServerMessage: Server is unrecognized protocol number (%i)\n", i);
+ Host_Error("CL_ParseServerMessage: Server is unrecognized protocol number (%i)", i);
// hack for unmarked Nehahra movie demos which had a custom protocol
if (protocol == PROTOCOL_QUAKEDP && cls.demoplayback && demo_nehahra.integer)
protocol = PROTOCOL_NEHAHRAMOVIE;
case svc_setview:
cl.viewentity = (unsigned short)MSG_ReadShort ();
if (cl.viewentity >= MAX_EDICTS)
- Host_Error("svc_setview >= MAX_EDICTS\n");
+ Host_Error("svc_setview >= MAX_EDICTS");
if (cl.viewentity >= cl_max_entities)
CL_ExpandEntities(cl.viewentity);
// LordHavoc: assume first setview recieved is the real player entity
break;
#endif
default:
- Sys_Error("CL_RocketTrail: unknown trail type %i\n", type);
+ Sys_Error("CL_RocketTrail: unknown trail type %i", type);
}
// advance to next time and position
brush->numplanes = numpoints + 2;
brush->planes = (colplanef_t *)(brush + 1);
brush->points = (colpointf_t *)points;
- Sys_Error("Collision_AllocBrushFromPermanentPolygonFloat: FIXME: this code needs to be updated to generate a mesh...\n");
+ Sys_Error("Collision_AllocBrushFromPermanentPolygonFloat: FIXME: this code needs to be updated to generate a mesh...");
return brush;
}
if (buf->cursize + length > buf->maxsize)
{
if (!buf->allowoverflow)
- Host_Error ("SZ_GetSpace: overflow without allowoverflow set\n");
+ Host_Error ("SZ_GetSpace: overflow without allowoverflow set");
if (length > buf->maxsize)
- Host_Error ("SZ_GetSpace: %i is > full buffer size\n", length);
+ Host_Error ("SZ_GetSpace: %i is > full buffer size", length);
buf->overflowed = true;
Con_Print("SZ_GetSpace: overflow\n");
}
#endif
-#define BACKENDACTIVECHECK if (!backendactive) Sys_Error("GL backend function called when backend is not active\n");
+#define BACKENDACTIVECHECK if (!backendactive) Sys_Error("GL backend function called when backend is not active");
void SCR_ScreenShot_f (void);
static textypeinfo_t *R_GetTexTypeInfo(int textype, int flags)
{
+ if ((flags & (TEXF_PICMIP | TEXF_FRAGMENT)) == (TEXF_PICMIP | TEXF_FRAGMENT))
+ {
+ Host_Error("R_GetTexTypeInfo: TEXF_PICMIP can not be used with TEXF_FRAGMENT");
+ return NULL;
+ }
if (flags & TEXF_ALPHA)
{
switch(textype)
case TEXTYPE_PALETTE:
return &textype_palette_alpha;
case TEXTYPE_RGB:
- Host_Error("R_GetTexTypeInfo: RGB format has no alpha, TEXF_ALPHA not allowed\n");
+ Host_Error("R_GetTexTypeInfo: RGB format has no alpha, TEXF_ALPHA not allowed");
return NULL;
case TEXTYPE_RGBA:
return &textype_rgba_alpha;
default:
- Host_Error("R_GetTexTypeInfo: unknown texture format\n");
+ Host_Error("R_GetTexTypeInfo: unknown texture format");
return NULL;
}
}
case TEXTYPE_DSDT:
return &textype_dsdt;
default:
- Host_Error("R_GetTexTypeInfo: unknown texture format\n");
+ Host_Error("R_GetTexTypeInfo: unknown texture format");
return NULL;
}
}
glt = (gltexture_t *)rt;
if (glt == NULL)
- Host_Error("R_FreeTexture: texture == NULL\n");
+ Host_Error("R_FreeTexture: texture == NULL");
for (gltpointer = &glt->pool->gltchain;*gltpointer && *gltpointer != glt;gltpointer = &(*gltpointer)->chain);
if (*gltpointer == glt)
*gltpointer = glt->chain;
else
- Host_Error("R_FreeTexture: texture \"%s\" not linked in pool\n", glt->identifier);
+ Host_Error("R_FreeTexture: texture \"%s\" not linked in pool", glt->identifier);
// note: if freeing a fragment texture, this will not make the claimed
// space available for new textures unless all other fragments in the
if (*gltimagepointer == image)
*gltimagepointer = image->imagechain;
else
- Host_Error("R_FreeTexture: image not linked in pool\n");
+ Host_Error("R_FreeTexture: image not linked in pool");
if (image->texnum)
qglDeleteTextures(1, (GLuint *)&image->texnum);
if (image->blockallocation)
pool = (gltexturepool_t *)(*rtexturepool);
*rtexturepool = NULL;
if (pool->sentinel != TEXTUREPOOL_SENTINEL)
- Host_Error("R_FreeTexturePool: pool already freed\n");
+ Host_Error("R_FreeTexturePool: pool already freed");
for (poolpointer = &gltexturepoolchain;*poolpointer && *poolpointer != pool;poolpointer = &(*poolpointer)->next);
if (*poolpointer == pool)
*poolpointer = pool->next;
else
- Host_Error("R_FreeTexturePool: pool not linked\n");
+ Host_Error("R_FreeTexturePool: pool not linked");
while (pool->gltchain)
R_FreeTexture((rtexture_t *)pool->gltchain);
if (pool->imagechain)
resizebuffer = (unsigned char *)Mem_Alloc(texturemempool, resizebuffersize);
colorconvertbuffer = (unsigned char *)Mem_Alloc(texturemempool, resizebuffersize);
if (!resizebuffer || !colorconvertbuffer)
- Host_Error("R_Upload: out of memory\n");
+ Host_Error("R_Upload: out of memory");
}
}
CHECKGLERROR
break;
default:
- Host_Error("R_Upload: fragment texture of type other than 1D, 2D, or 3D\n");
+ Host_Error("R_Upload: fragment texture of type other than 1D, 2D, or 3D");
break;
}
GL_SetupTextureParameters(glt->image->flags, glt->image->texturetype);
CHECKGLERROR
break;
default:
- Host_Error("R_Upload: fragment texture of type other than 1D, 2D, or 3D\n");
+ Host_Error("R_Upload: fragment texture of type other than 1D, 2D, or 3D");
break;
}
}
break;
case TEXTYPE_RGB:
if (flags & TEXF_ALPHA)
- Host_Error("R_LoadTexture: RGB has no alpha, don't specify TEXF_ALPHA\n");
+ Host_Error("R_LoadTexture: RGB has no alpha, don't specify TEXF_ALPHA");
break;
case TEXTYPE_RGBA:
if (flags & TEXF_ALPHA)
case TEXTYPE_DSDT:
break;
default:
- Host_Error("R_LoadTexture: unknown texture type\n");
+ Host_Error("R_LoadTexture: unknown texture type");
}
glt = (gltexture_t *)Mem_Alloc(texturemempool, sizeof(gltexture_t));
return;
}
if (!rt)
- Host_Error("R_FragmentLocation: no texture supplied\n");
+ Host_Error("R_FragmentLocation: no texture supplied");
glt = (gltexture_t *)rt;
if (glt->flags & TEXF_FRAGMENT)
{
{
gltexture_t *glt;
if (rt == NULL)
- Host_Error("R_UpdateTexture: no texture supplied\n");
+ Host_Error("R_UpdateTexture: no texture supplied");
if (data == NULL)
- Host_Error("R_UpdateTexture: no data supplied\n");
+ Host_Error("R_UpdateTexture: no data supplied");
glt = (gltexture_t *)rt;
// if it has not been uploaded yet, update the data that will be used when it is
Host_ShutdownServer (false);
if (cls.state == ca_dedicated)
- Sys_Error ("Host_Error: %s\n",hosterrorstring2); // dedicated servers exit
+ Sys_Error ("Host_Error: %s",hosterrorstring2); // dedicated servers exit
CL_Disconnect ();
cls.demonum = -1;
if (entnum >= MAX_EDICTS)
{
Mem_Free(text);
- Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)\n", MAX_EDICTS);
+ Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)", MAX_EDICTS);
}
while (entnum >= prog->max_edicts)
//SV_IncreaseEdicts();
const float *vertsbase, *verts1, *verts2, *verts3, *verts4;
// vertex morph
if (!mesh->data_morphvertex3f)
- Host_Error("model %s has no skeletal or vertex morph animation data\n", model->name);
+ Host_Error("model %s has no skeletal or vertex morph animation data", model->name);
vertsbase = mesh->data_morphvertex3f;
vertcount = mesh->num_vertices;
verts1 = vertsbase + frameblend[0].frame * vertcount * 3;
}
}
-#define BOUNDI(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%d exceeds %d - %d)\n", loadmodel->name, VALUE, MIN, MAX);
-#define BOUNDF(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%f exceeds %f - %f)\n", loadmodel->name, VALUE, MIN, MAX);
+#define BOUNDI(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%d exceeds %d - %d)", loadmodel->name, VALUE, MIN, MAX);
+#define BOUNDF(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%f exceeds %f - %f)", loadmodel->name, VALUE, MIN, MAX);
void Mod_IDP0_Load(model_t *mod, void *buffer, void *bufferend)
{
int i, j, version, totalskins, skinwidth, skinheight, groupframes, groupskins, numverts;
pinmodel = (md3modelheader_t *)buffer;
if (memcmp(pinmodel->identifier, "IDP3", 4))
- Host_Error ("%s is not a MD3 (IDP3) file\n", loadmodel->name);
+ Host_Error ("%s is not a MD3 (IDP3) file", loadmodel->name);
version = LittleLong (pinmodel->version);
if (version != MD3VERSION)
Host_Error ("%s has wrong version number (%i should be %i)",
for (i = 0, pinmesh = (md3mesh_t *)((unsigned char *)pinmodel + LittleLong(pinmodel->lump_meshes));i < loadmodel->num_surfaces;i++, pinmesh = (md3mesh_t *)((unsigned char *)pinmesh + LittleLong(pinmesh->lump_end)))
{
if (memcmp(pinmesh->identifier, "IDP3", 4))
- Host_Error("Mod_IDP3_Load: invalid mesh identifier (not IDP3)\n");
+ Host_Error("Mod_IDP3_Load: invalid mesh identifier (not IDP3)");
mesh = loadmodel->meshlist[i];
mesh->num_morphframes = LittleLong(pinmesh->num_frames);
mesh->num_vertices = LittleLong(pinmesh->num_vertices);
pinmodel = (zymtype1header_t *)buffer;
pbase = (unsigned char *)buffer;
if (memcmp(pinmodel->id, "ZYMOTICMODEL", 12))
- Host_Error ("Mod_ZYMOTICMODEL_Load: %s is not a zymotic model\n");
+ Host_Error ("Mod_ZYMOTICMODEL_Load: %s is not a zymotic model");
if (BigLong(pinmodel->type) != 1)
- Host_Error ("Mod_ZYMOTICMODEL_Load: only type 1 (skeletal pose) models are currently supported (name = %s)\n", loadmodel->name);
+ Host_Error ("Mod_ZYMOTICMODEL_Load: only type 1 (skeletal pose) models are currently supported (name = %s)", loadmodel->name);
loadmodel->type = mod_alias;
loadmodel->DrawSky = NULL;
loadmodel->animscenes[i].framerate = BigFloat(scene->framerate);
loadmodel->animscenes[i].loop = (BigLong(scene->flags) & ZYMSCENEFLAG_NOLOOP) == 0;
if ((unsigned int) loadmodel->animscenes[i].firstframe >= (unsigned int) numposes)
- Host_Error("%s scene->firstframe (%i) >= numposes (%i)\n", loadmodel->name, loadmodel->animscenes[i].firstframe, numposes);
+ Host_Error("%s scene->firstframe (%i) >= numposes (%i)", loadmodel->name, loadmodel->animscenes[i].firstframe, numposes);
if ((unsigned int) loadmodel->animscenes[i].firstframe + (unsigned int) loadmodel->animscenes[i].framecount > (unsigned int) numposes)
- Host_Error("%s scene->firstframe (%i) + framecount (%i) >= numposes (%i)\n", loadmodel->name, loadmodel->animscenes[i].firstframe, loadmodel->animscenes[i].framecount, numposes);
+ Host_Error("%s scene->firstframe (%i) + framecount (%i) >= numposes (%i)", loadmodel->name, loadmodel->animscenes[i].firstframe, loadmodel->animscenes[i].framecount, numposes);
if (loadmodel->animscenes[i].framerate < 0)
- Host_Error("%s scene->framerate (%f) < 0\n", loadmodel->name, loadmodel->animscenes[i].framerate);
+ Host_Error("%s scene->framerate (%f) < 0", loadmodel->name, loadmodel->animscenes[i].framerate);
scene++;
}
loadmodel->data_bones[i].flags = BigLong(bone[i].flags);
loadmodel->data_bones[i].parent = BigLong(bone[i].parent);
if (loadmodel->data_bones[i].parent >= i)
- Host_Error("%s bone[%i].parent >= %i\n", loadmodel->name, i, i);
+ Host_Error("%s bone[%i].parent >= %i", loadmodel->name, i, i);
}
//zymlump_t lump_vertbonecounts; // int vertbonecounts[numvertices]; // how many bones influence each vertex (separate mainly to make this compress better)
{
vertbonecounts[i] = BigLong(bonecount[i]);
if (vertbonecounts[i] < 1)
- Host_Error("%s bonecount[%i] < 1\n", loadmodel->name, i);
+ Host_Error("%s bonecount[%i] < 1", loadmodel->name, i);
}
//zymlump_t lump_verts; // zymvertex_t vert[numvertices]; // see vertex struct
// byteswap, validate, and swap winding order of tris
count = pheader->numshaders * sizeof(int) + pheader->numtris * sizeof(int[3]);
if (pheader->lump_render.length != count)
- Host_Error("%s renderlist is wrong size (%i bytes, should be %i bytes)\n", loadmodel->name, pheader->lump_render.length, count);
+ Host_Error("%s renderlist is wrong size (%i bytes, should be %i bytes)", loadmodel->name, pheader->lump_render.length, count);
renderlist = (int *) (pheader->lump_render.start + pbase);
renderlistend = (int *) ((unsigned char *) renderlist + pheader->lump_render.length);
for (i = 0;i < loadmodel->num_surfaces;i++)
{
if (renderlist >= renderlistend)
- Host_Error("%s corrupt renderlist (wrong size)\n", loadmodel->name);
+ Host_Error("%s corrupt renderlist (wrong size)", loadmodel->name);
count = BigLong(*renderlist);renderlist++;
if (renderlist + count * 3 > renderlistend || (i == pheader->numshaders - 1 && renderlist + count * 3 != renderlistend))
- Host_Error("%s corrupt renderlist (wrong size)\n", loadmodel->name);
+ Host_Error("%s corrupt renderlist (wrong size)", loadmodel->name);
mesh = loadmodel->meshlist[i];
mesh->num_triangles = count;
mesh->data_element3i = (int *)Mem_Alloc(loadmodel->mempool, mesh->num_triangles * sizeof(int[3]));
if ((unsigned int)outelements[0] >= (unsigned int)pheader->numverts
|| (unsigned int)outelements[1] >= (unsigned int)pheader->numverts
|| (unsigned int)outelements[2] >= (unsigned int)pheader->numverts)
- Host_Error("%s corrupt renderlist (out of bounds index)\n", loadmodel->name);
+ Host_Error("%s corrupt renderlist (out of bounds index)", loadmodel->name);
if (vertbonecounts[outelements[0]] == 0 || vertbonecounts[outelements[1]] == 0 || vertbonecounts[outelements[2]] == 0)
- Host_Error("%s corrupt renderlist (references vertex with no bone weights\n", loadmodel->name);
+ Host_Error("%s corrupt renderlist (references vertex with no bone weights", loadmodel->name);
renderlist += 3;
outelements += 3;
}
pheader = (dpmheader_t *)buffer;
pbase = (unsigned char *)buffer;
if (memcmp(pheader->id, "DARKPLACESMODEL\0", 16))
- Host_Error ("Mod_DARKPLACESMODEL_Load: %s is not a darkplaces model\n");
+ Host_Error ("Mod_DARKPLACESMODEL_Load: %s is not a darkplaces model");
if (BigLong(pheader->type) != 2)
- Host_Error ("Mod_DARKPLACESMODEL_Load: only type 2 (hierarchical skeletal pose) models are currently supported (name = %s)\n", loadmodel->name);
+ Host_Error ("Mod_DARKPLACESMODEL_Load: only type 2 (hierarchical skeletal pose) models are currently supported (name = %s)", loadmodel->name);
loadmodel->type = mod_alias;
loadmodel->DrawSky = NULL;
loadmodel->data_bones[i].flags = BigLong(bone[i].flags);
loadmodel->data_bones[i].parent = BigLong(bone[i].parent);
if (loadmodel->data_bones[i].parent >= i)
- Host_Error("%s bone[%i].parent >= %i\n", loadmodel->name, i, i);
+ Host_Error("%s bone[%i].parent >= %i", loadmodel->name, i, i);
}
// load the frames
pchunk = (pskchunk_t *)buffer;
if (strcmp(pchunk->id, "ACTRHEAD"))
- Host_Error ("Mod_PSKMODEL_Load: %s is not a ActorX model\n");
+ Host_Error ("Mod_PSKMODEL_Load: %s is not an Unreal Engine ActorX (.psk + .psa) model");
loadmodel->type = mod_alias;
loadmodel->DrawSky = NULL;
animbuffer = animfilebuffer = FS_LoadFile(animname, loadmodel->mempool, false, &filesize);
animbufferend = (void *)((unsigned char*)animbuffer + (int)filesize);
if (animbuffer == NULL)
- Host_Error("%s: can't find .psa file (%s)\n", loadmodel->name, animname);
+ Host_Error("%s: can't find .psa file (%s)", loadmodel->name, animname);
numpnts = 0;
pnts = NULL;
{
pskpnts_t *p;
if (recordsize != sizeof(*p))
- Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id);
+ Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id);
// byteswap in place and keep the pointer
numpnts = numrecords;
pnts = (pskpnts_t *)buffer;
{
pskvtxw_t *p;
if (recordsize != sizeof(*p))
- Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id);
+ Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id);
// byteswap in place and keep the pointer
numvtxw = numrecords;
vtxw = (pskvtxw_t *)buffer;
{
pskface_t *p;
if (recordsize != sizeof(*p))
- Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id);
+ Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id);
// byteswap in place and keep the pointer
numfaces = numrecords;
faces = (pskface_t *)buffer;
{
pskmatt_t *p;
if (recordsize != sizeof(*p))
- Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id);
+ Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id);
// byteswap in place and keep the pointer
nummatts = numrecords;
matts = (pskmatt_t *)buffer;
{
pskboneinfo_t *p;
if (recordsize != sizeof(*p))
- Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id);
+ Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id);
// byteswap in place and keep the pointer
numbones = numrecords;
bones = (pskboneinfo_t *)buffer;
{
pskrawweights_t *p;
if (recordsize != sizeof(*p))
- Host_Error("%s: %s has unsupported recordsize\n", loadmodel->name, pchunk->id);
+ Host_Error("%s: %s has unsupported recordsize", loadmodel->name, pchunk->id);
// byteswap in place and keep the pointer
numrawweights = numrecords;
rawweights = (pskrawweights_t *)buffer;
{
pskboneinfo_t *p;
if (recordsize != sizeof(*p))
- Host_Error("%s: %s has unsupported recordsize\n", animname, pchunk->id);
+ Host_Error("%s: %s has unsupported recordsize", animname, pchunk->id);
// byteswap in place and keep the pointer
numanimbones = numrecords;
animbones = (pskboneinfo_t *)animbuffer;
// positions from the psk, but this is hard for me to implement
// and people can easily make animations that match.
if (numanimbones != numbones)
- Host_Error("%s: this loader only supports animations with the same bones as the mesh\n");
+ Host_Error("%s: this loader only supports animations with the same bones as the mesh");
for (index = 0, p = (pskboneinfo_t *)animbuffer;index < numrecords;index++, p++)
{
p->numchildren = LittleLong(p->numchildren);
}
// check that bones are the same as in the base
if (strcmp(p->name, bones[index].name) || p->parent != bones[index].parent)
- Host_Error("%s: this loader only supports animations with the same bones as the mesh\n", animname);
+ Host_Error("%s: this loader only supports animations with the same bones as the mesh", animname);
}
animbuffer = p;
}
{
pskaniminfo_t *p;
if (recordsize != sizeof(*p))
- Host_Error("%s: %s has unsupported recordsize\n", animname, pchunk->id);
+ Host_Error("%s: %s has unsupported recordsize", animname, pchunk->id);
// byteswap in place and keep the pointer
numanims = numrecords;
anims = (pskaniminfo_t *)animbuffer;
{
pskanimkeys_t *p;
if (recordsize != sizeof(*p))
- Host_Error("%s: %s has unsupported recordsize\n", animname, pchunk->id);
+ Host_Error("%s: %s has unsupported recordsize", animname, pchunk->id);
numanimkeys = numrecords;
animkeys = (pskanimkeys_t *)animbuffer;
for (index = 0, p = (pskanimkeys_t *)animbuffer;index < numrecords;index++, p++)
}
if (!numpnts || !pnts || !numvtxw || !vtxw || !numfaces || !faces || !nummatts || !matts || !numbones || !bones || !numrawweights || !rawweights || !numanims || !anims || !numanimkeys || !animkeys)
- Host_Error("%s: missing required chunks\n", loadmodel->name);
+ Host_Error("%s: missing required chunks", loadmodel->name);
// FIXME: model bbox
// model bbox
loadmodel->num_textures = loadmodel->nummeshes = loadmodel->nummodelsurfaces = loadmodel->num_surfaces = nummatts;
if (numanimkeys != loadmodel->num_bones * loadmodel->numframes)
- Host_Error("%s: %s has incorrect number of animation keys\n", animname, pchunk->id);
+ Host_Error("%s: %s has incorrect number of animation keys", animname, pchunk->id);
loadmodel->data_poses = (float *)Mem_Alloc(loadmodel->mempool, loadmodel->num_poses * sizeof(float[12]));
loadmodel->animscenes = (animscene_t *)Mem_Alloc(loadmodel->mempool, loadmodel->numframes * sizeof(animscene_t));
strlcpy(loadmodel->data_bones[index].name, bones[index].name, sizeof(loadmodel->data_bones[index].name));
loadmodel->data_bones[index].parent = (index || bones[index].parent > 0) ? bones[index].parent : -1;
if (loadmodel->data_bones[index].parent >= index)
- Host_Error("%s bone[%i].parent >= %i\n", loadmodel->name, index, index);
+ Host_Error("%s bone[%i].parent >= %i", loadmodel->name, index, index);
}
// build bone-relative vertex weights from the psk point weights
subdivpolyverts = 0;
SubdividePolygon(surface->num_vertices, (surface->groupmesh->data_vertex3f + 3 * surface->num_firstvertex));
if (subdivpolytriangles < 1)
- Host_Error("Mod_Q1BSP_GenerateWarpMesh: no triangles?\n");
+ Host_Error("Mod_Q1BSP_GenerateWarpMesh: no triangles?");
surface->mesh = mesh = Mem_Alloc(loadmodel->mempool, sizeof(surfmesh_t) + subdivpolytriangles * sizeof(int[3]) + subdivpolyverts * sizeof(surfvertex_t));
mesh->num_vertices = subdivpolyverts;
firstedge = LittleLong(in->firstedge);
numedges = LittleShort(in->numedges);
if ((unsigned int) firstedge > (unsigned int) loadmodel->brushq1.numsurfedges || (unsigned int) numedges > (unsigned int) loadmodel->brushq1.numsurfedges || (unsigned int) firstedge + (unsigned int) numedges > (unsigned int) loadmodel->brushq1.numsurfedges)
- Host_Error("Mod_Q1BSP_LoadFaces: invalid edge range (firstedge %i, numedges %i, model edges %i)\n", firstedge, numedges, loadmodel->brushq1.numsurfedges);
+ Host_Error("Mod_Q1BSP_LoadFaces: invalid edge range (firstedge %i, numedges %i, model edges %i)", firstedge, numedges, loadmodel->brushq1.numsurfedges);
i = LittleShort(in->texinfo);
if ((unsigned int) i >= (unsigned int) loadmodel->brushq1.numtexinfo)
- Host_Error("Mod_Q1BSP_LoadFaces: invalid texinfo index %i(model has %i texinfos)\n", i, loadmodel->brushq1.numtexinfo);
+ Host_Error("Mod_Q1BSP_LoadFaces: invalid texinfo index %i(model has %i texinfos)", i, loadmodel->brushq1.numtexinfo);
surface->lightmapinfo->texinfo = loadmodel->brushq1.texinfo + i;
surface->texture = surface->lightmapinfo->texinfo->texture;
planenum = LittleShort(in->planenum);
if ((unsigned int) planenum >= (unsigned int) loadmodel->brush.num_planes)
- Host_Error("Mod_Q1BSP_LoadFaces: invalid plane index %i (model has %i planes)\n", planenum, loadmodel->brush.num_planes);
+ Host_Error("Mod_Q1BSP_LoadFaces: invalid plane index %i (model has %i planes)", planenum, loadmodel->brush.num_planes);
//surface->flags = surface->texture->flags;
//if (LittleShort(in->side))
static void Mod_Q1BSP_LoadNodes_RecursiveSetParent(mnode_t *node, mnode_t *parent)
{
//if (node->parent)
- // Host_Error("Mod_Q1BSP_LoadNodes_RecursiveSetParent: runaway recursion\n");
+ // Host_Error("Mod_Q1BSP_LoadNodes_RecursiveSetParent: runaway recursion");
node->parent = parent;
if (node->plane)
{
out->children[0] = LittleShort(in->children[0]);
out->children[1] = LittleShort(in->children[1]);
if (out->children[0] >= count || out->children[1] >= count)
- Host_Error("Corrupt clipping hull(out of range child)\n");
+ Host_Error("Corrupt clipping hull(out of range child)");
}
}
int i;
q2dheader_t *header;
- Host_Error("Mod_Q2BSP_Load: not yet implemented\n");
+ Host_Error("Mod_Q2BSP_Load: not yet implemented");
mod->type = mod_brushq2;
{
n = LittleLong(in->planeindex);
if (n < 0 || n >= loadmodel->brush.num_planes)
- Host_Error("Mod_Q3BSP_LoadBrushSides: invalid planeindex %i (%i planes)\n", n, loadmodel->brush.num_planes);
+ Host_Error("Mod_Q3BSP_LoadBrushSides: invalid planeindex %i (%i planes)", n, loadmodel->brush.num_planes);
out->plane = loadmodel->brush.data_planes + n;
n = LittleLong(in->textureindex);
if (n < 0 || n >= loadmodel->num_textures)
- Host_Error("Mod_Q3BSP_LoadBrushSides: invalid textureindex %i (%i textures)\n", n, loadmodel->num_textures);
+ Host_Error("Mod_Q3BSP_LoadBrushSides: invalid textureindex %i (%i textures)", n, loadmodel->num_textures);
out->texture = loadmodel->data_textures + n;
}
}
n = LittleLong(in->firstbrushside);
c = LittleLong(in->numbrushsides);
if (n < 0 || n + c > loadmodel->brush.num_brushsides)
- Host_Error("Mod_Q3BSP_LoadBrushes: invalid brushside range %i : %i (%i brushsides)\n", n, n + c, loadmodel->brush.num_brushsides);
+ Host_Error("Mod_Q3BSP_LoadBrushes: invalid brushside range %i : %i (%i brushsides)", n, n + c, loadmodel->brush.num_brushsides);
out->firstbrushside = loadmodel->brush.data_brushsides + n;
out->numbrushsides = c;
n = LittleLong(in->textureindex);
if (n < 0 || n >= loadmodel->num_textures)
- Host_Error("Mod_Q3BSP_LoadBrushes: invalid textureindex %i (%i textures)\n", n, loadmodel->num_textures);
+ Host_Error("Mod_Q3BSP_LoadBrushes: invalid textureindex %i (%i textures)", n, loadmodel->num_textures);
out->texture = loadmodel->data_textures + n;
// make a list of mplane_t structs to construct a colbrush from
n = LittleLong(in->firstface);
c = LittleLong(in->numfaces);
if (n < 0 || n + c > loadmodel->num_surfaces)
- Host_Error("Mod_Q3BSP_LoadModels: invalid face range %i : %i (%i faces)\n", n, n + c, loadmodel->num_surfaces);
+ Host_Error("Mod_Q3BSP_LoadModels: invalid face range %i : %i (%i faces)", n, n + c, loadmodel->num_surfaces);
out->firstface = n;
out->numfaces = c;
n = LittleLong(in->firstbrush);
c = LittleLong(in->numbrushes);
if (n < 0 || n + c > loadmodel->brush.num_brushes)
- Host_Error("Mod_Q3BSP_LoadModels: invalid brush range %i : %i (%i brushes)\n", n, n + c, loadmodel->brush.num_brushes);
+ Host_Error("Mod_Q3BSP_LoadModels: invalid brush range %i : %i (%i brushes)", n, n + c, loadmodel->brush.num_brushes);
out->firstbrush = n;
out->numbrushes = c;
}
{
n = LittleLong(*in);
if (n < 0 || n >= loadmodel->brush.num_brushes)
- Host_Error("Mod_Q3BSP_LoadLeafBrushes: invalid brush index %i (%i brushes)\n", n, loadmodel->brush.num_brushes);
+ Host_Error("Mod_Q3BSP_LoadLeafBrushes: invalid brush index %i (%i brushes)", n, loadmodel->brush.num_brushes);
*out = n;
}
}
{
n = LittleLong(*in);
if (n < 0 || n >= loadmodel->num_surfaces)
- Host_Error("Mod_Q3BSP_LoadLeafFaces: invalid face index %i (%i faces)\n", n, loadmodel->num_surfaces);
+ Host_Error("Mod_Q3BSP_LoadLeafFaces: invalid face index %i (%i faces)", n, loadmodel->num_surfaces);
*out = n;
}
}
n = LittleLong(in->firstleafface);
c = LittleLong(in->numleaffaces);
if (n < 0 || n + c > loadmodel->brush.num_leafsurfaces)
- Host_Error("Mod_Q3BSP_LoadLeafs: invalid leafsurface range %i : %i (%i leafsurfaces)\n", n, n + c, loadmodel->brush.num_leafsurfaces);
+ Host_Error("Mod_Q3BSP_LoadLeafs: invalid leafsurface range %i : %i (%i leafsurfaces)", n, n + c, loadmodel->brush.num_leafsurfaces);
out->firstleafsurface = loadmodel->brush.data_leafsurfaces + n;
out->numleafsurfaces = c;
n = LittleLong(in->firstleafbrush);
c = LittleLong(in->numleafbrushes);
if (n < 0 || n + c > loadmodel->brush.num_leafbrushes)
- Host_Error("Mod_Q3BSP_LoadLeafs: invalid leafbrush range %i : %i (%i leafbrushes)\n", n, n + c, loadmodel->brush.num_leafbrushes);
+ Host_Error("Mod_Q3BSP_LoadLeafs: invalid leafbrush range %i : %i (%i leafbrushes)", n, n + c, loadmodel->brush.num_leafbrushes);
out->firstleafbrush = loadmodel->brush.data_leafbrushes + n;
out->numleafbrushes = c;
}
out->parent = NULL;
n = LittleLong(in->planeindex);
if (n < 0 || n >= loadmodel->brush.num_planes)
- Host_Error("Mod_Q3BSP_LoadNodes: invalid planeindex %i (%i planes)\n", n, loadmodel->brush.num_planes);
+ Host_Error("Mod_Q3BSP_LoadNodes: invalid planeindex %i (%i planes)", n, loadmodel->brush.num_planes);
out->plane = loadmodel->brush.data_planes + n;
for (j = 0;j < 2;j++)
{
if (n >= 0)
{
if (n >= loadmodel->brush.num_nodes)
- Host_Error("Mod_Q3BSP_LoadNodes: invalid child node index %i (%i nodes)\n", n, loadmodel->brush.num_nodes);
+ Host_Error("Mod_Q3BSP_LoadNodes: invalid child node index %i (%i nodes)", n, loadmodel->brush.num_nodes);
out->children[j] = loadmodel->brush.data_nodes + n;
}
else
{
n = -1 - n;
if (n >= loadmodel->brush.num_leafs)
- Host_Error("Mod_Q3BSP_LoadNodes: invalid child leaf index %i (%i leafs)\n", n, loadmodel->brush.num_leafs);
+ Host_Error("Mod_Q3BSP_LoadNodes: invalid child leaf index %i (%i leafs)", n, loadmodel->brush.num_leafs);
out->children[j] = (mnode_t *)(loadmodel->brush.data_leafs + n);
}
}
if (l->filelen)
{
if (l->filelen < count * (int)sizeof(*in))
- Host_Error("Mod_Q3BSP_LoadLightGrid: invalid lightgrid lump size %i bytes, should be %i bytes (%ix%ix%i)\n", l->filelen, count * sizeof(*in), loadmodel->brushq3.num_lightgrid_dimensions[0], loadmodel->brushq3.num_lightgrid_dimensions[1], loadmodel->brushq3.num_lightgrid_dimensions[2]);
+ Host_Error("Mod_Q3BSP_LoadLightGrid: invalid lightgrid lump size %i bytes, should be %i bytes (%ix%ix%i)", l->filelen, count * sizeof(*in), loadmodel->brushq3.num_lightgrid_dimensions[0], loadmodel->brushq3.num_lightgrid_dimensions[1], loadmodel->brushq3.num_lightgrid_dimensions[2]);
if (l->filelen != count * (int)sizeof(*in))
- Con_Printf("Mod_Q3BSP_LoadLightGrid: Warning: calculated lightgrid size %i bytes does not match lump size %i\n", count * sizeof(*in), l->filelen);
+ Con_Printf("Mod_Q3BSP_LoadLightGrid: Warning: calculated lightgrid size %i bytes does not match lump size %i", count * sizeof(*in), l->filelen);
out = (q3dlightgrid_t *)Mem_Alloc(loadmodel->mempool, count * sizeof(*out));
loadmodel->brushq3.data_lightgrid = out;
loadmodel->brushq3.num_lightgrid = count;
loadmodel->brush.num_pvsclusters = LittleLong(in->numclusters);
loadmodel->brush.num_pvsclusterbytes = LittleLong(in->chainlength);
if (loadmodel->brush.num_pvsclusterbytes < ((loadmodel->brush.num_pvsclusters + 7) / 8))
- Host_Error("Mod_Q3BSP_LoadPVS: (chainlength = %i) < ((numclusters = %i) + 7) / 8\n", loadmodel->brush.num_pvsclusterbytes, loadmodel->brush.num_pvsclusters);
+ Host_Error("Mod_Q3BSP_LoadPVS: (chainlength = %i) < ((numclusters = %i) + 7) / 8", loadmodel->brush.num_pvsclusterbytes, loadmodel->brush.num_pvsclusters);
totalchains = loadmodel->brush.num_pvsclusterbytes * loadmodel->brush.num_pvsclusters;
if (l->filelen < totalchains + (int)sizeof(*in))
- Host_Error("Mod_Q3BSP_LoadPVS: lump too small ((numclusters = %i) * (chainlength = %i) + sizeof(q3dpvs_t) == %i bytes, lump is %i bytes)\n", loadmodel->brush.num_pvsclusters, loadmodel->brush.num_pvsclusterbytes, totalchains + sizeof(*in), l->filelen);
+ Host_Error("Mod_Q3BSP_LoadPVS: lump too small ((numclusters = %i) * (chainlength = %i) + sizeof(q3dpvs_t) == %i bytes, lump is %i bytes)", loadmodel->brush.num_pvsclusters, loadmodel->brush.num_pvsclusterbytes, totalchains + sizeof(*in), l->filelen);
loadmodel->brush.data_pvsclusters = (unsigned char *)Mem_Alloc(loadmodel->mempool, totalchains);
memcpy(loadmodel->brush.data_pvsclusters, (unsigned char *)(in + 1), totalchains);
else if (i == Q2BSPVERSION)
Mod_Q2BSP_Load(mod,buffer, bufferend);
else
- Host_Error("Mod_IBSP_Load: unknown/unsupported version %i\n", i);
+ Host_Error("Mod_IBSP_Load: unknown/unsupported version %i", i);
}
void Mod_MAP_Load(model_t *mod, void *buffer, void *bufferend)
{
- Host_Error("Mod_MAP_Load: not yet implemented\n");
+ Host_Error("Mod_MAP_Load: not yet implemented");
}
return mod;
}
- Host_Error ("Mod_FindName: ran out of models\n");
+ Host_Error ("Mod_FindName: ran out of models");
return NULL;
}
modelradius = 0;
if (loadmodel->numframes < 1)
- Host_Error ("Mod_Sprite_SharedSetup: Invalid # of frames: %d\n", loadmodel->numframes);
+ Host_Error ("Mod_Sprite_SharedSetup: Invalid # of frames: %d", loadmodel->numframes);
// LordHavoc: hack to allow sprites to be non-fullbright
for (i = 0;i < MAX_QPATH && loadmodel->name[i];i++)
palette[255][0] = palette[255][1] = palette[255][2] = palette[255][3] = 0;
break;
default:
- Host_Error("Mod_IDSP_Load: unknown texFormat (%i, should be 0, 1, 2, or 3)\n", i);
+ Host_Error("Mod_IDSP_Load: unknown texFormat (%i, should be 0, 1, 2, or 3)", i);
return;
}
loadmodel->numframes = LittleLong (pinqsprite->numframes);
if (loadmodel->numframes < 1)
- Host_Error ("Mod_IDS2_Load: Invalid # of frames: %d\n", loadmodel->numframes);
+ Host_Error ("Mod_IDS2_Load: Invalid # of frames: %d", loadmodel->numframes);
loadmodel->sprite.sprnum_type = SPR_VP_PARALLEL;
loadmodel->synctype = ST_SYNC;
in_client_mouse = true;
break;
default:
- PRVM_ERROR("VM_M_setmousetarget: wrong destination %f !\n",PRVM_G_FLOAT(OFS_PARM0));
+ PRVM_ERROR("VM_M_setmousetarget: wrong destination %f !",PRVM_G_FLOAT(OFS_PARM0));
}
}
// key_dest = key_message
// break;
default:
- PRVM_ERROR("VM_M_setkeydest: wrong destination %f !\n", PRVM_G_FLOAT(OFS_PARM0));
+ PRVM_ERROR("VM_M_setkeydest: wrong destination %f !", PRVM_G_FLOAT(OFS_PARM0));
}
}
const char *s;
if(prog->argc == 0)
- PRVM_ERROR("VM_M_callfunction: 1 parameter is required !\n");
+ PRVM_ERROR("VM_M_callfunction: 1 parameter is required !");
s = PRVM_G_STRING(OFS_PARM0 + (prog->argc - 1));
if(!s)
- PRVM_ERROR("VM_M_callfunction: null string !\n");
+ PRVM_ERROR("VM_M_callfunction: null string !");
VM_CheckEmptyString(s);
func = PRVM_ED_FindFunction(s);
if(!func)
- PRVM_ERROR("VM_M_callfunciton: function %s not found !\n", s);
+ PRVM_ERROR("VM_M_callfunciton: function %s not found !", s);
else if (func->first_statement < 0)
{
// negative statements are built in functions
s = PRVM_G_STRING(OFS_PARM0);
if(!s)
- PRVM_ERROR("VM_M_isfunction: null string !\n");
+ PRVM_ERROR("VM_M_isfunction: null string !");
VM_CheckEmptyString(s);
int destclient;
if(!sv.active)
- PRVM_ERROR("VM_WriteDest: game is not server (%s)\n", PRVM_NAME);
+ PRVM_ERROR("VM_WriteDest: game is not server (%s)", PRVM_NAME);
dest = PRVM_G_FLOAT(OFS_PARM1);
switch (dest)
case MSG_ONE:
destclient = (int) PRVM_G_FLOAT(OFS_PARM2);
if (destclient < 0 || destclient >= svs.maxclients || !svs.clients[destclient].active)
- PRVM_ERROR("VM_clientcommand: %s: invalid client !\n", PRVM_NAME);
+ PRVM_ERROR("VM_clientcommand: %s: invalid client !", PRVM_NAME);
return &svs.clients[destclient].message;
//NetConn_OpenServerPort(net_address_ipv6.string, port);
}
if (sv_numsockets == 0)
- Host_Error("NetConn_OpenServerPorts: unable to open any ports!\n");
+ Host_Error("NetConn_OpenServerPorts: unable to open any ports!");
}
lhnetsocket_t *NetConn_ChooseClientSocketForAddress(lhnetaddress_t *address)
for (i=0 ; i<3 ; i++)
if (min[i] > max[i])
- PF_ERROR("SetMinMaxSize: backwards mins/maxs\n");
+ PF_ERROR("SetMinMaxSize: backwards mins/maxs");
// set derived values
VectorCopy (min, e->fields.server->mins);
*/
void PF_break (void)
{
- PF_ERROR("break: break statement\n");
+ PF_ERROR("break: break statement");
}
/*
ent = PRVM_PROG_TO_EDICT(prog->globals.server->msg_entity);
entnum = PRVM_NUM_FOR_EDICT(ent);
if (entnum < 1 || entnum > svs.maxclients || !svs.clients[entnum-1].active)
- Host_Error("WriteDest: tried to write to non-client\n");
+ Host_Error("WriteDest: tried to write to non-client");
return &svs.clients[entnum-1].message;
case MSG_ALL:
for (i = 0;i < progs->numstrings;i++)
{
if (progs->ofs_strings + pr_stringssize >= filesize)
- Host_Error ("progs.dat strings go past end of file\n");
+ Host_Error ("progs.dat strings go past end of file");
pr_stringssize += strlen (pr_strings + pr_stringssize) + 1;
}
pr_numknownstrings = 0;
case OP_IF:
case OP_IFNOT:
if ((unsigned short) st->a >= progs->numglobals || st->b + i < 0 || st->b + i >= progs->numstatements)
- Host_Error("PR_LoadProgs: out of bounds IF/IFNOT (statement %d)\n", i);
+ Host_Error("PR_LoadProgs: out of bounds IF/IFNOT (statement %d)", i);
break;
case OP_GOTO:
if (st->a + i < 0 || st->a + i >= progs->numstatements)
- Host_Error("PR_LoadProgs: out of bounds GOTO (statement %d)\n", i);
+ Host_Error("PR_LoadProgs: out of bounds GOTO (statement %d)", i);
break;
// global global global
case OP_ADD_F:
case OP_LOAD_FNC:
case OP_LOAD_V:
if ((unsigned short) st->a >= progs->numglobals || (unsigned short) st->b >= progs->numglobals || (unsigned short) st->c >= progs->numglobals)
- Host_Error("PR_LoadProgs: out of bounds global index (statement %d)\n", i);
+ Host_Error("PR_LoadProgs: out of bounds global index (statement %d)", i);
break;
// global none global
case OP_NOT_F:
case OP_NOT_FNC:
case OP_NOT_ENT:
if ((unsigned short) st->a >= progs->numglobals || (unsigned short) st->c >= progs->numglobals)
- Host_Error("PR_LoadProgs: out of bounds global index (statement %d)\n", i);
+ Host_Error("PR_LoadProgs: out of bounds global index (statement %d)", i);
break;
// 2 globals
case OP_STOREP_F:
case OP_STOREP_V:
case OP_STORE_V:
if ((unsigned short) st->a >= progs->numglobals || (unsigned short) st->b >= progs->numglobals)
- Host_Error("PR_LoadProgs: out of bounds global index (statement %d)\n", i);
+ Host_Error("PR_LoadProgs: out of bounds global index (statement %d)", i);
break;
// 1 global
case OP_CALL0:
case OP_DONE:
case OP_RETURN:
if ((unsigned short) st->a >= progs->numglobals)
- Host_Error("PR_LoadProgs: out of bounds global index (statement %d)\n", i);
+ Host_Error("PR_LoadProgs: out of bounds global index (statement %d)", i);
break;
default:
- Host_Error("PR_LoadProgs: unknown opcode %d at statement %d\n", st->op, i);
+ Host_Error("PR_LoadProgs: unknown opcode %d at statement %d", st->op, i);
break;
}
}
int n;
n = e - prog->edicts;
if ((unsigned int)n >= (unsigned int)prog->max_edicts)
- Host_Error("PRVM_EDICT_TO_PROG: invalid edict %8p (number %i compared to world at %8p)\n", e, n, prog->edicts);
+ Host_Error("PRVM_EDICT_TO_PROG: invalid edict %8p (number %i compared to world at %8p)", e, n, prog->edicts);
return n;// EXPERIMENTAL
//return (unsigned char *)e->v - (unsigned char *)prog->edictsfields;
}
prvm_edict_t *PRVM_PROG_TO_EDICT(int n)
{
if ((unsigned int)n >= (unsigned int)prog->max_edicts)
- Host_Error("PRVM_PROG_TO_EDICT: invalid edict number %i\n", n);
+ Host_Error("PRVM_PROG_TO_EDICT: invalid edict number %i", n);
return prog->edicts + n; // EXPERIMENTAL
//return prog->edicts + ((n) / (progs->entityfields * 4));
}
{
num = -1 - num;
if (!pr_knownstrings[num])
- Host_Error("PRVM_GetString: attempt to get string that is already freed\n");
+ Host_Error("PRVM_GetString: attempt to get string that is already freed");
return pr_knownstrings[num];
}
else
{
- Host_Error("PRVM_GetString: invalid string offset %i\n", num);
+ Host_Error("PRVM_GetString: invalid string offset %i", num);
return "";
}
}
for (i = 0;i < pr_numknownstrings;i++)
if (pr_knownstrings[i] == s)
return -1 - i;
- Host_Error("PR_SetQCString: unknown string\n");
+ Host_Error("PR_SetQCString: unknown string");
return -1 - i;
}
if (!s)
return 0;
if (s >= pr_strings && s <= pr_strings + pr_stringssize)
- Host_Error("PRVM_SetEngineString: s in pr_strings area\n");
+ Host_Error("PRVM_SetEngineString: s in pr_strings area");
for (i = 0;i < pr_numknownstrings;i++)
if (pr_knownstrings[i] == s)
return -1 - i;
{
int i;
if (!s)
- Host_Error("PR_FreeString: attempt to free a NULL string\n");
+ Host_Error("PR_FreeString: attempt to free a NULL string");
if (s >= pr_strings && s <= pr_strings + pr_stringssize)
- Host_Error("PR_FreeString: attempt to free a constant string\n");
+ Host_Error("PR_FreeString: attempt to free a constant string");
for (i = 0;i < pr_numknownstrings;i++)
if (pr_knownstrings[i] == s)
break;
if (i == pr_numknownstrings)
- Host_Error("PR_FreeString: attempt to free a non-existent or already freed string\n");
+ Host_Error("PR_FreeString: attempt to free a non-existent or already freed string");
PR_Free((char *)pr_knownstrings[i]);
pr_knownstrings[i] = NULL;
}
int i, j, c, o;
if (!f)
- Host_Error ("PR_EnterFunction: NULL function\n");
+ Host_Error ("PR_EnterFunction: NULL function");
pr_stack[pr_depth].s = pr_xstatement;
pr_stack[pr_depth].f = pr_xfunction;
// save off any locals that the new function steps on
c = f->locals;
if (localstack_used + c > LOCALSTACK_SIZE)
- Host_Error ("PRVM_ExecuteProgram: locals stack overflow\n");
+ Host_Error ("PRVM_ExecuteProgram: locals stack overflow");
for (i=0 ; i < c ; i++)
localstack[localstack_used+i] = ((int *)pr_globals)[f->parm_start + i];
Host_Error ("prog stack underflow");
if (!pr_xfunction)
- Host_Error ("PR_LeaveFunction: NULL function\n");
+ Host_Error ("PR_LeaveFunction: NULL function");
// restore locals from the stack
c = pr_xfunction->locals;
localstack_used -= c;
if (localstack_used < 0)
- Host_Error ("PRVM_ExecuteProgram: locals stack underflow\n");
+ Host_Error ("PRVM_ExecuteProgram: locals stack underflow");
for (i=0 ; i < c ; i++)
((int *)pr_globals)[pr_xfunction->parm_start + i] = localstack[localstack_used+i];
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to write to an out of bounds edict (%i)\n", OPB->_int);
+ Host_Error("Progs attempted to write to an out of bounds edict (%i)", OPB->_int);
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to write to an out of bounds edict (%i)\n", OPB->_int);
+ Host_Error("Progs attempted to write to an out of bounds edict (%i)", OPB->_int);
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to address an invalid field (%i) in an edict\n", OPB->_int);
+ Host_Error("Progs attempted to address an invalid field (%i) in an edict", OPB->_int);
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an invalid field in an edict (%i)\n", OPB->_int);
+ Host_Error("Progs attempted to read an invalid field in an edict (%i)", OPB->_int);
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an invalid field in an edict (%i)\n", OPB->_int);
+ Host_Error("Progs attempted to read an invalid field in an edict (%i)", OPB->_int);
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to write to an out of bounds edict\n");
+ Host_Error("Progs attempted to write to an out of bounds edict");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an out of bounds edict number\n");
+ Host_Error("Progs attempted to read an out of bounds edict number");
return;
}
if (OPB->_int < 0 || OPB->_int >= progs->entityfields)
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an invalid field in an edict\n");
+ Host_Error("Progs attempted to read an invalid field in an edict");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to write to an invalid indexed global\n");
+ Host_Error("Progs attempted to write to an invalid indexed global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to write to an invalid indexed global\n");
+ Host_Error("Progs attempted to write to an invalid indexed global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to address an out of bounds global\n");
+ Host_Error("Progs attempted to address an out of bounds global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an invalid indexed global\n");
+ Host_Error("Progs attempted to read an invalid indexed global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an invalid indexed global\n");
+ Host_Error("Progs attempted to read an invalid indexed global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d\n", st->b, st->c);
+ Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d", st->b, st->c);
return;
}
break;
num = MSG_ReadByte ();
if (num >= MAX_EDICTS)
- Host_Error("EntityFrameQuake_ReadEntity: entity number (%i) >= MAX_EDICTS (%i)\n", num, MAX_EDICTS);
+ Host_Error("EntityFrameQuake_ReadEntity: entity number (%i) >= MAX_EDICTS (%i)", num, MAX_EDICTS);
if (num < 1)
- Host_Error("EntityFrameQuake_ReadEntity: invalid entity number (%i)\n", num);
+ Host_Error("EntityFrameQuake_ReadEntity: invalid entity number (%i)", num);
if (cl_num_entities <= num)
{
}
if (msg_badread)
- Host_Error("EntityFrameQuake_ReadEntity: read error\n");
+ Host_Error("EntityFrameQuake_ReadEntity: read error");
}
void EntityFrameQuake_ISeeDeadEntities(void)
while ((number = (unsigned short) MSG_ReadShort()) != 0xFFFF && !msg_badread)
{
if (msg_badread)
- Host_Error("EntityFrame_Read: read error\n");
+ Host_Error("EntityFrame_Read: read error");
removed = number & 0x8000;
number &= 0x7FFF;
if (number >= MAX_EDICTS)
- Host_Error("EntityFrame_Read: number (%i) >= MAX_EDICTS (%i)\n", number, MAX_EDICTS);
+ Host_Error("EntityFrame_Read: number (%i) >= MAX_EDICTS (%i)", number, MAX_EDICTS);
// seek to entity, while copying any skipped entities (assume unchanged)
while (old < oldend && old->number < number)
{
if (f->numentities >= MAX_ENTITY_DATABASE)
- Host_Error("EntityFrame_Read: entity list too big\n");
+ Host_Error("EntityFrame_Read: entity list too big");
f->entitydata[f->numentities] = *old++;
f->entitydata[f->numentities++].time = cl.mtime[0];
}
else
{
if (f->numentities >= MAX_ENTITY_DATABASE)
- Host_Error("EntityFrame_Read: entity list too big\n");
+ Host_Error("EntityFrame_Read: entity list too big");
// reserve this slot
e = f->entitydata + f->numentities++;
while (old < oldend)
{
if (f->numentities >= MAX_ENTITY_DATABASE)
- Host_Error("EntityFrame_Read: entity list too big\n");
+ Host_Error("EntityFrame_Read: entity list too big");
f->entitydata[f->numentities] = *old++;
f->entitydata[f->numentities++].time = cl.mtime[0];
}
}
else
// objerror has to display the object fields -> else call
- PRVM_ERROR ("VM_objecterror: self not defined !\n");
+ PRVM_ERROR ("VM_objecterror: self not defined !");
}
/*
name = PRVM_G_STRING(OFS_PARM0);
if(!name)
- PRVM_ERROR("VM_cvar_string: %s: null string\n", PRVM_NAME);
+ PRVM_ERROR("VM_cvar_string: %s: null string", PRVM_NAME);
VM_CheckEmptyString(name);
name = PRVM_G_STRING(OFS_PARM0);
if(!name)
- PRVM_ERROR("VM_cvar_defstring: %s: null string\n", PRVM_NAME);
+ PRVM_ERROR("VM_cvar_defstring: %s: null string", PRVM_NAME);
VM_CheckEmptyString(name);
ent = PRVM_G_FLOAT(OFS_PARM0);
if(PRVM_PROG_TO_EDICT(ent)->priv.required->free)
- PRVM_ERROR ("VM_ftoe: %s tried to access a freed entity (entity %i)!\n", PRVM_NAME, ent);
+ PRVM_ERROR ("VM_ftoe: %s tried to access a freed entity (entity %i)!", PRVM_NAME, ent);
PRVM_G_INT(OFS_RETURN) = ent;
}
PRVM_ED_Free (ed);
}
// if (ed == prog->edicts)
-// PRVM_ERROR ("remove: tried to remove world\n");
+// PRVM_ERROR ("remove: tried to remove world");
// if (PRVM_NUM_FOR_EDICT(ed) <= sv.maxclients)
-// Host_Error("remove: tried to remove a client\n");
+// Host_Error("remove: tried to remove a client");
}
/*
// is the same like !(prog->flag & PRVM_FE_CHAIN) - even if the operator precedence is another
if(!prog->flag & PRVM_FE_CHAIN)
- PRVM_ERROR("VM_findchain: %s doesnt have a chain field !\n", PRVM_NAME);
+ PRVM_ERROR("VM_findchain: %s doesnt have a chain field !", PRVM_NAME);
chain_of = PRVM_ED_FindField("chain")->ofs;
VM_SAFEPARMCOUNT(2, VM_findchainfloat);
if(!prog->flag & PRVM_FE_CHAIN)
- PRVM_ERROR("VM_findchainfloat: %s doesnt have a chain field !\n", PRVM_NAME);
+ PRVM_ERROR("VM_findchainfloat: %s doesnt have a chain field !", PRVM_NAME);
chain_of = PRVM_ED_FindField("chain")->ofs;
VM_SAFEPARMCOUNT(2, VM_findchainflags);
if(!prog->flag & PRVM_FE_CHAIN)
- PRVM_ERROR("VM_findchainflags: %s doesnt have a chain field !\n", PRVM_NAME);
+ PRVM_ERROR("VM_findchainflags: %s doesnt have a chain field !", PRVM_NAME);
chain_of = PRVM_ED_FindField("chain")->ofs;
{
VM_SAFEPARMCOUNT(0, VM_crash);
- PRVM_ERROR("Crash called by %s\n",PRVM_NAME);
+ PRVM_ERROR("Crash called by %s",PRVM_NAME);
}
/*
PRVM_G_FLOAT(OFS_RETURN) = f;
}
else
- PRVM_ERROR("VM_min: %s must supply at least 2 floats\n", PRVM_NAME);
+ PRVM_ERROR("VM_min: %s must supply at least 2 floats", PRVM_NAME);
}
/*
PRVM_G_FLOAT(OFS_RETURN) = f;
}
else
- PRVM_ERROR("VM_max: %s must supply at least 2 floats\n", PRVM_NAME);
+ PRVM_ERROR("VM_max: %s must supply at least 2 floats", PRVM_NAME);
}
/*
char *s;
if(prog->argc < 1)
- PRVM_ERROR("VM_strcat wrong parameter count (min. 1 expected ) !\n");
+ PRVM_ERROR("VM_strcat wrong parameter count (min. 1 expected ) !");
s = VM_GetTempString();
VM_VarString(0, s, VM_STRINGTEMP_LENGTH);
// get edict and test it
ent = PRVM_G_EDICT(OFS_PARM0);
if (ent->priv.required->free)
- PRVM_ERROR ("VM_parseentitydata: %s: Can only set already spawned entities (entity %i is free)!\n", PRVM_NAME, PRVM_NUM_FOR_EDICT(ent));
+ PRVM_ERROR ("VM_parseentitydata: %s: Can only set already spawned entities (entity %i is free)!", PRVM_NAME, PRVM_NUM_FOR_EDICT(ent));
data = PRVM_G_STRING(OFS_PARM1);
// parse the opening brace
if (!COM_ParseToken(&data, false) || com_token[0] != '{' )
- PRVM_ERROR ("VM_parseentitydata: %s: Couldn't parse entity data:\n%s\n", PRVM_NAME, data );
+ PRVM_ERROR ("VM_parseentitydata: %s: Couldn't parse entity data:\n%s", PRVM_NAME, data );
PRVM_ED_ParseEdict (data, ent);
}
PRVM_G_INT(OFS_RETURN) = PRVM_G_INT(OFS_PARM0);
if(!s)
- PRVM_ERROR ("VM_precache_pic: %s: NULL\n", PRVM_NAME);
+ PRVM_ERROR ("VM_precache_pic: %s: NULL", PRVM_NAME);
VM_CheckEmptyString (s);
s = PRVM_G_STRING(OFS_PARM0);
if(!s)
- PRVM_ERROR ("VM_freepic: %s: NULL\n");
+ PRVM_ERROR ("VM_freepic: %s: NULL");
VM_CheckEmptyString (s);
p = PRVM_G_STRING(OFS_PARM0);
if(!p)
- PRVM_ERROR("VM_getimagepos: %s passed null picture name !\n", PRVM_NAME);
+ PRVM_ERROR("VM_getimagepos: %s passed null picture name !", PRVM_NAME);
VM_CheckEmptyString (p);
// nice helper macros
#ifndef VM_NOPARMCHECK
-#define VM_SAFEPARMCOUNT(p,f) if(prog->argc != p) PRVM_ERROR(#f " wrong parameter count (" #p " expected ) !\n")
+#define VM_SAFEPARMCOUNT(p,f) if(prog->argc != p) PRVM_ERROR(#f " wrong parameter count (" #p " expected ) !")
#else
#define VM_SAFEPARMCOUNT(p,f)
#endif
if(prog_list[prognr].loaded)
prog = &prog_list[prognr];
else
- PRVM_ERROR("%i not loaded !\n", prognr);
+ PRVM_ERROR("%i not loaded !", prognr);
return;
}
- PRVM_ERROR("Invalid program number %i\n", prognr);
+ PRVM_ERROR("Invalid program number %i", prognr);
}
/*
fs_offset_t filesize;
if( prog->loaded ) {
- PRVM_ERROR ("PRVM_LoadProgs: there is already a %s program loaded!\n", PRVM_NAME );
+ PRVM_ERROR ("PRVM_LoadProgs: there is already a %s program loaded!", PRVM_NAME );
}
prog->progs = (dprograms_t *)FS_LoadFile (filename, prog->progs_mempool, false, &filesize);
for (i = 0;i < prog->progs->numstrings;i++)
{
if (prog->progs->ofs_strings + prog->stringssize >= (int)filesize)
- PRVM_ERROR ("%s: %s strings go past end of file\n", PRVM_NAME, filename);
+ PRVM_ERROR ("%s: %s strings go past end of file", PRVM_NAME, filename);
prog->stringssize += (int)strlen (prog->strings + prog->stringssize) + 1;
}
prog->numknownstrings = 0;
// check required functions
for(i=0 ; i < numrequiredfunc ; i++)
if(PRVM_ED_FindFunction(required_func[i]) == 0)
- PRVM_ERROR("%s: %s not found in %s\n",PRVM_NAME, required_func[i], filename);
+ PRVM_ERROR("%s: %s not found in %s",PRVM_NAME, required_func[i], filename);
for (i=0 ; i<prog->progs->numglobals ; i++)
((int *)prog->globals.generic)[i] = LittleLong (((int *)prog->globals.generic)[i]);
case OP_IF:
case OP_IFNOT:
if ((unsigned short) st->a >= prog->progs->numglobals || st->b + i < 0 || st->b + i >= prog->progs->numstatements)
- PRVM_ERROR("PRVM_LoadProgs: out of bounds IF/IFNOT (statement %d) in %s\n", i, PRVM_NAME);
+ PRVM_ERROR("PRVM_LoadProgs: out of bounds IF/IFNOT (statement %d) in %s", i, PRVM_NAME);
break;
case OP_GOTO:
if (st->a + i < 0 || st->a + i >= prog->progs->numstatements)
- PRVM_ERROR("PRVM_LoadProgs: out of bounds GOTO (statement %d) in %s\n", i, PRVM_NAME);
+ PRVM_ERROR("PRVM_LoadProgs: out of bounds GOTO (statement %d) in %s", i, PRVM_NAME);
break;
// global global global
case OP_ADD_F:
case OP_LOAD_FNC:
case OP_LOAD_V:
if ((unsigned short) st->a >= prog->progs->numglobals || (unsigned short) st->b >= prog->progs->numglobals || (unsigned short) st->c >= prog->progs->numglobals)
- PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d)\n", i);
+ PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d)", i);
break;
// global none global
case OP_NOT_F:
case OP_NOT_FNC:
case OP_NOT_ENT:
if ((unsigned short) st->a >= prog->progs->numglobals || (unsigned short) st->c >= prog->progs->numglobals)
- PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s\n", i, PRVM_NAME);
+ PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s", i, PRVM_NAME);
break;
// 2 globals
case OP_STOREP_F:
case OP_STOREP_V:
case OP_STORE_V:
if ((unsigned short) st->a >= prog->progs->numglobals || (unsigned short) st->b >= prog->progs->numglobals)
- PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d)\n in %s", i, PRVM_NAME);
+ PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s", i, PRVM_NAME);
break;
// 1 global
case OP_CALL0:
case OP_DONE:
case OP_RETURN:
if ((unsigned short) st->a >= prog->progs->numglobals)
- PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s\n", i, PRVM_NAME);
+ PRVM_ERROR("PRVM_LoadProgs: out of bounds global index (statement %d) in %s", i, PRVM_NAME);
break;
default:
- PRVM_ERROR("PRVM_LoadProgs: unknown opcode %d at statement %d in %s\n", st->op, i, PRVM_NAME);
+ PRVM_ERROR("PRVM_LoadProgs: unknown opcode %d at statement %d in %s", st->op, i, PRVM_NAME);
break;
}
}
void PRVM_InitProg(int prognr)
{
if(prognr < 0 || prognr >= PRVM_MAXPROGS)
- Sys_Error("PRVM_InitProg: Invalid program number %i\n",prognr);
+ Sys_Error("PRVM_InitProg: Invalid program number %i",prognr);
prog = &prog_list[prognr];
int n;
n = e - prog->edicts;
if ((unsigned int)n >= (unsigned int)prog->max_edicts)
- Host_Error("PRVM_EDICT_TO_PROG: invalid edict %8p (number %i compared to world at %8p)\n", e, n, prog->edicts);
+ Host_Error("PRVM_EDICT_TO_PROG: invalid edict %8p (number %i compared to world at %8p)", e, n, prog->edicts);
return n;// EXPERIMENTAL
//return (unsigned char *)e->v - (unsigned char *)prog->edictsfields;
}
prvm_edict_t *PRVM_PROG_TO_EDICT(int n)
{
if ((unsigned int)n >= (unsigned int)prog->max_edicts)
- Host_Error("PRVM_PROG_TO_EDICT: invalid edict number %i\n", n);
+ Host_Error("PRVM_PROG_TO_EDICT: invalid edict number %i", n);
return prog->edicts + n; // EXPERIMENTAL
//return prog->edicts + ((n) / (progs->entityfields * 4));
}
{
num = -1 - num;
if (!prog->knownstrings[num])
- PRVM_ERROR("PRVM_GetString: attempt to get string that is already freed\n");
+ PRVM_ERROR("PRVM_GetString: attempt to get string that is already freed");
return prog->knownstrings[num];
}
else
{
- PRVM_ERROR("PRVM_GetString: invalid string offset %i\n", num);
+ PRVM_ERROR("PRVM_GetString: invalid string offset %i", num);
return "";
}
}
if (!s)
return 0;
if (s >= prog->strings && s <= prog->strings + prog->stringssize)
- PRVM_ERROR("PRVM_SetEngineString: s in prog->strings area\n");
+ PRVM_ERROR("PRVM_SetEngineString: s in prog->strings area");
for (i = 0;i < prog->numknownstrings;i++)
if (prog->knownstrings[i] == s)
return -1 - i;
void PRVM_FreeString(int num)
{
if (num == 0)
- PRVM_ERROR("PRVM_FreeString: attempt to free a NULL string\n");
+ PRVM_ERROR("PRVM_FreeString: attempt to free a NULL string");
else if (num >= 0 && num < prog->stringssize)
- PRVM_ERROR("PRVM_FreeString: attempt to free a constant string\n");
+ PRVM_ERROR("PRVM_FreeString: attempt to free a constant string");
else if (num < 0 && num >= -prog->numknownstrings)
{
num = -1 - num;
if (!prog->knownstrings[num])
- PRVM_ERROR("PRVM_FreeString: attempt to free a non-existent or already freed string\n");
+ PRVM_ERROR("PRVM_FreeString: attempt to free a non-existent or already freed string");
if (!prog->knownstrings[num])
- PRVM_ERROR("PRVM_FreeString: attempt to free a string owned by the engine\n");
+ PRVM_ERROR("PRVM_FreeString: attempt to free a string owned by the engine");
PRVM_Free((char *)prog->knownstrings[num]);
prog->knownstrings[num] = NULL;
prog->knownstrings_freeable[num] = false;
prog->firstfreeknownstring = min(prog->firstfreeknownstring, num);
}
else
- PRVM_ERROR("PRVM_FreeString: invalid string offset %i\n", num);
+ PRVM_ERROR("PRVM_FreeString: invalid string offset %i", num);
}
int i, j, c, o;
if (!f)
- PRVM_ERROR ("PRVM_EnterFunction: NULL function in %s\n", PRVM_NAME);
+ PRVM_ERROR ("PRVM_EnterFunction: NULL function in %s", PRVM_NAME);
prog->stack[prog->depth].s = prog->xstatement;
prog->stack[prog->depth].f = prog->xfunction;
// save off any locals that the new function steps on
c = f->locals;
if (prog->localstack_used + c > PRVM_LOCALSTACK_SIZE)
- PRVM_ERROR ("PRVM_ExecuteProgram: locals stack overflow in %s\n", PRVM_NAME);
+ PRVM_ERROR ("PRVM_ExecuteProgram: locals stack overflow in %s", PRVM_NAME);
for (i=0 ; i < c ; i++)
prog->localstack[prog->localstack_used+i] = ((int *)prog->globals.generic)[f->parm_start + i];
PRVM_ERROR ("prog stack underflow in %s", PRVM_NAME);
if (!prog->xfunction)
- PRVM_ERROR ("PR_LeaveFunction: NULL function in %s\n", PRVM_NAME);
+ PRVM_ERROR ("PR_LeaveFunction: NULL function in %s", PRVM_NAME);
// restore locals from the stack
c = prog->xfunction->locals;
prog->localstack_used -= c;
if (prog->localstack_used < 0)
- PRVM_ERROR ("PRVM_ExecuteProgram: locals stack underflow in %s\n", PRVM_NAME);
+ PRVM_ERROR ("PRVM_ExecuteProgram: locals stack underflow in %s", PRVM_NAME);
for (i=0 ; i < c ; i++)
((int *)prog->globals.generic)[prog->xfunction->parm_start + i] = prog->localstack[prog->localstack_used+i];
prog->xfunction->profile += profile - startprofile;
startprofile = profile;
prog->xstatement = st - prog->statements;
- PRVM_ERROR("%s attempted to write to an out of bounds edict (%i)\n", PRVM_NAME, OPB->_int);
+ PRVM_ERROR("%s attempted to write to an out of bounds edict (%i)", PRVM_NAME, OPB->_int);
return;
}
#endif
prog->xfunction->profile += profile - startprofile;
startprofile = profile;
prog->xstatement = st - prog->statements;
- PRVM_ERROR("%s attempted to write to an out of bounds edict (%i)\n", PRVM_NAME, OPB->_int);
+ PRVM_ERROR("%s attempted to write to an out of bounds edict (%i)", PRVM_NAME, OPB->_int);
return;
}
#endif
prog->xfunction->profile += profile - startprofile;
startprofile = profile;
prog->xstatement = st - prog->statements;
- PRVM_ERROR("%s attempted to address an invalid field (%i) in an edict\n", PRVM_NAME, OPB->_int);
+ PRVM_ERROR("%s attempted to address an invalid field (%i) in an edict", PRVM_NAME, OPB->_int);
return;
}
#endif
prog->xfunction->profile += profile - startprofile;
startprofile = profile;
prog->xstatement = st - prog->statements;
- PRVM_ERROR("%s attempted to read an invalid field in an edict (%i)\n", PRVM_NAME, OPB->_int);
+ PRVM_ERROR("%s attempted to read an invalid field in an edict (%i)", PRVM_NAME, OPB->_int);
return;
}
#endif
prog->xfunction->profile += profile - startprofile;
startprofile = profile;
prog->xstatement = st - prog->statements;
- PRVM_ERROR("%s attempted to read an invalid field in an edict (%i)\n", PRVM_NAME, OPB->_int);
+ PRVM_ERROR("%s attempted to read an invalid field in an edict (%i)", PRVM_NAME, OPB->_int);
return;
}
#endif
*(func_t *)((float*)ed->fields.vp + PRVM_ED_FindField ("think")->ofs) = OPB->function;
}
else
- PRVM_ERROR("OP_STATE not supported by %s\n", PRVM_NAME);
+ PRVM_ERROR("OP_STATE not supported by %s", PRVM_NAME);
break;
// LordHavoc: to be enabled when Progs version 7 (or whatever it will be numbered) is finalized
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to write to an out of bounds edict\n");
+ Host_Error("Progs attempted to write to an out of bounds edict");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an out of bounds edict number\n");
+ Host_Error("Progs attempted to read an out of bounds edict number");
return;
}
if (OPB->_int < 0 || OPB->_int >= progs->entityfields)
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an invalid field in an edict\n");
+ Host_Error("Progs attempted to read an invalid field in an edict");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to write to an invalid indexed global\n");
+ Host_Error("Progs attempted to write to an invalid indexed global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to write to an invalid indexed global\n");
+ Host_Error("Progs attempted to write to an invalid indexed global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to address an out of bounds global\n");
+ Host_Error("Progs attempted to address an out of bounds global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an invalid indexed global\n");
+ Host_Error("Progs attempted to read an invalid indexed global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs attempted to read an invalid indexed global\n");
+ Host_Error("Progs attempted to read an invalid indexed global");
return;
}
#endif
pr_xfunction->profile += profile - startprofile;
startprofile = profile;
pr_xstatement = st - pr_statements;
- Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d\n", st->b, st->c);
+ Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d", st->b, st->c);
return;
}
break;
}
}
if (i >= MAXRENDERMODULES)
- Sys_Error("R_RegisterModule: ran out of renderer module slots (%i)\n", MAXRENDERMODULES);
+ Sys_Error("R_RegisterModule: ran out of renderer module slots (%i)", MAXRENDERMODULES);
rendermodule[i].active = 0;
rendermodule[i].name = name;
rendermodule[i].start = start;
R_RTLight_Uncompile(&light->rtlight);
for (lightpointer = &r_shadow_worldlightchain;*lightpointer && *lightpointer != light;lightpointer = &(*lightpointer)->next);
if (*lightpointer != light)
- Sys_Error("R_Shadow_FreeWorldLight: light not linked into chain\n");
+ Sys_Error("R_Shadow_FreeWorldLight: light not linked into chain");
*lightpointer = light->next;
Mem_Free(light);
}
for (i=0 ; i<3 ; i++)
if (min[i] > max[i])
- PRVM_ERROR("SetMinMaxSize: backwards mins/maxs\n");
+ PRVM_ERROR("SetMinMaxSize: backwards mins/maxs");
// set derived values
VectorCopy (min, e->fields.server->mins);
context = qaglCreateContext(pixelFormat, NULL);
qaglDestroyPixelFormat(pixelFormat);
if (context == NULL)
- Sys_Error ("aglCreateContext failed\n");
+ Sys_Error ("aglCreateContext failed");
if (!qaglSetDrawable(context, GetWindowPort(window)))
- Sys_Error ("aglSetDrawable failed\n");
+ Sys_Error ("aglSetDrawable failed");
if (!qaglSetCurrentContext(context))
- Sys_Error ("aglSetCurrentContext failed\n");
+ Sys_Error ("aglSetCurrentContext failed");
scr_width = width;
scr_height = height;
if (fullscreen)
{
if (!qaglSetFullScreen (context, width, height, 0, 0))
- Sys_Error("aglSetFullScreen failed\n");
+ Sys_Error("aglSetFullScreen failed");
vid_isfullscreen = true;
}
void VID_Init (void)
{
if (SDL_Init(SDL_INIT_VIDEO) < 0)
- Sys_Error ("Failed to init video: %s\n", SDL_GetError());
+ Sys_Error ("Failed to init video: %s", SDL_GetError());
vid_isfullscreen = false;
}
gl_support_fragment_shader = false;
if (!GL_CheckExtension("OpenGL 1.1.0", opengl110funcs, NULL, false))
- Sys_Error("OpenGL 1.1.0 functions not found\n");
+ Sys_Error("OpenGL 1.1.0 functions not found");
Con_Printf("GL_VENDOR: %s\n", gl_vendor);
Con_Printf("GL_RENDERER: %s\n", gl_renderer);
{
Con_Print("Video mode change failed\n");
if (!VID_Mode(vid.fullscreen, vid.width, vid.height, vid.bitsperpixel))
- Sys_Error("Unable to restore to last working video mode\n");
+ Sys_Error("Unable to restore to last working video mode");
}
VID_OpenSystems();
}
if (!success && vid_fullscreen.integer)
success = VID_Mode(false, 640, 480, 16);
if (!success)
- Sys_Error("Video modes failed\n");
+ Sys_Error("Video modes failed");
}
VID_OpenSystems();
}
int depth;
if (vid_initialized)
- Sys_Error("VID_InitMode called when video is already initialised\n");
+ Sys_Error("VID_InitMode called when video is already initialised");
// if stencil is enabled, ask for alpha too
if (bpp >= 32)