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;
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;
if (iquad==IHDOT) continue;
/* hit something */
setwnd(LOWER_WINDOW);
- gotoxy(crx,cry);
switch(iquad) {
case IHE: /* Hit our ship */
case IHF:
}
if(curwnd!=LOWER_WINDOW) {
setwnd(LOWER_WINDOW);
- gotoxy(crx,cry);
}
if (shoved) {
game.quad[jx][jy]=iquad;
proutn("%d - %d ", (int)x, (int)y);
#else
if (game.damage[DSRSENS]==0 || condit==IHDOCKED) {
+ int crx, cry;
+ crx = wherex();
+ cry = wherey();
drawmaps(2);
delay((wait!=1)*400);
gotoxy(iy*2+3,ix+2);
lowvideo();
_setcursortype(_NORMALCURSOR);
}
+ gotoxy(crx, cry);
} else {
proutn("%d - %d ", (int)x, (int)y);
}