aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-01-07 08:34:14 -0500
committerB. Watson <yalhcru@gmail.com>2016-01-07 08:34:14 -0500
commit1478b0c357fac4cabb574e521f69e062bf0e4d70 (patch)
treee2ecddaf6fa59df51f48bd5da0c72dbaf3b3160b
parentb3532358b55af97983418e6edbf76029bc2e7162 (diff)
downloadtaipan-1478b0c357fac4cabb574e521f69e062bf0e4d70.tar.gz
code cleanup, add missing sound
-rw-r--r--sounds.h2
-rw-r--r--taipan.c71
2 files changed, 7 insertions, 66 deletions
diff --git a/sounds.h b/sounds.h
index 911e6dd..d121a70 100644
--- a/sounds.h
+++ b/sounds.h
@@ -61,7 +61,7 @@ you have only X in the bank *
warehouse will only hold an additional *
warehouse is full *
won't loan you so much *
-you have no cargo (trying to put in warehouse)
+you have no cargo (trying to put in warehouse) *
under_attack_sound: CALL 2512
X hostile ships approaching *
diff --git a/taipan.c b/taipan.c
index e3aee52..44c8f78 100644
--- a/taipan.c
+++ b/taipan.c
@@ -333,22 +333,6 @@ void new_ship(void) {
damage = 0;
}
- /*
- while ((choice != 'Y') && (choice != 'y') &&
- (choice != 'N') && (choice != 'n'))
- {
- choice = get_one();
- }
-
- if ((choice == 'Y') || (choice == 'y'))
- {
- cash -= amount;
- hold += 50;
- capacity += 50;
- damage = 0;
- }
- */
-
if ((randi()%2 == 0) && (guns < 1000))
{
port_stats();
@@ -388,21 +372,6 @@ void new_gun(void)
guns += 1;
}
- /*
- while ((choice != 'Y') && (choice != 'y') &&
- (choice != 'N') && (choice != 'n'))
- {
- choice = get_one();
- }
-
- if ((choice == 'Y') || (choice == 'y'))
- {
- cash -= amount;
- hold -= 10;
- guns += 1;
- }
- */
-
port_stats();
return;
@@ -780,28 +749,6 @@ int sea_battle(int id, int num_ships) {
cputs("What shall I throw overboard, Taipan? ");
choice = get_item(1);
- /*
- while ((choice != 'o') &&
- (choice != 's') &&
- (choice != 'a') &&
- (choice != 'g') &&
- (choice != '*'))
- {
- choice = lcgetc();
- }
-
- if(choice == 'o') {
- choice = 0;
- } else if(choice == 's') {
- choice = 1;
- } else if(choice == 'a') {
- choice = 2;
- } else if(choice == 'g') {
- choice = 3;
- } else {
- choice = 4;
- }
- */
if(choice < 4) {
gotoxy(0, 6);
@@ -851,8 +798,6 @@ int sea_battle(int id, int num_ships) {
clrtoeol();
cputs("There's nothing there, Taipan!");
good_joss_sound();
- // gotoxy(0, 18);
- // clrtobot();
timed_getch(TMOUT_3S);
}
@@ -1435,13 +1380,6 @@ void mchenry(void)
cputs("Will ye be wanting repairs? ");
choice = yngetc('y');
- /*
- while ((choice != 'Y') && (choice != 'y') &&
- (choice != 'N') && (choice != 'n'))
- {
- choice = get_one();
- }
- */
if(choice == 'y') {
static int percent, time;
@@ -1565,8 +1503,8 @@ void final_stats(void)
chline(31);
cputc(5); // upper right corner
cputs("\r\n");
- // cputs(" _______________________________\r\n");
cputc('|');
+
if (finalcash > 49999L)
{
revers(1);
@@ -1575,6 +1513,7 @@ void final_stats(void)
revers(0);
cputs(" 50,000 and over |\r\n");
cputc('|');
+
if ((finalcash < 50000L) && (finalcash > 7999L))
{
revers(1);
@@ -1583,6 +1522,7 @@ void final_stats(void)
revers(0);
cputs(" 8,000 to 49,999|\r\n");
cputc('|');
+
if ((finalcash < 8000L) && (finalcash > 999L))
{
revers(1);
@@ -1591,6 +1531,7 @@ void final_stats(void)
revers(0);
cputs(" 1,000 to 7,999|\r\n");
cputc('|');
+
if ((finalcash < 1000) && (finalcash > 499))
{
revers(1);
@@ -1599,6 +1540,7 @@ void final_stats(void)
revers(0);
cputs(" 500 to 999|\r\n");
cputc('|');
+
if (finalcash < 500)
{
revers(1);
@@ -1607,8 +1549,6 @@ void final_stats(void)
revers(0);
cputs(" less than 500|\r\n");
- // cputs("|_______________________________|\r\n\r\n");
-
cputc(26); // lower left corner
chline(31);
cputc(3); // lower right corner
@@ -1670,6 +1610,7 @@ void transfer(void)
gotoxy(0, 22);
clrtobot();
cputs("You have no cargo, Taipan.\r\n");
+ good_joss_sound();
timed_getch(TMOUT_5S);
return;