The-Powder-Toy/src/simulation/StructProperty.h
mniip ff27d69424 Switch from std::string to String/ByteString in most of the code
Also switch SimulationData from weird arrays to std::vector
2018-04-30 21:13:24 +03:00

38 lines
553 B
C

#ifndef STRUCTPROPERTY_H_
#define STRUCTPROPERTY_H_
#include "common/String.h"
#include <stdint.h>
struct StructProperty
{
enum PropertyType { ParticleType, Colour, Integer, UInteger, Float, String, Char, UChar, Removed };
ByteString Name;
PropertyType Type;
intptr_t Offset;
StructProperty(ByteString name, PropertyType type, intptr_t offset):
Name(name),
Type(type),
Offset(offset)
{
}
StructProperty():
Name(""),
Type(Char),
Offset(0)
{
}
};
union PropertyValue {
int Integer;
unsigned int UInteger;
float Float;
};
#endif