Commit graph

53 commits

Author SHA1 Message Date
Matthew Jimenez
5219c99400 GRAPHICS: Move PaletteManager definition to a separate header 2024-03-12 12:24:00 +02:00
elasota
3db67a33ac GRAPHICS: Add support for pixels with masks and inverted pixels 2023-02-19 23:51:09 +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
Cameron Cawley
5022489277 BACKENDS: Refactor the API for creating Mutexes 2021-11-12 20:19:45 +01:00
Thierry Crozat
c8d8b230be N64: Fix setting graphics modes 2021-10-02 23:57:29 +01:00
Martin Gerhardy
a0c237f7b9 EVENTRECORDER: added new event for OSystem::getTimeAndDate 2021-07-09 19:23:21 +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
5a47b09455 BACKENDS: Move default implementations of getScreenPixelBuffer into BaseBackend 2020-10-10 18:00:17 +02:00
Eugene Sandulenko
385d8ad997 N64: Fix compilation 2020-10-10 00:18:06 +02:00
Cameron Cawley
31be074893 BACKENDS: Add a function to return if the overlay is visible 2020-09-15 00:09:11 +02:00
Cameron Cawley
453cc63c02 BACKENDS: Remove unneeded use of Graphics::createPixelFormat 2020-07-25 13:32:45 +02:00
sluicebox
b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
Cameron Cawley
6293299f40 BACKENDS: Remove unnecessary implementations of setGraphicsMode(const char *) 2019-11-18 08:09:15 +02:00
Colin Snover
bda253b1ac BACKENDS: Constify PaletteManager::grabPalette implementations 2017-10-15 13:47:19 -05:00
Johannes Schickel
0960c54618 N64: Make GPL headers consistent in themselves. 2014-02-18 02:39:36 +01:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00
D G Turner
d8a17a9d91 N64: Fix compiler warnings associated with cursor size variables. 2012-11-18 22:34:15 +00:00
Johannes Schickel
703be9f87c N64: Replace OverlayColor with uint16. 2012-06-20 17:21:05 +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
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Max Horn
263e23bd81 N64: Add logMessage() implementation 2011-06-17 20:50:37 +02:00
Max Horn
fce7f90a94 BACKENDS: Shuffle backends class hierarchy and module initialization 2011-06-08 14:29:22 +02:00
Max Horn
c701bdb708 N64: Use OSystem's _fsFactory slot 2011-06-07 14:57:59 +02:00
Max Horn
9e1ed9ee6a N64: Use OSystem's 'slots' for timer/savefile manager 2011-06-07 14:57:57 +02:00
Max Horn
ce32745d9c BACKENDS: Replace OSystem::disableCursorPalette by setFeatureState calls 2011-06-04 11:55:56 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Fabio Battaglia
f16311291d N64: avoid bogus events if no controller plugged
If the user has only a N64 mouse plugged in and no controllers
this avoids fake clicks.
2011-05-04 16:48:52 +02:00
Ori Avtalion
4d485fc741 BACKENDS: Fix compilation for various backends
Affects:
* PS2
* GPH
* ELF
* MOTO
* IPHONE
* N64
* DINGUX
* WINCE
* PSP
2011-04-28 23:24:06 +03:00
Johannes Schickel
e21d6e0d11 Merge branch 'osystem-palette' of https://github.com/lordhoto/scummvm into master
Conflicts:
	backends/platform/android/android.cpp
	engines/sci/graphics/screen.cpp
	engines/sci/graphics/transitions.cpp
2011-02-19 21:46:45 +01:00
Fabio Battaglia
68e468ee01 N64: revert fix in svn r55745 and added a FIXME
The sign comparison fix requires a little more work than int->uint change, else it
throws an exception on the N64
2011-02-16 09:51:32 +01:00
Johannes Schickel
a52b16ceb3 N64: Adapt to setPalette/grabPalette RGBA->RGB change.
This change is not tested, but should hopefully work fine.
2011-02-16 00:02:48 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
David Turner
149082c9e9 N64: Fix Signed to Unsigned Comparison GCC Warning.
svn-id: r55745
2011-02-02 23:22:45 +00:00
Fabio Battaglia
5f6dfb2b67 N64: save and return exact palette for grabPalette
Save the exact palette and return it when grabPalette is called,
The less precise 16bit conversion is still used inside though.

svn-id: r54981
2010-12-20 21:46:28 +00:00
Fabio Battaglia
9349bec6db N64: add some comments to code
svn-id: r52277
2010-08-22 14:23:37 +00:00
Fabio Battaglia
43349a4cbf N64: fix some signed/unsigned int comparison warnings
svn-id: r52270
2010-08-22 09:59:46 +00:00
Fabio Battaglia
2ca06e3e0a N64: force screen update after hiding overlay
svn-id: r48108
2010-02-21 19:02:45 +00:00
Fabio Battaglia
c02b14d311 N64: Better analog nub acceleration, and added -mhard-float in CXXFLAGS when building
svn-id: r47708
2010-01-30 12:53:08 +00:00
Arnaud Boutonné
1f79fd5788 Some more header modifications ("Graphic Adventure Engine" and the legal property paragraph)
svn-id: r47489
2010-01-23 22:50:24 +00:00
Fabio Battaglia
66f90a40c9 N64: change input related code to better fit mouse support
svn-id: r47420
2010-01-21 18:31:46 +00:00
Fabio Battaglia
bbc2ec0958 N64: Initial support for n64 mouse, tweaking needed
svn-id: r47408
2010-01-20 18:51:22 +00:00
Fabio Battaglia
c4a9d373ca N64: Use first controller found as input, easier to add support for different input peripherals now
svn-id: r47317
2010-01-15 23:35:24 +00:00
Fabio Battaglia
6c6604d589 N64: if user has inserted a rumble-pak, rumble with shaking screen
svn-id: r47289
2010-01-13 13:53:31 +00:00
Fabio Battaglia
f2318e5fe4 N64: Icrease analog sensibility a little
svn-id: r47262
2010-01-12 10:23:16 +00:00