Commit Graph
86814 Commits
Author SHA1 Message Date
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
Joseph-Eugene Winzer 55c67005a6 SUPERNOVA: Returns if section is invalid
Sections with an x2 value of 0 cannot span any area and are thus invalid
2018-01-22 23:17:48 +00:00
Joseph-Eugene Winzer 85aa1985ac SUPERNOVA: Reformatting 2018-01-22 23:17:48 +00:00
Joseph-Eugene Winzer b15169cd43 SUPERNOVA: Adds getFileNumber() to Room Class 2018-01-22 23:17:48 +00:00
Joseph-Eugene Winzer b34fb59f96 SUPERNOVA: Reformatting 2018-01-22 23:17:48 +00:00
Joseph-Eugene Winzer 8ec4773628 SUPERNOVA: Adds text for commands in GUI 2018-01-22 23:17:37 +00:00
Joseph-Eugene Winzer f2e51c3cfe SUPERNOVA: Adds hasProperty() for Objects and bit ops 2018-01-22 23:08:39 +00:00
Joseph-Eugene Winzer f4eb7cbfc5 SUPERNOVA: Adds Inventory Class 2018-01-22 23:08:39 +00:00
Joseph-Eugene Winzer 18ac67f907 SUPERNOVA: Substitutes magic numbers in Object ctor 2018-01-22 23:08:39 +00:00
Joseph-Eugene Winzer 42af582e4c SUPERNOVA: Substitutes magic numbers with symbols 2018-01-22 23:08:39 +00:00
Joseph-Eugene Winzer f3656ecce9 SUPERNOVA: Adds methods for alterting Object state 2018-01-22 23:08:31 +00:00
Joseph-Eugene Winzer 6538a6386b SUPERNOVA: Refactoring 2018-01-22 22:59:48 +00:00
Joseph-Eugene Winzer 51df751e44 SUPERNOVA: Removes ORing ObjectTypes from msn_def.h
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
2018-01-22 22:59:48 +00:00
Joseph-Eugene Winzer 87287de83b SUPERNOVA: Adds color palette constants 2018-01-22 22:59:48 +00:00
Joseph-Eugene Winzer ad7184b379 SUPERNOVA: Moves Object Class from rooms.h to msn_def.h 2018-01-22 22:59:48 +00:00
Joseph-Eugene Winzer 79ada90398 SUPERNOVA: Adds room data for Ship chapter 2018-01-22 22:59:48 +00:00
Joseph-Eugene Winzer e2122bddf1 SUPERNOVA: Updates renderImage() function
renderImage() now considers the size of image sections instead of
blitting them on 320x200 by default.
2018-01-22 22:59:48 +00:00
Joseph-Eugene Winzer d55ef4045e SUPERNOVA: Setup image and section viewer
Pressing 'w' increases the image index and 'e' the section index.
2018-01-22 22:59:27 +00:00
Joseph-Eugene Winzer f25d6c7485 SUPERNOVA: Adds an empty ObjectType/ID and RoomID 2018-01-22 22:53:24 +00:00
Joseph-Eugene Winzer bd48a32c5a SUPERNOVA: Convert 18bit VGA to 24bit CLUT8
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.
2018-01-22 21:16:37 +00:00
Joseph-Eugene Winzer 8e55efa748 SUPERNOVA: Fix OOB write in paletteBrightness()
Palette color 255 doesn't seem to be used
2018-01-22 21:16:37 +00:00
Joseph-Eugene Winzer 0c72f52ad8 SUPERNOVA: Add palette fade in/out 2018-01-22 21:16:27 +00:00
Joseph-Eugene Winzer ca8c87ff2e SUPERNOVA: Fix image palette loading
Mistakenly, during image loading the system palette was completely
substituted by the image palette although the first 16 colors are
supposed to be preserved.
2018-01-22 19:31:42 +00:00
Joseph-Eugene Winzer c0b8b50ec6 SUPERNOVA: add text rendering
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.
2018-01-22 19:31:42 +00:00
Joseph-Eugene Winzer e7252018e8 SUPERNOVA: add characterWidth() function
Also did some cleanup on the font definition
2018-01-22 19:31:42 +00:00
Joseph-Eugene Winzer 332763e825 SUPERNOVA: add renderBox() 2018-01-22 19:31:42 +00:00
Joseph-Eugene Winzer 9b4bade4f6 SUPERNOVA: fix palette corruption on decoding 2018-01-22 19:31:39 +00:00
Joseph-Eugene Winzer ec0d557697 SUPERNOVA: (TEMP COMMIT) drawing to screen surface 2018-01-22 19:30:54 +00:00
Joseph-Eugene Winzer 64e6673d10 SUPERNOVA: Added basic game loop and play sound samples
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.
2018-01-22 19:28:18 +00:00
Joseph-Eugene Winzer 836da5746e SUPERNOVA: Create engine skeleton and game detection 2018-01-22 19:26:09 +00:00
Paul Gilbert a06bf756c6 XEEN: Fixes for speed table calculation, RT_HIT range type cleanup 2018-01-21 21:27:30 -05:00
Paul Gilbert ce3b1af5c5 XEEN: Correctly skip over unconscious or dead chars during combat 2018-01-21 19:13:52 -05:00
Paul Gilbert b21991a727 XEEN: Properly save/restore main UI buttons during combat turns 2018-01-21 18:55:16 -05:00
Joseph-Eugene Winzer eef9e18340 AUDIO: Fixes Protracker Portamento effect
.period overflowed if .portaToNoteSpeed > .period in the else if case
2018-01-21 23:03:12 +00:00
Paul Gilbert f30fb59385 XEEN: Fix combat stalling when ranged attack comes from a back row 2018-01-21 16:40:29 -05:00