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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We do this by acting as if the mouse just moved to its current
position. I first noticed this on the original save/load dialogs.
|
|
This doesn't behave quite like the original - it seems the original
does not take the fake last entry into account when saving? - but I
think it's actually a bit more consistent this way.
|
|
The arrows are only visible when there are savegames to scroll to
in that direction.
|
|
There are still lots of things that don't look or act quite like
the original, but it's getting late here.
|
|
|
|
|
|
|
|
|
|
|
|
All this does is to offset the image when copying it to the screen,
and offset the position when checking for clickable items at specific
coordinates. It looks and works right to me. I guess that just leaves
the buildColorTransTable2() function, but I'm useless for that so
someone else will have to look into it.
|
|
I'm guessing that the unused _top variable is what causes the main
menu to be drawn at the wrong position at the very start of the
game. At that point, it's 30 which seems to be by how much the Y
coordinate is off.
|
|
The shadeRect() function is called just once (at the time of writing)
and immediately afterwards the "front screen" is copied to the
"background". Therefore, drawing to the background doesn't seem to
make any sense.
The colors are wrong, but I assume that's for the same reason that the
text colors are wrong as well.
|
|
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
|
|
This removes an unnecessary use of floating point maths.
|
|
Also, this changes the dialog skip key to space instead of escape
|
|
|
|
|
|
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- The game's background is now restored when the menu closes
- Fixed a memory leak
- Removed dead code
|
|
|
|
|
|
|
|
|
|
now possible
- Add blastSprite method which draws a sprite directly to the frontScreen without the renderQueue
- Add F10 scancode in sfHandleInput to open the menu
|
|
hardcoded ones)
- ...and load the system strings from the resource on startup
- Only redraw menu screen when required
- Change parameters for some text functions from byte* to const byte*
- Rename some mouse vars
|
|
|
|
|
|
|
|
|
|
|
|
editing of the savegame description
|
|
fixed some early bugs
|
|
|
|
|
|
|
|
ResourceCache needs more work since resources are never freed (which is bad).
|