x_igor/y_igor -> igorX/igorY

talk_dr_izq -> talk_drascula
Merged talk_drascula and talk_dr_dch

svn-id: r32425
This commit is contained in:
Filippos Karapetis
2008-05-31 13:01:48 +00:00
parent 8a8c67c9b7
commit 73b8f5ec00
4 changed files with 46 additions and 88 deletions
+16 -16
View File
@@ -189,8 +189,8 @@ void DrasculaEngine::animation_1_1() {
x_dr = 129;
y_dr = 95;
sentido_igor = 1;
x_igor = 66;
y_igor = 97;
igorX = 66;
igorY = 97;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
placeIgor();
@@ -203,10 +203,10 @@ void DrasculaEngine::animation_1_1() {
placeIgor();
placeDrascula();
updateScreen();
talk_dr_izq(2);
talk_drascula(2);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_dr_izq(3);
talk_drascula(3);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
if (animate("lib.bin", 16))
@@ -260,14 +260,14 @@ void DrasculaEngine::animation_1_1() {
talk_igor_dch(9);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_dr_izq(9);
talk_drascula(9);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_igor_dch(10);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
playMusic(11);
talk_dr_izq(10);
talk_drascula(10);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
if (animate("rayo1.bin", 16))
@@ -306,7 +306,7 @@ void DrasculaEngine::animation_1_1() {
placeIgor();
placeDrascula();
updateScreen();
talk_dr_izq(12);
talk_drascula(12);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
sentido_dr = 3;
@@ -338,26 +338,26 @@ void DrasculaEngine::animation_1_1() {
placeIgor();
placeDrascula();
updateScreen();
talk_dr_izq(14);
talk_drascula(14);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_igor_dch(3);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_dr_izq(15);
talk_drascula(15);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_igor_dch(4);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_dr_izq(16);
talk_drascula(16);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_igor_dch(5);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
sentido_igor = 3;
talk_dr_izq(17);
talk_drascula(17);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
pause(18);
@@ -1934,7 +1934,7 @@ void DrasculaEngine::animation_1_6() {
talk_igor_front(12);
talk_dr_dch(34);
sentido_dr = 0;
talk_dr_izq(35);
talk_drascula(35);
if (_lang == kSpanish)
textSurface = extraSurface;
@@ -2680,8 +2680,8 @@ void DrasculaEngine::animation_5_4(){
updateScreen();
openDoor(2, 0);
loadAndDecompressPic("auxigor.alg", frontSurface, 1);
x_igor = 100;
y_igor = 65;
igorX = 100;
igorY = 65;
talk_igor_front(29);
talk_igor_front(30);
loadAndDecompressPic("96.alg", frontSurface, 1);
@@ -2701,8 +2701,8 @@ void DrasculaEngine::animation_6_4() {
loadAndDecompressPic("auxigor.alg", frontSurface, 1);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
update_26_pre();
x_igor = 104;
y_igor = 71;
igorX = 104;
igorY = 71;
placeIgor();
updateScreen();
pause(40);
+3 -3
View File
@@ -187,7 +187,7 @@ int DrasculaEngine::go() {
loadAndDecompressPic("97.alg", extraSurface, 1);
loadAndDecompressPic("99.alg", backSurface, 1);
} else if (currentChapter == 6) {
x_igor = 105, y_igor = 85, sentido_igor = 1;
igorX = 105, igorY = 85, sentido_igor = 1;
x_dr = 62, y_dr = 99, sentido_dr = 1;
frame_pen = 0;
flag_tv = 0;
@@ -1960,8 +1960,8 @@ void DrasculaEngine::placeIgor() {
else if (sentido_igor == 1)
pos_igor[1] = 76;
}
pos_igor[2] = x_igor;
pos_igor[3] = y_igor;
pos_igor[2] = igorX;
pos_igor[3] = igorY;
pos_igor[4] = 54;
pos_igor[5] = 61;
+3 -4
View File
@@ -283,7 +283,7 @@ public:
int frame_candles;
int color_solo;
int blinking;
int x_igor, y_igor, sentido_igor;
int igorX, igorY, sentido_igor;
int x_dr, y_dr, sentido_dr;
int x_bj, y_bj, sentido_bj;
int cont_sv;
@@ -432,9 +432,8 @@ public:
void talk_igor_dch(int);
void talk_igor_dch(const char *said, const char *filename);
void talk_dr_dch(int);
void talk_dr_dch(const char *said, const char *filename);
void talk_dr_izq(int);
void talk_dr_izq(const char *said, const char *filename);
void talk_drascula(int index, int talkerType = 0);
void talk_drascula(const char *said, const char *filename);
void talk_solo(const char *, const char *);
void talk_igor_front(int);
void talk_igor_front(const char *, const char *);
+24 -65
View File
@@ -85,14 +85,14 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) {
placeIgor();
placeDrascula();
copyBackground(x_igor + 17, y_igor, x_igor + 17, y_igor, 37, 24, drawSurface1, screenSurface);
copyBackground(igorX + 17, igorY, igorX + 17, igorY, 37, 24, drawSurface1, screenSurface);
copyRect(x_talk[face], 148, x_igor + 17, y_igor, 25, 24, frontSurface, screenSurface);
copyRect(x_talk[face], 148, igorX + 17, igorY, 25, 24, frontSurface, screenSurface);
updateRefresh();
if (withVoices == 0)
centerText(said, x_igor + 26, y_igor);
centerText(said, igorX + 26, igorY);
updateScreen();
@@ -106,16 +106,15 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) {
updateScreen();
}
void DrasculaEngine::talk_dr_izq(int index) {
char name[20];
sprintf(name, "d%i.als", index);
talk_dr_izq(_textd[_lang][index], name);
}
void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) {
void DrasculaEngine::talk_drascula(int index, int talkerType) {
const char *said = _textd[_lang][index];
char filename[20];
sprintf(filename, "d%i.als", index);
int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 };
int face;
int length = strlen(said);
int offset = (talkerType == 0) ? 0 : 7;
int offset2 = (talkerType == 0) ? 90 : 58;
color_abc(kColorRed);
@@ -133,11 +132,11 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) {
if (currentChapter == 6)
pon_hare();
copyBackground(x_dr, y_dr, x_dr, y_dr, 38, 31, drawSurface1, screenSurface);
copyBackground(x_dr, y_dr, x_dr, y_dr, 38 + offset, 31, drawSurface1, screenSurface);
if (currentChapter == 6)
copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, drawSurface2, screenSurface);
copyRect(x_talk[face], offset2, x_dr + offset, y_dr, 38, 31, drawSurface2, screenSurface);
else
copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, backSurface, screenSurface);
copyRect(x_talk[face], offset2, x_dr + offset, y_dr, 38, 31, backSurface, screenSurface);
updateRefresh();
@@ -150,65 +149,25 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) {
} while (!isTalkFinished(&length));
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
placeIgor();
placeDrascula();
updateScreen();
}
void DrasculaEngine::talk_dr_dch(int index) {
char name[20];
sprintf(name, "d%i.als", index);
talk_dr_dch(_textd[_lang][index], name);
}
void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) {
int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 };
int face;
int length = strlen(said);
color_abc(kColorRed);
talkInit(filename);
do {
face = _rnd->getRandomNumber(7);
if (talkerType == 0)
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateRefresh_pre();
placeIgor();
placeDrascula();
if (currentChapter == 6)
pon_hare();
copyBackground(x_dr, y_dr, x_dr, y_dr, 45, 31, drawSurface1, screenSurface);
if (currentChapter != 6)
copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, backSurface, screenSurface);
else
copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, drawSurface2, screenSurface);
updateRefresh();
if (withVoices == 0)
centerText(said, x_dr + 19, y_dr);
updateScreen();
pause(3);
} while (!isTalkFinished(&length));
if (currentChapter == 6)
if (talkerType == 1 && currentChapter == 6)
updateRoom();
placeIgor();
placeDrascula();
if (currentChapter == 6)
if (talkerType == 1 && currentChapter == 6)
pon_hare();
updateScreen();
}
void DrasculaEngine::talk_dr_dch(int index) {
talk_drascula(index, 1);
}
void DrasculaEngine::talk_solo(const char *said, const char *filename) {
int length = strlen(said);
@@ -267,13 +226,13 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) {
if (currentChapter == 1)
placeDrascula();
if (currentChapter == 1 || currentChapter == 6)
copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, drawSurface1, screenSurface);
copyRect(x_talk[face], 173, x_igor, y_igor, 29, 25, frontSurface, screenSurface);
copyBackground(igorX, igorY, igorX, igorY, 29, 25, drawSurface1, screenSurface);
copyRect(x_talk[face], 173, igorX, igorY, 29, 25, frontSurface, screenSurface);
updateRefresh();
if (withVoices == 0)
centerText(said, x_igor + 26, y_igor);
centerText(said, igorX + 26, igorY);
updateScreen();