diff options
author | Filippos Karapetis | 2017-11-03 09:26:00 +0200 |
---|---|---|
committer | Filippos Karapetis | 2017-11-11 17:14:36 +0200 |
commit | d81869af58b3b8216447a2e77fd6302c21e6550e (patch) | |
tree | 9ed37b47aca4c52aa8d14add92bdb8bd16c46d58 /engines/drascula | |
parent | 51cd9b488856dea791079ca6681c16c64d9d14d8 (diff) | |
download | scummvm-rg350-d81869af58b3b8216447a2e77fd6302c21e6550e.tar.gz scummvm-rg350-d81869af58b3b8216447a2e77fd6302c21e6550e.tar.bz2 scummvm-rg350-d81869af58b3b8216447a2e77fd6302c21e6550e.zip |
DRASCULA: Simplify the drawing code in BJ's room
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/actors.cpp | 11 | ||||
-rw-r--r-- | engines/drascula/animation.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 2 | ||||
-rw-r--r-- | engines/drascula/rooms.cpp | 22 | ||||
-rw-r--r-- | engines/drascula/talk.cpp | 6 |
6 files changed, 12 insertions, 35 deletions
diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp index 8ab3839ebb..a6f04d1eb5 100644 --- a/engines/drascula/actors.cpp +++ b/engines/drascula/actors.cpp @@ -55,17 +55,6 @@ void DrasculaEngine::placeDrascula() { copyRect(drX, 122, drasculaX, drasculaY, 45, 77, backSurface, screenSurface); } -void DrasculaEngine::placeBJ() { - int bX = 0; - - if (trackBJ == 3) - bX = 10; - else if (trackBJ == 0) - bX = 37; - - copyRect(bX, 99, bjX, bjY, 26, 76, drawSurface3, screenSurface); -} - void DrasculaEngine::hiccup(int counter) { int y = 0, trackCharacter = 0; if (currentChapter == 3) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index b8bbd566b3..2e70b0f6ad 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -430,9 +430,6 @@ void DrasculaEngine::animation_2_1() { break; for (l = 0; l < 200; l++) factor_red[l] = 99; - bjX = 170; - bjY = 90; - trackBJ = 0; curX = 91; curY = 95; trackProtagonist = 1; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 0f031b10f5..b6d508400e 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -70,9 +70,6 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam _talkSequences = 0; _currentSaveSlot = 0; - bjX = 0; - bjY = 0; - trackBJ = 0; framesWithoutAction = 0; term_int = 0; currentChapter = 0; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index a74328c874..9129e52126 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -456,7 +456,6 @@ public: int blinking; int igorX, igorY, trackIgor; int drasculaX, drasculaY, trackDrascula; - int bjX, bjY, trackBJ; int framesWithoutAction; int term_int; int currentChapter; @@ -526,7 +525,6 @@ public: bool animate(const char *animation, int FPS); void pause(int); void placeIgor(); - void placeBJ(); void placeDrascula(); void talkInit(const char *filename); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index df41feab29..8418135b37 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1153,9 +1153,6 @@ void DrasculaEngine::updateRefresh_pre() { break; } } - - if (currentChapter == 1 && _roomNumber == 16) - placeBJ(); } void DrasculaEngine::update_1_pre() { @@ -1309,15 +1306,15 @@ void DrasculaEngine::update_14_pre() { } void DrasculaEngine::update_16_pre() { - if (currentChapter != 2) { - debug(4, "update_16_pre: Special case, current chapter is not 2, not performing update"); - return; + if (currentChapter == 1) { + // Place BJ + copyRect(37, 99, 170, 90, 26, 76, drawSurface3, screenSurface); + } else if (currentChapter == 2) { + if (flags[17] == 0) + copyBackground(1, 103, 24, 72, 33, 95, drawSurface3, screenSurface); + if (flags[19] == 1) + copyBackground(37, 151, 224, 115, 56, 47, drawSurface3, screenSurface); } - - if (flags[17] == 0) - copyBackground(1, 103, 24, 72, 33, 95, drawSurface3, screenSurface); - if (flags[19] == 1) - copyBackground(37, 151, 224, 115, 56, 47, drawSurface3, screenSurface); } void DrasculaEngine::update_18_pre() { @@ -1678,9 +1675,8 @@ void DrasculaEngine::enterRoom(int roomIndex) { strcpy(currentData, fileName); Common::SeekableReadStream *stream = _archives.open(fileName); - if (!stream) { + if (!stream) error("missing data file %s", fileName); - } TextResourceParser p(stream, DisposeAfterUse::YES); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 7ac2cc6406..aa79dab148 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -338,14 +338,14 @@ void DrasculaEngine::talk_bj(int index) { updateRefresh_pre(); - copyBackground(bjX + 2, bjY - 1, bjX + 2, bjY - 1, 27, 40, bgSurface, screenSurface); + copyBackground(170 + 2, 90 - 1, 170 + 2, 90 - 1, 27, 40, bgSurface, screenSurface); - copyRect(x_talk[face], 99, bjX + 2, bjY - 1, 27, 40, drawSurface3, screenSurface); + copyRect(x_talk[face], 99, 170 + 2, 90 - 1, 27, 40, drawSurface3, screenSurface); moveCharacters(); updateRefresh(); if (!_subtitlesDisabled) - centerText(said, bjX + 7, bjY); + centerText(said, 170 + 7, 90); updateScreen(); |