Room specific logic needs access to functions that currently are
unavailable to them. Once no further extension or rearchitecture is
rather unlikely, thoughts on encapsulation can be given but for now all
members will be made public.
An instance of GameManager acts as an interface between the game logic
and engine. It provides game specific functions like isHelmetOff() to
check if the player wears his helmet.
This commit also adds engine extensions like saveScreen() and
restoreScreen() that makes use of the ScreenBufferStack class for
temporarily saving and restoring sections of the screen.
Most of the structure and code is bound to change but gives something to
improve on.
Messages will be 'removable' by over-rendering the message by invoking
removeMessage() with what was previously overdrawn.
_messageDisplayed might need to be reworked to an int, depending if
there are multiple messages rendered simultaneously.
The reason for the removal is because of gcc warnings when the operator
is not used in a translation unit that includes msn_def.h.
Currently I also see it used in the game logic anyway so there's no need
for it to be defined in a ubiquitiously used header file like msn_def.h
Colors on VGA are 6bit per color channel, that is why the colors
were so dark in earlier commits. Shifting the colors left by 2 gives us
an approximated value for CLUT8.
Mistakenly, during image loading the system palette was completely
substituted by the image palette although the first 16 colors are
supposed to be preserved.
Currently renderText() has two performance drawbacks. First, it locks
the screen surface during the whole function for drawing the text
directly to it. Besides that, it accesses the pixels in a cache
unfriendly way because the font glyphs are stored tilted by 90 degrees.
Most likely it won't pose any problems but if it should those issues
need to be prioritized.
There has been many other changes like copy/pasting room definitions,
skeleton for image decoder, ..
Getting supernova mod format support seems to be a good next step.