From: havoc Date: Mon, 25 Oct 2004 16:08:55 +0000 (+0000) Subject: now displays light number (and total number of lights) in r_editlights mode X-Git-Tag: xonotic-v0.1.0preview~5421 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0ea6dcebfc6318918f14f8e7ca349b9ae6b9e4c7;p=xonotic%2Fdarkplaces.git now displays light number (and total number of lights) in r_editlights mode git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4708 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_shadow.c b/r_shadow.c index c95d7d46..1559078f 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -3218,16 +3218,23 @@ void R_Shadow_EditLights_EditAll_f(void) void R_Shadow_EditLights_DrawSelectedLightProperties(void) { + int lightnumber, lightcount; + dlight_t *light; float x, y; char temp[256]; if (!r_editlights.integer) return; x = 0; y = con_vislines; - sprintf(temp, "Cursor %f %f %f", r_editlights_cursorlocation[0], r_editlights_cursorlocation[1], r_editlights_cursorlocation[2]);DrawQ_String(x, y, temp, 0, 8, 8, 1, 1, 1, 1, 0);y += 8; + lightnumber = -1; + lightcount = 0; + for (lightcount = 0, light = r_shadow_worldlightchain;light;lightcount++, light = light->next) + if (light == r_shadow_selectedlight) + lightnumber = lightcount; + sprintf(temp, "Cursor %f %f %f Total Lights %i", r_editlights_cursorlocation[0], r_editlights_cursorlocation[1], r_editlights_cursorlocation[2], lightcount);DrawQ_String(x, y, temp, 0, 8, 8, 1, 1, 1, 1, 0);y += 8; if (r_shadow_selectedlight == NULL) return; - sprintf(temp, "Light properties");DrawQ_String(x, y, temp, 0, 8, 8, 1, 1, 1, 1, 0);y += 8; + sprintf(temp, "Light #%i properties", lightnumber);DrawQ_String(x, y, temp, 0, 8, 8, 1, 1, 1, 1, 0);y += 8; sprintf(temp, "Origin %f %f %f", r_shadow_selectedlight->origin[0], r_shadow_selectedlight->origin[1], r_shadow_selectedlight->origin[2]);DrawQ_String(x, y, temp, 0, 8, 8, 1, 1, 1, 1, 0);y += 8; sprintf(temp, "Angles %f %f %f", r_shadow_selectedlight->angles[0], r_shadow_selectedlight->angles[1], r_shadow_selectedlight->angles[2]);DrawQ_String(x, y, temp, 0, 8, 8, 1, 1, 1, 1, 0);y += 8; sprintf(temp, "Color %f %f %f", r_shadow_selectedlight->color[0], r_shadow_selectedlight->color[1], r_shadow_selectedlight->color[2]);DrawQ_String(x, y, temp, 0, 8, 8, 1, 1, 1, 1, 0);y += 8;