Commit Graph

25 Commits

Author SHA1 Message Date
macca8
142ad94149 ENGINES: Rename initSaveType() method (#6)
Rename method to match its purpose.
2023-03-05 23:19:40 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
aa8cabd18f ENGINE: Suppress autosave overwrite warning when description is empty
Some engines (like kyra) return a SaveStateDescriptor with slot assigned,
even when the slot is free. The indication for an empty save is empty
description on these cases.
2021-11-24 09:07:03 +02:00
Orgad Shaneh
fe104cc337 ENGINES: Use MetaEngine consistently for getting autosave slot
The autosave refactoring that was done in
7adad5aaf5 used g_engine for identifying the
autosave slot. This worked for in-game save/load, but doesn't fit when
called from the launcher.

Fix by passing MetaEngine to SaveStateDescriptor ctor and using it for this
query.

Amends 7adad5aaf5.
2021-10-24 16:46:06 +02:00
Orgad Shaneh
6aeda12247 ENGINES: Warn when overwriting a non-autosave on autosave 2021-08-23 13:34:35 +02:00
Orgad Shaneh
7adad5aaf5 ENGINES: Streamline auto-save write/delete protection
Some engines call setAutosave and some don't. isAutosave is used to
determine if a saved game is an autosave, but in fact, on most cases it
just falls back to comparing the name to "Autosave".

This is wrong for several reasons:
* Older versions of ScummVM used Autosave 0.
* The name "Autosave" is translated, so if you change the language, it
  won't be detected.

Instead of relying on the name, use the well-known getAutosaveSlot() from
Engine/MetaEngine.

Fixes #12735.
2021-08-23 13:34:35 +02:00
Bartosz Gentkowski
f04056519a DOXYGEN: Review of high prio headers from engines
This is a doxygen review for 4 header files that have been
identified as high priority for GSoD:

- advancedDetector.h
- metaengine.h
- engine.h
- util.h

It also adds doxy groups to other headers from this folder to
make them appear properly in the structure.
2020-12-02 00:13:49 +00:00
aryanrawlani28
e206c513bb ENGINES: Proper usage of Saveload/SaveState for U32Strings. 2020-08-30 14:43:41 +02:00
aryanrawlani28
4b6976c558 GUI: U32: Reduce number of files changed and fixes
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.

- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28
bed05ea134 GUI: U32: Fix compilation errors across entire project
After the initial changes just to scummvm/gui for u32, this commit includes the whole project

- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28
f800ca4ada GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes.

- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
2020-08-30 14:43:41 +02:00
Paul Gilbert
0b81eaab7b ENGINES: Abstract autosave check into SaveStateDescriptor 2020-02-16 15:44:28 -08:00
David Fioramonti
9d88afe6bf GRAPHICS: Add playtime in milliseconds to SaveStateDescriptor
This will make setting the playtime for the engine easier since
the current savestate stores it as a string.

This value gets set at the same time that the string playtime gets set.
2018-07-21 13:15:14 +02:00
Colin Snover
5c89c39325 FULLPIPE: Fix memory leak of save game thumbnail 2017-11-18 22:35:12 +01:00
Alexander Tkachev
f1a56eaf36 GUI: Show "locked" saves during sync 2016-08-24 16:07:55 +06:00
Johannes Schickel
a155220100 ENGINES: Add comparator to sort SaveStateDescriptors based on slot. 2016-02-25 21:39:45 +01:00
Einar Johan Trøan Sømåen
2fa1340438 ENGINES: Fix some Doxygen comments that seem wrong. 2014-08-29 03:28:43 +02:00
Johannes Schickel
53e83147be ENGINES: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
Johannes Schickel
0a51805a8c ENGINES: Mention defaults for writable and deletable settings in SaveStateDescriptor docs. 2012-07-03 18:40:40 +02:00
Johannes Schickel
09501be85b ENGINES: Clean up SaveStateDescriptor.
Now SaveStateDescriptor no longer subclasses HashMap. Instead all possible
saved meta data is included directly into SaveStateDescriptor.

This is slightly less flexible, but we never needed that flexibility so far.
On the other hand it should reduce the memory usage. At least on my system
(Linux/amd64) the old SaveStateDescriptor had a size of 928 and the new
SaveStateDescriptor has a size of 200.
2011-07-02 21:07:55 +02:00
Max Horn
86240bb0dc ENGINES: Get rid of some s(n)printf calls 2011-06-02 18:31:58 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
3e01d35281 JANITORIAL: Format more forward declarations to follow convention 2011-04-28 12:32:01 +03:00
Johannes Schickel
1b2952e3ff ENGINE: Add a setPlayTime to SaveStateDescriptor taking an ms value.
svn-id: r53922
2010-10-29 16:41:30 +00:00
Max Horn
8db54382bb ENGINES: Move SaveStateDescriptor etc. to engine/savestate.*
svn-id: r48283
2010-03-18 15:09:48 +00:00