summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-05-14 23:10:10 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-05-14 23:10:10 (GMT)
commit45563e97e813cfd21724ad1111e5de3e04679e1a (patch)
tree28d6e7d257c8790fa4ac892cb051bd9a86f3681d /src/simulation/Simulation.h
parent0b4ad4f25cf168226677f648cf4cadfdb6caa59a (diff)
downloadpowder-45563e97e813cfd21724ad1111e5de3e04679e1a.zip
powder-45563e97e813cfd21724ad1111e5de3e04679e1a.tar.gz
Make flood_prop use PropertyType from StructProperty, Property tool works
Diffstat (limited to 'src/simulation/Simulation.h')
-rw-r--r--src/simulation/Simulation.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h
index 6a7c733..fe65d41 100644
--- a/src/simulation/Simulation.h
+++ b/src/simulation/Simulation.h
@@ -32,6 +32,7 @@ struct StructProperty
std::string Name;
PropertyType Type;
intptr_t Offset;
+
StructProperty(std::string name, PropertyType type, intptr_t offset):
Name(name),
Type(type),
@@ -54,7 +55,7 @@ struct Particle
unsigned int dcolour;
/** Returns a list of properties, their type and offset within the structure that can be changed
by higher-level processes refering to them by name such as Lua or the property tool **/
- std::vector<StructProperty> GetProperties()
+ static std::vector<StructProperty> GetProperties()
{
std::vector<StructProperty> properties;
properties.push_back(StructProperty("type", StructProperty::ParticleType, offsetof(Particle, type)));
@@ -269,8 +270,8 @@ public:
void create_cherenkov_photon(int pp);
void create_gain_photon(int pp);
inline void kill_part(int i);
- int flood_prop(int x, int y, size_t propoffset, void * propvalue, int proptype);
- int flood_prop_2(int x, int y, size_t propoffset, void * propvalue, int proptype, int parttype, char * bitmap);
+ int flood_prop(int x, int y, size_t propoffset, void * propvalue, StructProperty::PropertyType proptype);
+ int flood_prop_2(int x, int y, size_t propoffset, void * propvalue, StructProperty::PropertyType proptype, int parttype, char * bitmap);
int flood_water(int x, int y, int i, int originaly, int check);
inline void detach(int i);
inline void part_change_type(int i, int x, int y, int t);