aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-12-31 04:48:10 -0500
committerB. Watson <yalhcru@gmail.com>2015-12-31 04:48:10 -0500
commit358ed61e3bdef37ca0f4a3cd0eb8a248b2f2affe (patch)
tree8180a6548f98bc45ed087ca50b36400d69c67d72
parentbcfb1a5e34043646c690919d4dc6dc31fea1303c (diff)
downloadtaipan-358ed61e3bdef37ca0f4a3cd0eb8a248b2f2affe.tar.gz
fix mchenry() spacing
-rw-r--r--Makefile7
-rw-r--r--taipan.c33
2 files changed, 25 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 9a68be0..d5faa1e 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,9 @@ VERSION="v0.99alpha-$(shell date +%Y%m%d)-$(shell git rev-parse --short HEAD 2>/
# turned into title.xex and prepended to the main .xex. When
# it loads, it goes straight to screen memory.
+# TITLE.DAT, LORCHA.DAT, and PORTSTAT.DAT aren't deleted by a
+# 'make clean'.
+
# romfont is the 1K font extracted from the Atari 800 OS, with a
# command like:
# dd if=atariosb.rom of=1 bs=256 skip=8 count=4
@@ -76,10 +79,10 @@ test: all
$(CC) $(CFLAGS) -c -o $@ $<
clean:
- rm -f *.o *.lst convfont
+ rm -f *.o *.lst convfont *.xex
distclean: clean
- rm -f *~ core *.xex .*.swp 1.* 2.* 1 2 map map.* *.map
+ rm -f *~ core .*.swp 1.* 2.* 1 2 3 map map.* *.map a b c foo bar baz
%.xex: %.c
$(CC) --mapfile map $(CFLAGS) -o $@ $<
diff --git a/taipan.c b/taipan.c
index ac43bb8..097a5d8 100644
--- a/taipan.c
+++ b/taipan.c
@@ -13,6 +13,10 @@
/* define this to show internals of damage calculation */
#define DAMAGE_TEST
+/* define this to test the mchenry() routine by entering
+ damage and capacity numbers directly */
+// #define MCHENRY_TEST
+
/**** atari-specific stuff */
void atari_text_setup() {
@@ -1216,7 +1220,7 @@ void port_stats(void)
#else
if(port_stat_dirty) {
- void *p = PEEK(88) + 256 * PEEK(89);
+ void *p = (void *)(PEEK(88) + 256 * PEEK(89));
memcpy(p, &port_stat_screen, 640);
port_stat_dirty = 0;
}
@@ -1371,7 +1375,7 @@ void mchenry(void)
compradores_report();
cputs("Taipan, Mc Henry from the Hong Kong\r\n");
- cputs("Shipyards has arrived!! He says, 'I see\r\n");
+ cputs("Shipyards has arrived!! He says, 'I see\r\n");
cputs("ye've a wee bit of damage to yer ship.'\r\n");
cputs("Will ye be wanting repairs? ");
@@ -1498,7 +1502,7 @@ void final_stats(void)
cputs("Your Rating:\r\n");
cputs(" _______________________________\r\n");
cputs("|");
- if (cash > 49999)
+ if (cash > 49999L)
{
revers(1);
}
@@ -1506,7 +1510,7 @@ void final_stats(void)
revers(0);
cputs(" 50,000 and over |\r\n");
cputs("|");
- if ((cash < 50000) && (cash > 7999))
+ if ((cash < 50000L) && (cash > 7999L))
{
revers(1);
}
@@ -1514,7 +1518,7 @@ void final_stats(void)
revers(0);
cputs(" 8,000 to 49,999|\r\n");
cputs("|");
- if ((cash < 8000) && (cash > 999))
+ if ((cash < 8000L) && (cash > 999L))
{
revers(1);
}
@@ -2562,16 +2566,19 @@ void debttest() {
int main(void) {
int choice;
- /*
+#ifdef MCHENRY_TEST
{
- int status;
- capacity = 60;
- damage = 47;
- status = 100 - ((damage * 100) / capacity);
- cprintulong(status);
-hang: goto hang;
+ while(1) {
+ clrscr();
+ cputs("dmg? ");
+ damage = get_num(9);
+ cputs("\r\n");
+ cputs("cap? ");
+ capacity = get_num(9);
+ mchenry();
+ }
}
- */
+#endif
/*
_randomize();