From 0a2a468d83d759e8f765979866b53a0fba309cdd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 26 Aug 2008 08:21:21 +0000 Subject: Simplified several calls to copyBackground() svn-id: r34181 --- engines/drascula/graphics.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/drascula/graphics.cpp') diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index e1b390efa1..3335dc920c 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -61,7 +61,7 @@ void DrasculaEngine::freeMemory() { } void DrasculaEngine::moveCursor() { - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); moveCharacters(); @@ -146,6 +146,12 @@ void DrasculaEngine::showFrame(bool firstFrame) { void DrasculaEngine::copyBackground(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *src, byte *dest) { + if (src == 0) + src = bgSurface; + + if (dest == 0) + dest = screenSurface; + dest += xdes + ydes * 320; src += xorg + yorg * 320; for (int x = 0; x < height; x++) { -- cgit v1.2.3