aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula/graphics.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2008-08-26 08:21:21 +0000
committerFilippos Karapetis2008-08-26 08:21:21 +0000
commit0a2a468d83d759e8f765979866b53a0fba309cdd (patch)
treebfc42862036899515e69cde246371cc58d130031 /engines/drascula/graphics.cpp
parent3b0aba1c382e9326e9d555979be27bd3b91d3be5 (diff)
downloadscummvm-rg350-0a2a468d83d759e8f765979866b53a0fba309cdd.tar.gz
scummvm-rg350-0a2a468d83d759e8f765979866b53a0fba309cdd.tar.bz2
scummvm-rg350-0a2a468d83d759e8f765979866b53a0fba309cdd.zip
Simplified several calls to copyBackground()
svn-id: r34181
Diffstat (limited to 'engines/drascula/graphics.cpp')
-rw-r--r--engines/drascula/graphics.cpp8
1 files changed, 7 insertions, 1 deletions
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++) {