This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
The-Powder-Toy/src/simulation/StructProperty.h

38 lines
551 B
C++

#ifndef STRUCTPROPERTY_H_
#define STRUCTPROPERTY_H_
#include <string>
#include <stdint.h>
struct StructProperty
{
enum PropertyType { ParticleType, Colour, Integer, UInteger, Float, String, Char, UChar, Removed };
std::string Name;
PropertyType Type;
intptr_t Offset;
StructProperty(std::string 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