| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifndef EDITOR_LIGHTING_H |
| 20 |
#define EDITOR_LIGHTING_H |
| 21 |
|
| 22 |
#include "3d.h" |
| 23 |
#include "radiosity.h" |
| 24 |
#include "room.h" |
| 25 |
#include "object.h" |
| 26 |
#include "lightmap_info.h" |
| 27 |
|
| 28 |
extern vector ScratchCenters[MAX_LIGHTMAP_INFOS]; |
| 29 |
extern vector ScratchRVecs[MAX_LIGHTMAP_INFOS]; |
| 30 |
extern vector ScratchUVecs[MAX_LIGHTMAP_INFOS]; |
| 31 |
extern int AllowCombining; |
| 32 |
|
| 33 |
extern float Room_multiplier[]; |
| 34 |
extern float Room_ambience_r[], Room_ambience_g[], Room_ambience_b[]; |
| 35 |
|
| 36 |
void DoRadiosityForRooms(); |
| 37 |
void DoRadiosityForTerrain(); |
| 38 |
|
| 39 |
void BuildElementListForRoomFace(int roomnum, int facenum, rad_surface *surf); |
| 40 |
void BuildElementListForObjectFace(int objnum, int subobj_num, int facenum, rad_surface *surf); |
| 41 |
|
| 42 |
|
| 43 |
void AssignRoomSurfaceToLightmap(int roomnum, int facenum, rad_surface *sp); |
| 44 |
|
| 45 |
|
| 46 |
void AssignObjectSurfaceToLightmap(int objnum, int sobj_num, int facenum, rad_surface *sp); |
| 47 |
|
| 48 |
|
| 49 |
void AssignLightmapsToObjectSurfacesForSingleRoom(int surface_index, int roomnum); |
| 50 |
|
| 51 |
int ClipRadPointList(rad_point **src, rad_point **dest, int *nv, int code); |
| 52 |
|
| 53 |
|
| 54 |
int ClipRadToPlane(int plane, rad_point *src, rad_point *dest, int nv); |
| 55 |
|
| 56 |
|
| 57 |
void ClipRadEdge(int plane_flag, rad_point *on_pnt, rad_point *off_pnt); |
| 58 |
|
| 59 |
void SetRadClipLines(vector *tp, vector *rp, vector *bp, vector *lp); |
| 60 |
|
| 61 |
void ClipSurfaceElement(vector *surf_verts, rad_element *ep, vector *clip_verts, int nv); |
| 62 |
|
| 63 |
void BuildLightmapUVs(int *room_list, int *face_list, int count, vector *lightmap_poly, int nv, int external); |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
int CombineLightFaces(vector *dest_verts, vector *averts, int nva, vector *norma, vector *bverts, int nvb, |
| 68 |
vector *normb, int aroom = -1, int broom = -1); |
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
int TestLightAdjacency(int roomnum, int facenum, int external); |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
int ComputeSurfacesForObjectsForSingleRoom(int surface_index, int roomnum); |
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
void ComputeAllRoomLightmapUVs(int external); |
| 82 |
|
| 83 |
|
| 84 |
void ComputeRoomLightmapUVs(room *rp); |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
int ComputeSurfacesForObjects(int surface_index, int terrain); |
| 89 |
|
| 90 |
|
| 91 |
int GetTotalObjectFaces(int terrain); |
| 92 |
|
| 93 |
|
| 94 |
int GetTotalObjectFacesForSingleRoom(int roomnum); |
| 95 |
|
| 96 |
void BuildObjectLightmapUVs(object *obj, int *sublist, int *facelist, int count, vector *lightmap_poly, int nv, |
| 97 |
int lm_type); |
| 98 |
|
| 99 |
|
| 100 |
void AssignLightmapsToObjectSurfaces(int surface_index, int terrain); |
| 101 |
|
| 102 |
void CombineObjectLightmapUVs(object *obj, int lmi_type); |
| 103 |
|
| 104 |
|
| 105 |
void CleanupSpecularLighting(int external); |
| 106 |
|
| 107 |
|
| 108 |
void SetupSpecularLighting(int external); |
| 109 |
|
| 110 |
|
| 111 |
void DoRadiosityForCurrentRoom(room *rp); |
| 112 |
|
| 113 |
extern rad_surface *Light_surfaces; |
| 114 |
extern rad_surface *Terrain_light_surfaces; |
| 115 |
|
| 116 |
extern uint8_t *TerrainLightSpeedup[]; |
| 117 |
|
| 118 |
extern int Square_surfaces; |
| 119 |
extern int LightSpacing; |
| 120 |
extern int BestFit; |
| 121 |
extern float Ambient_red, Ambient_green, Ambient_blue; |
| 122 |
|
| 123 |
#endif |