mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
GRIM: Reset the lights when setting a new scene. Fix #193
This commit is contained in:
@@ -1480,6 +1480,7 @@ void GrimEngine::setScene(Scene *scene) {
|
||||
Scene *lastScene = _currScene;
|
||||
_currScene = scene;
|
||||
_currScene->setSoundParameters(20, 127);
|
||||
_currScene->setLightsDirty();
|
||||
// should delete the old scene after setting the new one
|
||||
if (lastScene && !lastScene->_locked) {
|
||||
removeScene(lastScene);
|
||||
|
||||
@@ -571,6 +571,10 @@ ObjectState *Scene::findState(const char *filename) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Scene::setLightsDirty() {
|
||||
_lightsConfigured = false;
|
||||
}
|
||||
|
||||
void Scene::setLightIntensity(const char *light, float intensity) {
|
||||
for (int i = 0; i < _numLights; ++i) {
|
||||
Light &l = _lights[i];
|
||||
|
||||
@@ -71,6 +71,7 @@ public:
|
||||
_enableLights = state;
|
||||
_lightsConfigured = false;
|
||||
}
|
||||
void setLightsDirty();
|
||||
void setLightIntensity(const char *light, float intensity);
|
||||
void setLightIntensity(int light, float intensity);
|
||||
void setLightPosition(const char *light, const Graphics::Vector3d &pos);
|
||||
|
||||
Reference in New Issue
Block a user