mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Implement/match LegoBackgroundColor::SetLightColor and related (#758)
This commit is contained in:

committed by
GitHub

parent
369f3fba22
commit
ed9e9efdab
@@ -184,7 +184,7 @@ void LegoView1::Destroy()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100abb60
|
||||
void LegoView1::SetLight(BOOL bDirectionalLight, Tgl::FloatMatrix4& rMatrix)
|
||||
void LegoView1::SetLightTransform(BOOL bDirectionalLight, Tgl::FloatMatrix4& rMatrix)
|
||||
{
|
||||
Tgl::Light* pLight;
|
||||
|
||||
@@ -195,11 +195,32 @@ void LegoView1::SetLight(BOOL bDirectionalLight, Tgl::FloatMatrix4& rMatrix)
|
||||
pLight = m_pDirectionalLight;
|
||||
}
|
||||
|
||||
SetLight(pLight, rMatrix);
|
||||
SetLightTransform(pLight, rMatrix);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100abb80
|
||||
void LegoView1::SetLight(Tgl::Light* pLight, Tgl::FloatMatrix4& rMatrix)
|
||||
void LegoView1::SetLightTransform(Tgl::Light* pLight, Tgl::FloatMatrix4& rMatrix)
|
||||
{
|
||||
pLight->SetTransformation(rMatrix);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100abba0
|
||||
void LegoView1::SetLightColor(BOOL bDirectionalLight, float red, float green, float blue)
|
||||
{
|
||||
Tgl::Light* pLight;
|
||||
|
||||
if (bDirectionalLight == FALSE) {
|
||||
pLight = m_pSunLight;
|
||||
}
|
||||
else {
|
||||
pLight = m_pDirectionalLight;
|
||||
}
|
||||
|
||||
SetLightColor(pLight, red, green, blue);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100abbd0
|
||||
void LegoView1::SetLightColor(Tgl::Light* pLight, float red, float green, float blue)
|
||||
{
|
||||
pLight->SetColor(red, green, blue);
|
||||
}
|
||||
|
@@ -65,10 +65,12 @@ public:
|
||||
BOOL Create(const TglSurface::CreateStruct&, Tgl::Renderer*);
|
||||
void Destroy() override; // vtable+0x08
|
||||
|
||||
void SetLight(BOOL bDirectionalLight, Tgl::FloatMatrix4& rMatrix);
|
||||
void SetLightTransform(BOOL bDirectionalLight, Tgl::FloatMatrix4& rMatrix);
|
||||
void SetLightColor(BOOL bDirectionalLight, float red, float green, float blue);
|
||||
|
||||
private:
|
||||
void SetLight(Tgl::Light* pLight, Tgl::FloatMatrix4& rMatrix);
|
||||
void SetLightTransform(Tgl::Light* pLight, Tgl::FloatMatrix4& rMatrix);
|
||||
void SetLightColor(Tgl::Light* pLight, float red, float green, float blue);
|
||||
|
||||
Tgl::Light* m_pSunLight; // 0x78
|
||||
Tgl::Light* m_pDirectionalLight; // 0x7c
|
||||
|
Reference in New Issue
Block a user