Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
GameManager::processInput() already does the job
|
|
This commit introduces the following changes:
1. Graphics::loadThumbnail()
Now returns a boolean and takes a new argument skipThumbnail which
defaults to false. In case of true, loadThumbnail() reads past the
thumbnail data in the input stream instead of actually loading the
thumbnail. This simplifies savegame handling where, up until now,
many engines always read the whole savegame metadata (including
the thumbnail) and then threw away the thumbnail when not needed
(which is in almost all cases, the most common exception being
MetaEngine::querySaveMetaInfos() which is responsible for loading
savegame metadata for displaying it in the GUI launcher.
2. readSavegameHeader()
Engines which already implement such a method (name varies) now take
a new argument skipThumbnail (default: true) which is passed
through to loadThumbnail(). This means that the default case for
readSavegameHeader() is now _not_ loading the thumbnail from a
savegame and just reading past it. In those cases, e.g.
querySaveMetaInfos(), where we actually are interested in loading
the thumbnail readSavegameHeader() needs to explicitely be called
with skipThumbnail == false.
Engines whose readSavegameHeader() (name varies) already takes an
argument loadThumbnail have been adapted to have a similar
prototype and semantics.
I.e. readSaveHeader(in, loadThumbnail, header) now is
readSaveHeader(in, header, skipThumbnail).
3. Error handling
Engines which previously did not check the return value of
readSavegameHeader() (name varies) now do so ensuring that possibly
broken savegames (be it a broken thumbnail or something else) don't
make it into the GUI launcher list in the first place.
|
|
Confirmed intentional by Joefish.
|
|
|
|
|
|
|
|
|
|
|
|
It simplifies the overloaded functions for renderBox/Text and saveScreen
|
|
|
|
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.
|
|
Most of them were for debugging only anyway and commands like `giveall`
actually broke parts of the game (and didn't even give you all items).
|
|
|
|
The NULL terminator is needed during parsing.
|
|
|
|
|
|
|
|
This was reported by coverity (CID 1385537).
|
|
|
|
This was reported by coverity (CID 1385566), and althought this was
unlikely to happen, it was not impossible (due to the translations).
|
|
This was reported by coverity (CID 1385572).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Prevents collision with stdint.h INT32_MAX
|
|
|
|
|
|
|
|
|
|
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.
|
|
Object() is redundant anyway as it instantiates an Object object and
copies it to nullObject, which was already default constructed.
|
|
|
|
|
|
renderRoom() and later in the game loop executeRoom() does everything
that is explicitly called in the original.
|
|
|
|
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.
|
|
|
|
|
|
In order to trigger a mouseField change in processInput(), we move the
cursor to 0,0 first before restoring its original position.
|
|
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.
|
|
|
|
|