[Scummvm-cvs-logs] SF.net SVN: scummvm: [32301] scummvm/trunk/engines/drascula
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon May 26 21:50:06 CEST 2008
Revision: 32301
http://scummvm.svn.sourceforge.net/scummvm/?rev=32301&view=rev
Author: thebluegr
Date: 2008-05-26 12:50:05 -0700 (Mon, 26 May 2008)
Log Message:
-----------
Cleanup
Modified Paths:
--------------
scummvm/trunk/engines/drascula/animation.cpp
scummvm/trunk/engines/drascula/drascula.cpp
scummvm/trunk/engines/drascula/talk.cpp
Modified: scummvm/trunk/engines/drascula/animation.cpp
===================================================================
--- scummvm/trunk/engines/drascula/animation.cpp 2008-05-26 19:36:38 UTC (rev 32300)
+++ scummvm/trunk/engines/drascula/animation.cpp 2008-05-26 19:50:05 UTC (rev 32301)
@@ -377,19 +377,13 @@
}
void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
int x_talk[4] = {47, 93, 139, 185};
int cara;
int l = 0;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(RED);
if (hay_sb == 1) {
@@ -433,7 +427,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2008-05-26 19:36:38 UTC (rev 32300)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2008-05-26 19:50:05 UTC (rev 32301)
@@ -4475,8 +4475,7 @@
}
void DrasculaEngine::grr() {
- int longitud;
- longitud = 30;
+ int longitud = 30;
color_abc(DARK_GREEN);
@@ -4510,7 +4509,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
Modified: scummvm/trunk/engines/drascula/talk.cpp
===================================================================
--- scummvm/trunk/engines/drascula/talk.cpp 2008-05-26 19:36:38 UTC (rev 32300)
+++ scummvm/trunk/engines/drascula/talk.cpp 2008-05-26 19:50:05 UTC (rev 32301)
@@ -41,19 +41,12 @@
}
void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 };
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(WHITE);
talkInit(filename);
@@ -93,7 +86,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -104,19 +97,12 @@
}
void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 };
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(RED);
talkInit(filename);
@@ -161,7 +147,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -173,19 +159,12 @@
}
void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 };
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(RED);
talkInit(filename);
@@ -229,7 +208,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -245,16 +224,10 @@
}
void DrasculaEngine::talk_solo(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
if (num_ejec == 1)
color_abc(color_solo);
else if (num_ejec == 4)
@@ -289,7 +262,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -300,19 +273,12 @@
}
void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[8] = { 56, 86, 116, 146, 176, 206, 236, 266 };
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(WHITE);
talkInit(filename);
@@ -354,7 +320,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -372,19 +338,12 @@
}
void DrasculaEngine::talk_tabernero(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 };
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(MAROON);
talkInit(filename);
@@ -425,7 +384,7 @@
delete(sku);
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -435,19 +394,12 @@
}
void DrasculaEngine::talk_bj(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[5] = { 64, 92, 120, 148, 176 };
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(WHITE);
talkInit(filename);
@@ -495,7 +447,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -511,9 +463,6 @@
}
void DrasculaEngine::talk(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int suma_1_pixel = 0;
if (num_ejec != 2)
suma_1_pixel = 1;
@@ -522,10 +471,8 @@
int x_talk_dch[6] = { 1, 25, 49, 73, 97, 121 };
int x_talk_izq[6] = { 145, 169, 193, 217, 241, 265 };
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
-
if (num_ejec == 6) {
if (flags[0] == 0 && (!strcmp(num_room, "102.alg"))) {
talk_pen(said, filename);
@@ -537,9 +484,7 @@
}
}
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
if (num_ejec != 2) {
if (factor_red[hare_y + alto_hare] == 100)
@@ -640,7 +585,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -655,16 +600,11 @@
}
void DrasculaEngine::talk_pianista(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
int x_talk[4] = { 97, 145, 193, 241 };
int cara;
- int longitud;
- longitud = strlen(said);
+ int longitud = strlen(said);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
color_abc(WHITE);
@@ -700,7 +640,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -710,17 +650,11 @@
}
void DrasculaEngine::talk_borracho(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 };
int cara;
- int longitud;
- longitud = strlen(said);
+ int longitud = strlen(said);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
if (num_ejec == 1) {
loadPic("an11y13.alg");
@@ -770,7 +704,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -794,19 +728,12 @@
}
void DrasculaEngine::talk_vb(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[6] = {1, 27, 53, 79, 105, 131};
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(VON_BRAUN);
talkInit(filename);
@@ -844,7 +771,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -856,16 +783,10 @@
}
void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(VON_BRAUN);
talkInit(filename);
@@ -887,7 +808,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -902,10 +823,8 @@
byte *num_cara;
int p = 0;
int pos_ciego[6];
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
-
color_abc(VON_BRAUN);
copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
@@ -965,23 +884,17 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
}
void DrasculaEngine::talk_hacker(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
@@ -1004,7 +917,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1013,19 +926,12 @@
}
void DrasculaEngine::talk_lobo(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268};
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(RED);
talkInit(filename);
@@ -1059,7 +965,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1069,19 +975,12 @@
}
void DrasculaEngine::talk_mus(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[8] = { 16, 35, 54, 73, 92, 111, 130, 149};
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(WHITE);
talkInit(filename);
@@ -1115,7 +1014,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1125,24 +1024,17 @@
}
void DrasculaEngine::talk_pen(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[8] = {112, 138, 164, 190, 216, 242, 268, 294};
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
-
flags[1] = 1;
updateRoom();
copyRect(44, 145, 145, 105, 25, 29, dir_dibujo3, dir_zona_pantalla);
updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
color_abc(YELLOW);
@@ -1177,7 +1069,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1189,20 +1081,13 @@
}
void DrasculaEngine::talk_pen2(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[5]={122, 148, 174, 200, 226};
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
-
flags[1] = 1;
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
color_abc(YELLOW);
@@ -1237,7 +1122,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1249,19 +1134,12 @@
}
void DrasculaEngine::talk_taber2(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[6] = {1, 23, 45, 67, 89, 111};
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(MAROON);
talkInit(filename);
@@ -1295,7 +1173,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1305,19 +1183,12 @@
}
void DrasculaEngine::talk_bj_cama(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[5] = {51, 101, 151, 201, 251};
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(WHITE);
talkInit(filename);
@@ -1352,7 +1223,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1361,20 +1232,13 @@
}
void DrasculaEngine::talk_htel(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
char *num_cara;
-
int x_talk[3] = {1, 94, 187};
int cara, pantalla;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(YELLOW);
talkInit(filename);
@@ -1411,7 +1275,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1426,10 +1290,8 @@
int x_talk_dch[6] = {1, 25, 49, 73, 97, 121};
int x_talk_izq[6] = {145, 169, 193, 217, 241, 265};
int p, cara = 0;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
-
color_abc(YELLOW);
if (num_ejec == 1) {
@@ -1526,7 +1388,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1538,17 +1400,11 @@
}
void DrasculaEngine::talk_baul(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
int cara = 0, cara_antes;
- int longitud;
+ int longitud = strlen(said);
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
cara_antes = flags[19];
color_abc(MAROON);
@@ -1582,7 +1438,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1593,16 +1449,10 @@
}
void DrasculaEngine::talk_igorpuerta(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(WHITE);
talkInit(filename);
@@ -1624,7 +1474,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1634,19 +1484,12 @@
}
void DrasculaEngine::talk_igor_sentado(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[4] = { 80, 102, 124, 146 };
int cara;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(WHITE);
talkInit(filename);
@@ -1680,7 +1523,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
@@ -1690,19 +1533,12 @@
}
void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) {
- int tiempou;
- long tiempol;
-
int x_talk[4] = {119, 158, 197, 236};
int cara = 0;
+ int longitud = strlen(said);
- int longitud;
- longitud = strlen(said);
+ _rnd->setSeed((unsigned int)_system->getMillis() / 2);
- tiempol = _system->getMillis();
- tiempou = (unsigned int)tiempol / 2;
- _rnd->setSeed(tiempou);
-
color_abc(WHITE);
talkInit(filename);
@@ -1736,7 +1572,7 @@
sku = NULL;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud -= 2;
if (longitud > 0)
goto bucless;
}
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