diff options
Diffstat (limited to 'taipan.c')
-rw-r--r-- | taipan.c | 31 |
1 files changed, 27 insertions, 4 deletions
@@ -290,6 +290,7 @@ void captains_report() { void overload(void) { compradores_report(); cputs("Your ship is overloaded, Taipan!!"); + good_joss_sound(); timed_getch(TMOUT_5S); return; } @@ -676,6 +677,7 @@ int sea_battle(int id, int num_ships) { sk++; ships_on_screen[targeted] = 0; + bad_joss_sound(); /* not sure this should be here */ sink_lorcha(targeted); plus_or_space(num_ships > num_on_screen); @@ -695,6 +697,7 @@ int sea_battle(int id, int num_ships) { cputs("Sunk "); cprintulong(sk); cputs(" of the buggers, Taipan!"); + bad_joss_sound(); } else { cputs("Hit 'em, but didn't sink 'em, Taipan!"); } @@ -711,6 +714,7 @@ int sea_battle(int id, int num_ships) { clrtoeol(); cprintulong(ran); cputs(" ran away, Taipan!"); + bad_joss_sound(); if(num_ships <= 10) { for(i = 9; i >= 0; i--) { @@ -824,6 +828,7 @@ int sea_battle(int id, int num_ships) { gotoxy(0, 3); clrtoeol(); cputs("Let's hope we lose 'em, Taipan!"); + bad_joss_sound(); if (choice < 4) { hold_[choice] -= amount; hold += amount; @@ -865,6 +870,7 @@ int sea_battle(int id, int num_ships) { gotoxy(0, 3); clrtoeol(); cputs("We got away from 'em, Taipan!"); + good_joss_sound(); timed_getch(TMOUT_3S); num_ships = 0; } else { @@ -1028,6 +1034,7 @@ int sea_battle(int id, int num_ships) { gotoxy(0, 3); clrtoeol(); cputs("We got 'em all, Taipan!"); + bad_joss_sound(); timed_getch(TMOUT_3S); return 1; @@ -1772,6 +1779,7 @@ void quit(void) if (choice == port) { cputs("\r\n\nYou're already here, Taipan."); + good_joss_sound(); timed_getch(TMOUT_5S); } else if ((choice >= 1) && (choice <= 7)) { port = choice; @@ -1796,6 +1804,7 @@ void quit(void) } cprintulong(num_ships); cputs(" hostile ships approaching, Taipan!\r\n"); + under_attack_sound(); timed_getch(TMOUT_3S); @@ -1819,12 +1828,14 @@ void quit(void) gotoxy(0, 18); clrtobot(); cputs("Li Yuen's pirates, Taipan!!\r\n\n"); + bad_joss_sound(); timed_getch(TMOUT_3S); if (li > 0) { cputs("Good joss!! They let us be!!\r\n"); + bad_joss_sound(); timed_getch(TMOUT_3S); @@ -1836,7 +1847,7 @@ void quit(void) cprintulong(num_ships); cputs(" ships of Li Yuen's pirate\r\n"); cputs("fleet, Taipan!!\r\n"); - + under_attack_sound(); timed_getch(TMOUT_3S); sea_battle(LI_YUEN, num_ships); @@ -1858,8 +1869,10 @@ void quit(void) cputs(fancy_num); cputc('!'); cash += booty; + good_joss_sound(); } else if (result == 3) { cputs("We made it!"); + good_joss_sound(); } else { cputs("The buggers got us, Taipan!!!\r\n"); cputs("It's all over, now!!!"); @@ -1878,6 +1891,7 @@ void quit(void) gotoxy(0, 18); clrtobot(); cputs("Storm, Taipan!!\r\n\n"); + bad_joss_sound(); timed_getch(TMOUT_3S); if (randi()%30 == 0) @@ -1908,6 +1922,7 @@ void quit(void) } cputs(" We made it!!\r\n\n"); + bad_joss_sound(); timed_getch(TMOUT_3S); if (randi()%3 == 0) @@ -2123,6 +2138,7 @@ void elder_brother_wu(void) { compradores_report(); cputs("Very well, Taipan, the game is over!\r\n"); + under_attack_sound(); timed_getch(TMOUT_5S); @@ -2134,6 +2150,7 @@ void elder_brother_wu(void) compradores_report(); cputs("Very well, Taipan. Good joss!!\r\n"); + bad_joss_sound(); timed_getch(TMOUT_5S); @@ -2282,6 +2299,7 @@ void good_prices(void) cprintulong(price[i]); cputs("!!\r\n"); + good_joss_sound(); timed_getch(TMOUT_3S); } @@ -2442,8 +2460,13 @@ void name_firm(void) gotoxy(12, 13); - while(((input = agetc()) != ENTER) && (count < 22)) { - if(input == BKSP) { + while((input = agetc()) && (count < 22)) { + if(input == ENTER) { + if(count) + break; + else + bad_joss_sound(); + } else if(input == BKSP) { if(count) { backspace(); firm[count--] = '\0'; @@ -2862,7 +2885,7 @@ int main(void) { cputs("Li Yuen has sent a Lieutenant,\r\n"); cputs("Taipan. He says his admiral wishes\r\n"); cputs("to see you in Hong Kong, posthaste!\r\n"); - + bad_joss_sound(); timed_getch(TMOUT_3S); } |