aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJohannes Schickel2010-09-14 00:34:12 +0000
committerJohannes Schickel2010-09-14 00:34:12 +0000
commit2a353089aa4863be3d0255fe1a8f65dbabb8c2c1 (patch)
tree36858821f90661c008fe9ae655abe08af43f1ec2 /gui
parentdd76a20acd16df90457eb7eb11006902f8e3290b (diff)
downloadscummvm-rg350-2a353089aa4863be3d0255fe1a8f65dbabb8c2c1.tar.gz
scummvm-rg350-2a353089aa4863be3d0255fe1a8f65dbabb8c2c1.tar.bz2
scummvm-rg350-2a353089aa4863be3d0255fe1a8f65dbabb8c2c1.zip
GUI: Remove dead code.
This code was added when tooltip support was added. Since we changed the way how tooltips are drawn later on, this code is not required anymore. Actually it was never used, but it could've been used to save/restore the state of the GUI for the tooltips. svn-id: r52717
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeEngine.cpp64
-rw-r--r--gui/ThemeEngine.h11
2 files changed, 0 insertions, 75 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index eb388272c8..0d0fe8aecd 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1189,70 +1189,6 @@ void ThemeEngine::debugWidgetPosition(const char *name, const Common::Rect &r) {
_screen.vLine(r.right, r.top, r.bottom, 0xFFFF);
}
-ThemeEngine::StoredState *ThemeEngine::storeState(const Common::Rect &r) {
- StoredState *state = new StoredState;
- byte *dst;
- byte *src;
-
- state->r.top = r.top;
- state->r.bottom = r.bottom;
- state->r.left = r.left;
- state->r.right = r.right;
-
- state->r.clip(_screen.w, _screen.h);
-
- state->screen.create(state->r.width(), state->r.height(), _screen.bytesPerPixel);
- state->backBuffer.create(state->r.width(), state->r.height(), _backBuffer.bytesPerPixel);
-
- src = (byte *)_screen.getBasePtr(state->r.left, state->r.top);
- dst = (byte *)state->screen.getBasePtr(0, 0);
-
- for (int i = state->r.height(); i > 0; i--) {
- memcpy(dst, src, state->r.width() * _screen.bytesPerPixel);
- src += _screen.pitch;
- dst += state->screen.pitch;
- }
-
- src = (byte *)_backBuffer.getBasePtr(state->r.left, state->r.top);
- dst = (byte *)state->backBuffer.getBasePtr(0, 0);
-
- for (int i = state->r.height(); i > 0; i--) {
- memcpy(dst, src, state->r.width() * _backBuffer.bytesPerPixel);
- src += _backBuffer.pitch;
- dst += state->backBuffer.pitch;
- }
-
- return state;
-}
-
-void ThemeEngine::restoreState(StoredState *state) {
- byte *dst;
- byte *src;
-
- if (!state)
- return;
-
- src = (byte *)state->screen.getBasePtr(0, 0);
- dst = (byte *)_screen.getBasePtr(state->r.left, state->r.top);
-
- for (int i = state->r.height(); i > 0; i--) {
- memcpy(dst, src, state->r.width() * _screen.bytesPerPixel);
- src += state->screen.pitch;
- dst += _screen.pitch;
- }
-
- src = (byte *)state->backBuffer.getBasePtr(0, 0);
- dst = (byte *)_backBuffer.getBasePtr(state->r.left, state->r.top);
-
- for (int i = state->r.height(); i > 0; i--) {
- memcpy(dst, src, state->r.width() * _backBuffer.bytesPerPixel);
- src += state->backBuffer.pitch;
- dst += _backBuffer.pitch;
- }
-
- addDirtyRect(state->r);
-}
-
/**********************************************************
* Screen/overlay management
*********************************************************/
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index b2bb9439a7..3d2fca04eb 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -264,17 +264,6 @@ public:
void enable();
void disable();
- struct StoredState {
- Common::Rect r;
- Graphics::Surface screen;
- Graphics::Surface backBuffer;
-
- StoredState() {}
- };
-
- StoredState *storeState(const Common::Rect &r);
- void restoreState(StoredState *state);
-
/**
* Implementation of the GUI::Theme API. Called when a
* new dialog is opened. Note that the boolean parameter