if (irand (2) == 0) { /* attack fails? */
if (att_owner == USER) {
- comment ("The scum defending the city crushed your attacking blitzkrieger.",0,0,0,0,0,0,0,0);
- ksend ("The scum defending the city crushed your attacking blitzkrieger.\n",0,0,0,0,0,0,0,0); //kermyt
+ comment ("The scum defending the city crushed your attacking blitzkrieger.");
+ ksend ("The scum defending the city crushed your attacking blitzkrieger.\n"); //kermyt
}
else if (city_owner == USER) {
- ksend ("Your city at %d is under attack.\n",loc_disp(cityp->loc),0,0,0,0,0,0,0); //kermyt
- comment ("Your city at %d is under attack.",loc_disp(cityp->loc),0,0,0,0,0,0,0);
+ ksend ("Your city at %d is under attack.\n",loc_disp(cityp->loc)); //kermyt
+ comment ("Your city at %d is under attack.",loc_disp(cityp->loc));
}
kill_obj (att_obj, loc);
}
kill_obj (att_obj, loc);
if (att_owner == USER) {
- ksend ("City at %d has been subjugated!\n",loc_disp(cityp->loc),0,0,0,0,0,0,0); //kermyt
- error ("City at %d has been subjugated!",loc_disp(cityp->loc),0,0,0,0,0,0,0);
+ ksend ("City at %d has been subjugated!\n",loc_disp(cityp->loc)); //kermyt
+ error ("City at %d has been subjugated!",loc_disp(cityp->loc));
- extra ("Your army has been dispersed to enforce control.",0,0,0,0,0,0,0,0);
- ksend ("Your army has been dispersed to enforce control.\n",0,0,0,0,0,0,0,0);
+ extra ("Your army has been dispersed to enforce control.");
+ ksend ("Your army has been dispersed to enforce control.\n");
set_prod (cityp);
}
else if (city_owner == USER) {
- ksend("City at %d has been lost to the enemy!\n",loc_disp(cityp->loc),0,0,0,0,0,0,0); //kermyt
- comment ("City at %d has been lost to the enemy!",loc_disp(cityp->loc),0,0,0,0,0,0,0);
+ ksend("City at %d has been lost to the enemy!\n",loc_disp(cityp->loc)); //kermyt
+ comment ("City at %d has been lost to the enemy!",loc_disp(cityp->loc));
}
}
/* let city owner see all results */
if (win_obj->owner != lose_obj->owner) {
if (win_obj->owner == USER) {
user_score += piece_attr[lose_obj->type].build_time;
- ksend1 ("Enemy %s at %d destroyed.\n",piece_attr[lose_obj->type].name,loc_disp(loc),0,0,0,0,0,0); //kermyt
- topmsg1 (1, "Enemy %s at %d destroyed.",piece_attr[lose_obj->type].name,loc_disp(loc),0,0,0,0,0,0);
- ksend1 ("Your %s has %d hits left\n",piece_attr[win_obj->type].name,win_obj->hits,0,0,0,0,0,0); //kermyt
- topmsg1 (2, "Your %s has %d hits left.", piece_attr[win_obj->type].name, win_obj->hits,0,0,0,0,0,0);
+ ksend ("Enemy %s at %d destroyed.\n",piece_attr[lose_obj->type].name,loc_disp(loc)); //kermyt
+ topmsg (1, "Enemy %s at %d destroyed.",piece_attr[lose_obj->type].name,loc_disp(loc));
+ ksend ("Your %s has %d hits left\n",piece_attr[win_obj->type].name,win_obj->hits); //kermyt
+ topmsg (2, "Your %s has %d hits left.", piece_attr[win_obj->type].name, win_obj->hits);
diff = win_obj->count - obj_capacity (win_obj);
if (diff > 0) switch (win_obj->cargo->type) {
case ARMY:
- ksend("%d armies fell overboard and drowned in the assault.\n",diff,0,0,0,0,0,0,0); //kermyt
- topmsg (3,"%d armies fell overboard and drowned in the assault.",diff,0,0,0,0,0,0,0);
+ ksend("%d armies fell overboard and drowned in the assault.\n",diff); //kermyt
+ topmsg (3,"%d armies fell overboard and drowned in the assault.",diff);
break;
case FIGHTER:
- ksend("%d fighters fell overboard and were lost in the assult.\n",diff,0,0,0,0,0,0,0); //kermyt
- topmsg (3,"%d fighters fell overboard and were lost in the assault.",diff,0,0,0,0,0,0,0);
+ ksend("%d fighters fell overboard and were lost in the assult.\n",diff); //kermyt
+ topmsg (3,"%d fighters fell overboard and were lost in the assault.",diff);
break;
}
}
else {
comp_score += piece_attr[lose_obj->type].build_time;
- ksend1 ("Your %s at %d destroyed.\n",piece_attr[lose_obj->type].name,loc_disp(loc),0,0,0,0,0,0); //kermyt
- topmsg1 (3, "Your %s at %d destroyed.",piece_attr[lose_obj->type].name,loc_disp(loc),0,0,0,0,0,0);
+ ksend ("Your %s at %d destroyed.\n",piece_attr[lose_obj->type].name,loc_disp(loc)); //kermyt
+ topmsg (3, "Your %s at %d destroyed.",piece_attr[lose_obj->type].name,loc_disp(loc));
}
set_need_delay ();
}
scan (comp_map, obj->loc); /* refresh comp's view of world */
for (i = 1; i <= nmoves; i++) { /* for each move we get... */
- comment ("Thinking...",0,0,0,0,0,0,0,0);
+ comment ("Thinking...");
(void) memcpy (emap, comp_map, MAP_SIZE * sizeof (view_map_t));
vmap_prune_explore_locs (emap);
{
if (cityp->prod == type) return;
- pdebug ("Changing city prod at %d from %d to %d\n",loc_disp(cityp->loc), cityp->prod, type,0,0,0,0,0);
+ pdebug ("Changing city prod at %d from %d to %d\n",loc_disp(cityp->loc), cityp->prod, type);
cityp->prod = type;
cityp->work = -(piece_attr[type].build_time / 5);
}
if (comp_map[obj->loc].contents == 'X')
obj->moved = piece_attr[FIGHTER].speed;
else if (obj->range == 0) {
- pdebug ("Fighter at %d crashed and burned\n", loc_disp(obj->loc),0,0,0,0,0,0,0);
- ksend ("Fighter at %d crashed and burned\n", loc_disp(obj->loc),0,0,0,0,0,0,0);
+ pdebug ("Fighter at %d crashed and burned\n", loc_disp(obj->loc));
+ ksend ("Fighter at %d crashed and burned\n", loc_disp(obj->loc));
kill_obj (obj, obj->loc); /* crash & burn */
}
}
if (new_loc == obj->loc) {
obj->moved = piece_attr[obj->type].speed;
obj->range -= 1;
- pdebug ("No destination found for %d at %d; func=%d\n", obj->type, loc_disp(obj->loc), obj->func,0,0,0,0,0);
+ pdebug ("No destination found for %d at %d; func=%d\n", obj->type, loc_disp(obj->loc), obj->func);
return;
}
old_loc = obj->loc; /* remember where we are */
obj->moved = piece_attr[obj->type].speed;
if (obj->type == ARMY && obj->ship) ;
- else pdebug ("Cannot move %d at %d toward objective; func=%d\n", obj->type, loc_disp(obj->loc), obj->func,0,0,0,0,0);
+ else pdebug ("Cannot move %d at %d toward objective; func=%d\n", obj->type, loc_disp(obj->loc), obj->func);
}
else move_obj (obj, new_loc);
if (ncomp_city < nuser_city/3 && ncomp_army < nuser_army/3) {
clear_screen ();
- prompt ("The computer acknowledges defeat. Do",0,0,0,0,0,0,0,0);
- ksend ("The computer acknowledges defeat.",0,0,0,0,0,0,0,0);
- error ("you wish to smash the rest of the enemy? ",0,0,0,0,0,0,0,0);
+ prompt ("The computer acknowledges defeat. Do");
+ ksend ("The computer acknowledges defeat.");
+ error ("you wish to smash the rest of the enemy?");
if (get_chx() != 'Y') empend ();
announce ("\nThe enemy inadvertantly revealed its code used for");
char temp_buf[STRSIZE];
char junk_buf2[STRSIZE];
- error (0,0,0,0,0,0,0,0,0); /* clear line */
+ error (""); /* clear line */
f = 0; /* no fighters counted yet */
for (obj = map[edit_cursor].objp; obj != NULL;
void
e_help(void) {
help (help_edit, edit_lines);
- prompt ("Press any key to continue: ",0,0,0,0,0,0,0,0);
+ prompt ("Press any key to continue: ");
(void) get_chx ();
}
rndini (); /* init random number generator */
clear_screen (); /* nothing on screen */
- pos_str (7, 0, "EMPIRE, Version 5.00 site Amdahl 1-Apr-1988",0,0,0,0,0,0,0,0);
- pos_str (8, 0, "Detailed directions are in EMPIRE.DOC\n",0,0,0,0,0,0,0,0);
+ pos_str (7, 0, "EMPIRE, Version 5.00 site Amdahl 1-Apr-1988");
+ pos_str (8, 0, "Detailed directions are in EMPIRE.DOC\n");
(void) redisplay ();
if (!restore_game ()) /* try to restore previous game */
save_game ();
}
else {
- prompt (0,0,0,0,0,0,0,0,0); /* blank top line */
+ prompt (""); /* blank top line */
void redisplay();
- prompt ("Your orders? ",0,0,0,0,0,0,0,0);
+ prompt ("Your orders? ");
order = get_chx (); /* get a command */
do_command (order);
}
switch (orders) {
case 'A': /* turn on auto move mode */
automove = true;
- error ("Now in Auto-Mode",0,0,0,0,0,0,0,0);
+ error ("Now in Auto-Mode");
user_move ();
comp_move (1);
save_game ();
break;
case 'D': /* display round number */
- error ("Round #%d", date,0,0,0,0,0,0,0);
+ error ("Round #%d", date);
break;
case 'E': /* examine enemy map */
case 'T': /* trace: toggle save_movie flag */
save_movie = !save_movie;
- if (save_movie) comment ("Saving movie screens to 'empmovie.dat'.",0,0,0,0,0,0,0,0);
- else comment ("No longer saving movie screens.",0,0,0,0,0,0,0,0);
+ if (save_movie) comment ("Saving movie screens to 'empmovie.dat'.");
+ else comment ("No longer saving movie screens.");
break;
case 'W': /* watch movie */
if (resigned || debug) replay_movie ();
- else error ("You cannot watch movie until computer resigns.",0,0,0,0,0,0,0,0);
+ else error ("You cannot watch movie until computer resigns.");
break;
case 'Z': /* print compressed map */
}
}
if (count == 0) {
- error ("There are no unowned cities.",0,0,0,0,0,0,0,0);
- ksend ("There are no unowned cities.",0,0,0,0,0,0,0,0);
+ error ("There are no unowned cities.");
+ ksend ("There are no unowned cities.");
return;
}
i = irand (count);
int i, j;
char line[MAP_HEIGHT+2];
- prompt ("Filename? ",0,0,0,0,0,0,0,0);
+ prompt ("Filename? ");
get_str (jnkbuf, STRSIZE);
f = fopen (jnkbuf, "w");
if (f == NULL) {
- error ("I can't open that file.",0,0,0,0,0,0,0,0);
+ error ("I can't open that file.");
return;
}
for (i = 0; i < MAP_WIDTH; i++) { /* for each column */
void topini (void);
void clreol (int line, int colp);
void topmsg (int line, char *fmt, ...);
-void topmsg1 (int line, char *fmt, ...);
-void topmsg2 (int line, char *fmt, ...);
void prompt (char *fmt, ...);
-void prompt1 (char *fmt, ...);
-void prompt2 (char *fmt, ...);
void error (char *fmt, ...);
void info (char *a, char *b, char *c);
void comment (char *fmt, ...);
-void comment1 (char *fmt, ...);
void extra (char *fmt, ...);
void huh (void);
void help (char **text, int nlines);
void set_need_delay (void);
void ksend (char *fmt, ...);
-void ksend1 (char *fmt, ...);
/* utility routines */
void ttinit (void);
wval (comp_score);
(void) fclose (f);
- topmsg (3, "Game saved.",0,0,0,0,0,0,0,0);
+ topmsg (3, "Game saved.");
}
/*
(void) fclose (f);
kill_display (); /* what we had is no longer good */
- topmsg (3, "Game restored from save file.",0,0,0,0,0,0,0,0);
+ topmsg (3, "Game restored from save file.");
return (true);
}
comp_cost += counts[i] * piece_attr[i-NUM_OBJECTS-2].build_time;
for (i = 0; i < NUM_OBJECTS+1; i++) {
- pos_str (1, (int) i * 6, "%2d %c ", counts[i], pieces[i],0,0,0,0,0,0);
- pos_str (2,(int) i * 6, "%2d %c ", counts[i+NUM_OBJECTS+1], pieces[i+NUM_OBJECTS+1],0,0,0,0,0,0);
+ pos_str (1, (int) i * 6, "%2d %c ", counts[i], pieces[i]);
+ pos_str (2,(int) i * 6, "%2d %c ", counts[i+NUM_OBJECTS+1], pieces[i+NUM_OBJECTS+1]);
}
- pos_str (1, (int) i * 6, "%5d", user_cost,0,0,0,0,0,0,0);
- pos_str (2, (int) i * 6, "%5d", comp_cost,0,0,0,0,0,0,0);
- pos_str (0, 0, "Round %3d", (round + 1) / 2,0,0,0,0,0,0,0);
+ pos_str (1, (int) i * 6, "%5d", user_cost);
+ pos_str (2, (int) i * 6, "%5d", comp_cost);
+ pos_str (0, 0, "Round %3d", (round + 1) / 2);
}
move_sat1 (obj);
if (obj->range == 0) {
if (obj->owner == USER)
- comment ("Satellite at %d crashed and burned.", loc_disp(obj->loc),0,0,0,0,0,0,0);
- ksend ("Satellite at %d crashed and burned.", loc_disp(obj->loc),0,0,0,0,0,0,0);
+ comment ("Satellite at %d crashed and burned.", loc_disp(obj->loc));
+ ksend ("Satellite at %d crashed and burned.", loc_disp(obj->loc));
kill_obj (obj, obj->loc);
}
}
break;
}
- prompt2 ("%s at %d: moves = %d; hits = %d; func = %s%s",
+ prompt ("%s at %d: moves = %d; hits = %d; func = %s%s",
piece_attr[obj->type].name,
loc_disp(obj->loc),
obj_moves (obj) - obj->moved,
obj->hits,
func,
- other,0,0);
+ other);
}
/*
display_loc_u (cityp->loc);
for (;;) {
- prompt ("What do you want the city at %d to produce? ",loc_disp(cityp->loc),0,0,0,0,0,0,0);
+ prompt ("What do you want the city at %d to produce? ",loc_disp(cityp->loc));
i = get_piece_name ();
if (i == NOPIECE)
- error ("I don't know how to build those.",0,0,0,0,0,0,0,0);
+ error ("I don't know how to build those.");
else {
cityp->prod = i;
va_end(ap);
}
-void
-topmsg1(int line, char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vtopmsg(line, fmt, ap);
- va_end(ap);
-}
-
-void
-topmsg2(int line, char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vtopmsg(line, fmt, ap);
- va_end(ap);
-}
-
/*
Print a prompt on the first message line.
*/
va_end(ap);
}
-void
-prompt1(char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vtopmsg(1, fmt, ap);
- va_end(ap);
-}
-
-void
-prompt2 (char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vtopmsg(1, fmt, ap);
- va_end(ap);
-}
-
/*
Print an error message on the second message line.
*/
va_end(ap);
}
-void
-comment1 (char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- if (need_delay) delay ();
- topmsg (1, "");
- topmsg (2, "");
- vtopmsg (3, fmt, ap);
- need_delay = (fmt != 0);
- va_end(ap);
-}
-
-
void
pdebug(char *fmt, ...)
{
vksend(fmt, ap);
va_end(ap);
}
-
-void
-ksend1(char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vksend(fmt, ap);
- va_end(ap);
-}
/* kermyt end */
/*
if (result >= low && result <= high) return (result);
- error ("Please enter an integer in the range %d..%d.",low, high,0,0,0,0,0,0);
+ error ("Please enter an integer in the range %d..%d.",low, high);
}
}
clear_screen ();
- pos_str (NUMTOPS, 1, text[0],0,0,0,0,0,0,0,0); /* mode */
- pos_str (NUMTOPS, 41, "See empire(6) for more information.",0,0,0,0,0,0,0,0);
+ pos_str (NUMTOPS, 1, text[0]); /* mode */
+ pos_str (NUMTOPS, 41, "See empire(6) for more information.");
for (i = 1; i < nlines; i++) {
if (i > text_lines)
- pos_str (i - text_lines + NUMTOPS + 1, 41, text[i],0,0,0,0,0,0,0,0);
- else pos_str (i + NUMTOPS + 1, 1, text[i],0,0,0,0,0,0,0,0);
+ pos_str (i - text_lines + NUMTOPS + 1, 41, text[i]);
+ else pos_str (i + NUMTOPS + 1, 1, text[i]);
}
- pos_str (text_lines + NUMTOPS + 2, 1, "--Piece---Yours-Enemy-Moves-Hits-Cost",0,0,0,0,0,0,0,0);
- pos_str (text_lines + NUMTOPS + 2, 41, "--Piece---Yours-Enemy-Moves-Hits-Cost",0,0,0,0,0,0,0,0);
+ pos_str (text_lines + NUMTOPS + 2, 1, "--Piece---Yours-Enemy-Moves-Hits-Cost");
+ pos_str (text_lines + NUMTOPS + 2, 41, "--Piece---Yours-Enemy-Moves-Hits-Cost");
for (i = 0; i < NUM_OBJECTS; i++) {
if (i >= (NUM_OBJECTS+1)/2) {
}
else if (city[i].work++ >= (long)piece_attr[prod].build_time) {
/* kermyt begin */
- ksend1("%s has been completed at city %d.\n", piece_attr[prod].article,loc_disp(city[i].loc),0,0,0,0,0,0);
+ ksend("%s has been completed at city %d.\n", piece_attr[prod].article,loc_disp(city[i].loc));
/* kermyt end */
- comment1 ("%s has been completed at city %d.\n", piece_attr[prod].article,loc_disp(city[i].loc),0,0,0,0,0,0);
+ comment ("%s has been completed at city %d.\n", piece_attr[prod].article,loc_disp(city[i].loc));
produce (&city[i]);
/* produce should set object.moved to 0 */
obj->range = piece_attr[FIGHTER].range;
obj->moved = speed;
obj->func = NOFUNC;
- comment ("Landing confirmed.",0,0,0,0,0,0,0,0);
+ comment ("Landing confirmed.");
}
else if (obj->range == 0) {
- comment ("Fighter at %d crashed and burned.",loc_disp(obj->loc),0,0,0,0,0,0,0);
+ comment ("Fighter at %d crashed and burned.",loc_disp(obj->loc));
kill_obj (obj, obj->loc);
}
}
char c;
help (help_user, user_lines);
- prompt ("Press any key to continue: ",0,0,0,0,0,0,0,0);
+ prompt ("Press any key to continue: ");
c = get_chx ();
c = c; /* keep lint happy */
}
return;
}
if (!map[loc].on_board) {
- error ("You cannot move to the edge of the world.",0,0,0,0,0,0,0,0);
+ error ("You cannot move to the edge of the world.");
delay ();
return;
}
if (user_map[obj->loc].contents == 'T')
{
- comment ("Your army jumped into the briny and drowned.",0,0,0,0,0,0,0,0);
- ksend ("Your army jumped into the briny and drowned.\n",0,0,0,0,0,0,0,0);
+ comment ("Your army jumped into the briny and drowned.");
+ ksend ("Your army jumped into the briny and drowned.\n");
}
else if (user_map[loc].contents == '.')
{
- comment ("Your army marched dutifully into the sea and drowned.",0,0,0,0,0,0,0,0);
- ksend ("Your army marched dutifully into the sea and drowned.\n",0,0,0,0,0,0,0,0);
+ comment ("Your army marched dutifully into the sea and drowned.");
+ ksend ("Your army marched dutifully into the sea and drowned.\n");
}
else { /* attack something at sea */
enemy_killed = islower (user_map[loc].contents);
if (obj->hits > 0) /* ship won? */
{
- comment ("Your army regretfully drowns after its successful assault.",0,0,0,0,0,0,0,0);
- ksend ("Your army regretfully drowns after it's successful assault.",0,0,0,0,0,0,0,0);
+ comment ("Your army regretfully drowns after its successful assault.");
+ ksend ("Your army regretfully drowns after it's successful assault.");
}
}
if (obj->hits > 0) {
if (user_map[loc].contents == '+')
{
- comment1 ("Your %s broke up on shore.", piece_attr[obj->type].name,0,0,0,0,0,0,0);
- ksend1 ("Your %s broke up on shore.", piece_attr[obj->type].name,0,0,0,0,0,0,0);
+ comment ("Your %s broke up on shore.", piece_attr[obj->type].name);
+ ksend ("Your %s broke up on shore.", piece_attr[obj->type].name);
}
else { /* attack something on shore */
enemy_killed = islower (user_map[loc].contents);
if (obj->hits > 0) /* ship won? */
{
- comment1 ("Your %s breaks up after its successful assault.", piece_attr[obj->type].name,0,0,0,0,0,0,0);
- ksend1 ("Your %s breaks up after its successful assault.", piece_attr[obj->type].name,0,0,0,0,0,0,0);
+ comment ("Your %s breaks up after its successful assault.", piece_attr[obj->type].name);
+ ksend ("Your %s breaks up after its successful assault.", piece_attr[obj->type].name);
}
}
if (obj->hits > 0) {
user_cancel_auto(void)
{
if (!automove)
- comment ("Not in auto mode!",0,0,0,0,0,0,0,0);
+ comment ("Not in auto mode!");
else {
automove = false;
- comment ("Auto mode cancelled.",0,0,0,0,0,0,0,0);
+ comment ("Auto mode cancelled.");
}
}
fatal(piece_info_t *obj, loc_t loc, char *message, char *response)
{
if (getyn (message)) {
- comment (response,0,0,0,0,0,0,0,0);
+ comment (response);
kill_obj (obj, loc);
}
}