Store uids as int to support more sectors and units
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 30 Dec 2009 13:07:51 +0000 (14:07 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 19 Jan 2010 07:26:42 +0000 (08:26 +0100)
commitba2044be189f10349f4dba1bbe80c35ba0e81bae
treea61c79a1e268d4e49926124785d0a1358f2e7da5
parent18148f03fa96cad1dbca2e9a087670153a6b19dd
Store uids as int to support more sectors and units

Before, they were stored as short.  Wider uids use more space, but the
next commit will recover it by narrowing other members.

The use of short has always limited the number of ships, planes, land
units and nukes to SHRT_MAX (commonly 32768).  Only the most extreme
games ever came close.

Commit 49780e2c (v4.3.12) added struct sctstr member sct_uid to make
struct empobj member uid work for sectors.  This made the limit apply
to sectors as well.  We've had games with more than 32768 sectors.
18 files changed:
include/commodity.h
include/empobj.h
include/file.h
include/game.h
include/land.h
include/loan.h
include/lost.h
include/nat.h
include/nsc.h
include/nuke.h
include/plane.h
include/sect.h
include/ship.h
include/trade.h
include/treaty.h
src/lib/commands/mfir.c
src/lib/common/cargo.c
src/lib/common/nsc.c