[Scummvm-cvs-logs] SF.net SVN: scummvm: [32256] scummvm/trunk/engines/drascula
sev at users.sourceforge.net
sev at users.sourceforge.net
Sat May 24 23:23:06 CEST 2008
Revision: 32256
http://scummvm.svn.sourceforge.net/scummvm/?rev=32256&view=rev
Author: sev
Date: 2008-05-24 14:23:06 -0700 (Sat, 24 May 2008)
Log Message:
-----------
- Move more texts to strings
- Add support for international versions
- More differences for Spanish version
- Fix font position for Spanish version
- Added accented characters rendering
- Bring save names to ScummVM scheme. Original saves aren't read anymore
- Made mouse more responsive at save/load screen
- Couple fixes for game texts
Modified Paths:
--------------
scummvm/trunk/engines/drascula/animation.cpp
scummvm/trunk/engines/drascula/detection.cpp
scummvm/trunk/engines/drascula/drascula.cpp
scummvm/trunk/engines/drascula/drascula.h
scummvm/trunk/engines/drascula/texts.cpp
Modified: scummvm/trunk/engines/drascula/animation.cpp
===================================================================
--- scummvm/trunk/engines/drascula/animation.cpp 2008-05-24 19:18:17 UTC (rev 32255)
+++ scummvm/trunk/engines/drascula/animation.cpp 2008-05-24 21:23:06 UTC (rev 32256)
@@ -65,7 +65,7 @@
if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
break;
color_abc(RED);
- centra_texto("Transilvanya, 1993 d.c.", 160, 100);
+ centra_texto(_textmisc[_lang][1], 160, 100);
updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
break;
@@ -466,6 +466,9 @@
if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
break;
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
loadPic("an11y13.alg");
decompressPic(dir_hare_dch, 1);
if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
@@ -475,6 +478,9 @@
if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
break;
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
loadPic("97.alg");
decompressPic(dir_hare_dch, 1);
if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE))
@@ -657,6 +663,9 @@
}
void DrasculaEngine::animation_3_1() {
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
loadPic("an11y13.alg");
decompressPic(dir_hare_dch, 1);
@@ -683,11 +692,17 @@
flags[0] = 1;
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
loadPic("97.alg");
decompressPic(dir_hare_dch, 1);
}
void DrasculaEngine::animation_4_1() {
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
loadPic("an12.alg");
decompressPic(dir_hare_dch, 1);
@@ -720,6 +735,9 @@
talk_pianista(_textp[_lang][4], "p4.als");
talk(_text[_lang][209], "209.als");
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
flags[11] = 0;
loadPic("97.alg");
decompressPic(dir_hare_dch, 1);
@@ -842,6 +860,9 @@
loadPic("ciego5.alg");
decompressPic(dir_hare_frente, 1);
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
@@ -892,6 +913,9 @@
decompressPic(dir_hare_fondo, 1);
withoutVerb();
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
flags[9] = 0;
flags[4] = 1;
}
@@ -2313,6 +2337,10 @@
talk_dr_dch(_textd[_lang][34], "d34.als");
sentido_dr = 0;
talk_dr_izq(_textd[_lang][35], "d35.als");
+
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
clearRoom();
carga_escoba("102.ald");
activa_pendulo();
@@ -2526,6 +2554,9 @@
}
void DrasculaEngine::animation_12_2() {
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
loadPic("an12.alg");
decompressPic(dir_hare_dch, 1);
@@ -2552,6 +2583,9 @@
talk_pianista(_textp[_lang][5], "P5.als");
conversa("op_1.cal");
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
flags[11] = 0;
loadPic("974.alg");
decompressPic(dir_hare_dch, 1);
@@ -2560,6 +2594,9 @@
void DrasculaEngine::animation_26_2() {
int n, x = 0;
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
loadPic("an12.alg");
decompressPic(dir_hare_dch, 1);
@@ -2623,6 +2660,9 @@
pickObject(11);
resta_objeto(12);
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
flags[11] = 0;
flags[39] = 1;
loadPic("974.alg");
@@ -2631,6 +2671,9 @@
}
void DrasculaEngine::animation_11_2() {
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
loadPic("an11y13.alg");
decompressPic(dir_hare_dch, 1);
@@ -2644,6 +2687,9 @@
pause(40);
talk_tabernero("No, nada", "d82.als");
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
loadPic("974.alg");
decompressPic(dir_hare_dch, 1);
}
@@ -2829,6 +2875,9 @@
}
void DrasculaEngine::animation_36_2() {
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
loadPic("an11y13.alg");
decompressPic(dir_hare_dch, 1);
@@ -2840,6 +2889,9 @@
pause(40);
talk_tabernero("No, nada", "d82.als");
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
loadPic("974.alg");
decompressPic(dir_hare_dch, 1);
}
@@ -3207,6 +3259,9 @@
stopMusic();
flags[9] = 1;
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
clearRoom();
loadPic("ciego1.alg");
decompressPic(dir_dibujo1, HALF_PAL);
@@ -3251,6 +3306,9 @@
decompressPic(dir_hare_fondo, 1);
withoutVerb();
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
flags[9] = 0;
}
@@ -3274,6 +3332,9 @@
loadPic("ciego5.alg");
decompressPic(dir_hare_frente, 1);
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_frente;
+
copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
@@ -3307,6 +3368,9 @@
decompressPic(dir_hare_fondo, 1);
withoutVerb();
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+
flags[33] = 1;
flags[9] = 0;
}
Modified: scummvm/trunk/engines/drascula/detection.cpp
===================================================================
--- scummvm/trunk/engines/drascula/detection.cpp 2008-05-24 19:18:17 UTC (rev 32255)
+++ scummvm/trunk/engines/drascula/detection.cpp 2008-05-24 21:23:06 UTC (rev 32256)
@@ -58,8 +58,12 @@
return _gameDescription->version;
}
+Common::Language DrasculaEngine::getLanguage() const {
+ return _gameDescription->desc.language;
}
+}
+
static const PlainGameDescriptor drasculaGames[] = {
{"drascula", "Drascula: The Vampire Strikes Back"},
{0, 0}
@@ -75,7 +79,7 @@
{
"drascula",
0,
- AD_ENTRY1("14.ald", "09b2735953edcd43af115c65ae00b10e"),
+ AD_ENTRY1s("14.ald", "09b2735953edcd43af115c65ae00b10e", 1595),
Common::EN_ANY,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
@@ -85,13 +89,13 @@
0,
0,
},
-/*
+
{
// Drascula Spanish version
{
"drascula",
0,
- AD_ENTRY1("14.ald", "0746ed1a5cc8d9728f790c29813f4b43"),
+ AD_ENTRY1s("14.ald", "0746ed1a5cc8d9728f790c29813f4b43", 23059),
Common::ES_ESP,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
@@ -100,8 +104,56 @@
0,
0,
0,
- },*/
+ },
+ {
+ // Drascula German version
+ {
+ "drascula",
+ 0,
+ AD_ENTRY1s("14.ald", "72e46089033d56bad1c179ac36e2a9d2", 610),
+ Common::DE_DEU,
+ Common::kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+
+ {
+ // Drascula French version
+ {
+ "drascula",
+ 0,
+ AD_ENTRY1s("14.ald", "eeeee96b82169003630e08992248296c", 608),
+ Common::FR_FRA,
+ Common::kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+
+ {
+ // Drascula Italian version
+ {
+ "drascula",
+ 0,
+ AD_ENTRY1s("14.ald", "02b49a18328d0bf2efe6ba658c9c7a1d", 2098),
+ Common::IT_ITA,
+ Common::kPlatformPC,
+ Common::ADGF_NO_FLAGS
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+
{ AD_TABLE_END_MARKER, 0, 0, 0, 0 }
};
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2008-05-24 19:18:17 UTC (rev 32255)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2008-05-24 21:23:06 UTC (rev 32256)
@@ -114,6 +114,27 @@
_system->initSize(320, 200);
_system->endGFXTransaction();
+ switch (getLanguage()) {
+ case Common::EN_ANY:
+ _lang = 0;
+ break;
+ case Common::ES_ESP:
+ _lang = 1;
+ break;
+ case Common::DE_DEU:
+ _lang = 2;
+ break;
+ case Common::FR_FRA:
+ _lang = 3;
+ break;
+ case Common::IT_ITA:
+ _lang = 4;
+ break;
+ default:
+ warning("Unknown game language. Falling back to English");
+ _lang = 0;
+ }
+
return 0;
}
@@ -468,7 +489,10 @@
bool DrasculaEngine::escoba() {
int n;
- dir_texto = dir_mesa;
+ if (_lang == kSpanish)
+ dir_texto = dir_hare_dch;
+ else
+ dir_texto = dir_mesa;
previousMusic = -1;
@@ -1473,22 +1497,24 @@
bool DrasculaEngine::saves() {
char nombres[10][23];
- char fichero[13];
+ char fichero[50];
+ char fileEpa[50];
int n, n2, num_sav = 0, y = 27;
Common::InSaveFile *sav;
clearRoom();
- if (!(sav = _saveFileMan->openForLoading("saves.epa"))) {
+ snprintf(fileEpa, 50, "%s.epa", _targetName.c_str());
+ if (!(sav = _saveFileMan->openForLoading(fileEpa))) {
Common::OutSaveFile *epa;
- if (!(epa = _saveFileMan->openForSaving("saves.epa")))
- error("Can't open saves.epa file.");
+ if (!(epa = _saveFileMan->openForSaving(fileEpa)))
+ error("Can't open %s file", fileEpa);
for (n = 0; n < NUM_SAVES; n++)
epa->writeString("*\n");
epa->finalize();
delete epa;
- if (!(sav = _saveFileMan->openForLoading("saves.epa"))) {
- error("Can't open saves.epa file.");
+ if (!(sav = _saveFileMan->openForLoading(fileEpa))) {
+ error("Can't open %s file", fileEpa);
}
}
for (n = 0; n < NUM_SAVES; n++)
@@ -1526,11 +1552,11 @@
introduce_nombre();
strcpy(nombres[n], select);
if (hay_seleccion == 1) {
- sprintf(fichero, "gsave%02d", n + 1);
+ snprintf(fichero, 50, "%s%02d", _targetName.c_str(), n + 1);
para_grabar(fichero);
Common::OutSaveFile *tsav;
- if (!(tsav = _saveFileMan->openForSaving("saves.epa"))) {
- error("Can't open saves.epa file.");
+ if (!(tsav = _saveFileMan->openForSaving(fileEpa))) {
+ error("Can't open %s file", fileEpa);
}
for (n = 0; n < NUM_SAVES; n++) {
tsav->writeString(nombres[n]);
@@ -1548,7 +1574,7 @@
y = y + 9;
}
if (hay_seleccion == 1) {
- sprintf(fichero, "gsave%02d", n + 1);
+ snprintf(fichero, 50, "%s%02d", _targetName.c_str(), n + 1);
}
num_sav = n;
}
@@ -1572,8 +1598,8 @@
} else if (x_raton > 208 && y_raton > 123 && x_raton < 282 && y_raton < 149 && hay_seleccion == 1) {
para_grabar(fichero);
Common::OutSaveFile *tsav;
- if (!(tsav = _saveFileMan->openForSaving("saves.epa"))) {
- error("Can't open saves.epa file.");
+ if (!(tsav = _saveFileMan->openForSaving(fileEpa))) {
+ error("Can't open %s file", fileEpa);
}
for (n = 0; n < NUM_SAVES; n++) {
tsav->writeString(nombres[n]);
@@ -1590,6 +1616,8 @@
delay(400);
}
y = 26;
+
+ delay(10);
}
clearRoom();
@@ -1606,7 +1634,7 @@
longitud = strlen(said);
for (h = 0; h < longitud; h++) {
- y_de_letra = Y_ABC;
+ y_de_letra = (_lang == kSpanish) ? Y_ABC_ESP : Y_ABC;
int c = toupper(said[h]);
if (c == 'A')
x_de_letra = X_A;
@@ -1660,10 +1688,14 @@
x_de_letra = X_Y;
else if (c == 'Z')
x_de_letra = X_Z;
+ else if (c == '\245')
+ x_de_letra = X_GN;
+ else if (c == '\244')
+ x_de_letra = X_GN;
else if (c == 0xa7 || c == ' ')
x_de_letra = SPACE;
else {
- y_de_letra = Y_SIGNOS;
+ y_de_letra = (_lang == kSpanish) ? Y_SIGNOS_ESP : Y_SIGNOS;
if (c == '.')
x_de_letra = X_DOT;
else if (c == ',')
@@ -1672,7 +1704,7 @@
x_de_letra = X_HYPHEN;
else if (c == '?')
x_de_letra = X_CIERRA_INTERROGACION;
- else if (c == 0xa8)
+ else if (c == '\250')
x_de_letra = X_ABRE_INTERROGACION;
// else if (c == '\'') // FIXME
// x_de_letra = SPACE; // space for now
@@ -1680,7 +1712,7 @@
x_de_letra = X_COMILLAS;
else if (c == '!')
x_de_letra = X_CIERRA_EXCLAMACION;
- else if (c == 0xad)
+ else if (c == '\255')
x_de_letra = X_ABRE_EXCLAMACION;
else if (c == ';')
x_de_letra = X_PUNTO_Y_COMA;
@@ -1726,6 +1758,41 @@
x_de_letra = X_N9;
else if (c == '0')
x_de_letra = X_N0;
+ else y_de_letra=Y_ACENTOS;
+
+ if (c == '\x81\xA0') x_de_letra=X_A;
+ else if (c =='\202') x_de_letra = X_B;
+ else if (c =='\241') x_de_letra = X_C;
+ else if (c =='\242') x_de_letra = X_D;
+ else if (c =='\243') x_de_letra = X_E;
+ else if (c =='\205') x_de_letra = X_F;
+ else if (c =='\212') x_de_letra = X_G;
+ else if (c =='\215') x_de_letra = X_H;
+ else if (c =='\225') x_de_letra = X_I;
+ else if (c =='\227') x_de_letra = X_J;
+ else if (c =='\203') x_de_letra = X_K;
+ else if (c =='\210') x_de_letra = X_L;
+ else if (c =='\214') x_de_letra = X_M;
+ else if (c =='\223') x_de_letra = X_N;
+ else if (c =='\226') x_de_letra = X_GN;
+ else if (c =='\047') x_de_letra = X_O;
+ else if (c =='\200') x_de_letra = X_P;
+ else if (c =='\207') x_de_letra = X_P;
+ else if (c =='\265') x_de_letra = X_A;
+ else if (c =='\220') x_de_letra = X_B;
+ else if (c =='\326') x_de_letra = X_C;
+ else if (c =='\340') x_de_letra = X_D;
+ else if (c =='\351') x_de_letra = X_E;
+ else if (c =='\267') x_de_letra = X_F;
+ else if (c =='\324') x_de_letra = X_G;
+ else if (c =='\336') x_de_letra = X_H;
+ else if (c =='\343') x_de_letra = X_I;
+ else if (c =='\353') x_de_letra = X_J;
+ else if (c =='\266') x_de_letra = X_K;
+ else if (c =='\322') x_de_letra = X_L;
+ else if (c =='\327') x_de_letra = X_M;
+ else if (c =='\342') x_de_letra = X_N;
+ else if (c =='\352') x_de_letra = X_GN;
}
pos_texto[0] = x_de_letra;
@@ -3992,14 +4059,22 @@
int c = toupper(said[h]);
if (c == 'A')
x_de_letra = X_A_OPC;
+ else if (c == '\265') x_de_letra = X_A_OPC;
+ else if (c == '\267') x_de_letra = X_A_OPC;
+ else if (c == '\266') x_de_letra = X_A_OPC;
else if (c == 'B')
x_de_letra = X_B_OPC;
else if (c == 'C')
x_de_letra = X_C_OPC;
+ else if (c == '\200') x_de_letra = X_C_OPC;
+ else if (c == '\207') x_de_letra = X_C_OPC;
else if (c == 'D')
x_de_letra = X_D_OPC;
else if (c == 'E')
x_de_letra = X_E_OPC;
+ else if (c == '\220') x_de_letra = X_E_OPC;
+ else if (c == '\324') x_de_letra = X_E_OPC;
+ else if (c == '\322') x_de_letra = X_E_OPC;
else if (c == 'F')
x_de_letra = X_F_OPC;
else if (c == 'G')
@@ -4008,6 +4083,9 @@
x_de_letra = X_H_OPC;
else if (c == 'I')
x_de_letra = X_I_OPC;
+ else if (c == '\326') x_de_letra = X_I_OPC;
+ else if (c == '\336') x_de_letra = X_I_OPC;
+ else if (c == '\327') x_de_letra = X_I_OPC;
else if (c == 'J')
x_de_letra = X_J_OPC;
else if (c == 'K')
@@ -4018,10 +4096,14 @@
x_de_letra = X_M_OPC;
else if (c == 'N')
x_de_letra = X_N_OPC;
+ else if (c == '\047') x_de_letra = X_GN_OPC;
else if (c == 'O')
x_de_letra = X_O_OPC;
else if (c == 'P')
x_de_letra = X_P_OPC;
+ else if (c == '\340') x_de_letra = X_O_OPC;
+ else if (c == '\342') x_de_letra = X_O_OPC;
+ else if (c == '\343') x_de_letra = X_O_OPC;
else if (c == 'Q')
x_de_letra = X_Q_OPC;
else if (c == 'R')
@@ -4032,6 +4114,9 @@
x_de_letra = X_T_OPC;
else if (c == 'U')
x_de_letra = X_U_OPC;
+ else if (c == '\353') x_de_letra = X_U_OPC;
+ else if (c == '\352') x_de_letra = X_U_OPC;
+ else if (c == '\351') x_de_letra = X_U_OPC;
else if (c == 'V')
x_de_letra = X_V_OPC;
else if (c == 'W')
Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h 2008-05-24 19:18:17 UTC (rev 32255)
+++ scummvm/trunk/engines/drascula/drascula.h 2008-05-24 21:23:06 UTC (rev 32256)
@@ -175,7 +175,9 @@
#define CHAR_HEIGHT 6
#define Y_ABC 158
+#define Y_ABC_ESP 149
#define Y_SIGNOS 169
+#define Y_SIGNOS_ESP 160
#define Y_ACENTOS 180
#define X_A 6
@@ -356,6 +358,7 @@
uint32 getFeatures() const;
uint16 getVersion() const;
Common::Platform getPlatform() const;
+ Common::Language getLanguage() const;
void updateEvents();
Audio::SoundHandle _soundHandle;
@@ -842,7 +845,7 @@
extern const char *_textsys[][4];
extern const char *_texthis[][5];
extern const char *_textverbs[][6];
-extern const char *_textmisc[][1];
+extern const char *_textmisc[][2];
extern const char *_textd1[][11];
} // End of namespace Drascula
Modified: scummvm/trunk/engines/drascula/texts.cpp
===================================================================
--- scummvm/trunk/engines/drascula/texts.cpp 2008-05-24 19:18:17 UTC (rev 32255)
+++ scummvm/trunk/engines/drascula/texts.cpp 2008-05-24 21:23:06 UTC (rev 32256)
@@ -4677,7 +4677,7 @@
"QU'EST-CE QU'IL Y A, QU'Y A-T-IL?",
"D'ACCORD. CHAMBRE 512. PAR LES ESCALIERS. LA CL EST SUR LA PORTE",
"LE COMTE DRASCULA?!",
- "NON, RIEN, CE TYPE A UNE MAUVAISE RPUTATION PAR ICI",
+ "NON, RIEN, CE TYPE A UNE MAUVAISE R\220PUTATION PAR ICI",
// 5
"EH BIEN, IL Y A DES RUMEURS QUI COURENT SUR LUI. CERTAINS DISENT QUE C'EST UN VAMPIRE ET QU'IL ENLEVE DU MONDE POUR SUCER LEUR SANG ",
"MAIS D'AUTRES PENSENT QU'IL EST SEULEMENT UN TRAFICANT D'ORGANES, ET C'EST POUR CELA QUE DES PERSONNES DPECES SONT APPARUES DANS LES ALENTOURS",
@@ -5308,20 +5308,20 @@
"mover",
},
{
- "look", // TODO Translate it
- "take",
- "open",
- "close",
- "talk",
- "push",
+ "Schau",
+ "Nimm",
+ "oeFFNE",
+ "Schliesse",
+ "Rede",
+ "Druecke",
},
{
- "look", // TODO Translate it
- "take",
- "open",
- "close",
- "talk",
- "push",
+ "regardez",
+ "ramassez",
+ "ouvrez",
+ "fermez",
+ "parlez",
+ "poussez",
},
{
"esamina",
@@ -5334,21 +5334,26 @@
};
-const char *_textmisc[][1] = {
+const char *_textmisc[][2] = {
{
"HUNCHBACKED",
+ "Transilvania, 1993 d.c.",
},
{
"jorobado",
+ "Transilvania, 1993 d.c. (despues de cenar)",
},
{
"HUNCHBACKED",
+ "Transilvania, 1993 d.c.",
},
{
"HUNCHBACKED",
+ "Transilvania, 1993 d.c.",
},
{
"HUNCHBACKED",
+ "Transilvania, 1993 d.c.",
},
};
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