void V_CalcViewBlend(void);
void V_CalcRefdefUsing (const matrix4x4_t *entrendermatrix, const vec3_t clviewangles, qboolean teleported, qboolean clonground, qboolean clcmdjump, float clstatsviewheight, qboolean cldead, qboolean clintermission, const vec3_t clvelocity);
void V_CalcRefdef(void);
+void V_MakeViewIsometric(void);
+void V_MakeViewIsometric(void);
+void V_StartPitchDrift(void);
void CL_Locs_Reload_f(cmd_state_t *cmd);
#endif
qboolean R_CanSeeBox(int numsamples, vec_t eyejitter, vec_t entboxenlarge, vec_t entboxexpand, vec_t pad, vec3_t eye, vec3_t entboxmins, vec3_t entboxmaxs)
{
- int i;
+ long unsigned int i;
+ int j;
vec3_t eyemins, eyemaxs;
vec3_t boxmins, boxmaxs;
vec3_t padmins, padmaxs;
vec3_t start;
vec3_t end;
+ trace_t trace;
dp_model_t *model = r_refdef.scene.worldmodel;
static vec3_t positions[] = {
{ 0.5f, 0.5f, 0.5f },
end[1] = boxmins[1] + (boxmaxs[1] - boxmins[1]) * positions[i][1];
end[2] = boxmins[2] + (boxmaxs[2] - boxmins[2]) * positions[i][2];
//trace_t trace = CL_TraceLine(start, end, MOVE_NORMAL, NULL, SUPERCONTENTS_SOLID, SUPERCONTENTS_SKY, MATERIALFLAGMASK_TRANSLUCENT, 0.0f, true, false, NULL, true, true);
- trace_t trace = CL_Cache_TraceLineSurfaces(start, end, MOVE_NORMAL, SUPERCONTENTS_SOLID, 0, MATERIALFLAGMASK_TRANSLUCENT);
+ trace = CL_Cache_TraceLineSurfaces(start, end, MOVE_NORMAL, SUPERCONTENTS_SOLID, 0, MATERIALFLAGMASK_TRANSLUCENT);
// not picky - if the trace ended anywhere in the box we're good
if (BoxesOverlap(trace.endpos, trace.endpos, padmins, padmaxs))
return true;
return true;
// try various random positions
- for (i = 0; i < numsamples; i++)
+ for (j = 0; j < numsamples; j++)
{
VectorSet(start, lhrandom(eyemins[0], eyemaxs[0]), lhrandom(eyemins[1], eyemaxs[1]), lhrandom(eyemins[2], eyemaxs[2]));
VectorSet(end, lhrandom(boxmins[0], boxmaxs[0]), lhrandom(boxmins[1], boxmaxs[1]), lhrandom(boxmins[2], boxmaxs[2]));
Send back ping and packet loss update for all current players to this player
====================
*/
-void Host_Pings_f(cmd_state_t *cmd)
+static void Host_Pings_f(cmd_state_t *cmd)
{
int i, j, ping, packetloss, movementloss;
char temp[128];
}
// gfx/conchars is a raw 128x128 image with 0 as transparent color rather than 255
-unsigned char *LoadConChars_BGRA(const unsigned char *f, int filesize, int *miplevel)
+static unsigned char *LoadConChars_BGRA(const unsigned char *f, int filesize, int *miplevel)
{
unsigned char *image_buffer;
int i;
{
fs_offset_t filesize;
imageformat_t *firstformat, *format;
+ int mymiplevel;
unsigned char *f, *data = NULL, *data2 = NULL;
char basename[MAX_QPATH], name[MAX_QPATH], name2[MAX_QPATH], path[MAX_QPATH], afterpath[MAX_QPATH], *c;
char vabuf[1024];
f = FS_LoadFile(name, tempmempool, true, &filesize);
if (f)
{
- int mymiplevel = miplevel ? *miplevel : 0;
+ mymiplevel = miplevel ? *miplevel : 0;
image_width = 0;
image_height = 0;
data = format->loadfunc(f, (int)filesize, &mymiplevel);
if (developer_loading.integer)
Con_Printf("loading gfx.wad lump \"%s\"\n", afterpath);
- int mymiplevel = miplevel ? *miplevel : 0;
+ mymiplevel = miplevel ? *miplevel : 0;
if (!strcmp(afterpath, "conchars"))
{
// conchars is a raw image and with color 0 as transparent instead of 255
void Mod_UnloadCustomMaterial(texture_t *texture, qboolean purgeskins)
{
- int i, j;
+ long unsigned int i, j;
for (i = 0; i < sizeof(texture->shaderpasses) / sizeof(texture->shaderpasses[0]); i++)
{
if (texture->shaderpasses[i])
}
}
-void Mod_Mesh_ComputeBounds(dp_model_t *mod)
+static void Mod_Mesh_ComputeBounds(dp_model_t *mod)
{
int i;
vec_t x2a, x2b, y2a, y2b, z2a, z2b, x2, y2, z2, yawradius, rotatedradius;
}
}
-void Mod_Mesh_UploadDynamicBuffers(dp_model_t *mod)
+static void Mod_Mesh_UploadDynamicBuffers(dp_model_t *mod)
{
mod->surfmesh.data_element3s_indexbuffer = mod->surfmesh.data_element3s ? R_BufferData_Store(mod->surfmesh.num_triangles * sizeof(short[3]), mod->surfmesh.data_element3s, R_BUFFERDATA_INDEX16, &mod->surfmesh.data_element3s_bufferoffset) : NULL;
mod->surfmesh.data_element3i_indexbuffer = mod->surfmesh.data_element3i ? R_BufferData_Store(mod->surfmesh.num_triangles * sizeof(int[3]), mod->surfmesh.data_element3i, R_BUFFERDATA_INDEX32, &mod->surfmesh.data_element3i_bufferoffset) : NULL;
static void R_Shadow_RenderMode_ShadowMap(int side, int size, int x, int y)
{
- float nearclip, farclip, bias;
+ float nearclip, farclip;
r_viewport_t viewport;
int flipped;
nearclip = r_shadow_shadowmapping_nearclip.value / rsurface.rtlight->radius;
farclip = 1.0f;
- bias = r_shadow_shadowmapping_bias.value * nearclip * (1024.0f / size);// * rsurface.rtlight->radius;
R_Viewport_InitRectSideView(&viewport, &rsurface.rtlight->matrix_lighttoworld, side, size, r_shadow_shadowmapborder, nearclip, farclip, NULL, x, y);
R_SetViewport(&viewport);
r_shadow_bouncegrid_state.lastupdatetime = realtime;
}
-void R_Shadow_BounceGrid_ClearTex_Task(taskqueue_task_t *t)
+static void R_Shadow_BounceGrid_ClearTex_Task(taskqueue_task_t *t)
{
memset(r_shadow_bouncegrid_state.highpixels, 0, r_shadow_bouncegrid_state.numpixels * sizeof(float[4]));
t->done = 1;
int numlightentities_noselfshadow;
entity_render_t **lightentities;
entity_render_t **lightentities_noselfshadow;
- entity_render_t **shadowentities;
- entity_render_t **shadowentities_noselfshadow;
int *surfacelist;
qboolean castshadows;
numsurfaces = rtlight->cached_numsurfaces;
lightentities = rtlight->cached_lightentities;
lightentities_noselfshadow = rtlight->cached_lightentities_noselfshadow;
- shadowentities = rtlight->cached_shadowentities;
- shadowentities_noselfshadow = rtlight->cached_shadowentities_noselfshadow;
lighttrispvs = rtlight->cached_lighttrispvs;
surfacelist = rtlight->cached_surfacelist;
castshadows = rtlight->castshadows;
if (castshadows && r_shadow_shadowmode == R_SHADOW_SHADOWMODE_SHADOWMAP2D)
{
- float borderbias;
- int size;
matrix4x4_t radiustolight = rtlight->matrix_worldtolight;
Matrix4x4_Abs(&radiustolight);
- size = rtlight->shadowmapatlassidesize;
- borderbias = r_shadow_shadowmapborder / (float)(size - r_shadow_shadowmapborder);
-
//Con_Printf("distance %f lodlinear %i size %i\n", distance, lodlinear, size);
// render lighting using the depth texture as shadowmap
}
#define MAX_SCENELIGHTS 65536
-qboolean R_Shadow_PrepareLights_AddSceneLight(rtlight_t *rtlight)
+static qboolean R_Shadow_PrepareLights_AddSceneLight(rtlight_t *rtlight)
{
if (r_shadow_scenemaxlights <= r_shadow_scenenumlights)
{
if (i >= MAX_CL_STATS)
{
- VM_Warning(prog, "PF_SV_AddStat: index (%i) >= MAX_CL_STATS (%i), not supported by protocol, and AddStat beyond MAX_VM_STAT conflicts with engine MOVEVARS\n", i, MAX_CL_STATS, MAX_VM_STAT);
+ VM_Warning(prog, "PF_SV_AddStat: index (%i) >= MAX_CL_STATS (%i), not supported by protocol, and AddStat beyond MAX_VM_STAT (%i) conflicts with engine MOVEVARS\n", i, MAX_CL_STATS, MAX_VM_STAT);
return;
}
if (i > (MAX_CL_STATS - 4) && type == 1)
{
- VM_Warning(prog, "PF_SV_AddStat: index (%i) > (MAX_CL_STATS-4) with string type won't fit in the protocol, and AddStat beyond MAX_VM_STAT conflicts with engine MOVEVARS\n", i, MAX_CL_STATS);
+ VM_Warning(prog, "PF_SV_AddStat: index (%i) > (MAX_CL_STATS (%i) - 4) with string type won't fit in the protocol, and AddStat beyond MAX_VM_STAT conflicts with engine MOVEVARS\n", i, MAX_CL_STATS);
return;
}
return !t->done != 0;
}
-void TaskQueue_DistributeTasks(void)
+static void TaskQueue_DistributeTasks(void)
{
Thread_AtomicLock(&taskqueue_state.command_lock);
if (taskqueue_state.numthreads > 0)
}
#endif
+extern cvar_t gl_info_vendor;
+extern cvar_t gl_info_renderer;
+extern cvar_t gl_info_version;
+extern cvar_t gl_info_platform;
+extern cvar_t gl_info_driver;
+
static qboolean VID_InitModeGL(viddef_mode_t *mode)
{
int windowflags = SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL;
GL_Setup();
// VorteX: set other info
- extern cvar_t gl_info_vendor;
- extern cvar_t gl_info_renderer;
- extern cvar_t gl_info_version;
- extern cvar_t gl_info_platform;
- extern cvar_t gl_info_driver;
Cvar_SetQuick(&gl_info_vendor, gl_vendor);
Cvar_SetQuick(&gl_info_renderer, gl_renderer);
Cvar_SetQuick(&gl_info_version, gl_version);