mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 12:01:25 +00:00
added the additional editable fields which the engine now exposes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3943 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
f32a88f684
commit
ebc29fe683
1 changed files with 23 additions and 5 deletions
|
@ -34,8 +34,8 @@ void() editor_lights_add =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static string fldname[10] = {
|
#define NUMLFIELDS 11
|
||||||
"bad",
|
static string fldname[NUMLFIELDS+1] = { "bad",
|
||||||
"num",
|
"num",
|
||||||
"org",
|
"org",
|
||||||
"rgb",
|
"rgb",
|
||||||
|
@ -44,7 +44,9 @@ static string fldname[10] = {
|
||||||
"sty",
|
"sty",
|
||||||
"ang",
|
"ang",
|
||||||
"fov",
|
"fov",
|
||||||
"???"
|
"cmp",
|
||||||
|
"cor",
|
||||||
|
"csc"
|
||||||
};
|
};
|
||||||
static string(float fld, float foredit) readfield =
|
static string(float fld, float foredit) readfield =
|
||||||
{
|
{
|
||||||
|
@ -77,6 +79,12 @@ static string(float fld, float foredit) readfield =
|
||||||
return vtos(dynamiclight_get(selectedlight, LFIELD_ANGLES));
|
return vtos(dynamiclight_get(selectedlight, LFIELD_ANGLES));
|
||||||
case 8:
|
case 8:
|
||||||
return ftos(dynamiclight_get(selectedlight, LFIELD_FOV));
|
return ftos(dynamiclight_get(selectedlight, LFIELD_FOV));
|
||||||
|
case 9:
|
||||||
|
return (string)dynamiclight_get(selectedlight, LFIELD_CUBEMAPNAME);
|
||||||
|
case 10:
|
||||||
|
return ftos(dynamiclight_get(selectedlight, LFIELD_CORONA));
|
||||||
|
case 11:
|
||||||
|
return ftos(dynamiclight_get(selectedlight, LFIELD_CORONASCALE));
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -117,6 +125,16 @@ static void(float fld, string newval) writefield =
|
||||||
return;
|
return;
|
||||||
case 8:
|
case 8:
|
||||||
dynamiclight_set(selectedlight, LFIELD_FOV, stof(newval));
|
dynamiclight_set(selectedlight, LFIELD_FOV, stof(newval));
|
||||||
|
return;
|
||||||
|
case 9:
|
||||||
|
dynamiclight_set(selectedlight, LFIELD_CUBEMAPNAME, newval);
|
||||||
|
return;
|
||||||
|
case 10:
|
||||||
|
dynamiclight_set(selectedlight, LFIELD_CORONA, stof(newval));
|
||||||
|
return;
|
||||||
|
case 11:
|
||||||
|
dynamiclight_set(selectedlight, LFIELD_CORONASCALE, stof(newval));
|
||||||
|
return;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +148,7 @@ void(vector m) editor_lights_overlay =
|
||||||
|
|
||||||
m_y = floor((m_y - 32) / 8);
|
m_y = floor((m_y - 32) / 8);
|
||||||
|
|
||||||
for (i = 1; i <= 8; i++)
|
for (i = 1; i <= NUMLFIELDS; i++)
|
||||||
{
|
{
|
||||||
if (editfield == i)
|
if (editfield == i)
|
||||||
s = editvalue;
|
s = editvalue;
|
||||||
|
@ -206,7 +224,7 @@ float(float keyc, float unic, vector m) editor_lights_key =
|
||||||
editfield = 0;
|
editfield = 0;
|
||||||
}
|
}
|
||||||
editfield = floor((m_y - 32) / 8);
|
editfield = floor((m_y - 32) / 8);
|
||||||
if (editfield <= 0 || editfield > 8 || m_x >= 64)
|
if (editfield <= 0 || editfield > NUMLFIELDS || m_x >= 64)
|
||||||
{
|
{
|
||||||
editfield = 0;
|
editfield = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue