projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
getline -> cgetline.
[super-star-trek.git]
/
battle.c
diff --git
a/battle.c
b/battle.c
index 455801b9e2b43bc4b6366fcb4aa9fdbeec9f68c3..1e6123fb3835257be1249ba2b82e647bfcfc6793 100644
(file)
--- a/
battle.c
+++ b/
battle.c
@@
-1,8
+1,6
@@
-#ifdef SERGEEV
-#include <conio.h>
#include <unistd.h>
#include <unistd.h>
+#include "conio.h"
#include "sstlinux.h"
#include "sstlinux.h"
-#endif /* SERGEEV */
#include "sst.h"
void doshield(int i) {
#include "sst.h"
void doshield(int i) {
@@
-195,8
+193,8
@@
void torpedo(double course, double r, int inx, int iny, double *hit, int wait) {
#ifdef SERGEEV
crx=wherex();
cry=wherey();
#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++) {
#endif /* SERGEEV */
/* Loop to move a single torpedo */
for (l=1; l <= 15; l++) {
@@
-246,7
+244,7
@@
void torpedo(double course, double r, int inx, int iny, double *hit, int wait) {
#ifndef SERGEEV
skip(1);
#else
#ifndef SERGEEV
skip(1);
#else
- setwnd(
4
);
+ setwnd(
LOWER_WINDOW
);
gotoxy(crx,cry);
#endif
switch(iquad) {
gotoxy(crx,cry);
#endif
switch(iquad) {
@@
-260,9
+258,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);
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);
/* We may be displaced. */
if (landed==1 || condit==IHDOCKED) return; /* Cheat if on a planet */
ang = angle + 2.5*(Rand()-0.5);
@@
-451,8
+447,8
@@
void torpedo(double course, double r, int inx, int iny, double *hit, int wait) {
break;
}
#ifdef SERGEEV
break;
}
#ifdef SERGEEV
- if(curwnd!=
4
) {
- setwnd(
4
);
+ if(curwnd!=
LOWER_WINDOW
) {
+ setwnd(
LOWER_WINDOW
);
gotoxy(crx,cry);
}
#endif /* SERGEEV */
gotoxy(crx,cry);
}
#endif /* SERGEEV */
@@
-654,9
+650,7
@@
void deadkl(int ix, int iy, int type, int ixx, int iyy) {
int i,j;
int i,j;
-#ifdef SERGEEV
skip(1);
skip(1);
-#endif /* SERGEEV */
crmena(1, type, 2, ixx, iyy);
/* Decide what kind of enemy it is and update approriately */
if (type == IHR) {
crmena(1, type, 2, ixx, iyy);
/* Decide what kind of enemy it is and update approriately */
if (type == IHR) {
@@
-1257,7
+1251,7
@@
void hittem(double *hits) {
if (game.damage[DSRSENS]==0){
crx=wherex();
cry=wherey();
if (game.damage[DSRSENS]==0){
crx=wherex();
cry=wherey();
- setwnd(
1
);
+ setwnd(
LEFTUPPER_WINDOW
);
drawmaps(2);
gotoxy(jj*2+3,ii+2);
highvideo();
drawmaps(2);
gotoxy(jj*2+3,ii+2);
highvideo();
@@
-1268,7
+1262,7
@@
void hittem(double *hits) {
nosound();
lowvideo();
proutn("%c", game.quad[ii][jj]);
nosound();
lowvideo();
proutn("%c", game.quad[ii][jj]);
- setwnd(
4
);
+ setwnd(
LOWER_WINDOW
);
gotoxy(crx,cry);
_setcursortype(_NORMALCURSOR);
delay(500);
gotoxy(crx,cry);
_setcursortype(_NORMALCURSOR);
delay(500);