aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2008-05-30 07:24:32 +0000
committerFilippos Karapetis2008-05-30 07:24:32 +0000
commit4cc64e2b638906b70b55e4a6dd464525b63062cd (patch)
tree4e9d96c4dfb749429f656e650baefb0f2f33c9ad /engines
parent54e631a9034c00f9a5519441027cfda2c0532567 (diff)
downloadscummvm-rg350-4cc64e2b638906b70b55e4a6dd464525b63062cd.tar.gz
scummvm-rg350-4cc64e2b638906b70b55e4a6dd464525b63062cd.tar.bz2
scummvm-rg350-4cc64e2b638906b70b55e4a6dd464525b63062cd.zip
anima -> animate
leng -> dataSize, and removed it from the global variables (it's only used in animate()) svn-id: r32377
Diffstat (limited to 'engines')
-rw-r--r--engines/drascula/animation.cpp58
-rw-r--r--engines/drascula/drascula.cpp16
-rw-r--r--engines/drascula/drascula.h3
-rw-r--r--engines/drascula/rooms.cpp6
4 files changed, 41 insertions, 42 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 4e0f2d6c1b..175f502ee2 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -84,10 +84,10 @@ void DrasculaEngine::animation_1_1() {
playSound("s5.als");
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- if (anima("scr2.bin", 17))
+ if (animate("scr2.bin", 17))
break;
stopSound_corte();
- if (anima("scr3.bin", 17))
+ if (animate("scr3.bin", 17))
break;
loadPic("cielo2.alg");
decompressPic(screenSurface, 256);
@@ -196,9 +196,9 @@ void DrasculaEngine::animation_1_1() {
talk_dr_izq(3);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- if (anima("lib.bin", 16))
+ if (animate("lib.bin", 16))
break;
- if (anima("lib2.bin", 16))
+ if (animate("lib2.bin", 16))
break;
clearRoom();
color_solo = kColorRed;
@@ -215,7 +215,7 @@ void DrasculaEngine::animation_1_1() {
talk_solo(_textd[_lang][5], "d5.als");
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- if (anima("lib2.bin", 16))
+ if (animate("lib2.bin", 16))
break;
clearRoom();
loadPic("plan2.alg");
@@ -225,7 +225,7 @@ void DrasculaEngine::animation_1_1() {
talk_solo(_textd[_lang][6], "d6.als");
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- if (anima("lib2.bin", 16))
+ if (animate("lib2.bin", 16))
break;
clearRoom();
loadPic("plan3.alg");
@@ -263,16 +263,16 @@ void DrasculaEngine::animation_1_1() {
talk_dr_izq(10);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- if (anima("rayo1.bin", 16))
+ if (animate("rayo1.bin", 16))
break;
playSound("s5.als");
- if (anima("rayo2.bin", 15))
+ if (animate("rayo2.bin", 15))
break;
- if (anima("frel2.bin", 16))
+ if (animate("frel2.bin", 16))
break;
- if (anima("frel.bin", 16))
+ if (animate("frel.bin", 16))
break;
- if (anima("frel.bin", 16))
+ if (animate("frel.bin", 16))
break;
stopSound_corte();
clearRoom();
@@ -445,7 +445,7 @@ void DrasculaEngine::animation_2_1() {
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- if (anima("ag.bin", 14))
+ if (animate("ag.bin", 14))
break;
if (_lang == kSpanish)
@@ -533,7 +533,7 @@ void DrasculaEngine::animation_2_1() {
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- if (anima("lev.bin", 15))
+ if (animate("lev.bin", 15))
break;
lleva_al_hare(100 + ancho_hare / 2, 99 + alto_hare);
@@ -560,9 +560,9 @@ void DrasculaEngine::animation_2_1() {
talk(221);
talk_bj(10);
talk(222);
- if (anima("gaf.bin", 15))
+ if (animate("gaf.bin", 15))
break;
- if (anima("bjb.bin", 14))
+ if (animate("bjb.bin", 14))
break;
playMusic(9);
loadPic("97.alg");
@@ -610,10 +610,10 @@ void DrasculaEngine::animation_2_1() {
lleva_al_hare(157, 98 + alto_hare);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- if (anima("bes.bin", 16))
+ if (animate("bes.bin", 16))
break;
playMusic(11);
- if (anima("rap.bin", 16))
+ if (animate("rap.bin", 16))
break;
sentido_hare = 3;
// The room number was originally changed here to "no_bj.alg",
@@ -2077,9 +2077,9 @@ void DrasculaEngine::animation_12_5() {
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
pause(27);
- anima("rayo1.bin", 23);
+ animate("rayo1.bin", 23);
playSound("s5.als");
- anima("rayo2.bin", 17);
+ animate("rayo2.bin", 17);
sentido_hare = 1;
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
@@ -2145,7 +2145,7 @@ void DrasculaEngine::animation_12_5() {
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
}
- anima("frel.bin", 16);
+ animate("frel.bin", 16);
clearRoom();
hare_claro();
updatePalette();
@@ -2283,7 +2283,7 @@ void DrasculaEngine::animation_1_6() {
converse("op_11.cal");
talk_dr_dch(26);
- anima("fum.bin", 15);
+ animate("fum.bin", 15);
talk_dr_dch(27);
talk(254);
@@ -2359,7 +2359,7 @@ void DrasculaEngine::animation_5_6() {
pos_pen[4] = 18;
pos_pen[5] = 125;
- anima("man.bin", 14);
+ animate("man.bin", 14);
for (n = -125; n <= 0; n = n + 2) {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
@@ -2377,7 +2377,7 @@ void DrasculaEngine::animation_5_6() {
}
void DrasculaEngine::animation_6_6() {
- anima("rct.bin", 11);
+ animate("rct.bin", 11);
clearRoom();
withoutVerb();
removeObject(20);
@@ -2396,7 +2396,7 @@ void DrasculaEngine::animation_6_6() {
carga_escoba("58.ald");
hare_se_ve = 1;
sentido_hare = 1;
- anima("hbp.bin", 14);
+ animate("hbp.bin", 14);
sentido_hare = 3;
flags[0] = 1;
@@ -2412,10 +2412,10 @@ void DrasculaEngine::animation_7_6() {
void DrasculaEngine::animation_9_6() {
int v_cd;
- anima("fin.bin", 14);
+ animate("fin.bin", 14);
playMusic(13);
flags[5] = 1;
- anima("drf.bin", 16);
+ animate("drf.bin", 16);
fadeToBlack(0);
clearRoom();
hare_x = -1;
@@ -2533,7 +2533,7 @@ void DrasculaEngine::animation_18_6() {
flags[6] = 1;
withoutVerb();
removeObject(21);
- anima("beb.bin", 10);
+ animate("beb.bin", 10);
}
void DrasculaEngine::animation_19_6() {
@@ -3439,7 +3439,7 @@ void DrasculaEngine::animation_5_4(){
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
delay(800);
- anima("bio.bin", 14);
+ animate("bio.bin", 14);
flags[29] = 1;
hare_x = 95;
hare_y = 82;
@@ -3514,7 +3514,7 @@ void DrasculaEngine::animation_8_4() {
}
void DrasculaEngine::animation_9_4() {
- anima("st.bin", 14);
+ animate("st.bin", 14);
fadeToBlack(1);
}
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 73a2b55481..8087cae148 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -184,7 +184,6 @@ int DrasculaEngine::go() {
term_int = 0;
musicStopped = 0;
hay_seleccion = 0;
- Leng = 0;
UsingMem = 0;
globalSpeed = 0;
frame_blind = 0;
@@ -2039,11 +2038,12 @@ void DrasculaEngine::playSound(const char *file) {
ctvd_output(sku);
}
-bool DrasculaEngine::anima(const char *animation, int FPS) {
+bool DrasculaEngine::animate(const char *animation, int FPS) {
Common::File FileIn;
unsigned j;
int NFrames = 1;
int cnt = 2;
+ int dataSize = 0;
AuxBuffLast = (byte *)malloc(65000);
AuxBuffDes = (byte *)malloc(65000);
@@ -2055,9 +2055,9 @@ bool DrasculaEngine::anima(const char *animation, int FPS) {
}
FileIn.read(&NFrames, sizeof(NFrames));
- FileIn.read(&Leng, sizeof(Leng));
- AuxBuffOrg = (byte *)malloc(Leng);
- FileIn.read(AuxBuffOrg, Leng);
+ FileIn.read(&dataSize, sizeof(dataSize));
+ AuxBuffOrg = (byte *)malloc(dataSize);
+ FileIn.read(AuxBuffOrg, dataSize);
FileIn.read(cPal, 768);
loadPCX(AuxBuffOrg);
free(AuxBuffOrg);
@@ -2068,9 +2068,9 @@ bool DrasculaEngine::anima(const char *animation, int FPS) {
memcpy(AuxBuffLast, AuxBuffDes, 64000);
WaitForNext(FPS);
while (cnt < NFrames) {
- FileIn.read(&Leng, sizeof(Leng));
- AuxBuffOrg = (byte *)malloc(Leng);
- FileIn.read(AuxBuffOrg, Leng);
+ FileIn.read(&dataSize, sizeof(dataSize));
+ AuxBuffOrg = (byte *)malloc(dataSize);
+ FileIn.read(AuxBuffOrg, dataSize);
FileIn.read(cPal, 768);
loadPCX(AuxBuffOrg);
free(AuxBuffOrg);
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 8f2989eb1b..e89fdf1123 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -476,7 +476,7 @@ public:
void color_abc(int cl);
void centerText(const char *,int,int);
void playSound(const char *);
- bool anima(const char *animation, int FPS);
+ bool animate(const char *animation, int FPS);
void stopSound_corte();
void fadeToBlack(int VelocidadDeFundido);
void pause(int);
@@ -546,7 +546,6 @@ public:
byte *AuxBuffOrg;
byte *AuxBuffLast;
byte *AuxBuffDes;
- int Leng;
byte *pointer;
int UsingMem;
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index ede8e99f66..0fdd0ed4e9 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -747,7 +747,7 @@ void DrasculaEngine::room_22(int fl) {
visible[1] = 0;
flags[24] = 1;
} else if (pickedObject == 22 && fl == 52) {
- anima("up.bin",14);
+ animate("up.bin",14);
flags[26]=1;
playSound("s1.als");
hiccup(14);
@@ -1105,7 +1105,7 @@ void DrasculaEngine::room_55(int fl) {
talk(_text[_lang][140], "140.als");
else if (fl == 206) {
playSound("s11.als");
- anima("det.bin", 17);
+ animate("det.bin", 17);
stopSound();
lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6);
} else
@@ -1242,7 +1242,7 @@ bool DrasculaEngine::room_60(int fl) {
animation_9_6();
return true;
} else if (pickedObject == 9 && fl == 56 && flags[6] == 0) {
- anima("cnf.bin", 14);
+ animate("cnf.bin", 14);
talk(_text[_lang][455], "455.als");
} else
hasAnswer = 0;