X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=r_shadow.c;h=005ba3842d7bd1bb0d979b6cf37a7f426a596bab;hb=0a05c446ba26bd5897645a37ceec8646c5bc93eb;hp=75a856198f663a806a122510fd400c7b5fd42daf;hpb=ab329398d377012aeb267575b6f7e52a04c35096;p=xonotic%2Fdarkplaces.git diff --git a/r_shadow.c b/r_shadow.c index 75a85619..005ba384 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -34,8 +34,8 @@ r_shadow_rendermode_t r_shadow_lightingrendermode = R_SHADOW_RENDERMODE_NONE; int r_shadow_scenemaxlights; int r_shadow_scenenumlights; rtlight_t **r_shadow_scenelightlist; // includes both static lights and dlights, as filtered by appropriate flags -qboolean r_shadow_usingshadowmap2d; -qboolean r_shadow_usingshadowmaportho; +qbool r_shadow_usingshadowmap2d; +qbool r_shadow_usingshadowmaportho; int r_shadow_shadowmapside; float r_shadow_lightshadowmap_texturescale[4]; // xy = scale, zw = offset float r_shadow_lightshadowmap_parameters[4]; // x = frustum width in pixels (excludes border), y = z scale, z = size of viewport, w = z center @@ -54,15 +54,15 @@ int r_shadow_shadowmapfilterquality; int r_shadow_shadowmapdepthbits; int r_shadow_shadowmapmaxsize; int r_shadow_shadowmaptexturesize; -qboolean r_shadow_shadowmapvsdct; -qboolean r_shadow_shadowmapsampler; -qboolean r_shadow_shadowmapshadowsampler; +qbool r_shadow_shadowmapvsdct; +qbool r_shadow_shadowmapsampler; +qbool r_shadow_shadowmapshadowsampler; int r_shadow_shadowmappcf; int r_shadow_shadowmapborder; matrix4x4_t r_shadow_shadowmapmatrix; int r_shadow_lightscissor[4]; -qboolean r_shadow_usingdeferredprepass; -qboolean r_shadow_shadowmapdepthtexture; +qbool r_shadow_usingdeferredprepass; +qbool r_shadow_shadowmapdepthtexture; mod_alloclightmap_state_t r_shadow_shadowmapatlas_state; int r_shadow_shadowmapatlas_modelshadows_x; int r_shadow_shadowmapatlas_modelshadows_y; @@ -274,7 +274,7 @@ static memexpandablearray_t r_shadow_worldlightsarray; dlight_t *r_shadow_selectedlight; dlight_t r_shadow_bufferlight; vec3_t r_editlights_cursorlocation; -qboolean r_editlights_lockcursor; +qbool r_editlights_lockcursor; extern int con_vislines; @@ -375,7 +375,7 @@ static void R_Shadow_SetShadowMode(void) R_GLSL_Restart_f(&cmd_client); } -qboolean R_Shadow_ShadowMappingEnabled(void) +qbool R_Shadow_ShadowMappingEnabled(void) { switch (r_shadow_shadowmode) { @@ -1526,7 +1526,7 @@ void R_Shadow_ClearShadowMapTexture(void) GL_Clear(GL_DEPTH_BUFFER_BIT, clearcolor, 1.0f, 0); } -static void R_Shadow_SetShadowmapParametersForLight(qboolean noselfshadowpass) +static void R_Shadow_SetShadowmapParametersForLight(qbool noselfshadowpass) { int size = rsurface.rtlight->shadowmapatlassidesize; float nearclip = r_shadow_shadowmapping_nearclip.value / rsurface.rtlight->radius; @@ -1596,7 +1596,7 @@ static void R_Shadow_RenderMode_ShadowMap(int side, int size, int x, int y) r_shadow_shadowmapside = side; } -void R_Shadow_RenderMode_Lighting(qboolean transparent, qboolean shadowmapping, qboolean noselfshadowpass) +void R_Shadow_RenderMode_Lighting(qbool transparent, qbool shadowmapping, qbool noselfshadowpass) { R_Mesh_ResetTextureState(); if (transparent) @@ -1641,7 +1641,7 @@ static const float bboxpoints[8][3] = { 1, 1, 1}, }; -void R_Shadow_RenderMode_DrawDeferredLight(qboolean shadowmapping) +void R_Shadow_RenderMode_DrawDeferredLight(qbool shadowmapping) { int i; float vertex3f[8*3]; @@ -1673,9 +1673,9 @@ void R_Shadow_RenderMode_DrawDeferredLight(qboolean shadowmapping) R_Mesh_Draw(0, 8, 0, 12, NULL, NULL, 0, bboxelements, NULL, 0); } -static qboolean R_Shadow_BounceGrid_CheckEnable(int flag) +static qbool R_Shadow_BounceGrid_CheckEnable(int flag) { - qboolean enable = r_shadow_bouncegrid_state.capable && r_shadow_bouncegrid.integer != 0 && r_refdef.scene.worldmodel; + qbool enable = r_shadow_bouncegrid_state.capable && r_shadow_bouncegrid.integer != 0 && r_refdef.scene.worldmodel; int lightindex; int range; dlight_t *light; @@ -1709,7 +1709,7 @@ static qboolean R_Shadow_BounceGrid_CheckEnable(int flag) static void R_Shadow_BounceGrid_GenerateSettings(r_shadow_bouncegrid_settings_t *settings) { - qboolean s = r_shadow_bouncegrid_static.integer != 0; + qbool s = r_shadow_bouncegrid_static.integer != 0; float spacing = bound(1.0f, s ? r_shadow_bouncegrid_static_spacing.value : r_shadow_bouncegrid_dynamic_spacing.value, 1024.0f); float quality = bound(0.0001f, (s ? r_shadow_bouncegrid_static_quality.value : r_shadow_bouncegrid_dynamic_quality.value), 1024.0f); float bounceminimumintensity = s ? r_shadow_bouncegrid_static_bounceminimumintensity.value : r_shadow_bouncegrid_dynamic_bounceminimumintensity.value; @@ -1757,8 +1757,8 @@ static void R_Shadow_BounceGrid_UpdateSpacing(void) int resolution[3]; int numpixels; vec3_t ispacing; - vec3_t maxs; - vec3_t mins; + vec3_t maxs = {0,0,0}; + vec3_t mins = {0,0,0}; vec3_t size; vec3_t spacing; r_shadow_bouncegrid_settings_t *settings = &r_shadow_bouncegrid_state.settings; @@ -1776,7 +1776,7 @@ static void R_Shadow_BounceGrid_UpdateSpacing(void) { int lightindex; int range; - qboolean bounds_set = false; + qbool bounds_set = false; dlight_t *light; rtlight_t *rtlight; @@ -2017,9 +2017,9 @@ static void R_Shadow_BounceGrid_AssignPhotons_Task(taskqueue_task_t *t) // is probably fine (and they use the same timer) if (r_shadow_culllights_trace.integer) { - if (rtlight->trace_timer != realtime && R_CanSeeBox(rtlight->trace_timer == 0 ? r_shadow_culllights_trace_tempsamples.integer : r_shadow_culllights_trace_samples.integer, r_shadow_culllights_trace_eyejitter.value, r_shadow_culllights_trace_enlarge.value, r_shadow_culllights_trace_expand.value, r_shadow_culllights_trace_pad.value, r_refdef.view.origin, rtlight->cullmins, rtlight->cullmaxs)) - rtlight->trace_timer = realtime; - if (realtime - rtlight->trace_timer > r_shadow_culllights_trace_delay.value) + if (rtlight->trace_timer != host.realtime && R_CanSeeBox(rtlight->trace_timer == 0 ? r_shadow_culllights_trace_tempsamples.integer : r_shadow_culllights_trace_samples.integer, r_shadow_culllights_trace_eyejitter.value, r_shadow_culllights_trace_enlarge.value, r_shadow_culllights_trace_expand.value, r_shadow_culllights_trace_pad.value, r_refdef.view.origin, rtlight->cullmins, rtlight->cullmaxs)) + rtlight->trace_timer = host.realtime; + if (host.realtime - rtlight->trace_timer > r_shadow_culllights_trace_delay.value) continue; } // skip if expanded light box is offscreen @@ -2084,8 +2084,8 @@ static void R_Shadow_BounceGrid_AssignPhotons_Task(taskqueue_task_t *t) } // compute a seed for the unstable random modes - Math_RandomSeed_FromInts(&randomseed, 0, 0, 0, realtime * 1000.0); - seed = realtime * 1000.0; + Math_RandomSeed_FromInts(&randomseed, 0, 0, 0, host.realtime * 1000.0); + seed = host.realtime * 1000.0; for (lightindex = 0; lightindex < range2; lightindex++) { @@ -2596,7 +2596,7 @@ static void R_Shadow_BounceGrid_ConvertPixelsAndUpload(void) break; } - r_shadow_bouncegrid_state.lastupdatetime = realtime; + r_shadow_bouncegrid_state.lastupdatetime = host.realtime; } static void R_Shadow_BounceGrid_ClearTex_Task(taskqueue_task_t *t) @@ -2635,7 +2635,7 @@ static void R_Shadow_BounceGrid_TracePhotons_Shot(r_shadow_bouncegrid_photon_t * VectorCopy(cliptrace.endpos, shothit); if ((remainingbounces == r_shadow_bouncegrid_state.settings.maxbounce || r_shadow_bouncegrid_state.settings.includedirectlighting) && p->numpaths < PHOTON_MAX_PATHS) { - qboolean notculled = true; + qbool notculled = true; // cull paths that fail R_CullBox in dynamic mode if (!r_shadow_bouncegrid_state.settings.staticmode && r_shadow_bouncegrid_dynamic_culllightpaths.integer) @@ -2766,8 +2766,8 @@ void R_Shadow_UpdateBounceGridTexture(void) { int flag = r_refdef.scene.rtworld ? LIGHTFLAG_REALTIMEMODE : LIGHTFLAG_NORMALMODE; r_shadow_bouncegrid_settings_t settings; - qboolean enable = false; - qboolean settingschanged; + qbool enable = false; + qbool settingschanged; enable = R_Shadow_BounceGrid_CheckEnable(flag); @@ -2804,7 +2804,7 @@ void R_Shadow_UpdateBounceGridTexture(void) } // if all the settings seem identical to the previous update, return - if (r_shadow_bouncegrid_state.texture && (settings.staticmode || realtime < r_shadow_bouncegrid_state.lastupdatetime + r_shadow_bouncegrid_dynamic_updateinterval.value) && !settingschanged) + if (r_shadow_bouncegrid_state.texture && (settings.staticmode || host.realtime < r_shadow_bouncegrid_state.lastupdatetime + r_shadow_bouncegrid_dynamic_updateinterval.value) && !settingschanged) return; // store the new settings @@ -2883,7 +2883,7 @@ void R_Shadow_UpdateBounceGridTexture(void) } } -void R_Shadow_RenderMode_VisibleLighting(qboolean transparent) +void R_Shadow_RenderMode_VisibleLighting(qbool transparent) { R_Shadow_RenderMode_Reset(); GL_BlendFunc(GL_ONE, GL_ONE); @@ -2923,7 +2923,7 @@ int bboxedges[12][2] = {3, 7}, // XY, +Z }; -qboolean R_Shadow_ScissorForBBox(const float *mins, const float *maxs) +qbool R_Shadow_ScissorForBBox(const float *mins, const float *maxs) { if (!r_shadow_scissor.integer || r_shadow_usingdeferredprepass || r_trippy.integer) { @@ -2961,7 +2961,7 @@ static void R_Shadow_RenderLighting_Light_GLSL(int texturenumsurfaces, const msu extern cvar_t gl_lightmaps; void R_Shadow_RenderLighting(int texturenumsurfaces, const msurface_t **texturesurfacelist) { - qboolean negated; + qbool negated; float ambientcolor[3], diffusecolor[3], specularcolor[3]; VectorM(rsurface.rtlight->ambientscale + rsurface.texture->rtlightambient, rsurface.texture->render_rtlight_diffuse, ambientcolor); VectorM(rsurface.rtlight->diffusescale * max(0, 1.0 - rsurface.texture->rtlightambient), rsurface.texture->render_rtlight_diffuse, diffusecolor); @@ -3439,8 +3439,8 @@ static void R_Shadow_PrepareLight(rtlight_t *rtlight) static entity_render_t *lightentities_noselfshadow[MAX_EDICTS]; static entity_render_t *shadowentities[MAX_EDICTS]; static entity_render_t *shadowentities_noselfshadow[MAX_EDICTS]; - qboolean nolight; - qboolean castshadows; + qbool nolight; + qbool castshadows; rtlight->draw = false; rtlight->cached_numlightentities = 0; @@ -3477,7 +3477,7 @@ static void R_Shadow_PrepareLight(rtlight_t *rtlight) /* if (rtlight->selected) { - f = 2 + sin(realtime * M_PI * 4.0); + f = 2 + sin(host.realtime * M_PI * 4.0); VectorScale(rtlight->currentcolor, f, rtlight->currentcolor); } */ @@ -3500,9 +3500,9 @@ static void R_Shadow_PrepareLight(rtlight_t *rtlight) // skip if the light box is not visible to traceline if (r_shadow_culllights_trace.integer) { - if (rtlight->trace_timer != realtime && R_CanSeeBox(rtlight->trace_timer == 0 ? r_shadow_culllights_trace_tempsamples.integer : r_shadow_culllights_trace_samples.integer, r_shadow_culllights_trace_eyejitter.value, r_shadow_culllights_trace_enlarge.value, r_shadow_culllights_trace_expand.value, r_shadow_culllights_trace_pad.value, r_refdef.view.origin, rtlight->cullmins, rtlight->cullmaxs)) - rtlight->trace_timer = realtime; - if (realtime - rtlight->trace_timer > r_shadow_culllights_trace_delay.value) + if (rtlight->trace_timer != host.realtime && R_CanSeeBox(rtlight->trace_timer == 0 ? r_shadow_culllights_trace_tempsamples.integer : r_shadow_culllights_trace_samples.integer, r_shadow_culllights_trace_eyejitter.value, r_shadow_culllights_trace_enlarge.value, r_shadow_culllights_trace_expand.value, r_shadow_culllights_trace_pad.value, r_refdef.view.origin, rtlight->cullmins, rtlight->cullmaxs)) + rtlight->trace_timer = host.realtime; + if (host.realtime - rtlight->trace_timer > r_shadow_culllights_trace_delay.value) return; } @@ -3875,7 +3875,7 @@ static void R_Shadow_DrawLight(rtlight_t *rtlight) entity_render_t **lightentities; entity_render_t **lightentities_noselfshadow; int *surfacelist; - qboolean castshadows; + qbool castshadows; // check if we cached this light this frame (meaning it is worth drawing) if (!rtlight->draw) @@ -4047,7 +4047,7 @@ void R_Shadow_DrawPrepass(void) } #define MAX_SCENELIGHTS 65536 -static qboolean R_Shadow_PrepareLights_AddSceneLight(rtlight_t *rtlight) +static qbool R_Shadow_PrepareLights_AddSceneLight(rtlight_t *rtlight) { if (r_shadow_scenemaxlights <= r_shadow_scenenumlights) { @@ -4102,17 +4102,17 @@ void R_Shadow_PrepareLights(void) break; } - if (r_shadow_prepass_width != vid.width || r_shadow_prepass_height != vid.height) + if (r_shadow_prepass_width != r_fb.screentexturewidth || r_shadow_prepass_height != r_fb.screentextureheight) { R_Shadow_FreeDeferred(); r_shadow_usingdeferredprepass = true; - r_shadow_prepass_width = vid.width; - r_shadow_prepass_height = vid.height; - r_shadow_prepassgeometrydepthbuffer = R_LoadTextureRenderBuffer(r_shadow_texturepool, "prepassgeometrydepthbuffer", vid.width, vid.height, TEXTYPE_DEPTHBUFFER24); - r_shadow_prepassgeometrynormalmaptexture = R_LoadTexture2D(r_shadow_texturepool, "prepassgeometrynormalmap", vid.width, vid.height, NULL, TEXTYPE_COLORBUFFER32F, TEXF_RENDERTARGET | TEXF_CLAMP | TEXF_ALPHA | TEXF_FORCENEAREST, -1, NULL); - r_shadow_prepasslightingdiffusetexture = R_LoadTexture2D(r_shadow_texturepool, "prepasslightingdiffuse", vid.width, vid.height, NULL, TEXTYPE_COLORBUFFER16F, TEXF_RENDERTARGET | TEXF_CLAMP | TEXF_ALPHA | TEXF_FORCENEAREST, -1, NULL); - r_shadow_prepasslightingspeculartexture = R_LoadTexture2D(r_shadow_texturepool, "prepasslightingspecular", vid.width, vid.height, NULL, TEXTYPE_COLORBUFFER16F, TEXF_RENDERTARGET | TEXF_CLAMP | TEXF_ALPHA | TEXF_FORCENEAREST, -1, NULL); + r_shadow_prepass_width = r_fb.screentexturewidth; + r_shadow_prepass_height = r_fb.screentextureheight; + r_shadow_prepassgeometrydepthbuffer = R_LoadTextureRenderBuffer(r_shadow_texturepool, "prepassgeometrydepthbuffer", r_fb.screentexturewidth, r_fb.screentextureheight, TEXTYPE_DEPTHBUFFER24); + r_shadow_prepassgeometrynormalmaptexture = R_LoadTexture2D(r_shadow_texturepool, "prepassgeometrynormalmap", r_fb.screentexturewidth, r_fb.screentextureheight, NULL, TEXTYPE_COLORBUFFER32F, TEXF_RENDERTARGET | TEXF_CLAMP | TEXF_ALPHA | TEXF_FORCENEAREST, -1, NULL); + r_shadow_prepasslightingdiffusetexture = R_LoadTexture2D(r_shadow_texturepool, "prepasslightingdiffuse", r_fb.screentexturewidth, r_fb.screentextureheight, NULL, TEXTYPE_COLORBUFFER16F, TEXF_RENDERTARGET | TEXF_CLAMP | TEXF_ALPHA | TEXF_FORCENEAREST, -1, NULL); + r_shadow_prepasslightingspeculartexture = R_LoadTexture2D(r_shadow_texturepool, "prepasslightingspecular", r_fb.screentexturewidth, r_fb.screentextureheight, NULL, TEXTYPE_COLORBUFFER16F, TEXF_RENDERTARGET | TEXF_CLAMP | TEXF_ALPHA | TEXF_FORCENEAREST, -1, NULL); // set up the geometry pass fbo (depth + normalmap) r_shadow_prepassgeometryfbo = R_Mesh_CreateFramebufferObject(r_shadow_prepassgeometrydepthbuffer, r_shadow_prepassgeometrynormalmaptexture, NULL, NULL, NULL); @@ -4456,7 +4456,7 @@ static void R_Shadow_DrawModelShadowMaps(void) Matrix4x4_Concat(&r_shadow_shadowmapmatrix, &texmatrix, &invmvpmatrix); } -static void R_BeginCoronaQuery(rtlight_t *rtlight, float scale, qboolean usequery) +static void R_BeginCoronaQuery(rtlight_t *rtlight, float scale, qbool usequery) { float zdist; vec3_t centerorigin; @@ -4550,7 +4550,7 @@ static void R_DrawCorona(rtlight_t *rtlight, float cscale, float scale) if (VectorLength(color) > (1.0f / 256.0f)) { float vertex3f[12]; - qboolean negated = (color[0] + color[1] + color[2] < 0); + qbool negated = (color[0] + color[1] + color[2] < 0); if(negated) { VectorNegate(color, color); @@ -4567,7 +4567,7 @@ static void R_DrawCorona(rtlight_t *rtlight, float cscale, float scale) void R_Shadow_DrawCoronas(void) { int i, flag; - qboolean usequery = false; + qbool usequery = false; size_t lightindex; dlight_t *light; rtlight_t *rtlight; @@ -4663,10 +4663,7 @@ void R_Shadow_DrawCoronas(void) rtlight = r_refdef.scene.lights[i]; if (rtlight->corona_visibility <= 0) continue; - if (gl_flashblend.integer) - R_DrawCorona(rtlight, rtlight->corona, rtlight->radius * rtlight->coronasizescale * 2.0f); - else - R_DrawCorona(rtlight, rtlight->corona * r_coronas.value * 0.25f, rtlight->radius * rtlight->coronasizescale); + R_DrawCorona(rtlight, rtlight->corona * r_coronas.value * 0.25f, rtlight->radius * rtlight->coronasizescale); } } @@ -5419,7 +5416,7 @@ static void R_Shadow_EditLights_Edit_f(cmd_state_t *cmd) VectorCopy(r_shadow_selectedlight->color, color); radius = r_shadow_selectedlight->radius; style = r_shadow_selectedlight->style; - if (r_shadow_selectedlight->cubemapname) + if (*r_shadow_selectedlight->cubemapname) strlcpy(cubemapname, r_shadow_selectedlight->cubemapname, sizeof(cubemapname)); else cubemapname[0] = 0; @@ -5954,7 +5951,7 @@ static void R_Shadow_EditLights_CopyInfo_f(cmd_state_t *cmd) VectorCopy(r_shadow_selectedlight->color, r_shadow_bufferlight.color); r_shadow_bufferlight.radius = r_shadow_selectedlight->radius; r_shadow_bufferlight.style = r_shadow_selectedlight->style; - if (r_shadow_selectedlight->cubemapname) + if (*r_shadow_selectedlight->cubemapname) strlcpy(r_shadow_bufferlight.cubemapname, r_shadow_selectedlight->cubemapname, sizeof(r_shadow_bufferlight.cubemapname)); else r_shadow_bufferlight.cubemapname[0] = 0; @@ -6025,21 +6022,21 @@ static void R_Shadow_EditLights_Init(void) Cvar_RegisterVariable(&r_editlights_current_specular); Cvar_RegisterVariable(&r_editlights_current_normalmode); Cvar_RegisterVariable(&r_editlights_current_realtimemode); - Cmd_AddCommand(&cmd_client, "r_editlights_help", R_Shadow_EditLights_Help_f, "prints documentation on console commands and variables in rtlight editing system"); - Cmd_AddCommand(&cmd_client, "r_editlights_clear", R_Shadow_EditLights_Clear_f, "removes all world lights (let there be darkness!)"); - Cmd_AddCommand(&cmd_client, "r_editlights_reload", R_Shadow_EditLights_Reload_f, "reloads rtlights file (or imports from .lights file or .ent file or the map itself)"); - Cmd_AddCommand(&cmd_client, "r_editlights_save", R_Shadow_EditLights_Save_f, "save .rtlights file for current level"); - Cmd_AddCommand(&cmd_client, "r_editlights_spawn", R_Shadow_EditLights_Spawn_f, "creates a light with default properties (let there be light!)"); - Cmd_AddCommand(&cmd_client, "r_editlights_edit", R_Shadow_EditLights_Edit_f, "changes a property on the selected light"); - Cmd_AddCommand(&cmd_client, "r_editlights_editall", R_Shadow_EditLights_EditAll_f, "changes a property on ALL lights at once (tip: use radiusscale and colorscale to alter these properties)"); - Cmd_AddCommand(&cmd_client, "r_editlights_remove", R_Shadow_EditLights_Remove_f, "remove selected light"); - Cmd_AddCommand(&cmd_client, "r_editlights_toggleshadow", R_Shadow_EditLights_ToggleShadow_f, "toggle on/off the shadow option on the selected light"); - Cmd_AddCommand(&cmd_client, "r_editlights_togglecorona", R_Shadow_EditLights_ToggleCorona_f, "toggle on/off the corona option on the selected light"); - Cmd_AddCommand(&cmd_client, "r_editlights_importlightentitiesfrommap", R_Shadow_EditLights_ImportLightEntitiesFromMap_f, "load lights from .ent file or map entities (ignoring .rtlights or .lights file)"); - Cmd_AddCommand(&cmd_client, "r_editlights_importlightsfile", R_Shadow_EditLights_ImportLightsFile_f, "load lights from .lights file (ignoring .rtlights or .ent files and map entities)"); - Cmd_AddCommand(&cmd_client, "r_editlights_copyinfo", R_Shadow_EditLights_CopyInfo_f, "store a copy of all properties (except origin) of the selected light"); - Cmd_AddCommand(&cmd_client, "r_editlights_pasteinfo", R_Shadow_EditLights_PasteInfo_f, "apply the stored properties onto the selected light (making it exactly identical except for origin)"); - Cmd_AddCommand(&cmd_client, "r_editlights_lock", R_Shadow_EditLights_Lock_f, "lock selection to current light, if already locked - unlock"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_help", R_Shadow_EditLights_Help_f, "prints documentation on console commands and variables in rtlight editing system"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_clear", R_Shadow_EditLights_Clear_f, "removes all world lights (let there be darkness!)"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_reload", R_Shadow_EditLights_Reload_f, "reloads rtlights file (or imports from .lights file or .ent file or the map itself)"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_save", R_Shadow_EditLights_Save_f, "save .rtlights file for current level"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_spawn", R_Shadow_EditLights_Spawn_f, "creates a light with default properties (let there be light!)"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_edit", R_Shadow_EditLights_Edit_f, "changes a property on the selected light"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_editall", R_Shadow_EditLights_EditAll_f, "changes a property on ALL lights at once (tip: use radiusscale and colorscale to alter these properties)"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_remove", R_Shadow_EditLights_Remove_f, "remove selected light"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_toggleshadow", R_Shadow_EditLights_ToggleShadow_f, "toggle on/off the shadow option on the selected light"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_togglecorona", R_Shadow_EditLights_ToggleCorona_f, "toggle on/off the corona option on the selected light"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_importlightentitiesfrommap", R_Shadow_EditLights_ImportLightEntitiesFromMap_f, "load lights from .ent file or map entities (ignoring .rtlights or .lights file)"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_importlightsfile", R_Shadow_EditLights_ImportLightsFile_f, "load lights from .lights file (ignoring .rtlights or .ent files and map entities)"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_copyinfo", R_Shadow_EditLights_CopyInfo_f, "store a copy of all properties (except origin) of the selected light"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_pasteinfo", R_Shadow_EditLights_PasteInfo_f, "apply the stored properties onto the selected light (making it exactly identical except for origin)"); + Cmd_AddCommand(CMD_CLIENT, "r_editlights_lock", R_Shadow_EditLights_Lock_f, "lock selection to current light, if already locked - unlock"); }