Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so
cannot exist in a well-formed C++17 program.
It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html>
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>.
The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.
Closes gh-1079.
|
|
|
|
|
|
|
|
|
|
|
|
These issues were identified by the STACK tool.
By default, the C++ new operator will throw an exception on allocation
failure, rather than returning a null pointer.
The result is that testing the returned pointer for null is redundant
and _may_ be removed by the compiler. This is thus optimization
unstable and may result in incorrect behaviour at runtime.
However, we do not use exceptions as they are not supported by all
compilers and may be disabled.
To make this stable without removing the null check, you could qualify
the new operator call with std::nothrow to indicate that this should
return a null, rather than throwing an exception.
However, using (std::nothrow) was not desirable due to the Symbian
toolchain lacking a <new> header.
A global solution to this was also not easy by redefining "new" as "new
(std::nothrow)" due to custom constructors in NDS toolchain and various
common classes.
Also, this would then need explicit checks for OOM adding to all new
usages as per C malloc which is untidy.
For now to remove this optimisation unstable code is best as it is
likely to not be present anyway, and OOM will cause a system library
exception instead, even without exceptions enabled in the application
code.
|
|
|
|
|
|
|
|
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If you turn off the music and then save a game, then turn on the music
again and then load the saved game, the music from the scene continue
to play despite the _music flag being false. So the first time you click on
the music on/off button the music restart and only the second time
does it stop. This fixes the bug by stoping the music before reloading
a game.
|
|
|
|
|
|
loading and changing scene)
|
|
This should allow tsoliman to see the end of the intro
|
|
|
|
ALTering dice no longer is no longer noisy
|
|
|
|
|
|
Also removed a useless comment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thanks fuzzie for mentioning it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|