else
pow->p_power = pow->p_power * (1.0 / 500.0);
/* ack. add this vec to the "world power" element */
- f_pt2 = &(powbuf[0].p_sects);
- f_ptr = &(pow->p_sects);
- while (f_ptr <= &(pow->p_power)) {
+ f_pt2 = &powbuf[0].p_sects;
+ f_ptr = &pow->p_sects;
+ while (f_ptr <= &pow->p_power) {
*f_pt2 += *f_ptr;
f_pt2++;
f_ptr++;
}
if (!in_mem)
free(row_ref);
- return(ret_val);
+ return ret_val;
}
int
static double
bp_seccost(struct as_coord from, struct as_coord to, s_char *pp)
{
- return ((double)mapdist((coord)from.x, (coord)from.y,
- (coord)to.x, (coord)to.y));
+ return (double)mapdist((coord)from.x, (coord)from.y,
+ (coord)to.x, (coord)to.y);
}
/*
void
lwpInitContext(struct lwpProc *newp, stack_t *spp)
{
- getcontext(&(newp->context));
+ getcontext(&newp->context);
newp->context.uc_stack.ss_sp = spp->ss_sp;
newp->context.uc_stack.ss_size = spp->ss_size;
- makecontext(&(newp->context), lwpEntryPoint, 0);
+ makecontext(&newp->context, lwpEntryPoint, 0);
}
#elif defined(ALPHA)
dam = (int)((roll(8) + 2) * mult);
if (dam > 100)
dam = 100;
- return(dam);
+ return dam;
}
/*
double g = (double)min(guns, 7);
d = ((double)(random() % 30) + 20.0) * ((double)g / 7.0);
- d *= ((double)effic);
+ d *= (double)effic;
d /= 100.0;
return d;
}
d = 0.0;
while (guns--)
d += 10.0 + (double)(random() % 6);
- d *= ((double)effic) * 0.01;
+ d *= (double)effic * 0.01;
return d;
}
shots = min(shots, guns);
while (shots-- > 0)
d += 5.0 + (double)(random() % 6);
- d *= ((double)effic) * 0.01;
+ d *= (double)effic * 0.01;
if (shells < ammo && ammo != 0)
- d *= (double)((double)shells / (double)ammo);
+ d *= (double)shells / (double)ammo;
return d;
}
{
double f;
- f = r - ((int)r);
+ f = r - (int)r;
if (chance(f))
- return ((int)r) + 1;
+ return (int)r + 1;
else
return (int)r;
}
s_char orig;
int mob;
- taken = lnd_getmil(&(llp->land));
+ taken = lnd_getmil(&llp->land);
/* Spies always die */
if (llp->lcp->l_flags & L_SPY) {
eff_eq = 100;
eff_eq =
ldround((((double)cas * 100.0) / (double)llp->lcp->l_mil), 1);
llp->land.lnd_effic -= eff_eq;
- lnd_submil(&(llp->land), cas);
+ lnd_submil(&llp->land, cas);
}
if (llp->land.lnd_effic < LAND_MINEFF) {
return taken;
} else {
/* Ok, now, how many did we take off? (sould be the diff) */
- taken = taken - lnd_getmil(&(llp->land));
+ taken = taken - lnd_getmil(&llp->land);
}
if (llp->land.lnd_effic >= llp->land.lnd_retreat)
}
/* Note we check would_abandon first because we don't want
to always have to do these checks */
- if (would_abandon(&osect, I_CIVIL, 0, &(llp->land))) {
+ if (would_abandon(&osect, I_CIVIL, 0, &llp->land)) {
stop = 0;
- if (!want_to_abandon(&osect, I_CIVIL, 0, &(llp->land))) {
+ if (!want_to_abandon(&osect, I_CIVIL, 0, &llp->land)) {
stop = 1;
}
/* now check stuff */
if (!check_sect_ok(&osect))
return 1;
for (qp2 = list->q_back; qp2 != list; qp2 = qp2->q_back) {
- if (!check_land_ok(&(((struct llist *)qp2)->land)))
+ if (!check_land_ok(&((struct llist *)qp2)->land))
return 1;
}
if (stop) {
/* We need to free the ship list */
qp = ship_list.q_forw;
- while (qp != &(ship_list)) {
+ while (qp != &ship_list) {
newqp = qp->q_forw;
emp_remque(qp);
free(qp);
/* We need to free the ship list (just in case) */
qp = ship_list.q_forw;
- while (qp != &(ship_list)) {
+ while (qp != &ship_list) {
newqp = qp->q_forw;
emp_remque(qp);
free(qp);