From e6d94a372b735da79d9aba8a8fc503559c0d57a0 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Wed, 16 Jan 2002 06:20:30 +0000 Subject: [PATCH] forgot to remove these git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1344 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_effects.c | 142 --------------------------------------------------- r_decals.h | 6 --- 2 files changed, 148 deletions(-) delete mode 100644 cl_effects.c delete mode 100644 r_decals.h diff --git a/cl_effects.c b/cl_effects.c deleted file mode 100644 index 5020aaa4..00000000 --- a/cl_effects.c +++ /dev/null @@ -1,142 +0,0 @@ -/* -Copyright (C) 1996-1997 Id Software, Inc. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "quakedef.h" - -#define MAX_EFFECTS 256 - -typedef struct effect_s -{ - int active; - vec3_t origin; - float starttime; - float framerate; - int modelindex; - int startframe; - int endframe; - // these are for interpolation - int frame; - double frame1time; - double frame2time; -} -effect_t; - -static effect_t effect[MAX_EFFECTS]; - -static cvar_t r_draweffects = {0, "r_draweffects", "1"}; - -static void r_effects_start(void) -{ - memset(effect, 0, sizeof(effect)); -} - -static void r_effects_shutdown(void) -{ -} - -static void r_effects_newmap(void) -{ - memset(effect, 0, sizeof(effect)); -} - -void CL_Effects_Init(void) -{ - Cvar_RegisterVariable(&r_draweffects); - - R_RegisterModule("R_Effects", r_effects_start, r_effects_shutdown, r_effects_newmap); -} - -void CL_Effect(vec3_t org, int modelindex, int startframe, int framecount, float framerate) -{ - int i; - effect_t *e; - if (!modelindex) // sanity check - return; - for (i = 0, e = effect;i < MAX_EFFECTS;i++, e++) - { - if (e->active) - continue; - e->active = true; - VectorCopy(org, e->origin); - e->modelindex = modelindex; - e->starttime = cl.time; - e->startframe = startframe; - e->endframe = startframe + framecount; - e->framerate = framerate; - - e->frame = 0; - e->frame1time = cl.time; - e->frame2time = cl.time; - break; - } -} - -extern void CL_LerpAnimation(entity_t *e); - -void CL_DoEffects() -{ - int i, intframe; - effect_t *e; - entity_t *vis; - float frame; - - for (i = 0, e = effect;i < MAX_EFFECTS;i++, e++) - { - if (e->active) - { - frame = (cl.time - e->starttime) * e->framerate + e->startframe; - intframe = frame; - if (intframe < 0 || intframe >= e->endframe) - { - e->active = false; - memset(e, 0, sizeof(*e)); - continue; - } - - if (intframe != e->frame) - { - e->frame = intframe; - e->frame1time = e->frame2time; - e->frame2time = cl.time; - } - - if ((vis = CL_NewTempEntity())) - { - // interpolation stuff - vis->render.frame1 = intframe; - vis->render.frame2 = intframe + 1; - if (vis->render.frame2 >= e->endframe) - vis->render.frame2 = -1; // disappear - vis->render.framelerp = frame - intframe; - vis->render.frame1time = e->frame1time; - vis->render.frame2time = e->frame2time; - - // normal stuff - VectorCopy(e->origin, vis->render.origin); - vis->render.model = cl.model_precache[e->modelindex]; - vis->render.frame = vis->render.frame2; - vis->render.colormap = -1; // no special coloring - vis->render.scale = 1; - vis->render.alpha = 1; - vis->render.colormod[0] = vis->render.colormod[1] = vis->render.colormod[2] = 1; - } - } - } -} diff --git a/r_decals.h b/r_decals.h deleted file mode 100644 index 87939658..00000000 --- a/r_decals.h +++ /dev/null @@ -1,6 +0,0 @@ - -void R_Decals_Init(void); - -void GL_DrawDecals(void); - -void R_Decal(vec3_t org, rtexture_t *tex, float s1, float t1, float s2, float t2, float scale, int cred, int cgreen, int cblue, int alpha); -- 2.39.2