stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/include net_lowlevel.h netconnect...


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/include net_lowlevel.h netconnect...
Date: 22 Dec 2003 16:52:35 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       03/12/22 16:52:34

Modified files:
        src/include    : net_lowlevel.h netconnect.h network.h 
                         pathfinder.h player.h pud.h rdtsc.h settings.h 

Log message:
        More Tab Cleanup

Patches:
Index: stratagus/src/include/net_lowlevel.h
diff -u stratagus/src/include/net_lowlevel.h:1.33 
stratagus/src/include/net_lowlevel.h:1.34
--- stratagus/src/include/net_lowlevel.h:1.33   Mon Dec 22 16:07:20 2003
+++ stratagus/src/include/net_lowlevel.h        Mon Dec 22 16:52:33 2003
@@ -10,7 +10,7 @@
 //
 /address@hidden net_lowlevel.h - The network low level header file. */
 //
-//      (c) Copyright 1998-2001 by Lutz Sammer
+//      (c) Copyright 1998-2004 by Lutz Sammer
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: net_lowlevel.h,v 1.33 2003/12/22 05:07:20 wizzard Exp $
+//      $Id: net_lowlevel.h,v 1.34 2003/12/22 05:52:33 wizzard Exp $
 
 #ifndef __NET_LOWLEVEL_H
 #define __NET_LOWLEVEL_H
Index: stratagus/src/include/netconnect.h
diff -u stratagus/src/include/netconnect.h:1.54 
stratagus/src/include/netconnect.h:1.55
--- stratagus/src/include/netconnect.h:1.54     Mon Dec 22 16:07:20 2003
+++ stratagus/src/include/netconnect.h  Mon Dec 22 16:52:33 2003
@@ -10,7 +10,7 @@
 //
 /address@hidden netconnect.h - The network connection setup header file. */
 //
-//      (c) Copyright 1998-2003 by Lutz Sammer, Andreas Arens
+//      (c) Copyright 1998-2004 by Lutz Sammer, Andreas Arens
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: netconnect.h,v 1.54 2003/12/22 05:07:20 wizzard Exp $
+//      $Id: netconnect.h,v 1.55 2003/12/22 05:52:33 wizzard Exp $
 
 #ifndef __NETCONNECT_H__
 #define __NETCONNECT_H__
Index: stratagus/src/include/network.h
diff -u stratagus/src/include/network.h:1.46 
stratagus/src/include/network.h:1.47
--- stratagus/src/include/network.h:1.46        Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/network.h     Mon Dec 22 16:52:33 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden network.h      -       The network header file. */
+/address@hidden network.h - The network header file. */
 //
-//     (c) Copyright 1998-2002 by Lutz Sammer
+//      (c) Copyright 1998-2004 by Lutz Sammer, Russell Smith
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: network.h,v 1.46 2003/12/20 05:33:27 jsalmon3 Exp $
+//      $Id: network.h,v 1.47 2003/12/22 05:52:33 wizzard Exp $
 
 #ifndef __NETWORK_H__
 #define __NETWORK_H__
@@ -34,7 +34,7 @@
 //@{
 
 /*----------------------------------------------------------------------------
---             Includes
+--  Includes
 ----------------------------------------------------------------------------*/
 
 #include "unittype.h"
@@ -43,162 +43,162 @@
 #include "net_lowlevel.h"
 
 /*----------------------------------------------------------------------------
---             Defines
+--  Defines
 ----------------------------------------------------------------------------*/
 
-#define NetworkMaxLag          250                             /// Debuging 
network lag (# game cycles)
+#define NetworkMaxLag 250  /// Debuging network lag (# game cycles)
 
-#define MaxNetworkCommands             9                               /// Max 
Commands In A Packet
+#define MaxNetworkCommands 9  /// Max Commands In A Packet
 
 /*----------------------------------------------------------------------------
---             Declarations
+--  Declarations
 ----------------------------------------------------------------------------*/
 
 /**
-**             Network message types.
+**  Network message types.
 **
-**             @todo cleanup the message types.
+**  @todo cleanup the message types.
 */
 enum _message_type_ {
-       MessageNone,                                            /// When 
Nothing Is Happening
-       MessageInitHello,                                               /// 
Start connection
-       MessageInitReply,                                               /// 
Connection reply
-       MessageInitConfig,                                              /// 
Setup message configure clients
-
-       MessageSync,                                            /// Heart beat
-       MessageQuit,                                            /// Quit game
-       MessageQuitAck,                                         /// Quit reply 
- UNUSED YET             Protocol Version 2 - Reserved for menus
-       MessageResend,                                          /// Resend 
message
-
-       MessageChat,                                            /// Chat message
-       MessageChatTerm,                                                /// 
Chat message termination -  Protocol Version 2
-
-       MessageCommandStop,                                             /// 
Unit command stop
-       MessageCommandStand,                            /// Unit command stand 
ground
-       MessageCommandFollow,                           /// Unit command follow
-       MessageCommandMove,                                             /// 
Unit command move
-       MessageCommandRepair,                           /// Unit command repair
-       MessageCommandAttack,                           /// Unit command attack
-       MessageCommandGround,                           /// Unit command attack 
ground
-       MessageCommandPatrol,                           /// Unit command patrol
-       MessageCommandBoard,                            /// Unit command borad
-       MessageCommandUnload,                           /// Unit command unload
-       MessageCommandBuild,                            /// Unit command build 
building
-       MessageCommandDismiss,                          /// Unit command 
dismiss unit
-       MessageCommandResourceLoc,                              /// Unit 
command resource location
-       MessageCommandResource,                         /// Unit command 
resource
-       MessageCommandReturn,                           /// Unit command return 
goods
-       MessageCommandTrain,                            /// Unit command train
-       MessageCommandCancelTrain,                              /// Unit 
command cancel training
-       MessageCommandUpgrade,                          /// Unit command upgrade
-       MessageCommandCancelUpgrade,            /// Unit command cancel upgrade
-       MessageCommandResearch,                         /// Unit command 
research
-       MessageCommandCancelResearch,           /// Unit command cancel research
+       MessageNone,                   /// When Nothing Is Happening
+       MessageInitHello,              /// Start connection
+       MessageInitReply,              /// Connection reply
+       MessageInitConfig,             /// Setup message configure clients
+
+       MessageSync,                   /// Heart beat
+       MessageQuit,                   /// Quit game
+       MessageQuitAck,                /// Quit reply - UNUSED YET - Protocol 
Version 2 - Reserved for menus
+       MessageResend,                 /// Resend message
+
+       MessageChat,                   /// Chat message
+       MessageChatTerm,               /// Chat message termination -  Protocol 
Version 2
+
+       MessageCommandStop,            /// Unit command stop
+       MessageCommandStand,           /// Unit command stand ground
+       MessageCommandFollow,          /// Unit command follow
+       MessageCommandMove,            /// Unit command move
+       MessageCommandRepair,          /// Unit command repair
+       MessageCommandAttack,          /// Unit command attack
+       MessageCommandGround,          /// Unit command attack ground
+       MessageCommandPatrol,          /// Unit command patrol
+       MessageCommandBoard,           /// Unit command borad
+       MessageCommandUnload,          /// Unit command unload
+       MessageCommandBuild,           /// Unit command build building
+       MessageCommandDismiss,         /// Unit command dismiss unit
+       MessageCommandResourceLoc,     /// Unit command resource location
+       MessageCommandResource,        /// Unit command resource
+       MessageCommandReturn,          /// Unit command return goods
+       MessageCommandTrain,           /// Unit command train
+       MessageCommandCancelTrain,     /// Unit command cancel training
+       MessageCommandUpgrade,         /// Unit command upgrade
+       MessageCommandCancelUpgrade,   /// Unit command cancel upgrade
+       MessageCommandResearch,        /// Unit command research
+       MessageCommandCancelResearch,  /// Unit command cancel research
 
-       MessageExtendedCommand,                         /// Command is the next 
byte
+       MessageExtendedCommand,        /// Command is the next byte
 
        // ATTN: __MUST__ be last due to spellid encoding!!!
-       MessageCommandSpellCast                         /// Unit command spell 
cast
+       MessageCommandSpellCast        /// Unit command spell cast
 };
 
 /**
-**             Network extended message types.
+**  Network extended message types.
 */
 enum _extended_message_type_ {
-       ExtendedMessageDiplomacy,                               /// Change 
diplomacy
-       ExtendedMessageSharedVision,            /// Change shared vision
+       ExtendedMessageDiplomacy,     /// Change diplomacy
+       ExtendedMessageSharedVision,  /// Change shared vision
 };
 
 /**
-**             Network acknowledge message.
+**  Network acknowledge message.
 */
 typedef struct _ack_message_ {
-       unsigned char           Type;                           /// Acknowledge 
message type
+       unsigned char Type;  /// Acknowledge message type
 } Acknowledge;
 
 /**
-**             Network command message.
+**  Network command message.
 */
 typedef struct _network_command_ {
-       UnitRef                         Unit;                           /// 
Command for unit
-       unsigned short          X;                              /// Map 
position X
-       unsigned short          Y;                              /// Map 
position Y
-       UnitRef                         Dest;                           /// 
Destination unit
+       UnitRef        Unit;  /// Command for unit
+       unsigned short X;     /// Map position X
+       unsigned short Y;     /// Map position Y
+       UnitRef        Dest;  /// Destination unit
 } NetworkCommand;
 
 /**
-**             Extended network command message.
+**  Extended network command message.
 */
 typedef struct _network_extended_command_ {
-       unsigned char           ExtendedType;           /// Extended network 
command type
-       unsigned char           Arg1;                           /// Argument 1
-       unsigned short          Arg2;                           /// Argument 2
-       unsigned short          Arg3;                           /// Argument 3
-       unsigned short          Arg4;                           /// Argument 4
+       unsigned char  ExtendedType;  /// Extended network command type
+       unsigned char  Arg1;          /// Argument 1
+       unsigned short Arg2;          /// Argument 2
+       unsigned short Arg3;          /// Argument 3
+       unsigned short Arg4;          /// Argument 4
 } NetworkExtendedCommand;
 
 /**
-**             Network chat message.
+**  Network chat message.
 */
 typedef struct _network_chat_ {
-       unsigned char           Player;                         /// Sending 
player
-       char                            Text[7];                /// Message 
bytes
+       unsigned char Player;   /// Sending player
+       char          Text[7];  /// Message bytes
 } NetworkChat;
 
 /**
-**             Network packet header.
+**  Network packet header.
 **
-**             Header for the packet.
+**  Header for the packet.
 */
 typedef struct _network_packet_header_ {
-       unsigned char           Cycle;                          /// Destination 
game cycle
-       unsigned char           Type[MaxNetworkCommands];               /// 
Command
-                                                                               
        /// Commands in packet
+       unsigned char Cycle;                     /// Destination game cycle
+       unsigned char Type[MaxNetworkCommands];  /// Command
+       /// Commands in packet
 } NetworkPacketHeader;
 
 /**
-**             Network packet.
+**  Network packet.
 **
-**             This is sent over the network.
+**  This is sent over the network.
 **
 */
 typedef struct _network_packet_ {
-       NetworkPacketHeader             Header;                         /// 
Packet Header Info
-       NetworkCommand          Command[MaxNetworkCommands];
+       NetworkPacketHeader Header;  /// Packet Header Info
+       NetworkCommand      Command[MaxNetworkCommands];
 } NetworkPacket;
 
 /*----------------------------------------------------------------------------
---             Variables
+--  Variables
 ----------------------------------------------------------------------------*/
 
-extern int NetworkNumInterfaces;               /// Network number of interfaces
-extern Socket NetworkFildes;                           /// Network file 
descriptor
-extern int NetworkInSync;                              /// Network is in sync
-extern int NetworkUpdates;                             /// Network update each 
# game cycles
-extern int NetworkLag;                                         /// Network lag 
(# game cycles)
-extern unsigned long NetworkStatus[PlayerMax];         /// Network status
+extern int NetworkNumInterfaces;  /// Network number of interfaces
+extern Socket NetworkFildes;      /// Network file descriptor
+extern int NetworkInSync;         /// Network is in sync
+extern int NetworkUpdates;        /// Network update each # game cycles
+extern int NetworkLag;            /// Network lag (# game cycles)
+extern unsigned long NetworkStatus[PlayerMax];  /// Network status
 
 /*----------------------------------------------------------------------------
---             Functions
+--  Functions
 ----------------------------------------------------------------------------*/
 
-extern void InitNetwork1(void);                                /// Initialise 
network part 1 (ports)
-extern void InitNetwork2(void);                                /// Initialise 
network part 2
-extern void ExitNetwork1(void);                                /// Cleanup 
network part 1 (ports)
-extern void NetworkEvent(void);                                /// Handle 
network events
-extern void NetworkSync(void);                         /// Hold in sync
-extern void NetworkQuit(void);                         /// Quit game
-extern void NetworkRecover(void);              /// Recover network
-extern void NetworkCommands(void);             /// Get all network commands
-extern void NetworkChatMessage(const char*msg);                /// Send chat 
message
+extern void InitNetwork1(void);  /// Initialise network part 1 (ports)
+extern void InitNetwork2(void);  /// Initialise network part 2
+extern void ExitNetwork1(void);  /// Cleanup network part 1 (ports)
+extern void NetworkEvent(void);  /// Handle network events
+extern void NetworkSync(void);   /// Hold in sync
+extern void NetworkQuit(void);   /// Quit game
+extern void NetworkRecover(void);   /// Recover network
+extern void NetworkCommands(void);  /// Get all network commands
+extern void NetworkChatMessage(const char*msg);  /// Send chat message
        /// Send network command.
-extern void NetworkSendCommand(int command,const Unit* unit,int x,int y,
-               const Unit* dest,const UnitType* type,int status);
+extern void NetworkSendCommand(int command, const Unit* unit, int x, int y,
+       const Unit* dest, const UnitType* type, int status);
        /// Send extended network command.
-extern void NetworkSendExtendedCommand(int command,int arg1,int arg2,int arg3,
-               int arg4,int status);
+extern void NetworkSendExtendedCommand(int command, int arg1, int arg2, int 
arg3,
+       int arg4, int status);
        /// Register ccl functions related to network
 extern void NetworkCclRegister(void);
 //@}
 
-#endif         // !__NETWORK_H__
+#endif // !__NETWORK_H__
Index: stratagus/src/include/pathfinder.h
diff -u stratagus/src/include/pathfinder.h:1.37 
stratagus/src/include/pathfinder.h:1.38
--- stratagus/src/include/pathfinder.h:1.37     Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/pathfinder.h  Mon Dec 22 16:52:33 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden pathfinder.h   -       The path finder headerfile. */
+/address@hidden pathfinder.h - The path finder headerfile. */
 //
-//     (c) Copyright 1998-2003 by Lutz Sammer,Russell Smith
+//      (c) Copyright 1998-2004 by Lutz Sammer, Russell Smith
 //
 //      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
@@ -26,51 +26,51 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: pathfinder.h,v 1.37 2003/12/20 05:33:27 jsalmon3 Exp $
+//      $Id: pathfinder.h,v 1.38 2003/12/22 05:52:33 wizzard Exp $
 
-#ifndef        __PATH_FINDER_H__
-#define                __PATH_FINDER_H__
+#ifndef __PATH_FINDER_H__
+#define __PATH_FINDER_H__
 
 //@{
 
 /*----------------------------------------------------------------------------
---             Includes
+--  Includes
 ----------------------------------------------------------------------------*/
 
 #include "unit.h"
 #include "map.h"
 
 /*----------------------------------------------------------------------------
---             Declarations
+--  Declarations
 ----------------------------------------------------------------------------*/
 
 /**
-**             Result codes of the pathfinder.
+**  Result codes of the pathfinder.
 **
-**             @todo
-**                             Another idea is         SINT_MAX as reached, 
SINT_MIN as unreachable
-**                             stop others how far to goal.
+**  @todo
+**    Another idea is SINT_MAX as reached, SINT_MIN as unreachable
+**    stop others how far to goal.
 */
 enum _move_return_ {
-       PF_FAILED=-3,                                           /// This 
Pathfinder failed, try another
-       PF_UNREACHABLE=-2,                                              /// 
Unreachable stop
-       PF_REACHED=-1,                                          /// Reached 
goal stop
-       PF_WAIT=0,                                                              
/// Wait, no time or blocked
-       PF_MOVE=1,                                                              
/// On the way moving
+       PF_FAILED=-3,       /// This Pathfinder failed, try another
+       PF_UNREACHABLE=-2,  /// Unreachable stop
+       PF_REACHED=-1,      /// Reached goal stop
+       PF_WAIT=0,          /// Wait, no time or blocked
+       PF_MOVE=1,          /// On the way moving
 };
 
 /**
-**             To remove pathfinder internals. Called if path destination 
changed.
+**  To remove pathfinder internals. Called if path destination changed.
 */
 #define NewResetPath(unit) \
        do { unit->Data.Move.Fast=1; unit->Data.Move.Length=0; }while( 0 )
 
 /*----------------------------------------------------------------------------
---             Variables
+--  Variables
 ----------------------------------------------------------------------------*/
 
        /// Path matrix
-extern unsigned char Matrix[(MaxMapWidth+2)*(MaxMapHeight+3)+2];
+extern unsigned char Matrix[(MaxMapWidth + 2) * (MaxMapHeight + 3) + 2];
        /// cost associated to move on a tile occupied by a fixed unit
 extern int AStarFixedUnitCrossingCost;
        /// cost associated to move on a tile occupied by a moving unit
@@ -82,13 +82,13 @@
 
 //
 //  Convert heading into direction.
-//                                                     //  N NE  E SE  S SW  W 
NW
+//  N NE  E SE  S SW  W NW
 extern const int Heading2X[9];
 extern const int Heading2Y[9];
 extern const int XY2Heading[3][3];
 
 /*----------------------------------------------------------------------------
---             Functions
+--  Functions
 ----------------------------------------------------------------------------*/
 
        /// Create a matrix for the old pathfinder
@@ -98,15 +98,15 @@
        /// Get next element of the way to goal.
 extern int NewPath(Unit* unit);
        /// Return distance to unit.
-extern int UnitReachable(Unit* unit,Unit* dst,int range);
+extern int UnitReachable(Unit* unit, Unit* dst, int range);
 
-extern int PlaceReachable(Unit* src,int x,int y,int w,int h,int minrange,int 
maxrange);
+extern int PlaceReachable(Unit* src, int x, int y, int w, int h, int minrange, 
int maxrange);
 
 //
-//             in astar.c
+// in astar.c
 //
        /// Returns the next element of the path
-extern int NextPathElement(Unit*,int* xdp,int* ydp);
+extern int NextPathElement(Unit*, int* xdp, int* ydp);
 
        /// Init the a* data structures
 extern void InitAStar(void);
@@ -117,7 +117,7 @@
        /// Find and a* path for a unit
 extern int AStarFindPath(Unit* unit, int gx, int gy, int gw, int gh, int 
minrange, int maxrange, char* path);
 //
-//             in ccl_pathfinder.c
+// in ccl_pathfinder.c
 //
        /// register ccl features
 extern void PathfinderCclRegister(void);
@@ -132,4 +132,4 @@
 #include "../pathfinder/splitter.h"
 #endif /* MAP_REGIONS */
 
-#endif         // !__PATH_FINDER_H__
+#endif // !__PATH_FINDER_H__
Index: stratagus/src/include/player.h
diff -u stratagus/src/include/player.h:1.80 stratagus/src/include/player.h:1.81
--- stratagus/src/include/player.h:1.80 Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/player.h      Mon Dec 22 16:52:33 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden player.h       -       The player headerfile. */
+/address@hidden player.h - The player headerfile. */
 //
-//     (c) Copyright 1998-2003 by Lutz Sammer
+//      (c) Copyright 1998-2004 by Lutz Sammer
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: player.h,v 1.80 2003/12/20 05:33:27 jsalmon3 Exp $
+//      $Id: player.h,v 1.81 2003/12/22 05:52:33 wizzard Exp $
 
 #ifndef __PLAYER_H__
 #define __PLAYER_H__
@@ -34,249 +34,249 @@
 //@{
 
 /*----------------------------------------------------------------------------
---             Documentation
+--  Documentation
 ----------------------------------------------------------------------------*/
 
 /**
-**             @struct _player_ player.h
+**  @struct _player_ player.h
 **
-**             \#include "player.h"
+**  \#include "player.h"
 **
-**             typedef struct _player_ Player;
+**  typedef struct _player_ Player;
 **
-**             This structure contains all informations about a player in game.
+**  This structure contains all informations about a player in game.
 **
-**             The player structure members:
+**  The player structure members:
 **
-**             Player::Player
+**  Player::Player
 **
-**                             This is the unique slot number. It is not 
possible that two
-**                             players have the same slot number at the same 
time. The slot
-**                             numbers are reused in the future. This means if 
a player is
-**                             defeated, a new player can join using this 
slot. Currently
-**                             #PlayerMax (16) players are supported. This 
member is used to
-**                             access bit fields.
-**                             Slot #PlayerNumNeutral (15) is reserved for the 
neutral units
-**                             like gold-mines or critters.
+**    This is the unique slot number. It is not possible that two
+**    players have the same slot number at the same time. The slot
+**    numbers are reused in the future. This means if a player is
+**    defeated, a new player can join using this slot. Currently
+**    #PlayerMax (16) players are supported. This member is used to
+**    access bit fields.
+**    Slot #PlayerNumNeutral (15) is reserved for the neutral units
+**    like gold-mines or critters.
 **
-**                             @note Should call this member Slot?
+**    @note Should call this member Slot?
 **
-**             Player::Name
+**  Player::Name
 **
-**                             Name of the player used for displays and 
network game.
-**                             It is restricted to 15 characters plus final 
zero.
+**    Name of the player used for displays and network game.
+**    It is restricted to 15 characters plus final zero.
 **
-**             Player::Type
+**  Player::Type
 **
-**                             Type of the player. This field is setup from 
the level (PUD).
-**                             We support currently #PlayerNeutral,
-**                             #PlayerNobody, #PlayerComputer, #PlayerPerson,
-**                             #PlayerRescuePassive and #PlayerRescueActive.
-**                             @see #PlayerTypes.
+**    Type of the player. This field is setup from the level (PUD).
+**    We support currently #PlayerNeutral,
+**    #PlayerNobody, #PlayerComputer, #PlayerPerson,
+**    #PlayerRescuePassive and #PlayerRescueActive.
+**    @see #PlayerTypes.
 **
-**             Player::RaceName
+**  Player::RaceName
 **
-**                             Name of the race to which the player belongs, 
used to select
-**                             the user interface and the AI.
-**                             We have 'orc', 'human', 'alliance' or 
'mythical'. Should
-**                             only be used during configuration and not 
during runtime.
+**    Name of the race to which the player belongs, used to select
+**    the user interface and the AI.
+**    We have 'orc', 'human', 'alliance' or 'mythical'. Should
+**    only be used during configuration and not during runtime.
 **
-**             Player::Race
+**  Player::Race
 **
-**                             Race number of the player. This field is setup 
from the level
-**                             (PUD). This number is mapped with #PlayerRaces 
to the symbolic
-**                             name Player::RaceName.
+**    Race number of the player. This field is setup from the level
+**    (PUD). This number is mapped with #PlayerRaces to the symbolic
+**    name Player::RaceName.
 **
-**             Player::AiNum
+**  Player::AiNum
 **
-**                             AI number for computer (See #PlayerAis). This 
field is setup
-**                             from the level (PUD). Used to select the AI for 
the computer
-**                             player.
+**    AI number for computer (See #PlayerAis). This field is setup
+**    from the level (PUD). Used to select the AI for the computer
+**    player.
 **
-**             Player::Team
+**  Player::Team
 **
-**                             Team of player. Selected during network game 
setup. All players
-**                             of the same team are allied and enemy to all 
other teams.
-**                             @note It is planned to show the team on the map.
+**    Team of player. Selected during network game setup. All players
+**    of the same team are allied and enemy to all other teams.
+**    @note It is planned to show the team on the map.
 **
-**             Player::Enemy
+**  Player::Enemy
 **
-**                             A bit field which contains the enemies of this 
player.
-**                             If Player::Enemy & (1<<Player::Player) != 0 its 
an enemy.
-**                             Setup during startup using the Player::Team, 
can later be
-**                             changed with diplomacy. Player::Enemy and 
Player::Allied
-**                             are combined, if none bit is set, the player is 
neutral.
-**                             @note You can be allied to a player, which sees 
you as enemy.
+**    A bit field which contains the enemies of this player.
+**    If Player::Enemy & (1<<Player::Player) != 0 its an enemy.
+**    Setup during startup using the Player::Team, can later be
+**    changed with diplomacy. Player::Enemy and Player::Allied
+**    are combined, if none bit is set, the player is neutral.
+**    @note You can be allied to a player, which sees you as enemy.
 **
-**             Player::Allied
+**  Player::Allied
 **
-**                             A bit field which contains the allies of this 
player.
-**                             If Player::Allied & (1<<Player::Player) != 0 
its an allied.
-**                             Setup during startup using the Player:Team, can 
later be
-**                             changed with diplomacy. Player::Enemy and 
Player::Allied
-**                             are combined, if none bit is set, the player is 
neutral.
-**                             @note You can be allied to a player, which sees 
you as enemy.
+**    A bit field which contains the allies of this player.
+**    If Player::Allied & (1<<Player::Player) != 0 its an allied.
+**    Setup during startup using the Player:Team, can later be
+**    changed with diplomacy. Player::Enemy and Player::Allied
+**    are combined, if none bit is set, the player is neutral.
+**    @note You can be allied to a player, which sees you as enemy.
 **
-**             Player::StartX Player::StartY
+**  Player::StartX Player::StartY
 **
-**                             The tile map coordinates of the player start 
position. 0,0 is
-**                             the upper left on the map. This members are 
setup from the
-**                             level (PUD) and only important for the game 
start.
-**                             Ignored if game starts with level settings. 
Used to place
-**                             the initial workers if you play with 1 or 3 
workers.
+**    The tile map coordinates of the player start position. 0,0 is
+**    the upper left on the map. This members are setup from the
+**    level (PUD) and only important for the game start.
+**    Ignored if game starts with level settings. Used to place
+**    the initial workers if you play with 1 or 3 workers.
 **
-**             Player::Resources[::MaxCosts]
+**  Player::Resources[::MaxCosts]
 **
-**                             How many resources the player owns. Needed for 
building
-**                             units and structures.
-**                             @see _costs_, TimeCost, GoldCost, WoodCost, 
OilCost, MaxCosts.
+**    How many resources the player owns. Needed for building
+**    units and structures.
+**    @see _costs_, TimeCost, GoldCost, WoodCost, OilCost, MaxCosts.
 **
-**             Player::Incomes[::MaxCosts]
+**  Player::Incomes[::MaxCosts]
 **
-**                             Income of the resources, when they are 
delivered at a store.
-**                             @see _costs_, TimeCost, GoldCost, WoodCost, 
OilCost, MaxCosts.
+**    Income of the resources, when they are delivered at a store.
+**    @see _costs_, TimeCost, GoldCost, WoodCost, OilCost, MaxCosts.
 **
-**             Player::LastResources[::MaxCosts]
+**  Player::LastResources[::MaxCosts]
 **
-**                             Keeps track of resources in time (used for 
calculating
-**                             Player::Revenue, see below)
+**    Keeps track of resources in time (used for calculating
+**    Player::Revenue, see below)
 **
-**             Player::Revenue[::MaxCosts]
+**  Player::Revenue[::MaxCosts]
 **
-**                             Production of resources per minute (or 
estimates)
-**                       Used just as information (statistics) for the 
player...
+**    Production of resources per minute (or estimates)
+**       Used just as information (statistics) for the player...
 **
-**             Player::UnitTypesCount[::UnitTypeMax]
+**  Player::UnitTypesCount[::UnitTypeMax]
 **
-**                             Total count for each different unit type. Used 
by the AI and
-**                             for dependencies checks. The addition of all 
counts should
-**                             be Player::TotalNumUnits.
-**                             @note Should not use the maximum number of 
unit-types here,
-**                             only the real number of unit-types used.
+**    Total count for each different unit type. Used by the AI and
+**    for dependencies checks. The addition of all counts should
+**    be Player::TotalNumUnits.
+**    @note Should not use the maximum number of unit-types here,
+**    only the real number of unit-types used.
 **
-**             Player::AiEnabled
+**  Player::AiEnabled
 **
-**                             If the player is controlled by the computer and 
this flag is
-**                             true, than the player is handled by the AI on 
this local
-**                             computer.
+**    If the player is controlled by the computer and this flag is
+**    true, than the player is handled by the AI on this local
+**    computer.
 **
-**                             @note Currently the AI is calculated parallel 
on all computers
-**                             in a network play. It is planned to change this.
+**    @note Currently the AI is calculated parallel on all computers
+**    in a network play. It is planned to change this.
 **
-**             Player::Ai
+**  Player::Ai
 **
-**                             AI structure pointer. Please look at #PlayerAi 
for more
-**                             informations.
+**    AI structure pointer. Please look at #PlayerAi for more
+**    informations.
 **
-**             Player::Units
+**  Player::Units
 **
-**                             A table of all (Player::TotalNumUnits) units of 
the player.
+**    A table of all (Player::TotalNumUnits) units of the player.
 **
-**             Player::TotalNumUnits
+**  Player::TotalNumUnits
 **
-**                             Total number of units (incl. buildings) in the 
Player::Units
-**                             table.
+**    Total number of units (incl. buildings) in the Player::Units
+**    table.
 **
-**             Player::Demand
+**  Player::Demand
 **
-**                             Total unit demand, used to demand limit.
-**                             A player can only build up to Player::Food 
units and not more
-**                             than Player::FoodUnitLimit units.
+**    Total unit demand, used to demand limit.
+**    A player can only build up to Player::Food units and not more
+**    than Player::FoodUnitLimit units.
 **
-**                             @note that Player::NumFoodUnits > Player::Food, 
when enough
-**                             farms are destroyed.
+**    @note that Player::NumFoodUnits > Player::Food, when enough
+**    farms are destroyed.
 **
-**             Player::NumBuildings
+**  Player::NumBuildings
 **
-**                             Total number buildings, units that don't need 
food.
+**    Total number buildings, units that don't need food.
 **
-**             Player::Food
+**  Player::Food
 **
-**                             Number of food available/produced. Player can't 
train more
-**                             Player::NumFoodUnits than this.
-**                             @note that all limits are always checked.
+**    Number of food available/produced. Player can't train more
+**    Player::NumFoodUnits than this.
+**    @note that all limits are always checked.
 **
-**             Player::FoodUnitLimit
+**  Player::FoodUnitLimit
 **
-**                             Number of food units allowed. Player can't 
train more
-**                             Player::NumFoodUnits than this.
-**                             @note that all limits are always checked.
+**    Number of food units allowed. Player can't train more
+**    Player::NumFoodUnits than this.
+**    @note that all limits are always checked.
 **
-**             Player::BuildingLimit
+**  Player::BuildingLimit
 **
-**                             Number of buildings allowed.  Player can't 
build more
-**                             Player::NumBuildings than this.
-**                             @note that all limits are always checked.
+**    Number of buildings allowed.  Player can't build more
+**    Player::NumBuildings than this.
+**    @note that all limits are always checked.
 **
-**             Player::TotalUnitLimit
+**  Player::TotalUnitLimit
 **
-**                             Number of total units allowed. Player can't 
have more
-**                             
Player::NumFoodUnits+Player::NumBuildings=Player::TotalNumUnits
-**                             this.
-**                             @note that all limits are always checked.
+**    Number of total units allowed. Player can't have more
+**    Player::NumFoodUnits+Player::NumBuildings=Player::TotalNumUnits
+**    this.
+**    @note that all limits are always checked.
 **
-**             Player::Score
+**  Player::Score
 **
-**                             Total number of points. You can get points for 
killing units,
-**                             destroying buildings ...
+**    Total number of points. You can get points for killing units,
+**    destroying buildings ...
 **
-**             Player::TotalUnits
+**  Player::TotalUnits
 **
-**                             Total number of units made.
+**    Total number of units made.
 **
-**             Player::TotalBuildings
+**  Player::TotalBuildings
 **
-**                             Total number of buildings made.
+**    Total number of buildings made.
 **
-**             Player::TotalResources[::MaxCosts]
+**  Player::TotalResources[::MaxCosts]
 **
-**                             Total number of resources collected.
-**                             @see _costs_, TimeCost, GoldCost, WoodCost, 
OilCost, MaxCosts.
+**    Total number of resources collected.
+**    @see _costs_, TimeCost, GoldCost, WoodCost, OilCost, MaxCosts.
 **
-**             Player::TotalRazings
+**  Player::TotalRazings
 **
-**                             Total number of buildings destroyed.
+**    Total number of buildings destroyed.
 **
-**             Player::TotalKills
+**  Player::TotalKills
 **
-**                             Total number of kills.
+**    Total number of kills.
 **
-**             Player::Color
+**  Player::Color
 **
-**                             Color of units of this player on the minimap. 
Index number
-**                             into the global palette.
+**    Color of units of this player on the minimap. Index number
+**    into the global palette.
 **
-**             Player::UnitColors
+**  Player::UnitColors
 **
-**                             Unit colors of this player. Contains the 
hardware dependent
-**                             pixel values for the player colors (palette 
index #208-#211).
-**                             Setup from the global palette.
-**                             @note Index #208-#211 are various SHADES of the 
team color
-**                             (#208 is brightest shade, #211 is darkest 
shade) .... these
-**                             numbers are NOT red=#208, blue=#209, etc
+**    Unit colors of this player. Contains the hardware dependent
+**    pixel values for the player colors (palette index #208-#211).
+**    Setup from the global palette.
+**    @note Index #208-#211 are various SHADES of the team color
+**    (#208 is brightest shade, #211 is darkest shade) .... these
+**    numbers are NOT red=#208, blue=#209, etc
 **
-**             Player::Allow
+**  Player::Allow
 **
-**                             Contains which unit-types and upgrades are 
allowed for the
-**                             player. Possible values are:
-**                             @li             `A' -- allowed,
-**                             @li             `F' -- forbidden,
-**                             @li             `R' -- acquired, perhaps other 
values
-**                             @li             `Q' -- acquired but forbidden 
(does it make sense?:))
-**                             @li             `E' -- enabled, allowed by 
level but currently forbidden
-**                             @see _allow_
+**    Contains which unit-types and upgrades are allowed for the
+**    player. Possible values are:
+**    @li  `A' -- allowed,
+**    @li  `F' -- forbidden,
+**    @li  `R' -- acquired, perhaps other values
+**    @li  `Q' -- acquired but forbidden (does it make sense?:))
+**    @li  `E' -- enabled, allowed by level but currently forbidden
+**    @see _allow_
 **
-**             Player::UpgradeTimers
+**  Player::UpgradeTimers
 **
-**                             Timer for the upgrades. One timer for all 
possible upgrades.
-**                             Initial 0 counted up by the upgrade action, 
until it reaches
-**                             the upgrade time.
-**                             @see _upgrade_timers_
-**                             @note it is planned to combine research for 
faster upgrades.
+**    Timer for the upgrades. One timer for all possible upgrades.
+**    Initial 0 counted up by the upgrade action, until it reaches
+**    the upgrade time.
+**    @see _upgrade_timers_
+**    @note it is planned to combine research for faster upgrades.
 */
 
 /*----------------------------------------------------------------------------
---             Includes
+--  Includes
 ----------------------------------------------------------------------------*/
 
 #include "upgrade_structs.h"
@@ -285,189 +285,189 @@
 #include "video.h"
 
 /*----------------------------------------------------------------------------
---             Player type
+--  Player type
 ----------------------------------------------------------------------------*/
 
 #ifndef __STRUCT_PLAYER__
-#define __STRUCT_PLAYER__                              /// protect duplicate 
player typedef
-typedef struct _player_ Player;                                /// player 
typedef
+#define __STRUCT_PLAYER__    /// protect duplicate player typedef
+typedef struct _player_ Player;    /// player typedef
 #endif
 
-       ///             Player structure
+       ///  Player structure
 struct _player_ {
-       int                             Player;                                 
        /// player as number
-       char*           Name;                                           /// 
name of non computer
+       int   Player;    /// player as number
+       char* Name;      /// name of non computer
 
-       int                             Type;                                   
        /// type of player (human,computer,...)
-       char*           RaceName;                               /// name of race
-       int                             Race;                                   
        /// race of player (orc,human,...)
-       int                             AiNum;                                  
        /// AI for computer
+       int   Type;      /// type of player (human,computer,...)
+       char* RaceName;  /// name of race
+       int   Race;      /// race of player (orc,human,...)
+       int   AiNum;     /// AI for computer
 
        // friend enemy detection
-       int                             Team;                                   
        /// team of player
-       unsigned                Enemy;                                          
/// enemy bit field for this player
-       unsigned                Allied;                                         
/// allied bit field for this player
-       unsigned                SharedVision;                           /// 
shared vision bit field
-
-       int                             StartX;                                 
        /// map tile start X position
-       int                             StartY;                                 
        /// map tile start Y position
-
-       int                             Resources[MaxCosts];            /// 
resources in store
-       int                             LastResources[MaxCosts];                
/// last values for revenue
-       int                             Incomes[MaxCosts];              /// 
income of the resources
-       int                             Revenue[MaxCosts];              /// 
income rate of the resources
+       int      Team;          /// team of player
+       unsigned Enemy;         /// enemy bit field for this player
+       unsigned Allied;        /// allied bit field for this player
+       unsigned SharedVision;  /// shared vision bit field
+
+       int StartX;  /// map tile start X position
+       int StartY;  /// map tile start Y position
+
+       int Resources[MaxCosts];      /// resources in store
+       int LastResources[MaxCosts];  /// last values for revenue
+       int Incomes[MaxCosts];        /// income of the resources
+       int Revenue[MaxCosts];        /// income rate of the resources
 
        // FIXME: shouldn't use the constant
-       int                             UnitTypesCount[UnitTypeMax];            
/// total units of unit-type
+       int UnitTypesCount[UnitTypeMax];  /// total units of unit-type
 
-       int                             AiEnabled;                              
/// handle AI on local computer
-       void*           Ai;                                             /// Ai 
structure pointer
+       int   AiEnabled;  /// handle AI on local computer
+       void* Ai;         /// Ai structure pointer
 
-       Unit**          Units;                                          /// 
units of this player
-       int                             TotalNumUnits;                          
/// total # units for units' list
-
-       int                             NumBuildings;                           
/// # buildings
-
-       int                             Supply;                                 
        /// supply available/produced
-       int                             Demand;                                 
        /// demand of player
-
-       int                             UnitLimit;                              
/// # food units allowed
-       int                             BuildingLimit;                          
/// # buildings allowed
-       int                             TotalUnitLimit;                         
/// # total unit number allowed
-
-       int                             Score;                                  
        /// Points for killing ...
-       int                             TotalUnits;
-       int                             TotalBuildings;
-       int                             TotalResources[MaxCosts];
-       int                             TotalRazings;
-       int                             TotalKills;                             
/// How many unit killed
+       Unit** Units;          /// units of this player
+       int    TotalNumUnits;  /// total # units for units' list
+       int    NumBuildings;   /// # buildings
+       int    Supply;         /// supply available/produced
+       int    Demand;         /// demand of player
+
+       int    UnitLimit;       /// # food units allowed
+       int    BuildingLimit;   /// # buildings allowed
+       int    TotalUnitLimit;  /// # total unit number allowed
+
+       int    Score;           /// Points for killing ...
+       int    TotalUnits;
+       int    TotalBuildings;
+       int    TotalResources[MaxCosts];
+       int    TotalRazings;
+       int    TotalKills;      /// How many unit killed
 
 // Display video
 #ifdef USE_SDL_SURFACE
-       Uint32          Color;                                          /// 
color of units on minimap
+       Uint32 Color;  /// color of units on minimap
 #else
-       VMemType                Color;                                          
/// color of units on minimap
+       VMemType Color;  /// color of units on minimap
 #endif
 
-       UnitColors              UnitColors;                             /// 
Unit colors for new units
+       UnitColors UnitColors;  /// Unit colors for new units
 
-//  Upgrades/Allows:
-       Allow                           Allow;                          /// 
Allowed for player
-       UpgradeTimers           UpgradeTimers;          /// Timer for the 
upgrades
+       // Upgrades/Allows:
+       Allow          Allow;          /// Allowed for player
+       UpgradeTimers  UpgradeTimers;  /// Timer for the upgrades
 };
 
 /**
-**             Races for the player
-**             Mapped with #PlayerRaces to a symbolic name, which will be used 
in
-**             the future.
+**  Races for the player
+**  Mapped with #PlayerRaces to a symbolic name, which will be used in
+**  the future.
 */
 #define MAX_RACES 8
 typedef struct _player_race_ {
-       int             Race[MAX_RACES];                /// race number
-       char            Visible[MAX_RACES];             /// race should be 
visible in pulldown
-       char*           Name[MAX_RACES];                /// race names
-       char*           Display[MAX_RACES];             /// text to display in 
pulldown
-       int             Count;                                          /// 
number of races
+       int   Race[MAX_RACES];     /// race number
+       char  Visible[MAX_RACES];  /// race should be visible in pulldown
+       char* Name[MAX_RACES];     /// race names
+       char* Display[MAX_RACES];  /// text to display in pulldown
+       int   Count;               /// number of races
 } PlayerRace;
 
 
 enum PlayerRacesOld {
-       PlayerRaceHuman         =0,                             /// belongs to 
human
-       PlayerRaceOrc           =1,                             /// belongs to 
orc
+       PlayerRaceHuman = 0,  /// belongs to human
+       PlayerRaceOrc  = 1,   /// belongs to orc
 };
 #define PlayerRaceNeutral (PlayerRaces.Count-1)
 
 /**
-**             Types for the player (must fit to PUD!)
+**  Types for the player (must fit to PUD!)
 **
-**             #PlayerNeutral
+**  #PlayerNeutral
 **
-**                             This player is controlled by the computer doing 
nothing.
+**    This player is controlled by the computer doing nothing.
 **
-**             #PlayerNobody
+**  #PlayerNobody
 **
-**                             This player is unused. Nobody controlls this 
player.
+**    This player is unused. Nobody controlls this player.
 **
-**             #PlayerComputer
+**  #PlayerComputer
 **
-**                             This player is controlled by the computer. 
Player::AiNum
-**                             selects the AI strategy.
+**    This player is controlled by the computer. Player::AiNum
+**    selects the AI strategy.
 **
-**             #PlayerPerson
+**  #PlayerPerson
 **
-**                             This player is contolled by a person. This can 
be the player
-**                             sitting on the local computer or player playing 
over the
-**                             network.
+**    This player is contolled by a person. This can be the player
+**    sitting on the local computer or player playing over the
+**    network.
 **
-**             #PlayerRescuePassive
+**  #PlayerRescuePassive
 **
-**                             This player does nothing, the game pieces just 
sit in the game
-**                             (being passive)... when a person player moves 
next to a
-**                             PassiveRescue unit/building, then it is 
"rescued" and becomes
-**                             part of that persons team. If the city center 
is rescued, than
-**                             all units of this player are rescued.
+**    This player does nothing, the game pieces just sit in the game
+**    (being passive)... when a person player moves next to a
+**    PassiveRescue unit/building, then it is "rescued" and becomes
+**    part of that persons team. If the city center is rescued, than
+**    all units of this player are rescued.
 **
-**             #PlayerRescueActive
+**  #PlayerRescueActive
 **
-**                             This player is controlled by the computer. 
Player::AiNum
-**                             selects the AI strategy. Until it is rescued it 
plays like
-**                             an ally. The first person which reaches units 
of this player,
-**                             can rescue them. If the city center is rescued, 
than all units
-**                             of this player are rescued.
+**    This player is controlled by the computer. Player::AiNum
+**    selects the AI strategy. Until it is rescued it plays like
+**    an ally. The first person which reaches units of this player,
+**    can rescue them. If the city center is rescued, than all units
+**    of this player are rescued.
 */
 enum PlayerTypes {
-       PlayerNeutral           =2,                             /// neutral
-       PlayerNobody            =3,                             /// unused slot
-       PlayerComputer          =4,                             /// computer 
player
-       PlayerPerson            =5,                             /// human player
-       PlayerRescuePassive             =6,                             /// 
rescued passive
-       PlayerRescueActive              =7,                             /// 
rescued  active
+       PlayerNeutral = 2,        /// neutral
+       PlayerNobody  = 3,        /// unused slot
+       PlayerComputer = 4,       /// computer player
+       PlayerPerson = 5,         /// human player
+       PlayerRescuePassive = 6,  /// rescued passive
+       PlayerRescueActive = 7,   /// rescued  active
 };
 
 /**
-**             Ai types for the player (must fit to PUD!)
+**  Ai types for the player (must fit to PUD!)
 **
-**             Mapped with #AiTypeWcNames to internal symbols.
+**  Mapped with #AiTypeWcNames to internal symbols.
 */
 enum PlayerAis {
-       PlayerAiLand            =0x00,                          /// attack at 
land
-       PlayerAiPassive         =0x01,                          /// passive 
does nothing
-       PlayerAiSea                             =0x19,                          
/// attack at sea
-       PlayerAiAir                             =0x1A,                          
/// attack at air
-       PlayerAiUniversal               =0xFF,                          /// 
attack best possible
+       PlayerAiLand = 0x00,       /// attack at land
+       PlayerAiPassive = 0x01,    /// passive does nothing
+       PlayerAiSea = 0x19,        /// attack at sea
+       PlayerAiAir = 0x1A,        /// attack at air
+       PlayerAiUniversal = 0xFF,  /// attack best possible
 };
 
-#define PlayerNumNeutral               15              /// this is the neutral 
player slot
-//#define PlayerMax                            16              /// maximal 
players supported
+#define PlayerNumNeutral 15  /// this is the neutral player slot
+#if 0
+#define PlayerMax 16  /// maximal players supported
+#endif
 
 /**
-**             Notify types. Noties are send to the player.
+**  Notify types. Noties are send to the player.
 */
 enum _notify_type_ {
-       NotifyRed,                                                              
/// Red alram
-       NotifyYellow,                                           /// Yellow alarm
-       NotifyGreen,                                            /// Green alarm
+       NotifyRed,     /// Red alram
+       NotifyYellow,  /// Yellow alarm
+       NotifyGreen,   /// Green alarm
 };
 
 /*----------------------------------------------------------------------------
---             Variables
+--  Variables
 ----------------------------------------------------------------------------*/
 
-extern int NumPlayers;                                         /// How many 
player slots used
-extern Player Players[PlayerMax];              /// All players
-extern Player* ThisPlayer;                             /// Player on local 
computer
-extern int NoRescueCheck;                              /// Disable rescue check
+extern int NumPlayers;             /// How many player slots used
+extern Player Players[PlayerMax];  /// All players
+extern Player* ThisPlayer;         /// Player on local computer
+extern int NoRescueCheck;          /// Disable rescue check
 #ifdef USE_SDL_SURFACE
 extern Uint32 PlayerColors[PlayerMax];
 #else
-extern VMemType PlayerColors[PlayerMax];               /// Player colors
+extern VMemType PlayerColors[PlayerMax];   /// Player colors
 #endif
-extern char* PlayerColorNames[PlayerMax];              /// Player color names
+extern char* PlayerColorNames[PlayerMax];  /// Player color names
 
-extern PlayerRace PlayerRaces;                         /// Player races
+extern PlayerRace PlayerRaces;  /// Player races
 
 /*----------------------------------------------------------------------------
---             Functions
+--  Functions
 ----------------------------------------------------------------------------*/
 
        /// Get race array index by race type
@@ -484,40 +484,40 @@
 extern void CreatePlayer(int type);
 
        /// Change player side
-extern void PlayerSetSide(Player* player,int side);
+extern void PlayerSetSide(Player* player, int side);
        /// Change player name
-extern void PlayerSetName(Player* player,const char* name);
+extern void PlayerSetName(Player* player, const char* name);
        /// Change player AI
-extern void PlayerSetAiNum(Player* player,int ai);
+extern void PlayerSetAiNum(Player* player, int ai);
 
        /// Set a resource of the player
-extern void PlayerSetResource(Player* player,int resource,int value);
+extern void PlayerSetResource(Player* player, int resource, int value);
 
        /// Check if the unit-type didn't break any unit limits and 
supply/demand
-extern int PlayerCheckLimits(const Player* player,const UnitType* type);
+extern int PlayerCheckLimits(const Player* player, const UnitType* type);
 
        /// Check if enough resources are available for costs
-extern int PlayerCheckCosts(const Player* player,const int* costs);
+extern int PlayerCheckCosts(const Player* player, const int* costs);
        /// Check if enough resources are available for a new unit-type
-extern int PlayerCheckUnitType(const Player* player,const UnitType* type);
+extern int PlayerCheckUnitType(const Player* player, const UnitType* type);
 
        /// Add costs to the resources
-extern void PlayerAddCosts(Player* player,const int* costs);
+extern void PlayerAddCosts(Player* player, const int* costs);
        /// Add costs for an unit-type to the resources
-extern void PlayerAddUnitType(Player* player,const UnitType* type);
+extern void PlayerAddUnitType(Player* player, const UnitType* type);
        /// Add a factor of costs to the resources
-extern void PlayerAddCostsFactor(Player* player,const int* costs,int factor);
+extern void PlayerAddCostsFactor(Player* player, const int* costs, int factor);
        /// Remove costs from the resources
-extern void PlayerSubCosts(Player* player,const int* costs);
+extern void PlayerSubCosts(Player* player, const int* costs);
        /// Remove costs for an unit-type from the resources
-extern void PlayerSubUnitType(Player* player,const UnitType* type);
+extern void PlayerSubUnitType(Player* player, const UnitType* type);
        /// Remove a factor of costs from the resources
-extern void PlayerSubCostsFactor(Player* player,const int* costs,int factor);
+extern void PlayerSubCostsFactor(Player* player, const int* costs, int factor);
 
        /// Has the player units of that type
-extern int HaveUnitTypeByType(const Player* player,const UnitType* type);
+extern int HaveUnitTypeByType(const Player* player, const UnitType* type);
        /// Has the player units of that type
-extern int HaveUnitTypeByIdent(const Player* player,const char* ident);
+extern int HaveUnitTypeByIdent(const Player* player, const char* ident);
 
        /// Initialize the computer opponent AI
 extern void PlayersInitAi(void);
@@ -536,7 +536,7 @@
 extern void DebugPlayers(void);
 
        /// Notify player about a problem
-extern void NotifyPlayer(const Player*,int,int,int,const char*,...);
+extern void NotifyPlayer(const Player*, int, int, int, const char*, ...);
 
        /// register ccl features
 extern void PlayerCclRegister(void);
Index: stratagus/src/include/pud.h
diff -u stratagus/src/include/pud.h:1.27 stratagus/src/include/pud.h:1.28
--- stratagus/src/include/pud.h:1.27    Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/pud.h Mon Dec 22 16:52:34 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden pud.h          -       The pud headerfile. */
+/address@hidden pud.h - The pud headerfile. */
 //
-//     (c) Copyright 1998-2002 by Lutz Sammer
+//      (c) Copyright 1998-2004 by Lutz Sammer
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: pud.h,v 1.27 2003/12/20 05:33:27 jsalmon3 Exp $
+//      $Id: pud.h,v 1.28 2003/12/22 05:52:34 wizzard Exp $
 
 #ifndef __PUD_H__
 #define __PUD_H__
@@ -34,62 +34,62 @@
 //@{
 
 /*----------------------------------------------------------------------------
---             Includes
+--  Includes
 ----------------------------------------------------------------------------*/
 
 #include "map.h"
 
 /*----------------------------------------------------------------------------
---             Defines
+--  Defines
 ----------------------------------------------------------------------------*/
 
 //
-//             Used for reading puds.
+//  Used for reading puds.
 //
-#define MapMoveOnlyLand                                0x01            /// 
only land units
-#define MapMoveCoast                           0x02            /// only water 
transporters
-#define MapMoveHuman                           0x04            /// marks human 
wall on map
-#define MapMoveWallO                           0x08            /// orcish wall 
on map
+#define MapMoveOnlyLand 0x01  /// only land units
+#define MapMoveCoast    0x02  /// only water transporters
+#define MapMoveHuman    0x04  /// marks human wall on map
+#define MapMoveWallO    0x08  /// orcish wall on map
 // 1101
-#define MapMoveWallH                           0x0D            /// human wall 
on map
-#define MapMoveDirt                            0x10            /// no 
buildings allowed
+#define MapMoveWallH    0x0D  /// human wall on map
+#define MapMoveDirt     0x10  /// no buildings allowed
 // 20
-#define MapMoveOnlyWater               0x40            /// only water units
-#define MapMoveUnpassable              0x80            /// blocked
+#define MapMoveOnlyWater  0x40  /// only water units
+#define MapMoveUnpassable 0x80  /// blocked
 
-#define MapMoveForestOrRock            0x81            /// forest or rock on 
map
-#define MapMoveCoast2                          0x82            /// unknown
-#define MapMoveWall                            0x8D            /// wall on map
-
-#define MapMoveLandUnit                                0x100           /// 
land unit
-#define MapMoveAirUnit                         0x200           /// air unit
-#define MapMoveSeaUnit                         0x400           /// water unit
-#define MapMoveBuildingUnit            0x800           /// building unit
-#define MapMoveBlocked                         0xF00           /// no unit 
allowed
+#define MapMoveForestOrRock 0x81  /// forest or rock on map
+#define MapMoveCoast2       0x82  /// unknown
+#define MapMoveWall         0x8D  /// wall on map
+
+#define MapMoveLandUnit     0x100  /// land unit
+#define MapMoveAirUnit      0x200  /// air unit
+#define MapMoveSeaUnit      0x400  /// water unit
+#define MapMoveBuildingUnit 0x800  /// building unit
+#define MapMoveBlocked      0xF00  /// no unit allowed
 
 // LOW BITS: Area connected!
-#define MapActionWater                         0x0000          /// water on map
-#define MapActionLand                          0x4000          /// land on map
-#define MapActionIsland                                0xFFFA          /// no 
trans, no land on map
-#define MapActionWall                          0xFFFB          /// wall on map
-#define MapActionRocks                         0xFFFD          /// rocks on map
-#define MapActionForest                                0xFFFE          /// 
forest on map
+#define MapActionWater   0x0000  /// water on map
+#define MapActionLand    0x4000  /// land on map
+#define MapActionIsland  0xFFFA  /// no trans, no land on map
+#define MapActionWall    0xFFFB  /// wall on map
+#define MapActionRocks   0xFFFD  /// rocks on map
+#define MapActionForest  0xFFFE  /// forest on map
 
 // These are hard-coded PUD internals (and, as such, belong here!)
 // FIXME: for our own maps this should become configurable
-#define WC_UnitPeasant                         0x02            /// human 
peasant
-#define WC_UnitPeon                            0x03            /// orc peon
-#define WC_UnitGoldMine                                0x5C            /// 
goldmine
-#define WC_UnitOilPatch                                0x5D            /// 
oilpatch
-#define WC_StartLocationHuman          0x5E            /// start location human
-#define WC_StartLocationOrc            0x5F            /// start location orc
+#define WC_UnitPeasant        0x02  /// human peasant
+#define WC_UnitPeon           0x03  /// orc peon
+#define WC_UnitGoldMine       0x5C  /// goldmine
+#define WC_UnitOilPatch       0x5D  /// oilpatch
+#define WC_StartLocationHuman 0x5E  /// start location human
+#define WC_StartLocationOrc   0x5F  /// start location orc
 
 /*----------------------------------------------------------------------------
---             Declarations
+--  Declarations
 ----------------------------------------------------------------------------*/
 
 /*----------------------------------------------------------------------------
---             Functions
+--  Functions
 ----------------------------------------------------------------------------*/
 
        /// Return info for pud
Index: stratagus/src/include/rdtsc.h
diff -u stratagus/src/include/rdtsc.h:1.12 stratagus/src/include/rdtsc.h:1.13
--- stratagus/src/include/rdtsc.h:1.12  Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/rdtsc.h       Mon Dec 22 16:52:34 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden rdtsc.h        -       The rdtsc header file. */
+/address@hidden rdtsc.h - The rdtsc header file. */
 //
-//     (c) Copyright 1999-2001 by Lutz Sammer
+//      (c) Copyright 1999-2004 by Lutz Sammer
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: rdtsc.h,v 1.12 2003/12/20 05:33:27 jsalmon3 Exp $
+//      $Id: rdtsc.h,v 1.13 2003/12/22 05:52:34 wizzard Exp $
 
 #ifndef __RDTSC_H__
 #define __RDTSC_H__
@@ -34,7 +34,7 @@
 //@{
 
 #ifndef _MSC_VER
-#include <sys/types.h>                                         // for u_int64_t
+#include <sys/types.h>      // for u_int64_t
 #endif
 
 #if defined(__MINGW32__)
@@ -46,9 +46,9 @@
 #endif
 
 /**
-**       Read the tsc (time-stamp counter) register of the processor.
+**  Read the tsc (time-stamp counter) register of the processor.
 **
-**       @return the rtc register
+**  @return the rtc register
 */
 static __inline u_int64_t rdtsc(void)
 {
@@ -68,4 +68,4 @@
 
 //@}
 
-#endif         // !__RDTSC_H__
+#endif  // !__RDTSC_H__
Index: stratagus/src/include/settings.h
diff -u stratagus/src/include/settings.h:1.31 
stratagus/src/include/settings.h:1.32
--- stratagus/src/include/settings.h:1.31       Sat Dec 20 16:33:27 2003
+++ stratagus/src/include/settings.h    Mon Dec 22 16:52:34 2003
@@ -5,12 +5,12 @@
 //     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
 //             \/                  \/          \//_____/            \/
 //  ______________________                           ______________________
-//                       T H E   W A R   B E G I N S
-//        Stratagus - A free fantasy real time strategy game engine
+//                        T H E   W A R   B E G I N S
+//         Stratagus - A free fantasy real time strategy game engine
 //
-/address@hidden settings.h     -       The game settings headerfile. */
+/address@hidden settings.h - The game settings headerfile. */
 //
-//     (c) Copyright 2000-2003 by Andreas Arens and Jimmy Salmon
+//      (c) Copyright 2000-2004 by Andreas Arens and Jimmy Salmon
 //
 //      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
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: settings.h,v 1.31 2003/12/20 05:33:27 jsalmon3 Exp $
+//      $Id: settings.h,v 1.32 2003/12/22 05:52:34 wizzard Exp $
 
 #ifndef __SETTINGS_H__
 #define __SETTINGS_H__
@@ -34,7 +34,7 @@
 //@{
 
 /*----------------------------------------------------------------------------
---             Includes
+--  Includes
 ----------------------------------------------------------------------------*/
 
 #ifndef __STRUCT_SETTINGS__
@@ -47,67 +47,67 @@
 #include "campaign.h"
 
 /*----------------------------------------------------------------------------
---             Settings  __WIP__
+--  Settings  __WIP__
 ----------------------------------------------------------------------------*/
 
 /**
-**             Settings structure
+**  Settings structure
 **
-**             This structure one day should contain all common game settings,
-**             in-game, or pre-start, and the individual (per player) presets.
-**             This allows central maintainance, easy (network-)negotiation,
-**             simplifies load/save/reinitialization, etc...
+**  This structure one day should contain all common game settings,
+**  in-game, or pre-start, and the individual (per player) presets.
+**  This allows central maintainance, easy (network-)negotiation,
+**  simplifies load/save/reinitialization, etc...
 **
 */
 struct _settings_ {
-       int                             NetGameType;                            
/// Multiplayer or single player
+       int NetGameType;   /// Multiplayer or single player
 
 //  Individual presets:
 //  For single-player game only Presets[0] will be used..
        struct {
-               int                             Race;                           
/// Race of the player
-               int                             Team;                           
/// Team of player -- NOT SELECTABLE YET
-               int                             Type;                           
/// Type of player (for network games)
-       }               Presets[PlayerMax];
+               int Race;  /// Race of the player
+               int Team;  /// Team of player -- NOT SELECTABLE YET
+               int Type;  /// Type of player (for network games)
+       } Presets[PlayerMax];
 
 //  Common settings:
-       int                             Resources;                              
/// Preset resource factor
-       int                             NumUnits;                               
/// Preset # of units
-       int                             Opponents;                              
/// Preset # of ai-opponents
-       int                             Terrain;                                
/// Terrain type (summer,winter,...)
-       int                             GameType;                               
/// Game type (melee, free for all,...)
-       int                             NoFogOfWar;                             
/// No fog of war
-       int                             RevealMap;                              
/// Reveal map
+       int Resources;   /// Preset resource factor
+       int NumUnits;    /// Preset # of units
+       int Opponents;   /// Preset # of ai-opponents
+       int Terrain;     /// Terrain type (summer,winter,...)
+       int GameType;    /// Game type (melee, free for all,...)
+       int NoFogOfWar;  /// No fog of war
+       int RevealMap;   /// Reveal map
 };
 
-#define SettingsPresetMapDefault               -1              /// Special: 
Use pud/cm supplied
+#define SettingsPresetMapDefault  -1  /// Special: Use pud/cm supplied
 
 /**
-**             Single or multiplayer settings
+**  Single or multiplayer settings
 */
-#define SettingsSinglePlayerGame               1
-#define SettingsMultiPlayerGame                                2
+#define SettingsSinglePlayerGame 1
+#define SettingsMultiPlayerGame 2
 
 /*
-**             Resource-Preset factor
+**  Resource-Preset factor
 */
-#define SettingsResourcesMapDefault            SettingsPresetMapDefault
-#define SettingsResourcesLow                           0
-#define SettingsResourcesMedium                                1
-#define SettingsResourcesHigh                          2
+#define SettingsResourcesMapDefault  SettingsPresetMapDefault
+#define SettingsResourcesLow    0
+#define SettingsResourcesMedium    1
+#define SettingsResourcesHigh    2
 
 /*
-**             NumUnits start settings
+**  NumUnits start settings
 */
-#define SettingsNumUnitsMapDefault             SettingsPresetMapDefault
-#define SettingsNumUnits1                              0
+#define SettingsNumUnitsMapDefault  SettingsPresetMapDefault
+#define SettingsNumUnits1    0
 
 /*
-**             GameType settings
+**  GameType settings
 */
 enum _game_types_ {
-       SettingsGameTypeMapDefault=SettingsPresetMapDefault,
-       SettingsGameTypeMelee=0,
+       SettingsGameTypeMapDefault = SettingsPresetMapDefault,
+       SettingsGameTypeMelee = 0,
        SettingsGameTypeFreeForAll,
        SettingsGameTypeTopVsBottom,
        SettingsGameTypeLeftVsRight,
@@ -128,43 +128,43 @@
 
 // ----------------------------------------------------------------------------
 
-#define MAX_BRIEFING_VOICES            20              /// How many intro 
voices supported
-#define MAX_OBJECTIVES                         9               /// How many 
objectives supported
+#define MAX_BRIEFING_VOICES 20  /// How many intro voices supported
+#define MAX_OBJECTIVES 9  /// How many objectives supported
 
 typedef struct _intro_ {
-       char*           Title;                                                  
        /// Intro title
-       char*           Background;                                             
/// Background picture
-       char*           TextFile;                                               
/// Intro text file
-       char*           VoiceFile[MAX_BRIEFING_VOICES];         /// Intro voice 
file
-       char*           Objectives[MAX_OBJECTIVES];             /// Objectives 
text
-} Intro;                                                                       
        /// Intro definition
+       char* Title;                           /// Intro title
+       char* Background;                      /// Background picture
+       char* TextFile;                        /// Intro text file
+       char* VoiceFile[MAX_BRIEFING_VOICES];  /// Intro voice file
+       char* Objectives[MAX_OBJECTIVES];      /// Objectives text
+} Intro;  /// Intro definition
 
 
 // ----------------------------------------------------------------------------
 
 typedef struct _credits_ {
-       char*           Background;                             /// Background 
picture
-       char*           Names;                                          /// 
Names
+       char* Background;  /// Background picture
+       char* Names;       /// Names
 } Credits;
 
 // ----------------------------------------------------------------------------
 
-#define MAX_TIPS               50                              /// How many 
tips supported
+#define MAX_TIPS 50    /// How many tips supported
 
-extern char*           Tips[MAX_TIPS+1];               /// Array of tips
-extern int             ShowTips;                               /// Show tips 
at start of level
-extern int             CurrentTip;                             /// Current tip 
to display
+extern char* Tips[MAX_TIPS+1];  /// Array of tips
+extern int   ShowTips;          /// Show tips at start of level
+extern int   CurrentTip;        /// Current tip to display
 
 /*----------------------------------------------------------------------------
---             Variables
+--  Variables
 ----------------------------------------------------------------------------*/
 
-extern Settings GameSettings;                          /// Game settings
-extern Intro           GameIntro;                              /// Game intro
-extern Credits         GameCredits;                            /// Game credits
+extern Settings GameSettings;  /// Game settings
+extern Intro    GameIntro;     /// Game intro
+extern Credits  GameCredits;   /// Game credits
 
 /*----------------------------------------------------------------------------
---             Functions
+--  Functions
 ----------------------------------------------------------------------------*/
 
        /// Show level intro
@@ -180,9 +180,9 @@
        /// Register CCL functions for objectives
 extern void ObjectivesCclRegister(void);
        /// Save the objectives
-extern void SaveObjectives(CLFile *file);
+extern void SaveObjectives(CLFile* file);
        /// Create a game
-extern void CreateGame(char* filename,WorldMap* map);
+extern void CreateGame(char* filename, WorldMap* map);
        /// Init Setting to default values
 extern void InitSettings(void);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]