{
char buf[STRSIZE];
char buf2[STRSIZE];
- int diff;
*buf = '\0';
*buf2 = '\0';
if (win_obj->owner != lose_obj->owner) {
+ int diff;
if (win_obj->owner == USER) {
user_score += piece_attr[lose_obj->type].build_time;
ksend ("Enemy %s at %d destroyed.\n",piece_attr[lose_obj->type].name,loc_disp(loc)); //kermyt
void
e_stasis(loc_t loc)
{
- char e;
- char *p;
-
if (!isupper (user_map[loc].contents))
huh (); /* no object here */
else if (user_map[loc].contents == 'X')
huh ();
else {
- e = get_chx(); /* get a direction */
- p = strchr (dirs, e);
+ char e = get_chx(); /* get a direction */
+ char *p = strchr (dirs, e);
if (p == NULL)
huh ();
void
e_end(loc_t *path_start, loc_t loc, int path_type)
-{
- city_info_t *cityp;
-
- if (*path_start == -1) huh (); /* no path started? */
- else if (path_type == NOPIECE) e_set_func (*path_start, loc);
+{
+ if (*path_start == -1)
+ huh (); /* no path started? */
+ else if (path_type == NOPIECE)
+ e_set_func (*path_start, loc);
else {
- cityp = find_city (*path_start);
+ city_info_t *cityp = find_city (*path_start);
ASSERT (cityp);
e_set_city_func (cityp, path_type, loc);
}
else huh (); /* illegal command */
break;
}
- e = e; /* keep lint quiet */
}
/*
}
}
-#ifdef FUNCTION_WAS_NEVER_CALLED
+#ifdef __UNUSED__
/*
Return the cost to reach the adjacent cell of the correct type
with the lowest cost.
int best;
best = INFINITY;
-
+
FOR_ADJ (loc, new_loc, i)
if (pmap[new_loc].terrain == type && pmap[new_loc].cost < best)
best = pmap[new_loc].cost;
return (rand() % high);
}
+#ifdef __UNUSED__
int rndint(int minp, int maxp)
{
int size;
size = maxp - minp + 1;
return ((rand() % size) + minp);
}
+#endif
/*
Return the distance between two locations. This is simply
void
update(view_map_t vmap[], loc_t loc)
{
- piece_info_t *p;
-
vmap[loc].seen = date;
if (map[loc].cityp) /* is there a city here? */
vmap[loc].contents = city_char[map[loc].cityp->owner];
else {
- p = find_obj_at_loc (loc);
+ piece_info_t *p = find_obj_at_loc (loc);
if (p == NULL) /* nothing here? */
vmap[loc].contents = map[loc].contents;
{
loc_t loc;
piece_info_t *p;
- int i;
ABORT;
obj->func = NOFUNC;
}
else { /* look for nearest non-full transport */
+ int i;
(void) memcpy (amap, user_map, sizeof (view_map_t) * MAP_SIZE);
/* mark loading transports or cities building transports */
void
user_help(void)
{
- char c;
-
help (help_user, user_lines);
prompt ("Press any key to continue: ");
- c = get_chx ();
- c = c; /* keep lint happy */
+ (void)get_chx ();
}
/*
}
if (obj->hits > 0) {
kill_obj (obj, loc);
- if (enemy_killed) scan (comp_map, loc);
+ if (enemy_killed)
+ scan (comp_map, loc);
}
}
}
if (obj->hits > 0) {
kill_obj (obj, loc);
- if (enemy_killed) scan (comp_map, loc);
+ if (enemy_killed)
+ scan (comp_map, loc);
}
}