stratagus-cvs
[Top][All Lists]
Advanced

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

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


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/include stratagus.h
Date: 20 Jan 2004 18:03:24 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/20 18:03:23

Modified files:
        src/include    : stratagus.h 

Log message:
        Clean up

Patches:
Index: stratagus/src/include/stratagus.h
diff -u stratagus/src/include/stratagus.h:1.42 
stratagus/src/include/stratagus.h:1.43
--- stratagus/src/include/stratagus.h:1.42      Tue Jan 20 10:24:38 2004
+++ stratagus/src/include/stratagus.h   Tue Jan 20 18:03:23 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: stratagus.h,v 1.42 2004/01/19 23:24:38 nobody_ Exp $
+//      $Id: stratagus.h,v 1.43 2004/01/20 07:03:23 jsalmon3 Exp $
 
 #ifndef __STRATAGUS_H__
 #define __STRATAGUS_H__
@@ -34,7 +34,7 @@
 //@{
 
 /*============================================================================
-==             Config definitions
+==  Config definitions
 ============================================================================*/
 
 // Unit On Map cache
@@ -49,349 +49,307 @@
 // Dynamic loading.
 //#define DYNAMIC_LOAD
 
-       //
-       //              Default speed for many things, set it higher for faster 
actions.
-       //
-#define SPEED_RESOURCE 1                               /// Speed factor for 
resources
-#define SPEED_BUILD            1                               /// Speed 
factor for building
-#define SPEED_TRAIN            1                               /// Speed 
factor for training
-#define SPEED_UPGRADE  1                               /// Speed factor for 
upgrading
-#define SPEED_RESEARCH 1                               /// Speed factor for 
researching
-
 /*============================================================================
-==             Compiler repairs
+==  Compiler repairs
 ============================================================================*/
 
-#ifdef __GNUC__                // {
+#ifdef __GNUC__  // {
 
 #if __GNUC__==2 && __GNUC_MINOR__==96
-
-#if !defined(__I_KNOW_THAT_GNUC_296_IS_BUGGY__)
-#warning "GCC 2.96 is not supported and buggy, downgrade to GCC 2.95"
+#warning "GCC 2.96 is not supported and buggy, downgrade to 2.95 or upgrade to 
3.2 or later"
 #endif
 
-#endif
-
-#if __GNUC__>=3
-
-#if __GNUC__==3 && __GNUC_MINOR__>=2 || __GNUC__>3
-#define __GCC32__MAYBE_OK__ 1
-#endif
-
-#if !defined(__GCC32__MAYBE_OK__) && 
!defined(__I_KNOW_THAT_GNUC_3_IS_UNSUPPORTED__)
-#warning "GCC 3.XX is not supported, downgrade to GCC 2.95"
-#endif
-
-//             It looks that GCC 3.xx is becoming nutty:
-//             __FUNCTION__            can't be concated in the future.
-//             __func__                Is defined by ISO C99 as
-//                             static const char __func__[] = "function-name";
-#define __FUNCTION__ "Wrong compiler:"__FILE__
-
+#if __GNUC__==3 && __GNUC_MINOR__<2
+#warning "GCC versions before 3.2 are not supported, upgrade to 3.2 or later"
 #endif
 
 #if defined(__MINGW32__) && defined(DEBUG)
 // GDB + MINGW doesn't like free(0)
 #include <stdlib.h>
-#define free(x) do { void* __x; __x=(x); if( __x ) free( __x ); } while(0)
+#define free(x) do { void* __x; __x = (x); if (__x) { free(__x); } } while (0)
 #endif
 
-#endif         // } __GNUC__
-
-#ifndef __GNUC__               // { disable GNU C Compiler features
+#endif  // } __GNUC__
 
-#define __attribute__(args)                            /// Does nothing for 
non GNU CC
+#ifndef __GNUC__  // { disable GNU C Compiler features
+#define __attribute__(args)                 /// Does nothing for non GNU CC
+#endif  // }
 
-#endif         // }
-
-#ifdef _MSC_VER                // { m$ auto detection
+#ifdef _MSC_VER
 
 #define WIN32_LEAN_AND_MEAN
 #define NOUSER
 
-#define inline __inline                                                /// Fix 
m$ brain damage
-#define alloca _alloca                                         /// I hope this 
works with all VC..
+#define inline __inline
+#define alloca _alloca
 
-#pragma warning(disable:4244)                          // Conversion from 
double to uchar
-#pragma warning(disable:4761)                          // Integral size 
mismatch
-#define snprintf _snprintf                             /// Unix -> dumm
+#pragma warning(disable:4244)               /// Conversion from double to uchar
+#pragma warning(disable:4761)               /// Integral size mismatch
+#define snprintf _snprintf
 #define vsnprintf _vsnprintf
 #include <string.h>
 #define strdup _strdup
 #define strncasecmp strnicmp
 
+#endif  // } _MSC_VER
 
-#ifndef __FUNCTION__
-
-#define __FUNCTION__ __FILE__  /* ":" __LINE__ */
+/*============================================================================
+==  Declarations
+============================================================================*/
 
-       /// Print function in debug macros
-#define PrintFunction() \
-       do { fprintf(stdout,"%s:%d: ",__FILE__,__LINE__); } while(0)
+// This is needed to have recursive forward references
 
+#if !defined(__STRUCT_PLAYER__) && !defined(DOXYGEN)
+#define __STRUCT_PLAYER__
+typedef struct _player_ Player;
 #endif
 
-#endif         // } m$
-
-#if defined(__GCC32__MAYBE_OK__)
-#define PrintFunction() do { fprintf(stdout,"%s: ", __func__); } while(0)
-#else
-#ifndef PrintFunction
-       /// Print function in debug macros
-#define PrintFunction() do { fprintf(stdout,__FUNCTION__": "); } while(0)
-#endif
+#if !defined(__STRUCT_VIEWPORT__) && !defined(DOXYGEN)
+#define __STRUCT_VIEWPORT__
+typedef struct _viewport_ Viewport;
 #endif
 
-/*============================================================================
-==             Includes
-============================================================================*/
-
-#include "fc_types.h"
+#if !defined(__STRUCT_MISSILETYPE__ ) && !defined(DOXYGEN)
+#define __STRUCT_MISSILETYPE__
+typedef struct _missile_type_ MissileType;
+#endif
 
 /*============================================================================
-==             Debug definitions
+==  Debug definitions
 ============================================================================*/
 
        /**
-       **              This simulates vararg macros.
-       **              Example:
-       **                              DebugLevel0("Test %d\n" _C_ 1);
-       **                              DebugLevel0("Test %d %d\n" _C_ 1 _C_ 2);
+       **  This simulates vararg macros.
+       **  Example:
+       **    DebugLevel0("Test %d\n" _C_ 1);
+       **    DebugLevel0("Test %d %d\n" _C_ 1 _C_ 2);
        */
-#define _C_            ,                                               /// 
Debug , to simulate vararg macros
+#define _C_  ,                             /// Debug , to simulate vararg 
macros
+
+       /// Print function in debug macros
+#define PrintFunction() \
+       do { fprintf(stdout, "%s:%d: ", __FILE__, __LINE__); } while (0)
 
-#ifdef DEBUG           // {
+
+#ifdef DEBUG  // {
 
        /**
-       **              Debug check condition. If cond is true abort with 
file,line.
+       **  Debug check condition. If cond is true abort with file,line.
        */
-#define DebugCheck(cond)               do { if (cond) { \
-               fprintf(stderr, "DebugCheck at %s:%d: %s\n", __FILE__, 
__LINE__, #cond); \
-               abort(); }} while (0)
+#define DebugCheck(cond)  do { if (cond) { \
+       fprintf(stderr, "DebugCheck at %s:%d: %s\n", __FILE__, __LINE__, 
#cond); \
+       abort(); }} while (0)
 
        /**
-       **              Print debug information of level 0.
+       **  Print debug information of level 0.
        */
 #define DebugLevel0(args) \
-               do { fprintf(stdout,args); } while(0)
+       do { fprintf(stdout, args); } while (0)
 
        /**
-       **              Print debug information of level 1.
+       **  Print debug information of level 1.
        */
 #define DebugLevel1(args)\
-               do { fprintf(stdout,args); } while(0)
+       do { fprintf(stdout, args); } while (0)
 
        /**
-       **              Print debug information of level 2.
+       **  Print debug information of level 2.
        */
 #define DebugLevel2(args)\
-               do { fprintf(stdout,args); } while(0)
+       do { fprintf(stdout, args); } while (0)
 
        /**
-       **              Print debug information of level 3. (normal = disable)
+       **  Print debug information of level 3. (normal = disable)
        */
 #define DebugLevel3(args) \
-               /* TURNED OFF: do { fprintf(stdout,args); } while(0) */
+       /* TURNED OFF: do { fprintf(stdout, args); } while (0) */
 
        /**
-       **              Print debug information of level 0 with function name.
+       **  Print debug information of level 0 with function name.
        */
 #define DebugLevel0Fn(args) \
-               do { PrintFunction(); fprintf(stdout,args); } while(0)
+       do { PrintFunction(); fprintf(stdout, args); } while (0)
 
        /**
-       **              Print debug information of level 1 with function name.
+       **  Print debug information of level 1 with function name.
        */
 #define DebugLevel1Fn(args) \
-               do { PrintFunction(); fprintf(stdout,args); } while(0)
+       do { PrintFunction(); fprintf(stdout, args); } while (0)
 
        /**
-       **              Print debug information of level 2 with function name.
+       **  Print debug information of level 2 with function name.
        */
 #define DebugLevel2Fn(args) \
-               do { PrintFunction(); fprintf(stdout,args); } while(0)
+       do { PrintFunction(); fprintf(stdout, args); } while (0)
 
        /**
-       **              Print debug information of level 3 with function name.
+       **  Print debug information of level 3 with function name.
        */
 #define DebugLevel3Fn(args) \
-               /* TURNED OFF: do { fprintf(stdout,__FUNCTION__": " args); } 
while(0) */
+       /* TURNED OFF: do { fprintf(stdout, __FUNCTION__ ": " args); } while 
(0) */
 
-#else          // }{ DEBUG
+#else  // }{ DEBUG
 
-#define DebugCheck(cond)               /* disabled */
+#define DebugCheck(cond)     /* disabled */
 
-#define DebugLevel0(args)              /* disabled */
-#define DebugLevel1(args)              /* disabled */
-#define DebugLevel2(args)              /* disabled */
-#define DebugLevel3(args)              /* disabled */
-#define DebugLevel0Fn(args)            /* disabled */
-#define DebugLevel1Fn(args)            /* disabled */
-#define DebugLevel2Fn(args)            /* disabled */
-#define DebugLevel3Fn(args)            /* disabled */
+#define DebugLevel0(args)    /* disabled */
+#define DebugLevel1(args)    /* disabled */
+#define DebugLevel2(args)    /* disabled */
+#define DebugLevel3(args)    /* disabled */
+#define DebugLevel0Fn(args)  /* disabled */
+#define DebugLevel1Fn(args)  /* disabled */
+#define DebugLevel2Fn(args)  /* disabled */
+#define DebugLevel3Fn(args)  /* disabled */
 
-#endif         // } !DEBUG
+#endif  // } !DEBUG
 
-#ifdef REFS_DEBUG              // {
+#ifdef REFS_DEBUG  // {
 
        /**
-       **              Debug check condition for references
+       **  Debug check condition for references
        */
-#define RefsDebugCheck(cond)           do{ if( cond ) { \
-               fprintf(stderr,"DebugCheck at %s:%d\n",__FILE__,__LINE__); \
-               abort(); } }while( 0 )
+#define RefsDebugCheck(cond)  do { if (cond) { \
+       fprintf(stderr, "DebugCheck at %s:%d\n", __FILE__, __LINE__); \
+       abort(); } } while (0)
 
-#else          // }{ REFS_DEBUG
+#else  // }{ REFS_DEBUG
 
-#define RefsDebugCheck(cond)           /* disabled */
+#define RefsDebugCheck(cond)  /* disabled */
 
-#endif         // } !REFS_DEBUG
+#endif  // } !REFS_DEBUG
 
 /*============================================================================
-==             Storage types
+==  Storage types
 ============================================================================*/
 
-#define global                                                         /// 
Defines global visible names
+#define global                          /// Defines global visible names
 
 #ifdef DEBUG
-#define local                                                          /// 
Defines local visible names
+#define local                           /// Defines local visible names
 #else
 #define local static
 #endif
 
 /*============================================================================
-==             Definitions
+==  Definitions
 ============================================================================*/
 
 /*----------------------------------------------------------------------------
---             General
+--  General
 ----------------------------------------------------------------------------*/
 
 #ifndef VERSION
-#define VERSION                "2.00"                          /// Engine 
version shown
+#define VERSION  "2.00"                 /// Engine version shown
 #endif
 
 #ifndef StratagusMajorVerion
        /// Stratagus major version
-#define StratagusMajorVersion          2
+#define StratagusMajorVersion  2
        /// Stratagus minor version (maximal 99)
-#define StratagusMinorVersion          0
+#define StratagusMinorVersion  0
        /// Stratagus patch level (maximal 99)
-#define StratagusPatchLevel            0
+#define StratagusPatchLevel    0
        /// Stratagus version (1,2,3) -> 10203
 #define StratagusVersion \
-               (StratagusMajorVersion*10000+StratagusMinorVersion*100 \
-               +StratagusPatchLevel)
+       (StratagusMajorVersion * 10000 + StratagusMinorVersion * 100 \
+               + StratagusPatchLevel)
 
        /// Stratagus printf format string
-#define StratagusFormatString          "%d.%d.%d"
+#define StratagusFormatString   "%d.%d.%d"
        /// Stratagus printf format arguments
-#define StratagusFormatArgs(v)         (v)/10000,((v)/100)%100,(v)%100
+#define StratagusFormatArgs(v)  (v) / 10000, ((v) / 100) % 100, (v) % 100
 #endif
 
        /// Text string: Name, Version, Copyright
 extern char NameLine[];
 
 #ifndef STRATAGUS_LIB_PATH
-#define STRATAGUS_LIB_PATH "data"              /// Where to find the data files
+#define STRATAGUS_LIB_PATH  "data"      /// Where to find the data files
 #endif
 #ifndef STRATAGUS_HOME_PATH
-#define STRATAGUS_HOME_PATH ".stratagus"/// Data files in user home dir
+#define STRATAGUS_HOME_PATH  ".stratagus"/// Data files in user home dir
 #endif
 
-#define MAGIC_FOR_NEW_UNITS            33              /// How many percent of 
max mana for new units
+#define MAGIC_FOR_NEW_UNITS  33         /// How many percent of max mana for 
new units
 
 /*----------------------------------------------------------------------------
---             Some limits
+--  Some limits
 ----------------------------------------------------------------------------*/
 
-#define TilesetMax             8                               /// How many 
tilesets are supported
-#define PlayerMax              16                              /// How many 
players are supported
-#define UnitTypeMax            257                             /// How many 
unit types supported
-#define UpgradeMax             256                             /// How many 
upgrades supported
-#define UnitMax                                2048                            
/// How many units supported
+#define TilesetMax   8                  /// How many tilesets are supported
+#define PlayerMax    16                 /// How many players are supported
+#define UnitTypeMax  257                /// How many unit types supported
+#define UpgradeMax   256                /// How many upgrades supported
+#define UnitMax      2048               /// How many units supported
 
 /*----------------------------------------------------------------------------
---             Screen
+--  Screen
 ----------------------------------------------------------------------------*/
 
        // FIXME: this values should go into a general ui structure
 
-#define DEFAULT_VIDEO_WIDTH            640             /// Default video width
-#define DEFAULT_VIDEO_HEIGHT           480             /// Default video height
+#define DEFAULT_VIDEO_WIDTH   640       /// Default video width
+#define DEFAULT_VIDEO_HEIGHT  480       /// Default video height
 
        // This is for 1600x1200
-#define MAXMAP_W               50                              /// Maximum map 
width in tiles on screen
-#define MAXMAP_H               40                              /// Maximum map 
height in tiles
+#define MAXMAP_W  50                    /// Maximum map width in tiles on 
screen
+#define MAXMAP_H  40                    /// Maximum map height in tiles
 
        /// Scrolling area (<= 15 y)
-#define SCROLL_UP              15
-       /// Scrolling area (>= VideoHeight-16 y)
-#define SCROLL_DOWN            (VideoHeight-16)
+#define SCROLL_UP     15
+       /// Scrolling area (>= VideoHeight - 16 y)
+#define SCROLL_DOWN   (VideoHeight - 16)
        /// Scrolling area (<= 15 y)
-#define SCROLL_LEFT            15
-       /// Scrolling area (>= VideoWidth-16 x)
-#define SCROLL_RIGHT           (VideoWidth-16)
+#define SCROLL_LEFT   15
+       /// Scrolling area (>= VideoWidth - 16 x)
+#define SCROLL_RIGHT  (VideoWidth - 16)
 
        /// Mouse scrolling magnify
-#define MOUSE_SCROLL_SPEED             3
+#define MOUSE_SCROLL_SPEED  3
 
        /// Keyboard scrolling magnify
-#define KEY_SCROLL_SPEED               3
+#define KEY_SCROLL_SPEED  3
 
        /// Frames per second to display (original 30-40)
-#define FRAMES_PER_SECOND              30              // 1/30s
+#define FRAMES_PER_SECOND  30  // 1/30s
        /// Game cycles per second to simulate (original 30-40)
-#define CYCLES_PER_SECOND              30              // 1/30s 0.33ms
+#define CYCLES_PER_SECOND  30  // 1/30s 0.33ms
 
        /// Must redraw flags
 enum _must_redraw_flags_ {
-       RedrawNothing           = 1<< 0,                /// Nothing to do
-       RedrawMinimap           = 1<< 1,                /// Minimap area
-       RedrawMap                               = 1<< 2,                /// Map 
area
-       RedrawCursor            = 1<< 3,                /// Cursor changed
-       RedrawResources         = 1<< 4,                /// Resources
-
-/* FIXME: Next is planned to reduce the area of redraws
-       RedrawGold                              = 1<< 5,                /// 
Resources 1 gold
-       RedrawWood                              = 1<< 6,                /// 
Resources 2 wood
-       RedrawOil                               = 1<< 7,                /// 
Resources 3 oil
-       RedrawOre                               = 1<< 8,                /// 
Resources 4 ore
-       RedrawStone                             = 1<< 9,                /// 
Resources 5 stone
-       RedrawCoal                              = 1<<10,                /// 
Resources 6 coal
-       RedrawFood                              = 1<<11,                /// 
Resources F food supply / demand
-       RedrawPoints            = 1<<12,                /// Resources S score
-*/
-       RedrawMessage           = 1<<13,                /// Message
-       RedrawStatusLine                = 1<<14,                /// Statusline
-       RedrawInfoPanel         = 1<<15,                /// Unit description
-       RedrawButtonPanel               = 1<<16,                /// Unit buttons
-       RedrawFillers           = 1<<17,                /// Fillers
-       RedrawMinimapBorder             = 1<<18,                /// Area around 
minimap
-
-       RedrawCosts                             = 1<<19,                /// 
Costs in status line
-       RedrawMenuButton                = 1<<20,                /// Area above 
minimap
-       RedrawMinimapCursor             = 1<<21,                /// Minimap 
cursor changed
-       RedrawMenu                              = 1<<22,                /// Menu
-       RedrawTimer                             = 1<<23,                /// 
Timer
+       RedrawNothing   = 1 << 0,           /// Nothing to do
+       RedrawMinimap   = 1 << 1,           /// Minimap area
+       RedrawMap       = 1 << 2,           /// Map area
+       RedrawCursor    = 1 << 3,           /// Cursor changed
+       RedrawResources = 1 << 4,           /// Resources
+
+       RedrawMessage       = 1 << 13,      /// Message
+       RedrawStatusLine    = 1 << 14,      /// Statusline
+       RedrawInfoPanel     = 1 << 15,      /// Unit description
+       RedrawButtonPanel   = 1 << 16,      /// Unit buttons
+       RedrawFillers       = 1 << 17,      /// Fillers
+       RedrawMinimapBorder = 1 << 18,      /// Area around minimap
+
+       RedrawCosts         = 1 << 19,      /// Costs in status line
+       RedrawMenuButton    = 1 << 20,      /// Area above minimap
+       RedrawMinimapCursor = 1 << 21,      /// Minimap cursor changed
+       RedrawMenu          = 1 << 22,      /// Menu
+       RedrawTimer         = 1 << 23,      /// Timer
 
        // Bits 23-29 are unused.
 
-       RedrawAll                               = 1<<30,                /// All 
flag set by RedrawEverything
-       RedrawEverything                = -1,                           /// 
Must redraw everything
+       RedrawAll           = 1 << 30,      /// All flag set by RedrawEverything
+       RedrawEverything    = -1,           /// Must redraw everything
 };
 
        /// Must redraw all maps
-#define RedrawMaps                             (RedrawMinimap|RedrawMap)
+#define RedrawMaps        (RedrawMinimap | RedrawMap)
        /// Must redraw all cursors
-#define RedrawCursors                          
(RedrawMinimapCursor|RedrawCursor)
+#define RedrawCursors     (RedrawMinimapCursor | RedrawCursor)
        /// Must redraw all panels
-#define RedrawPanels                           
(RedrawInfoPanel|RedrawButtonPanel)
+#define RedrawPanels      (RedrawInfoPanel | RedrawButtonPanel)
        /// Must redraw after color cycle
-#define RedrawColorCycle               (RedrawMap | RedrawInfoPanel | 
RedrawButtonPanel | RedrawResources)
-
-       /// Mainscreen pitch (default VideoWidth)
-extern int VideoPitch;
+#define RedrawColorCycle  (RedrawMap | RedrawInfoPanel | RedrawButtonPanel | 
RedrawResources)
 
        /// Mainscreen width (default 640)
 extern int VideoWidth;
@@ -415,17 +373,14 @@
 extern int SlowFrameCounter;
 
 /*----------------------------------------------------------------------------
---             clone.c
+--  clone.c
 ----------------------------------------------------------------------------*/
 
-       /**
-       **              MyRand():               rand only used on this computer.
-       */
-#define MyRand()               rand()
+       ///  rand only used on this computer.
+#define MyRand()  rand()
 
 enum {
-    TitleFlagCenter    = 1 << 0,       /// Center Text
-    TitleFlagBlink     = 1 << 1,       /// Blinking Text (FIXME: Implement it.)
+    TitleFlagCenter    = 1 << 0,  /// Center Text
 };
 
 typedef struct _title_screen_label_ {
@@ -442,45 +397,45 @@
        int Timeout;
        TitleScreenLabel** Labels;
 } TitleScreen;
-extern TitleScreen** TitleScreens;             /// File for title screen
-extern char* GameName;                                         /// Name of the 
game (wc2,wc1)
-extern char* MenuBackground;                           /// File for menu 
background
-extern char* MenuBackgroundWithTitle;          /// File for menu with title
-extern char* MenuMusic;                                                /// 
File for menu music
-extern char* ClickMissile;                             /// Missile to show 
when you click
-extern char* DamageMissile;                            /// Missile to show 
damage caused
-extern char* StratagusLibPath;                         /// Location of 
stratagus data
 
-extern int SpeedBuild;                                         /// Speed 
factor for building
+extern TitleScreen** TitleScreens;          /// File for title screen
+extern char* GameName;                      /// Name of the game
+extern char* MenuBackground;                /// File for menu background
+extern char* MenuBackgroundWithTitle;       /// File for menu with title
+extern char* MenuMusic;                     /// File for menu music
+extern char* ClickMissile;                  /// Missile to show when you click
+extern char* DamageMissile;                 /// Missile to show damage caused
+extern char* StratagusLibPath;              /// Location of stratagus data
+
+extern int SpeedBuild;                      /// Speed factor for building
 extern int SpeedTrain;                                         /// Speed 
factor for training
-extern int SpeedUpgrade;                               /// Speed factor for 
upgrading
-extern int SpeedResearch;                              /// Speed factor for 
researching
+extern int SpeedUpgrade;                    /// Speed factor for upgrading
+extern int SpeedResearch;                   /// Speed factor for researching
 
-extern unsigned SyncRandSeed;                          /// Sync random seed 
value
+extern unsigned SyncRandSeed;               /// Sync random seed value
 
-extern unsigned long GameCycle;                                /// Game 
simulation cycle counter
-extern unsigned long FastForwardCycle;         /// Game Replay Fast Forward 
Counter
+extern unsigned long GameCycle;             /// Game simulation cycle counter
+extern unsigned long FastForwardCycle;      /// Game Replay Fast Forward 
Counter
 
-extern void LoadGame(char*);                           /// Load saved game back
-extern void SaveGame(const char*);             /// Save game for later load
+extern void LoadGame(char*);                /// Load saved game back
+extern void SaveGame(const char*);          /// Save game for later load
 
-extern void LoadAll(void);                             /// Load all data back
+extern void LoadAll(void);                  /// Load all data back
 
-extern void InitSyncRand(void);                                /// Initialize 
the syncron rand
-extern int SyncRand(void);                             /// Syncron rand
+extern void InitSyncRand(void);             /// Initialize the syncron rand
+extern int SyncRand(void);                  /// Syncron rand
 
-extern int main1(int argc,char* argv[]);/// Init stratagus
-extern volatile void Exit(int err);            /// Exit stratagus
-extern volatile void ExitFatal(int err);/// Exit stratagus with fatal error
+extern volatile void Exit(int err);         /// Exit stratagus
+extern volatile void ExitFatal(int err);    /// Exit stratagus with fatal error
 
-extern void UpdateDisplay(void);               /// Game display update
-extern void InitModules(void);                         /// Initinalize all 
modules
-extern void LoadModules(void);                         /// Load all modules
-extern void CleanModules(void);                                /// Cleanup all 
modules
-extern void DrawMapArea(void);                         /// Draw the map area
-extern void GameMainLoop(void);                                /// Game main 
loop
+extern void UpdateDisplay(void);            /// Game display update
+extern void InitModules(void);              /// Initinalize all modules
+extern void LoadModules(void);              /// Load all modules
+extern void CleanModules(void);             /// Cleanup all modules
+extern void DrawMapArea(void);              /// Draw the map area
+extern void GameMainLoop(void);             /// Game main loop
 
-       ///             Show load progress
+       /// Show load progress
 extern void ShowLoadProgress(const char* fmt,...);
 
        /// strdup + strcat
@@ -497,25 +452,22 @@
 extern long isqrt(long num);
 
 /*============================================================================
-==             Misc
+==  Misc
 ============================================================================*/
 
-       /// bits macro
-#define BitsOf(n)              (sizeof(n)*8)
-
-//             FIXME: configurable. maybe we could move it into one big global
-//             FIXME: settings struct?
-       /// How many resource get the player back if canceling building
-#define CancelBuildingCostsFactor              75
-       /// How many resource get the player back if canceling training
-#define CancelTrainingCostsFactor              100
-       /// How many resource get the player back if canceling research
-#define CancelResearchCostsFactor              100
-       /// How many resource get the player back if canceling upgrade
-#define CancelUpgradeCostsFactor               100
+// FIXME: configurable. maybe we could move it into one big global
+// FIXME: settings struct?
+       /// How many resources the player gets back if canceling building
+#define CancelBuildingCostsFactor  75
+       /// How many resources the player gets back if canceling training
+#define CancelTrainingCostsFactor  100
+       /// How many resources the player gets back if canceling research
+#define CancelResearchCostsFactor  100
+       /// How many resources the player gets back if canceling upgrade
+#define CancelUpgradeCostsFactor   100
 
-       /// How near could a depot be build to a resource
-#define RESOURCE_DISTANCE              3
+       /// How near a depot could be built to a resource
+#define RESOURCE_DISTANCE  3
 
 extern char* CompileOptions;
 //@}




reply via email to

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