mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-14 22:31:57 +00:00
ace3e29473
These were creating dangerous interdependencies. It is better to do explicit conversions when needed. As an added plus, this means that zstring.h no longer depends on name.h which was very annoying.
44 lines
No EOL
729 B
C++
44 lines
No EOL
729 B
C++
#ifndef __P_UDMF_H
|
|
#define __P_UDMF_H
|
|
|
|
#include "sc_man.h"
|
|
#include "m_fixed.h"
|
|
|
|
class UDMFParserBase
|
|
{
|
|
protected:
|
|
FScanner sc;
|
|
FName namespc = NAME_None;
|
|
int namespace_bits;
|
|
FString parsedString;
|
|
bool BadCoordinates = false;
|
|
|
|
void Skip();
|
|
FName ParseKey(bool checkblock = false, bool *isblock = NULL);
|
|
int CheckInt(FName key);
|
|
double CheckFloat(FName key);
|
|
double CheckCoordinate(FName key);
|
|
DAngle CheckAngle(FName key);
|
|
bool CheckBool(FName key);
|
|
const char *CheckString(FName key);
|
|
|
|
template<typename T>
|
|
bool Flag(T &value, int mask, FName key)
|
|
{
|
|
if (CheckBool(key))
|
|
{
|
|
value |= mask;
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
value &= ~mask;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
};
|
|
|
|
#define BLOCK_ID (ENamedName)-1
|
|
|
|
#endif |