Age | Commit message (Collapse) | Author |
|
This is the game logic for the first act of the game.
It will see restructuring to remove gotos/jumps and hardcoded
differences in game behavior depending on settings (e.g. sound on/off).
|
|
|
|
|
|
The maximum return value is 0x1800B0, so easily covered by int
(assuming 32bit+ architecture)
|
|
Restructures the renderText() function for providing a renderText(text)
overload that starts rendering the string where the last call stopped.
|
|
Signed-off-by: Joseph-Eugene Winzer <m999@openmailbox.org>
|
|
|
|
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 code added as comments to Inventory::add() is the original code to
check if scrolling in inventory is needed and redraw it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renderImage() now considers the size of image sections instead of
blitting them on 320x200 by default.
|
|
Pressing 'w' increases the image index and 'e' the section index.
|
|
Palette color 255 doesn't seem to be used
|
|
|
|
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.
|
|
Also did some cleanup on the font definition
|
|
|
|
|
|
|
|
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.
|
|
|