aboutsummaryrefslogtreecommitdiff
path: root/taipan.c
diff options
context:
space:
mode:
Diffstat (limited to 'taipan.c')
-rw-r--r--taipan.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/taipan.c b/taipan.c
index 2a8bc2d..ae04e59 100644
--- a/taipan.c
+++ b/taipan.c
@@ -158,7 +158,8 @@ unsigned char get_item(unsigned char allow_all) {
/* title screen now a separate xex segment (see Makefile for details) */
// void splash_intro(void);
-int get_one(void);
+// int get_one(void);
+#define get_one() agetc();
long get_num(void);
void name_firm(void);
void cash_or_guns(void);
@@ -1038,7 +1039,8 @@ int get_one(void)
return choice;
}
-#else
+
+/* new version. Still too much code! */
int get_one(void) {
cursor(1);
cblank(1);
@@ -1115,11 +1117,11 @@ long get_num(void) {
if(!count) return -1;
} else {
cputc(input);
- number[count] = input;
- count++;
+ number[count++] = input;
}
}
cursor(0);
+ number[count] = '\0';
return strtol(number, (char **)NULL, 10);
}
#endif
@@ -1674,8 +1676,8 @@ void transfer(void)
void quit(void)
{
- int choice = 0,
- result = 0,
+ unsigned char choice;
+ int result = 0,
damagepct, sunk;
compradores_report();
@@ -2515,7 +2517,7 @@ void sell(void) {
gotoxy(0, 22);
clrtobot();
- cputs("What do you wish me to buy, Taipan? ");
+ cputs("What do you wish me to sell, Taipan? ");
choice = get_item(0);
/*
@@ -2653,6 +2655,7 @@ int main(void) {
#endif
atari_text_setup();
+
initrand();
name_firm();
cash_or_guns();