106 Commits

Author SHA1 Message Date
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
Alyssa Milburn
29e05ec05e OPENGL: Don't leak surfaces. 2012-03-28 19:18:25 +02:00
Willem Jan Palenstijn
297d15e122 OPENGL: Don't force alpha to 1
This was likely a hack to work around an alpha blending bug in the
gui vector renderer.
2012-02-20 22:17:33 +01:00
Johannes Schickel
37e5b209a7 OPENGL: More formatting fixes. 2012-02-15 02:23:54 +01:00
Johannes Schickel
5b3ebdf43d OPENGL: Prevent access to a few more members in the SDL OpenGL code. 2012-02-15 02:23:37 +01:00
Johannes Schickel
56971f11d1 OPENGL: Remove redundant check in adjustMousePosition. 2012-02-15 02:22:30 +01:00
Johannes Schickel
90178d9b87 OPENGL: Fix mouse cursor scaling. 2012-01-03 04:19:08 +01:00
Johannes Schickel
949b30dc36 OPENGL: Always set the unpack alignment when refreshing the textures.
This should hopefully make sure we are always having the correct alignment set
up. This might fix bug #3435655 "OpenGL display corruption with various Sierra
games Daily B.".
2011-11-09 18:57:13 +01:00
Chris Warren-Smith
812e4498ec BADA: Fix formatting and non bada host compile error 2011-08-21 16:38:53 +10:00
Chris Warren-Smith
59739a7a0e BADA: Initial BADA port implementation 2011-08-21 16:37:06 +10:00
Johannes Schickel
b8dcd9a25e OPENGL: Fix aspect ratio correction behavior.
Now only 320x200 and 640x400 will result in aspect ratio correction to be used
if the user requested it. This should fix some strechting in Myst/Riven.
2011-08-12 04:06:54 +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
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
Johannes Schickel
e0eb86826e OPENGL: Clarify OSD rect color in a comment. 2011-06-19 19:03:10 +02:00
Johannes Schickel
f28e134247 OPENGL: Formatting fixes. 2011-06-19 18:48:30 +02: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
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
911b7b311f OPENGL: Do not access Surface::bytesPerPixel anymore. 2011-04-17 20:56:16 +02:00
Johannes Schickel
7ac3ae108a BACKEND: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. 2011-04-17 16:24:37 +02:00
Johannes Schickel
c064fa5c5b OPENGL: Fix mouse cursor position in Normal mode when AR is enabled. 2011-03-21 00:43:16 +01:00
Johannes Schickel
33cf1f8f59 OPENGL: Get rid of unused switchDisplayMode. 2011-03-20 17:30:23 +01:00
Johannes Schickel
6502e191b9 OPENGL: Handle aspect ratio correction as flag instead of having a special mode for it.
This partly fixes the OpenGL mode mess, but now OpenGL Normal and OpenGL
Conserve will feature the same semantics when aspect ratio correction is
enabled... That is still something to solve.
2011-03-20 17:29:08 +01:00
Johannes Schickel
8ab136dafb OPENGL: Fix screenshots when the display width is not divisible by 4. 2011-03-17 21:20:20 +01:00
Johannes Schickel
83c638ad02 OPENGL: Setup the correct header size for BMP screenshots.
This fixes an color bug in the resulting screenshots.
2011-03-17 21:20:20 +01:00
Johannes Schickel
8d35d91bdf OPENGL: Cleanup switchDisplayMode. 2011-03-17 21:20:20 +01:00
Johannes Schickel
83b199e921 OPENGL: Move setFullscreenMode to OpenGLGraphicsManager. 2011-03-17 21:20:20 +01:00
Johannes Schickel
daf6050d7c OPENGL: Make setScale non-virtual. 2011-03-17 21:20:20 +01:00
Johannes Schickel
758aa78acc OPENGL: Get rid of _aspectRatioCorrection. 2011-03-17 19:55:06 +01:00
Johannes Schickel
96979f73fc OPENGL: Slight refactoring.
First step into making all state variables of the OpenGL backend private, to
help making the backend more maintainable, by disallowing subclasses to just
mess with everything...
2011-03-17 19:55:06 +01:00
Johannes Schickel
42d3b8fcbd OPENGL: Fix compilation when USE_OSD is not defined. 2011-03-17 18:35:32 +01:00
Johannes Schickel
372af10a7b OPENGL: Update the OSD texture when visible while the output mode changes.
This fixes annoying graphics glitches, which occured sometimes when resizing
the Window.
2011-03-17 18:35:32 +01:00
Johannes Schickel
019aa63b15 OPENGL: Fix "Original" mode by setting up the corret screen dimensions. 2011-03-17 18:35:18 +01:00
Johannes Schickel
e08683d939 OPENGL: Refactor warpMouse.
Now subclasses will not need to worry about the scaling logic themselves, but
just need to implement setInternalMousePosition, which should handles setting
the system's mouse coordinates.
2011-03-17 17:37:42 +01:00
dhewg
0b24fc3acc OPENGL: Fix compilation for --disable-16bit 2011-03-06 16:59:20 +01:00
Johannes Schickel
5ffecd85b3 OPENGL: Limit maximum cursor scale.
This avoids too big cursors when the screen resolution is really high.
2011-03-01 05:45:56 +01:00
Johannes Schickel
4841079075 OPENGL(SDL): Use the whole window/screen size for the overlay.
This makes the overlay looking nicer in fullscreen mode.
2011-03-01 05:32:14 +01:00
dhewg
f26707e353 OPENGL: Fix 16bit cursors 2011-02-26 08:56:49 +01:00
dhewg
a441069a49 OPENGL: Reset the scale on mode changes
Resets defaultTo1XScaler when going back to the launcher
2011-02-25 20:49:48 +01:00
Johannes Schickel
63cc9de1df OPENGL: Cleanup cursor refresh code a bit. 2011-02-25 04:04:56 +01:00
Johannes Schickel
f1b16fe084 OPENGL: Implement support for non CLUT8 cursor.
Currently all the cursor data is converted to RGBA8888 to allow for
easy colorkeying.
2011-02-25 04:01:37 +01:00
Johannes Schickel
972cdaea35 OPENGL: Add support for RGB555 output format. 2011-02-25 03:35:55 +01:00
Johannes Schickel
020a413247 OPENGL: Set _gameTexture to 0 after deleting it.
This fixes a segfault when trying to use the OpenGL backend with 16bpp games,
however this does not make Last Express nor Loom PC-Engine Japanese work for
me. They now fail with a "Pixel format not supported" error.
2011-02-24 18:36:57 +01:00