mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
[renderer] Move some functions from plugins to main lib
One step in cleaning up vid_render_funcs.
This commit is contained in:
parent
2a87983bf4
commit
2eae2e5d74
26 changed files with 76 additions and 129 deletions
|
@ -96,10 +96,6 @@ typedef struct vid_render_funcs_s {
|
|||
void (*Draw_Picf) (float x, float y, qpic_t *pic);
|
||||
void (*Draw_SubPic) (int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height);
|
||||
|
||||
void (*SCR_SetFOV) (float fov);
|
||||
void (*SCR_DrawRam) (void);
|
||||
void (*SCR_DrawTurtle) (void);
|
||||
void (*SCR_DrawPause) (void);
|
||||
struct tex_s *(*SCR_CaptureBGR) (void);
|
||||
struct tex_s *(*SCR_ScreenShot) (unsigned width, unsigned height);
|
||||
void (*SCR_DrawStringToSnap) (const char *s, struct tex_s *tex,
|
||||
|
@ -115,12 +111,7 @@ typedef struct vid_render_funcs_s {
|
|||
void (*R_ClearState) (void);
|
||||
void (*R_LoadSkys) (const char *);
|
||||
void (*R_NewMap) (model_t *worldmodel, model_t **models, int num_models);
|
||||
void (*R_AddEfrags) (mod_brush_t *brush, entity_t *ent);
|
||||
void (*R_RemoveEfrags) (entity_t *ent);
|
||||
void (*R_LineGraph) (int x, int y, int *h_vals, int count, int height);
|
||||
dlight_t *(*R_AllocDlight) (int key);
|
||||
void (*R_MaxDlightsCheck) (struct cvar_s *var);
|
||||
void (*R_DecayLights) (double frametime);
|
||||
|
||||
void (*R_ViewChanged) (void);
|
||||
void (*SCR_ScreenShot_f) (void);
|
||||
|
|
|
@ -239,4 +239,10 @@ void R_LoadModule (struct vid_internal_s *vid_internal);
|
|||
struct progs_s;
|
||||
void R_Progs_Init (struct progs_s *pr);
|
||||
|
||||
void R_AddEfrags (mod_brush_t *, entity_t *ent);
|
||||
void R_RemoveEfrags (entity_t *ent);
|
||||
dlight_t *R_AllocDlight (int key);
|
||||
void R_MaxDlightsCheck (struct cvar_s *var);
|
||||
void R_DecayLights (double frametime);
|
||||
|
||||
#endif//__QF_render_h
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
struct transform_s;
|
||||
|
||||
void SCR_Init (void);
|
||||
void SCR_SetFOV (float fov);
|
||||
|
||||
void SCR_DrawRam (void);
|
||||
void SCR_DrawTurtle (void);
|
||||
void SCR_DrawPause (void);
|
||||
|
||||
typedef void (*SCR_Func)(void);
|
||||
// scr_funcs is a null terminated array
|
||||
|
|
|
@ -62,9 +62,6 @@ struct psystem_s *sw_ParticleSystem (void);
|
|||
struct psystem_s *sw32_ParticleSystem (void);
|
||||
void R_RunParticles (float dT);
|
||||
|
||||
void R_AddEfrags (mod_brush_t *, entity_t *ent);
|
||||
void R_RemoveEfrags (entity_t *ent);
|
||||
|
||||
void R_NewMap (model_t *worldmodel, model_t **models, int num_models);
|
||||
|
||||
// LordHavoc: relative bmodel lighting
|
||||
|
|
|
@ -31,13 +31,9 @@
|
|||
#ifndef __r_screen_h
|
||||
#define __r_screen_h
|
||||
|
||||
void SCR_DrawRam (void);
|
||||
void SCR_DrawTurtle (void);
|
||||
void SCR_DrawPause (void);
|
||||
struct tex_s *SCR_CaptureBGR (void);
|
||||
struct tex_s *SCR_ScreenShot (unsigned width, unsigned height);
|
||||
void SCR_DrawStringToSnap (const char *s, struct tex_s *tex, int x, int y);
|
||||
void SCR_SetFOV (float fov);
|
||||
void SCR_ScreenShot_f (void);
|
||||
int MipColor (int r, int g, int b);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ CL_NewDlight (int key, vec4f_t org, int effects, byte glow_size,
|
|||
return;
|
||||
}
|
||||
|
||||
dl = r_funcs->R_AllocDlight (key);
|
||||
dl = R_AllocDlight (key);
|
||||
if (!dl)
|
||||
return;
|
||||
VectorCopy (org, dl->origin);
|
||||
|
@ -124,7 +124,7 @@ CL_ModelEffects (entity_t *ent, int num, int glow_color, double time)
|
|||
|
||||
// add automatic particle trails
|
||||
if (model->flags & EF_ROCKET) {
|
||||
dl = r_funcs->R_AllocDlight (num);
|
||||
dl = R_AllocDlight (num);
|
||||
if (dl) {
|
||||
VectorCopy (ent_origin, dl->origin);
|
||||
dl->radius = 200.0;
|
||||
|
@ -154,7 +154,7 @@ void
|
|||
CL_MuzzleFlash (vec4f_t position, vec4f_t fv, float zoffset, int num,
|
||||
double time)
|
||||
{
|
||||
dlight_t *dl = r_funcs->R_AllocDlight (num);
|
||||
dlight_t *dl = R_AllocDlight (num);
|
||||
if (dl) {
|
||||
position += 18 * fv;
|
||||
VectorCopy (position, dl->origin);
|
||||
|
|
|
@ -213,7 +213,7 @@ beam_clear (beam_t *b)
|
|||
tent_t *t;
|
||||
|
||||
for (t = b->tents; t; t = t->next) {
|
||||
r_funcs->R_RemoveEfrags (t->ent);
|
||||
R_RemoveEfrags (t->ent);
|
||||
t->ent->visibility.efrag = 0;
|
||||
}
|
||||
free_temp_entities (b->tents);
|
||||
|
@ -271,7 +271,7 @@ beam_setup (beam_t *b, qboolean transform, double time, TEntContext_t *ctx)
|
|||
} else {
|
||||
Transform_SetLocalPosition (tent->ent->transform, position);
|
||||
}
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, tent->ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, tent->ent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ parse_tent (qmsg_t *net_message, double time, TEntContext_t *ctx,
|
|||
clp_funcs->ParticleExplosion (position);
|
||||
|
||||
// light
|
||||
dl = r_funcs->R_AllocDlight (0);
|
||||
dl = R_AllocDlight (0);
|
||||
if (dl) {
|
||||
VectorCopy (position, dl->origin);
|
||||
dl->radius = 350;
|
||||
|
@ -385,7 +385,7 @@ parse_tent (qmsg_t *net_message, double time, TEntContext_t *ctx,
|
|||
colorLength = MSG_ReadByte (net_message);
|
||||
S_StartSound (-1, 0, cl_sfx_r_exp3, &position[0], 1, 1);
|
||||
clp_funcs->ParticleExplosion2 (position, colorStart, colorLength);
|
||||
dl = r_funcs->R_AllocDlight (0);
|
||||
dl = R_AllocDlight (0);
|
||||
if (!dl)
|
||||
break;
|
||||
VectorCopy (position, dl->origin);
|
||||
|
@ -403,7 +403,7 @@ parse_tent (qmsg_t *net_message, double time, TEntContext_t *ctx,
|
|||
color[3] = 0.7;
|
||||
clp_funcs->ParticleExplosion (position);
|
||||
S_StartSound (-1, 0, cl_sfx_r_exp3, &position[0], 1, 1);
|
||||
dl = r_funcs->R_AllocDlight (0);
|
||||
dl = R_AllocDlight (0);
|
||||
if (dl) {
|
||||
VectorCopy (position, dl->origin);
|
||||
dl->radius = 350;
|
||||
|
@ -447,7 +447,7 @@ parse_tent (qmsg_t *net_message, double time, TEntContext_t *ctx,
|
|||
MSG_ReadCoordV (net_message, &position[0]);
|
||||
|
||||
// light
|
||||
dl = r_funcs->R_AllocDlight (0);
|
||||
dl = R_AllocDlight (0);
|
||||
if (dl) {
|
||||
VectorCopy (position, dl->origin);
|
||||
dl->radius = 150;
|
||||
|
@ -620,7 +620,7 @@ CL_UpdateExplosions (double time, TEntContext_t *ctx)
|
|||
f = 10 * (time - ex->start);
|
||||
if (f >= ent->renderer.model->numframes) {
|
||||
tent_obj_t *_to;
|
||||
r_funcs->R_RemoveEfrags (ent);
|
||||
R_RemoveEfrags (ent);
|
||||
ent->visibility.efrag = 0;
|
||||
free_temp_entities (ex->tent);
|
||||
_to = *to;
|
||||
|
@ -632,7 +632,7 @@ CL_UpdateExplosions (double time, TEntContext_t *ctx)
|
|||
|
||||
ent->animation.frame = f;
|
||||
if (!ent->visibility.efrag) {
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -673,7 +673,7 @@ CL_ClearProjectiles (void)
|
|||
tent_t *tent;
|
||||
|
||||
for (tent = cl_projectiles; tent; tent = tent->next) {
|
||||
r_funcs->R_RemoveEfrags (tent->ent);
|
||||
R_RemoveEfrags (tent->ent);
|
||||
tent->ent->visibility.efrag = 0;
|
||||
}
|
||||
free_temp_entities (cl_projectiles);
|
||||
|
@ -721,7 +721,7 @@ CL_ParseProjectiles (qmsg_t *net_message, qboolean nail2, TEntContext_t *ctx)
|
|||
angles[2] = 0;
|
||||
CL_TransformEntity (tent->ent, 1, angles, position);
|
||||
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, tent->ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, tent->ent);
|
||||
}
|
||||
|
||||
*tail = cl_projectiles;
|
||||
|
|
|
@ -119,7 +119,7 @@ CL_ParseStatic (qmsg_t *msg, int version)
|
|||
|
||||
CL_TransformEntity (ent, es.scale / 16.0, es.angles, es.origin);
|
||||
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -298,7 +298,7 @@ locs_draw (double time, vec4f_t simorg)
|
|||
|
||||
nearloc = locs_find (simorg);
|
||||
if (nearloc) {
|
||||
dl = r_funcs->R_AllocDlight (4096);
|
||||
dl = R_AllocDlight (4096);
|
||||
if (dl) {
|
||||
VectorCopy (nearloc->loc, dl->origin);
|
||||
dl->radius = 200;
|
||||
|
|
|
@ -32,12 +32,9 @@ video_renderer_common_sources = \
|
|||
libs/video/renderer/r_billboard.c \
|
||||
libs/video/renderer/r_bsp.c \
|
||||
libs/video/renderer/r_dyn_textures.c \
|
||||
libs/video/renderer/r_efrag.c \
|
||||
libs/video/renderer/r_ent.c \
|
||||
libs/video/renderer/r_graph.c \
|
||||
libs/video/renderer/r_iqm.c \
|
||||
libs/video/renderer/r_light.c \
|
||||
libs/video/renderer/r_main.c \
|
||||
libs/video/renderer/r_part.c \
|
||||
libs/video/renderer/r_sprite.c \
|
||||
libs/video/renderer/vid_common.c
|
||||
|
@ -51,7 +48,10 @@ libs_video_renderer_libQFrenderer_la_LIBADD= $(renderer_libs)
|
|||
libs_video_renderer_libQFrenderer_la_DEPENDENCIES= $(renderer_libs)
|
||||
libs_video_renderer_libQFrenderer_la_SOURCES=\
|
||||
libs/video/renderer/r_cvar.c \
|
||||
libs/video/renderer/r_efrag.c \
|
||||
libs/video/renderer/r_init.c \
|
||||
libs/video/renderer/r_light.c \
|
||||
libs/video/renderer/r_main.c \
|
||||
libs/video/renderer/r_scrap.c \
|
||||
libs/video/renderer/r_screen.c \
|
||||
libs/video/renderer/r_progs.c
|
||||
|
|
|
@ -200,7 +200,7 @@ viewsize_f (cvar_t *var)
|
|||
static void
|
||||
r_dlight_max_f (cvar_t *var)
|
||||
{
|
||||
r_funcs->R_MaxDlightsCheck (var);
|
||||
R_MaxDlightsCheck (var);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -46,6 +46,8 @@ typedef struct s_efrag_list {
|
|||
static efrag_t *r_free_efrags;
|
||||
static t_efrag_list *efrag_list;
|
||||
|
||||
entqueue_t *r_ent_queue;
|
||||
|
||||
/* ENTITY FRAGMENT FUNCTIONS */
|
||||
|
||||
static inline void
|
||||
|
@ -204,11 +206,9 @@ R_AddEfrags (mod_brush_t *brush, entity_t *ent)
|
|||
model_t *entmodel;
|
||||
vec3_t emins, emaxs;
|
||||
|
||||
if (!ent->renderer.model || !r_worldentity.renderer.model)
|
||||
if (!ent->renderer.model) {
|
||||
return;
|
||||
|
||||
if (ent == &r_worldentity)
|
||||
return; // never add the world
|
||||
}
|
||||
|
||||
entmodel = ent->renderer.model;
|
||||
|
||||
|
|
|
@ -48,8 +48,6 @@
|
|||
|
||||
#include "r_internal.h"
|
||||
|
||||
entqueue_t *r_ent_queue;
|
||||
|
||||
float
|
||||
R_EntityBlend (animation_t *animation, int pose, float interval)
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@ R_FindNearLights (const vec3_t pos, int count, dlight_t **lights)
|
|||
|
||||
dl = r_dlights;
|
||||
for (i = 0; i < r_maxdlights; i++, dl++) {
|
||||
if (dl->die < vr_data.realtime || !dl->radius)
|
||||
if (dl->die < r_data->realtime || !dl->radius)
|
||||
continue;
|
||||
VectorSubtract (dl->origin, pos, d);
|
||||
score = DotProduct (d, d) / dl->radius;
|
||||
|
@ -128,19 +128,19 @@ R_AnimateLight (void)
|
|||
|
||||
// light animations
|
||||
// 'm' is normal light, 'a' is no light, 'z' is double bright
|
||||
i = (int) (vr_data.realtime * 10);
|
||||
i = (int) (r_data->realtime * 10);
|
||||
for (j = 0; j < MAX_LIGHTSTYLES; j++) {
|
||||
if (!vr_data.lightstyle[j].length) {
|
||||
if (!r_data->lightstyle[j].length) {
|
||||
d_lightstylevalue[j] = 256;
|
||||
continue;
|
||||
}
|
||||
if (r_flatlightstyles->int_val == 2) {
|
||||
k = vr_data.lightstyle[j].peak - 'a';
|
||||
k = r_data->lightstyle[j].peak - 'a';
|
||||
} else if (r_flatlightstyles->int_val == 1) {
|
||||
k = vr_data.lightstyle[j].average - 'a';
|
||||
k = r_data->lightstyle[j].average - 'a';
|
||||
} else {
|
||||
k = i % vr_data.lightstyle[j].length;
|
||||
k = vr_data.lightstyle[j].map[k] - 'a';
|
||||
k = i % r_data->lightstyle[j].length;
|
||||
k = r_data->lightstyle[j].map[k] - 'a';
|
||||
}
|
||||
d_lightstylevalue[j] = k * 22;
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ R_PushDlights (const vec3_t entorigin)
|
|||
l = r_dlights;
|
||||
|
||||
for (i = 0; i < r_maxdlights; i++, l++) {
|
||||
if (l->die < vr_data.realtime || !l->radius)
|
||||
if (l->die < r_data->realtime || !l->radius)
|
||||
continue;
|
||||
VectorSubtract (l->origin, entorigin, lightorigin);
|
||||
R_MarkLights (lightorigin, l, i, r_worldentity.renderer.model);
|
||||
|
@ -526,7 +526,7 @@ R_AllocDlight (int key)
|
|||
// then look for anything else
|
||||
dl = r_dlights;
|
||||
for (i = 0; i < r_maxdlights; i++, dl++) {
|
||||
if (dl->die < vr_data.realtime) {
|
||||
if (dl->die < r_data->realtime) {
|
||||
memset (dl, 0, sizeof (*dl));
|
||||
dl->key = key;
|
||||
dl->color[0] = dl->color[1] = dl->color[2] = 1;
|
||||
|
@ -548,7 +548,7 @@ R_DecayLights (double frametime)
|
|||
|
||||
dl = r_dlights;
|
||||
for (i = 0; i < r_maxdlights; i++, dl++) {
|
||||
if (dl->die < vr_data.realtime || !dl->radius)
|
||||
if (dl->die < r_data->realtime || !dl->radius)
|
||||
continue;
|
||||
|
||||
dl->radius -= frametime * dl->decay;
|
||||
|
|
|
@ -131,10 +131,6 @@ vid_render_funcs_t gl_vid_render_funcs = {
|
|||
gl_Draw_Picf,
|
||||
gl_Draw_SubPic,
|
||||
|
||||
SCR_SetFOV,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
gl_SCR_CaptureBGR,
|
||||
gl_SCR_ScreenShot,
|
||||
SCR_DrawStringToSnap,
|
||||
|
@ -148,12 +144,7 @@ vid_render_funcs_t gl_vid_render_funcs = {
|
|||
gl_R_ClearState,
|
||||
gl_R_LoadSkys,
|
||||
gl_R_NewMap,
|
||||
R_AddEfrags,
|
||||
R_RemoveEfrags,
|
||||
gl_R_LineGraph,
|
||||
R_AllocDlight,
|
||||
R_MaxDlightsCheck,
|
||||
R_DecayLights,
|
||||
gl_R_ViewChanged,
|
||||
gl_SCR_ScreenShot_f,
|
||||
&model_funcs
|
||||
|
|
|
@ -130,10 +130,6 @@ vid_render_funcs_t glsl_vid_render_funcs = {
|
|||
glsl_Draw_Picf,
|
||||
glsl_Draw_SubPic,
|
||||
|
||||
SCR_SetFOV,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
glsl_SCR_CaptureBGR,
|
||||
glsl_SCR_ScreenShot,
|
||||
SCR_DrawStringToSnap,
|
||||
|
@ -147,12 +143,7 @@ vid_render_funcs_t glsl_vid_render_funcs = {
|
|||
glsl_R_ClearState,
|
||||
glsl_R_LoadSkys,
|
||||
glsl_R_NewMap,
|
||||
R_AddEfrags,
|
||||
R_RemoveEfrags,
|
||||
glsl_R_LineGraph,
|
||||
R_AllocDlight,
|
||||
R_MaxDlightsCheck,
|
||||
R_DecayLights,
|
||||
glsl_R_ViewChanged,
|
||||
glsl_SCR_ScreenShot_f,
|
||||
&model_funcs
|
||||
|
|
|
@ -127,10 +127,6 @@ vid_render_funcs_t sw_vid_render_funcs = {
|
|||
Draw_Picf,
|
||||
Draw_SubPic,
|
||||
|
||||
SCR_SetFOV,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
SCR_CaptureBGR,
|
||||
SCR_ScreenShot,
|
||||
SCR_DrawStringToSnap,
|
||||
|
@ -144,12 +140,7 @@ vid_render_funcs_t sw_vid_render_funcs = {
|
|||
R_ClearState,
|
||||
R_LoadSkys,
|
||||
R_NewMap,
|
||||
R_AddEfrags,
|
||||
R_RemoveEfrags,
|
||||
R_LineGraph,
|
||||
R_AllocDlight,
|
||||
R_MaxDlightsCheck,
|
||||
R_DecayLights,
|
||||
R_ViewChanged,
|
||||
SCR_ScreenShot_f,
|
||||
&model_funcs
|
||||
|
|
|
@ -132,10 +132,6 @@ vid_render_funcs_t sw32_vid_render_funcs = {
|
|||
sw32_Draw_Picf,
|
||||
sw32_Draw_SubPic,
|
||||
|
||||
SCR_SetFOV,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
sw32_SCR_CaptureBGR,
|
||||
sw32_SCR_ScreenShot,
|
||||
SCR_DrawStringToSnap,
|
||||
|
@ -149,12 +145,7 @@ vid_render_funcs_t sw32_vid_render_funcs = {
|
|||
sw32_R_ClearState,
|
||||
sw32_R_LoadSkys,
|
||||
sw32_R_NewMap,
|
||||
R_AddEfrags,
|
||||
R_RemoveEfrags,
|
||||
sw32_R_LineGraph,
|
||||
R_AllocDlight,
|
||||
R_MaxDlightsCheck,
|
||||
R_DecayLights,
|
||||
sw32_R_ViewChanged,
|
||||
sw32_SCR_ScreenShot_f,
|
||||
&model_funcs
|
||||
|
|
|
@ -661,10 +661,6 @@ vid_render_funcs_t vulkan_vid_render_funcs = {
|
|||
vulkan_Draw_Picf,
|
||||
vulkan_Draw_SubPic,
|
||||
|
||||
SCR_SetFOV,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
vulkan_SCR_CaptureBGR,
|
||||
vulkan_SCR_ScreenShot,
|
||||
SCR_DrawStringToSnap,
|
||||
|
@ -678,12 +674,7 @@ vid_render_funcs_t vulkan_vid_render_funcs = {
|
|||
vulkan_R_ClearState,
|
||||
vulkan_R_LoadSkys,
|
||||
vulkan_R_NewMap,
|
||||
R_AddEfrags,
|
||||
R_RemoveEfrags,
|
||||
vulkan_R_LineGraph,
|
||||
R_AllocDlight,
|
||||
R_MaxDlightsCheck,
|
||||
R_DecayLights,
|
||||
vulkan_R_ViewChanged,
|
||||
vulkan_SCR_ScreenShot_f,
|
||||
&model_funcs
|
||||
|
|
|
@ -212,7 +212,7 @@ CL_RelinkEntities (void)
|
|||
renderer->model = NULL;
|
||||
animation->pose1 = animation->pose2 = -1;
|
||||
if (ent->visibility.efrag) {
|
||||
r_funcs->R_RemoveEfrags (ent); // just became empty
|
||||
R_RemoveEfrags (ent); // just became empty
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -261,9 +261,9 @@ CL_RelinkEntities (void)
|
|||
new->origin);
|
||||
if (i != cl.viewentity || chase_active->int_val) {
|
||||
if (ent->visibility.efrag) {
|
||||
r_funcs->R_RemoveEfrags (ent);
|
||||
R_RemoveEfrags (ent);
|
||||
}
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
}
|
||||
ent->old_origin = new->origin;
|
||||
} else {
|
||||
|
@ -298,11 +298,11 @@ CL_RelinkEntities (void)
|
|||
vec4f_t org
|
||||
= Transform_GetWorldPosition (ent->transform);
|
||||
if (!VectorCompare (org, ent->old_origin)) {//FIXME
|
||||
r_funcs->R_RemoveEfrags (ent);
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_RemoveEfrags (ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
}
|
||||
} else {
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,9 +100,9 @@ scr_draw_views (void)
|
|||
|
||||
static SCR_Func scr_funcs_normal[] = {
|
||||
0, //Draw_Crosshair,
|
||||
0, //SCR_DrawRam,
|
||||
0, //SCR_DrawTurtle,
|
||||
0, //SCR_DrawPause,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
Sbar_Draw,
|
||||
SCR_CShift,
|
||||
Sbar_DrawCenterPrint,
|
||||
|
@ -164,9 +164,6 @@ CL_UpdateScreen (double realtime)
|
|||
r_data->min_wateralpha = 1.0;
|
||||
}
|
||||
scr_funcs_normal[0] = r_funcs->Draw_Crosshair;
|
||||
scr_funcs_normal[1] = r_funcs->SCR_DrawRam;
|
||||
scr_funcs_normal[2] = r_funcs->SCR_DrawTurtle;
|
||||
scr_funcs_normal[3] = r_funcs->SCR_DrawPause;
|
||||
|
||||
cl.viewstate.intermission = cl.intermission != 0;
|
||||
V_PrepBlend (&cl.viewstate);
|
||||
|
|
|
@ -617,7 +617,7 @@ Host_ClientFrame (void)
|
|||
if (l)
|
||||
asl = l->ambient_sound_level;
|
||||
S_Update (cl.viewstate.camera_transform, asl);
|
||||
r_funcs->R_DecayLights (host_frametime);
|
||||
R_DecayLights (host_frametime);
|
||||
} else
|
||||
S_Update (0, 0);
|
||||
|
||||
|
|
|
@ -165,3 +165,8 @@ console_client_PluginInfo (void)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
R_DecayLights (double frametime)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ CL_LinkPacketEntities (void)
|
|||
renderer->model = NULL;
|
||||
animation->pose1 = animation->pose2 = -1;
|
||||
if (ent->visibility.efrag) {
|
||||
r_funcs->R_RemoveEfrags (ent); // just became empty
|
||||
R_RemoveEfrags (ent); // just became empty
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ CL_LinkPacketEntities (void)
|
|||
|| (cl_deadbodyfilter->int_val && is_dead_body (new))
|
||||
|| (cl_gibfilter->int_val && is_gib (new))) {
|
||||
if (ent->visibility.efrag) {
|
||||
r_funcs->R_RemoveEfrags (ent);
|
||||
R_RemoveEfrags (ent);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -232,9 +232,9 @@ CL_LinkPacketEntities (void)
|
|||
new->origin);
|
||||
if (i != cl.viewentity || chase_active->int_val) {
|
||||
if (ent->visibility.efrag) {
|
||||
r_funcs->R_RemoveEfrags (ent);
|
||||
R_RemoveEfrags (ent);
|
||||
}
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
}
|
||||
} else {
|
||||
vec4f_t delta = new->origin - old->origin;
|
||||
|
@ -265,16 +265,16 @@ CL_LinkPacketEntities (void)
|
|||
vec4f_t org
|
||||
= Transform_GetWorldPosition (ent->transform);
|
||||
if (!VectorCompare (org, ent->old_origin)) {//FIXME
|
||||
r_funcs->R_RemoveEfrags (ent);
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_RemoveEfrags (ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
}
|
||||
} else {
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!ent->visibility.efrag) {
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
}
|
||||
|
||||
// rotate binary objects locally
|
||||
|
@ -400,9 +400,9 @@ CL_LinkPlayers (void)
|
|||
j < MAX_CLIENTS; j++, player++, state++) {
|
||||
ent = CL_GetEntity (j + 1);
|
||||
if (ent->visibility.efrag)
|
||||
r_funcs->R_RemoveEfrags (ent);
|
||||
R_RemoveEfrags (ent);
|
||||
if (player->flag_ent && player->flag_ent->visibility.efrag) {
|
||||
r_funcs->R_RemoveEfrags (player->flag_ent);
|
||||
R_RemoveEfrags (player->flag_ent);
|
||||
}
|
||||
if (state->messagenum != cl.parsecount)
|
||||
continue; // not present this frame
|
||||
|
@ -421,7 +421,7 @@ CL_LinkPlayers (void)
|
|||
clientplayer = false;
|
||||
}
|
||||
if (player->chat && player->chat->value[0] != '0') {
|
||||
dlight_t *dl = r_funcs->R_AllocDlight (j + 1);
|
||||
dlight_t *dl = R_AllocDlight (j + 1);
|
||||
VectorCopy (org, dl->origin);
|
||||
dl->radius = 100;
|
||||
dl->die = cl.time + 0.1;
|
||||
|
@ -511,10 +511,10 @@ CL_LinkPlayers (void)
|
|||
}
|
||||
|
||||
// stuff entity in map
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, ent);
|
||||
if (player->flag_ent) {
|
||||
CL_UpdateFlagModels (ent, j);
|
||||
r_funcs->R_AddEfrags (&cl_world.worldmodel->brush, player->flag_ent);
|
||||
R_AddEfrags (&cl_world.worldmodel->brush, player->flag_ent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1735,7 +1735,7 @@ Host_Frame (float time)
|
|||
if (l)
|
||||
asl = l->ambient_sound_level;
|
||||
S_Update (cl.viewstate.camera_transform, asl);
|
||||
r_funcs->R_DecayLights (host_frametime);
|
||||
R_DecayLights (host_frametime);
|
||||
} else
|
||||
S_Update (0, 0);
|
||||
|
||||
|
|
|
@ -109,9 +109,9 @@ scr_draw_views (void)
|
|||
|
||||
static SCR_Func scr_funcs_normal[] = {
|
||||
0, //Draw_Crosshair,
|
||||
0, //SCR_DrawRam,
|
||||
0, //SCR_DrawTurtle,
|
||||
0, //SCR_DrawPause,
|
||||
SCR_DrawRam,
|
||||
SCR_DrawTurtle,
|
||||
SCR_DrawPause,
|
||||
Sbar_Draw,
|
||||
SCR_CShift,
|
||||
scr_draw_views,
|
||||
|
@ -185,9 +185,6 @@ CL_UpdateScreen (double realtime)
|
|||
r_data->min_wateralpha = 1.0;
|
||||
}
|
||||
scr_funcs_normal[0] = r_funcs->Draw_Crosshair;
|
||||
scr_funcs_normal[1] = r_funcs->SCR_DrawRam;
|
||||
scr_funcs_normal[2] = r_funcs->SCR_DrawTurtle;
|
||||
scr_funcs_normal[3] = r_funcs->SCR_DrawPause;
|
||||
|
||||
if (cl.viewstate.flags & VF_GIB) {
|
||||
cl.viewstate.height = 8; // gib view height
|
||||
|
|
Loading…
Reference in a new issue