summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-08-01 19:36:56 +0000
committeryexo <yexo@openttd.org>2010-08-01 19:36:56 +0000
commit613b273f36ffd1d300ea08c5d6b1c469d145a591 (patch)
tree0f6da7e417356d57853c6fa7e9d55f98908e893b
parent99cb47a3825f370e19adacd1ad1e6241eccb99f9 (diff)
downloadopenttd-613b273f36ffd1d300ea08c5d6b1c469d145a591.tar.xz
(svn r20285) -Codechange: use ///< for single-line doxygen comments in the AI code
-rw-r--r--src/ai/ai.hpp4
-rw-r--r--src/ai/ai_config.hpp12
-rw-r--r--src/ai/ai_info.hpp48
-rw-r--r--src/ai/ai_instance.cpp2
-rw-r--r--src/ai/ai_instance.hpp24
-rw-r--r--src/ai/ai_storage.hpp34
6 files changed, 62 insertions, 62 deletions
diff --git a/src/ai/ai.hpp b/src/ai/ai.hpp
index 387812993..f84175864 100644
--- a/src/ai/ai.hpp
+++ b/src/ai/ai.hpp
@@ -145,8 +145,8 @@ public:
static bool HasAI(const struct ContentInfo *ci, bool md5sum);
#endif
private:
- static uint frame_counter; //!< Tick counter for the AI code
- static class AIScanner *ai_scanner; //!< AIScanner instance that is used to find AIs
+ static uint frame_counter; ///< Tick counter for the AI code
+ static class AIScanner *ai_scanner; ///< AIScanner instance that is used to find AIs
};
#else /* ENABLE_AI */
diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp
index c5b7c7482..ee6f8b416 100644
--- a/src/ai/ai_config.hpp
+++ b/src/ai/ai_config.hpp
@@ -144,12 +144,12 @@ public:
void SettingsToString(char *string, size_t size) const;
private:
- const char *name; //!< Name of the AI
- int version; //!< Version of the AI
- class AIInfo *info; //!< AIInfo object for related to this AI version
- SettingValueList settings; //!< List with all setting=>value pairs that are configure for this AI
- AIConfigItemList *config_list; //!< List with all settings defined by this AI
- bool is_random_ai; //!< True if the AI in this slot was randomly chosen.
+ const char *name; ///< Name of the AI
+ int version; ///< Version of the AI
+ class AIInfo *info; ///< AIInfo object for related to this AI version
+ SettingValueList settings; ///< List with all setting=>value pairs that are configure for this AI
+ AIConfigItemList *config_list; ///< List with all settings defined by this AI
+ bool is_random_ai; ///< True if the AI in this slot was randomly chosen.
};
#endif /* ENABLE_AI */
diff --git a/src/ai/ai_info.hpp b/src/ai/ai_info.hpp
index 2f6edad01..5bb1c9f5e 100644
--- a/src/ai/ai_info.hpp
+++ b/src/ai/ai_info.hpp
@@ -20,33 +20,33 @@
/** Bitmask of flags for AI settings. */
enum AIConfigFlags {
- AICONFIG_NONE = 0x0, //!< No flags set.
- AICONFIG_RANDOM = 0x1, //!< When randomizing the AI, pick any value between min_value and max_value when on custom difficulty setting.
- AICONFIG_BOOLEAN = 0x2, //!< This value is a boolean (either 0 (false) or 1 (true) ).
- AICONFIG_INGAME = 0x4, //!< This setting can be changed while the AI is running.
+ AICONFIG_NONE = 0x0, ///< No flags set.
+ AICONFIG_RANDOM = 0x1, ///< When randomizing the AI, pick any value between min_value and max_value when on custom difficulty setting.
+ AICONFIG_BOOLEAN = 0x2, ///< This value is a boolean (either 0 (false) or 1 (true) ).
+ AICONFIG_INGAME = 0x4, ///< This setting can be changed while the AI is running.
};
-typedef SmallMap<int, char *> LabelMapping; //!< Map-type used to map the setting numbers to labels.
+typedef SmallMap<int, char *> LabelMapping; ///< Map-type used to map the setting numbers to labels.
/** Info about a single AI setting. */
struct AIConfigItem {
- const char *name; //!< The name of the configuration setting.
- const char *description; //!< The description of the configuration setting.
- int min_value; //!< The minimal value this configuration setting can have.
- int max_value; //!< The maximal value this configuration setting can have.
- int custom_value; //!< The default value on custom difficulty setting.
- int easy_value; //!< The default value on easy difficulty setting.
- int medium_value; //!< The default value on medium difficulty setting.
- int hard_value; //!< The default value on hard difficulty setting.
- int random_deviation; //!< The maximum random deviation from the default value.
- int step_size; //!< The step size in the gui.
- AIConfigFlags flags; //!< Flags for the configuration setting.
- LabelMapping *labels; //!< Text labels for the integer values.
+ const char *name; ///< The name of the configuration setting.
+ const char *description; ///< The description of the configuration setting.
+ int min_value; ///< The minimal value this configuration setting can have.
+ int max_value; ///< The maximal value this configuration setting can have.
+ int custom_value; ///< The default value on custom difficulty setting.
+ int easy_value; ///< The default value on easy difficulty setting.
+ int medium_value; ///< The default value on medium difficulty setting.
+ int hard_value; ///< The default value on hard difficulty setting.
+ int random_deviation; ///< The maximum random deviation from the default value.
+ int step_size; ///< The step size in the gui.
+ AIConfigFlags flags; ///< Flags for the configuration setting.
+ LabelMapping *labels; ///< Text labels for the integer values.
};
extern AIConfigItem _start_date_config;
-typedef std::list<AIConfigItem> AIConfigItemList; //!< List of AIConfig items.
+typedef std::list<AIConfigItem> AIConfigItemList; ///< List of AIConfig items.
/** Base class that holds some basic information about AIs and AI libraries. */
class AIFileInfo : public ScriptFileInfo {
@@ -57,7 +57,7 @@ public:
static SQInteger Constructor(HSQUIRRELVM vm, AIFileInfo *info);
protected:
- class AIScanner *base; //!< AIScanner object that was used to scan this AI (library) info.
+ class AIScanner *base; ///< AIScanner object that was used to scan this AI (library) info.
};
/** All static information from an AI like name, version, etc. */
@@ -124,10 +124,10 @@ public:
const char *GetAPIVersion() const { return this->api_version; }
private:
- AIConfigItemList config_list; //!< List of settings from this AI.
- int min_loadable_version; //!< The AI can load savegame data if the version is equal or greater than this.
- bool use_as_random; //!< Should this AI be used when the user wants a "random AI"?
- const char *api_version; //!< API version used by this AI.
+ AIConfigItemList config_list; ///< List of settings from this AI.
+ int min_loadable_version; ///< The AI can load savegame data if the version is equal or greater than this.
+ bool use_as_random; ///< Should this AI be used when the user wants a "random AI"?
+ const char *api_version; ///< API version used by this AI.
};
/** All static information from an AI library like name, version, etc. */
@@ -154,7 +154,7 @@ public:
const char *GetCategory() const { return this->category; }
private:
- const char *category; //!< The category this library is in.
+ const char *category; ///< The category this library is in.
};
#endif /* ENABLE_AI */
diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp
index a1dc69d07..cdb6ac1dd 100644
--- a/src/ai/ai_instance.cpp
+++ b/src/ai/ai_instance.cpp
@@ -458,7 +458,7 @@ enum SQSaveLoadType {
SQSL_ARRAY_TABLE_END = 0xFF, ///< Marks the end of an array or table, no data follows.
};
-static byte _ai_sl_byte; //!< Used as source/target by the AI saveload code to store/load a single byte.
+static byte _ai_sl_byte; ///< Used as source/target by the AI saveload code to store/load a single byte.
/** SaveLoad array that saves/loads exactly one byte. */
static const SaveLoad _ai_byte[] = {
diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp
index 8d838f057..9e8602392 100644
--- a/src/ai/ai_instance.hpp
+++ b/src/ai/ai_instance.hpp
@@ -42,8 +42,8 @@ public:
AISuspendCallbackProc *GetSuspendCallback() { return callback; }
private:
- int time; //!< Amount of ticks to suspend the AI.
- AISuspendCallbackProc *callback; //!< Callback function to call when the AI can run again.
+ int time; ///< Amount of ticks to suspend the AI.
+ AISuspendCallbackProc *callback; ///< Callback function to call when the AI can run again.
};
/**
@@ -155,16 +155,16 @@ public:
*/
void Suspend();
private:
- class AIController *controller; //!< The AI main class.
- class AIStorage *storage; //!< Some global information for each running AI.
- class Squirrel *engine; //!< A wrapper around the squirrel vm.
- SQObject *instance; //!< Squirrel-pointer to the AI main class.
-
- bool is_started; //!< Is the AIs constructor executed?
- bool is_dead; //!< True if the AI has been stopped.
- bool is_save_data_on_stack; //!< Is the save data still on the squirrel stack?
- int suspend; //!< The amount of ticks to suspend this AI before it's allowed to continue.
- AISuspendCallbackProc *callback; //!< Callback that should be called in the next tick the AI runs.
+ class AIController *controller; ///< The AI main class.
+ class AIStorage *storage; ///< Some global information for each running AI.
+ class Squirrel *engine; ///< A wrapper around the squirrel vm.
+ SQObject *instance; ///< Squirrel-pointer to the AI main class.
+
+ bool is_started; ///< Is the AIs constructor executed?
+ bool is_dead; ///< True if the AI has been stopped.
+ bool is_save_data_on_stack; ///< Is the save data still on the squirrel stack?
+ int suspend; ///< The amount of ticks to suspend this AI before it's allowed to continue.
+ AISuspendCallbackProc *callback; ///< Callback that should be called in the next tick the AI runs.
/**
* Register all API functions to the VM.
diff --git a/src/ai/ai_storage.hpp b/src/ai/ai_storage.hpp
index 3130418ce..24f3e56f9 100644
--- a/src/ai/ai_storage.hpp
+++ b/src/ai/ai_storage.hpp
@@ -36,29 +36,29 @@ typedef bool (AIModeProc)();
class AIStorage {
friend class AIObject;
private:
- AIModeProc *mode; //!< The current build mode we are int.
- class AIObject *mode_instance; //!< The instance belonging to the current build mode.
+ AIModeProc *mode; ///< The current build mode we are int.
+ class AIObject *mode_instance; ///< The instance belonging to the current build mode.
- uint delay; //!< The ticks of delay each DoCommand has.
- bool allow_do_command; //!< Is the usage of DoCommands restricted?
+ uint delay; ///< The ticks of delay each DoCommand has.
+ bool allow_do_command; ///< Is the usage of DoCommands restricted?
- CommandCost costs; //!< The costs the AI is tracking.
- Money last_cost; //!< The last cost of the command.
- uint last_error; //!< The last error of the command.
- bool last_command_res; //!< The last result of the command.
+ CommandCost costs; ///< The costs the AI is tracking.
+ Money last_cost; ///< The last cost of the command.
+ uint last_error; ///< The last error of the command.
+ bool last_command_res; ///< The last result of the command.
- VehicleID new_vehicle_id; //!< The ID of the new Vehicle.
- SignID new_sign_id; //!< The ID of the new Sign.
- TileIndex new_tunnel_endtile; //!< The TileIndex of the new Tunnel.
- GroupID new_group_id; //!< The ID of the new Group.
+ VehicleID new_vehicle_id; ///< The ID of the new Vehicle.
+ SignID new_sign_id; ///< The ID of the new Sign.
+ TileIndex new_tunnel_endtile; ///< The TileIndex of the new Tunnel.
+ GroupID new_group_id; ///< The ID of the new Group.
- std::vector<int> callback_value; //!< The values which need to survive a callback.
+ std::vector<int> callback_value; ///< The values which need to survive a callback.
- RoadType road_type; //!< The current roadtype we build.
- RailType rail_type; //!< The current railtype we build.
+ RoadType road_type; ///< The current roadtype we build.
+ RailType rail_type; ///< The current railtype we build.
- void *event_data; //!< Pointer to the event data storage.
- void *log_data; //!< Pointer to the log data storage.
+ void *event_data; ///< Pointer to the event data storage.
+ void *log_data; ///< Pointer to the log data storage.
public:
AIStorage() :