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.
|
|
Previously, a C-style cast was used to convert a
Common::Array<Plugin *>, populated with pointers to StaticPlugin
and DynamicPlugin instances, to a
Common::Array<PluginSubclass<T> *>, but PluginSubclass<T> is a
*sibling* class to StaticPlugin/DynamicPlugin, so this cast was
invalid and the results undefined. The methods for retrieving
subclasses of plugins can't be easily changed to just generate an
array of temporary wrapper objects that expose an identical API
which dereferences to the preferred PluginObject subclass because
pointers to these objects are retained by other parts of ScummVM,
so the wrappers would needed to be persisted or they would need to
just re-expose the underlying Plugin object again. This indicated
that a way to solve this problem is to have the callers receive
Plugin objects and get the PluginObject from the Plugin by
explicitly stating their desired type, in a similar manner to
std::get(std::variant), so that the pattern used by this patch to
solve the problem.
Closes gh-1051.
|
|
|
|
The original game would display a message if you tried to load or
delete a game without actually selecting one. At least for now,
let's just avoid crashing.
|
|
Don't crash when clicking a read-only text widget. In the original,
the load game dialog's text widget isn't read-only, but since we
allow multiple games to have the same name it's probably for the
best that we don't quite match the original behavior here.
|
|
It's bugging me, ok?
|
|
|
|
|
|
|
|
This makes space for one additional savegame slot, giving them the
same number of slots as the original save dialog. I can't compare
to the original, but it arguably looks better this way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Otherwise, every global variable of type NRect requires a constructor to be
run, which can cause portability issue.
|
|
|
|
My initial suggestion to fix the issue was made in 163023a, which broke
the save slot selection logic. The actual save slot selection problem
was fixed in commit 2ca36ab
|
|
An option has been added to use the original ones, if needed
|
|
|
|
|
|
|
|
- Add virtual keyboard support in save/load screens
|
|
- Fix video speed in the very last scene (Scene1317)
- Fix back door not opening in Scene1401
- Fix projector not moving in Scene1402
- Fix projector not appearing in Scene1403
- Fix wrong Klaymen walking in Scene2205
- Fix wrong scene change in Module2300
- Fix symbols not appearing in Scene3011
- Define out some remaining logic debug code
- Remove some obsolete comments
- Reduce debug output
- Use a List instead of an Array when building the microtiles rectangles
|
|
- Rename WidgetScene to GameStateMenu
- Merge common code from the save/load/delete into GameStateMenu
|
|
- Rename Widget::addSprite to Widget::initialize
|
|
simplify game deletion
|
|
|
|
- Minor cleanup
|
|
- Rename and reorder fields in the Klaymen class
|
|
- Add LoadGameMenu class
|
|
- Some minor cleanup
|
|
separate pixels/pitch
- Merge SpriteResource::load and load2
|
|
- Enable return to launcher
- Remove obsolete comments
- Remove braces in single-line statements
- Remove unused non-transparent drawing code in BaseSurface::copyFrom
- Clean up mouse cursor insertion code in Scene class
|
|
|
|
|
|
- Remove fallback detector (I think it's not needed)
- Rename Scene insertMouse methods
|
|
|
|
- Add handling of ascii and system key input
- Fix TextSurface::drawChar()
- Pause audio when entering the menu, resume it again afterwards
- Add TextEditWidget
- Add SaveGameMenu (doesn't actually save anything yet and needs more work)
|
|
|
|
|
|
|
|
setting stuff "manually"
|
|
|