Commit Graph
429 Commits
Author SHA1 Message Date
Joseph-Eugene Winzer dc12a0fd23 SUPERNOVA: Enables renderImage() to render inverse sections
Besides the addition of inverse sections, the 'fullscreen' parameter was
removed as it was used only for testing purposes in the beginning.
2018-01-22 23:54:41 +00:00
Joseph-Eugene Winzer a54c9084c1 SUPERNOVA: Removes 'inverse section' case
This code section was converted from the original source, where the
sections are directly drawn to the screen instead of buffered.
If a section > 128 is set as parameter, the function takes the
dimensions of section - 128 and draws this region of section 0 to the
screen, thus restoring it.
It would not make sense loading part of section 0 in seperate Surfaces
especially since kMaxSection is smaller than 128 the else branch is
never entered so removing it doesn't change the programs behavior.
2018-01-22 23:54:41 +00:00
Joseph-Eugene Winzer 6d655b19fc SUPERNOVA: Adds GuiElement Class 2018-01-22 23:54:41 +00:00
Joseph-Eugene Winzer a8f62802cc SUPERNOVA: Extends Object Class 2018-01-22 23:54:41 +00:00
Joseph-Eugene Winzer 718cae659c SUPERNOVA: Adds info to NOTES 2018-01-22 23:54:41 +00:00
Joseph-Eugene Winzer 30389746c8 SUPERNOVA: Fixes bathroom location on minimap 2018-01-22 23:54:41 +00:00
Joseph-Eugene Winzer 7c8f5bdd3d SUPERNOVA: Adds missing copyright header 2018-01-22 23:54:41 +00:00
Joseph-Eugene Winzer 69f6ef0efd SUPERNOVA: Cosmetic changes in console code 2018-01-22 23:54:41 +00:00
Joseph-Eugene Winzer b6887b0740 SUPERNOVA: Converts strings back to cp437 2018-01-22 23:54:41 +00:00
Joseph-Eugene Winzer 30308fbe8d SUPERNOVA: Implements GUI routines and refactors code
Of course the short description does not adequately describe the changes
made with this commit and I assume this won't be the last big
restructuring unfortunately.

Focus of this commit was to implement/fix the code so the main user
interface can be rendered. Bugs in the core routines for rendering
Messages and Images were fixed as well.
2018-01-22 23:54:26 +00:00
Joseph-Eugene Winzer 87a0dd970a SUPERNOVA: Fixes Message positioning 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer 2c17586c76 SUPERNOVA: Fixes parameters passed to fillRect() 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer 4a68aef1d6 SUPERNOVA: Fixes ScreenBufferStack 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer 84eb970bb9 SUPERNOVA: Fixes endianess issue for drawing cursor 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer 11b6227517 SUPERNOVA: Buffer Music files 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer 1b220e75e5 SUPERNOVA: Implements playSoundMod() 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer ef1bbce68e SUPERNOVA: Buffers sections of image on init 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer 1ae1134706 SUPERNOVA: Converts mouse cursor data 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer 7c4a763710 SUPERNOVA: Replaces magic numbers 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer 9e21dc42ee SUPERNOVA: Implements rendering of newspaper articles
The resolution will change dynamically depending what image is about to
be rendered. As there are no other GUI elements shown that depend on the
screen resolution when the artciles are rendered, there shouldn't be any
problems.
2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer cd080b820a SUPERNOVA: Buffers audio samples on startup 2018-01-22 23:42:08 +00:00
Joseph-Eugene Winzer 6c4768a051 SUPERNOVA: Reformatting
Substitute size_t with ScummVM defined uint type
2018-01-22 23:42:07 +00:00
Joseph-Eugene Winzer 018cff8c42 SUPERNOVA: Enables debug console and preload images 2018-01-22 23:42:07 +00:00
Joseph-Eugene Winzer 5ebe90a45e SUPERNOVA: Implements loading of newspaper images
While the 640x480 images are loaded correctly, they are displayed
cropped to 320x240, the default resolution.
2018-01-22 23:42:02 +00:00
Joseph-Eugene Winzer be5f3a6319 SUPERNOVA: Fixes file name creation 2018-01-22 23:40:38 +00:00
Joseph-Eugene Winzer 29021aa7dd SUPERNOVA: Refactoring 2018-01-22 23:40:27 +00:00
Joseph-Eugene Winzer 7da3ab2611 SUPERNOVA: Enables rendering of debug console 2018-01-22 23:34:50 +00:00
Joseph-Eugene Winzer a3b6352050 SUPERNOVA: Formatting 2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer 38e9e2d3e7 SUPERNOVA: Adds missing copyright notes 2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer 932b3669d3 SUPERNOVA: Adds room specific game logic
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).
2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer e6802ed633 SUPERNOVA: Refactoring 2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer 74b822c220 SUPERNOVA: Refactors and adds GameManager functions 2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer f2e3a4d9c4 SUPERNOVA: Changes return type to int for getDOSTicks()
The maximum return value is 0x1800B0, so easily covered by int
 (assuming 32bit+ architecture)
2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer 534bd38370 SUPERNOVA: Extends renderText()
Restructures the renderText() function for providing a renderText(text)
overload that starts rendering the string where the last call stopped.
2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer 8f5e712df0 SUPERNOVA: Adds further game logic stubs
Signed-off-by: Joseph-Eugene Winzer <m999@openmailbox.org>
2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer f036ebe3d5 SUPERNOVA: Extends Rooms for setting section visibility 2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer 7ee596efb2 SUPERNOVA: Provides rooms with engine pointers 2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer 495f12f815 SUPERNOVA: Lifts encapsulation of GameManager Class
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.
2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer fbcb3d3203 SUPERNOVA: Renames game functions 2018-01-22 23:34:49 +00:00
Joseph-Eugene Winzer e00e93ed4d SUPERNOVA: Implements GameManager Class and extension to engine
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.
2018-01-22 23:34:39 +00:00
Joseph-Eugene Winzer e534581e62 SUPERNOVA: Extends screen message system
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.
2018-01-22 23:32:46 +00:00
Joseph-Eugene Winzer 5c706dfb59 SUPERNOVA: Extends Inventory::get()
The code added as comments to Inventory::add() is the original code to
check if scrolling in inventory is needed and redraw it.
2018-01-22 23:32:32 +00:00
Joseph-Eugene Winzer 8a45d56630 SUPERNOVA: Adds getDOSTicks() 2018-01-22 23:29:44 +00:00
Joseph-Eugene Winzer 4f3f231afd SUPERNOVA: Adds Container for temporarily storing screen sections 2018-01-22 23:29:35 +00:00
Joseph-Eugene Winzer ddcfda7d02 SUPERNOVA: Adds constant messages 2018-01-22 23:17:49 +00:00
Joseph-Eugene Winzer 7a16dbdd50 SUPERNOVA: Adds isSectionVisible() to Object Class 2018-01-22 23:17:48 +00:00
Joseph-Eugene Winzer 0e859cd296 SUPERNOVA: Fixes getObject() to return pointer to Object 2018-01-22 23:17:48 +00:00
Joseph-Eugene Winzer 54f8df764e SUPERNOVA: Adds GameState Class 2018-01-22 23:17:48 +00:00
Joseph-Eugene Winzer 6c5865c44c SUPERNOVA: Adds getObject() to Room Interface 2018-01-22 23:17:48 +00:00
Joseph-Eugene Winzer a1462cae1f SUPERNOVA: Adds static combine() to Object Class 2018-01-22 23:17:48 +00:00