diff options
author | Filippos Karapetis | 2008-05-29 12:17:40 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-05-29 12:17:40 +0000 |
commit | 7a22a632448a0067419757fe431e25eb343a2a38 (patch) | |
tree | 0e2a633c774a83df7fb184d75985d8b8abff01d0 | |
parent | 5779261c16434369701704ea4314dd5b3e13351a (diff) | |
download | scummvm-rg350-7a22a632448a0067419757fe431e25eb343a2a38.tar.gz scummvm-rg350-7a22a632448a0067419757fe431e25eb343a2a38.tar.bz2 scummvm-rg350-7a22a632448a0067419757fe431e25eb343a2a38.zip |
Simplified calls to talk_igor_dch, talk_dr_izq and talk_dr_dch
Removed loads of font definitions and simplified some of the internal font mapping
svn-id: r32359
-rw-r--r-- | engines/drascula/animation.cpp | 92 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 244 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 79 | ||||
-rw-r--r-- | engines/drascula/talk.cpp | 18 |
4 files changed, 141 insertions, 292 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index a2cd43eac2..f01a427eb5 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -183,17 +183,17 @@ void DrasculaEngine::animation_1_1() { pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_igor_dch(_texti[_lang][8], "I8.als"); + talk_igor_dch(8); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_dr_izq(_textd[_lang][2], "d2.als"); + talk_dr_izq(2); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(_textd[_lang][3], "d3.als"); + talk_dr_izq(3); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; if (anima("lib.bin", 16)) @@ -250,17 +250,17 @@ void DrasculaEngine::animation_1_1() { stopMusic(); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][9], "I9.als"); + talk_igor_dch(9); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(_textd[_lang][9], "d9.als"); + talk_dr_izq(9); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][10], "I10.als"); + talk_igor_dch(10); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; playMusic(11); - talk_dr_izq(_textd[_lang][10], "d10.als"); + talk_dr_izq(10); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; if (anima("rayo1.bin", 16)) @@ -282,10 +282,10 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 1; - talk_igor_dch(_texti[_lang][1], "I1.als"); + talk_igor_dch(1); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_dch(_textd[_lang][11], "d11.als"); + talk_dr_dch(11); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -299,7 +299,7 @@ void DrasculaEngine::animation_1_1() { pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_dr_izq(_textd[_lang][12], "d12.als"); + talk_dr_izq(12); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -313,11 +313,11 @@ void DrasculaEngine::animation_1_1() { pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_igor_dch(_texti[_lang][2], "I2.als"); + talk_igor_dch(2); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; pause(13); - talk_dr_dch(_textd[_lang][13],"d13.als"); + talk_dr_dch(13); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -331,26 +331,26 @@ void DrasculaEngine::animation_1_1() { pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_dr_izq(_textd[_lang][14], "d14.als"); + talk_dr_izq(14); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][3], "I3.als"); + talk_igor_dch(3); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(_textd[_lang][15], "d15.als"); + talk_dr_izq(15); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][4], "I4.als"); + talk_igor_dch(4); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(_textd[_lang][16], "d16.als"); + talk_dr_izq(16); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][5], "I5.als"); + talk_igor_dch(5); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_igor = 3; - talk_dr_izq(_textd[_lang][17], "d17.als"); + talk_dr_izq(17); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; pause(18); @@ -2272,24 +2272,24 @@ void DrasculaEngine::animation_1_6() { decompressPic(dir_dibujo2, 1); loadPic("car.alg"); decompressPic(dir_hare_fondo, 1); - talk_dr_dch(_textd[_lang][19], "D19.als"); - talk(_text[_lang][247], "247.als"); - talk_dr_dch(_textd[_lang][20], "d20.als"); - talk_dr_dch(_textd[_lang][21], "d21.als"); - talk(_text[_lang][248], "248.als"); - talk_dr_dch(_textd[_lang][22], "d22.als"); - talk(_text[_lang][249], "249.als"); - talk_dr_dch(_textd[_lang][23], "d23.als"); + talk_dr_dch(19); + talk(247); + talk_dr_dch(20); + talk_dr_dch(21); + talk(248); + talk_dr_dch(22); + talk(249); + talk_dr_dch(23); conversa("op_11.cal"); - talk_dr_dch(_textd[_lang][26], "d26.als"); + talk_dr_dch(26); anima("fum.bin", 15); - talk_dr_dch(_textd[_lang][27], "d27.als"); - talk(_text[_lang][254], "254.als"); - talk_dr_dch(_textd[_lang][28], "d28.als"); - talk(_text[_lang][255], "255.als"); - talk_dr_dch(_textd[_lang][29], "d29.als"); + talk_dr_dch(27); + talk(254); + talk_dr_dch(28); + talk(255); + talk_dr_dch(29); FundeAlNegro(1); clearRoom(); loadPic("time1.alg"); @@ -2303,9 +2303,9 @@ void DrasculaEngine::animation_1_6() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); FundeDelNegro(1); - talk(_text[_lang][256], "256.als"); - talk_dr_dch(_textd[_lang][30], "d30.als"); - talk(_text[_lang][257], "257.als"); + talk(256); + talk_dr_dch(30); + talk(257); FundeAlNegro(0); clearRoom(); loadPic("time1.alg"); @@ -2317,17 +2317,17 @@ void DrasculaEngine::animation_1_6() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); FundeDelNegro(1); - talk(_text[_lang][258], "258.als"); - talk_dr_dch(_textd[_lang][31], "d31.als"); + talk(258); + talk_dr_dch(31); animation_5_6(); - talk_dr_dch(_textd[_lang][32], "d32.als"); - talk_igor_dch(_texti[_lang][11], "I11.als"); + talk_dr_dch(32); + talk_igor_dch(11); sentido_igor = 3; - talk_dr_dch(_textd[_lang][33], "d33.als"); + talk_dr_dch(33); talk_igor_frente(_texti[_lang][12], "I12.als"); - talk_dr_dch(_textd[_lang][34], "d34.als"); + talk_dr_dch(34); sentido_dr = 0; - talk_dr_izq(_textd[_lang][35], "d35.als"); + talk_dr_izq(35); if (_lang == kSpanish) dir_texto = dir_hare_dch; @@ -2338,15 +2338,15 @@ void DrasculaEngine::animation_1_6() { } void DrasculaEngine::animation_2_6() { - talk_dr_dch(_textd[_lang][24], "d24.als"); + talk_dr_dch(24); } void DrasculaEngine::animation_3_6() { - talk_dr_dch(_textd[_lang][24], "d24.als"); + talk_dr_dch(24); } void DrasculaEngine::animation_4_6() { - talk_dr_dch(_textd[_lang][25], "d25.als"); + talk_dr_dch(25); } void DrasculaEngine::animation_5_6() { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 5c274b1ef0..2f3f5e9c98 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1638,70 +1638,27 @@ bool DrasculaEngine::saves() { return true; } +struct charInfo { + +}; + void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) { int pos_texto[8]; int y_de_letra = 0, x_de_letra = 0, h, length; length = strlen(said); + for (h = 0; h < length; h++) { y_de_letra = (_lang == kSpanish) ? Y_ABC_ESP : Y_ABC; int c = toupper(said[h]); - if (c == 'A') - x_de_letra = X_A; - else if (c == 'B') - x_de_letra = X_B; - else if (c == 'C') - x_de_letra = X_C; - else if (c == 'D') - x_de_letra = X_D; - else if (c == 'E') - x_de_letra = X_E; - else if (c == 'F') - x_de_letra = X_F; - else if (c == 'G') - x_de_letra = X_G; - else if (c == 'H') - x_de_letra = X_H; - else if (c == 'I') - x_de_letra = X_I; - else if (c == 'J') - x_de_letra = X_J; - else if (c == 'K') - x_de_letra = X_K; - else if (c == 'L') - x_de_letra = X_L; - else if (c == 'M') - x_de_letra = X_M; - else if (c == 'N') - x_de_letra = X_N; - else if (c == 'O') - x_de_letra = X_O; - else if (c == 'P') - x_de_letra = X_P; - else if (c == 'Q') - x_de_letra = X_Q; - else if (c == 'R') - x_de_letra = X_R; - else if (c == 'S') - x_de_letra = X_S; - else if (c == 'T') - x_de_letra = X_T; - else if (c == 'U') - x_de_letra = X_U; - else if (c == 'V') - x_de_letra = X_V; - else if (c == 'W') - x_de_letra = X_W; - else if (c == 'X') - x_de_letra = X_X; - else if (c == 'Y') - x_de_letra = X_Y; - else if (c == 'Z') - x_de_letra = X_Z; - else if (c == '\245') + if (c == '\245') x_de_letra = X_GN; else if (c == '\244') x_de_letra = X_GN; + else if (c >= 'A' && c <= 'N') + x_de_letra = X_A + (c - 'A') * 9; + else if (c >= 'O' && c <= 'Z') + x_de_letra = X_A + (c - 'O') * 9; else if (c == 0xa7 || c == ' ') x_de_letra = SPACE; else { @@ -1748,60 +1705,42 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) x_de_letra = X_ASTERISCO; else if (c == '+') x_de_letra = X_PLUS; - else if (c == '1') - x_de_letra = X_N1; - else if (c == '2') - x_de_letra = X_N2; - else if (c == '3') - x_de_letra = X_N3; - else if (c == '4') - x_de_letra = X_N4; - else if (c == '5') - x_de_letra = X_N5; - else if (c == '6') - x_de_letra = X_N6; - else if (c == '7') - x_de_letra = X_N7; - else if (c == '8') - x_de_letra = X_N8; - else if (c == '9') - x_de_letra = X_N9; - else if (c == '0') - x_de_letra = X_N0; + else if (c >= '1' && c <= '0') + x_de_letra = X_N1 + (c - '1') * 9; else y_de_letra=Y_ACENTOS; if (c == '\240') 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 =='\202') x_de_letra = X_A + 1 * 9; // B + else if (c =='\241') x_de_letra = X_A + 2 * 9; // C + else if (c =='\242') x_de_letra = X_A + 3 * 9; // D + else if (c =='\243') x_de_letra = X_A + 4 * 9; // E + else if (c =='\205') x_de_letra = X_A + 5 * 9; // F + else if (c =='\212') x_de_letra = X_A + 6 * 9; // G + else if (c =='\215') x_de_letra = X_A + 7 * 9; // H + else if (c =='\225') x_de_letra = X_A + 8 * 9; // I + else if (c =='\227') x_de_letra = X_A + 9 * 9; // J + else if (c =='\203') x_de_letra = X_A + 10 * 9; // K + else if (c =='\210') x_de_letra = X_A + 11 * 9; // L + else if (c =='\214') x_de_letra = X_A + 12 * 9; // M + else if (c =='\223') x_de_letra = X_A + 13 * 9; // 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 =='\200') x_de_letra = X_O + 1 * 9; // P + else if (c =='\207') x_de_letra = X_O + 1 * 9; // 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 =='\220') x_de_letra = X_A + 1 * 9; // B + else if (c =='\326') x_de_letra = X_A + 2 * 9; // C + else if (c =='\340') x_de_letra = X_A + 3 * 9; // D + else if (c =='\351') x_de_letra = X_A + 4 * 9; // E + else if (c =='\267') x_de_letra = X_A + 5 * 9; // F + else if (c =='\324') x_de_letra = X_A + 6 * 9; // G + else if (c =='\336') x_de_letra = X_A + 7 * 9; // H + else if (c =='\343') x_de_letra = X_A + 8 * 9; // I + else if (c =='\353') x_de_letra = X_A + 9 * 9; // J + else if (c =='\266') x_de_letra = X_A + 10 * 9; // K + else if (c =='\322') x_de_letra = X_A + 11 * 9; // L + else if (c =='\327') x_de_letra = X_A + 12 * 9; // M + else if (c =='\342') x_de_letra = X_A + 13 * 9; // N else if (c =='\352') x_de_letra = X_GN; } @@ -4043,76 +3982,29 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta } int c = toupper(said[h]); - if (c == 'A') - x_de_letra = X_A_OPC; - else if (c == '\265') x_de_letra = X_A_OPC; + + 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') - x_de_letra = X_G_OPC; - else if (c == 'H') - 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') - x_de_letra = X_K_OPC; - else if (c == 'L') - x_de_letra = X_L_OPC; - else if (c == 'M') - x_de_letra = X_M_OPC; - else if (c == 'N') - x_de_letra = X_N_OPC; + else if (c == '\200') x_de_letra = X_A_OPC + 2 * 7; // C + else if (c == '\207') x_de_letra = X_A_OPC + 2 * 7; // C + else if (c == '\220') x_de_letra = X_A_OPC + 4 * 7; // E + else if (c == '\324') x_de_letra = X_A_OPC + 4 * 7; // E + else if (c == '\322') x_de_letra = X_A_OPC + 4 * 7; // E + else if (c == '\326') x_de_letra = X_A_OPC + 8 * 7; // I + else if (c == '\336') x_de_letra = X_A_OPC + 8 * 7; // I + else if (c == '\327') x_de_letra = X_A_OPC + 8 * 7; // I 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') - x_de_letra = X_R_OPC; - else if (c == 'S') - x_de_letra = X_S_OPC; - else if (c == 'T') - 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') - x_de_letra = X_W_OPC; - else if (c == 'X') - x_de_letra = X_X_OPC; - else if (c == 'Y') - x_de_letra = X_Y_OPC; - else if (c == 'Z') - x_de_letra = X_Z_OPC; + else if (c == '\353') x_de_letra = X_O_OPC + 6 * 7; // U + else if (c == '\352') x_de_letra = X_O_OPC + 6 * 7; // U + else if (c == '\351') x_de_letra = X_O_OPC + 6 * 7; // U + else if (c >= 'A' && c <= 'N') + x_de_letra = X_A_OPC + (c - 'A') * 7; + else if (c >= 'O' && c <= 'Z') + x_de_letra = X_O_OPC + (c - 'O') * 7; else if (c == ' ') x_de_letra = SPACE_OPC; else { @@ -4159,26 +4051,8 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta x_de_letra = X_ASTERISCO_OPC; else if (c == '+') x_de_letra = X_PLUS_OPC; - else if (c == '1') - x_de_letra = X_N1_OPC; - else if (c == '2') - x_de_letra = X_N2_OPC; - else if (c == '3') - x_de_letra = X_N3_OPC; - else if (c == '4') - x_de_letra = X_N4_OPC; - else if (c == '5') - x_de_letra = X_N5_OPC; - else if (c == '6') - x_de_letra = X_N6_OPC; - else if (c == '7') - x_de_letra = X_N7_OPC; - else if (c == '8') - x_de_letra = X_N8_OPC; - else if (c == '9') - x_de_letra = X_N9_OPC; - else if (c == '0') - x_de_letra = X_N0_OPC; + else if (c >= '1' && c <= '0') + x_de_letra = X_N1_OPC + (c - '1') * 7; } pos_texto[0] = x_de_letra; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 512ebb9950..6e7d35614a 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -98,32 +98,15 @@ struct RoomTalkAction; #define Y_SIGNOS_ESP 160 #define Y_ACENTOS 180 +// Normal font, each letter has a space of 9 from the next +// Spanish has a special character, defined as "X_GN" +// after N, so these are split from A-N and O-Z #define X_A 6 -#define X_B 15 -#define X_C 24 -#define X_D 33 -#define X_E 42 -#define X_F 51 -#define X_G 60 -#define X_H 69 -#define X_I 78 -#define X_J 87 -#define X_K 96 -#define X_L 105 -#define X_M 114 +// (...) #define X_N 123 #define X_GN 132 #define X_O 141 -#define X_P 150 -#define X_Q 159 -#define X_R 168 -#define X_S 177 -#define X_T 186 -#define X_U 195 -#define X_V 204 -#define X_W 213 -#define X_X 222 -#define X_Y 231 +// (...) #define X_Z 240 #define X_DOT 6 #define X_COMA 15 @@ -145,15 +128,9 @@ struct RoomTalkAction; #define X_BRACKET_CLOSE 159 #define X_ASTERISCO 168 #define X_PLUS 177 -#define X_N1 186 -#define X_N2 195 -#define X_N3 204 -#define X_N4 213 -#define X_N5 222 -#define X_N6 231 -#define X_N7 240 -#define X_N8 249 -#define X_N9 258 +// Normal font, each number has a space of 9 from the next +#define X_N1 186 +// (...) #define X_N0 267 #define SPACE 250 #define ALTO_TALK_HARE 25 @@ -183,32 +160,15 @@ struct RoomTalkAction; #define Y_SIGNOS_OPC_2 40 #define Y_ABC_OPC_3 56 #define Y_SIGNOS_OPC_3 65 +// Dialog font, each letter has a space of 7 from the next +// Spanish has a special character, defined as "X_GN_OPC" +// after N, so these are split from A-N and O-Z #define X_A_OPC 10 -#define X_B_OPC 17 -#define X_C_OPC 24 -#define X_D_OPC 31 -#define X_E_OPC 38 -#define X_F_OPC 45 -#define X_G_OPC 52 -#define X_H_OPC 59 -#define X_I_OPC 66 -#define X_J_OPC 73 -#define X_K_OPC 80 -#define X_L_OPC 87 -#define X_M_OPC 94 +// (...) #define X_N_OPC 101 #define X_GN_OPC 108 #define X_O_OPC 115 -#define X_P_OPC 122 -#define X_Q_OPC 129 -#define X_R_OPC 136 -#define X_S_OPC 143 -#define X_T_OPC 150 -#define X_U_OPC 157 -#define X_V_OPC 164 -#define X_W_OPC 171 -#define X_X_OPC 178 -#define X_Y_OPC 185 +// (...) #define X_Z_OPC 192 #define SPACE_OPC 199 #define X_DOT_OPC 10 @@ -231,15 +191,9 @@ struct RoomTalkAction; #define X_BRACKET_CLOSE_OPC 129 #define X_ASTERISCO_OPC 136 #define X_PLUS_OPC 143 +// Dialog font, each number has a space of 7 from the next #define X_N1_OPC 150 -#define X_N2_OPC 157 -#define X_N3_OPC 164 -#define X_N4_OPC 171 -#define X_N5_OPC 178 -#define X_N6_OPC 185 -#define X_N7_OPC 192 -#define X_N8_OPC 199 -#define X_N9_OPC 206 +// (...) #define X_N0_OPC 213 #define NO_DOOR 99 @@ -532,8 +486,11 @@ public: void pon_bj(); void pon_dr(); void talkInit(const char *filename); + 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_solo(const char *, const char *); void talk_igor_frente(const char *, const char *); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index d6f393aa2a..3a6272e2a4 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -40,6 +40,12 @@ void DrasculaEngine::talkInit(const char *filename) { } } +void DrasculaEngine::talk_igor_dch(int index) { + char name[20]; + sprintf(name, "I%i.als", index); + talk_igor_dch(_texti[_lang][index], name); +} + void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; int cara; @@ -96,6 +102,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } +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) { int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; int cara; @@ -158,6 +170,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } +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 cara; |