diff options
author | Filippos Karapetis | 2008-06-04 10:27:10 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-06-04 10:27:10 +0000 |
commit | 052d6f6bff3ec786cfa121cbd5648da85f9d6630 (patch) | |
tree | 25b01cb4658cb7dcf747d2752065146a200068c9 | |
parent | 7e2e283a0ec7d7ecb6d27cb79f430ac2f0d8a102 (diff) | |
download | scummvm-rg350-052d6f6bff3ec786cfa121cbd5648da85f9d6630.tar.gz scummvm-rg350-052d6f6bff3ec786cfa121cbd5648da85f9d6630.tar.bz2 scummvm-rg350-052d6f6bff3ec786cfa121cbd5648da85f9d6630.zip |
releaseGame() -> quitGame()
nivel_osc -> palLevel
Simplified calls to loadPic()
svn-id: r32533
-rw-r--r-- | engines/drascula/animation.cpp | 316 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 116 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 12 | ||||
-rw-r--r-- | engines/drascula/rooms.cpp | 14 | ||||
-rw-r--r-- | engines/drascula/talk.cpp | 10 |
5 files changed, 235 insertions, 233 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 07cc2fd6c9..2217edf2a3 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -119,10 +119,10 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("103.alg", drawSurface1, HALF_PAL); - loadPic("104.alg", drawSurface3, 1); - loadPic("aux104.alg", drawSurface2, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(103, drawSurface1, HALF_PAL); + loadPic(104, drawSurface3); + loadPic("aux104.alg", drawSurface2); playMusic(4); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -182,9 +182,9 @@ void DrasculaEngine::animation_1_1() { clearRoom(); - loadPic("100.alg", drawSurface1, HALF_PAL); - loadPic("auxigor.alg", frontSurface, 1); - loadPic("auxdr.alg", backSurface, 1); + loadPic(100, drawSurface1, HALF_PAL); + loadPic("auxigor.alg", frontSurface); + loadPic("auxdr.alg", backSurface); trackDrascula = 0; x_dr = 129; y_dr = 95; @@ -252,7 +252,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - loadPic("100.alg", drawSurface1, HALF_PAL); + loadPic(100, drawSurface1, HALF_PAL); MusicFadeout(); stopMusic(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -377,8 +377,8 @@ void DrasculaEngine::animation_1_1() { term_int = 1; } clearRoom(); - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(99, backSurface); } void DrasculaEngine::animation_2_1() { @@ -399,7 +399,7 @@ void DrasculaEngine::animation_2_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -410,7 +410,7 @@ void DrasculaEngine::animation_2_1() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("97.alg", extraSurface, 1); + loadPic(97, extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -448,10 +448,10 @@ void DrasculaEngine::animation_2_1() { break; clearRoom(); - loadPic("16.alg", drawSurface1, HALF_PAL); + loadPic(16, drawSurface1, HALF_PAL); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadPic("auxbj.alg", drawSurface3, 1); + loadPic("auxbj.alg", drawSurface3); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -471,7 +471,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadPic("97g.alg", extraSurface, 1); + loadPic("97g.alg", extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -507,7 +507,7 @@ void DrasculaEngine::animation_2_1() { if (animate("bjb.bin", 14)) break; playMusic(9); - loadPic("97.alg", extraSurface, 1); + loadPic(97, extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); @@ -594,7 +594,7 @@ void DrasculaEngine::animation_3_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface); talk(192); talk_bartender(1); @@ -622,14 +622,14 @@ void DrasculaEngine::animation_3_1() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("97.alg", extraSurface, 1); + loadPic(97, extraSurface); } void DrasculaEngine::animation_4_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an12.alg", extraSurface, 1); + loadPic("an12.alg", extraSurface); talk(205); @@ -664,7 +664,7 @@ void DrasculaEngine::animation_4_1() { textSurface = extraSurface; flags[11] = 0; - loadPic("97.alg", extraSurface, 1); + loadPic(97, extraSurface); } void DrasculaEngine::animation_1_2() { @@ -678,8 +678,8 @@ void DrasculaEngine::animation_2_2() { moveCharacters(); updateRefresh(); updateScreen(); - loadPic("an2_1.alg", frontSurface, 1); - loadPic("an2_2.alg", extraSurface, 1); + loadPic("an2_1.alg", frontSurface); + loadPic("an2_2.alg", extraSurface); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface); @@ -723,10 +723,10 @@ void DrasculaEngine::animation_4_2() { clearRoom(); loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind - loadPic("ciego2.alg", drawSurface3, 1); - loadPic("ciego3.alg", extraSurface, 1); - loadPic("ciego4.alg", backSurface, 1); - loadPic("ciego5.alg", frontSurface, 1); + loadPic("ciego2.alg", drawSurface3); + loadPic("ciego3.alg", extraSurface); + loadPic("ciego4.alg", backSurface); + loadPic("ciego5.alg", frontSurface); if (_lang == kSpanish) textSurface = frontSurface; @@ -769,11 +769,11 @@ void DrasculaEngine::animation_4_2() { clearRoom(); playMusic(roomMusic); - loadPic("9.alg", drawSurface1, HALF_PAL); - loadPic("aux9.alg", drawSurface3, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(9, drawSurface1, HALF_PAL); + loadPic("aux9.alg", drawSurface3); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); withoutVerb(); if (_lang == kSpanish) @@ -813,7 +813,7 @@ void DrasculaEngine::animation_14_2() { int n, pos_cabina[6]; int l = 0; - loadPic("an14_2.alg", backSurface, 1); + loadPic("an14_2.alg", backSurface); pos_cabina[0] = 150; pos_cabina[1] = 6; @@ -843,7 +843,7 @@ void DrasculaEngine::animation_14_2() { finishSound(); - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); } void DrasculaEngine::animation_15_2() { @@ -958,7 +958,7 @@ void DrasculaEngine::animation_16_2() { clearRoom(); loadPic("his4_1.alg", drawSurface1, HALF_PAL); - loadPic("his4_2.alg", drawSurface3, 1); + loadPic("his4_2.alg", drawSurface3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface3, screenSurface); @@ -993,7 +993,7 @@ void DrasculaEngine::animation_16_2() { clearRoom(); asco: - loadPic(roomDisk, drawSurface3, 1); + loadPic(roomDisk, drawSurface3); char rm[20]; sprintf(rm, "%i.alg", roomNumber); loadPic(rm, drawSurface1, HALF_PAL); @@ -1052,7 +1052,7 @@ void DrasculaEngine::animation_21_2() { } void DrasculaEngine::animation_23_2() { - loadPic("an24.alg", frontSurface, 1); + loadPic("an24.alg", frontSurface); flags[21] = 1; @@ -1113,7 +1113,7 @@ void DrasculaEngine::animation_23_joined() { int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1}; - loadPic("an23.alg", backSurface, 1); + loadPic("an23.alg", backSurface); for (n = 0; n < 34; n++) { copyRect(p_x, p_y, p_x, p_y, 36, 74, drawSurface1, screenSurface); @@ -1123,7 +1123,7 @@ void DrasculaEngine::animation_23_joined() { pause(5); } - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); } void DrasculaEngine::animation_23_joined2() { @@ -1133,7 +1133,7 @@ void DrasculaEngine::animation_23_joined2() { pause(50); - loadPic("an23_2.alg", backSurface, 1); + loadPic("an23_2.alg", backSurface); for (n = 0; n < 14; n++) { copyRect(p_x, p_y, p_x, p_y, 33, 71, drawSurface1, screenSurface); @@ -1143,14 +1143,14 @@ void DrasculaEngine::animation_23_joined2() { pause(5); } - loadPic("99.alg", backSurface,1); + loadPic(99, backSurface); } void DrasculaEngine::animation_25_2() { int n, pos_cabina[6]; - loadPic("an14_2.alg", backSurface, 1); - loadPic("18.alg", drawSurface1, 1); + loadPic("an14_2.alg", backSurface); + loadPic(18, drawSurface1); pos_cabina[0] = 150; pos_cabina[1] = 6; @@ -1180,7 +1180,7 @@ void DrasculaEngine::animation_25_2() { finishSound(); - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); } void DrasculaEngine::animation_27_2() { @@ -1248,7 +1248,7 @@ void DrasculaEngine::animation_31_2() { lleva_vb(-50); pause(15); gotoObject(159, 140); - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); trackProtagonist = 2; updateRoom(); updateScreen(); @@ -1297,8 +1297,8 @@ void DrasculaEngine::animation_35_2() { updateRoom(); updateScreen(); - loadPic("an35_1.alg", backSurface, 1); - loadPic("an35_2.alg", frontSurface, 1); + loadPic("an35_1.alg", backSurface); + loadPic("an35_2.alg", frontSurface); updateAnim(1, 70, 90, 46, 80, 6, backSurface); updateAnim(82, 70, 90, 46, 80, 6, backSurface); @@ -1340,9 +1340,9 @@ void DrasculaEngine::animation_2_3() { flags[0] = 0; flags[1] = 1; - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); gotoObject(332, 127); } @@ -1350,9 +1350,9 @@ void DrasculaEngine::animation_2_3() { void DrasculaEngine::animation_3_3() { int px = curX - 20, py = curY - 1; - loadPic("an2y_1.alg", frontSurface, 1); - loadPic("an2y_2.alg", extraSurface, 1); - loadPic("an2y_3.alg", backSurface, 1); + loadPic("an2y_1.alg", frontSurface); + loadPic("an2y_2.alg", extraSurface); + loadPic("an2y_3.alg", backSurface); updateAnim2(2, px, py, 71, 72, 4, frontSurface); updateAnim2(75, px, py, 71, 72, 4, frontSurface); @@ -1365,9 +1365,9 @@ void DrasculaEngine::animation_3_3() { void DrasculaEngine::animation_4_3() { int px = 120, py = 63; - loadPic("any_1.alg", frontSurface, 1); - loadPic("any_2.alg", extraSurface, 1); - loadPic("any_3.alg", backSurface, 1); + loadPic("any_1.alg", frontSurface); + loadPic("any_2.alg", extraSurface); + loadPic("any_3.alg", backSurface); updateAnim2(1, px, py, 77, 89, 4, frontSurface); updateAnim2(91, px, py, 77, 89, 4, frontSurface); @@ -1380,9 +1380,9 @@ void DrasculaEngine::animation_4_3() { void DrasculaEngine::animation_5_3() { int px = curX - 20, py = curY - 1; - loadPic("an3y_1.alg", frontSurface, 1); - loadPic("an3y_2.alg", extraSurface, 1); - loadPic("an3y_3.alg", backSurface, 1); + loadPic("an3y_1.alg", frontSurface); + loadPic("an3y_2.alg", extraSurface); + loadPic("an3y_3.alg", backSurface); updateAnim2(2, px, py, 71, 72, 4, frontSurface); updateAnim2(75, px, py, 71, 72, 4, frontSurface); @@ -1404,7 +1404,7 @@ void DrasculaEngine::animation_6_3() { flags[1] = 0; - loadPic("an4y.alg", frontSurface, 1); + loadPic("an4y.alg", frontSurface); for (frame = 0; frame < 6; frame++) { pause(3); @@ -1415,7 +1415,7 @@ void DrasculaEngine::animation_6_3() { flags[2] = 1; - loadPic("96.alg", frontSurface, 1); + loadPic(96, frontSurface); updateRoom(); updateScreen(); @@ -1423,10 +1423,10 @@ void DrasculaEngine::animation_6_3() { void DrasculaEngine::animation_rayo() { loadPic("anr_1.alg", frontSurface, HALF_PAL); - loadPic("anr_2.alg", extraSurface, 1); - loadPic("anr_3.alg", backSurface, 1); - loadPic("anr_4.alg", drawSurface1, 1); - loadPic("anr_5.alg", drawSurface3, 1); + loadPic("anr_2.alg", extraSurface); + loadPic("anr_3.alg", backSurface); + loadPic("anr_4.alg", drawSurface1); + loadPic("anr_5.alg", drawSurface3); updateScreen(0, 0, 0, 0, 320, 200, frontSurface); @@ -1571,8 +1571,8 @@ void DrasculaEngine::animation_5_5(){ updateRoom(); updateScreen(); - loadPic("3an5_1.alg", backSurface, 1); - loadPic("3an5_2.alg", frontSurface, 1); + loadPic("3an5_1.alg", backSurface); + loadPic("3an5_2.alg", frontSurface); for (frame = 0; frame < 9; frame++) { pause(3); @@ -1595,15 +1595,15 @@ void DrasculaEngine::animation_5_5(){ updateVisible(); pause(12); - loadPic("96.alg", frontSurface, 1); + loadPic(96, frontSurface); for (h = 0; h < (200 - 18); h++) copyBackground(0, 53, 0, h, 320, 19, frontSurface, screenSurface); updateScreen(); - loadPic("101.alg", drawSurface1, HALF_PAL); - loadPic("3an5_3.alg", backSurface, 1); - loadPic("3an5_4.alg", extraSurface, 1); + loadPic(101, drawSurface1, HALF_PAL); + loadPic("3an5_3.alg", backSurface); + loadPic("3an5_4.alg", extraSurface); updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); pause(9); @@ -1622,12 +1622,12 @@ void DrasculaEngine::animation_5_5(){ playSound(1); finishSound(); - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); + loadPic(99, backSurface); + loadPic(97, extraSurface); clearRoom(); - loadPic("49.alg", drawSurface1, HALF_PAL); + loadPic(49, drawSurface1, HALF_PAL); } void DrasculaEngine::animation_6_5() { @@ -1726,7 +1726,7 @@ void DrasculaEngine::animation_12_5() { bgPalette3[color][component] = adjustToVGA(bgPalette3[color][component] - 8 + fade); } - loadPic("3an11_1.alg", backSurface, 1); + loadPic("3an11_1.alg", backSurface); for (frame = 0; frame < 8; frame++) { if (frame == 2 || frame == 4 || frame == 8 || frame==10) @@ -1771,7 +1771,7 @@ void DrasculaEngine::animation_12_5() { hiccup(12); finishSound(); - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); gotoObject(40, 169); gotoObject(-14, 175); @@ -1795,7 +1795,7 @@ void DrasculaEngine::animation_13_5() { int frus_y[] = {1, 1, 1, 1, 1, 1, 1, 89}; int pos_frusky[6]; - loadPic("auxfr.alg", backSurface, 1); + loadPic("auxfr.alg", backSurface); pos_frusky[3] = 81; pos_frusky[4] = 44; @@ -1878,9 +1878,9 @@ void DrasculaEngine::animation_1_6() { for (l = 0; l < 200; l++) factor_red[l] = 98; - loadPic("auxig2.alg", frontSurface, 1); - loadPic("auxdr.alg", drawSurface2, 1); - loadPic("car.alg", backSurface, 1); + loadPic("auxig2.alg", frontSurface); + loadPic("auxdr.alg", drawSurface2); + loadPic("car.alg", backSurface); talk_drascula(19, 1); talk(247); talk_drascula(20, 1); @@ -1901,7 +1901,7 @@ void DrasculaEngine::animation_1_6() { talk_drascula(29, 1); fadeToBlack(1); clearRoom(); - loadPic("time1.alg", screenSurface, 1); + loadPic("time1.alg", screenSurface); updateScreen(); delay(930); clearRoom(); @@ -1916,7 +1916,7 @@ void DrasculaEngine::animation_1_6() { talk(257); fadeToBlack(0); clearRoom(); - loadPic("time1.alg", screenSurface,1); + loadPic("time1.alg", screenSurface); updateScreen(); delay(900); clearRoom(); @@ -1988,10 +1988,10 @@ void DrasculaEngine::animation_6_6() { clearRoom(); withoutVerb(); removeObject(20); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface); + loadPic(97, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); doBreak = 1; objExit = 104; curX = -1; @@ -2055,7 +2055,7 @@ void DrasculaEngine::animation_9_6() { talk_solo(_textbj[_lang][28], "bj28.als"); trackProtagonist = 3; clearRoom(); - loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic(96, frontSurface, COMPLETE_PAL); loadPic("nota2.alg", drawSurface1, HALF_PAL); talk(296); talk(297); @@ -2068,7 +2068,7 @@ void DrasculaEngine::animation_9_6() { updateScreen(); color_abc(kColorLightGreen); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); - loadPic("nota2.alg", drawSurface1, 1); + loadPic("nota2.alg", drawSurface1); trackProtagonist = 0; updateRoom(); updateScreen(); @@ -2153,7 +2153,7 @@ void DrasculaEngine::animation_12_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an12.alg", extraSurface, 1); + loadPic("an12.alg", extraSurface); talk(356); @@ -2182,14 +2182,14 @@ void DrasculaEngine::animation_12_2() { textSurface = extraSurface; flags[11] = 0; - loadPic("974.alg", extraSurface, 1); + loadPic(974, extraSurface); } void DrasculaEngine::animation_26_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an12.alg", extraSurface, 1); + loadPic("an12.alg", extraSurface); talk(392); @@ -2217,7 +2217,7 @@ void DrasculaEngine::animation_26_2() { talk_pianist(18); talk_pianist(19); - loadPic("an26.alg", extraSurface, 1); + loadPic("an26.alg", extraSurface); updateAnim(1, 225, 113, 50, 59, 6, extraSurface); @@ -2244,7 +2244,7 @@ void DrasculaEngine::animation_26_2() { flags[11] = 0; flags[39] = 1; - loadPic("974.alg", extraSurface, 1); + loadPic(974, extraSurface); roomMusic = 16; } @@ -2252,7 +2252,7 @@ void DrasculaEngine::animation_11_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface); talk(352); talk_bartender(1); @@ -2267,11 +2267,11 @@ void DrasculaEngine::animation_11_2() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("974.alg", extraSurface, 1); + loadPic(974, extraSurface); } void DrasculaEngine::animation_13_2() { - loadPic("an11y13.alg", frontSurface, 1); + loadPic("an11y13.alg", frontSurface); if (flags[41] == 0) { talk(103); @@ -2287,7 +2287,7 @@ void DrasculaEngine::animation_13_2() { } converse("op_2.cal"); - loadPic("964.alg", frontSurface, 1); + loadPic(964, frontSurface); } void DrasculaEngine::animation_18_2() { @@ -2325,7 +2325,7 @@ void DrasculaEngine::animation_24_2() { talk(356); - loadPic("an24.alg", frontSurface, 1); + loadPic("an24.alg", frontSurface); animation_32_2(); @@ -2346,8 +2346,8 @@ void DrasculaEngine::animation_24_2() { } void DrasculaEngine::animation_32_2() { - loadPic("an32_1.alg", drawSurface3, 1); - loadPic("an32_2.alg", backSurface, 1); + loadPic("an32_1.alg", drawSurface3); + loadPic("an32_2.alg", backSurface); updateAnim(1, 113, 53, 65, 81, 4, drawSurface3, 4); updateAnim(83, 113, 53, 65, 81, 4, drawSurface3, 4); @@ -2363,7 +2363,7 @@ void DrasculaEngine::animation_32_2() { pause(4); } - loadPic("aux18.alg", drawSurface3, 1); + loadPic("aux18.alg", drawSurface3); } void DrasculaEngine::animation_34_2() { @@ -2371,8 +2371,8 @@ void DrasculaEngine::animation_34_2() { updateRoom(); updateScreen(); - loadPic("an34_1.alg", backSurface, 1); - loadPic("an34_2.alg", extraSurface, 1); + loadPic("an34_1.alg", backSurface); + loadPic("an34_2.alg", extraSurface); updateAnim(1, 218, 79, 83, 75, 3, backSurface); updateAnim(77, 218, 79, 83, 75, 3, backSurface); @@ -2389,15 +2389,15 @@ void DrasculaEngine::animation_34_2() { updateScreen(218, 79, 218, 79, 83, 75, screenSurface); pause(3); - loadPic("994.alg", backSurface, 1); - loadPic("974.alg", extraSurface, 1); + loadPic(994, backSurface); + loadPic(974, extraSurface); } void DrasculaEngine::animation_36_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface); talk(404); talk_bartender(19); @@ -2410,13 +2410,13 @@ void DrasculaEngine::animation_36_2() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("974.alg", extraSurface, 1); + loadPic(974, extraSurface); } void DrasculaEngine::animation_7_2() { - loadPic("an7_1.alg", backSurface, 1); - loadPic("an7_2.alg", extraSurface, 1); - loadPic("an7_3.alg", frontSurface, 1); + loadPic("an7_1.alg", backSurface); + loadPic("an7_2.alg", extraSurface); + loadPic("an7_3.alg", frontSurface); if (flags[3] == 1) copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, drawSurface1); @@ -2431,10 +2431,10 @@ void DrasculaEngine::animation_7_2() { updateAnim2(75, 80, 64, 51, 73, 6, extraSurface); updateAnim2(1, 80, 64, 51, 73, 6, frontSurface); - loadPic("an7_4.alg", backSurface, 1); - loadPic("an7_5.alg", extraSurface, 1); - loadPic("an7_6.alg", frontSurface, 1); - loadPic("an7_7.alg", drawSurface3, 1); + loadPic("an7_4.alg", backSurface); + loadPic("an7_5.alg", extraSurface); + loadPic("an7_6.alg", frontSurface); + loadPic("an7_7.alg", drawSurface3); updateAnim2(1, 80, 64, 51, 73, 6, backSurface); updateAnim2(75, 80, 64, 51, 73, 6, backSurface); @@ -2447,8 +2447,8 @@ void DrasculaEngine::animation_7_2() { updateAnim2(1, 80, 64, 51, 73, 6, drawSurface3); updateAnim2(75, 80, 64, 51, 73, 2, drawSurface3); - loadPic("an7_8.alg", backSurface, 1); - loadPic("an7_9.alg", extraSurface, 1); + loadPic("an7_8.alg", backSurface); + loadPic("an7_9.alg", extraSurface); updateAnim2(1, 80, 64, 51, 73, 6, backSurface); updateAnim2(75, 80, 64, 51, 73, 6, backSurface); @@ -2463,10 +2463,10 @@ void DrasculaEngine::animation_7_2() { if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("aux3.alg", drawSurface3, 1); + loadPic(99, backSurface); + loadPic(97, extraSurface); + loadPic(96, frontSurface); + loadPic("aux3.alg", drawSurface3); } void DrasculaEngine::animation_5_2() { @@ -2474,10 +2474,10 @@ void DrasculaEngine::animation_5_2() { updateRoom(); updateScreen(); - loadPic("an5_1.alg", backSurface, 1); - loadPic("an5_2.alg", extraSurface, 1); - loadPic("an5_3.alg", frontSurface, 1); - loadPic("an5_4.alg", drawSurface3, 1); + loadPic("an5_1.alg", backSurface); + loadPic("an5_2.alg", extraSurface); + loadPic("an5_3.alg", frontSurface); + loadPic("an5_4.alg", drawSurface3); copyBackground(1, 1, 213, 66, 53,84, backSurface, screenSurface); updateScreen(); @@ -2497,10 +2497,10 @@ void DrasculaEngine::animation_5_2() { updateAnim(1, 213, 66, 53, 84, 6, drawSurface3); - loadPic("994.alg", backSurface, 1); - loadPic("974.alg", extraSurface, 1); - loadPic("964.alg", frontSurface, 1); - loadPic("aux5.alg", drawSurface3, 1); + loadPic(994, backSurface); + loadPic(974, extraSurface); + loadPic(964, frontSurface); + loadPic("aux5.alg", drawSurface3); flags[8] = 1; curX = curX - 4; talk_sync(_text[_lang][46], "46.als", "4442444244244"); @@ -2516,10 +2516,10 @@ void DrasculaEngine::animation_6_2() { clearRoom(); loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind - loadPic("ciego2.alg", drawSurface3, 1); - loadPic("ciego3.alg", extraSurface, 1); - loadPic("ciego4.alg", backSurface, 1); - loadPic("ciego5.alg", frontSurface, 1); + loadPic("ciego2.alg", drawSurface3); + loadPic("ciego3.alg", extraSurface); + loadPic("ciego4.alg", backSurface); + loadPic("ciego5.alg", frontSurface); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -2541,11 +2541,11 @@ void DrasculaEngine::animation_6_2() { clearRoom(); playMusic(roomMusic); - loadPic("9.alg", drawSurface1, HALF_PAL); - loadPic("aux9.alg", drawSurface3, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(9, drawSurface1, HALF_PAL); + loadPic("aux9.alg", drawSurface3); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); withoutVerb(); if (_lang == kSpanish) @@ -2564,10 +2564,10 @@ void DrasculaEngine::animation_33_2() { clearRoom(); loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind - loadPic("ciego2.alg", drawSurface3, 1); - loadPic("ciego3.alg", extraSurface, 1); - loadPic("ciego4.alg", backSurface, 1); - loadPic("ciego5.alg", frontSurface, 1); + loadPic("ciego2.alg", drawSurface3); + loadPic("ciego3.alg", extraSurface); + loadPic("ciego4.alg", backSurface); + loadPic("ciego5.alg", frontSurface); if (_lang == kSpanish) textSurface = frontSurface; @@ -2593,11 +2593,11 @@ void DrasculaEngine::animation_33_2() { clearRoom(); playMusic(roomMusic); - loadPic("9.alg", drawSurface1, HALF_PAL); - loadPic("aux9.alg", drawSurface3, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(9, drawSurface1, HALF_PAL); + loadPic("aux9.alg", drawSurface3); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); withoutVerb(); if (_lang == kSpanish) @@ -2665,7 +2665,7 @@ void DrasculaEngine::animation_1_4() { void DrasculaEngine::animation_5_4(){ trackProtagonist = 3; - loadPic("anh_dr.alg", backSurface, 1); + loadPic("anh_dr.alg", backSurface); gotoObject(99, 160); gotoObject(38, 177); hare_se_ve = 0; @@ -2679,13 +2679,13 @@ void DrasculaEngine::animation_5_4(){ updateRoom(); updateScreen(); openDoor(2, 0); - loadPic("auxigor.alg", frontSurface, 1); + loadPic("auxigor.alg", frontSurface); igorX = 100; igorY = 65; talk_igor(29, kIgorFront); talk_igor(30, kIgorFront); - loadPic("96.alg", frontSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface); + loadPic(99, backSurface); hare_se_ve = 1; fadeToBlack(0); exitRoom(0); @@ -2696,9 +2696,9 @@ void DrasculaEngine::animation_6_4() { roomNumber = 26; clearRoom(); - loadPic("26.alg", drawSurface1, HALF_PAL); - loadPic("aux26.alg", drawSurface3, 1); - loadPic("auxigor.alg", frontSurface, 1); + loadPic(26, drawSurface1, HALF_PAL); + loadPic("aux26.alg", drawSurface3); + loadPic("auxigor.alg", frontSurface); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); update_26_pre(); igorX = 104; @@ -2709,11 +2709,9 @@ void DrasculaEngine::animation_6_4() { talk_igor(26, kIgorFront); roomNumber = prevRoom; clearRoom(); - loadPic("96.alg", frontSurface, 1); - loadPic(roomDisk, drawSurface3, 1); - char rm[20]; - sprintf(rm, "%i.alg", roomNumber); - loadPic(rm, drawSurface1, HALF_PAL); + loadPic(96, frontSurface); + loadPic(roomDisk, drawSurface3); + loadPic(roomNumber, drawSurface1, HALF_PAL); withoutVerb(); updateRoom(); } @@ -2723,7 +2721,7 @@ void DrasculaEngine::animation_8_4() { int estanteria_x[] = {1, 75, 149, 223, 1, 75, 149, 223, 149, 223, 149, 223, 149, 223}; int estanteria_y[] = {1, 1, 1, 1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; - loadPic("an_8.alg", frontSurface, 1); + loadPic("an_8.alg", frontSurface); for (frame = 0; frame < 14; frame++) { pause(2); @@ -2731,7 +2729,7 @@ void DrasculaEngine::animation_8_4() { updateScreen(77, 45, 77, 45, 73, 72, screenSurface); } - loadPic("96.alg", frontSurface, 1); + loadPic(96, frontSurface); openDoor(7, 2); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index f434d9d0e5..d069880727 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -151,34 +151,33 @@ int DrasculaEngine::go() { withVoices = 0; selectionMade = 0; - if (currentChapter != 6) { - loadPic("95.alg", tableSurface, 1); - } + if (currentChapter != 6) + loadPic(95, tableSurface); if (currentChapter == 1) { - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(99, backSurface); + loadPic(97, extraSurface); } else if (currentChapter == 2) { - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("pts.alg", drawSurface2, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic("pts.alg", drawSurface2); } else if (currentChapter == 3) { loadPic("aux13.alg", drawSurface1, COMPLETE_PAL); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); } else if (currentChapter == 4) { - loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic(96, frontSurface, COMPLETE_PAL); if (hay_que_load == 0) animation_rayo(); - loadPic("96.alg", frontSurface, 1); + loadPic(96, frontSurface); clearRoom(); - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); + loadPic(99, backSurface); + loadPic(97, extraSurface); } else if (currentChapter == 5) { - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(97, extraSurface); + loadPic(99, backSurface); } else if (currentChapter == 6) { igorX = 105, igorY = 85, trackIgor = 1; x_dr = 62, y_dr = 99, trackDrascula = 1; @@ -187,10 +186,10 @@ int DrasculaEngine::go() { pendulumSurface = drawSurface3; - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("95.alg", tableSurface, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(99, backSurface); + loadPic(97, extraSurface); + loadPic(95, tableSurface); } memset(iconName, 0, sizeof(iconName)); @@ -199,10 +198,10 @@ int DrasculaEngine::go() { assignDefaultPalette(); if (!escoba()) { - releaseGame(); + quitGame(); break; } - releaseGame(); + quitGame(); if (currentChapter == 6) break; @@ -212,7 +211,7 @@ int DrasculaEngine::go() { return 0; } -void DrasculaEngine::releaseGame() { +void DrasculaEngine::quitGame() { if (hay_sb == 1) stopSound(); clearRoom(); @@ -445,7 +444,7 @@ bool DrasculaEngine::escoba() { animation_1_1(); withoutVerb(); - loadPic("2aux62.alg", drawSurface2, 1); + loadPic("2aux62.alg", drawSurface2); trackProtagonist = 1; objExit = 104; if (hay_que_load != 0) { @@ -535,7 +534,7 @@ bool DrasculaEngine::escoba() { if (!loadGame(saveName)) { return true; } - loadPic("auxdr.alg", drawSurface2, 1); + loadPic("auxdr.alg", drawSurface2); } } @@ -577,9 +576,9 @@ bool DrasculaEngine::escoba() { if (button_dch == 1 && menuScreen == 1) { delay(100); if (currentChapter == 2) - loadPic(menuBackground, backSurface, 1); + loadPic(menuBackground, backSurface); else - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); setPalette((byte *)&gamePalette); menuScreen = 0; updateEvents(); @@ -592,13 +591,13 @@ bool DrasculaEngine::escoba() { if (trackProtagonist == 2) trackProtagonist = 1; if (currentChapter == 4) - loadPic("icons2.alg", backSurface, 1); + loadPic("icons2.alg", backSurface); else if (currentChapter == 5) - loadPic("icons3.alg", backSurface, 1); + loadPic("icons3.alg", backSurface); else if (currentChapter == 6) - loadPic("iconsp.alg", backSurface, 1); + loadPic("iconsp.alg", backSurface); else - loadPic("icons.alg", backSurface, 1); + loadPic("icons.alg", backSurface); menuScreen = 1; updateEvents(); withoutVerb(); @@ -697,18 +696,18 @@ bool DrasculaEngine::escoba() { void DrasculaEngine::pickObject(int objeto) { if (currentChapter == 6) - loadPic("iconsp.alg", backSurface, 1); + loadPic("iconsp.alg", backSurface); else if (currentChapter == 4) - loadPic("icons2.alg", backSurface, 1); + loadPic("icons2.alg", backSurface); else if (currentChapter == 5) - loadPic("icons3.alg", backSurface, 1); + loadPic("icons3.alg", backSurface); else - loadPic("icons.alg", backSurface, 1); + loadPic("icons.alg", backSurface); chooseObject(objeto); if (currentChapter == 2) - loadPic(menuBackground, backSurface, 1); + loadPic(menuBackground, backSurface); else - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); } void DrasculaEngine::chooseObject(int objeto) { @@ -797,6 +796,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { char pant1[20], pant2[20], pant3[20], pant4[20]; char para_codificar[20]; char buffer[256]; + int palLevel = 0; hasName = 0; @@ -812,7 +812,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { getIntFromLine(buffer, size, &roomNumber); getIntFromLine(buffer, size, &roomMusic); getStringFromLine(buffer, size, roomDisk); - getIntFromLine(buffer, size, &nivel_osc); + getIntFromLine(buffer, size, &palLevel); if (currentChapter == 2) getIntFromLine(buffer, size, &martin); @@ -868,9 +868,9 @@ void DrasculaEngine::enterRoom(int roomIndex) { _arj.close(); if (currentChapter == 2 && martin != 0) { - loadPic(pant2, extraSurface, 1); - loadPic(pant1, frontSurface, 1); - loadPic(pant4, backSurface, 1); + loadPic(pant2, extraSurface); + loadPic(pant1, frontSurface); + loadPic(pant4, backSurface); } if (currentChapter == 2) { @@ -880,9 +880,9 @@ void DrasculaEngine::enterRoom(int roomIndex) { curHeight = CHARACTER_HEIGHT; curWidth = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; - loadPic("97.alg", extraSurface, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(97, extraSurface); + loadPic(96, frontSurface); + loadPic(99, backSurface); strcpy(menuBackground, "99.alg"); } @@ -900,7 +900,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { } characterMoved = 0; } - loadPic(roomDisk, drawSurface3, 1); + loadPic(roomDisk, drawSurface3); char rm[20]; sprintf(rm, "%i.alg", roomNumber); @@ -909,11 +909,11 @@ void DrasculaEngine::enterRoom(int roomIndex) { copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); setDefaultPalette(); - if (nivel_osc != 0) - setPaletteBase(nivel_osc); + if (palLevel != 0) + setPaletteBase(palLevel); assignBrightPalette(); setDefaultPalette(); - setPaletteBase(nivel_osc + 2); + setPaletteBase(palLevel + 2); assignDarkPalette(); setBrightPalette(); @@ -1240,7 +1240,7 @@ void DrasculaEngine::updateEvents() { break; case Common::EVENT_QUIT: // TODO - releaseGame(); + quitGame(); exit(0); break; default: @@ -3153,7 +3153,7 @@ void DrasculaEngine::converse(const char *fileName) { if (phrase4[h] == (char)0xa7) phrase4[h] = ' '; - loadPic("car.alg", backSurface, 1); + loadPic("car.alg", backSurface); // TODO code here should limit y position for mouse in dialog menu, // but we can't implement this due lack backend functionality // from 1(top) to 31 @@ -3251,9 +3251,9 @@ void DrasculaEngine::converse(const char *fileName) { } // while (breakOut == 0) if (currentChapter == 2) - loadPic(menuBackground, backSurface, 1); + loadPic(menuBackground, backSurface); else - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); if (currentChapter != 5) withoutVerb(); } @@ -3644,10 +3644,10 @@ void DrasculaEngine::activatePendulum() { flags[1] = 2; hare_se_ve = 0; roomNumber = 102; - loadPic("102.alg", drawSurface1, HALF_PAL); - loadPic("an_p1.alg", drawSurface3, 1); - loadPic("an_p2.alg", extraSurface, 1); - loadPic("an_p3.alg", frontSurface, 1); + loadPic(102, drawSurface1, HALF_PAL); + loadPic("an_p1.alg", drawSurface3); + loadPic("an_p2.alg", extraSurface); + loadPic("an_p3.alg", frontSurface); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 7034fad43b..600b80d4be 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -176,9 +176,15 @@ public: void allocMemory(); void freeMemory(); - void releaseGame(); + void quitGame(); - void loadPic(const char *NamePcc, byte *targetSurface, int colorCount); + void loadPic(int roomNum, byte *targetSurface, int colorCount = 1) { + char rm[20]; + sprintf(rm, "%i.alg", roomNum); + loadPic(rm, targetSurface, colorCount); + } + + void loadPic(const char *NamePcc, byte *targetSurface, int colorCount = 1); void decompressPic(byte *targetSurface, int colorCount); typedef char DacPalette256[256][3]; @@ -230,7 +236,7 @@ public: Common::ArjFile _arj; int hay_sb; - int nivel_osc, previousMusic, roomMusic; + int previousMusic, roomMusic; int roomNumber; char roomDisk[20]; char currentData[20]; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index b52979a0de..647917148a 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -897,9 +897,9 @@ void DrasculaEngine::room_59(int fl) { hare_se_ve = 1; clearRoom(); loadPic("tlef0.alg", drawSurface1, COMPLETE_PAL); - loadPic("tlef1.alg", drawSurface3, 1); - loadPic("tlef2.alg", frontSurface, 1); - loadPic("tlef3.alg", backSurface, 1); + loadPic("tlef1.alg", drawSurface3); + loadPic("tlef2.alg", frontSurface); + loadPic("tlef3.alg", backSurface); talk_htel(240); color_abc(kColorBrown); @@ -917,10 +917,10 @@ void DrasculaEngine::room_59(int fl) { color_abc(kColorBrown); talk_solo(_textvb[_lang][62], "VB62.als"); clearRoom(); - loadPic("aux59.alg", drawSurface3, 1); - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("99.alg", backSurface, 1); - loadPic("59.alg", drawSurface1, HALF_PAL); + loadPic("aux59.alg", drawSurface3); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(99, backSurface); + loadPic(59, drawSurface1, HALF_PAL); trackProtagonist = 3; talk(245); withoutVerb(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index c3861524d4..c273c5c5a9 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -510,9 +510,8 @@ void DrasculaEngine::talk_drunk(int index) { int face; int length = strlen(said); - if (currentChapter == 1) { - loadPic("an11y13.alg", frontSurface, 1); - } + if (currentChapter == 1) + loadPic("an11y13.alg", frontSurface); flags[13] = 1; @@ -548,9 +547,8 @@ void DrasculaEngine::talk_drunk(int index) { updateScreen(); flags[13] = 0; - if (currentChapter == 1) { - loadPic("96.alg", frontSurface, 1); - } + if (currentChapter == 1) + loadPic("96.alg", frontSurface); if (currentChapter == 1) { if (musicStatus() == 0 && flags[11] == 0) |