convert line ends
[canaan.git] / prj / cam / src / ai / aisound.h
blobe64b305f5064373daf21782d755c710c352de2f3
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 ///////////////////////////////////////////////////////////////////////////////
7 // $Header: r:/t2repos/thief2/src/ai/aisound.h,v 1.13 1999/05/10 10:45:56 TOML Exp $
8 //
9 //
11 #ifndef __AISOUND_H
12 #define __AISOUND_H
14 #include <aiapisnd.h>
15 #include <aibascmp.h>
16 #include <aisndtyp.h>
17 #include <ctagset.h>
19 #pragma once
20 #pragma pack(4)
22 F_DECLARE_INTERFACE(IAIConverse);
24 class IMotionCoordinator;
25 struct sAIMotionRequest;
27 struct sAISoundConceptDesc;
29 EXTERN ObjID g_AISoundDebugObj;
31 ///////////////////////////////////////////////////////////////////////////////
33 BOOL AIInitSoundEnactor(IAIManager *);
34 BOOL AITermSoundEnactor();
36 ///////////////////////////////////////////////////////////////////////////////
38 // CLASS: cAISoundEnactor
41 typedef cAIComponentBase<IAISoundEnactor, &IID_IAISoundEnactor> cAISoundEnactorBase;
43 class cAISoundEnactor : public cAISoundEnactorBase
45 public:
46 cAISoundEnactor();
48 STDMETHOD_(const char *, GetName)();
49 STDMETHOD_(void, Init)();
50 STDMETHOD_(void, End)();
51 STDMETHOD_(void, OnModeChange)(eAIMode previous, eAIMode mode);
53 STDMETHOD_(BOOL, Save)(ITagFile *);
54 STDMETHOD_(BOOL, Load)(ITagFile *);
57 // Halt th current concept
59 STDMETHOD_(void, HaltCurrent)();
62 // Attempt to play a sound concept
64 STDMETHOD (RequestConcept)(eAISoundConcept, const cTagSet *);
65 STDMETHOD (RequestConcept)(const char * pszConcept, const cTagSet *);
67 // @HACK for E3 to allow scripts to stop all speech from this AI
68 BOOL m_fSpeechStop;
70 private:
71 HRESULT DoRequestConcept(sAISoundConceptDesc *, const cTagSet *);
73 #ifdef CONCEPT_PLAYBACK_RESTRICT
74 unsigned m_ConceptTimes[kAISC_CoreNum];
75 #endif
76 cAITimer m_ReacquireTimer;
78 enum eFlags
80 kPlayedSpotPlayer = 0x01
83 eAISoundConcept m_LastConceptPlayed;
84 cTagSet m_LastTagsPlayed;
86 unsigned m_flags;
88 IAIConverse * m_pConverse;
91 ///////////////////////////////////////
93 inline cAISoundEnactor::cAISoundEnactor()
94 : m_ReacquireTimer(AICustomTime(3*60*1000)),
95 m_flags(0),
96 m_LastConceptPlayed(kAISC_CoreBase),
97 m_pConverse(NULL)
99 m_fSpeechStop = FALSE;
100 #ifdef CONCEPT_PLAYBACK_RESTRICT
101 memset(&m_ConceptTimes, 0, sizeof(m_ConceptTimes));
102 #endif
105 ///////////////////////////////////////////////////////////////////////////////
107 #pragma pack()
109 #endif /* !__AISOUND_H */