diff options
author | Filippos Karapetis | 2008-06-06 18:28:50 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-06-06 18:28:50 +0000 |
commit | 31bb8c01c7b389869564ebfbb5a5ac61be57c11f (patch) | |
tree | c0e47801521f805a236f84af77614393473afae8 /engines/drascula | |
parent | 7a05f382c24d90bb4a93e12cf336aabf4ad30754 (diff) | |
download | scummvm-rg350-31bb8c01c7b389869564ebfbb5a5ac61be57c11f.tar.gz scummvm-rg350-31bb8c01c7b389869564ebfbb5a5ac61be57c11f.tar.bz2 scummvm-rg350-31bb8c01c7b389869564ebfbb5a5ac61be57c11f.zip |
Removed the useless textSurface buffer
frame_x -> frameX
candleX, candleY, pianistX and drunkX are used in more than one place
svn-id: r32580
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/animation.cpp | 64 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 13 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 3 | ||||
-rw-r--r-- | engines/drascula/rooms.cpp | 11 | ||||
-rw-r--r-- | engines/drascula/staticdata.h | 7 |
5 files changed, 10 insertions, 88 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index f55a388b92..76c2843735 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -396,9 +396,6 @@ void DrasculaEngine::animation_2_1() { if (animate("ag.bin", 14)) break; - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -407,9 +404,6 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(97, extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -591,9 +585,6 @@ void DrasculaEngine::animation_2_1() { } void DrasculaEngine::animation_3_1() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); talk(192); @@ -619,16 +610,10 @@ void DrasculaEngine::animation_3_1() { flags[0] = 1; - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(97, extraSurface); } void DrasculaEngine::animation_4_1() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an12.alg", extraSurface); talk(205); @@ -660,9 +645,6 @@ void DrasculaEngine::animation_4_1() { talk_pianist(4); talk(209); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[11] = 0; loadPic(97, extraSurface); } @@ -728,9 +710,6 @@ void DrasculaEngine::animation_4_2() { loadPic("ciego4.alg", backSurface); loadPic("ciego5.alg", frontSurface); - if (_lang == kSpanish) - textSurface = frontSurface; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -776,9 +755,6 @@ void DrasculaEngine::animation_4_2() { loadPic(99, backSurface); withoutVerb(); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[9] = 0; flags[4] = 1; } @@ -1931,9 +1907,6 @@ void DrasculaEngine::animation_1_6() { trackDrascula = 0; talk_drascula(35); - if (_lang == kSpanish) - textSurface = extraSurface; - clearRoom(); enterRoom(102); activatePendulum(); @@ -2145,9 +2118,6 @@ void DrasculaEngine::animation_19_6() { } void DrasculaEngine::animation_12_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an12.alg", extraSurface); talk(356); @@ -2173,17 +2143,11 @@ void DrasculaEngine::animation_12_2() { talk_pianist(5); converse(1); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[11] = 0; loadPic(974, extraSurface); } void DrasculaEngine::animation_26_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an12.alg", extraSurface); talk(392); @@ -2234,9 +2198,6 @@ void DrasculaEngine::animation_26_2() { pickObject(11); removeObject(kItemBook); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[11] = 0; flags[39] = 1; loadPic(974, extraSurface); @@ -2244,9 +2205,6 @@ void DrasculaEngine::animation_26_2() { } void DrasculaEngine::animation_11_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); talk(352); @@ -2259,9 +2217,6 @@ void DrasculaEngine::animation_11_2() { pause(40); talk_bartender(82); - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(974, extraSurface); } @@ -2389,9 +2344,6 @@ void DrasculaEngine::animation_34_2() { } void DrasculaEngine::animation_36_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); talk(404); @@ -2401,10 +2353,6 @@ void DrasculaEngine::animation_36_2() { talk(355); pause(40); talk_bartender(82); - - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(974, extraSurface); } @@ -2504,9 +2452,6 @@ void DrasculaEngine::animation_6_2() { stopMusic(); flags[9] = 1; - if (_lang == kSpanish) - textSurface = frontSurface; - clearRoom(); loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind loadPic("ciego2.alg", drawSurface3); @@ -2541,9 +2486,6 @@ void DrasculaEngine::animation_6_2() { loadPic(99, backSurface); withoutVerb(); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[9] = 0; } @@ -2562,9 +2504,6 @@ void DrasculaEngine::animation_33_2() { loadPic("ciego4.alg", backSurface); loadPic("ciego5.alg", frontSurface); - if (_lang == kSpanish) - textSurface = frontSurface; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -2593,9 +2532,6 @@ void DrasculaEngine::animation_33_2() { loadPic(99, backSurface); withoutVerb(); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[33] = 1; flags[9] = 0; } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c93917f8d0..4cd511001c 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -401,18 +401,13 @@ void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int wi bool DrasculaEngine::runCurrentChapter() { int n; - if (_lang == kSpanish) - textSurface = extraSurface; - else - textSurface = tableSurface; - previousMusic = -1; if (currentChapter != 2) { int soc = 0; for (n = 0; n < 6; n++) { soc = soc + CHARACTER_WIDTH; - frame_x[n] = soc; + frameX[n] = soc; } } @@ -932,7 +927,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { soc = 0; for (l = 0; l < 6; l++) { soc += curWidth; - frame_x[l] = soc; + frameX[l] = soc; } } @@ -1452,7 +1447,7 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { textPos[4] = CHAR_WIDTH; textPos[5] = CHAR_HEIGHT; - copyRectClip(textPos, textSurface, screenSurface); + copyRectClip(textPos, tableSurface, screenSurface); screenX = screenX + CHAR_WIDTH; if (screenX > 317) { @@ -2276,7 +2271,7 @@ void DrasculaEngine::moveCharacters() { factor_red[curY + curHeight], frontSurface, screenSurface); } } else if (characterMoved == 1) { - curPos[0] = frame_x[num_frame]; + curPos[0] = frameX[num_frame]; curPos[1] = frame_y + DIF_MASK_HARE; curPos[2] = curX; curPos[3] = curY; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 38c2e88ea3..aeb63eba9d 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -283,7 +283,6 @@ public: byte *extraSurface; // not sure about this one, was "dir_hare_dch" byte *screenSurface; byte *frontSurface; - byte *textSurface; byte *pendulumSurface; byte cPal[768]; @@ -690,7 +689,7 @@ extern const char *_textmisc[][2]; extern const char *_textd1[][11]; extern const ItemLocation itemLocations[]; -extern int frame_x[20]; +extern int frameX[20]; extern const int x_pol[44], y_pol[44]; extern const int verbBarX[]; extern const int x1d_menu[], y1d_menu[]; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 7aec2e3adb..08d4e8ab4c 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1211,10 +1211,6 @@ void DrasculaEngine::update_13() { } void DrasculaEngine::update_14_pre() { - int candleY[] = {158, 172, 186}; - int candleX[] = {14, 19, 24}; - int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; - int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1}; int difference; copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); @@ -1358,7 +1354,6 @@ void DrasculaEngine::update_59_pre() { } void DrasculaEngine::update_60_pre() { - int candleY[] = {158, 172, 186}; int difference; if (flags[5] == 0) @@ -1389,10 +1384,6 @@ void DrasculaEngine::update_60() { } void DrasculaEngine::update_62_pre() { - int candleY[] = { 158, 172, 186 }; - int candleX[] = { 14, 19, 24 }; - int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 }; - int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1 }; int difference; copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); @@ -1437,8 +1428,6 @@ void DrasculaEngine::update_62_pre() { } void DrasculaEngine::update_62() { - int drunkX[] = { 1, 42, 83, 124, 165, 206, 247, 1 }; - copyRect(1, 1, 0, 0, 62, 142, drawSurface2, screenSurface); if (curY + curHeight < 89) { diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 5fb404f4e1..8a5890bd7a 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -122,8 +122,11 @@ const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, 40, 80, 120, 160, 200, 240, 0}; const int y1d_menu[] = {0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, 50, 50, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75, 75, 75, 100}; -int frame_x[20] = {43, 87, 130, 173, 216, 259}; - +int frameX[20] = {43, 87, 130, 173, 216, 259}; +int candleX[] = {14, 19, 24}; +int candleY[] = {158, 172, 186}; +int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; +int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1}; const RoomUpdate roomPreUpdates[] = { // room flag val x1 y1 x2 y2 width height type |