/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
#include "plane.h"
#include "file.h"
#include "nsc.h"
-#include "deity.h"
#include "prototypes.h"
#include "optlist.h"
+static void radmap2(int, int, int, int, int, double, int);
+
void
radmap(int cx, int cy, int eff, int range, double seesub)
{
}
/* More dynamic world sized buffers. We create 'em once, and then
- * never again. No need to keep creating/tearint apart. We may
+ * never again. No need to keep creating/tearing apart. We may
* want to do this in other places too where it doesn't matter. */
static s_char **rad;
static s_char *radbuf;
static s_char **vis;
static s_char *visbuf;
-void
+static void
radmap2(int owner,
int cx, int cy, int eff, int range, double seesub, int pr_flag)
{
return;
}
- bzero((s_char *)visbuf, (WORLD_Y * (WORLD_X + 1)));
+ memset(visbuf, 0, (WORLD_Y * (WORLD_X + 1)));
range = (int)(range * (eff / 100.0));
if (range < 1)
range = 1;
snxtsct_dist(&ns, cx, cy, range);
blankfill((s_char *)radbuf, &ns.range, 1);
while (nxtsct(&ns, §)) {
- if (sect.sct_own == owner ||
- (sect.sct_type <= SCT_RURAL && sect.sct_type != SCT_SANCT)
+ if (sect.sct_own == owner
+ || sect.sct_type == SCT_WATER
+ || sect.sct_type == SCT_MOUNT
+ || sect.sct_type == SCT_WASTE
|| ns.curdist <= range / 3)
rad[ns.dy][ns.dx] = dchr[sect.sct_type].d_mnem;
else
if (!pr_flag)
return;
snxtitem_dist(&ni, EF_PLANE, cx, cy, range);
- while (nxtitem(&ni, (caddr_t)&plane)) {
+ while (nxtitem(&ni, &plane)) {
if (plane.pln_own == 0)
continue;
/* Used to have 'ghosts' when scanning whole world --ts */
}
}
snxtitem_dist(&ni, EF_SHIP, cx, cy, range);
- while (nxtitem(&ni, (caddr_t)&ship)) {
+ while (nxtitem(&ni, &ship)) {
if (ship.shp_own == 0)
continue;
/* Used to have 'ghosts' when scanning whole world --ts */