Commit graph

521 commits

Author SHA1 Message Date
Thierry Crozat
13324efb7f SUPERNOVA: Fix out of bound access when exiting the engine while in a dialog
This was reported by coverity (CID 1385572).
2018-01-30 21:48:20 +00:00
Joseph-Eugene Winzer
ccd4e20e32 SUPERNOVA: Fixes destruction of SoundSample buffer 2018-01-23 02:15:47 +00:00
Joseph-Eugene Winzer
26b5522463 SUPERNOVA: Adds ModeList 2018-01-23 02:15:47 +00:00
Thierry Crozat
eafd739c66 SUPERNOVA: Improve waiting until a sound has finished playing 2018-01-23 02:15:47 +00:00
Thierry Crozat
ac609c91db SUPERNOVA: Make _event a local variable 2018-01-23 02:15:47 +00:00
Thierry Crozat
2a8cf41b33 SUPERNOVA: Handle RTL and Quit while editing text 2018-01-23 02:15:47 +00:00
Thierry Crozat
d12b182450 SUPERNOVA: Remove declaration for unimplemented and unused function 2018-01-23 02:15:47 +00:00
Thierry Crozat
ba51c37a5c SUPERNOVA: Fix cursor not shown if escaping during the intro snoring sequence 2018-01-23 02:15:47 +00:00
Thierry Crozat
963ad97e2a SUPERNOVA: Fix missing reset of object CARRIED flag when clearing inventory 2018-01-23 02:15:47 +00:00
Joseph-Eugene Winzer
dd6df76b32 SUPERNOVA: Initializes RandomSource on stack 2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
b937268e61 SUPERNOVA: Renames INT32_MAX to kMaxTimerValue
Prevents collision with stdint.h INT32_MAX
2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
32e8d22c14 SUPERNOVA: Corrects header guard name 2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
b8b0ae57cc SUPERNOVA: Fixes AudioStream leak 2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
d68ce6dc07 SUPERNOVA: Changes array to seperate variables 2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
e40a017962 SUPERNOVA: Fixes segfault if dat file not found 2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
c0f47712c2 SUPERNOVA: Changes message order
When taking off your helmet or life support in a room without oxygen, it
showed the death screen before the 'taking off helmet/life support'
message.
2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
fa1e93a15e SUPERNOVA: Removes global constructor call
Object() is redundant anyway as it instantiates an Object object and
copies it to nullObject, which was already default constructed.
2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
da3d145819 SUPERNOVA: Moves strings to GameManager class 2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
6fe9af93f3 SUPERONVA: Sets uninitialized values to 0 2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
8d79bbad9b SUPERNOVA: Removes comment
renderRoom() and later in the game loop executeRoom() does everything
that is explicitly called in the original.
2018-01-23 02:15:46 +00:00
Joseph-Eugene Winzer
f5c2271ffd SUPERNOVA: Prevents paletteFadeIn() to be triggered 2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
43709a59f3 SUPERNOVA: Reverts brightness change
If the brightness is 0, it is faded in at the end of the game loop.
In some instances, especially cutscenes, it makes the code harder to
understand as in somecases the code expects the brightness to be faded
in after having it faded out, set manually to 0 or when you leave a dark
room, set by roomBrightness().
Removing it now, would just lead to more confusion during the port of
Supernova part 2.
2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
45b2c4ea28 SUPERNOVA: Hides cursor during snoring sequence 2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
40b39b2b6d SUPERNOVA: Aborts intro if game should be closed 2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
1fd7ea7c39 SUPERNOVA: Fixes object state update
In order to trigger a mouseField change in processInput(), we move the
cursor to 0,0 first before restoring its original position.
2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
f3f75da959 SUPERNOVA: Pushes a mousemove to update object state
If you click on an exit on the map and there is again an exit on the
same spot, it won't be recognized until the next mouse move/click.
This change fakes a mouse move and thus updates the object state.
2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
6df88c5c46 SUPERNOVA: Fixes fading in intro 2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
509edfd539 SUPERNOVA: Returns to launcher after outro 2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
063962a583 SUPERNOVA: Updates palette when changing room brightness 2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
d69480b52e SUPERNOVA: Renames audio constants 2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
7ba9d94a89 SUPERNOVA: Renames audio constants 2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
c1f6d41ce0 SUPERNOVA: Fixes outro cutscene 2018-01-23 02:15:45 +00:00
Joseph-Eugene Winzer
3ae3ee6978 SUPERNOVA: Fixes inventory scrolling
Correctly moves inventory view when items are added/removed/cleared
2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
5861627602 SUPERNOVA: Implements money object for inventory 2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
996d5c082e SUPERNOVA: Replaces TICKETS with MONEY 2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
8451f70c97 SUPERNOVA: Sets CARRIED flag when added to inventory 2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
6e7da43889 SUPERNOVA: Introduces INT32_MAX for eventTime 2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
b6bb1f9709 SUPERNOVA: Corrects max value for int32 2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
d90fa9d745 SUPERNOVA: Fixes setting of properies
resetProperty() clears the object's property flag compared to
setProperty().
2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
acfe2ab145 SUPERNOVA: Registers cmdButton clicks
Mouse clicks were consumed if a message was shown. This commit
introduces an exception for clicks on command buttons.
Also some refactoring.
2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
639bc10906 SUPERNOVA: Disables OCCUPIED flag correctly 2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
dbb2632d1e SUPERNOVA: Rename kAudioUndef2 to kAudioSmash 2018-01-23 02:15:44 +00:00
Thierry Crozat
4a042c8465 SUPERNOVA: Save/restore _playerHidden flag in savegames 2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
bb8dbdfc68 SUPERNOVA: Fixes game freeze in bcorrdior
Most of the time _objectState[MAX_OBJECT - 1] was used for
showing/hiding the GUI, here it was to indicate if the player
is currently hidden behind a pillar though.
2018-01-23 02:15:44 +00:00
Joseph-Eugene Winzer
b76ac8331f SUPERNOVA: Fixes turntable message
Do not show a message that the record is scratched when either
the turnable is unplugged or the cable cut.
2018-01-23 02:15:43 +00:00
Joseph-Eugene Winzer
8ccb752c33 SUPERNOVA: Puts on suit when leaving the restaurant
genericInteraction() has a special case when you take off your helmet
in the restaurant, it strips you completely.
Once you leave it's supposed to put on your suit, helmet and supply
but instead if flagged generic objects as worn.
2018-01-23 02:15:43 +00:00
Thierry Crozat
ab6ae19ab3 SUPERNOVA: Fix calling onEntrance for new rooms
There was an issue when the onEntrance for one room changes
the current room. It would then fail to call onEntrance for
that new room. This happened at lest once at the start as the
Intro room onEntrance() changes to the first room at the end
if the intro cutscene.
2018-01-23 02:15:43 +00:00
Thierry Crozat
bc78e613fd SUPERNOVA: Do not try to render INTRO room
This room has no image and this avoids getting a warning
about image file not found.
2018-01-23 02:15:43 +00:00
Thierry Crozat
d8284756bb SUPERNOVA: Fix warning when not finding image file 2018-01-23 02:15:43 +00:00
Thierry Crozat
1d32c6ac25 SUPERNOVA: Only call onEntrace once after changing room 2018-01-23 02:15:43 +00:00