aboutsummaryrefslogtreecommitdiff
path: root/taipan.c
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-04-16 03:44:19 -0400
committerB. Watson <yalhcru@gmail.com>2021-04-16 03:44:19 -0400
commitae5f5a198af08539ee24a78be2a6bcb8b5956a26 (patch)
tree65635e020377c895c3b8a3f3753725cc20425714 /taipan.c
parent0a3d31082851621d9e42ff429314a34c80a6f892 (diff)
downloadtaipan-ae5f5a198af08539ee24a78be2a6bcb8b5956a26.tar.gz
Save 59 bytes
Diffstat (limited to 'taipan.c')
-rw-r--r--taipan.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/taipan.c b/taipan.c
index b322c91..f299091 100644
--- a/taipan.c
+++ b/taipan.c
@@ -329,7 +329,7 @@ void transfer(void);
void quit(void);
void overload(void);
char sea_battle(char id, int num_ships);
-void fight_stats(int ships, int orders);
+void fight_stats(int ships);
void mchenry(void);
void retire(void);
void final_stats(void);
@@ -972,7 +972,20 @@ void update_guns() {
// hide_cursor();
}
-void fight_stats(int ships, int orders) {
+char orders = 0;
+extern void set_orders(void);
+/*
+void set_orders(void) {
+ switch(timed_getch()) {
+ case 'f': orders = 1; break;
+ case 'r': orders = 2; break;
+ case 't': orders = 3; break;
+ default: break;
+ }
+}
+*/
+
+void fight_stats(int ships) {
gotox0y(0);
justify_int(ships);
@@ -1014,19 +1027,6 @@ void plus_or_space(unsigned char b) {
}
*/
-char orders = 0;
-extern void set_orders(void);
-/*
-void set_orders(void) {
- switch(timed_getch()) {
- case 'f': orders = 1; break;
- case 'r': orders = 2; break;
- case 't': orders = 3; break;
- default: break;
- }
-}
-*/
-
#ifdef CART_TARGET
# pragma code-name (pop)
#endif
@@ -1087,7 +1087,7 @@ char sea_battle(char id, int num_ships) {
rvs_off();
update_guns();
- fight_stats(num_ships, orders);
+ fight_stats(num_ships);
while(num_ships > 0) {
if(damage >= capacity) return 4;
@@ -1148,7 +1148,7 @@ char sea_battle(char id, int num_ships) {
}
}
- fight_stats(num_ships, orders);
+ fight_stats(num_ships);
if((orders == 1) && (guns > 0)) {
static int targeted, sk;
sk = 0;
@@ -1214,7 +1214,7 @@ char sea_battle(char id, int num_ships) {
plus_or_space(num_ships > num_on_screen);
- fight_stats(num_ships, orders);
+ fight_stats(num_ships);
}
if(num_ships == 0) {
@@ -1245,7 +1245,7 @@ char sea_battle(char id, int num_ships) {
ran = randclamp(num_ships / 3 / id) + 1;
num_ships -= ran;
- fight_stats(num_ships, orders);
+ fight_stats(num_ships);
gotox0y3_clrtoeol();
cprintuint(ran);
// cputs(" ran away");
@@ -1410,7 +1410,7 @@ char sea_battle(char id, int num_ships) {
lost = (randi()%num_ships / 2) + 1;
num_ships -= lost;
- fight_stats(num_ships, orders);
+ fight_stats(num_ships);
// cputs("But we escaped from ");
print_combat_msg(M_but_we_escaped);
cprintuint(lost);
@@ -1445,7 +1445,7 @@ char sea_battle(char id, int num_ships) {
set_orders();
if(!turbo) explosion();
- fight_stats(num_ships, orders);
+ fight_stats(num_ships);
plus_or_space(num_ships > num_on_screen);
// cputs("We've been hit");
@@ -1467,12 +1467,12 @@ char sea_battle(char id, int num_ships) {
i = 1;
guns--;
hold += 10;
- fight_stats(num_ships, orders);
+ fight_stats(num_ships);
// cputs("The buggers hit a gun");
print_combat_msg(M_buggers_hit_gun);
cprint_taipan_bangbang();
if(!turbo) under_attack_sound();
- fight_stats(num_ships, orders);
+ fight_stats(num_ships);
update_guns();
set_orders();
@@ -1530,7 +1530,7 @@ char sea_battle(char id, int num_ships) {
}
if(orders == 1) {
- fight_stats(num_ships, orders);
+ fight_stats(num_ships);
// cputs("We got 'em all");
print_combat_msg(M_we_got_em_all);
cprint_taipan_bang();