-
Notifications
You must be signed in to change notification settings - Fork 6
/
Analyzer.h
50 lines (44 loc) · 1.74 KB
/
Analyzer.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
// Analyzer.h: interface for the CAnalyzer class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_ANALYZER_H__CDCECDDF_84EB_4285_817D_01C8ED8F69B1__INCLUDED_)
#define AFX_ANALYZER_H__CDCECDDF_84EB_4285_817D_01C8ED8F69B1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Util.h"
#include "HaloStructDefs.h"
class CAnalyzer : public CUtil
{
public:
void Initialize(CFile *pMapFile, UINT magic);
void AddTagString(CString tag_str);
void Cleanup(void);
void SetIndexInfo(UINT tag_count, UINT base_tag);
void SearchForVector(float *v3, float *pBuf, int size, UINT base_addr);
void SearchForIndexDistribution(CFile *pMapFile);
void ConvertToFloat(CFile *pMapFile, UINT start_addr, UINT stop_addr);
void SearchFileForNumber(CFile *pMapFile, UINT num);
void SearchForPattern(CFile *pMapFile);
void SearchForBspHeader(CFile *pMapFile);
void SearchForFloats(CFile *pMapFile);
void SetOffsetMinMax(int min, int max, int magic);
void SearchMetaForValidOffsets(CFile *pMapFile, INDEX_ITEM *pItem, int index, CString tag, CString Name);
CAnalyzer();
virtual ~CAnalyzer();
void SuperAnalyzeFileSection(UINT offset, UINT len);
protected:
CString CheckForTag(UINT val);
int SearchBufferForTextureCoords(BYTE *pBuf, DWORD buf_size, DWORD byte_align);
int SearchBufferForFloatVectors(BYTE *pBuf, DWORD buf_size, DWORD byte_align);
int SearchBufferForFloats(BYTE *pBuf, DWORD buf_size, DWORD byte_align);
CString GetRawSectionText(CFile *pMapFile, int offset, CString tag);
int m_OffsetMin;
int m_OffsetMax;
CFile *m_pMapFile;
UINT m_Magic;
UINT m_TagCount;
UINT m_BaseTag;
CStringArray m_TagList;
};
#endif // !defined(AFX_ANALYZER_H__CDCECDDF_84EB_4285_817D_01C8ED8F69B1__INCLUDED_)