aboutsummaryrefslogtreecommitdiff
path: root/graphics
AgeCommit message (Collapse)Author
2018-07-22GRAPHICS: MACMENU: added missing field initializationAndrei Prykhodko
2018-07-21GRAPHICS: MACGUI: Fix color searchingEugene Sandulenko
2018-07-21GRAPHICS: MACGUI: Fix compilationEugene Sandulenko
2018-07-21GRAPHICS: MACMENU: added menu parser from Win32 PE executableAndrei Prykhodko
2018-07-21GRAPHICS: MACMENU: added partial unicode supportAndrei Prykhodko
It misses renderSubmenu impl and accelerator rendering
2018-07-20GRAPHICS: MACGUI: moved engine ptr, pause callback to private sectionAndrei Prykhodko
2018-07-20GRAPHICS: MACGUI: added initialization of engine ptrAndrei Prykhodko
2018-07-18GRAPHICS: MACGUI: added WMModalMenuModeAndrei Prykhodko
2018-07-12GRAPHICS: MACGUI: Do not use hardcoded colorsEugene Sandulenko
2018-07-11GRAPHICS: MACGUI: Added isMenuActive() helper methodEugene Sandulenko
2018-07-11GRAPHICS: MACMENU: Calculate menu bounds after adding static itemsEugene Sandulenko
2018-07-11GRAPHICS: MACGUI: Made autohiding menu reentrableEugene Sandulenko
2018-07-11GRAPHICS: MACGUI: Implemented autohide menusEugene Sandulenko
2018-07-11GRAPHICS: MACGUI: Added possibility to specify WM behaviourEugene Sandulenko
2018-07-08GRAPHICS: fixed creating cursor group from some old executablesAndrei Prykhodko
2018-07-03GFX: Use degree conversion common math funcsDavid Fioramonti
2018-06-03GRAPHICS: Remove BOM at start of larryscale filesThierry Crozat
Note that larryScale_generated.cpp still contains UTF-8 characters, but they are all in comments, so hopefully they will not cause problems.
2018-06-03Merge pull request #1141 from DanielSWolf/larryscaleThierry Crozat
SCI: High-quality "LarryScale" cel scaler for LSL7
2018-04-22JANITORIAL: Fix formattingAdrian Frühwirth
2018-04-19JANITORIAL: Fix whitespaceAdrian Frühwirth
2018-04-15JANITORIAL: Fix whitespaceAdrian 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.
2018-03-23JANITORIAL: Fix formattingAdrian Frühwirth
2018-03-17GRAPHICS: Dont clip in the non-clip version of drawRoundedSquareAlgBastien Bouclet
Fixes missing modern theme GUI dialog borders when using the non-antialiased renderer.
2018-03-16GRAPHICS: Implement LarryScale cel scaling algorithmDaniel Wolf
2018-03-12GUI: Remove the ThemeItem draw queuesBastien Bouclet
Drawing nows happens directly when the Dialog or Widget draw methods are called. This makes it easy to debug why a particular low level draw method was called, by inspecting the call stack. This replaces the notion of "buffering" by two independant ways to control what is drawn and where: - The active layer is used to select whether the foreground or background part of the dialogs are rendered by the draw calls. - The active surface is used to select if the draw calls affect the back buffer or the screen. The foreground layer of the active dialog is drawn directly to the screen. Its background layer is drawn to the back buffer. This way widgets can restore the back buffer in order to update without having to redraw the dialog's background. Dialogs lower in the dialog stack are drawn entirely to the back buffer.
2018-01-27GRAPHICS: Fix drawing clipped key colored bitmapsBastien Bouclet
The previous implementation was not clipping the bottom part of the bitmap.
2017-12-30GRAPHICS: Fix incorrect call to blendFill in drawRoundedSquareShadowClipBastien Bouclet
Was broken in commit 622adff628519c16991b4edacb7283660d1630e1.
2017-12-30GRAPHICS: Speed up drawing of rounded square soft shadowsBastien Bouclet
When drawing a rounded rectangle, first its shadow is drawn, and then the rectangle proper is drawn over it. This optimization skips drawing a shadow rectangle that is entirely occluded by the main rectangle. A quick benchmark shows large improvements to the modern theme GUI draw speed. On a 1 GHz ARMv7 CPU with optimizations enabled, drawing the add game dialog @ 1920x1080 went from 976 ms to 136 ms.
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.
2017-12-03GRAPHICS: Fix ManagedSurface clear calls when no surface is setPaul Gilbert
2017-11-18COMMON: Add limited support for custom deleters to ScopedPtrColin Snover
Custom deleters of ScopedPtr are not currently fully conforming to C++11's support for custom deleters in std::unique_ptr for the sake of simplicity of implementation. Unlike in the standard library, plain functions and lvalue references are not supported, nor may custom deleters be passed to the constructor at runtime. This can be improved in the future, if necessary, by doing what standard library implementations usually do and creating a Pair class that uses the Empty Base Optimization idiom to avoid extra storage overhead of the deleter instance when it is not needed, as in typical standard library implementations, plus some additional type traits to support the necessary metaprogramming for the different type overloads.
2017-11-14GRAPHICS: Fix potentially uninitialized pointers in BDF loaderWillem Jan Palenstijn
2017-11-14GRAPHICS: Fix freeing invalid pointers in the BDF font destructorBastien Bouclet
Fixes a crash on exit when using a non default GUI font. Possibly fixes #10318.
2017-11-12GRAPHICS: Fix buffer overflow in drawBevelSquareAlgClipBastien Bouclet
Port of the fix from 0d8afad55.
2017-11-11GRAPHICS: Fix buffer overflow in drawBevelSquareAlgColin Snover
Thanks to garethbp for discovering the issue and providing a fix. Fixes Trac#6468.
2017-11-10ALL: Fix misuse of comma operatorColin Snover
2017-10-15GRAPHICS: Send blank cursors to graphics backendsColin Snover
Blank cursors don't mean to continue drawing the previous cursor, they mean that the cursor in the backend needs to be blank.
2017-10-15BACKENDS: Refactor OpenGL & SDL graphics backendsColin Snover
This patch refactors the OpenGL and SDL graphics backends, primarily to unify window scaling and mouse handling, and to fix coordinate mapping between the ScummVM window and the virtual game screen when they have different aspect ratios. Unified code for these two backends has been moved to a new header-only WindowedGraphicsManager class, so named because it contains code for managing graphics managers that interact with a windowing system and render virtual screens within a larger physical content window. The biggest behavioral change here is with the coordinate system mapping: Previously, mouse offsets were converted by mapping the whole space within the window as input to the virtual game screen without maintaining aspect ratio. This was done to prevent 'stickiness' when the mouse cursor was within the window but outside of the virtual game screen, but it caused noticeable distortion of mouse movement speed on the axis with blank space. Instead of introducing mouse speed distortion to prevent stickiness, this patch changes coordinate transformation to show the system cursor when the mouse moves outside of the virtual game screen when mouse grab is off, or by holding the mouse inside the virtual game screen (instead of the entire window) when mouse grab is on. This patch also improves some other properties of the GraphicsManager/PaletteManager interfaces: * Nullipotent operations (getWidth, getHeight, etc.) of the PaletteManager/GraphicsManager interfaces are now const * Methods marked `virtual` but not inherited by any subclass have been de-virtualized * Extra unnecessary calculations of hardware height in SurfaceSdlGraphicsManager have been removed * Methods have been renamed where appropriate for clarity (setWindowSize -> handleResize, etc.) * C++11 support improved with `override` specifier added on overridden virtual methods in subclasses (primarily to avoid myself accidentally creating new methods in the subclasses by changing types/names during refactoring) Additional refactoring can and should be done at some point to continue to deduplicate code between the OpenGL and SDL backends. Since the primary goal here was to improve the coordinate mapping, full refactoring of these backends was not completed here.
2017-10-07BACKENDS: Fix window sizing of games that switch between multiple resolutionsColin Snover
2017-09-11GRAPHICS: Compare all fields in a PixelFormat individually instead of using ↵Cameron Cawley
memcmp.
2017-09-10GRAPHICS: Remove dead code in BDF loadCharacter codeColin Snover
2017-08-28GRAPHICS: MACGUI: Do not crash when nothing was drawn yetEugene Sandulenko
2017-08-26GRAPHICS: MACGUI: Clear whole surface when resizingEugene Sandulenko
This removes black artifacts when previous text was narrower
2017-08-22GRAPHICS: MACGUI: Now MacWindowManager processes most of the events, remove ↵Eugene Sandulenko
filter
2017-08-22GRAPHICS: MACGUI: Added support for scrolling with mouse wheelEugene Sandulenko
2017-08-22GRAPHICS: MACGUI: Ignore keys with modifiers in MacTextWindowEugene Sandulenko
2017-08-22GRAPHICS: MACGUI: Improved debug output in MacFontManagerEugene Sandulenko
2017-08-21GRAPHICS: MACGUI: Pass command id when creating menu to avoid namespace clashesEugene Sandulenko
This fixes Command menu in WAGE.
2017-08-21JANITORIAL: Fix spelling error in commentEugene Sandulenko