mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Implement SetLightPosition and related (#757)
* Implement SetLightPosition and related * Update p name * style
This commit is contained in:

committed by
GitHub

parent
f447397eef
commit
369f3fba22
@@ -182,3 +182,24 @@ void LegoView1::Destroy()
|
||||
|
||||
LegoView::Destroy();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100abb60
|
||||
void LegoView1::SetLight(BOOL bDirectionalLight, Tgl::FloatMatrix4& rMatrix)
|
||||
{
|
||||
Tgl::Light* pLight;
|
||||
|
||||
if (bDirectionalLight == FALSE) {
|
||||
pLight = m_pSunLight;
|
||||
}
|
||||
else {
|
||||
pLight = m_pDirectionalLight;
|
||||
}
|
||||
|
||||
SetLight(pLight, rMatrix);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100abb80
|
||||
void LegoView1::SetLight(Tgl::Light* pLight, Tgl::FloatMatrix4& rMatrix)
|
||||
{
|
||||
pLight->SetTransformation(rMatrix);
|
||||
}
|
||||
|
@@ -8,7 +8,8 @@
|
||||
namespace Tgl
|
||||
{
|
||||
class Camera;
|
||||
}
|
||||
class Light;
|
||||
} // namespace Tgl
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// LegoView
|
||||
@@ -64,7 +65,11 @@ public:
|
||||
BOOL Create(const TglSurface::CreateStruct&, Tgl::Renderer*);
|
||||
void Destroy() override; // vtable+0x08
|
||||
|
||||
void SetLight(BOOL bDirectionalLight, Tgl::FloatMatrix4& rMatrix);
|
||||
|
||||
private:
|
||||
void SetLight(Tgl::Light* pLight, Tgl::FloatMatrix4& rMatrix);
|
||||
|
||||
Tgl::Light* m_pSunLight; // 0x78
|
||||
Tgl::Light* m_pDirectionalLight; // 0x7c
|
||||
Tgl::Light* m_pAmbientLight; // 0x80
|
||||
|
Reference in New Issue
Block a user