}
void pause_game(int i) {
+ char *prompt;
#ifndef SERGEEV
- char buf[BUFSIZ], *prompt;
+ char buf[BUFSIZ];
#else /* SERGEEV */
- char *prompt;
drawmaps(0);
setwnd(5);
#endif /* SERGEEV */
}
void warble(void)
+/* sound and visual effects for teleportation */
{
#ifdef SERGEEV
int posx, posy;
}
newcnd();
iattak = 0;
-#ifdef SERGEEV
drawmaps(0);
-#endif /* SERGEEV */
return;
}
}
void sensor(void) {
-#ifdef SERGEEV
- if (game.damage[DSRSENS] != 0.0) return;
- if ((plnetx != 0)&&(game.state.plnets[iplnet].known == 0)) {
-#else
+#ifndef SERGEEV
skip(1);
chew();
if (game.damage[DSRSENS] != 0.0) {
prout("No planet in this quadrant.");
return;
}
-#endif /* SERGEEV */
+#else
+ if (game.damage[DSRSENS] != 0.0) return;
+ if ((plnetx != 0)&&(game.state.plnets[iplnet].known == 0)) {
prout("Spock- \"Sensor scan for %s-", cramlc(quadrant, quadx, quady));
skip(1);
prout(" Planet at %s is of class %s.",
if (game.state.plnets[iplnet].crystals == 0) proutn(" no");
prout(" dilithium crystals present.\"");
if (game.state.plnets[iplnet].known == unknown) game.state.plnets[iplnet].known = known;
-#ifdef SERGEEV
}
#endif /* SERGEEV */
}
fclose(fp);
}
+void drawmaps(short l) {
+/* hook to be called after moving to redraw maps */
#ifdef SERGEEV
-void drawmaps(short l){
_setcursortype(_NOCURSOR);
if (l==1) sensor();
if (l!=2) setwnd(1);
lrscan();
_setcursortype(_NORMALCURSOR);
}
-}
#endif /* SERGEEV */
+}
static void makemoves(void) {
int i, hitme;
setwnd(4);
#endif /* SERGEEV */
while (TRUE) { /* command loop */
-#ifdef SERGEEV
drawmaps(1);
-#endif /* SERGEEV */
while (TRUE) { /* get a command */
hitme = FALSE;
justin = 0;
void preport(void);
void orbit(void);
void sensor(void);
-#ifdef SERGEEV
void drawmaps(short);
-#endif /* SERGEEV */
void beam(void);
void mine(void);
void usecrystals(void);
void clearscreen(void);
void iostart(int);
void ioend(void);
-#ifdef SERGEEV
void setwnd(short);
-#endif /* SERGEEV */
void warble(void);
void getline(char *, int);
void commandhook(char *, int);
-#ifdef SERGEEV
typedef struct {
int wndleft,wndtop,wndright,wndbottom;
} wnd;
extern wnd wnds[6];
-#endif /* SERGEEV */
static int fd = 0;
+#ifdef SERGEEV
int c_printf (char *format, ... )
{
char buffer[BUFSIZ]; /* Well, BUFSIZ is from ncurses... */
va_end(argp);
return waddstr(conio_scr,buffer);
}
+#endif /* SERGEEV */
void sound(unsigned int freq)
{
void sound(unsigned int);
void nosound(void);
-#ifdef SERGEEV
extern WINDOW *conio_scr;
-#endif /* SERGEEV */
#define delay(x) usleep(x*1000)
#define randomize() srand((unsigned)time(NULL))