Commit Graph
75 Commits
Author SHA1 Message Date
Joseph-Eugene Winzer 77c06fe487 SUPERNOVA: Removes unused variable 2018-04-16 11:47:06 +02:00
Joseph-Eugene Winzer d4592b6077 SUPERNOVA: Removes global nullObject
Before nullObject was a static member of Object class and now a member
of GameManager. Also the Inventory constructor was extended for taking a
pointer to the nullObject that Invetory::get() returns if no Object was
found.
2018-04-15 18:47:33 +01:00
Joseph-Eugene Winzer 3749f98dea SUPERNOVA: Fixes type camel case 2018-04-15 18:28:38 +01:00
Joseph-Eugene Winzer 2ead17f09f SUPERNOVA: Implements render functions
Although SupernovaEngine forwards render calls to screen, it also
exposed members publicly like _brightness. Therefore, a few changes were
necessary in rooms and state.
2018-04-15 18:28:29 +01:00
Joseph-Eugene Winzer 26543be637 SUPERNOVA: Adds sound abstraction 2018-04-14 11:45:52 +02:00
Joseph-Eugene Winzer dc38d6a8cd SUPERNOVA: Renames _timer1 to _messageDuration 2018-04-14 11:45:52 +02:00
Joseph-Eugene Winzer ff5426c609 SUPERNOVA: Moves updateEvents() to GameManager
updatEvents() depends on an initalized GameManager instance and mostly
manipulates its state. So it seemed fitting to move it over.
2018-04-14 11:45:52 +02:00
Joseph-Eugene Winzer 9689dffca9 SUPERNOVA: Removes mouseInput3()
The function highlights dialog choices depending on the mouse position
and loops till a mouse button is pressed.
Since it is used in GameManager::dialog() only, inlining it seems
reasonable, especially as the name was not descriptive in the first
place.
2018-04-14 11:45:52 +02:00
Joseph-Eugene Winzer 7dab7b775b SUPERNOVA: Renames wait2() to wait() 2018-04-14 11:45:52 +02:00
Joseph-Eugene Winzer 78e4a162ab SUPERNOVA: Removes unused function 2018-03-11 23:25:00 +01:00
Joseph-Eugene Winzer bb9bfcba4a SUPERNOVA: Encapsulates GuiElement
It simplifies the overloaded functions for renderBox/Text and saveScreen
2018-03-11 23:25:00 +01:00
Joseph-Eugene Winzer a38db245ed SUPERNOVA: Fixes formatting
Because of confusion when indentation level is raised and thus tabs or
spaces should be used when aligning code, this commit switches to tabs
to avoid any further confusion.
2018-03-11 23:25:00 +01:00
Joseph-Eugene Winzer 316817dc96 SUPERNOVA: Removes unused variable 2018-03-11 23:25:00 +01: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 da3d145819 SUPERNOVA: Moves strings to GameManager class 2018-01-23 02:15:46 +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 6e7da43889 SUPERNOVA: Introduces INT32_MAX for eventTime 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 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
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
Thierry Crozat 1b2e4f926c SUPERNOVA: Implement alarm 2018-01-23 02:15:42 +00:00
Thierry Crozat 967efacae1 SUPERNOVA: Remove leftover function declaration 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
Strangerke cccdcf9c26 SUPERNOVA: Implement guardWalkEvent 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
Thierry Crozat 1759d1ffdd SUPERNOVA: Implement autosave used for dream sequence 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
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 529a9c9811 SUPERNOVA: Properly handle timer stop/start 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 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
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
Joseph-Eugene Winzer 03414f789a SUPERNOVA: Implements inventory arrows 2018-01-23 02:15:31 +00:00
Joseph-Eugene Winzer 142e1743ce SUPERNOVA: Fixes playing vinyl in CabinL3 2018-01-23 02:15:25 +00:00
Joseph-Eugene Winzer 7cae6fde30 SUPERNOVA: Fixes number of rooms 2018-01-23 02:07:37 +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 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