Commit graph

63 commits

Author SHA1 Message Date
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
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
Cameron Cawley
70aebaca5b WII: Add override and final keywords 2020-10-16 17:46:43 +01:00
Cameron Cawley
5a47b09455 BACKENDS: Move default implementations of getScreenPixelBuffer into BaseBackend 2020-10-10 18:00:17 +02:00
Eugene Sandulenko
6b15c6102b WII: Fix compilation 2020-10-10 00:16:40 +02:00
Alexander Reim
c0062fe761 WII: Fix compilation with flag: disable-16bit 2020-10-02 15:00:57 +02:00
Alexander Reim
c4262682dc WII: Fix transparency of RGB cursors 2020-09-24 11:26:21 +02:00
Cameron Cawley
0a29fced6e WII: Replace use of Graphics::ColorMasks 2020-07-25 13:32:45 +02:00
Cameron Cawley
00e3c03755 ALL: Remove unnecessary graphics/colormasks.h includes 2020-06-15 16:59:34 +01:00
sluicebox
ec840a73c7 WII: 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
Colin Snover
bda253b1ac BACKENDS: Constify PaletteManager::grabPalette implementations 2017-10-15 13:47:19 -05:00
Alexander Reim
6dd28d7cc1 WII: Fix compiler warnings
WII: Fix compiler warnings

Compiler: DevKitPPC R28
2017-02-14 11:38:39 +01:00
Johannes Schickel
4ca33e2648 WII: Fix color key handling for 16bit mouse cursors.
This should fix bug #6108 "WII: Zak FM-TOWNS mouse cursor encased in blue box".
2014-03-26 00:39:27 +01:00
Johannes Schickel
3b73ceb17e WII: Make GPL headers consistent in themselves. 2014-02-18 02:39:40 +01:00
Johannes Schickel
0f050fe797 WII: Do not access Surface::pixels directly. 2013-08-06 03:29:16 +02:00
D G Turner
8a8ab23c03 WII: Remove remaining signed-unsigned compiler warning. 2012-11-23 18:46:47 +00:00
dhewg
5636c1fee0 WII: Adapt to mouse cursor dontScale API change 2012-07-21 16:22:05 +02:00
Johannes Schickel
4b32d5de0e WII: Fix check for whole width updates in copyRectToOverlay. 2012-06-20 17:18:19 +02:00
Johannes Schickel
6792f4450b WII: Replace OverlayColor with uint16. 2012-06-20 17:14:51 +02:00
Johannes Schickel
aec9b9e22a ALL: Let overlay related methods in OSystem take a void * and use a proper pitch values.
This is a first step to get rid of OverlayColor, which is a requirement for
proper 4Bpp overlay support.
2012-06-16 04:17:14 +02:00
Johannes Schickel
d27d951d0b BACKENDS: Make OSystem::setMouseCursor take a "const void *" buffer.
This is mainly for consistency with OSystem::copyRectToScreen.
2012-06-16 03:28:42 +02:00
Johannes Schickel
31880186e1 BACKENDS: Let copyRectToScreen take a "const void *" instead of "const byte *" as buffer.
This removes the need to convert the parameter to copyRectToScreen to
"const byte *", which is commonly used in games, which use Graphics::Surface
to store their graphics data.
2012-06-16 02:18:01 +02:00
Johannes Schickel
a401f0a19e ALL: Replace cursorTargetScale in OSystem API with a simple "do not scale" logic.
All uses of the old target scale API actually wanted to disallow scaling of
the mouse cursor. This commit adapts our API to this and thus simplifies
backend implementations.

Some backends, most notable the Wii and Android, did some implementation of
the cursor target scale, which I didn't adapt yet. I added a TODO for the
porters there.
2012-06-03 02:02:57 +02:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Littleboy
b3d8e426c2 WII: Allow use of abort in OSystem_Wii class 2011-06-23 11:32:39 -04:00
Max Horn
ce32745d9c BACKENDS: Replace OSystem::disableCursorPalette by setFeatureState calls 2011-06-04 11:55:56 +02:00
Max Horn
81ff18b0b7 WII: Fix various forbidden symbol clashes 2011-05-03 12:52:28 +02:00
Johannes Schickel
da734a4af0 ALL/GRAPHICS: Remove Surface::bytesPerPixel. 2011-04-17 21:27:34 +02:00
Johannes Schickel
877004dbdd BACKENDS: Adapt various backends code to set up Surface::format correctly.
Note that this change is not tested at all (not even compile wise!).
2011-04-17 21:14:19 +02:00
Johannes Schickel
123f81f837 WII: Fix OSystem_Wii::setPalette after the ScummVM upstream merge in a024546.
I accidently removed two lines when doing the merge since I read the log
incorrectly. Thanks to dhewg for reporting this.
2011-02-16 00:52:52 +01:00
Johannes Schickel
a02454644a Merge branch 'master' into osystem-palette
Conflicts:
	backends/platform/wii/osystem_gfx.cpp
2011-02-15 23:42:50 +01:00
dhewg
50129178ef WII: Fix 16bit cursors on some HE games 2011-02-14 22:12:30 +01:00
dhewg
f850ad2ced WII: Adapt to [set|grab]Palette RGBA->RGB change. 2011-02-14 17:08:33 +01:00
Andre Heider
2f3edeedc9 WII: Abuse pollEvent() to update the screen of skipped frames.
updateScreen() itself skips redraws when called too frequently. With
the right timing and number of consecutive calls this can result in
missing gfx updates, so lets abuse pollEvent() to check for overdue
redraws.

svn-id: r52456
2010-08-30 16:52:23 +00:00
Andre Heider
c58e2707ff WII: Update port for the current versions of the base libraries. Enable DVD access for the GameCube port.
svn-id: r52074
2010-08-14 00:56:12 +00:00
Max Horn
703f0ca29c SYSTEM: Unify OSystem::getSupportedFormats() signature
svn-id: r49838
2010-06-15 12:21:08 +00:00
Andre Heider
d1bb33fbac Round up the game texture dimensions if the requested size is incompatible to the hardware.
svn-id: r48751
2010-04-20 18:24:14 +00:00
Andre Heider
e6b835bce4 Fix lockScreen() for 16bit modes.
svn-id: r48728
2010-04-19 20:26:06 +00:00
Johannes Schickel
aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Torbjörn Andersson
4818467908 Silenced some more cppcheck warnings. Some of these may seem silly, but the way
I figure it the changes are harmless at worst, and making them will make it
easier to find real errors in the (still quite long) list of warnings.

svn-id: r47443
2010-01-22 19:05:02 +00:00
Max Horn
8ba75fc522 Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
svn-id: r44495
2009-09-30 16:16:53 +00:00
Andre Heider
d020800e57 reinit the console when changing the video mode.
svn-id: r44232
2009-09-21 20:45:21 +00:00
Andre Heider
3e24220a19 Moved the Wii gfx code to its own library. Added a onscreen console for stdout/err, toggable via pad keys.
svn-id: r44189
2009-09-18 18:56:16 +00:00
Andre Heider
0b002beccd Support for SMB shares, cleaned up async FS functions.
svn-id: r43965
2009-09-05 17:53:55 +00:00
Andre Heider
9aa7546a34 Removed AA modes in favor of bilinear texture filtering, which gives much better results. Renamed a few types and enums to make it clear what they're for.
svn-id: r43919
2009-09-03 17:52:38 +00:00
Andre Heider
57e28df8cd Fixed thumbnail gfx glitches on savegames
svn-id: r43910
2009-09-02 16:08:01 +00:00
Andre Heider
cf112f9a43 Added an options dialog for some Wii specific settings.
svn-id: r43892
2009-09-01 19:33:47 +00:00
Andre Heider
7d71fbeea2 Complete GFX rewrite with new features:
- Standard and Dual-strike (240p) video modes, both with or without AA
- Distinct textures for the overlay, game buffer and the cursor
- Support for HW paletted textures
- Less pixel buffer conversions
- Cursor scaling
- Support for kFeatureAspectRatioCorrection and kFeatureOverlaySupportsAlpha

svn-id: r43830
2009-08-30 17:01:03 +00:00