-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaiapiabl.h
78 lines (60 loc) · 2.08 KB
/
aiapiabl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
@Copyright Looking Glass Studios, Inc.
1996,1997,1998,1999,2000 Unpublished Work.
*/
///////////////////////////////////////////////////////////////////////////////
// $Header: r:/t2repos/thief2/src/ai/aiapiabl.h,v 1.7 1999/11/29 12:27:30 BFarquha Exp $
//
// Specification of the AI ability interface
//
#ifndef __AIAPIABL_H
#define __AIAPIABL_H
#ifndef __cplusplus
#error "Private AI APIs require C++"
#endif
#include <aiapiatr.h>
#pragma once
#pragma pack(4)
class cAIActions;
struct sAIModeSuggestion;
#define kAIMaxAbilsPerAI 32
///////////////////////////////////////////////////////////////////////////////
//
// INTERFACE: IAIAbility
//
DECLARE_INTERFACE_(IAIAbility, IAIActor)
{
//
// Initialize the ability over and above normal component intialization
//
STDMETHOD_(void, ConnectAbility)(unsigned ** ppSignals) PURE;
//
// Goal save/load
//
STDMETHOD_(BOOL, SaveGoal)(ITagFile * pTagFile, cAIGoal * pGoal) PURE;
STDMETHOD_(BOOL, LoadGoal)(ITagFile * pTagFile, cAIGoal ** ppGoal) PURE;
//
// Current action list save/load (pTagFile cursor should be prepositioned).
//
STDMETHOD_(BOOL, SaveActions)(ITagFile * pTagFile, cAIActions * pActions) PURE;
STDMETHOD_(BOOL, LoadActions)(ITagFile * pTagFile, cAIActions * pActions) PURE;
//
// Set/Get whether this is the ability currently running the AI
//
STDMETHOD_(void, SetControl)(BOOL) PURE;
STDMETHOD_(BOOL, InControl)() PURE;
//
// Update the status of the current goal
//
STDMETHOD_(eAIResult, UpdateGoal)(cAIGoal *) PURE;
//
// Ability flow
//
STDMETHOD (SuggestMode)(sAIModeSuggestion *) PURE;
STDMETHOD (SuggestGoal)(cAIGoal * pPrevious, cAIGoal ** ppNew) PURE; // Ability should not release pPrevious!
STDMETHOD_(BOOL, FinalizeGoal)(cAIGoal *pGoal) PURE;
STDMETHOD (SuggestActions)(cAIGoal * pGoal, const cAIActions & previous, cAIActions * pNew) PURE;
};
///////////////////////////////////////////////////////////////////////////////
#pragma pack()
#endif /* !__AIAPIABL_H */