Commit Graph

62 Commits

Author SHA1 Message Date
Johannes Schickel
63304ee9ec SDL: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Johannes Schickel
cfa6b1b4ae SDL: Further small cleanup related to manager switching. 2013-10-24 00:09:17 +02:00
Johannes Schickel
6e46e9dfaf SDL: Clean up graphics manager switching slighty.
Sadly this also requires us to extend GraphicsManager for this SDL specific
feature. However, since that's only used in the SDL backend and Tizen it
should be fine for now...
2013-10-23 22:58:34 +02:00
Johannes Schickel
04ab0e58b4 SDL: Take advantage of SdlGraphicsManager.
This gets rid of the hacks, where SdlEventSource added events with custom type
numbers to pass SDL_VIDEOEXPOSE and SDL_VIDEORESIZE to the graphics manager.

Furthermore it get rids of the uninituitive and hard to trace way of assigning
the proper mouse coordinates to mouse related events. Formerly it passed the
real screen coordinates through the even dispatching api to the graphics
manager (at least hopefully ;-) and let that handle creating a new event with
the proper coordinates. Now instead SdlEventSource handles the proper
coordinate setup itself.

Since this is a behavior change and I can not test all the SDL based small
devices ports this commit might break compilation for them and more serve it
might also break mouse position behavior. If any of that occurs I am sorry
about it.
2011-08-09 00:03:11 +02:00
Johannes Schickel
dedc74abfa SDL: Add a new base class for graphics managers utilizing SDL. 2011-08-09 00:03:10 +02:00
Johannes Schickel
1c21232416 SDL: Rename SdlGraphicsManager to SurfaceSdlGraphicsManager to reflect its purpose.
Hopefully I catched all uses of the old name in our ports...
2011-06-19 20:10:21 +02:00
Johannes Schickel
34f8b489d2 SDL: Formatting fixes. 2011-06-19 18:49:02 +02:00
Thierry Crozat
014145f240 I18N: Make some OSD messages translatable 2011-06-06 23:20:11 +01:00
Thierry Crozat
a605c7fd69 OSYSTEM: displayMessageOnOSD() now accepts non-ASCII strings
It should now accept strings encoded using the current
TranslationManaged charset (e.g. translated text).
2011-06-06 23:20:10 +01:00
Thierry Crozat
592cca5402 GRAPHICS: Get rid of kSODFont (ScummFont)
OSD is now using the kGUIFont instead. The main advantage is that
the kGUIFont can be used for translated text while only ASCII
characters were present in ScummFont.
2011-06-06 23:20:08 +01:00
Max Horn
ce32745d9c BACKENDS: Replace OSystem::disableCursorPalette by setFeatureState calls 2011-06-04 11:55:56 +02:00
Max Horn
91b889e2d3 COMMON: Rename kFeatureCursorHasPalette -> kFeatureCursorPalette 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
Max Horn
59e77ed667 ALL: Mark printf and various other symbols as forbidden
Right now, a few places in the frontend code still use printf and
consorts. We mark the affected files with a FIXME for now, and
add a dedicated exception for each. To be fixed!

Also tweak FORBIDDEN_SYMBOL_REPLACEMENT to hopefully really always
enforce a compiler error
2011-05-02 16:31:31 +02:00
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Johannes Schickel
da734a4af0 ALL/GRAPHICS: Remove Surface::bytesPerPixel. 2011-04-17 21:27:34 +02:00
Johannes Schickel
0b14f6aa17 SDL: Properly setup internal Surface formats. 2011-04-17 20:56:16 +02:00
dhewg
d83a83ef50 JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
2011-03-29 21:57:56 +02:00
Johannes Schickel
cb6f02f7ef Merge branch 'sdl-focus-rect' of https://github.com/lordhoto/scummvm
Conflicts:
	backends/graphics/sdl/sdl-graphics.cpp
2011-03-17 16:48:55 +01:00
Max Horn
aa452d3aeb WINCE: Make scummvm compile and run again for WinCE platform (patch #3202337) 2011-03-08 12:53:41 +01:00
Johannes Schickel
e04d983f68 SDL: Use the SDL_Surface's pitch in copyRectToScreen.
This fixes messed up graphics, when SDL decides to add padding bytes to the
lines of an SDL_Surface. Formerly the code always calculated the pitch via
w*bpp, which of course does not work in all cases.
2011-02-24 04:24:58 +01:00
Johannes Schickel
7f139f8dcf SDL: Output a warning in case the focus rect does not fit inside the screen.
Sadly it seems the engines do not care whether their focus rect really fits
inside the game screen. To ease finding such instances (which might cause odd
clipping by the backend) I added a warning for them.
2011-02-24 01:19:10 +01:00
Johannes Schickel
87f260a66c SDL: Add config file variable to enable the focus rect debug code.
The variable is named "use_sdl_debug_focusrect" for now. The debug code is
still only enabled, when a ScummVM debug version is built though.
2011-02-24 01:15:27 +01:00
Johannes Schickel
466030443a SDL: Add a debug focus rect implementation.
This implementation currently draws a rect frame around the focus rect area.
2011-02-24 01:11:16 +01:00
Johannes Schickel
e2aafb603e SDL: Move focus rectangle dummy implementations to .cpp file. 2011-02-24 00:09:25 +01:00
Johannes Schickel
813f503884 SDL: Adapt SDL graphics module to the setPalette/grabPalette RGBA->RGB change. 2011-02-14 17:08:31 +01:00
Johannes Schickel
f199761756 SDL: Slight formatting fix.
svn-id: r54583
2010-11-29 18:33:46 +00:00
David Turner
0e90a2a808 BACKENDS: Close Memory Leak of Mouse Surfaces in SDL Graphics Backend
svn-id: r54579
2010-11-29 18:16:11 +00:00
Max Horn
df05ed1a46 BACKENDS: Include scummsys.h at top of all .cpp files, *before* any #ifdefs
svn-id: r54573
2010-11-29 16:18:43 +00:00
Max Horn
4e0e406181 SDL: Move #include <SDL.h> into a special wrapper file
svn-id: r54572
2010-11-29 16:16:50 +00:00
Willem Jan Palenstijn
66cb595f22 SDL: re-enable unicode after graphics init
svn-id: r54531
2010-11-28 17:12:43 +00:00
Max Horn
7760077cf5 Merging the gsoc2010-opengl branch
svn-id: r54518
2010-11-28 14:56:31 +00:00
Fabio Battaglia
74a53df11b DINGUX: fix compilation for the opengl branch
Moved events related code to backends/events/dinguxsdl/*
and move graphics related code to backends/graphics/dinguxsdl/*
Subclass OSystem_POSIX instead of OSystem_SDL

svn-id: r53730
2010-10-23 09:30:26 +00:00
Johannes Schickel
34302765ca OPENGL: Get rid of one ugly cast.
svn-id: r53435
2010-10-13 15:42:53 +00:00
Johannes Schickel
a2b96a2516 OPENGL: Replace SdlEventManager by SdlEventSource.
Formerly SdlEventManager was a subclass of DefaultEventManager but did not
really have anything in common with the idea of our EventManager interface.
Now I made a new object SdlEventSource which only subclasses EventSource
and which is responsible for obtaining events from SDL (and processing them).

svn-id: r53433
2010-10-13 15:42:16 +00:00
Johannes Schickel
75e8452b6e OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.

Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.

svn-id: r53399
2010-10-13 03:57:44 +00:00
Alejandro Marzini
9136724110 SDL/OPENGL: Fix backend initialization when building with ENABLE_VKEYBD.
svn-id: r52503
2010-09-03 04:23:01 +00:00
Alejandro Marzini
58d256c15e SDL: Make use of SDL_BACKEND instead of platform specific defines.
svn-id: r52029
2010-08-12 06:30:26 +00:00
Alejandro Marzini
f97809a9a6 OPENGL: Improve aspect ratio correction mode selection.
svn-id: r51752
2010-08-05 06:20:44 +00:00
Lars Persson
2e55bcf383 SYMBIAN platform. Correct building of SDL refacturing for Symbian.
svn-id: r51587
2010-08-01 19:40:46 +00:00
Alejandro Marzini
fb4086cadb Merged from trunk, from Rev 50841 to HEAD
svn-id: r51495
2010-07-30 05:28:09 +00:00
Alejandro Marzini
7b070bbef8 SDL/OPENGL: Add ability to switch between SDL and OpenGL graphics managers.
OSystem_SDL will create a merged list of all graphics modes from SDL and OpenGL. When the user changes the graphics mode in options and restarts ScummVM should switch to that graphics mode in the corresponding graphics manager.

svn-id: r51493
2010-07-30 03:31:05 +00:00
Alejandro Marzini
9daa1c7f93 OSYSTEM: Add resetGraphicsScale() method.
This fixes a hack for resetting the graphics scale to x1 when starting games that have a large screen size. The SDL graphics manager should now scale back to x1 without changing the current scaler in use, as well as the OpenGL graphics manager.

svn-id: r51492
2010-07-30 03:06:57 +00:00
Alejandro Marzini
2636ac4f36 OPENGL: Implement aspect ratio support and toggling. Improve fullscreen switching. Fix cursor scaling bug.
Now the hotkey Ctrl-Alt-Enter will switch between all available fullscreen modes. Alt-Enter will only switch to the best mode available, and exit fullscreen mode if already on it.
The different aspect ratios can be switched with Ctrl-Alt-A. The normal mode will stretch the contents to the screen, while other modes will stretch only one dimension to the screen size, and maintain the aspect ratio for the other dimension.

svn-id: r51346
2010-07-27 07:30:56 +00:00
Alejandro Marzini
141e101841 Formatted spaces.
svn-id: r51300
2010-07-26 06:58:33 +00:00
Alejandro Marzini
38b4098f67 SDL: Hack to handle special SDL events.
svn-id: r51015
2010-07-19 05:33:58 +00:00
Alejandro Marzini
0e748c5a97 Added basic cursor drawing.
svn-id: r50954
2010-07-16 23:50:46 +00:00
Alejandro Marzini
9ef2fc4744 Fixed doing OpenGL calls before a graphical context was created.
svn-id: r50905
2010-07-15 04:01:41 +00:00
Matthew Hoops
69bf70d693 Silence gcc warnings.
svn-id: r50902
2010-07-15 01:48:28 +00:00