[Scummvm-cvs-logs] SF.net SVN: scummvm: [32398] scummvm/trunk/engines/drascula
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri May 30 16:25:04 CEST 2008
Revision: 32398
http://scummvm.svn.sourceforge.net/scummvm/?rev=32398&view=rev
Author: thebluegr
Date: 2008-05-30 07:25:03 -0700 (Fri, 30 May 2008)
Log Message:
-----------
- Merged loadPic and decompressPic
- talk_pianista -> talk_pianist
- Wrapped up talk_pianist, talk_wolf, talk_htel and talk_mus
- Did some cleanup in room logic
Modified Paths:
--------------
scummvm/trunk/engines/drascula/animation.cpp
scummvm/trunk/engines/drascula/drascula.cpp
scummvm/trunk/engines/drascula/drascula.h
scummvm/trunk/engines/drascula/rooms.cpp
scummvm/trunk/engines/drascula/talk.cpp
Modified: scummvm/trunk/engines/drascula/animation.cpp
===================================================================
--- scummvm/trunk/engines/drascula/animation.cpp 2008-05-30 13:10:52 UTC (rev 32397)
+++ scummvm/trunk/engines/drascula/animation.cpp 2008-05-30 14:25:03 UTC (rev 32398)
@@ -76,8 +76,7 @@
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
clearRoom();
- loadPic("cielo.alg");
- decompressPic(screenSurface, 256);
+ loadAndDecompressPic("cielo.alg", screenSurface, COMPLETE_PAL);
black();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
fadeFromBlack(2);
@@ -111,8 +110,7 @@
stopSound_corte();
if (animate("scr3.bin", 17))
break;
- loadPic("cielo2.alg");
- decompressPic(screenSurface, 256);
+ loadAndDecompressPic("cielo2.alg", screenSurface, COMPLETE_PAL);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
@@ -121,14 +119,10 @@
break;
clearRoom();
- loadPic("96.alg");
- decompressPic(frontSurface, COMPLETE_PAL);
- loadPic("103.alg");
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("104.alg");
- decompressPic(drawSurface3, 1);
- loadPic("aux104.alg");
- decompressPic(drawSurface2, 1);
+ loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
+ loadAndDecompressPic("103.alg", drawSurface1, HALF_PAL);
+ loadAndDecompressPic("104.alg", drawSurface3, 1);
+ loadAndDecompressPic("aux104.alg", drawSurface2, 1);
playMusic(4);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
@@ -188,12 +182,9 @@
clearRoom();
- loadPic("100.alg");
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("auxigor.alg");
- decompressPic(frontSurface, 1);
- loadPic("auxdr.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("100.alg", drawSurface1, HALF_PAL);
+ loadAndDecompressPic("auxigor.alg", frontSurface, 1);
+ loadAndDecompressPic("auxdr.alg", backSurface, 1);
sentido_dr = 0;
x_dr = 129;
y_dr = 95;
@@ -224,15 +215,13 @@
break;
clearRoom();
color_solo = kColorRed;
- loadPic("plan1.alg");
- decompressPic(screenSurface, HALF_PAL);
+ loadAndDecompressPic("plan1.alg", screenSurface, HALF_PAL);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
pause(10);
talk_solo(_textd[_lang][4],"d4.als");
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- loadPic("plan1.alg");
- decompressPic(screenSurface, HALF_PAL);
+ loadAndDecompressPic("plan1.alg", screenSurface, HALF_PAL);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
talk_solo(_textd[_lang][5], "d5.als");
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
@@ -240,8 +229,7 @@
if (animate("lib2.bin", 16))
break;
clearRoom();
- loadPic("plan2.alg");
- decompressPic(screenSurface, HALF_PAL);
+ loadAndDecompressPic("plan2.alg", screenSurface, HALF_PAL);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
pause(20);
talk_solo(_textd[_lang][6], "d6.als");
@@ -250,8 +238,7 @@
if (animate("lib2.bin", 16))
break;
clearRoom();
- loadPic("plan3.alg");
- decompressPic(screenSurface, HALF_PAL);
+ loadAndDecompressPic("plan3.alg", screenSurface, HALF_PAL);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
pause(20);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
@@ -259,15 +246,13 @@
talk_solo(_textd[_lang][7], "d7.als");
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- loadPic("plan3.alg");
- decompressPic(screenSurface, HALF_PAL);
+ loadAndDecompressPic("plan3.alg", screenSurface, HALF_PAL);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
talk_solo(_textd[_lang][8], "d8.als");
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
clearRoom();
- loadPic("100.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("100.alg", drawSurface1, HALF_PAL);
MusicFadeout();
stopMusic();
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
@@ -392,10 +377,8 @@
term_int = 1;
}
clearRoom();
- loadPic("96.alg");
- decompressPic(frontSurface, COMPLETE_PAL);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
+ loadAndDecompressPic("99.alg", backSurface, 1);
}
void DrasculaEngine::animation_2_1() {
@@ -416,8 +399,7 @@
if (_lang == kSpanish)
textSurface = frontSurface;
- loadPic("an11y13.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an11y13.alg", extraSurface, 1);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
@@ -428,8 +410,7 @@
if (_lang == kSpanish)
textSurface = extraSurface;
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
@@ -453,8 +434,7 @@
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
clearRoom();
- loadPic("bj.alg");
- decompressPic(screenSurface, HALF_PAL);
+ loadAndDecompressPic("bj.alg", screenSurface, HALF_PAL);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
black();
@@ -468,12 +448,10 @@
break;
clearRoom();
- loadPic("16.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("16.alg", drawSurface1, HALF_PAL);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- loadPic("auxbj.alg");
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic("auxbj.alg", drawSurface3, 1);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
@@ -493,8 +471,7 @@
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- loadPic("97g.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("97g.alg", extraSurface, 1);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
@@ -530,12 +507,9 @@
if (animate("bjb.bin", 14))
break;
playMusic(9);
- loadPic("97.alg");
+ loadAndDecompressPic("97.alg", extraSurface, 1);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- decompressPic(extraSurface, 1);
- if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
- break;
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
@@ -620,8 +594,7 @@
if (_lang == kSpanish)
textSurface = frontSurface;
- loadPic("an11y13.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an11y13.alg", extraSurface, 1);
talk(192);
talk_tabernero(1);
@@ -649,16 +622,14 @@
if (_lang == kSpanish)
textSurface = extraSurface;
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
}
void DrasculaEngine::animation_4_1() {
if (_lang == kSpanish)
textSurface = frontSurface;
- loadPic("an12.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an12.alg", extraSurface, 1);
talk(205);
@@ -680,21 +651,20 @@
stopMusic();
flags[11] = 1;
- talk_pianista(_textp[_lang][1], "p1.als");
+ talk_pianist(_textp[_lang][1], "p1.als");
talk(206);
- talk_pianista(_textp[_lang][2], "p2.als");
+ talk_pianist(_textp[_lang][2], "p2.als");
talk(207);
- talk_pianista(_textp[_lang][3], "p3.als");
+ talk_pianist(_textp[_lang][3], "p3.als");
talk(208);
- talk_pianista(_textp[_lang][4], "p4.als");
+ talk_pianist(_textp[_lang][4], "p4.als");
talk(209);
if (_lang == kSpanish)
textSurface = extraSurface;
flags[11] = 0;
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
}
void DrasculaEngine::animation_1_2() {
@@ -708,10 +678,8 @@
pon_hare();
updateRefresh();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
- loadPic("an2_1.alg");
- decompressPic(frontSurface, 1);
- loadPic("an2_2.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an2_1.alg", frontSurface, 1);
+ loadAndDecompressPic("an2_2.alg", extraSurface, 1);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface);
@@ -754,16 +722,11 @@
pause(8);
clearRoom();
- loadPic("ciego1.alg"); // ciego = blind
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("ciego2.alg");
- decompressPic(drawSurface3, 1);
- loadPic("ciego3.alg");
- decompressPic(extraSurface, 1);
- loadPic("ciego4.alg");
- decompressPic(backSurface, 1);
- loadPic("ciego5.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind
+ loadAndDecompressPic("ciego2.alg", drawSurface3, 1);
+ loadAndDecompressPic("ciego3.alg", extraSurface, 1);
+ loadAndDecompressPic("ciego4.alg", backSurface, 1);
+ loadAndDecompressPic("ciego5.alg", frontSurface, 1);
if (_lang == kSpanish)
textSurface = frontSurface;
@@ -806,16 +769,11 @@
clearRoom();
playMusic(roomMusic);
- loadPic("9.alg");
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("aux9.alg");
- decompressPic(drawSurface3, 1);
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("9.alg", drawSurface1, HALF_PAL);
+ loadAndDecompressPic("aux9.alg", drawSurface3, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
withoutVerb();
if (_lang == kSpanish)
@@ -826,38 +784,36 @@
}
void DrasculaEngine::animation_8_2() {
- talk_pianista(_textp[_lang][6], "P6.als");
+ talk_pianist(6);
talk(358);
- talk_pianista(_textp[_lang][7], "P7.als");
- talk_pianista(_textp[_lang][8], "P8.als");
+ talk_pianist(7);
+ talk_pianist(8);
}
void DrasculaEngine::animation_9_2() {
- talk_pianista(_textp[_lang][9], "P9.als");
- talk_pianista(_textp[_lang][10], "P10.als");
- talk_pianista(_textp[_lang][11], "P11.als");
+ talk_pianist(9);
+ talk_pianist(10);
+ talk_pianist(11);
}
void DrasculaEngine::animation_10_2() {
- talk_pianista(_textp[_lang][12], "P12.als");
+ talk_pianist(12);
talk(361);
pause(40);
- talk_pianista(_textp[_lang][13], "P13.als");
+ talk_pianist(13);
talk(362);
- talk_pianista(_textp[_lang][14], "P14.als");
+ talk_pianist(14);
talk(363);
- talk_pianista(_textp[_lang][15], "P15.als");
+ talk_pianist(15);
talk(364);
- talk_pianista(_textp[_lang][16], "P16.als");
+ talk_pianist(16);
}
void DrasculaEngine::animation_14_2() {
int n, pos_cabina[6];
int l = 0;
- loadPic("an14_2.alg");
- decompressPic(backSurface, 1);
- loadPic("an14_1.alg");
+ loadAndDecompressPic("an14_2.alg", backSurface, 1);
pos_cabina[0] = 150;
pos_cabina[1] = 6;
@@ -887,8 +843,7 @@
stopSound();
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
}
void DrasculaEngine::animation_15_2() {
@@ -919,8 +874,7 @@
if (_lang != kSpanish)
color_abc(kColorDarkGreen);
- loadPic("his1.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("his1.alg", drawSurface1, HALF_PAL);
if (_lang == kSpanish)
black();
@@ -954,8 +908,7 @@
goto asco;
clearRoom();
- loadPic("his2.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("his2.alg", drawSurface1, HALF_PAL);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
if (_lang != kSpanish)
@@ -981,8 +934,7 @@
goto asco;
clearRoom();
- loadPic("his3.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("his3.alg", drawSurface1, HALF_PAL);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
if (_lang != kSpanish)
@@ -1005,10 +957,8 @@
fadeToBlack(1);
clearRoom();
- loadPic("his4_1.alg");
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("his4_2.alg");
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic("his4_1.alg", drawSurface1, HALF_PAL);
+ loadAndDecompressPic("his4_2.alg", drawSurface3, 1);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface3, screenSurface);
@@ -1043,12 +993,10 @@
clearRoom();
asco:
- loadPic(roomDisk);
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic(roomDisk, drawSurface3, 1);
char rm[20];
sprintf(rm, "%i.alg", roomNumber);
- loadPic(rm);
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic(rm, drawSurface1, HALF_PAL);
black();
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
@@ -1104,8 +1052,7 @@
}
void DrasculaEngine::animation_23_2() {
- loadPic("an24.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("an24.alg", frontSurface, 1);
flags[21] = 1;
@@ -1166,8 +1113,7 @@
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");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("an23.alg", backSurface, 1);
for (n = 0; n < 34; n++) {
copyRect(p_x, p_y, p_x, p_y, 36, 74, drawSurface1, screenSurface);
@@ -1177,8 +1123,7 @@
pause(5);
}
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
}
void DrasculaEngine::animation_23_anexo2() {
@@ -1188,8 +1133,7 @@
pause(50);
- loadPic("an23_2.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("an23_2.alg", backSurface, 1);
for (n = 0; n < 14; n++) {
copyRect(p_x, p_y, p_x, p_y, 33, 71, drawSurface1, screenSurface);
@@ -1199,17 +1143,14 @@
pause(5);
}
- loadPic("99.alg");
- decompressPic(backSurface,1);
+ loadAndDecompressPic("99.alg", backSurface,1);
}
void DrasculaEngine::animation_25_2() {
int n, pos_cabina[6];
- loadPic("an14_2.alg");
- decompressPic(backSurface, 1);
- loadPic("18.alg");
- decompressPic(drawSurface1, 1);
+ loadAndDecompressPic("an14_2.alg", backSurface, 1);
+ loadAndDecompressPic("18.alg", drawSurface1, 1);
pos_cabina[0] = 150;
pos_cabina[1] = 6;
@@ -1239,8 +1180,7 @@
stopSound();
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
}
void DrasculaEngine::animation_27_2() {
@@ -1263,10 +1203,8 @@
}
void DrasculaEngine::animation_28_2() {
- talk_vb(27);
- talk_vb(28);
- talk_vb(29);
- talk_vb(30);
+ for(int i = 27; i <= 30; i++)
+ talk_vb(i);
}
void DrasculaEngine::animation_29_2() {
@@ -1310,8 +1248,7 @@
lleva_vb(-50);
pause(15);
lleva_al_hare(159, 140);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
sentido_hare = 2;
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
@@ -1360,10 +1297,8 @@
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
- loadPic("an35_1.alg");
- decompressPic(backSurface, 1);
- loadPic("an35_2.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("an35_1.alg", backSurface, 1);
+ loadAndDecompressPic("an35_2.alg", frontSurface, 1);
updateAnim(1, 70, 90, 46, 80, 6, backSurface);
updateAnim(82, 70, 90, 46, 80, 6, backSurface);
@@ -1405,12 +1340,9 @@
flags[0] = 0;
flags[1] = 1;
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
lleva_al_hare(332, 127);
}
@@ -1418,12 +1350,9 @@
void DrasculaEngine::animation_3_3() {
int px = hare_x - 20, py = hare_y - 1;
- loadPic("an2y_1.alg");
- decompressPic(frontSurface, 1);
- loadPic("an2y_2.alg");
- decompressPic(extraSurface, 1);
- loadPic("an2y_3.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("an2y_1.alg", frontSurface, 1);
+ loadAndDecompressPic("an2y_2.alg", extraSurface, 1);
+ loadAndDecompressPic("an2y_3.alg", backSurface, 1);
updateAnim2(2, px, py, 71, 72, 4, frontSurface);
updateAnim2(75, px, py, 71, 72, 4, frontSurface);
@@ -1436,12 +1365,9 @@
void DrasculaEngine::animation_4_3() {
int px = 120, py = 63;
- loadPic("any_1.alg");
- decompressPic(frontSurface, 1);
- loadPic("any_2.alg");
- decompressPic(extraSurface, 1);
- loadPic("any_3.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("any_1.alg", frontSurface, 1);
+ loadAndDecompressPic("any_2.alg", extraSurface, 1);
+ loadAndDecompressPic("any_3.alg", backSurface, 1);
updateAnim2(1, px, py, 77, 89, 4, frontSurface);
updateAnim2(91, px, py, 77, 89, 4, frontSurface);
@@ -1454,12 +1380,9 @@
void DrasculaEngine::animation_5_3() {
int px = hare_x - 20, py = hare_y - 1;
- loadPic("an3y_1.alg");
- decompressPic(frontSurface, 1);
- loadPic("an3y_2.alg");
- decompressPic(extraSurface, 1);
- loadPic("an3y_3.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("an3y_1.alg", frontSurface, 1);
+ loadAndDecompressPic("an3y_2.alg", extraSurface, 1);
+ loadAndDecompressPic("an3y_3.alg", backSurface, 1);
updateAnim2(2, px, py, 71, 72, 4, frontSurface);
updateAnim2(75, px, py, 71, 72, 4, frontSurface);
@@ -1481,8 +1404,7 @@
flags[1] = 0;
- loadPic("an4y.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("an4y.alg", frontSurface, 1);
for (frame = 0; frame < 6; frame++) {
pause(3);
@@ -1493,24 +1415,18 @@
flags[2] = 1;
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
}
void DrasculaEngine::animation_rayo() {
- loadPic("anr_1.alg");
- decompressPic(frontSurface, HALF_PAL);
- loadPic("anr_2.alg");
- decompressPic(extraSurface, 1);
- loadPic("anr_3.alg");
- decompressPic(backSurface, 1);
- loadPic("anr_4.alg");
- decompressPic(drawSurface1, 1);
- loadPic("anr_5.alg");
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic("anr_1.alg", frontSurface, HALF_PAL);
+ loadAndDecompressPic("anr_2.alg", extraSurface, 1);
+ loadAndDecompressPic("anr_3.alg", backSurface, 1);
+ loadAndDecompressPic("anr_4.alg", drawSurface1, 1);
+ loadAndDecompressPic("anr_5.alg", drawSurface3, 1);
updateScreen(0, 0, 0, 0, 320, 200, frontSurface);
@@ -1623,20 +1539,20 @@
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
talk(228);
- talk_wolf(_textl[_lang][1], "L1.als");
- talk_wolf(_textl[_lang][2], "L2.als");
+ talk_wolf(1);
+ talk_wolf(2);
pause(23);
talk(229);
- talk_wolf(_textl[_lang][3], "L3.als");
- talk_wolf(_textl[_lang][4], "L4.als");
+ talk_wolf(3);
+ talk_wolf(4);
talk(230);
- talk_wolf(_textl[_lang][5], "L5.als");
+ talk_wolf(5);
talk(231);
- talk_wolf(_textl[_lang][6], "L6.als");
- talk_wolf(_textl[_lang][7], "L7.als");
+ talk_wolf(6);
+ talk_wolf(7);
pause(33);
talk(232);
- talk_wolf(_textl[_lang][8], "L8.als");
+ talk_wolf(8);
}
void DrasculaEngine::animation_5_5(){
@@ -1655,10 +1571,8 @@
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
- loadPic("3an5_1.alg");
- decompressPic(backSurface, 1);
- loadPic("3an5_2.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("3an5_1.alg", backSurface, 1);
+ loadAndDecompressPic("3an5_2.alg", frontSurface, 1);
for (frame = 0; frame < 9; frame++) {
pause(3);
@@ -1681,19 +1595,15 @@
updateData();
pause(12);
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
for (h = 0; h < (200 - 18); h++)
copyBackground(0, 53, 0, h, 320, 19, frontSurface, screenSurface);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
- loadPic("101.alg");
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("3an5_3.alg");
- decompressPic(backSurface, 1);
- loadPic("3an5_4.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("101.alg", drawSurface1, HALF_PAL);
+ loadAndDecompressPic("3an5_3.alg", backSurface, 1);
+ loadAndDecompressPic("3an5_4.alg", extraSurface, 1);
updateScreen(0, 0, 0, 0, 320, 200, drawSurface1);
pause(9);
@@ -1712,36 +1622,33 @@
playSound(1);
stopSound();
- loadPic("99.alg");
- decompressPic(backSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
clearRoom();
- loadPic("49.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("49.alg", drawSurface1, HALF_PAL);
}
void DrasculaEngine::animation_6_5() {
- talk_wolf(_textl[_lang][9], "L9.als");
+ talk_wolf(9);
talk(234);
}
void DrasculaEngine::animation_7_5() {
- talk_wolf(_textl[_lang][10], "L10.als");
+ talk_wolf(10);
talk(236);
- talk_wolf(_textl[_lang][11], "L11.als");
- talk_wolf(_textl[_lang][12], "L12.als");
- talk_wolf(_textl[_lang][13], "L13.als");
+ talk_wolf(11);
+ talk_wolf(12);
+ talk_wolf(13);
pause(34);
- talk_wolf(_textl[_lang][14], "L14.als");
+ talk_wolf(14);
}
void DrasculaEngine::animation_8_5() {
- talk_wolf(_textl[_lang][15], "L15.als");
+ talk_wolf(15);
talk(238);
- talk_wolf(_textl[_lang][16], "L16.als");
+ talk_wolf(16);
}
void DrasculaEngine::animation_9_5() {
@@ -1819,8 +1726,7 @@
bgPalette3[color][component] = LimitaVGA(bgPalette3[color][component] - 8 + fundido);
}
- loadPic("3an11_1.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("3an11_1.alg", backSurface, 1);
for (frame = 0; frame < 8; frame++) {
if (frame == 2 || frame == 4 || frame == 8 || frame==10)
@@ -1865,8 +1771,7 @@
hiccup(12);
stopSound();
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
lleva_al_hare(40, 169);
lleva_al_hare(-14, 175);
@@ -1890,8 +1795,7 @@
int frus_y[] = {1, 1, 1, 1, 1, 1, 1, 89};
int pos_frusky[6];
- loadPic("auxfr.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("auxfr.alg", backSurface, 1);
pos_frusky[3] = 81;
pos_frusky[4] = 44;
@@ -1949,19 +1853,19 @@
}
void DrasculaEngine::animation_15_5() {
- talk_mus(_texte[_lang][4], "E4.als");
- talk_mus(_texte[_lang][5], "E5.als");
- talk_mus(_texte[_lang][6], "E6.als");
+ talk_mus(4);
+ talk_mus(5);
+ talk_mus(6);
talk(291);
- talk_mus(_texte[_lang][7], "E7.als");
+ talk_mus(7);
}
void DrasculaEngine::animation_16_5() {
- talk_mus(_texte[_lang][8], "E8.als");
+ talk_mus(8);
}
void DrasculaEngine::animation_17_5() {
- talk_mus(_texte[_lang][9], "E9.als");
+ talk_mus(9);
}
void DrasculaEngine::animation_1_6() {
@@ -1974,12 +1878,9 @@
for (l = 0; l < 200; l++)
factor_red[l] = 98;
- loadPic("auxig2.alg");
- decompressPic(frontSurface, 1);
- loadPic("auxdr.alg");
- decompressPic(drawSurface2, 1);
- loadPic("car.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("auxig2.alg", frontSurface, 1);
+ loadAndDecompressPic("auxdr.alg", drawSurface2, 1);
+ loadAndDecompressPic("car.alg", backSurface, 1);
talk_dr_dch(19);
talk(247);
talk_dr_dch(20);
@@ -2000,8 +1901,7 @@
talk_dr_dch(29);
fadeToBlack(1);
clearRoom();
- loadPic("time1.alg");
- decompressPic(screenSurface, 1);
+ loadAndDecompressPic("time1.alg", screenSurface, 1);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
delay(930);
clearRoom();
@@ -2016,8 +1916,7 @@
talk(257);
fadeToBlack(0);
clearRoom();
- loadPic("time1.alg");
- decompressPic(screenSurface,1);
+ loadAndDecompressPic("time1.alg", screenSurface,1);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
delay(900);
clearRoom();
@@ -2089,14 +1988,10 @@
clearRoom();
withoutVerb();
removeObject(20);
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic("97.alg");
- decompressPic(frontSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic("97.alg", frontSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
doBreak = 1;
objExit = 104;
hare_x = -1;
@@ -2137,8 +2032,7 @@
// Also check animation_2_1(), where the same hack was used
// by the original
roomNumber = -1;
- loadPic("nota2.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("nota2.alg", drawSurface1, HALF_PAL);
black();
sentido_hare = 1;
hare_x -= 21;
@@ -2152,8 +2046,7 @@
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
playMusic(9);
clearRoom();
- loadPic("nota.alg");
- decompressPic(drawSurface1, COMPLETE_PAL);
+ loadAndDecompressPic("nota.alg", drawSurface1, COMPLETE_PAL);
color_abc(kColorWhite);
talk_solo(_textbj[_lang][24], "bj24.als");
talk_solo(_textbj[_lang][25], "bj25.als");
@@ -2162,10 +2055,8 @@
talk_solo(_textbj[_lang][28], "bj28.als");
sentido_hare = 3;
clearRoom();
- loadPic("96.alg");
- decompressPic(frontSurface, COMPLETE_PAL);
- loadPic("nota2.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
+ loadAndDecompressPic("nota2.alg", drawSurface1, HALF_PAL);
talk(296);
talk(297);
talk(298);
@@ -2177,8 +2068,7 @@
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
color_abc(kColorLightGreen);
talk_solo("GOOOOOOOOOOOOOOOL", "s15.als");
- loadPic("nota2.alg");
- decompressPic(drawSurface1, 1);
+ loadAndDecompressPic("nota2.alg", drawSurface1, 1);
sentido_hare = 0;
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
@@ -2263,8 +2153,7 @@
if (_lang == kSpanish)
textSurface = frontSurface;
- loadPic("an12.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an12.alg", extraSurface, 1);
talk(356);
@@ -2286,23 +2175,21 @@
stopMusic();
flags[11] = 1;
- talk_pianista(_textp[_lang][5], "P5.als");
+ talk_pianist(5);
converse("op_1.cal");
if (_lang == kSpanish)
textSurface = extraSurface;
flags[11] = 0;
- loadPic("974.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("974.alg", extraSurface, 1);
}
void DrasculaEngine::animation_26_2() {
if (_lang == kSpanish)
textSurface = frontSurface;
- loadPic("an12.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an12.alg", extraSurface, 1);
talk(392);
@@ -2324,14 +2211,13 @@
stopMusic();
flags[11] = 1;
- talk_pianista(_textp[_lang][5], "P5.als");
+ talk_pianist(5);
talk(393);
- talk_pianista(_textp[_lang][17], "P17.als");
- talk_pianista(_textp[_lang][18], "P18.als");
- talk_pianista(_textp[_lang][19], "P19.als");
+ talk_pianist(17);
+ talk_pianist(18);
+ talk_pianist(19);
- loadPic("an26.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an26.alg", extraSurface, 1);
updateAnim(1, 225, 113, 50, 59, 6, extraSurface);
@@ -2358,8 +2244,7 @@
flags[11] = 0;
flags[39] = 1;
- loadPic("974.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("974.alg", extraSurface, 1);
roomMusic = 16;
}
@@ -2367,8 +2252,7 @@
if (_lang == kSpanish)
textSurface = frontSurface;
- loadPic("an11y13.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an11y13.alg", extraSurface, 1);
talk(352);
talk_tabernero(1);
@@ -2383,13 +2267,11 @@
if (_lang == kSpanish)
textSurface = extraSurface;
- loadPic("974.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("974.alg", extraSurface, 1);
}
void DrasculaEngine::animation_13_2() {
- loadPic("an11y13.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("an11y13.alg", frontSurface, 1);
if (flags[41] == 0) {
talk(103);
@@ -2405,8 +2287,7 @@
}
converse("op_2.cal");
- loadPic("964.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("964.alg", frontSurface, 1);
}
void DrasculaEngine::animation_18_2() {
@@ -2444,8 +2325,7 @@
talk(356);
- loadPic("an24.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("an24.alg", frontSurface, 1);
animation_32_2();
@@ -2466,10 +2346,8 @@
}
void DrasculaEngine::animation_32_2() {
- loadPic("an32_1.alg");
- decompressPic(drawSurface3, 1);
- loadPic("an32_2.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("an32_1.alg", drawSurface3, 1);
+ loadAndDecompressPic("an32_2.alg", backSurface, 1);
updateAnim(1, 113, 53, 65, 81, 4, drawSurface3, 4);
updateAnim(83, 113, 53, 65, 81, 4, drawSurface3, 4);
@@ -2485,8 +2363,7 @@
pause(4);
}
- loadPic("aux18.alg");
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic("aux18.alg", drawSurface3, 1);
}
void DrasculaEngine::animation_34_2() {
@@ -2494,10 +2371,8 @@
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
- loadPic("an34_1.alg");
- decompressPic(backSurface, 1);
- loadPic("an34_2.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an34_1.alg", backSurface, 1);
+ loadAndDecompressPic("an34_2.alg", extraSurface, 1);
updateAnim(1, 218, 79, 83, 75, 3, backSurface);
updateAnim(77, 218, 79, 83, 75, 3, backSurface);
@@ -2514,18 +2389,15 @@
updateScreen(218, 79, 218, 79, 83, 75, screenSurface);
pause(3);
- loadPic("994.alg");
- decompressPic(backSurface, 1);
- loadPic("974.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("994.alg", backSurface, 1);
+ loadAndDecompressPic("974.alg", extraSurface, 1);
}
void DrasculaEngine::animation_36_2() {
if (_lang == kSpanish)
textSurface = frontSurface;
- loadPic("an11y13.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an11y13.alg", extraSurface, 1);
talk(404);
talk_tabernero(19);
@@ -2538,17 +2410,13 @@
if (_lang == kSpanish)
textSurface = extraSurface;
- loadPic("974.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("974.alg", extraSurface, 1);
}
void DrasculaEngine::animation_7_2() {
- loadPic("an7_1.alg");
- decompressPic(backSurface, 1);
- loadPic("an7_2.alg");
- decompressPic(extraSurface, 1);
- loadPic("an7_3.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("an7_1.alg", backSurface, 1);
+ loadAndDecompressPic("an7_2.alg", extraSurface, 1);
+ loadAndDecompressPic("an7_3.alg", frontSurface, 1);
if (flags[3] == 1)
copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, drawSurface1);
@@ -2563,14 +2431,10 @@
updateAnim2(75, 80, 64, 51, 73, 6, extraSurface);
updateAnim2(1, 80, 64, 51, 73, 6, frontSurface);
- loadPic("an7_4.alg");
- decompressPic(backSurface, 1);
- loadPic("an7_5.alg");
- decompressPic(extraSurface, 1);
- loadPic("an7_6.alg");
- decompressPic(frontSurface, 1);
- loadPic("an7_7.alg");
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic("an7_4.alg", backSurface, 1);
+ loadAndDecompressPic("an7_5.alg", extraSurface, 1);
+ loadAndDecompressPic("an7_6.alg", frontSurface, 1);
+ loadAndDecompressPic("an7_7.alg", drawSurface3, 1);
updateAnim2(1, 80, 64, 51, 73, 6, backSurface);
updateAnim2(75, 80, 64, 51, 73, 6, backSurface);
@@ -2583,10 +2447,8 @@
updateAnim2(1, 80, 64, 51, 73, 6, drawSurface3);
updateAnim2(75, 80, 64, 51, 73, 2, drawSurface3);
- loadPic("an7_8.alg");
- decompressPic(backSurface, 1);
- loadPic("an7_9.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("an7_8.alg", backSurface, 1);
+ loadAndDecompressPic("an7_9.alg", extraSurface, 1);
updateAnim2(1, 80, 64, 51, 73, 6, backSurface);
updateAnim2(75, 80, 64, 51, 73, 6, backSurface);
@@ -2601,14 +2463,10 @@
if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1)
flags[38] = 1;
- loadPic("99.alg");
- decompressPic(backSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic("aux3.alg");
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic("aux3.alg", drawSurface3, 1);
}
void DrasculaEngine::animation_5_2() {
@@ -2616,14 +2474,10 @@
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
- loadPic("an5_1.alg");
- decompressPic(backSurface, 1);
- loadPic("an5_2.alg");
- decompressPic(extraSurface, 1);
- loadPic("an5_3.alg");
- decompressPic(frontSurface, 1);
- loadPic("an5_4.alg");
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic("an5_1.alg", backSurface, 1);
+ loadAndDecompressPic("an5_2.alg", extraSurface, 1);
+ loadAndDecompressPic("an5_3.alg", frontSurface, 1);
+ loadAndDecompressPic("an5_4.alg", drawSurface3, 1);
copyBackground(1, 1, 213, 66, 53,84, backSurface, screenSurface);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
@@ -2643,14 +2497,10 @@
updateAnim(1, 213, 66, 53, 84, 6, drawSurface3);
- loadPic("994.alg");
- decompressPic(backSurface, 1);
- loadPic("974.alg");
- decompressPic(extraSurface, 1);
- loadPic("964.alg");
- decompressPic(frontSurface, 1);
- loadPic("aux5.alg");
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic("994.alg", backSurface, 1);
+ loadAndDecompressPic("974.alg", extraSurface, 1);
+ loadAndDecompressPic("964.alg", frontSurface, 1);
+ loadAndDecompressPic("aux5.alg", drawSurface3, 1);
flags[8] = 1;
hare_x = hare_x - 4;
talk_sinc(_text[_lang][46], "46.als", "4442444244244");
@@ -2665,16 +2515,11 @@
textSurface = frontSurface;
clearRoom();
- loadPic("ciego1.alg"); // ciego = blind
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("ciego2.alg");
- decompressPic(drawSurface3, 1);
- loadPic("ciego3.alg");
- decompressPic(extraSurface, 1);
- loadPic("ciego4.alg");
- decompressPic(backSurface, 1);
- loadPic("ciego5.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind
+ loadAndDecompressPic("ciego2.alg", drawSurface3, 1);
+ loadAndDecompressPic("ciego3.alg", extraSurface, 1);
+ loadAndDecompressPic("ciego4.alg", backSurface, 1);
+ loadAndDecompressPic("ciego5.alg", frontSurface, 1);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
@@ -2696,16 +2541,11 @@
clearRoom();
playMusic(roomMusic);
- loadPic("9.alg");
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("aux9.alg");
- decompressPic(drawSurface3, 1);
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("9.alg", drawSurface1, HALF_PAL);
+ loadAndDecompressPic("aux9.alg", drawSurface3, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
withoutVerb();
if (_lang == kSpanish)
@@ -2723,16 +2563,11 @@
pause(8);
clearRoom();
- loadPic("ciego1.alg"); // ciego = blind
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("ciego2.alg");
- decompressPic(drawSurface3, 1);
- loadPic("ciego3.alg");
- decompressPic(extraSurface, 1);
- loadPic("ciego4.alg");
- decompressPic(backSurface, 1);
- loadPic("ciego5.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind
+ loadAndDecompressPic("ciego2.alg", drawSurface3, 1);
+ loadAndDecompressPic("ciego3.alg", extraSurface, 1);
+ loadAndDecompressPic("ciego4.alg", backSurface, 1);
+ loadAndDecompressPic("ciego5.alg", frontSurface, 1);
if (_lang == kSpanish)
textSurface = frontSurface;
@@ -2758,16 +2593,11 @@
clearRoom();
playMusic(roomMusic);
- loadPic("9.alg");
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("aux9.alg");
- decompressPic(drawSurface3, 1);
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("9.alg", drawSurface1, HALF_PAL);
+ loadAndDecompressPic("aux9.alg", drawSurface3, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
withoutVerb();
if (_lang == kSpanish)
@@ -2835,8 +2665,7 @@
void DrasculaEngine::animation_5_4(){
sentido_hare = 3;
- loadPic("anh_dr.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("anh_dr.alg", backSurface, 1);
lleva_al_hare(99, 160);
lleva_al_hare(38, 177);
hare_se_ve = 0;
@@ -2850,16 +2679,13 @@
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
openDoor(2, 0);
- loadPic("auxigor.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("auxigor.alg", frontSurface, 1);
x_igor = 100;
y_igor = 65;
talk_igor_front(29);
talk_igor_front(30);
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
hare_se_ve = 1;
fadeToBlack(0);
exitRoom(0);
@@ -2870,12 +2696,9 @@
roomNumber = 26;
clearRoom();
- loadPic("26.alg");
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("aux26.alg");
- decompressPic(drawSurface3, 1);
- loadPic("auxigor.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("26.alg", drawSurface1, HALF_PAL);
+ loadAndDecompressPic("aux26.alg", drawSurface3, 1);
+ loadAndDecompressPic("auxigor.alg", frontSurface, 1);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
update_26_pre();
x_igor = 104;
@@ -2886,14 +2709,11 @@
talk_igor_front(26);
roomNumber = prevRoom;
clearRoom();
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic(roomDisk);
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic(roomDisk, drawSurface3, 1);
char rm[20];
sprintf(rm, "%i.alg", roomNumber);
- loadPic(rm);
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic(rm, drawSurface1, HALF_PAL);
withoutVerb();
updateRoom();
}
@@ -2903,8 +2723,7 @@
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");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("an_8.alg", frontSurface, 1);
for (frame = 0; frame < 14; frame++) {
pause(2);
@@ -2912,8 +2731,7 @@
updateScreen(77, 45, 77, 45, 73, 72, screenSurface);
}
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
openDoor(7, 2);
}
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2008-05-30 13:10:52 UTC (rev 32397)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2008-05-30 14:25:03 UTC (rev 32398)
@@ -201,50 +201,33 @@
hay_seleccion = 0;
if (num_ejec != 6) {
- loadPic("95.alg");
- decompressPic(tableSurface, 1);
+ loadAndDecompressPic("95.alg", tableSurface, 1);
}
if (num_ejec == 1) {
- loadPic("96.alg");
- decompressPic(frontSurface, COMPLETE_PAL);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
+ loadAndDecompressPic("99.alg", backSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
} else if (num_ejec == 2) {
- loadPic("96.alg");
- decompressPic(frontSurface, COMPLETE_PAL);
- loadPic("pts.alg");
- decompressPic(drawSurface2, 1);
+ loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
+ loadAndDecompressPic("pts.alg", drawSurface2, 1);
} else if (num_ejec == 3) {
- loadPic("aux13.alg");
- decompressPic(drawSurface1, COMPLETE_PAL);
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("aux13.alg", drawSurface1, COMPLETE_PAL);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
} else if (num_ejec == 4) {
- loadPic("96.alg");
- decompressPic(frontSurface, COMPLETE_PAL);
+ loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
if (hay_que_load == 0)
animation_rayo();
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
clearRoom();
- loadPic("99.alg");
- decompressPic(backSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
} else if (num_ejec == 5) {
- loadPic("96.alg");
- decompressPic(frontSurface, COMPLETE_PAL);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
} else if (num_ejec == 6) {
x_igor = 105, y_igor = 85, sentido_igor = 1;
x_dr = 62, y_dr = 99, sentido_dr = 1;
@@ -253,15 +236,10 @@
pendulumSurface = drawSurface3;
- loadPic("96.alg");
- decompressPic(frontSurface, COMPLETE_PAL);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
-
- loadPic("95.alg");
- decompressPic(tableSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
+ loadAndDecompressPic("99.alg", backSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("95.alg", tableSurface, 1);
}
memset(iconName, 0, sizeof(iconName));
@@ -537,8 +515,7 @@
animation_1_1();
withoutVerb();
- loadPic("2aux62.alg");
- decompressPic(drawSurface2, 1);
+ loadAndDecompressPic("2aux62.alg", drawSurface2, 1);
sentido_hare = 1;
objExit = 104;
if (hay_que_load != 0) {
@@ -628,8 +605,7 @@
if (!para_cargar(saveName)) {
return true;
}
- loadPic("auxdr.alg");
- decompressPic(drawSurface2, 1);
+ loadAndDecompressPic("auxdr.alg", drawSurface2, 1);
}
}
@@ -671,10 +647,9 @@
if (button_dch == 1 && menuScreen == 1) {
delay(100);
if (num_ejec == 2)
- loadPic(menuBackground);
+ loadAndDecompressPic(menuBackground, backSurface, 1);
else
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
setPalette((byte *)&gamePalette);
menuScreen = 0;
updateEvents();
@@ -687,14 +662,13 @@
if (sentido_hare == 2)
sentido_hare = 1;
if (num_ejec == 4)
- loadPic("icons2.alg");
+ loadAndDecompressPic("icons2.alg", backSurface, 1);
else if (num_ejec == 5)
- loadPic("icons3.alg");
+ loadAndDecompressPic("icons3.alg", backSurface, 1);
else if (num_ejec == 6)
- loadPic("iconsp.alg");
+ loadAndDecompressPic("iconsp.alg", backSurface, 1);
else
- loadPic("icons.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("icons.alg", backSurface, 1);
menuScreen = 1;
updateEvents();
withoutVerb();
@@ -782,8 +756,7 @@
if (num_ejec != 3)
cont_sv = 0;
} else if (num_ejec == 6 && key == Common::KEYCODE_0 && roomNumber == 61) {
- loadPic("alcbar.alg");
- decompressPic(drawSurface1, 255);
+ loadAndDecompressPic("alcbar.alg", drawSurface1, 255);
} else if (cont_sv == 1500) {
screenSaver();
if (num_ejec != 3)
@@ -797,20 +770,18 @@
void DrasculaEngine::pickObject(int objeto) {
if (num_ejec == 6)
- loadPic("iconsp.alg");
+ loadAndDecompressPic("iconsp.alg", backSurface, 1);
else if (num_ejec == 4)
- loadPic("icons2.alg");
+ loadAndDecompressPic("icons2.alg", backSurface, 1);
else if (num_ejec == 5)
- loadPic("icons3.alg");
+ loadAndDecompressPic("icons3.alg", backSurface, 1);
else
- loadPic("icons.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("icons.alg", backSurface, 1);
chooseObject(objeto);
if (num_ejec == 2)
- loadPic(menuBackground);
+ loadAndDecompressPic(menuBackground, backSurface, 1);
else
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
}
void DrasculaEngine::chooseObject(int objeto) {
@@ -950,12 +921,9 @@
getLine(ald, buffer, size);
sscanf(buffer, "%s",pant4);
- loadPic(pant2);
- decompressPic(extraSurface, 1);
- loadPic(pant1);
- decompressPic(frontSurface, 1);
- loadPic(pant4);
- decompressPic(backSurface, 1);
+ loadAndDecompressPic(pant2, extraSurface, 1);
+ loadAndDecompressPic(pant1, frontSurface, 1);
+ loadAndDecompressPic(pant4, backSurface, 1);
strcpy(menuBackground, pant4);
}
@@ -1026,12 +994,9 @@
alto_hare = CHARACTER_HEIGHT;
ancho_hare = CHARACTER_WIDTH;
feetHeight = PIES_HARE;
- loadPic("97.alg");
- decompressPic(extraSurface, 1);
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("97.alg", extraSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
strcpy(menuBackground, "99.alg");
}
@@ -1049,13 +1014,11 @@
}
characterMoved = 0;
}
- loadPic(roomDisk);
- decompressPic(drawSurface3, 1);
+ loadAndDecompressPic(roomDisk, drawSurface3, 1);
char rm[20];
sprintf(rm, "%i.alg", roomNumber);
- loadPic(rm);
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic(rm, drawSurface1, HALF_PAL);
copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3);
@@ -1520,8 +1483,7 @@
sav->readLine(names[n], 23);
delete sav;
- loadPic("savescr.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("savescr.alg", drawSurface1, HALF_PAL);
color_abc(kColorLightGreen);
@@ -1622,8 +1584,7 @@
clearRoom();
char rm[20];
sprintf(rm, "%i.alg", roomNumber);
- loadPic(rm);
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic(rm, drawSurface1, HALF_PAL);
hay_seleccion = 0;
return true;
@@ -1795,8 +1756,7 @@
clearRoom();
- loadPic("sv.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("sv.alg", drawSurface1, HALF_PAL);
// inicio_ghost();
copia = (byte *)malloc(64000);
@@ -1901,8 +1861,7 @@
char rm[20];
sprintf(rm, "%i.alg", roomNumber);
- loadPic(rm);
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic(rm, drawSurface1, HALF_PAL);
}
void DrasculaEngine::fliplay(const char *filefli, int vel) {
@@ -3804,8 +3763,7 @@
if (phrase4[h] == (char)0xa7)
phrase4[h] = ' ';
- loadPic("car.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("car.alg", backSurface, 1);
// 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
@@ -3906,10 +3864,9 @@
goto bucle_opc;
if (num_ejec == 2)
- loadPic(menuBackground);
+ loadAndDecompressPic(menuBackground, backSurface, 1);
else
- loadPic("99.alg");
- decompressPic(backSurface, 1);
+ loadAndDecompressPic("99.alg", backSurface, 1);
if (num_ejec != 5)
withoutVerb();
}
@@ -4445,14 +4402,10 @@
flags[1] = 2;
hare_se_ve = 0;
roomNumber = 102;
- loadPic("102.alg");
- decompressPic(drawSurface1, HALF_PAL);
- loadPic("an_p1.alg");
- decompressPic(drawSurface3, 1);
- loadPic("an_p2.alg");
- decompressPic(extraSurface, 1);
- loadPic("an_p3.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("102.alg", drawSurface1, HALF_PAL);
+ loadAndDecompressPic("an_p1.alg", drawSurface3, 1);
+ loadAndDecompressPic("an_p2.alg", extraSurface, 1);
+ loadAndDecompressPic("an_p3.alg", frontSurface, 1);
copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3);
Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h 2008-05-30 13:10:52 UTC (rev 32397)
+++ scummvm/trunk/engines/drascula/drascula.h 2008-05-30 14:25:03 UTC (rev 32398)
@@ -237,9 +237,14 @@
void freeMemory();
void releaseGame();
- void loadPic(const char *);
+ void loadPic(const char *NamePcc);
void decompressPic(byte *targetSurface, int colorCount);
+ void loadAndDecompressPic(const char *NamePcc, byte *targetSurface, int colorCount) {
+ loadPic(NamePcc);
+ decompressPic(targetSurface, colorCount);
+ }
+
typedef char DacPalette256[256][3];
void setRGB(byte *dir_lectura, int plt);
@@ -502,6 +507,7 @@
void talk_taber2(const char *, const char *);
void talk_bj_bed(int);
void talk_bj_bed(const char *said, const char * filename);
+ void talk_htel(int);
void talk_htel(const char *said, const char *filename);
void talk_bj(int);
void talk_bj(const char *, const char *);
@@ -511,10 +517,13 @@
void talk_sinc(const char *, const char *, const char *);
void talk_drunk(int);
void talk_drunk(const char *said, const char *filename);
- void talk_pianista(const char *said, const char *filename);
+ void talk_pianist(int);
+ void talk_pianist(const char *said, const char *filename);
void talk_igor_seated(int);
void talk_igor_seated(const char *, const char *);
+ void talk_wolf(int);
void talk_wolf(const char *said, const char *filename);
+ void talk_mus(int);
void talk_mus(const char *said, const char *filename);
void hiccup(int);
Modified: scummvm/trunk/engines/drascula/rooms.cpp
===================================================================
--- scummvm/trunk/engines/drascula/rooms.cpp 2008-05-30 13:10:52 UTC (rev 32397)
+++ scummvm/trunk/engines/drascula/rooms.cpp 2008-05-30 14:25:03 UTC (rev 32398)
@@ -668,28 +668,17 @@
pickObject(12);
visible[2] = 0;
flags[28] = 1;
- } else if (pickedObject == kVerbLook && fl == 182)
+ } else if (pickedObject == kVerbLook && fl == 182) {
talk(154);
- else if (pickedObject == 8 && fl == 55 && flags[38] == 0 && flags[33] == 1)
- talk(349);
- else if (pickedObject == 13 && fl == 55 && flags[38] == 0 && flags[33] == 1)
- talk(349);
- else if (pickedObject == 15 && fl == 55 && flags[38] == 0 && flags[33] == 1)
- talk(349);
- else if (pickedObject == 16 && fl == 55 && flags[38] == 0 && flags[33] == 1)
- talk(349);
- else if (pickedObject == 17 && fl == 55 && flags[38] == 0 && flags[33] == 1)
- talk(349);
- else if (pickedObject == 8 && fl == 55 && flags[38] == 1 && flags[33] == 1)
- animation_24_2();
- else if (pickedObject == 13 && fl == 55 && flags[38] == 1 && flags[33] == 1)
- animation_24_2();
- else if (pickedObject == 15 && fl == 55 && flags[38] == 1 && flags[33] == 1)
- animation_24_2();
- else if (pickedObject == 16 && fl == 55 && flags[38] == 1 && flags[33] == 1)
- animation_24_2();
- else if (pickedObject == 17 && fl == 55 && flags[38] == 1 && flags[33] == 1)
- animation_24_2();
+ } else if (fl == 55 && flags[38] == 0 && flags[33] == 0) {
+ if (pickedObject == 8 || pickedObject == 13 || pickedObject == 15 ||
+ pickedObject == 16 || pickedObject == 17)
+ talk(349);
+ } else if (fl == 55 && flags[38] == 1 && flags[33] == 1) {
+ if (pickedObject == 8 || pickedObject == 13 || pickedObject == 15 ||
+ pickedObject == 16 || pickedObject == 17)
+ animation_24_2();
+ }
else if (pickedObject == 11 && fl == 50 && flags[22] == 0) {
sentido_hare = 3;
updateRoom();
@@ -1065,10 +1054,10 @@
talk(288);
flags[12] = 1;
pause(10);
- talk_mus(_texte[_lang][1], "E1.als");
+ talk_mus(1);
talk(289);
- talk_mus(_texte[_lang][2], "E2.als");
- talk_mus(_texte[_lang][3], "E3.als");
+ talk_mus(2);
+ talk_mus(3);
converse("op_10.cal");
flags[12] = 0;
flags[14] = 1;
@@ -1077,7 +1066,7 @@
else if (pickedObject == kVerbPick && fl == 9999 && flags[13] == 0) {
pickObject(8);
flags[13] = 1;
- talk_mus(_texte[_lang][10], "e10.als");
+ talk_mus(10);
updateData();
} else if (pickedObject == kVerbOpen && fl == 119)
talk(125);
@@ -1169,39 +1158,31 @@
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
hare_se_ve = 1;
clearRoom();
- loadPic("tlef0.alg");
- decompressPic(drawSurface1, COMPLETE_PAL);
- loadPic("tlef1.alg");
- decompressPic(drawSurface3, 1);
- loadPic("tlef2.alg");
- decompressPic(frontSurface, 1);
- loadPic("tlef3.alg");
- decompressPic(backSurface, 1);
- talk_htel(_text[_lang][240], "240.als");
+ loadAndDecompressPic("tlef0.alg", drawSurface1, COMPLETE_PAL);
+ loadAndDecompressPic("tlef1.alg", drawSurface3, 1);
+ loadAndDecompressPic("tlef2.alg", frontSurface, 1);
+ loadAndDecompressPic("tlef3.alg", backSurface, 1);
+ talk_htel(240);
color_abc(kColorBrown);
talk_solo(_textvb[_lang][58], "VB58.als");
- talk_htel(_text[_lang][241], "241.als");
+ talk_htel(241);
color_abc(kColorBrown);
talk_solo(_textvb[_lang][59], "VB59.als");
- talk_htel(_text[_lang][242], "242.als");
+ talk_htel(242);
color_abc(kColorBrown);
talk_solo(_textvb[_lang][60], "VB60.als");
- talk_htel(_text[_lang][196], "196.als");
+ talk_htel(196);
color_abc(kColorBrown);
talk_solo(_textvb[_lang][61],"VB61.als");
- talk_htel(_text[_lang][244], "244.als");
+ talk_htel(244);
color_abc(kColorBrown);
talk_solo(_textvb[_lang][62], "VB62.als");
clearRoom();
- loadPic("aux59.alg");
- decompressPic(drawSurface3, 1);
- loadPic("96.alg");
- decompressPic(frontSurface, COMPLETE_PAL);
- loadPic("99.alg");
- decompressPic(backSurface, 1);
- loadPic("59.alg");
- decompressPic(drawSurface1, HALF_PAL);
+ loadAndDecompressPic("aux59.alg", drawSurface3, 1);
+ loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
+ loadAndDecompressPic("99.alg", backSurface, 1);
+ loadAndDecompressPic("59.alg", drawSurface1, HALF_PAL);
sentido_hare = 3;
talk(245);
withoutVerb();
Modified: scummvm/trunk/engines/drascula/talk.cpp
===================================================================
--- scummvm/trunk/engines/drascula/talk.cpp 2008-05-30 13:10:52 UTC (rev 32397)
+++ scummvm/trunk/engines/drascula/talk.cpp 2008-05-30 14:25:03 UTC (rev 32398)
@@ -621,7 +621,13 @@
}
}
-void DrasculaEngine::talk_pianista(const char *said, const char *filename) {
+void DrasculaEngine::talk_pianist(int index) {
+ char name[20];
+ sprintf(name, "P%i.als", index);
+ talk(_textp[_lang][index], name);
+}
+
+void DrasculaEngine::talk_pianist(const char *said, const char *filename) {
int x_talk[4] = { 97, 145, 193, 241 };
int face;
int length = strlen(said);
@@ -681,8 +687,7 @@
int length = strlen(said);
if (num_ejec == 1) {
- loadPic("an11y13.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("an11y13.alg", frontSurface, 1);
}
flags[13] = 1;
@@ -738,8 +743,7 @@
flags[13] = 0;
if (num_ejec == 1) {
- loadPic("96.alg");
- decompressPic(frontSurface, 1);
+ loadAndDecompressPic("96.alg", frontSurface, 1);
}
if (num_ejec == 1) {
@@ -955,6 +959,12 @@
key = 0;
}
+void DrasculaEngine::talk_wolf(int index) {
+ char name[20];
+ sprintf(name, "L%i.als", index);
+ talk_wolf(_textl[_lang][index], name);
+}
+
void DrasculaEngine::talk_wolf(const char *said, const char *filename) {
int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268};
int face;
@@ -1002,6 +1012,12 @@
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
}
+void DrasculaEngine::talk_mus(int index) {
+ char name[20];
+ sprintf(name, "E%i.als", index);
+ talk_mus(_texte[_lang][index], name);
+}
+
void DrasculaEngine::talk_mus(const char *said, const char *filename) {
int x_talk[8] = { 16, 35, 54, 73, 92, 111, 130, 149};
int face;
@@ -1261,6 +1277,12 @@
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
}
+void DrasculaEngine::talk_htel(int index) {
+ char name[20];
+ sprintf(name, "%i.als", index);
+ talk_htel(_text[_lang][index], name);
+}
+
void DrasculaEngine::talk_htel(const char *said, const char *filename) {
char *num_cara;
int x_talk[3] = {1, 94, 187};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list