// ----------------------------------------------------------------------- // // // MODULE : CharacterMgr.h // // PURPOSE : CharacterMgr class definition // // CREATED : 7/9/98 // // ----------------------------------------------------------------------- // #ifndef __CHARACTER_MGR_H__ #define __CHARACTER_MGR_H__ #include "ltbasedefs.h" #include "Character.h" #include "DeathScene.h" #include "TemplateList.h" class CAI; class AI_Dog; class CCharacter; class CCharacterMgr; class CPlayerObj; class CScanner; class CAISense; extern CCharacterMgr *g_pCharacterMgr; class CCharacterMgr { public : // Public methods CCharacterMgr(); // Methods void Add(CCharacter* pChar); void Remove(CCharacter* pChar); // Engine functions void PostStartWorld(uint8 nLoadGameFlags); void PreStartWorld(); void Load(HMESSAGEREAD hRead); void Save(HMESSAGEWRITE hWrite); // Query/search CPlayerObj* FindPlayer(); void FindDogsInRadius(CTList& lstDogs, LTFLOAT fRadius); // Tracking things that affect sense void AddDeathScene(CDeathScene *pDeathScene); void RemoveDeathScene(CDeathScene *pDeathScene); CDeathScene* GetDeathScene(HOBJECT hBodyObject); // AI Senses LTBOOL UpdateSense(CAI* pAI, CAISense* pSense, LTFLOAT fTimeDelta); // Scanner senses CCharacter* LookForEnemy(CScanner* pScanner); CDeathScene* LookForDeathScene(CScanner* pScanner); // Hac void ResetAIReactions(); private : // Private member variables CTList m_badDeathList; // Death scene list of all BAD aligned AIs CTList m_goodDeathList; // Death scene list of all GOOD aligned AIs CTList m_neutralDeathList; // Death scene list of all NEUTRAL aligned AIs // NOTE: The following data members do not need to be saved / loaded // when saving games. Any data members that don't need to be saved // should be added here (to keep them together)... CTList m_playerList; // List of all CPlayerObjs in the game CTList m_badList; // List of all BAD aligned AIs CTList m_goodList; // List of all GOOD aligned AIs CTList m_neutralList; // List of all NEUTRAL aligned AIs // Static lists used for looping over the lists of characters more easily in code const static int s_kCharacterLists; const static enum CharacterClass s_aCharacterClasses[]; static CTList* s_aCharacterLists[]; // Static lists used for looping over the lists of death scenes more easily in code const static int s_kDeathLists; const static enum CharacterClass s_aDeathClasses[]; static CTList* s_aDeathLists[]; private : // Private methods // AI senses LTBOOL UpdateSenseInList(CAI* pAI, CAISense* pSense, CTList & listCharacters, LTFLOAT fTimeDelta); LTBOOL UpdateSenseInList(CAI* pAI, CAISense* pSense, CTList & listDeathScenes, LTFLOAT fTimeDelta); // Scanner senses CCharacter* CanSeeEnemyInList(CScanner* pScanner, CTList & list); CDeathScene* CanSeeDeathSceneInList(CScanner* pScanner, CTList & list); }; #endif // __CHARACTER_MGR_H__