aboutsummaryrefslogtreecommitdiff
path: root/taipan.c
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-05-31 23:30:54 -0400
committerB. Watson <yalhcru@gmail.com>2021-05-31 23:30:54 -0400
commit847087affbcf2fb5c18b47ae1ee7b5471fc32378 (patch)
treeee33432fe02c0b2d20367815accfc64b1d655011 /taipan.c
parent5a38a9e53fc1b6ebb95e9fcee4beeec471355745 (diff)
downloadtaipan-847087affbcf2fb5c18b47ae1ee7b5471fc32378.tar.gz
Semi-random ship damageHEADmaster
Diffstat (limited to 'taipan.c')
-rw-r--r--taipan.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/taipan.c b/taipan.c
index a7518e6..7dbb0d3 100644
--- a/taipan.c
+++ b/taipan.c
@@ -1005,7 +1005,8 @@ unsigned int gunamt(void) {
void new_ship(void) {
unsigned long amount;
- amount = gunamt() * (capacity / 50) + 1000;
+ /* TODO: check against applesoft, line 1060 */
+ amount = gunamt() * (capacity / 50) + 1000;
if(cash < amount) {
return;
@@ -3405,16 +3406,14 @@ int main(void) {
#endif
#ifdef LORCHA_TEST
+ gotox0y(0);
+ clrtoeol();
+ for(choice = 0; choice < 10; choice++) {
+ draw_lorcha(choice);
+ }
while(1) {
- gotox0y(0);
- clrtoeol();
- for(choice = 0; choice < 10; choice++) {
- draw_lorcha(choice);
- sink_lorcha(choice);
- cprintuint(PEEK(0xda));
- cspace();
- }
- agetc();
+ choice = agetc() % 10;
+ damage_lorcha(choice);
}
#endif