Commit Graph
55 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko 03493e5042 TOLTECS: Fixed Cancel button behaviour. Bugreport #7107 2021-08-25 01:30:45 +02:00
mataniko 06242a712b JANITORIAL: Rename EVENT_RTL
Now that ScummVM is adding RTL support, the EVENT_RTL should be disambigious that it is for returning to launcher
2020-05-12 10:36:38 +02:00
Filippos Karapetis db4709510a TOLTECS: Stop processing game menus after an RTL event. Fixes #11256 2020-01-12 21:54:15 +02:00
Adrian Frühwirth 00e59a3122 ALL: Load savegame thumbnail only when necessary
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.
2018-04-07 09:26:20 +02:00
Eugene Sandulenko 50868e9e10 TOLTECS: Initialize Menu class 2016-06-10 14:17:04 +02:00
Strangerke fffb3db0a6 TOLTECS: Reduce the scope of one more variable 2014-03-02 18:10:31 +01:00
Strangerke fd995fa449 TOLTECS: Apply CppCheck performance recommendations 2014-03-02 11:40:05 +01:00
Johannes Schickel 8b9afc9d92 TOLTECS: Make GPL headers consistent in themselves. 2014-02-18 02:39:39 +01:00
Johannes Schickel 863ead081d TOLTECS: Take advantage of Surface::getPixels. 2013-08-03 04:02:53 +02:00
Johannes Schickel 76aa360112 TOLTECS: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:34 +02:00
Torbjörn Andersson 532dd09b21 TOLTECS: When a new dialog opens, highlight active item (if any)
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.
2013-01-04 10:58:27 +01:00
Torbjörn Andersson c9a175a877 TOLTECS: Scroll original save/load dialog to bottom on opening
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.
2013-01-04 10:50:18 +01:00
Torbjörn Andersson 8afe7a2361 TOLTECS: Hide/show arrows in original save/load dialogs
The arrows are only visible when there are savegames to scroll to
in that direction.
2013-01-04 10:32:10 +01:00
Torbjörn Andersson 739549a29b TOLTECS: Small adjustments to the dialogs to better match original
There are still lots of things that don't look or act quite like
the original, but it's getting late here.
2013-01-04 00:01:10 +01:00
Filippos Karapetis 7b80c033c1 TOLTECS: Fix the colors of the arrows in the sound volume screen 2013-01-02 17:01:52 +02:00
Filippos Karapetis ef6003c29f TOLTECS: Add an option to use the ScummVM save/load screens 2013-01-02 16:48:52 +02:00
Filippos Karapetis 46b5f15a4a TOLTECS: Some more menu color fixes 2013-01-02 15:26:36 +02:00
Filippos Karapetis 16026cb8de TOLTECS: Fix more menu colors 2013-01-02 15:21:13 +02:00
Filippos Karapetis 027deb1612 TOLTECS: Fix menu colors 2013-01-02 15:05:10 +02:00
Torbjörn Andersson 8335e340fd TOLTECS: Fix menu positining in the simplest way I can think of
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.
2012-10-03 22:21:52 +02:00
Torbjörn Andersson eea9fc637c TOLTECS: Added TODO comment about main menu position
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.
2012-10-03 01:09:11 +02:00
Torbjörn Andersson f758b8422c TOLTECS: Draw shaded rects to "front screen", not "background"
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.
2012-10-02 22:12:56 +02:00
Johannes Schickel 89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Johannes Schickel fad5041a32 TOLTECS: Replace ceil with integer maths.
This removes an unnecessary use of floating point maths.
2012-09-21 03:01:39 +02:00
Filippos Karapetis a9a579891e TOLTECS: Open the save menu with F5 and the load menu with F9
Also, this changes the dialog skip key to space instead of escape
2012-09-11 00:34:27 +03:00
Filippos Karapetis 72cdd019fc TOLTECS: Implement volume handling and toggling of speech/text 2012-09-11 00:34:23 +03:00
Johannes Schickel 72f1fb0bed TOLTECS: Get rid of casts on OSystem::copyRectToScreen calls. 2012-06-16 02:39:00 +02:00
Tarek Soliman a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
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)
2012-02-15 10:07:10 -06:00
Torbjörn Andersson 54041675e5 TOLTECS: Some formatting fixes. 2012-01-29 21:41:16 +01:00
Filippos Karapetis 09349c2bca TOLTECS: Don't call c_str() on the return value of Common::String::format() 2011-11-26 22:37:44 +02:00
Filippos Karapetis 31cf9b7610 TOLTECS: Reduce code duplication 2011-11-26 22:28:39 +02:00
Filippos Karapetis 579c47b717 TOLTECS: Removed duplicate assignment 2011-11-20 22:43:12 +01:00
Filippos Karapetis 9f8ceaace2 TOLTECS: Implemented Quit game functionality in the menu 2011-11-20 22:43:11 +01:00
Filippos Karapetis 4a03bb3e43 TOLTECS: Disabled some leftover unnecessary debug output 2011-11-20 22:43:11 +01:00
Filippos Karapetis 1eed5caff5 TOLTECS: Some cleanup of the menu code 2011-11-20 22:43:11 +01:00
Filippos Karapetis 522c1ca32b TOLTECS: Bugfixes for the game menu
- The game's background is now restored when the menu closes
- Fixed a memory leak
- Removed dead code
2011-11-20 22:43:11 +01:00
David Turner 9f3cc261c2 TOLTECS: Fix Compilation After Graphics::Surface PixelFormat changes. 2011-11-20 22:43:10 +01:00
Filippos Karapetis 75842b031f TOLTECS: Added comments on main game loop, and added a FIXME 2011-11-20 22:43:10 +01:00
Filippos Karapetis 26a7bf4eb5 TOLTECS: Reduced header dependencies 2011-11-20 22:43:10 +01:00
Benjamin Haisch dde75d709e TOLTECS: Fix compilation 2011-11-20 22:43:10 +01:00
Benjamin Haisch 1cb95f36e7 TOLTECS: - More work on the menu system, saving and loading from there is 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
2011-11-20 22:43:10 +01:00
Benjamin Haisch ce7f9a088c TOLTECS: - Work on the menu system (use strings from resources instead of 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
2011-11-20 22:43:10 +01:00
Benjamin Haisch 6034e4ffb4 TOLTECS: - Don't add test entries to the save/loadgame menu 2011-11-20 22:43:09 +01:00
Benjamin Haisch 34eb899b25 TOLTECS: Fixed compilation 2011-11-20 22:43:09 +01:00
Filippos Karapetis ac97b441ec TOLTECS: Silenced warning 2011-11-20 22:43:08 +01:00
Benjamin Haisch 4c7cef996a TOLTECS: Misc fixes in the menu system 2011-11-20 22:43:08 +01:00
Benjamin Haisch 145a696fe0 TOLTECS: Implemented scrolling in the savegame list 2011-11-20 22:43:08 +01:00
Benjamin Haisch d80cc85347 TOLTECS: More work on the menu; started the savegame page and implemented editing of the savegame description 2011-11-20 22:43:08 +01:00
Benjamin Haisch 28c74ff3b4 TOLTECS: More work on the menu; started with the saveload menu page and fixed some early bugs 2011-11-20 22:43:08 +01:00