18 files changed:
}
}
maxfrac = bound(0, maxfrac, 1);
}
}
maxfrac = bound(0, maxfrac, 1);
- maxrealfrac = bound(0, maxrealfrac, 1);
+ //maxrealfrac = bound(0, maxrealfrac, 1);
//if (maxfrac < 0 || maxfrac > 1) Con_Printf("fraction out of bounds %f %s:%d\n", maxfrac, __FILE__, __LINE__);
if (impact)
VectorLerp(start, maxfrac, end, impact);
//if (maxfrac < 0 || maxfrac > 1) Con_Printf("fraction out of bounds %f %s:%d\n", maxfrac, __FILE__, __LINE__);
if (impact)
VectorLerp(start, maxfrac, end, impact);
break;
case qw_svc_chokecount:
break;
case qw_svc_chokecount:
- i = MSG_ReadByte(&cl_message);
+ (void) MSG_ReadByte(&cl_message);
// FIXME: apply to netgraph
//for (j = 0;j < i;j++)
// cl.frames[(cls.netcon->qw.incoming_acknowledged-1-j)&QW_UPDATE_MASK].receivedtime = -2;
// FIXME: apply to netgraph
//for (j = 0;j < i;j++)
// cl.frames[(cls.netcon->qw.incoming_acknowledged-1-j)&QW_UPDATE_MASK].receivedtime = -2;
float *c;
DrawQ_Fill(graphx, graphy, graphwidth, graphheight + textsize * 2, 0, 0, 0, 0.5, 0);
// draw the bar graph itself
float *c;
DrawQ_Fill(graphx, graphy, graphwidth, graphheight + textsize * 2, 0, 0, 0, 0.5, 0);
// draw the bar graph itself
- // advance the packet counter because it is the latest packet column being
- // built up and should come last
- packetcounter = (packetcounter + 1) % NETGRAPH_PACKETS;
memset(g, 0, sizeof(g));
for (j = 0;j < NETGRAPH_PACKETS;j++)
{
memset(g, 0, sizeof(g));
for (j = 0;j < NETGRAPH_PACKETS;j++)
{
{
case 0: // end of string
result += processLine(passthroughPL, startOfLine, cursor - startOfLine, spaceUsedInLine, isContinuation);
{
case 0: // end of string
result += processLine(passthroughPL, startOfLine, cursor - startOfLine, spaceUsedInLine, isContinuation);
- isContinuation = false;
goto out;
case '\n': // end of line
result += processLine(passthroughPL, startOfLine, cursor - startOfLine, spaceUsedInLine, isContinuation);
goto out;
case '\n': // end of line
result += processLine(passthroughPL, startOfLine, cursor - startOfLine, spaceUsedInLine, isContinuation);
return;
// see if the requested csprogs.dat file matches the requested crc
return;
// see if the requested csprogs.dat file matches the requested crc
if (!cls.demoplayback || csqc_usedemoprogs.integer)
{
csprogsfn = va(vabuf, sizeof(vabuf), "dlcache/%s.%i.%i", csqc_progname.string, requiredsize, requiredcrc);
if (!cls.demoplayback || csqc_usedemoprogs.integer)
{
csprogsfn = va(vabuf, sizeof(vabuf), "dlcache/%s.%i.%i", csqc_progname.string, requiredsize, requiredcrc);
d = depth;
size = 0;
mipmaps = 0;
d = depth;
size = 0;
mipmaps = 0;
- w = width;
- h = height;
- d = depth;
for (;;)
{
s = w * h * d * sides * 4;
for (;;)
{
s = w * h * d * sides * 4;
{
for (x = startx;x < endx;x++)
{
{
for (x = startx;x < endx;x++)
{
diffusetex[0] = buffer_texture_colorbgra8[x*4+0];
diffusetex[1] = buffer_texture_colorbgra8[x*4+1];
diffusetex[2] = buffer_texture_colorbgra8[x*4+2];
diffusetex[0] = buffer_texture_colorbgra8[x*4+0];
diffusetex[1] = buffer_texture_colorbgra8[x*4+1];
diffusetex[2] = buffer_texture_colorbgra8[x*4+2];
static void DPSOFTRAST_PixelShader_Water(DPSOFTRAST_State_Thread *thread, const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span)
{
float buffer_z[DPSOFTRAST_DRAW_MAXSPANLENGTH];
static void DPSOFTRAST_PixelShader_Water(DPSOFTRAST_State_Thread *thread, const DPSOFTRAST_State_Triangle * RESTRICT triangle, const DPSOFTRAST_State_Span * RESTRICT span)
{
float buffer_z[DPSOFTRAST_DRAW_MAXSPANLENGTH];
int x, startx = span->startx, endx = span->endx;
// texture reads
int x, startx = span->startx, endx = span->endx;
// texture reads
unsigned char c2[4];
float Fresnel;
unsigned char c2[4];
float Fresnel;
// " vec4 ScreenScaleRefractReflectIW = ScreenScaleRefractReflect * (1.0 / ModelViewProjectionPosition.w);\n"
iw = 1.0f / (ModelViewProjectionPositiondata[3] + ModelViewProjectionPositionslope[3]*x); // / z
// " vec4 ScreenScaleRefractReflectIW = ScreenScaleRefractReflect * (1.0 / ModelViewProjectionPosition.w);\n"
iw = 1.0f / (ModelViewProjectionPositiondata[3] + ModelViewProjectionPositionslope[3]*x); // / z
int depthslope;
unsigned int d;
unsigned char *pixelmask;
int depthslope;
unsigned int d;
unsigned char *pixelmask;
- DPSOFTRAST_State_Triangle *triangle;
- triangle = &thread->triangles[span->triangle];
depthpixel = dpsoftrast.fb_depthpixels + span->y * dpsoftrast.fb_width + span->x;
startx = span->startx;
endx = span->endx;
depthpixel = dpsoftrast.fb_depthpixels + span->y * dpsoftrast.fb_width + span->x;
startx = span->startx;
endx = span->endx;
{
Con_Printf("Failed to load face %i of %s. Falling back to face 0\n", _face, name);
_face = 0;
{
Con_Printf("Failed to load face %i of %s. Falling back to face 0\n", _face, name);
_face = 0;
- status = qFT_New_Memory_Face(font_ft2lib, (FT_Bytes)data, datasize, 0, (FT_Face*)&font->face);
+ status = qFT_New_Memory_Face(font_ft2lib, (FT_Bytes)data, datasize, _face, (FT_Face*)&font->face);
}
font->data = data;
if (status)
}
font->data = data;
if (status)
if (BoxesOverlap(r_refdef.view.origin, r_refdef.view.origin, mins, maxs))
return false;
if (BoxesOverlap(r_refdef.view.origin, r_refdef.view.origin, mins, maxs))
return false;
- x1 = y1 = x2 = y2 = 0;
-
// transform all corners that are infront of the nearclip plane
VectorNegate(r_refdef.view.frustum[4].normal, plane4f);
plane4f[3] = r_refdef.view.frustum[4].dist;
// transform all corners that are infront of the nearclip plane
VectorNegate(r_refdef.view.frustum[4].normal, plane4f);
plane4f[3] = r_refdef.view.frustum[4].dist;
else
width_of = fnt->width_of;
else
width_of = fnt->width_of;
- for (i = 0;((bytes_left = *maxlen - (text - text_start)) > 0) && *text;)
+ i = 0;
+ while (((bytes_left = *maxlen - (text - text_start)) > 0) && *text)
{
size_t i0 = i;
nextch = ch = u8_getnchar(text, &text, bytes_left);
{
size_t i0 = i;
nextch = ch = u8_getnchar(text, &text, bytes_left);
y += r_textshadow.value * vid.height / vid_conheight.value;
}
*/
y += r_textshadow.value * vid.height / vid_conheight.value;
}
*/
- for (i = 0;((bytes_left = maxlen - (text - text_start)) > 0) && *text;)
+ while (((bytes_left = maxlen - (text - text_start)) > 0) && *text)
{
nextch = ch = u8_getnchar(text, &text, bytes_left);
i = text - text_start;
{
nextch = ch = u8_getnchar(text, &text, bytes_left);
i = text - text_start;
if (rsurface.passcolor4f)
{
// generate color arrays
if (rsurface.passcolor4f)
{
// generate color arrays
- c = rsurface.passcolor4f + rsurface.batchfirstvertex * 4;
rsurface.passcolor4f = (float *)R_FrameData_Alloc(rsurface.batchnumvertices * sizeof(float[4]));
rsurface.passcolor4f_vertexbuffer = 0;
rsurface.passcolor4f_bufferoffset = 0;
rsurface.passcolor4f = (float *)R_FrameData_Alloc(rsurface.batchnumvertices * sizeof(float[4]));
rsurface.passcolor4f_vertexbuffer = 0;
rsurface.passcolor4f_bufferoffset = 0;
else
frametime = 0;
decalsystem->lastupdatetime = r_refdef.scene.time;
else
frametime = 0;
decalsystem->lastupdatetime = r_refdef.scene.time;
- decal = decalsystem->decals;
numdecals = decalsystem->numdecals;
for (i = 0, decal = decalsystem->decals;i < numdecals;i++, decal++)
numdecals = decalsystem->numdecals;
for (i = 0, decal = decalsystem->decals;i < numdecals;i++, decal++)
RSurf_ActiveModelEntity(ent, false, false, false);
decalsystem->lastupdatetime = r_refdef.scene.time;
RSurf_ActiveModelEntity(ent, false, false, false);
decalsystem->lastupdatetime = r_refdef.scene.time;
- decal = decalsystem->decals;
faderate = 1.0f / max(0.001f, cl_decals_fadetime.value);
faderate = 1.0f / max(0.001f, cl_decals_fadetime.value);
Host_Init();
realtime = 0;
Host_Init();
realtime = 0;
- dirtytime = Sys_DirtyTime();
for (;;)
{
if (setjmp(host_abortframe))
for (;;)
{
if (setjmp(host_abortframe))
pix_inc = 1;
if ((targa_header.image_type & ~8) == 2)
pix_inc = (targa_header.pixel_size + 7) / 8;
pix_inc = 1;
if ((targa_header.image_type & ~8) == 2)
pix_inc = (targa_header.pixel_size + 7) / 8;
// read frames
for (i = 0;i < groupframes;i++)
{
// read frames
for (i = 0;i < groupframes;i++)
{
- pinframe = (daliasframe_t *)datapointer;
datapointer += sizeof(daliasframe_t);
Mod_ConvertAliasVerts(inverts, (trivertx_t *)datapointer, loadmodel->surfmesh.data_morphmdlvertex + pose * loadmodel->surfmesh.num_vertices, vertremap);
datapointer += sizeof(trivertx_t) * inverts;
datapointer += sizeof(daliasframe_t);
Mod_ConvertAliasVerts(inverts, (trivertx_t *)datapointer, loadmodel->surfmesh.data_morphmdlvertex + pose * loadmodel->surfmesh.num_vertices, vertremap);
datapointer += sizeof(trivertx_t) * inverts;
// TODO: calculate node bounding boxes during recursion and calculate a maximum plane size accordingly to improve precision (as most maps do not need 1 billion unit plane polygons)
PolygonD_QuadForPlane(nodeportal->points, nodeportal->plane.normal[0], nodeportal->plane.normal[1], nodeportal->plane.normal[2], nodeportal->plane.dist, 1024.0*1024.0*1024.0);
nodeportal->numpoints = 4;
// TODO: calculate node bounding boxes during recursion and calculate a maximum plane size accordingly to improve precision (as most maps do not need 1 billion unit plane polygons)
PolygonD_QuadForPlane(nodeportal->points, nodeportal->plane.normal[0], nodeportal->plane.normal[1], nodeportal->plane.normal[2], nodeportal->plane.dist, 1024.0*1024.0*1024.0);
nodeportal->numpoints = 4;
- side = 0; // shut up compiler warning
+ // side = 0; // shut up compiler warning -> should be no longer needed, Host_Error is declared noreturn now
for (portal = (portal_t *)node->portals;portal;portal = portal->next[side])
{
clipplane = portal->plane;
for (portal = (portal_t *)node->portals;portal;portal = portal->next[side])
{
clipplane = portal->plane;
for (surfaceindex = 0;surfaceindex < model->num_surfaces;surfaceindex++)
{
surface = model->data_surfaces + surfaceindex;
for (surfaceindex = 0;surfaceindex < model->num_surfaces;surfaceindex++)
{
surface = model->data_surfaces + surfaceindex;
- e = model->surfmesh.data_element3i + surface->num_firsttriangle*3;
if (!surface->num_triangles)
continue;
lightmapindex = mod_generatelightmaps_lightmaptriangles[surface->num_firsttriangle].lightmapindex;
if (!surface->num_triangles)
continue;
lightmapindex = mod_generatelightmaps_lightmaptriangles[surface->num_firsttriangle].lightmapindex;
newsnapindex = cl.qw_validsequence & QW_UPDATE_MASK;
newsnap = d->snapshot + newsnapindex;
memset(newsnap, 0, sizeof(*newsnap));
newsnapindex = cl.qw_validsequence & QW_UPDATE_MASK;
newsnap = d->snapshot + newsnapindex;
memset(newsnap, 0, sizeof(*newsnap));
oldsnap = NULL;
if (delta)
{
oldsnap = NULL;
if (delta)
{
shadow = true;
for (;COM_Parse(t, true) && strcmp(
if (COM_Parse(t, true))
shadow = true;
for (;COM_Parse(t, true) && strcmp(
if (COM_Parse(t, true))
// do the actual paint now (may skip work if silent)
paint = paintbuffer;
// do the actual paint now (may skip work if silent)
paint = paintbuffer;
- wantframes = totalmixframes;
istartframe = 0;
for (wantframes = totalmixframes;wantframes > 0;posd += count * speedd, wantframes -= count)
{
istartframe = 0;
for (wantframes = totalmixframes;wantframes > 0;posd += count * speedd, wantframes -= count)
{