00001 00003 // 00011 00013 00014 #pragma warning (disable:4996) 00015 #pragma warning (disable:4005) 00016 #pragma warning(disable:4275) 00017 00018 00019 #ifndef _AIWORLD_H 00020 #define _AIWORLD_H 00021 00022 #include "globals.h" 00023 #include "aiCharacter.h" 00024 #include "flock.h" 00025 00026 class AICharacter; 00027 class Flock; 00028 00035 00037 00038 00039 class AICharPool { 00040 public: 00041 struct node { 00042 AICharacter * _ai_char; 00043 node * _next; 00044 } ; 00045 00046 node* _head; 00047 AICharPool(); 00048 ~AICharPool(); 00049 void append(AICharacter *ai_ch); 00050 void del(string name); 00051 void print_list(); 00052 }; 00053 00054 00063 00064 00066 00067 00068 class AIWorld { 00069 private: 00070 AICharPool * _ai_char_pool; 00071 NodePath _render; 00072 public: 00073 typedef std::vector<Flock*> FlockPool; 00074 FlockPool _flock_pool; 00075 void remove_ai_char_from_flock(string name); 00076 00077 PUBLISHED: 00078 AIWorld(NodePath render); 00079 ~AIWorld(); 00080 00081 void add_ai_char(AICharacter *ai_ch); 00082 void remove_ai_char(string name); 00083 00084 void add_flock(Flock *flock); 00085 void flock_off(unsigned int flock_id); 00086 void flock_on(unsigned int flock_id); 00087 void remove_flock(unsigned int flock_id); 00088 Flock get_flock(unsigned int flock_id); 00089 00090 void print_list(); 00091 void update(); 00092 }; 00093 00094 #endif 00095 00096 00097 00098 00099 00100 00101 00102 00103