Commit Graph
137148 Commits
Author SHA1 Message Date
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 624425077b SUPERNOVA: Add warning when trying to use out of bound file number
This is likely happening, and a comment has also been added to
indicate this. The warning was added to help detect those issue
and so that we don't forgert about it.
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 58cfbb532b SUPERNOVA: Fix room rendering
It could initially access the wrong image to check the number
of section. The code was working fine as long as it had one
section, so there was probably no bad side effect to using
the wrong image (except if it was NULL).
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 45595b9683 SUPERNOVA: enable general dialogs in AxacussIntersection and AxacussExit 2018-01-23 02:15:40 +00:00
Strangerke d8e221e206 SUPERNOVA: Fix bug in AxacussExit 2018-01-23 02:15:39 +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
Strangerke eed616a4aa SUPERNOVA: Fix bug in GUARD room definition 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 1566b6cadc SUPERNOVA: Add string for text speed dialog 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 b527b54c6f SUPERNOVA: Disable loading and saving during execution of event callbacks 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 575aef711b SUPERNOVA: Fix updating the palette brightness when the current image has no palette 2018-01-23 02:15:38 +00:00
Thierry Crozat af226daf81 SUPERNOVA: Fix incorrect delay for message display
The delay was not set, meaning the messages were immediately
removed in some cutscenes.
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 ba4e20b80a SUPERNOVA: Improve English translation 2018-01-23 02:15:38 +00:00
Thierry Crozat 3270b51372 SUPERNOVA: Add strings for supernova explosion cutscene 2018-01-23 02:15:38 +00:00
Thierry Crozat 30a3ab640e SUPERNOVA: Improve English translation 2018-01-23 02:15:38 +00:00
Thierry Crozat eb43b029cc SUPERNOVA: Improve English translation 2018-01-23 02:15:38 +00:00
Thierry Crozat 682dfa0e0c SUPERNOVA: Fix two incorrect German strings 2018-01-23 02:15:38 +00:00
Thierry Crozat 54201327f7 SUPERNOVA: Fix image rendering when removing image
This is mostly used in talk animations and result in bad artefacts.
The issue was a regression introduced in commit e0f6da0.
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 3f2c0673e4 SUPERNOVA: Do not run animations while a text box is displayed
That is also what the original is doing, and this avoid having
graphical glitches.
2018-01-23 02:15:38 +00:00
Thierry Crozat a159a19324 SUPERNOVA: Split English translation on two lines
The string is too long to be displayed on a single line (and the
original German string was already on two lines).
2018-01-23 02:15:37 +00:00
Thierry Crozat 8f7dcbe4ac SUPERNOVA: Fix crash when displaying strings larger than the screen 2018-01-23 02:15:37 +00:00
Thierry Crozat 841e7182f2 SUPERNOVA: Reduce memory usage to store sections and simplify code
Each section was store dusing the full image size. Now it only uses the
section size, which should reduce considerably the amout of memory used
for each image.

Also when a section has one or more next section, they were all drawn on
the surface for this section, but then they were drawn again on their own
surface. And while this should not cause any issue, this was really
unnecessary (and prevented optimizing the surface size for each section).
So now this is no longer the case and the surface for a section only
contains this section.
2018-01-23 02:15:37 +00:00
Thierry Crozat 73278c3f9f SUPERNOVA: Replace a class variable used in a single function by a local variable 2018-01-23 02:15:37 +00:00
Thierry Crozat 5b76bbb016 SUPERNOVA: Fix graphics glitches 2018-01-23 02:15:37 +00:00
Thierry Crozat 5dd3bea723 SUPERNOVA: Fix incorrect German string 2018-01-23 02:15:37 +00:00
Thierry Crozat 5362f3bc26 SUPERNOVA: Improve English translation 2018-01-23 02:15:37 +00:00
Thierry Crozat 7c40e38d7c SUPERNOVA: Fix recursive infinite loop in door closing animation in ArsanoEntrance 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 f4b10b7a83 SUPERNOVA: Add missing game string 2018-01-23 02:15:37 +00:00
Thierry Crozat 06c46bd281 SUPERNOVA: Fix incorrect German string 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
Thierry Crozat 29397932af SUPERNOVA: Fix incorrect translation 2018-01-23 02:15:36 +00:00
Thierry Crozat 8950934a47 SUPERNOVA: Fix incorrect string 2018-01-23 02:15:36 +00:00
Thierry Crozat e06d7cc99b SUPERNOVA: Fix incorrect game text strings 2018-01-23 02:15:36 +00:00