X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=r_light.h;h=ea1e525aa1abd1d936964beba38a73386f506065;hb=1db2c7c1ce0c696db9033c97831e0de3642651c6;hp=ac6d2563bdcb2f7eba706974c46340b7b548e1f0;hpb=855932aeb5707c5efb2858c3e51b913d8203ebbe;p=xonotic%2Fdarkplaces.git diff --git a/r_light.h b/r_light.h index ac6d2563..ea1e525a 100644 --- a/r_light.h +++ b/r_light.h @@ -1,18 +1,16 @@ -// LordHavoc: 256 dynamic lights -#define MAX_DLIGHTS 256 -typedef struct -{ - vec3_t origin; - float radius; - float die; // stop lighting after this time - float decay; // drop this each second - float minlight; // don't add when contributing less - int key; - vec3_t color; // LordHavoc: colored lighting - qboolean dark; // subtracts light instead of adding -} dlight_t; +#ifndef R_LIGHT_H +#define R_LIGHT_H + +extern int r_numdlights; +extern dlight_t r_dlight[MAX_DLIGHTS]; + +void R_UpdateLights(void); +void R_DrawCoronas(void); +void R_CompleteLightPoint(vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal, const vec3_t p, int dynamic); +int R_LightModel(float *ambient4f, float *diffusecolor, float *diffusenormal, const entity_render_t *ent, float colorr, float colorg, float colorb, float colora, int worldcoords); +void R_LightModel_CalcVertexColors(const float *ambientcolor4f, const float *diffusecolor, const float *diffusenormal, int numverts, const float *vertex3f, const float *normal3f, float *color4f); +void R_UpdateEntLights(entity_render_t *ent); + +#endif -// LordHavoc: this affects the lighting scale of the whole game -#define LIGHTOFFSET 16384.0f -#define LIGHTSCALE 4.0f