[Scummvm-cvs-logs] SF.net SVN: scummvm:[52717] scummvm/trunk/gui
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Tue Sep 14 02:34:14 CEST 2010
Revision: 52717
http://scummvm.svn.sourceforge.net/scummvm/?rev=52717&view=rev
Author: lordhoto
Date: 2010-09-14 00:34:12 +0000 (Tue, 14 Sep 2010)
Log Message:
-----------
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.
Modified Paths:
--------------
scummvm/trunk/gui/ThemeEngine.cpp
scummvm/trunk/gui/ThemeEngine.h
Modified: scummvm/trunk/gui/ThemeEngine.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEngine.cpp 2010-09-14 00:15:20 UTC (rev 52716)
+++ scummvm/trunk/gui/ThemeEngine.cpp 2010-09-14 00:34:12 UTC (rev 52717)
@@ -1189,70 +1189,6 @@
_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
*********************************************************/
Modified: scummvm/trunk/gui/ThemeEngine.h
===================================================================
--- scummvm/trunk/gui/ThemeEngine.h 2010-09-14 00:15:20 UTC (rev 52716)
+++ scummvm/trunk/gui/ThemeEngine.h 2010-09-14 00:34:12 UTC (rev 52717)
@@ -264,17 +264,6 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list