should now compile, like distributed

This commit is contained in:
johns 2000-04-27 22:45:50 +00:00
parent 1a1b79910f
commit 073a005c19
5 changed files with 24 additions and 5 deletions

View file

@ -204,7 +204,7 @@ IFLAGS= -I$(TOPDIR)/src/include $(XIFLAGS)
## define flags
DEBUG= -DDEBUG #-DNEW_AI # -DFLAG_DEBUG
DFLAGS= $(THREAD) $(CCL) $(VERSION) $(GLIB) $(VIDEO) $(ZDEFS) $(DSOUND) \
$(DEBUG) -DNEW_UNIT -DNEW_NETWORK # -DNEW_VIDEO -DNEW_NAMES
$(DEBUG) -DNEW_UNIT -DNEW_NETWORK -DNEW_HEADING # -DNEW_VIDEO -DNEW_NAMES
## choose optimise level
#CFLAGS=-g -O0 $(PROFILE) -pipe -Wall -Werror $(IFLAGS) $(DFLAGS)

6
setup
View file

@ -33,7 +33,7 @@ MAKE=make
#------------------------------------------------------------------------------
# DON'T CHANGE ANYTHING FROM HERE DOWN UNLESS YOU KNOW WHAT YOU ARE DOING
VERSION="-DVERSION=\"1.17pre1-build1\""
VERSION="-DVERSION=\"1.17pre1-build2\""
WIN32=-1
# Choose optimization level
@ -442,7 +442,9 @@ if test "$DEBUG" = 1 ; then
fi
echo "DFLAGS= \$(THREAD) \$(CCL) \$(VERSION) \\" >> $RULESFILE
echo " \$(VIDEO) \$(ZDEFS) \$(DSOUND) \\" >> $RULESFILE
echo " \$(DEBUG) -DNEW_VIDEO" >> $RULESFILE
echo " \$(DEBUG) " >> $RULESFILE
# This could be used
# -DNEW_UNIT -DNEW_NETWORK -DNEW_HEADING # -DNEW_VIDEO -DNEW_NAMES
echo "CFLAGS=$CFLAGS $STATIC $EXTRA_CFLAGS" >> $RULESFILE

View file

@ -50,8 +50,20 @@
typedef struct _map_field_ {
unsigned short Tile; /// graphic tile number
unsigned short SeenTile; /// last seen tile (FOW)
unsigned char Value; /// HP for walls
unsigned short Flags; /// field flags
unsigned char Value; /// HP for walls/ Wood Regeneration
#ifdef NEW_FOW
unsigned char VisibileMask:4; /// Visibile mask
unsigned char ExploredMask:4; /// Explored mask
unsigned short Visibile; /// Visibile flags for all players.
unsigned short Explored; /// Explored flags for all players.
#endif
#ifdef UNIT_ON_MAP
union {
Unit* Units; /// An unit on the map field.
Unit** Array; /// More units on the map field.
} Here; /// What is on the field.
#endif
#ifdef UNITS_ON_MAP
UnitRef Building; /// Building or corpse.
UnitRef AirUnit; /// Air unit.
@ -63,6 +75,8 @@ typedef struct _map_field_ {
#define MapFieldVisible 0x0001 /// Field visible
#define MapFieldExplored 0x0002 /// Field explored
#define MapFieldArray 0x0004 /// More than one unit on the field
#define MapFieldHuman 0x0008 /// Human is owner of the field (walls)
#define MapFieldLandAllowed 0x0010 /// Land units allowed

View file

@ -137,6 +137,9 @@ extern void NetworkSendCommand(int command,Unit* unit,int x,int y
global int NetworkFildes = -1; /// Network file descriptor
global int NetworkInSync = 1; /// Network is in sync
global int NetworkUpdates = 5; /// Network update each # frames
global char* NetworkArg; /// Network command line argument
global int NetworkLag = 10; /// Network lag in # frames
/*----------------------------------------------------------------------------
-- Communication over the network.

View file

@ -845,7 +845,7 @@ global void UnitIncrementHealth(void)
for( i=0; i< NumUnits; i++) {
unit=Units[i];
if( unit->Type==berserker
&& unit->HP<unit->Stats->HP
&& unit->HP<unit->Stats->HitPoints
&& UpgradeIdAllowed(unit->Player,regeneration)=='R' ) {
++unit->HP; // FIXME: how fast do we regenerate
}