project_files/frontlib/hwconsts.h
branchflibqtfrontend
changeset 8261 c8236fcbe160
parent 8132 f68b43cf510f
child 8263 a0d586321d6f
equal deleted inserted replaced
8259:02e32be01232 8261:c8236fcbe160
    39 
    39 
    40 #define NETGAME_DEFAULT_PORT 46631
    40 #define NETGAME_DEFAULT_PORT 46631
    41 #define PROTOCOL_VERSION 42
    41 #define PROTOCOL_VERSION 42
    42 #define MIN_SERVER_VERSION 1
    42 #define MIN_SERVER_VERSION 1
    43 
    43 
    44 // Used for sending scripts to the engine
    44 //! Used for sending scripts to the engine
    45 #define MULTIPLAYER_SCRIPT_PATH "Scripts/Multiplayer/"
    45 #define MULTIPLAYER_SCRIPT_PATH "Scripts/Multiplayer/"
    46 
    46 
    47 #define WEAPONS_COUNT 56
    47 #define WEAPONS_COUNT 56
       
    48 // TODO allow frontend to override these?
       
    49 /*! A merge of mikade/bugq colours w/ a bit of channel feedback */
       
    50 #define HW_TEAMCOLOR_ARRAY  { UINT32_C(0xffff0204), /*! red    */ \
       
    51                               UINT32_C(0xff4980c1), /*! blue   */ \
       
    52                               UINT32_C(0xff1de6ba), /*! teal   */ \
       
    53                               UINT32_C(0xffb541ef), /*! purple */ \
       
    54                               UINT32_C(0xffe55bb0), /*! pink   */ \
       
    55                               UINT32_C(0xff20bf00), /*! green  */ \
       
    56                               UINT32_C(0xfffe8b0e), /*! orange */ \
       
    57                               UINT32_C(0xff5f3605), /*! brown  */ \
       
    58                               UINT32_C(0xffffff01), /*! yellow */ \
       
    59                               /*! add new colors here */ \
       
    60                               0 } /*! Keep this 0 at the end */
       
    61 
    48 #define AMMOLINE_DEFAULT_QT     "93919294221991210322351110012010000002111101010111110101"
    62 #define AMMOLINE_DEFAULT_QT     "93919294221991210322351110012010000002111101010111110101"
    49 #define AMMOLINE_DEFAULT_PROB   "04050405416006555465544647765766666661555101011154110101"
    63 #define AMMOLINE_DEFAULT_PROB   "04050405416006555465544647765766666661555101011154110101"
    50 #define AMMOLINE_DEFAULT_DELAY  "00000000000002055000000400070040000000002200000006000000"
    64 #define AMMOLINE_DEFAULT_DELAY  "00000000000002055000000400070040000000002200000006000000"
    51 #define AMMOLINE_DEFAULT_CRATE  "13111103121111111231141111111111111112111111011111110101"
    65 #define AMMOLINE_DEFAULT_CRATE  "13111103121111111231141111111111111112111111011111110101"
    52 
       
    53 // TODO allow frontend to override these?
       
    54 /* A merge of mikade/bugq colours w/ a bit of channel feedback */
       
    55 #define HW_TEAMCOLOR_ARRAY  { UINT32_C(0xffff0204), /* red    */ \
       
    56                               UINT32_C(0xff4980c1), /* blue   */ \
       
    57                               UINT32_C(0xff1de6ba), /* teal   */ \
       
    58                               UINT32_C(0xffb541ef), /* purple */ \
       
    59                               UINT32_C(0xffe55bb0), /* pink   */ \
       
    60                               UINT32_C(0xff20bf00), /* green  */ \
       
    61                               UINT32_C(0xfffe8b0e), /* orange */ \
       
    62                               UINT32_C(0xff5f3605), /* brown  */ \
       
    63                               UINT32_C(0xffffff01), /* yellow */ \
       
    64                               /* add new colors here */ \
       
    65                               0 } /* Keep this 0 at the end */
       
    66 
    66 
    67 extern const size_t flib_teamcolor_count;
    67 extern const size_t flib_teamcolor_count;
    68 extern const uint32_t flib_teamcolors[];
    68 extern const uint32_t flib_teamcolors[];
    69 
    69 
    70 /**
    70 /**
    85 /**
    85 /**
    86  * Returns the WEAPONS_COUNT constant
    86  * Returns the WEAPONS_COUNT constant
    87  */
    87  */
    88 int flib_get_weapons_count();
    88 int flib_get_weapons_count();
    89 
    89 
    90 /*
    90 /*!
    91  * These structs define the meaning of values in the flib_scheme struct, i.e. their correspondence to
    91  * These structs define the meaning of values in the flib_scheme struct, i.e. their correspondence to
    92  * ini settings, engine commands and positions in the network protocol (the last is encoded in the
    92  * ini settings, engine commands and positions in the network protocol (the last is encoded in the
    93  * order of settings/mods).
    93  * order of settings/mods).
    94  */
    94  */
    95 typedef struct {
    95 typedef struct {
    96     const char *name;				// A name identifying this setting (used as key in the schemes file)
    96     const char *name;				//! A name identifying this setting (used as key in the schemes file)
    97     const char *engineCommand;		// The command needed to send the setting to the engine. May be null if the setting is not sent to the engine (for the "health" setting)
    97     const char *engineCommand;		//! The command needed to send the setting to the engine. May be null if the setting is not sent to the engine (for the "health" setting)
    98     const bool maxMeansInfinity;	// If true, send a very high number to the engine if the setting is equal to its maximum
    98     const bool maxMeansInfinity;	//! If true, send a very high number to the engine if the setting is equal to its maximum
    99     const bool times1000;			// If true (for time-based settings), multiply the setting by 1000 before sending it to the engine.
    99     const bool times1000;			//! If true (for time-based settings), multiply the setting by 1000 before sending it to the engine.
   100     const int min;					// The smallest allowed value
   100     const int min;					//! The smallest allowed value
   101     const int max;					// The highest allowed value
   101     const int max;					//! The highest allowed value
   102     const int def;					// The default value
   102     const int def;					//! The default value
   103 } flib_metascheme_setting;
   103 } flib_metascheme_setting;
   104 
   104 
   105 typedef struct {
   105 typedef struct {
   106     const char *name;				// A name identifying this mod (used as key in the schemes file)
   106     const char *name;				//! A name identifying this mod (used as key in the schemes file)
   107     const int bitmaskIndex;			// Mods are sent to the engine in a single integer, this field describes which bit of that integer is used
   107     const int bitmaskIndex;			//! Mods are sent to the engine in a single integer, this field describes which bit of that integer is used
   108     								// for this particular mod.
   108     								//! for this particular mod.
   109 } flib_metascheme_mod;
   109 } flib_metascheme_mod;
   110 
   110 
   111 typedef struct {
   111 typedef struct {
   112 	const int settingCount;
   112 	const int settingCount;
   113 	const int modCount;
   113 	const int modCount;