diff options
Diffstat (limited to 'mbbsd/guess.c')
-rw-r--r-- | mbbsd/guess.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/mbbsd/guess.c b/mbbsd/guess.c index 6bfa9072..1f989807 100644 --- a/mbbsd/guess.c +++ b/mbbsd/guess.c @@ -8,16 +8,16 @@ show_table(char TABLE[], char ifcomputer) int i; move(0, 35); - prints(SHM->i18nstr[cuser.language][1139]); + prints(I18N[1139]); move(8, 1); - prints(SHM->i18nstr[cuser.language][1140]); + prints(I18N[1140]); prints("\033[1;33m=================\033[m\n"); if (ifcomputer) { - prints(SHM->i18nstr[cuser.language][1141]); - prints(SHM->i18nstr[cuser.language][1142]); + prints(I18N[1141]); + prints(I18N[1142]); } else { for (i = 1; i <= 6; i++) - prints(SHM->i18nstr[cuser.language][1143], i, TABLE[i]); + prints(I18N[1143], i, TABLE[i]); } prints("\033[33m=================\033[m"); } @@ -29,9 +29,9 @@ get_money(void) char data[20]; move(1, 0); - prints(SHM->i18nstr[cuser.language][1144], cuser.money); + prints(I18N[1144], cuser.money); do { - getdata(2, 0, SHM->i18nstr[cuser.language][1145], data, 9, LCECHO); + getdata(2, 0, I18N[1145], data, 9, LCECHO); money = 0; if (data[0] == 'q' || data[0] == 'Q') { unlockutmpmode(); @@ -53,7 +53,7 @@ get_money(void) move(1, 0); clrtoeol(); reload_money(); - prints(SHM->i18nstr[cuser.language][1146], cuser.money - money); + prints(I18N[1146], cuser.money - money); return money; } @@ -78,7 +78,7 @@ static char * get_data(char data[5], int count) { while (1) { - getdata(6, 0, SHM->i18nstr[cuser.language][1147], data, 5, LCECHO); + getdata(6, 0, I18N[1147], data, 5, LCECHO); if (check_data(data) == 1) break; } @@ -173,7 +173,7 @@ computer(int correct, int total, char flag[], int n[]) if (k == 40) { move(total + 8, 25); snprintf(data, sizeof(data), "%04d", guess); - prints(SHM->i18nstr[cuser.language][1148], data); + prints(I18N[1148], data); return 1; } else { move(total + 8, 25); @@ -227,28 +227,28 @@ guess_main() FILE *file; clear(); - showtitle(SHM->i18nstr[cuser.language][1149], BBSName); + showtitle(I18N[1149], BBSName); lockreturn0(GUESSNUM, LOCK_MULTI); reload_money(); if (cuser.money < 5) { clear(); move(12, 35); - prints(SHM->i18nstr[cuser.language][1150]); + prints(I18N[1150]); unlockutmpmode(); pressanykey(); return 1; } if ((money = get_money()) == 0) return 1; - vice(money, SHM->i18nstr[cuser.language][1151]); + vice(money, I18N[1151]); Diff_Random(answer); move(2, 0); clrtoeol(); - prints(SHM->i18nstr[cuser.language][1152], money); + prints(I18N[1152], money); - getdata_str(4, 0, SHM->i18nstr[cuser.language][1153], + getdata_str(4, 0, I18N[1153], ifcomputer, sizeof(ifcomputer), LCECHO, "y"); if (ifcomputer[0] == 'y') { ifcomputer[0] = 1; @@ -259,17 +259,17 @@ guess_main() } if (ifcomputer[0]) { do { - getdata(5, 0, SHM->i18nstr[cuser.language][1154], + getdata(5, 0, I18N[1154], yournum, sizeof(yournum), LCECHO); } while (!legal(atoi(yournum))); move(8, 25); - prints(SHM->i18nstr[cuser.language][1155]); + prints(I18N[1155]); flag = malloc(sizeof(char) * 10000); n = malloc(sizeof(int) * 1500); initcomputer(flag); } move(8, 55); - prints(SHM->i18nstr[cuser.language][1156]); + prints(I18N[1156]); while (((!computerwin || !youwin) && count < 10 && (ifcomputer[0])) || (!ifcomputer[0] && count < 10 && !youwin)) { if (!computerwin && ifcomputer[0]) { @@ -278,7 +278,7 @@ guess_main() computerwin = 1; } move(20, 55); - prints(SHM->i18nstr[cuser.language][1157], count + 1); + prints(I18N[1157], count + 1); if (!youwin) { ++count; if (guess_play(get_data(data, count), answer, count)) @@ -290,33 +290,33 @@ guess_main() free(n); if (ifcomputer[0]) { if (count > c_count) { - prints(SHM->i18nstr[cuser.language][1158]); + prints(I18N[1158]); move(18, 35); - prints(SHM->i18nstr[cuser.language][1159], money); + prints(I18N[1159], money); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, SHM->i18nstr[cuser.language][1160], c_count); + fprintf(file, I18N[1160], c_count); if (youwin) - fprintf(file, SHM->i18nstr[cuser.language][1161], cuser.userid, count); + fprintf(file, I18N[1161], cuser.userid, count); else - fprintf(file, SHM->i18nstr[cuser.language][1162], cuser.userid); - fprintf(file, SHM->i18nstr[cuser.language][1163], cuser.userid, money); + fprintf(file, I18N[1162], cuser.userid); + fprintf(file, I18N[1163], cuser.userid, money); fclose(file); } } else if (count < c_count) { - prints(SHM->i18nstr[cuser.language][1164]); + prints(I18N[1164]); move(18, 35); - prints(SHM->i18nstr[cuser.language][1165], money * 2); + prints(I18N[1165], money * 2); demoney(money * 2); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, SHM->i18nstr[cuser.language][1166], cuser.userid, count, + fprintf(file, I18N[1166], cuser.userid, count, c_count, money * 2); fclose(file); } } else { - prints(SHM->i18nstr[cuser.language][1167], money); + prints(I18N[1167], money); demoney(money); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, SHM->i18nstr[cuser.language][1168], cuser.userid); + fprintf(file, I18N[1168], cuser.userid); fclose(file); } } @@ -327,26 +327,26 @@ guess_main() if (youwin) { demoney(TABLE[count] * money); if (count < 5) { - prints(SHM->i18nstr[cuser.language][1169]); + prints(I18N[1169]); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, SHM->i18nstr[cuser.language][1170], + fprintf(file, I18N[1170], cuser.userid, count, TABLE[count] * money); fclose(file); } } else if (count > 5) { - prints(SHM->i18nstr[cuser.language][1171]); + prints(I18N[1171]); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, SHM->i18nstr[cuser.language][1172], + fprintf(file, I18N[1172], cuser.userid, count, money); fclose(file); } } else { - prints(SHM->i18nstr[cuser.language][1173]); + prints(I18N[1173]); move(18, 35); clrtoeol(); - prints(SHM->i18nstr[cuser.language][1174], money); + prints(I18N[1174], money); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, SHM->i18nstr[cuser.language][1175], + fprintf(file, I18N[1175], cuser.userid, count, money); fclose(file); } @@ -356,11 +356,11 @@ guess_main() return 1; } move(17, 35); - prints(SHM->i18nstr[cuser.language][1176], answer); + prints(I18N[1176], answer); move(18, 35); - prints(SHM->i18nstr[cuser.language][1177]); + prints(I18N[1177]); if ((file = fopen(BBSHOME "/etc/loseguess.log", "a"))) { - fprintf(file, SHM->i18nstr[cuser.language][1178], cuser.userid, money); + fprintf(file, I18N[1178], cuser.userid, money); fclose(file); } unlockutmpmode(); |