Game Development Community

SetAmbientColor() in TGE 1.5

by Abelmon Bastos · in Torque Game Engine · 04/28/2007 (7:02 pm) · 0 replies

Hi,

I'm trying to use Enviro-Torque resource (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8848) in TGE 1.5. Its Celestials class calls setAmbientColor in the light manager object. This method don't exists in TGE 1.5 (it sounds like tge 1.5 have a new light manager system).
Celestial class also calls setVectorLightsEnabled and getLight(0) that also dont exists in TGE 1.5 LightManager object (see below):

/**
  Heavens::UpdateSunPosition() does just that. It updates the position of the sun.
  The fxSunLight class must be updated to grab elevation and azimuth data from
  this class object.
*/
void Celestials::UpdateSunPosition()
{
    ...

    //***************************
    // Now do the lighting stuff
    //***************************
    GetColor(mCurrentColor);
    LightManager *lm = gClientSceneGraph->getLightManager();
    lm->setVectorLightsEnabled(false);
    lm->setAmbientColor(mCurrentColor);
}

...
Sun* Celestials::GetSunObject()
{
    return (Sun*) &(gClientSceneGraph->getLightManager()->getLight(0));
}
...

Someone can help-me to convert this code to TGE 1.5?

Sorry for bad english and thank u!