X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=battle.c;h=79043385397cd4cd284e7e6385a44a175f7d389c;hb=c5c08c8b43daf955ad447af2b72ade2f8579b0d2;hp=bcfd70788b72210b4350eee8d58f4aa5d08faf6b;hpb=e29006d00a2962f32312e31bf142f77a99bde04d;p=super-star-trek.git diff --git a/battle.c b/battle.c index bcfd707..7904338 100644 --- a/battle.c +++ b/battle.c @@ -1,6 +1,5 @@ #include #include "conio.h" -#include "sstlinux.h" #include "sst.h" void doshield(int i) { @@ -176,7 +175,6 @@ void ram(int ibumpd, int ienm, int ix, int iy) { void torpedo(double course, double r, int inx, int iny, double *hit, int wait, int i, int n) { int l, iquad=0, ix=0, iy=0, jx=0, jy=0, shoved=0, ll; - int crx,cry; double ac=course + 0.25*r; double angle = (15.0-ac)*0.5235988; @@ -188,10 +186,10 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int wait, i if (fabs(deltay) > bigger) bigger = fabs(deltay); deltax /= bigger; deltay /= bigger; - crx=wherex(); - cry=wherey(); - if (game.damage[DSRSENS]==0 || condit==IHDOCKED) setwnd(LEFTUPPER_WINDOW); - else setwnd(LOWER_WINDOW); + if (game.damage[DSRSENS]==0 || condit==IHDOCKED) + setwnd(LEFTUPPER_WINDOW); + else + setwnd(LOWER_WINDOW); /* Loop to move a single torpedo */ for (l=1; l <= 15; l++) { x += deltax; @@ -206,7 +204,6 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int wait, i if (iquad==IHDOT) continue; /* hit something */ setwnd(LOWER_WINDOW); - gotoxy(crx,cry); switch(iquad) { case IHE: /* Hit our ship */ case IHF: @@ -403,7 +400,6 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int wait, i } if(curwnd!=LOWER_WINDOW) { setwnd(LOWER_WINDOW); - gotoxy(crx,cry); } if (shoved) { game.quad[jx][jy]=iquad;