Commit Graph

180 Commits

Author SHA1 Message Date
Thierry Crozat
6e94f26208 OPENPANDORA: Remove unneeded translations.h include. 2011-04-22 20:01:53 +01:00
David-John Willis
6f1c7cf30a GPH: Change backend to mask backend code to GPH_DEVICE.
* This is mainly to make it easy to drop the old GP2X into the
  same codebase (I really have no desire to manage 2 sets of 99.9%
  identical code ;)).
* Code paths for just one of the supported devices can be runtime
  worked out or just defined for that device.

mount.sh: Fixed some small errors#	../../../../scummvm.gph
2011-04-11 18:22:58 +01:00
David-John Willis
bb6bc31813 GP2X: Mask off the graphics and events code behind a GP2X_OLD define.
* This is a temp thing while I finish up merging the GP2X and GPH code.
  I do not want the GP2X backend code dropped yet until this is complete.
2011-04-11 18:15:14 +01: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
David-John Willis
b95013dfe2 OPENPANDORA: Refactor OpenPandora backend and move events and graphics into modular backend style. 2011-03-24 21:24:05 +00:00
David-John Willis
cf8dcf4549 GPH: Cleanup GPH backend and adapt to newer modular backend model. 2011-03-24 21:24:05 +00: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
f490e6f361 OPENGLSDL: More refactoring to avoid direct access of OpenGlGraphicsManager's members. 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
8d87a460b0 OPENGLSDL: Handle active fullscreen mode OPENGLSDL internal. 2011-03-17 21:20:20 +01:00
Johannes Schickel
c9f6136110 OPENGLSDL: Cleanup. 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
3c656916f1 OPENGL: Always properly set the overlay dimensions in loadGFXMode. 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
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
Johannes Schickel
aebd9c6ea0 WINCE: Run astyle over WinCE related event and graphics source files. 2011-03-08 19:49:10 +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
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
4f3a244f16 OPENGLSDL: Add RGB555 to the supported format list. 2011-02-25 03:36:45 +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
Johannes Schickel
d81bb9794f OPENGL: Prefer single operation texture updates.
When doing glTexSubImage2D we do not need to assure that the source data has
the same width as the texture when we want to update the data, we just need
to assure that the width * Bpp cound matches the pitch.
2011-02-24 17:10:49 +01:00
Johannes Schickel
f5e10f33f5 OPENGL: Properly setup pixel data alignment.
If we do not do this, we might end up with a default alignment of 4, which will
fail (as in the graphics will be messed up) in case the screen resolution is
not divisible by 4.

Thanks to digitall for noticing this problem and finding out about
GL_UNPACK_ALIGNMENT.
2011-02-24 05:11:00 +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
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
Johannes Schickel
32d0e4c15f OPENGLSDL: Avoid warping in warpMouse when the logical coordinates did not change.
This fixes a slight move of the mouse cursor when the hardware mouse position
is at a subpixel from the logical coordinates.
2011-02-19 20:46:47 +01:00
Johannes Schickel
9954eb5a99 OPENGL: Get rid of adjustMouseEvent.
Rather than that I introduced a function which converts hardware screen
coordinates to overlay / game screen coordinates.

The logic which converts mouse movement events with hardware screen
coordinates to overlay / game screen coordinates is now inside notifyEvent.

This is still broken design, since one should not abuse an observer for that.
2011-02-19 20:46:47 +01:00
Johannes Schickel
3aba54b8b0 OPENGL: Fix documentation of OpenGLGraphicsManager::MousePos. 2011-02-19 20:46:47 +01:00
Johannes Schickel
4115c97883 BACKENDS: Adapt DefaultPaletteManager to setPalette/grabPalette RGBA->RGB change. 2011-02-16 16:22:52 +01:00
Johannes Schickel
6adfbe5f54 OPENGL: Adapt the OpenGL module to the setPalette/grabPalette RGBA->RGB change. 2011-02-14 17:08:31 +01:00