(IO_CONN, io_conn, IOQ_BUFSIZE, MAXIOV, LND_NOTANY, plur)
(techfactfire, reltech, P_DISTING, PLN_MAXDEF, filetruncate, sct_init) (nxtsctp, AN_SAILDIR, UDTIMES_MAX, BLITZTIME): Unused, remove.
This commit is contained in:
parent
4be9c189cb
commit
09b0b83971
19 changed files with 3 additions and 154 deletions
|
@ -32,8 +32,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define MAXIOV 16
|
||||
|
||||
struct ioqueue {
|
||||
struct qelem queue; /* queue fwd/back */
|
||||
int bsize; /* basic block size */
|
||||
|
|
|
@ -179,7 +179,7 @@ orde(void)
|
|||
ship.shp_destx[0] = p0x;
|
||||
ship.shp_desty[0] = p0y;
|
||||
|
||||
ship.shp_autonav &= ~(AN_STANDBY + AN_SAILDIR + AN_LOADING);
|
||||
ship.shp_autonav &= ~(AN_STANDBY | AN_LOADING);
|
||||
ship.shp_autonav |= AN_AUTONAV;
|
||||
|
||||
if (scuttling)
|
||||
|
|
|
@ -84,9 +84,3 @@ fdate(int fd)
|
|||
return 0;
|
||||
return statb.st_mtime;
|
||||
}
|
||||
|
||||
void
|
||||
filetruncate(s_char *name)
|
||||
{
|
||||
close(open(name, O_RDWR | O_TRUNC, 0660));
|
||||
}
|
||||
|
|
|
@ -65,24 +65,3 @@ techfact(int level, double mult)
|
|||
{
|
||||
return mult * ((50.0 + level) / (200.0 + level));
|
||||
}
|
||||
|
||||
/*
|
||||
* added so that firing range can be different to other ranges
|
||||
*/
|
||||
double
|
||||
techfactfire(int level, double mult)
|
||||
{
|
||||
return mult * ((50.0 + level) / (200.0 + level)) * fire_range_factor;
|
||||
}
|
||||
|
||||
/*
|
||||
* figure out relative difference between two tech levels
|
||||
*/
|
||||
double
|
||||
reltech(int level1, int level2, double mult)
|
||||
{
|
||||
int diff;
|
||||
|
||||
diff = level1 - level2;
|
||||
return (1.0 + ((diff + 50.0) / (level1 + 50.0))) * mult;
|
||||
}
|
||||
|
|
|
@ -403,12 +403,6 @@ io_noblocking(struct iop *iop, int value)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
io_conn(struct iop *iop)
|
||||
{
|
||||
return iop->flags & IO_CONN;
|
||||
}
|
||||
|
||||
int
|
||||
io_error(struct iop *iop)
|
||||
{
|
||||
|
|
|
@ -34,12 +34,6 @@
|
|||
#include "misc.h"
|
||||
#include "gen.h"
|
||||
|
||||
s_char *
|
||||
plur(int n, s_char *no, s_char *yes)
|
||||
{
|
||||
return n == 1 ? no : yes;
|
||||
}
|
||||
|
||||
s_char *
|
||||
splur(int n)
|
||||
{
|
||||
|
|
|
@ -148,15 +148,3 @@ issector(s_char *arg)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
sct_init(coord x, coord y, s_char *ptr)
|
||||
{
|
||||
struct sctstr *sp = (struct sctstr *)ptr;
|
||||
|
||||
sp->ef_type = EF_SECTOR;
|
||||
sp->sct_x = x;
|
||||
sp->sct_y = y;
|
||||
sp->sct_dist_x = x;
|
||||
sp->sct_dist_y = y;
|
||||
}
|
||||
|
|
|
@ -37,12 +37,12 @@ NTLIB = $(SRCDIR)\lib\libupdate.lib
|
|||
|
||||
OBJS = age.o anno.o bp.o deliver.o distribute.o finish.o human.o land.o \
|
||||
main.o material.o mobility.o move_sat.o nat.o nav_ship.o nav_util.o \
|
||||
nxtitemp.o nxtsctp.o plague.o plane.o populace.o prepare.o produce.o \
|
||||
nxtitemp.o plague.o plane.o populace.o prepare.o produce.o \
|
||||
removewants.o revolt.o sail.o sect.o ship.o
|
||||
|
||||
NTOBJS = age.obj anno.obj bp.obj deliver.obj distribute.obj finish.obj \
|
||||
human.obj land.obj main.obj material.obj mobility.obj move_sat.obj \
|
||||
nat.obj nav_ship.obj nav_util.obj nxtitemp.obj nxtsctp.obj plague.obj \
|
||||
nat.obj nav_ship.obj nav_util.obj nxtitemp.obj plague.obj \
|
||||
plane.obj populace.obj prepare.obj produce.obj removewants.obj \
|
||||
revolt.obj sail.obj sect.obj ship.obj
|
||||
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
* Empire - A multi-player, client/server Internet based war game.
|
||||
* Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
|
||||
* Ken Stevens, Steve McClure
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
|
||||
* related information and legal notices. It is expected that any future
|
||||
* projects/authors will amend these files as needed.
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* nxtsctp.c: select/get the next sector from a rnage of sectors
|
||||
*
|
||||
* Known contributors to this file:
|
||||
* Dave Pare, 1989
|
||||
*/
|
||||
|
||||
#include "misc.h"
|
||||
#include "xy.h"
|
||||
#include "sect.h"
|
||||
#include "nsc.h"
|
||||
#include "file.h"
|
||||
#include "update.h"
|
||||
#include "gen.h"
|
||||
#include "optlist.h"
|
||||
|
||||
/*
|
||||
* get the next sector in the range
|
||||
* that matches the conditions.
|
||||
*/
|
||||
struct sctstr *
|
||||
nxtsctp(struct nstr_sect *np)
|
||||
{
|
||||
while (1) {
|
||||
np->dx++;
|
||||
np->x++;
|
||||
if (np->x >= WORLD_X)
|
||||
np->x = 0;
|
||||
if (np->dx >= np->range.width) {
|
||||
np->dx = 0;
|
||||
np->x = np->range.lx;
|
||||
np->dy++;
|
||||
if (np->dy >= np->range.height)
|
||||
return (struct sctstr *)0;
|
||||
np->y++;
|
||||
if (np->y >= WORLD_Y)
|
||||
np->y = 0;
|
||||
}
|
||||
if ((np->y + np->x) & 01)
|
||||
continue;
|
||||
if (np->type == NS_DIST) {
|
||||
np->curdist = mapdist(np->x, np->y, np->cx, np->cy);
|
||||
if (np->curdist > np->dist)
|
||||
continue;
|
||||
}
|
||||
return getsectp(np->x, np->y);
|
||||
}
|
||||
/*NOTREACHED*/
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue