76 /** |
77 /** |
77 * Returns the WEAPONS_COUNT constant |
78 * Returns the WEAPONS_COUNT constant |
78 */ |
79 */ |
79 int flib_get_weapons_count(); |
80 int flib_get_weapons_count(); |
80 |
81 |
|
82 /* |
|
83 * These structs define the meaning of values in the flib_scheme struct, i.e. their correspondence to |
|
84 * ini settings, engine commands and positions in the network protocol (the last is encoded in the |
|
85 * order of settings/mods). |
|
86 */ |
|
87 typedef struct { |
|
88 const char *name; // A name identifying this setting (used as key in the schemes file) |
|
89 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) |
|
90 const bool maxMeansInfinity; // If true, send a very high number to the engine if the setting is equal to its maximum |
|
91 const bool times1000; // If true (for time-based settings), multiply the setting by 1000 before sending it to the engine. |
|
92 const int min; // The smallest allowed value |
|
93 const int max; // The highest allowed value |
|
94 const int def; // The default value |
|
95 } flib_metascheme_setting; |
|
96 |
|
97 typedef struct { |
|
98 const char *name; // A name identifying this mod (used as key in the schemes file) |
|
99 const int bitmaskIndex; // Mods are sent to the engine in a single integer, this field describes which bit of that integer is used |
|
100 // for this particular mod. |
|
101 } flib_metascheme_mod; |
|
102 |
|
103 typedef struct { |
|
104 const int settingCount; |
|
105 const int modCount; |
|
106 const flib_metascheme_setting *settings; |
|
107 const flib_metascheme_mod *mods; |
|
108 } flib_metascheme; |
|
109 |
|
110 extern const flib_metascheme flib_meta; |
|
111 |
|
112 const flib_metascheme *flib_get_metascheme(); |
|
113 |
81 #endif |
114 #endif |