blob: 89dc0db46c2973dcd84e06b5db16167d8e8667e7 (
plain) (
blame)
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef C_HINT_EVENTS_H
#define C_HINT_EVENTS_H
#ifdef _WIN32
#pragma once
#endif
class CHintData;
typedef enum
{
HINTEVENT_OBJECT_BUILT_BY_LOCAL_PLAYER=0 // C_HintEvent_ObjectBuiltByLocalPlayer
} HintEventType;
// All hint events derive from this.
class C_HintEvent_Base
{
public:
// Find out what kind of event this is.
virtual HintEventType GetType() = 0;
};
// Fire a global hint event. It goes to all hint types so they can determine if
// they want to react.
void GlobalHintEvent( C_HintEvent_Base *pEvent );
// Hint callbacks for each type of hint.
void HintEventFn_BuildObject( CHintData *pData, C_HintEvent_Base *pEvent );
// This notifies the hint system that an object has been built by the local player so
// it can disable all further hints referring to objects of this type.
class C_BaseObject;
class C_HintEvent_ObjectBuiltByLocalPlayer : public C_HintEvent_Base
{
public:
C_HintEvent_ObjectBuiltByLocalPlayer( C_BaseObject *pObj )
{
m_pObject = pObj;
}
virtual HintEventType GetType() { return HINTEVENT_OBJECT_BUILT_BY_LOCAL_PLAYER; }
public:
C_BaseObject *m_pObject; // The object just built.
};
#endif // C_HINT_EVENTS_H
|