diff --git a/code/renderer/tr_light.c b/code/renderer/tr_light.c index c9d176dc..94d6f6c0 100644 --- a/code/renderer/tr_light.c +++ b/code/renderer/tr_light.c @@ -45,10 +45,74 @@ typedef struct { int numLights; } dlightInfo_t; +typedef struct { + vec3_t point; + int s; + int t; +} patchLightBlock_t; + dlightInfo_t dli; void R_SetupEntityLightingGrid(trRefEntity_t* ent); +static int R_RecursiveDlightPatch(patchLightBlock_t* plb) { + patchLightBlock_t cut[4]; + qboolean added; + int index; + + // FIXME: unimplemented + return 0; +} + +int R_RealDlightPatch(srfGridMesh_t* srf, int dlightBit) { + int x, y; + int i, j; + int i2, j2; + int steps[2][2]; + dlight_t* dl; + qboolean added; + float* origin; + drawVert_t* dv; + + // FIXME: unimplemented + return 0; +} + +int R_RealDlightFace(srfSurfaceFace_t* srf, int dlightBits) { + int x, y; + byte* src, * dst; + int i, j; + vec3_t vec; + vec3_t vecStepS, vecStepT; + dlight_t* dl; + float d; + qboolean added; + float* origin; + + // FIXME: unimplemented + return 0; +} + +int R_RealDlightTerrain(cTerraPatchUnpacked_t* srf, int dlightBits) { + dlight_t* dl; + int x, y; + byte* dst, * src; + vec3_t vec; + float delta, dist; + float* origin; + int i, j, k; + int di, dj; + qboolean added; + float lmScale; + int lumelsPerHeight; + float heightPerLumelSquared; + float z00, z01; + float z10, z11; + + // FIXME: unimplemented + return 0; +} + /* =============== R_TransformDlights @@ -526,3 +590,14 @@ qboolean R_AllocLMBlock(int w, int h, int* x, int* y) { return qtrue; } + +qboolean R_DlightSample(byte* src, const vec3_t vec, byte* dst) { + int r, g, b; + int k; + qboolean added; + vec3_t dir; + float add; + + // FIXME: unimplemented + return qfalse; +} diff --git a/code/renderer/tr_local.h b/code/renderer/tr_local.h index 03d31198..09490f8e 100644 --- a/code/renderer/tr_local.h +++ b/code/renderer/tr_local.h @@ -1906,6 +1906,9 @@ void R_GetLightingForSmoke(vec3_t vLight, const vec3_t vOrigin); void R_SetupEntityLighting( const trRefdef_t *refdef, trRefEntity_t *ent ); void RB_SetupEntityGridLighting(); void RB_SetupStaticModelGridLighting(trRefdef_t* refdef, cStaticModelUnpacked_t* ent, const vec3_t lightOrigin); +int R_RealDlightPatch(srfGridMesh_t* srf, int dlightBit); +int R_RealDlightFace(srfSurfaceFace_t* srf, int dlightBits); +int R_RealDlightTerrain(cTerraPatchUnpacked_t* srf, int dlightBits); void R_TransformDlights( int count, dlight_t *dl, orientationr_t *ori ); void RB_Light_Real(unsigned char* colors); void RB_Sphere_BuildDLights();