aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl/sdl_gl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/sdl/sdl_gl.cpp')
-rw-r--r--backends/sdl/sdl_gl.cpp110
1 files changed, 0 insertions, 110 deletions
diff --git a/backends/sdl/sdl_gl.cpp b/backends/sdl/sdl_gl.cpp
index 6675f11d01..f3a2fa7f63 100644
--- a/backends/sdl/sdl_gl.cpp
+++ b/backends/sdl/sdl_gl.cpp
@@ -45,13 +45,6 @@ public:
// Set a parameter
uint32 property(int param, Property *value);
- // Overlay
- virtual void show_overlay();
- virtual void hide_overlay();
- virtual void clear_overlay();
- virtual void grab_overlay(int16 *buf, int pitch);
- virtual void copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h);
-
protected:
FB2GL fb2gl;
int gl_flags;
@@ -338,106 +331,3 @@ uint32 OSystem_SDL_OpenGL::property(int param, Property *value) {
return OSystem_SDL_Common::property(param, value);
}
-
-
-void OSystem_SDL_OpenGL::show_overlay()
-{
- // hide the mouse
- undraw_mouse();
-
- _overlayVisible = true;
- clear_overlay();
-}
-
-void OSystem_SDL_OpenGL::hide_overlay()
-{
- // hide the mouse
- undraw_mouse();
-
- _overlayVisible = false;
- _forceFull = true;
-}
-
-void OSystem_SDL_OpenGL::clear_overlay()
-{
- if (!_overlayVisible)
- return;
-
- // hide the mouse
- undraw_mouse();
-
- // Clear the overlay by making the game screen "look through" everywhere.
- SDL_Rect src, dst;
- src.x = src.y = 0;
-// dst.x = dst.y = 1;
- dst.x = dst.y = 0;
- src.w = dst.w = _screenWidth;
- src.h = dst.h = _screenHeight;
- if (SDL_BlitSurface(_screen, &src, _tmpscreen, &dst) != 0)
- error("SDL_BlitSurface failed: %s", SDL_GetError());
-
- _forceFull = true;
-}
-
-void OSystem_SDL_OpenGL::grab_overlay(int16 *buf, int pitch)
-{
- if (!_overlayVisible)
- return;
-
- if (_tmpscreen == NULL)
- return;
-
- // hide the mouse
- undraw_mouse();
-
- if (SDL_LockSurface(_tmpscreen) == -1)
- error("SDL_LockSurface failed: %s.\n", SDL_GetError());
-
- int16 *src = (int16 *)_tmpscreen->pixels + _tmpScreenWidth + 1;
- int h = _screenHeight;
- do {
- memcpy(buf, src, _screenWidth*2);
- src += _tmpScreenWidth;
- buf += pitch;
- } while (--h);
-
- SDL_UnlockSurface(_tmpscreen);
-}
-
-void OSystem_SDL_OpenGL::copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h)
-{
- if (!_overlayVisible)
- return;
-
- if (_tmpscreen == NULL)
- return;
-
- // Clip the coordinates
- if (x < 0) { w+=x; buf-=x; x = 0; }
- if (y < 0) { h+=y; buf-=y*pitch; y = 0; }
- if (w > _screenWidth-x) { w = _screenWidth - x; }
- if (h > _screenHeight-y) { h = _screenHeight - y; }
- if (w <= 0 || h <= 0)
- return;
-
- // Mark the modified region as dirty
- cksum_valid = false;
- add_dirty_rect(x, y, w, h);
-
- /* FIXME: undraw mouse only if the draw rect intersects with the mouse rect */
- undraw_mouse();
-
- if (SDL_LockSurface(_tmpscreen) == -1)
- error("SDL_LockSurface failed: %s.\n", SDL_GetError());
-
- int16 *dst = (int16 *)_tmpscreen->pixels + (y+1) * _tmpScreenWidth + (x+1);
- do {
- memcpy(dst, buf, w*2);
- dst += _tmpScreenWidth;
- buf += pitch;
- } while (--h);
-
- SDL_UnlockSurface(_tmpscreen);
-}
-
-