mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
fad406c4c9
This setup has been a constant source of problems so now I reviewed all uses of FName to make sure that everything that needs to be initialized is done manually. This also merges the player_t constructor into the class definition as default values.
38 lines
No EOL
722 B
C++
38 lines
No EOL
722 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(const char *key);
|
|
double CheckFloat(const char *key);
|
|
double CheckCoordinate(const char *key);
|
|
DAngle CheckAngle(const char *key);
|
|
bool CheckBool(const char *key);
|
|
const char *CheckString(const char *key);
|
|
|
|
template<typename T>
|
|
void Flag(T &value, int mask, const char *key)
|
|
{
|
|
if (CheckBool(key))
|
|
value |= mask;
|
|
else
|
|
value &= ~mask;
|
|
}
|
|
|
|
};
|
|
|
|
#define BLOCK_ID (ENamedName)-1
|
|
|
|
#endif |