Commit graph

91 commits

Author SHA1 Message Date
Strangerke
897a1e93a1 SUPERNOVA: Display stubs, remove useless function declaration 2018-01-23 02:15:39 +00:00
Strangerke
d3eb662fe2 SUPERNOVA: Fix warning 2018-01-23 02:15:39 +00:00
Thierry Crozat
f40a534737 SUPERNOVA: Fix room brightness
The incorrect implementation meant than for example when leaving
the cave the room could stay black.

Note that the implementation is still approximative for the HOLD
and LANDINGMODULE rooms.
2018-01-23 02:15:39 +00:00
Thierry Crozat
70e8f36a55 SUPERNOVA: Remove variables and stub functions related to overlay 2018-01-23 02:15:38 +00:00
Thierry Crozat
8a8a0b9d38 SUPERNOVA: Implement event callback mechanism and Supernova event 2018-01-23 02:15:38 +00:00
Thierry Crozat
909818c730 SUPERNOVA: Fix combining ObjectType enum values
It was storing the result of bitwise operation on the ObjectType
enum values in a ObjectType variable. But that was incorrect as
the result was not a value from the enum.

Also removing a property was actually adding the property if it
was not present in the value initially.
2018-01-23 02:15:38 +00:00
Thierry Crozat
c8c6eeb974 SUPERNOVA: Fix usage of uninitialized variables 2018-01-23 02:15:38 +00:00
Thierry Crozat
5b76bbb016 SUPERNOVA: Fix graphics glitches 2018-01-23 02:15:37 +00:00
Thierry Crozat
bd6cdf4ba2 SUPERNOVA: Handle events during dialogs 2018-01-23 02:15:37 +00:00
Thierry Crozat
7bf803f6e6 SUPERNOVA: Cleanup dialog code
The main change consists in using a separate byte array for the sentence
removal flags, move some functions from the GameManager to the Room class,
and add a few additional functions to manipulate this new array. This
allows to clarify some code related to dialogs.

This change also allows to switch the _shown array back to a bool array.
2018-01-23 02:15:37 +00:00
Thierry Crozat
21899d8716 SUPERNOVA: Implement most dialog related functions 2018-01-23 02:15:37 +00:00
Thierry Crozat
f98fcd139b SUPERNOVA: Fix screen shake
OSystem::setShakePos(int) can only take positive offset (as documented).
Passing a negative offset caused memory issues in the drawing code and
some random crashes.
2018-01-23 02:15:36 +00:00
Strangerke
1cee221e7a SUPERNOVA: Finish the string extraction in state.cpp 2018-01-23 02:15:36 +00:00
Strangerke
d4351a5ff2 SUPERNOVA: Extract some strings from state.cpp 2018-01-23 02:15:36 +00:00
Strangerke
4d7d802333 SUPERNOVA: Change the signature of dialog(), fix calls, extract some more strings 2018-01-23 02:15:35 +00:00
Strangerke
56f9328e90 SUPERNOVA: Extract ArsanoRoger texts 2018-01-23 02:15:35 +00:00
Strangerke
ed9d92407e SUPERNOVA: Extract more dialog texts 2018-01-23 02:15:35 +00:00
Strangerke
cb12a88fc5 SUPERNOVA: Extract strings for ShibCabinL3 & R3 and for ShipAirlock 2018-01-23 02:15:35 +00:00
Thierry Crozat
69d7b91965 SUPERNOVA: Improve interactivity of title screen and intro cutscene
We can now press the mouse button to leave the title screen instead
of having to press a key. Since the mouse cursor was visible, not
being able to press the mouse button was strange. Especially as it
was possible to use the mouse button earlier in the title screen.

Also we can now use the mouse button or any key other than escape
during the cutscene to move to the next sentence. And the code is
more reactive to pressing the Escape key (we don't need to wait
for the current annimation to finish) to exit the cutscene.
2018-01-23 02:15:33 +00:00
Thierry Crozat
7722fe99cd SUPERNOVA: Move object name and description strings to engine data file 2018-01-23 02:15:33 +00:00
Thierry Crozat
6fc0659222 SUPERNOVA: Start using strings from the engine data file
This means that now all that remains to be done to play in English
is to move all the strings to the engine data file and to translate
them.
2018-01-23 02:15:33 +00:00
Thierry Crozat
d1bdfd2bde SUPERNOVA: Clean indentations 2018-01-23 02:15:32 +00:00
Strangerke
4c9fc3cdbc SUPERNOVA: Fix compilation using MSVC9, silent some CppCheck warnings 2018-01-23 02:15:32 +00:00
D G Turner
2e79e24392 SUPERNOVA: Fix GCC Signed vs. Unsigned Comparison Warnings. 2018-01-23 02:15:32 +00:00
D G Turner
e6fea1bd86 SUPERNOVA: Fix GCC Unused Variable Warnings. 2018-01-23 02:15:32 +00:00
Thierry Crozat
a4470edb29 SUPERNOVA: Fix exiting intro cutscene using Escape 2018-01-23 02:15:31 +00:00
Joseph-Eugene Winzer
aef0e122c7 SUPERNOVA: Restores brightness when leaving the cave 2018-01-23 02:15:31 +00:00
Joseph-Eugene Winzer
e45d94b065 SUPERNOVA: Implements screen shake 2018-01-23 02:15:31 +00:00
Joseph-Eugene Winzer
ba7729a767 SUPERNOVA: Restores brightness if power on 2018-01-23 02:15:31 +00:00
Joseph-Eugene Winzer
7da494427d SUPERNOVA: Adds current room to save file
and restores player location to it on load.
2018-01-23 02:15:31 +00:00
Joseph-Eugene Winzer
03414f789a SUPERNOVA: Implements inventory arrows 2018-01-23 02:15:31 +00:00
Joseph-Eugene Winzer
3814f33826 SUPERNOVA: Scrolls inventory when taking an object
Signed-off-by: Joseph-Eugene Winzer <joewinzer@googlemail.com>
2018-01-23 02:15:31 +00:00
Joseph-Eugene Winzer
9f3f9f47ad SUPERNOVA: Limits inventory scroll 2018-01-23 02:15:31 +00:00
Joseph-Eugene Winzer
23f57ca83f SUPERNOVA: Fixes de-/serialization of game state 2018-01-23 02:14:56 +00:00
Joseph-Eugene Winzer
68c52362e5 SUPERNOVA: Adds Outro initialization 2018-01-23 02:14:47 +00:00
Joseph-Eugene Winzer
7cae6fde30 SUPERNOVA: Fixes number of rooms 2018-01-23 02:07:37 +00:00
Joseph-Eugene Winzer
5f19833803 SUPERNOVA: Remvomes manual assigning of current room 2018-01-23 02:01:00 +00:00
Joseph-Eugene Winzer
98ab5ee142 SUPERNOVA: Alters wait function to stall at least _delay ms
wait2() is used for updating events all over the code with a parameter
of 1, so to be sure there's at least one update it is wrapped in a
do-while now.
2018-01-23 02:01:00 +00:00
Joseph-Eugene Winzer
7f513ac1db SUPERNOVA: Adds key input check function
This is temporary. Input is all over the place right now I feel, so it
will be reworked 'soon'.
2018-01-23 02:01:00 +00:00
Joseph-Eugene Winzer
de539134f9 SUPERNOVA: Removes comments 2018-01-23 02:00:59 +00:00
Joseph-Eugene Winzer
0ffd005995 SUPERNOVA: Adds message prompt on exit 2018-01-23 02:00:59 +00:00
Joseph-Eugene Winzer
82efa9dd65 SUPERNOVA: Simplifies timing code
Removing remnants of the original code like _timeAlarmSystem.
2018-01-23 02:00:51 +00:00
Joseph-Eugene Winzer
3f68cda2d7 SUPERNOVA: Implements de-/serialization
WIP. It is currently broken.
2018-01-23 01:53:31 +00:00
Joseph-Eugene Winzer
edef2792da SUPERNOVA: Adds RoomID to Rooms
GameManager::airless() determined if the space suit could be taken off
by comparing the current room pointer to the allocated room objects.
This led to indeterministic behavior as sometimes airless() would
falsely return true as the dynamic allocation of the Room objects cannot
be expected to be in a certain order.
Implementing the corresponing RoomID to a Room objects solves this
problem.
2018-01-23 01:52:59 +00:00
Joseph-Eugene Winzer
18abc4702a SUPERNOVA: Implements Return To Launcher 2018-01-23 01:52:50 +00:00
Joseph-Eugene Winzer
e15f281113 SUPERNOVA: Removes color macros 2018-01-23 01:47:02 +00:00
Joseph-Eugene Winzer
63c62d25e1 SUPERNOVA: Adds explicitly invalid state for Objects 2018-01-23 01:47:02 +00:00
Joseph-Eugene Winzer
714b38dde4 SUPERNOVA: Fixes dimming when ship energy low
roomBrightness() saw the greatest change by ripping out dimColors().
I compared the result with the original game and I cannot see any
difference by just reducing the palette brightness to 60%.
2018-01-23 01:47:01 +00:00
Joseph-Eugene Winzer
c95efb1e3e SUPERNOVA: Refactoring
Renaming variables of GameState to avoid ambiguity.
2018-01-23 01:47:01 +00:00
Joseph-Eugene Winzer
2545ffd074 SUPERNOVA: Fixes overdraw of input 2018-01-23 01:47:01 +00:00