From 6d4900ed7c1631c40aec59cab9c11881107456a5 Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 31 Jul 2010 22:16:34 +0000 Subject: (svn r20271) -Doc: add doxygen comments to several items under src/ai/ --- src/ai/ai_instance.hpp | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'src/ai/ai_instance.hpp') diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp index f046aa86c..8d838f057 100644 --- a/src/ai/ai_instance.hpp +++ b/src/ai/ai_instance.hpp @@ -29,12 +29,21 @@ public: callback(callback) {} + /** + * Get the amount ot ticks the AI should be suspended. + * @return The amount of AI ticks to suspend the AI. + */ int GetSuspendTime() { return time; } + + /** + * Get the callback to call when the AI can run again. + * @return The callback function to run. + */ AISuspendCallbackProc *GetSuspendCallback() { return callback; } private: - int time; - AISuspendCallbackProc *callback; + int time; //!< Amount of ticks to suspend the AI. + AISuspendCallbackProc *callback; //!< Callback function to call when the AI can run again. }; /** @@ -52,6 +61,7 @@ private: const char *msg; }; +/** Runtime information about an AI like a pointer to the squirrel vm and the current state. */ class AIInstance { public: friend class AIObject; @@ -145,16 +155,16 @@ public: */ void Suspend(); private: - class AIController *controller; - class AIStorage *storage; - class Squirrel *engine; - SQObject *instance; - - bool is_started; - bool is_dead; - bool is_save_data_on_stack; - int suspend; - AISuspendCallbackProc *callback; + 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. -- cgit v1.2.3-54-g00ecf