00001 // lightmap and static light structures by Alan Baylis 2001 00002 00003 #ifndef LightmapH 00004 #define LightmapH 00005 00006 #include "vector.h" 00007 #include "texture.h" 00008 #include "polygon.h" 00009 00010 struct BSP_node; 00011 00012 typedef struct StaticLight 00013 { 00014 VECTOR Position; 00015 float Brightness; 00016 float Radius; 00017 float Red; 00018 float Blue; 00019 float Green; 00020 } StaticLight; 00021 00022 typedef struct Lightmap 00023 { 00024 TEXTURE Texture; 00025 float vertex_u[3]; // lightmap uv coordinates 00026 float vertex_v[3]; 00027 } Lightmap; 00028 00029 void SetStaticLights(StaticLight *); 00030 void CreateLightmaps(int numpolys, POLYGON* polylist, Lightmap* lightmaplist, StaticLight* staticlight); 00031 void CreateBSPLightmaps(BSP_node* node); 00032 void LoadBSPLightmaps(BSP_node* node); 00033 00034 #endif 00035