header for dynlight
parent
2749bda141
commit
0be4009cb6
|
@ -1,3 +1,5 @@
|
|||
#include "dynlight.hh"
|
||||
|
||||
#include "pvs.hh"
|
||||
#include "renderva.hh"
|
||||
|
||||
|
@ -52,8 +54,8 @@ struct dynlight
|
|||
}
|
||||
};
|
||||
|
||||
vector<dynlight> dynlights;
|
||||
vector<dynlight *> closedynlights;
|
||||
static vector<dynlight> dynlights;
|
||||
static vector<dynlight *> closedynlights;
|
||||
|
||||
void adddynlight(const vec &o, float radius, const vec &color, int fade, int peak, int flags, float initradius, const vec &initcolor, physent *owner, const vec &dir, int spot)
|
||||
{
|
||||
|
@ -78,7 +80,7 @@ void adddynlight(const vec &o, float radius, const vec &color, int fade, int pea
|
|||
dynlights.insert(insert, d);
|
||||
}
|
||||
|
||||
void cleardynlights()
|
||||
static void cleardynlights()
|
||||
{
|
||||
int faded = -1;
|
||||
loopv(dynlights) if(lastmillis<dynlights[i].expire) { faded = i; break; }
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef ENGINE_DYNLIGHT_HH
|
||||
#define ENGINE_DYNLIGHT_HH
|
||||
|
||||
#include <shared/geom.hh>
|
||||
|
||||
struct physent;
|
||||
|
||||
enum
|
||||
{
|
||||
DL_SHRINK = 1<<8,
|
||||
DL_EXPAND = 1<<9,
|
||||
DL_FLASH = 1<<10
|
||||
};
|
||||
|
||||
void adddynlight(const vec &o, float radius, const vec &color, int fade = 0, int peak = 0, int flags = 0, float initradius = 0, const vec &initcolor = vec(0, 0, 0), physent *owner = NULL, const vec &dir = vec(0, 0, 0), int spot = 0);
|
||||
void dynlightreaching(const vec &target, vec &color, vec &dir, bool hud = false);
|
||||
void removetrackeddynlights(physent *owner = NULL);
|
||||
|
||||
void updatedynlights();
|
||||
int finddynlights();
|
||||
bool getdynlight(int n, vec &o, float &radius, vec &color, vec &dir, int &spot, int &flags);
|
||||
|
||||
#endif
|
|
@ -87,12 +87,6 @@ extern void destroyva(vtxarray *va, bool reparent = true);
|
|||
extern void updatevabb(vtxarray *va, bool force = false);
|
||||
extern void updatevabbs(bool force = false);
|
||||
|
||||
// dynlight
|
||||
|
||||
extern void updatedynlights();
|
||||
extern int finddynlights();
|
||||
extern bool getdynlight(int n, vec &o, float &radius, vec &color, vec &dir, int &spot, int &flags);
|
||||
|
||||
// command
|
||||
extern hashnameset<ident> idents;
|
||||
extern int identflags;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "renderlights.hh"
|
||||
|
||||
#include "aa.hh"
|
||||
#include "dynlight.hh"
|
||||
#include "main.hh" // initwarning
|
||||
#include "material.hh"
|
||||
#include "octaedit.hh" // editmode
|
||||
|
|
|
@ -109,18 +109,6 @@ extern void fatal(const char *s, ...) PRINTFARGS(1, 2);
|
|||
|
||||
struct VSlot;
|
||||
|
||||
// dynlight
|
||||
enum
|
||||
{
|
||||
DL_SHRINK = 1<<8,
|
||||
DL_EXPAND = 1<<9,
|
||||
DL_FLASH = 1<<10
|
||||
};
|
||||
|
||||
extern void adddynlight(const vec &o, float radius, const vec &color, int fade = 0, int peak = 0, int flags = 0, float initradius = 0, const vec &initcolor = vec(0, 0, 0), physent *owner = NULL, const vec &dir = vec(0, 0, 0), int spot = 0);
|
||||
extern void dynlightreaching(const vec &target, vec &color, vec &dir, bool hud = false);
|
||||
extern void removetrackeddynlights(physent *owner = NULL);
|
||||
|
||||
// rendergl
|
||||
extern physent *camera1;
|
||||
extern vec worldpos, camdir, camright, camup;
|
||||
|
|
Loading…
Reference in New Issue