Commit graph

138 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
1d32c6ac25 SUPERNOVA: Only call onEntrace once after changing room 2018-01-23 02:15:43 +00:00
Thierry Crozat
f3e32d91a4 SUPERNOVA: Remove unused function variant 2018-01-23 02:15:43 +00:00
Joseph-Eugene Winzer
6a39148a30 SUPERNOVA: Sets sections in the correct room 2018-01-23 02:15:43 +00:00
Thierry Crozat
75e3568f06 SUPERNOVA: Implement dialogs with variable text
This was partially implemented but not finished. However I reverted
the changes already done to support that in order to use a different
approach.
2018-01-23 02:15:42 +00:00
Strangerke
ef90759e92 SUPERNOVA: Some cleanup, simplify some code 2018-01-23 02:15:42 +00:00
Thierry Crozat
1b2e4f926c SUPERNOVA: Implement alarm 2018-01-23 02:15:42 +00:00
Thierry Crozat
0c5f02959f SUPERNOVA: Remove outdated comment and warning 2018-01-23 02:15:42 +00:00
Thierry Crozat
5f0709d66f SUPERNOVA: Silence warning about unhandled switch cases 2018-01-23 02:15:42 +00:00
Strangerke
b4d7a83c75 SUPERNOVA: Small cleanups 2018-01-23 02:15:42 +00:00
Strangerke
13319458dc SUPERNOVA; Move some strings to game text file, 2018-01-23 02:15:42 +00:00
Strangerke
4810d514fe SUPERNOVA: Implement telomat, increase savegame version 2018-01-23 02:15:41 +00:00
Thierry Crozat
626e93e6f8 SUPERNOVA: Consume click event when hiding message 2018-01-23 02:15:41 +00:00
Strangerke
37706ade78 SUPERNOVA: Implement searchStartEvent, fix bug in corridor initialization 2018-01-23 02:15:41 +00:00
Strangerke
cccdcf9c26 SUPERNOVA: Implement guardWalkEvent 2018-01-23 02:15:41 +00:00
Thierry Crozat
4014f4efae SUPERNOVA: Fix timing of search events 2018-01-23 02:15:41 +00:00
Thierry Crozat
deb6168ed1 SUPERNOVA: Make sure to exit bathroom to the same room from which it was entered 2018-01-23 02:15:41 +00:00
Thierry Crozat
55fc09571f SUPERNOVA: Fix handling of room brightness
There were several issues with the brighness due to the different
implementation between the original and the code in scummvm. The
code has now been modified to be much closer to the original, which
fixed those issues and allowed to remove workarounds that had been
added in various places to deal with those issues (but those
workarounds had their own issues such as fade in happening too
soon before switching to the new room).
2018-01-23 02:15:41 +00:00
Strangerke
1ff953b815 SUPERNOVA: Move 2 strings to the DAT file 2018-01-23 02:15:41 +00:00
Thierry Crozat
177539ba2e SUPERNOVA: Load images on demand 2018-01-23 02:15:41 +00:00
Thierry Crozat
87ab33a8aa SUPERNOVA: Fix several issues with savegames 2018-01-23 02:15:41 +00:00
Thierry Crozat
1759d1ffdd SUPERNOVA: Implement autosave used for dream sequence 2018-01-23 02:15:40 +00:00
Strangerke
ca1acaf5ea SUPERNOVA: Implement guardNoticed() 2018-01-23 02:15:40 +00:00
Thierry Crozat
888930660a SUPERNOVA: Use setCurrentImage instead of passing the image to renderImage
This is more similar to what the original code does and allows to retire
the renderImage variant that takes an image.
2018-01-23 02:15:40 +00:00
Thierry Crozat
b11772d904 SUPERNOVA: Fix logic in rendering code
There were several issues fixed by this commit. The main ones are:
 - It was in many places only drawing the first section even for
   images that have multiple sections.
 - It was in some places using the wrong image.

The first issue has been fixed by removing the GameManager::drawImage
function, and moving its logic to SupernovaEngine::renderImage which
was initially only drawing one section, but was nevertheless called
directly from many place.

The second image required more changes to the rendering code to allow
setting the current image file when it is different from the room file.
This fixes some memory issues and random crashes in places where it was
for example trying to use the image -1. This also fixes the rendering
of the flying cutscene.
2018-01-23 02:15:40 +00:00
Thierry Crozat
ee905b762a SUPERNOVA: Implement shipstart cutscene 2018-01-23 02:15:40 +00:00
Thierry Crozat
b39beb43fd SUPERNOVA: Fix initialization of timer when starting or loading game 2018-01-23 02:15:40 +00:00
Strangerke
d189820ce3 SUPERNOVA: Implement AxacussExit interaction logic 2018-01-23 02:15:39 +00:00
Strangerke
d1d1d988b0 SUPERNOVA: Add interaction logic for AxacussIntersection 2018-01-23 02:15:39 +00:00
Thierry Crozat
7eb5924f65 SUPERNOVA: Implement text speed dialog
The text speed is also saved in the scummvm.ini file so that
it persists between runs.
2018-01-23 02:15:39 +00:00
Thierry Crozat
965b4ca3de SUPERNOVA: Check shouldQuit to break from input loop 2018-01-23 02:15:39 +00:00
Thierry Crozat
529a9c9811 SUPERNOVA: Properly handle timer stop/start 2018-01-23 02:15:39 +00:00
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