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
This commit is contained in:
parent
dd76a20acd
commit
2a353089aa
2 changed files with 0 additions and 75 deletions
|
@ -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
|
||||
*********************************************************/
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue