forked from perilouswithadollarsign/cstrike15_src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmapline.h
86 lines (57 loc) · 2.21 KB
/
mapline.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
79
80
81
82
83
84
85
86
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef MAPLINE_H
#define MAPLINE_H
#pragma once
#include "MapHelper.h"
class CRender3D;
#define MAX_KEYNAME_SIZE 32
class CMapLine : public CMapHelper
{
public:
DECLARE_MAPCLASS(CMapLine,CMapHelper)
//
// Factory for building from a list of string parameters.
//
static CMapClass *Create(CHelperInfo *pInfo, CMapEntity *pParent);
//
// Construction/destruction:
//
CMapLine(void);
CMapLine(const char *pszStartValueKey, const char *pszStartKey, const char *pszEndValueKey, const char *pszEndKey);
~CMapLine(void);
void Initialize(void);
void BuildLine(void);
void CalcBounds(BOOL bFullUpdate = FALSE);
virtual CMapClass *Copy(bool bUpdateDependencies);
virtual CMapClass *CopyFrom(CMapClass *pFrom, bool bUpdateDependencies);
void Render3D(CRender3D *pRender);
void Render2D(CRender2D *pRender);
int SerializeRMF(std::fstream &File, BOOL bRMF);
int SerializeMAP(std::fstream &File, BOOL bRMF);
bool IsVisualElement(void) { return(true); }
virtual bool CanBeCulledByCordon() const { return false; } // We don't hide unless our parent hides.
virtual CMapClass *PrepareSelection(SelectMode_t eSelectMode);
const char* GetDescription() { return("Line helper"); }
void OnAddToWorld(CMapWorld *pWorld);
void OnNotifyDependent(CMapClass *pObject, Notify_Dependent_t eNotifyType);
void OnParentKeyChanged( const char* key, const char* value );
void OnRemoveFromWorld(CMapWorld *pWorld, bool bNotifyChildren);
virtual void UpdateDependencies(CMapWorld *pWorld, CMapClass *pObject);
protected:
//
// Implements CMapAtom transformation functions.
//
void DoTransform(const VMatrix &matrix);
char m_szStartValueKey[80]; // The key in our parent entity to look at for our start target.
char m_szStartKey[80]; // The value in our parent entity to look at for our start target.
char m_szEndValueKey[80]; //
char m_szEndKey[80]; //
CMapEntity *m_pStartEntity; // Our start target.
CMapEntity *m_pEndEntity; // Our end target.
};
#endif // MAPLINE_H