Commit Graph
44 Commits
Author SHA1 Message Date
Cameron Cawley 7f2d9fd0fd GRAPHICS: Split conversion.cpp into multiple files 2022-12-22 23:45:14 +01:00
Le Philousophe 87bad2cc7d COMMON: Allow games to use overlay for something else than GUI
This can be used for subtitles without changing the mouse coordinates.
2022-11-12 19:12:05 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Le Philousophe 68a327ecb1 BACKENDS: Harden grabOverlay in all platforms
Use specific copy code where applicable and replace duplicated code by
calls to copyBlit which optimizes blitting
2021-08-04 13:27:07 +02:00
Thierry Crozat ec06d940a2 BACKENDS: Explicitly use ellipsis for OSD text if needed
This is the default, so this commit does not change the behaviour.
But this will allow to change the default at a later stage.
2021-08-01 17:22:13 +02:00
Michael Ball eab82da166 3DS: Resolve leftover signedness issues
Resolves leftover signedness issues to conform to baccbedf50.
2021-07-09 00:02:36 +01:00
Martin Gerhardy 5af1192580 BACKENDS: fixed segfault in EventRecorder with buffer out of bounds writes
==3124361== Invalid write of size 8
==3124361==    at 0x483F803: memmove (vg_replace_strmem.c:1270)
==3124361==    by 0x4DBF61: SurfaceSdlGraphicsManager::grabOverlay(void*, int) const (surfacesdl-graphics.cpp:1753)
==3124361==    by 0x482051: ModularGraphicsBackend::grabOverlay(void*, int) (modular-backend.cpp:215)
==3124361==    by 0x434EE1: GUI::ThemeEngine::clearAll() (ThemeEngine.cpp:376)
==3124361==    by 0x40128E: GUI::EventRecorder::preDrawOverlayGui() (EventRecorder.cpp:558)
==3124361==    by 0x481DB2: ModularGraphicsBackend::updateScreen() (modular-backend.cpp:173)
==3124361==    by 0x559967: Graphics::Screen::updateScreen() (screen.cpp:62)
==3124361==    by 0x55991C: Graphics::Screen::update() (screen.cpp:56)
==3124361==    by 0x38AFC7: TwinE::TwineScreen::update() (twine.cpp:126)
==3124361==    by 0x3B8759: TwinE::Screens::adjustPalette(unsigned char, unsigned char, unsigned char, unsigned int const*, int) (screens.cpp:150)
==3124361==    by 0x3B8A89: TwinE::Screens::fadeToPal(unsigned int const*) (screens.cpp:207)
==3124361==    by 0x3B8403: TwinE::Screens::loadImage(int, int, bool) (screens.cpp:80)
==3124361==  Address 0x31453050 is 16 bytes after a block of size 512,000 alloc'd
==3124361==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==3124361==    by 0x55B38C: Graphics::Surface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (surface.cpp:75)
==3124361==    by 0x551111: Graphics::ManagedSurface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (managed_surface.cpp:153)
==3124361==    by 0x4352D5: GUI::ThemeEngine::setGraphicsMode(GUI::ThemeEngine::GraphicsMode) (ThemeEngine.cpp:453)
==3124361==    by 0x434A52: GUI::ThemeEngine::init() (ThemeEngine.cpp:324)
==3124361==    by 0x43501B: GUI::ThemeEngine::refresh() (ThemeEngine.cpp:394)
==3124361==    by 0x405780: GUI::GuiManager::screenChange() (gui-manager.cpp:603)
==3124361==    by 0x405C6B: GUI::GuiManager::processEvent(Common::Event const&, GUI::Dialog*) (gui-manager.cpp:677)
==3124361==    by 0x404EBA: GUI::GuiManager::runLoop() (gui-manager.cpp:429)
==3124361==    by 0x3FD847: GUI::Dialog::runModal() (dialog.cpp:77)
==3124361==    by 0x36D747: launcherDialog() (main.cpp:106)
==3124361==    by 0x36FF92: scummvm_main (main.cpp:552)

It looks like the _videoMode.overlayHeight in SurfaceSdlGraphicsManager::grabOverlay and ThemeEngine::_backBuffer::h are somehow out of sync after
starting the game in a different resolution as the gui was started with. So the overlayHeight is updated - but the backbuffer (Surface) is not resized.

This is with event recorder being active - right after starting the game and switching the resolution.
2021-06-19 14:34:52 +02:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Cameron Cawley 1d5f475c30 3DS: Rename the _3DS namespace 2021-02-15 02:58:15 +02:00
Cameron Cawley 5a47b09455 BACKENDS: Move default implementations of getScreenPixelBuffer into BaseBackend 2020-10-10 18:00:17 +02:00
Eugene Sandulenko bc4a1aed62 3DS: Fix compilation 2020-10-10 02:18:17 +02:00
aryanrawlani28 3fc336300f 3DS: Use U32Strings for displaying OSD Messages 2020-08-30 14:43:41 +02:00
Bastien Bouclet 1de6764891 3DS: Use the 800x240px graphics mode for the top screen
The extra horizontal resolution results in much improved visuals
for hi-resolution games.
2020-07-19 17:41:05 +02:00
Bastien Bouclet 0a567b6058 3DS: Implement OSystem::kFeatureFilteringMode 2020-07-19 17:41:05 +02:00
Bastien Bouclet cd173c8739 3DS: Use the shared virtual mouse 2020-03-09 20:00:31 +01:00
Bastien Bouclet e1358b966a 3DS: Defer texture updates when the palette changes
Fixes a performance issue with the Gob engine where the palette is
updated a large number of times during a single frame.
2020-02-14 06:21:46 +01:00
Bastien Bouclet e4d17f881c 3DS: Convert RGB555 pixels to RGBA5551 when copying to the texture
It's faster than using Graphics::Surface::convertTo
2020-02-07 18:33:56 +01:00
Michael Ball b08ab0e130 3DS: Implement dynamic graphics modes to improve performance
When launching a game, switch the graphics mode if necessary
(and by extension the pixel formats used for Graphics::Surfaces
and Sprites) to the one that most closely matches the pixel format
used in-game.

Additional Fixes:
- Fix to prevent cursor position from changing when exiting a menu.
- Fix to prevent updating of Magnification viewport position when
virtual keyboard is open.
- Cosmetic code fixes for improper whitespace and missing curly brackets.
- Remove RGB8 as a mode option because:
  1) It was already commented out in the master 3DS backend.
  2) There are currently no games that explicitly require it.

Notes:
- As these graphics modes are automatically implemented on a per-game basis, they
are meant for backend use only and are purposefully not accessible through the
Options menu.
- RGBA8 (aka RGBA8888) remains the default pixel format, being used for the launcher
menu, CLUT8, and for games which do not specify a particular format.
2020-02-07 18:33:56 +01:00
Cameron Cawley e92ac655be BACKENDS: Add default implementation for GraphicsMode functions 2019-12-15 16:06:56 +02:00
Michael Ball 6f678e6e84 3DS: Prevent magnify effect from updating while the GUI is active 2019-11-30 18:53:23 +01:00
sluicebox ba2923aa0c PSP: Implement horizontal shake 2019-11-19 00:20:40 +01:00
sluicebox b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
Bastien Bouclet 652722e760 3DS: Rework mouse cursor movement
- Fix clipping the cursor position
- Ensure the mouse has the same vertical and horizontal speed
2019-11-07 11:02:00 +01:00
Bastien Bouclet 6901ee0242 3DS: Use the full resolution for the overlay on the top screen 2019-11-07 11:02:00 +01:00
Bastien Bouclet 4810a5d8d3 3DS: Fix centering of the game screen 2019-11-05 06:09:04 +01:00
Bastien Bouclet 3fcbbbef44 3DS: Reworked OSD message display
So the game remains interactive while OSD message are displayed.
2019-11-05 06:09:04 +01:00
Bastien Bouclet 886be5178e 3DS: Some changes to magnify mode 2019-11-05 06:09:04 +01:00
Michael Ball 78de572404 3DS: Implement magnify mode toggle on L and move keyboard to Y/DRIGHT 2019-11-05 05:51:45 +01:00
Bastien Bouclet 036d61cbd6 3DS: Implement cloud sync support 2019-11-03 19:14:15 +01:00
Bastien Bouclet 98f8e05f4e 3DS: Load per-game settings 2019-10-28 20:05:24 +01:00
Bastien Bouclet e9b1df95ff 3DS: Upload the textures to VRAM in a separate frame
So rendering waits for the textures to finish uploading before using
them. Fixes glitchy mouse pointer in Riven.
2019-10-25 19:13:40 +02:00
Bastien Bouclet 755afd82f4 3DS: Fix hi-color cursors 2019-10-24 19:09:49 +02:00
Bastien Bouclet 650da9eb5b 3DS: Don't immediately update the screen when enabling the overlay
Fixes the overlay dirty buffer being visible for a frame when opening
the GUI while in-game.
2019-10-20 17:06:33 +02:00
Bastien Bouclet dfc0a5127e 3DS: Fix OSystem::grabOverlay
Fixes the transparency effects in the GUI.
2019-10-14 21:24:25 +02:00
Nitrus f615b3392b 3DS: Fix assertion issue in case cursor dimensions are zero 2018-11-21 07:54:49 +00:00
Nitrus 92ab8328b1 3DS: Clear render target on each frame
...in order to clear framebuffer artifacts in case the screen is not stretched.
2018-11-21 07:54:49 +00:00
Nitrus 4d84105237 3DS: Fix deprecated C3D methods 2018-11-21 07:54:49 +00:00
Colin Snover bda253b1ac BACKENDS: Constify PaletteManager::grabPalette implementations 2017-10-15 13:47:19 -05:00
Torbjörn Andersson 6cda47ca3d JANITORIAL: Remove superfluous semicolons 2017-04-18 06:49:14 +02:00
Eugene Sandulenko 355c4fa646 JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
Thomas Edvalson 1531b4ddbf 3DS: Add config class/dialog, c-pad cursor control, and option to disable screens 2016-04-22 16:43:59 -04:00
Thomas Edvalson e8dcfc3a4e 3DS: Fix code styling, add license header, remove unused portdefs.h 2016-04-19 03:22:32 -04:00
Thomas Edvalson f5d73cac8a 3DS: Add CIA format build, add timer handler thread, fix APT service suspending/sleeping/exiting 2016-04-11 15:15:42 -04:00
Thomas Edvalson e2b9572a83 3DS: Initial commit 2016-04-06 02:12:02 -04:00