If you click on an exit on the map and there is again an exit on the
same spot, it won't be recognized until the next mouse move/click.
This change fakes a mouse move and thus updates the object state.
Most of the time _objectState[MAX_OBJECT - 1] was used for
showing/hiding the GUI, here it was to indicate if the player
is currently hidden behind a pillar though.
There was an issue when the onEntrance for one room changes
the current room. It would then fail to call onEntrance for
that new room. This happened at lest once at the start as the
Intro room onEntrance() changes to the first room at the end
if the intro cutscene.
There were several issues with the brighness due to the different
implementation between the original and the code in scummvm. The
code has now been modified to be much closer to the original, which
fixed those issues and allowed to remove workarounds that had been
added in various places to deal with those issues (but those
workarounds had their own issues such as fade in happening too
soon before switching to the new room).
There were several issues fixed by this commit. The main ones are:
- It was in many places only drawing the first section even for
images that have multiple sections.
- It was in some places using the wrong image.
The first issue has been fixed by removing the GameManager::drawImage
function, and moving its logic to SupernovaEngine::renderImage which
was initially only drawing one section, but was nevertheless called
directly from many place.
The second image required more changes to the rendering code to allow
setting the current image file when it is different from the room file.
This fixes some memory issues and random crashes in places where it was
for example trying to use the image -1. This also fixes the rendering
of the flying cutscene.
The incorrect implementation meant than for example when leaving
the cave the room could stay black.
Note that the implementation is still approximative for the HOLD
and LANDINGMODULE rooms.