error ("you wish to smash the rest of the enemy? ",0,0,0,0,0,0,0,0);
if (get_chx() != 'Y') empend ();
- (void) addstr ("\nThe enemy inadvertantly revealed its code used for");
- (void) addstr ("\nreceiving battle information. You can display what");
- (void) addstr ("\nthey've learned with the ''E'' command.");
+ announce ("\nThe enemy inadvertantly revealed its code used for");
+ announce ("\nreceiving battle information. You can display what");
+ announce ("\nthey've learned with the ''E'' command.");
resigned = TRUE;
win = 2;
automove = FALSE;
}
else if (ncomp_city == 0 && ncomp_army == 0) {
clear_screen ();
- (void) addstr ("The enemy is incapable of defeating you.\n");
- (void) addstr ("You are free to rape the empire as you wish.\n");
- (void) addstr ("There may be, however, remnants of the enemy fleet\n");
- (void) addstr ("to be routed out and destroyed.\n");
+ announce ("The enemy is incapable of defeating you.\n");
+ announce ("You are free to rape the empire as you wish.\n");
+ announce ("There may be, however, remnants of the enemy fleet\n");
+ announce ("to be routed out and destroyed.\n");
win = 1;
automove = FALSE;
}
else if (nuser_city == 0 && nuser_army == 0) {
clear_screen ();
- (void) addstr ("You have been rendered incapable of\n");
- (void) addstr ("defeating the rampaging enemy fascists! The\n");
- (void) addstr ("empire is lost. If you have any ships left, you\n");
- (void) addstr ("may attempt to harass enemy shipping.");
+ announce ("You have been rendered incapable of\n");
+ announce ("defeating the rampaging enemy fascists! The\n");
+ announce ("empire is lost. If you have any ships left, you\n");
+ announce ("may attempt to harass enemy shipping.");
win = 1;
automove = FALSE;
}
-/* $Id: display.c,v 1.10 2006/07/25 16:43:14 esr Exp esr $ - (c) Copyright 1987, 1988 Chuck Simmons */
+/* $Id: display.c,v 1.11 2006/07/25 16:51:22 esr Exp esr $ - (c) Copyright 1987, 1988 Chuck Simmons */
/*
* Copyright (C) 1987, 1988 Chuck Simmons
}
#endif /* A_COLOR */
+/*
+Used for win announcements
+ */
+void announce (char *msg) {
+ (void) addstr (msg);
+}
+
/*
This routine is called when the current display has been
trashed and no sector is shown on the screen.
-/* $Id: extern.h,v 1.8 2006/07/25 15:59:54 esr Exp esr $ - (c) Copyright 1987, 1988 Chuck Simmons */
+/* $Id: extern.h,v 1.9 2006/07/25 16:43:14 esr Exp esr $ - (c) Copyright 1987, 1988 Chuck Simmons */
/*
* Copyright (C) 1987, 1988 Chuck Simmons
int rmap_at_sea (long loc);
/* display routines */
+void announce (char *);
void redisplay();
void kill_display ();
void sector_change ();
for (i = COL_DIGITS; i > 0; i--) {
nrow *= 10; }
move (LINES - 1, 0);
- /*
- {
- char junkbuf[STRSIZE];
- (void) snprintf (junkbuf, STRSIZE, "loc: %d, row: %d, col: %d, nrow: %d, nrow+col: %d", loc, row, col, nrow, nrow + col);
- (void) addstr (junkbuf);
- napms(500);
- }
- */
return nrow + col;
}