forked from HaloMods/SparkEdit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
HaloTagManager.h
81 lines (73 loc) · 2.25 KB
/
HaloTagManager.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
#if !defined(AFX_TAGMANAGER_H__0C7C3623_753B_4660_9BBE_F7540E3E3FA8__INCLUDED_)
#define AFX_TAGMANAGER_H__0C7C3623_753B_4660_9BBE_F7540E3E3FA8__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Util.h"
#include "PcModel.h"
#include "XboxModel.h"
typedef enum ENUM_BITMAP_STATUS
{
BITMAP_DISABLED,
BITMAP_ENABLED,
LIGHTMAP
}BITMAP_STATUS;
typedef struct STRUCT_TAG_LOOKUP
{
UINT tagclass[3];
int tag_id;
UINT meta_offset;
UINT meta_size;
UINT ModelTag;
UINT CollisionModelTag;
UINT ShaderTag;
UINT BaseTextureTag;
UINT MultiTexture[5];
UINT PhysicsTag;
UINT WeaponTag;
UINT EquipmentTag;
CPcModel *pPcModel;
CXboxModel *pXboxModel;
UINT RawNameOffset;
int BitmapIndex;
BITMAP_STATUS BitmapStatus;
char name[128];
}TAG_LOOKUP;
class CHaloTagManager : public CUtil
{
public:
void ExportTagInfo(CString filename);
void GetHighLevelTagInfo(UINT tag_type, int index, UINT *pTagId, UINT *pRawNameOffset, CString *pStr);
UINT GetHighLevelTagCount(UINT tag_type);
void ActivateLightmap(UINT lightmap_tag);
CString GetTagDescription(UINT tag_id);
BITMAP_STATUS GetTextureStatus(int bitmap_tagid);
CString GetTagName(UINT tag_id);
void CompileReferences(void);
void DumpTags(void);
void SetPcModelTag(UINT tag_id, CPcModel *pPcModel);
void SetXboxModelTag(UINT tag_id, CXboxModel *pXboxModel);
void FindMatchingSubTags(int tag_index, UINT *pSearchBuf, UINT count);
void CompileTagList(void);
void GetTagPhysics(UINT tag_id);
void InitTag(int index, INDEX_ITEM *pItem);
void Cleanup();
BOOL CheckForTag(UINT val);
void GetTagXboxModel(UINT tag_id, CXboxModel **ppXboxModel);
void GetTagPcModel(UINT tag_id, CPcModel **ppPcModel);
CHaloTagManager();
virtual ~CHaloTagManager();
void Initialize(CFile *pMapFile, UINT magic, UINT tag_count, UINT base_tag);
int GetBaseTextureIndex(UINT shader_tag_id);
void GetShaderTextures(UINT shader_tag_id, int &base_texture_index,
int &detail1_texture_index, int &detail2_texture_index);
protected:
TAG_LOOKUP *m_pTagLookup;
UINT m_Magic;
UINT m_TagCount;
UINT m_BaseTag;
int m_BitmapCount;
CStringArray m_TagNames;
CFile *m_pMapFile;
};
#endif // !defined(AFX_TAGMANAGER_H__0C7C3623_753B_4660_9BBE_F7540E3E3FA8__INCLUDED_)