X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fevents.c;h=20decb953ed307bfbc4f3d7c51917504dbede2bf;hp=1e04dd0e2c8f3e09bf6465194be75b352ff2dc9f;hb=c0682ebb9ae828d035d59892a65e1849d85963b7;hpb=093f7d420e9cf92fbaf751f57a199c56562ae4b5 diff --git a/src/events.c b/src/events.c index 1e04dd0..20decb9 100644 --- a/src/events.c +++ b/src/events.c @@ -141,9 +141,9 @@ void events(void) prout(_("Lt. Uhura- \"Captain, the sub-space radio is working and")); prout(_(" surveillance reports are coming in.")); skip(1); - if (game.iseenit==0) { + if (!game.iseenit) { attakreport(false); - game.iseenit = 1; + game.iseenit = true; } rechart(); prout(_(" The star chart is now up to date.\"")); @@ -171,7 +171,7 @@ void events(void) (game.torps < 5 || damaged(DPHOTON)))) { /* Tractor-beam her! */ istract = true; - yank = square(game.state.kscmdr.x-game.quadrant.x) + square(game.state.kscmdr.y-game.quadrant.y); + yank = distance(game.state.kscmdr, game.quadrant); /********* fall through to FTBEAM code ***********/ } else return; @@ -283,10 +283,10 @@ void events(void) if (game.isatb) /* extra time if SC already attacking */ postpone(FCDBAS, scheduled(FSCDBAS)-game.state.date); game.future[FBATTAK].date = game.future[FCDBAS].date + expran(0.3*game.intime); - game.iseenit = 0; + game.iseenit = false; if (!damaged(DRADIO) && game.condit != IHDOCKED) break; /* No warning :-( */ - game.iseenit = 1; + game.iseenit = true; if (!ipage) pause_game(1); ipage = true; skip(1); @@ -714,7 +714,7 @@ void nova(coord nov) kount++; break; case IHK: /* kill klingon */ - deadkl(scratch,iquad, scratch.x, scratch.y); + deadkl(scratch,iquad, scratch); break; case IHC: /* Damage/destroy big enemies */ case IHS: @@ -723,7 +723,7 @@ void nova(coord nov) if (same(game.ks[ll], scratch)) break; game.kpower[ll] -= 800.0; /* If firepower is lost, die */ if (game.kpower[ll] <= 0.0) { - deadkl(scratch, iquad, scratch.x, scratch.y); + deadkl(scratch, iquad, scratch); break; } newc.x = scratch.x + scratch.x - hits[mm][1]; @@ -740,7 +740,7 @@ void nova(coord nov) proutn(_(", blasted into ")); crmena(false, IHBLANK, sector, newc); skip(1); - deadkl(scratch, iquad, newc.x, newc.y); + deadkl(scratch, iquad, newc); break; } if (iquad1 != IHDOT) {