X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=battle.c;h=6e35e122d7621469e3ffcfe1bdb8921550c6069d;hb=fb225a29a207cea8436c2deeced27f366492b227;hp=845aa832937bcd98f2fd2c2052ce6aacceba8fed;hpb=ba71f219a8543b5510a53c59ce793339b84903a7;p=super-star-trek.git diff --git a/battle.c b/battle.c index 845aa83..6e35e12 100644 --- a/battle.c +++ b/battle.c @@ -195,8 +195,8 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int wait) { #ifdef SERGEEV crx=wherex(); cry=wherey(); - if (game.damage[DSRSENS]==0 || condit==IHDOCKED) setwnd(1); - else setwnd(4); + if (game.damage[DSRSENS]==0 || condit==IHDOCKED) setwnd(LEFTUPPER_WINDOW); + else setwnd(LOWER_WINDOW); #endif /* SERGEEV */ /* Loop to move a single torpedo */ for (l=1; l <= 15; l++) { @@ -246,7 +246,7 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int wait) { #ifndef SERGEEV skip(1); #else - setwnd(4); + setwnd(LOWER_WINDOW); gotoxy(crx,cry); #endif switch(iquad) { @@ -260,9 +260,7 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int wait) { 1000.0*sqrt(square(ix-inx)+square(iy-iny))* fabs(sin(bullseye-angle)); *hit = fabs(*hit); -#ifndef SERGEEV - newcnd(); /* undock */ -#endif /* SERGEEV */ + newcnd(); /* we're blown out of dock */ /* We may be displaced. */ if (landed==1 || condit==IHDOCKED) return; /* Cheat if on a planet */ ang = angle + 2.5*(Rand()-0.5); @@ -451,8 +449,8 @@ void torpedo(double course, double r, int inx, int iny, double *hit, int wait) { break; } #ifdef SERGEEV - if(curwnd!=4) { - setwnd(4); + if(curwnd!=LOWER_WINDOW) { + setwnd(LOWER_WINDOW); gotoxy(crx,cry); } #endif /* SERGEEV */ @@ -654,9 +652,7 @@ void deadkl(int ix, int iy, int type, int ixx, int iyy) { int i,j; -#ifdef SERGEEV skip(1); -#endif /* SERGEEV */ crmena(1, type, 2, ixx, iyy); /* Decide what kind of enemy it is and update approriately */ if (type == IHR) { @@ -1235,7 +1231,7 @@ void phasers(void) { void hittem(double *hits) { double kp, kpow, wham, hit, dustfac, kpini; #ifdef SERGEEV - int cx, cy; + int crx, cry; #endif /* SERGEEV */ int nenhr2=nenhere, k=1, kk=1, ii, jj, ienm; @@ -1257,7 +1253,7 @@ void hittem(double *hits) { if (game.damage[DSRSENS]==0){ crx=wherex(); cry=wherey(); - setwnd(1); + setwnd(LEFTUPPER_WINDOW); drawmaps(2); gotoxy(jj*2+3,ii+2); highvideo(); @@ -1268,7 +1264,7 @@ void hittem(double *hits) { nosound(); lowvideo(); proutn("%c", game.quad[ii][jj]); - setwnd(4); + setwnd(LOWER_WINDOW); gotoxy(crx,cry); _setcursortype(_NORMALCURSOR); delay(500);