42 lines
921 B
C++
42 lines
921 B
C++
|
|
||
|
#ifndef __V6MAPPARSER_H__
|
||
|
#define __V6MAPPARSER_H__
|
||
|
|
||
|
#include "worldspawn.h"
|
||
|
|
||
|
#define KEYWORD_ENTITY "entity"
|
||
|
#define KEYWORD_BRUSH "brush"
|
||
|
#define KEYWORD_VERTICES "vertices"
|
||
|
#define KEYWORD_FACES "faces"
|
||
|
|
||
|
// Map Parser States
|
||
|
enum EParserState
|
||
|
{
|
||
|
PARSERSTATE_UNKNOWN, // 0
|
||
|
PARSERSTATE_ENTITY, // 1
|
||
|
PARSERSTATE_WORLDSPAWN, // 2
|
||
|
PARSERSTATE_BRUSH, // 3
|
||
|
PARSERSTATE_VERTEX, // 4
|
||
|
PARSERSTATE_FACE, // 5
|
||
|
PARSERSTATE_PREFAB // 6 - Only in V8
|
||
|
};
|
||
|
|
||
|
class V6MapParser
|
||
|
{
|
||
|
// Variables
|
||
|
public:
|
||
|
TWorldSpawn m_WorldSpawn;
|
||
|
|
||
|
// Functions
|
||
|
public:
|
||
|
const bool LoadMap(const char* _kpcFileName);
|
||
|
|
||
|
protected:
|
||
|
EParserState ParseEntity(const std::string _Line);
|
||
|
EParserState ParseWorldSpawn(const std::string _Line);
|
||
|
EParserState ParseBrush(const std::string _Line);
|
||
|
EParserState ParseVertex(const std::string _Line);
|
||
|
EParserState ParseFace(const std::string _Line);
|
||
|
};
|
||
|
|
||
|
#endif
|