Commit graph

42 commits

Author SHA1 Message Date
Joseph-Eugene Winzer
2545ffd074 SUPERNOVA: Fixes overdraw of input 2018-01-23 01:47:01 +00:00
Joseph-Eugene Winzer
316aeeabd5 SUPERNOVA: Converts Object name and description to Strings 2018-01-23 01:47:01 +00:00
Joseph-Eugene Winzer
604d421660 SUPERNOVA: Changes parameter name of timeToString() 2018-01-23 01:47:01 +00:00
Joseph-Eugene Winzer
644a6835e5 SUPERNOVA: Adjusts init time values
to the approximated ms per tick constant of 55ms.
2018-01-23 01:47:01 +00:00
Joseph-Eugene Winzer
53c086c341 SUPERNOVA: Fixes setting alarm time on watch 2018-01-23 01:47:01 +00:00
Joseph-Eugene Winzer
b64248981b SUPERNOVA: Fixes too large edit() field
Before edit() cleared the input on screen by overdrawing it from x to
the right side of the screen. This works fine for terminals but for
example setting the watches alarm time it does not.
The text font is 5x8 so overdrawing the max input length + 1 * 5 is
sufficient to clear the screen from our input and the cursor. Also if
the value ends up being too big it is clamped to the right side
of the screen.
2018-01-23 01:47:01 +00:00
Joseph-Eugene Winzer
2c0518e0ba SUPERNOVA: Removes redundant loops around edit() 2018-01-23 01:47:01 +00:00
Joseph-Eugene Winzer
cd01ca0ad3 SUPERNOVA: Converts special characters 2018-01-23 01:42:32 +00:00
Joseph-Eugene Winzer
a24af98b5e SUPERNOVA: Corrects GameState variable names
According to the naming convention class member variables need to be
prefixed with an underscore.
Unfortunately, I already started converting time constants when making
this change so ticksToMsec() and constant changes are sprinkled over
this commit.
2018-01-23 01:42:32 +00:00
Joseph-Eugene Winzer
89059ff50d SUPERNOVA: Fixes render error on death screen fadeout 2018-01-23 01:42:32 +00:00
Joseph-Eugene Winzer
18894e8f13 SUPERNOVA: Implements turnOn() 2018-01-23 01:42:26 +00:00
Joseph-Eugene Winzer
b0c108ff60 SUPERNOVA: Adds ticks to msec conversion constant 2018-01-23 01:33:25 +00:00
Joseph-Eugene Winzer
29b7b91a59 SUPERNOVA: Removes TODOs 2018-01-23 01:33:24 +00:00
Joseph-Eugene Winzer
c8e0f94fd1 SUPERNOVA: Fixes terminal in sleeping chamber
Instead of manipulating C-Strings edit() now takes a Common::String as a
parameter and the terminal input gets redrawn after every keystroke what
simplifies the function greatly.
2018-01-23 01:33:24 +00:00
Joseph-Eugene Winzer
8a766b5b48 SUPERNOVA: Adds code for remaining game logic 2018-01-23 01:19:02 +00:00
Joseph-Eugene Winzer
48870921f0 SUPERNOVA: Implements shock() and removes longjmps to 'dead' 2018-01-23 01:01:18 +00:00
Joseph-Eugene Winzer
172377f093 SUPERNOVA: cleanup 2018-01-23 01:01:18 +00:00
Joseph-Eugene Winzer
2c9f7b4ba9 SUPERNOVA: Implements edit()
As the TODO says, there are still problems with the function that can be
observed when using the terminal in the sleeping chamber.
2018-01-23 01:01:18 +00:00
Joseph-Eugene Winzer
51c9357549 SUPERNOVA: Implements death screen 2018-01-23 01:01:18 +00:00
Joseph-Eugene Winzer
37b4a77732 SUPERNOVA: Refactors init and destruction of GameManager
During the gameplay room state is overwritten and needs to be restored
on restart/load. Currently the original room state is not preserved and
thus needs to be destroyed and reinitialized to obtain the original
state.
2018-01-23 01:01:18 +00:00
Joseph-Eugene Winzer
8ce533bb1b SUPERNOVA: Adds clear() to Inventory Class 2018-01-23 01:01:18 +00:00
Joseph-Eugene Winzer
99d7e7c1f6 SUPERNOVA: Input handling
GetKeyInput/MouseInput/Input() block until the expected input happens.
GetKeyInput() takes a parameter that checks if the key input is a
'printable' character, backspace, delete, return or escape.
Also, the key state is now stored instead of just the ascii value of the
pressed key.
2018-01-23 01:01:10 +00:00
Joseph-Eugene Winzer
30e138dcfa SUPERNOVA: Adds indicator for key presses 2018-01-23 00:29:35 +00:00
Joseph-Eugene Winzer
bcd32509bb SUPERNOVA: Implements 'wait for input'
Currrently the only implemented scene that uses this function is looking
at the monitor in the cockpit. Depending on use cases in other scenes
the function needs to be extended.
2018-01-23 00:29:34 +00:00
Joseph-Eugene Winzer
cf98468c32 SUPERNOVA: Removes shadowing of variables 2018-01-23 00:29:34 +00:00
Joseph-Eugene Winzer
2ff15f37eb SUPERNOVA: Gets input before drawing calls;
Before the status line would show invalid input for a frame what was
especially annoying during animations, as they currently tend to block the game
loop for their duration.
2018-01-23 00:29:34 +00:00
Joseph-Eugene Winzer
0462bd0184 SUPERNOVA: Implements animation
The original game's time was stored in 55ms ticks but we just run on
milliseconds. setAnimationTimer() sets the ticks the currrent room's
animation() function will not be called.
2018-01-23 00:29:34 +00:00
Joseph-Eugene Winzer
97ef7cbe87 SUERNOVA: Initializes missing rooms on startup 2018-01-23 00:28:29 +00:00
Joseph-Eugene Winzer
4227195a82 SUPERNOVA: Rewrites animation for Cockpit and SleepCabin 2018-01-23 00:28:29 +00:00
Joseph-Eugene Winzer
0627ca35cb SUPERNOVA: Implements delay for animations 2018-01-23 00:00:12 +00:00
Joseph-Eugene Winzer
83523ebbdc SUPERNOVA: Corrects left mouse click behavior
This still needs work especially concerning actions that need two
objects like ACTION_USE or ACTION_GIVE.
2018-01-23 00:00:11 +00:00
Joseph-Eugene Winzer
d70ded12f6 SUPERNOVA: Fixes that objects are removed when taken 2018-01-23 00:00:11 +00:00
Joseph-Eugene Winzer
4fc7f73442 SUPERNOVA: Converts Inventory as GuiElements
By encapsulating the inventory state in GuiElements we can through out
inventory_object
2018-01-23 00:00:11 +00:00
Joseph-Eugene Winzer
aa22029ffe SUPERNOVA: Removes isVisible flag from GuiElement 2018-01-23 00:00:11 +00:00
Joseph-Eugene Winzer
e0aa700dac SUPERNOVA: Renames charcterWidth() to textWidth() 2018-01-23 00:00:11 +00:00
Joseph-Eugene Winzer
4c26b418cd SUPERNOVA: Makes Inventory::get() return nullObject 2018-01-23 00:00:11 +00:00
Joseph-Eugene Winzer
4d3e1eed8e SUPERNOVA: Corrects OPEN to more descriptive OPENABLE 2018-01-23 00:00:11 +00:00
Joseph-Eugene Winzer
e9375ea3ee SUPERNOVA: Adds tons of stuff
Most notably changes are,
    Handling of object state when calling drawImage() for
    inverse section rendering
    Beginning to convert GUI to GuiElements (_guiCommandButton)
    Mouse Input handling

This is still WIP but better than the glitchfest before.
2018-01-23 00:00:11 +00:00
Joseph-Eugene Winzer
0f7266a6b4 SUPERNOVA: Removes warnings for Inventory code 2018-01-23 00:00:11 +00:00
Joseph-Eugene Winzer
6d655b19fc SUPERNOVA: Adds GuiElement Class 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
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