mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-18 01:21:32 +00:00
- removed all uses of BYTE as function return value or functio parameter from the dynamic light code.
These were truncating the actual light values.
This commit is contained in:
parent
1515ab8f4a
commit
a5f417b1e5
2 changed files with 5 additions and 5 deletions
|
@ -266,7 +266,7 @@ void ADynamicLight::Tick()
|
||||||
|
|
||||||
case FlickerLight:
|
case FlickerLight:
|
||||||
{
|
{
|
||||||
BYTE rnd = randLight();
|
int rnd = randLight();
|
||||||
float pct = specialf1 / 360.f;
|
float pct = specialf1 / 360.f;
|
||||||
|
|
||||||
m_currentRadius = float(args[LIGHT_INTENSITY + (rnd >= pct * 255)]);
|
m_currentRadius = float(args[LIGHT_INTENSITY + (rnd >= pct * 255)]);
|
||||||
|
@ -293,7 +293,7 @@ void ADynamicLight::Tick()
|
||||||
// These need some more work elsewhere
|
// These need some more work elsewhere
|
||||||
case ColorFlickerLight:
|
case ColorFlickerLight:
|
||||||
{
|
{
|
||||||
BYTE rnd = randLight();
|
int rnd = randLight();
|
||||||
float pct = specialf1/360.f;
|
float pct = specialf1/360.f;
|
||||||
|
|
||||||
m_currentRadius = m_Radius[rnd >= pct * 255];
|
m_currentRadius = m_Radius[rnd >= pct * 255];
|
||||||
|
|
|
@ -126,8 +126,8 @@ public:
|
||||||
void ApplyProperties(ADynamicLight * light) const;
|
void ApplyProperties(ADynamicLight * light) const;
|
||||||
FName GetName() const { return m_Name; }
|
FName GetName() const { return m_Name; }
|
||||||
void SetParameter(double p) { m_Param = p; }
|
void SetParameter(double p) { m_Param = p; }
|
||||||
void SetArg(int arg, BYTE val) { m_Args[arg] = val; }
|
void SetArg(int arg, int val) { m_Args[arg] = val; }
|
||||||
BYTE GetArg(int arg) { return m_Args[arg]; }
|
int GetArg(int arg) { return m_Args[arg]; }
|
||||||
uint8_t GetAttenuate() const { return m_attenuate; }
|
uint8_t GetAttenuate() const { return m_attenuate; }
|
||||||
void SetOffset(float* ft) { m_Pos.X = ft[0]; m_Pos.Z = ft[1]; m_Pos.Y = ft[2]; }
|
void SetOffset(float* ft) { m_Pos.X = ft[0]; m_Pos.Z = ft[1]; m_Pos.Y = ft[2]; }
|
||||||
void SetSubtractive(bool subtract) { m_subtractive = subtract; }
|
void SetSubtractive(bool subtract) { m_subtractive = subtract; }
|
||||||
|
@ -648,7 +648,7 @@ void gl_ParseFlickerLight2(FScanner &sc)
|
||||||
}
|
}
|
||||||
if (defaults->GetArg(LIGHT_SECONDARY_INTENSITY) < defaults->GetArg(LIGHT_INTENSITY))
|
if (defaults->GetArg(LIGHT_SECONDARY_INTENSITY) < defaults->GetArg(LIGHT_INTENSITY))
|
||||||
{
|
{
|
||||||
BYTE v = defaults->GetArg(LIGHT_SECONDARY_INTENSITY);
|
int v = defaults->GetArg(LIGHT_SECONDARY_INTENSITY);
|
||||||
defaults->SetArg(LIGHT_SECONDARY_INTENSITY, defaults->GetArg(LIGHT_INTENSITY));
|
defaults->SetArg(LIGHT_SECONDARY_INTENSITY, defaults->GetArg(LIGHT_INTENSITY));
|
||||||
defaults->SetArg(LIGHT_INTENSITY, v);
|
defaults->SetArg(LIGHT_INTENSITY, v);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue