Adrian Frühwirth
a20f90cbb7
JANITORIAL: Fix formatting
2018-04-22 00:56:21 +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
d963827dbb
SUPERNOVA: Renames MSNImageDecoder to MSNImage
2018-04-15 18:23:11 +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
3c81c61df9
SUPERNOVA: Removes TODO
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
bb46e53667
SUPERNOVA: Processes all keyboard queries in processInput()
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
7f5cea54e3
SUPERNOVA: Implements original quit prompt
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
3ec7c1f905
SUPERNOVA: Implements animated text during in/outro
2018-03-11 23:25:00 +01:00
Thierry Crozat
713d13e7ad
SUPERNOVA: Mark intentional fallthrough in switch
2018-01-31 21:09:10 +00:00
Thierry Crozat
bab0bf2b1e
SUPERNOVA: Improve command button size for translations
2018-01-31 20:45:31 +00:00
Thierry Crozat
2ba8ef9dc0
SUPERNOVA: Ensure the GuiElement _text field is null terminated
...
This was reported by coverity (CID 1385566), and althought this was
unlikely to happen, it was not impossible (due to the translations).
2018-01-30 22:06:03 +00:00
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
Thierry Crozat
2a8cf41b33
SUPERNOVA: Handle RTL and Quit while editing text
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
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
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
da3d145819
SUPERNOVA: Moves strings to GameManager class
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
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