aboutsummaryrefslogtreecommitdiff
path: root/taipan.c
diff options
context:
space:
mode:
Diffstat (limited to 'taipan.c')
-rw-r--r--taipan.c83
1 files changed, 56 insertions, 27 deletions
diff --git a/taipan.c b/taipan.c
index 03ba095..1600fb3 100644
--- a/taipan.c
+++ b/taipan.c
@@ -304,13 +304,20 @@ char *firm = (char *) 0x680;
char *num_buf = (char *) 0x600;
#endif
-char *item[] = { "Opium", "Silk", "Arms", "General Cargo" };
+// char *item[] = { "Opium", "Silk", "Arms", "General Cargo" };
+const char * const item[] = { M_opium, M_silk, M_arms, M_gen_cargo };
-char *location[] = { "At sea", "Hong Kong", "Shanghai", "Nagasaki",
+/*
+const char *location[] = { "At sea", "Hong Kong", "Shanghai", "Nagasaki",
"Saigon", "Manila", "Singapore", "Batavia" };
+ */
+
+const char * const location[] = { M_at_sea, M_hong_kong, M_shanghai,
+ M_nagasaki, M_saigon, M_manila,
+ M_singapore, M_batavia };
// inverse "Jan\0Feb\0Mar\0Apr\0May\0Jun\0Jul\0Aug\0Sep\0Oct\0Nov\0Dec\0";
-char *months = "\xca\xe1\xee\0"
+const char * const months = "\xca\xe1\xee\0"
"\xc6\xe5\xe2\0"
"\xcd\xe1\xf2\0"
"\xc1\xf0\xf2\0"
@@ -323,7 +330,7 @@ char *months = "\xca\xe1\xee\0"
"\xce\xef\xf6\0"
"\xc4\xe5\xe3\0";
-char *st[] = {
+const char * const st[] = {
"\xc3\xf2\xe9\xf4\xe9\xe3\xe1\xec", // inverse "Critical"
"\xa0\xa0\xd0\xef\xef\xf2", // inverse " Poor"
" Fair",
@@ -353,7 +360,7 @@ unsigned long cash = 0,
unsigned long price[4];
-int base_price[4][8] = { {1000, 11, 16, 15, 14, 12, 10, 13},
+const int base_price[4][8] = { {1000, 11, 16, 15, 14, 12, 10, 13},
{100, 11, 14, 15, 16, 10, 13, 12},
{10, 12, 16, 10, 11, 13, 14, 15},
{1, 10, 11, 12, 13, 14, 15, 16} };
@@ -602,7 +609,8 @@ void at_sea(void) {
gotoxy(30, 6);
cspace();
rvs_on();
- cputs(location[0]);
+ // cputs(location[0]);
+ print_msg(location[0]);
rvs_off();
cspaces(3);
@@ -1139,19 +1147,23 @@ char sea_battle(char id, int num_ships) {
print_msg(M_you_have_on_board);
cprint_taipan_colon();
gotoxy(4, 4);
- cputs(item[0]);
+ // cputs(item[0]);
+ print_msg(item[0]);
cputs(": ");
cprintulong(hold_[0]);
gotoxy(24, 4);
- cputs(item[1]);
+ // cputs(item[1]);
+ print_msg(item[1]);
cputs(": ");
cprintulong(hold_[1]);
gotoxy(5, 5);
- cputs(item[2]);
+ // cputs(item[2]);
+ print_msg(item[2]);
cputs(": ");
cprintulong(hold_[2]);
gotoxy(21, 5);
- cputs(item[3]);
+ // cputs(item[3]);
+ print_msg(item[3]);
cputs(": ");
cprintulong(hold_[3]);
@@ -1575,7 +1587,8 @@ void port_stats(void)
cprint_firm_colon();
cputs(firm);
comma_space();
- cputs(location[1]);
+ // cputs(location[1]);
+ print_msg(location[1]);
gotoxy(21, 4);
in_use = warehouse_in_use();
@@ -1657,7 +1670,8 @@ void port_stats(void)
cblank(10);
rvs_on();
if(port == 4 || port == 5) cspace();
- cputs(location[port]);
+ // cputs(location[port]);
+ print_msg(location[port]);
rvs_off();
gotoxy(28, 9);
@@ -2071,7 +2085,8 @@ void transfer(void)
{
compradores_report();
how_much();
- cputs(item[i]);
+ // cputs(item[i]);
+ print_msg(item[i]);
// cputs(" shall I move\r\nto the warehouse");
print_msg(M_move_to_whouse);
cprint_taipan_prompt();
@@ -2129,7 +2144,8 @@ void transfer(void)
{
compradores_report();
how_much();
- cputs(item[i]);
+ // cputs(item[i]);
+ print_msg(item[i]);
// cputs(" shall I move\r\naboard ship");
print_msg(M_move_aboard);
cprint_taipan_prompt();
@@ -2183,7 +2199,8 @@ void quit(void)
if(choice == 7) crlf();
cputc(choice + '0');
cputs(") ");
- cputs(location[choice]);
+ // cputs(location[choice]);
+ print_msg(location[choice]);
if(choice != 7) comma_space();
}
cprint_question_space();
@@ -2393,7 +2410,8 @@ void quit(void)
clear_msg_window();
// cputs("We've been blown off course\r\nto ");
print_msg(M_blown_off_course);
- cputs(location[port]);
+ // cputs(location[port]);
+ print_msg(location[port]);
timed_getch();
}
}
@@ -2457,8 +2475,10 @@ void quit(void)
clear_msg_window();
// cputs("Arriving at ");
print_msg(M_arriving_at);
- cputs(location[port]);
- cputs("...");
+ // cputs(location[port]);
+ print_msg(location[port]);
+ // cputs("...");
+ print_msg(M_ellipsis);
timed_getch();
return;
@@ -2559,8 +2579,10 @@ void you_only_have(unsigned char in_bank) {
cprintfancy_big(bank);
else
cprintfancy(cash);
- cputs("\r\nin ");
- cputs(in_bank ? "the bank" : "cash");
+ // cputs("\r\nin ");
+ print_msg(M_nl_in_spc);
+ // cputs(in_bank ? "the bank" : "cash");
+ print_msg(in_bank ? M_the_bank : M_cash);
cputs(".\r\n");
good_joss_sound();
@@ -2764,8 +2786,10 @@ void good_prices(void) {
cprint_taipan();
// cputs("!! The price of ");
print_msg(M_the_price_of);
- cputs(item[i]);
- cputs("\r\n has ");
+ // cputs(item[i]);
+ print_msg(item[i]);
+ // cputs("\r\n has ");
+ print_msg(M_nl_has_spc);
if(randi()&1) {
price[i] *= (randi()%5 + 5);
@@ -2782,7 +2806,8 @@ void good_prices(void) {
print_msg(M_spc_to_spc);
cprintulong(price[i]);
- cputs("!!\r\n");
+ // cputs("!!\r\n");
+ print_msg(M_bang_bang_nl);
good_joss_sound();
timed_getch();
@@ -2803,9 +2828,11 @@ int port_choices(void) {
for(choice = 0; choice < 4; ++choice) {
gotox(3 + ((choice & 1) * 16));
if(choice == 3)
- cputs("General");
+ // cputs("General");
+ print_msg(M_general_shortname);
else
- cputs(item[choice]);
+ // cputs(item[choice]);
+ print_msg(item[choice]);
cputc(':');
gotox(11 + ((choice & 1) * 18));
cprintulong(price[choice]);
@@ -3020,7 +3047,8 @@ void buy(void) {
rvs_off();
gotoxy(0, 22);
how_much();
- cputs(item[choice]);
+ // cputs(item[choice]);
+ print_msg(item[choice]);
// cputs(" shall");
print_msg(M_spc_shall);
gotoxy(31, 22);
@@ -3072,7 +3100,8 @@ void sell(void) {
clrtobot();
how_much();
- cputs(item[choice]);
+ // cputs(item[choice]);
+ print_msg(item[choice]);
// cputs(" shall\r\nI sell, ");
print_msg(M_shall_i_sell);
cprint_taipan_colon();