aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/cge_main.cpp
AgeCommit message (Collapse)Author
2019-10-16CGE: Fix Missing Default Switch CasesD G Turner
These are flagged by GCC if -Wswitch-default is enabled.
2018-05-05CGE: Add play time metadata to savegamesAdrian Frühwirth
2018-04-07ALL: Load savegame thumbnail only when necessaryAdrian Frühwirth
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.
2017-12-03ALL: Remove obsolete register keywordColin Snover
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.
2014-03-15CGE: Remove a useless structure member, reduce a variable scopeStrangerke
2014-03-15CGE: Remove a useless variable, remove some associated dead codeStrangerke
2014-03-02CGE: Move hero shadow check inside hero check in sceneUp()Strangerke
2014-02-18CGE: Make GPL headers consistent in themselves.Johannes Schickel
2014-02-09CGE: Reduce the scope of some variablesStrangerke
2014-01-15ALL: Remove optimization unstable code on checking for null after new.D G Turner
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.
2013-11-10CGE: Ensure string copy don't overrun. Fix CID 1003674 to 1003678Strangerke
2013-08-03CGE: Take advantage of Surface::getPixels.Johannes Schickel
2013-08-03CGE: Prefer getBasePtr over direct Surface::pixels access.Johannes Schickel
2012-09-26JANITORIAL: Remove trailing whitespaces.Johannes Schickel
Powered by: git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-05CGE: Fix bug #3557904 - Shadow at wrong positionStrangerke
2012-08-05CGE: Keep Soltys' position when savingStrangerke
2012-08-04CGE: Fix bug #3547274 - missing travel buttons after saveStrangerke
2012-07-05CGE: Remove hack used to store keycode in CGEEventStrangerke
2012-06-28CGE: Remove unused Demo text idStrangerke
2012-06-28CGE: Rename variableStrangerke
2012-06-27CGE: Fix bug 3538039 - level buttons not pressedStrangerke
2012-06-18CGE: Remove dead code originally used to load a savegame when starting the gameStrangerke
2012-03-28CGE: Close memory leak in savegame loading.D G Turner
2012-03-28CGE: Close memory leak in savegame thumbnail loading.D G Turner
2011-12-07CGE: Fix issue with music not stopping when reloading gameThierry Crozat
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.
2011-12-03CGE: Fix an assert in introStrangerke
2011-12-03CGE: Soltys - Fix initialization of a couple of bool variablesStrangerke
2011-12-03CGE: Soltys - Fix for bug #3448836 (losing scene number display after ↵Strangerke
loading and changing scene)
2011-11-30CGE: Only skips animations when pressing ESC.Strangerke
This should allow tsoliman to see the end of the intro
2011-11-30CGE: Simplify keyboard handlingStrangerke
2011-11-29CGE: Remove key sound in System::touch().Strangerke
ALTering dice no longer is no longer noisy
2011-11-27CGE: Better fix for restoring savegames when a cut-scene is activePaul Gilbert
2011-11-16CGE: Add RTL, hook Main Menu to right click on audio buttonStrangerke
2011-11-14CGE: Rename a structure member using double-underscore (reserved)Strangerke
Also removed a useless comment
2011-11-13CGE: Remove some useless constantsStrangerke
2011-11-09CGE: Properly stop player moving when saving or restoringPaul Gilbert
2011-11-03CGE: Fix warningEugene Sandulenko
2011-10-22CGE: Add some doxygen commentsStrangerke
2011-09-18CGE: Rename Snail into CommandHandler, plus some associated renamingsStrangerke
2011-09-17CGE: Fix a potential bug in insertCommand(), some renamingStrangerke
2011-09-17CGE: Remove a use reference to g_engineStrangerke
Thanks fuzzie for mentioning it
2011-09-17CGE: Move _talk and _text to CGEEngineStrangerke
2011-09-17CGE: Move some more globals to CGEEngineStrangerke
2011-09-17CGE: some more cleanupStrangerke
2011-09-17CGE: Move some more globals to CGEEngineStrangerke
2011-09-17CGE: Move 4 global to CGEEngineStrangerke
2011-09-16CGE: Move _vga to CGEEngineStrangerke
2011-09-16CGE: Get rid of some more global functions and static membersStrangerke
2011-09-16CGE: move two global functions to VgaStrangerke
2011-09-16CGE: Move two globals functions to CGEEngineStrangerke