diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-11-17 19:44:09 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-11-17 19:44:09 (GMT) |
| commit | 058a2edd75debbd0297f92572316daa704bd379f (patch) | |
| tree | ad303f091f9a08b209b91eb34a9fcad996a3de69 /src/simulation/elements/Element.h | |
| parent | e3594aba9e05c6865d396418c028049cda92c2f3 (diff) | |
| parent | 7a21ae192fe19868539956f3fe28e62b2c7c4429 (diff) | |
| download | powder-058a2edd75debbd0297f92572316daa704bd379f.zip powder-058a2edd75debbd0297f92572316daa704bd379f.tar.gz | |
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/simulation/elements/Element.h')
| -rw-r--r-- | src/simulation/elements/Element.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/simulation/elements/Element.h b/src/simulation/elements/Element.h new file mode 100644 index 0000000..b51bddc --- /dev/null +++ b/src/simulation/elements/Element.h @@ -0,0 +1,63 @@ +#ifndef ELEMENTCLASS_H +#define ELEMENTCLASS_H + +#include "simulation/Simulation.h" +#include "graphics/Renderer.h" +#include "simulation/Elements.h" +#include "simulation/StructProperty.h" + +class Simulation; +class Renderer; +struct Particle; +class Element +{ +public: + char *Identifier; + char *Name; + pixel Colour; + float Advection; + float AirDrag; + float AirLoss; + float Loss; + float Collision; + float Gravity; + float Diffusion; + float HotAir; + int Falldown; + int Flammable; + int Explosive; + int Meltable; + int Hardness; + int MenuVisible; + int Enabled; + int Weight; + int MenuSection; + float Temperature; + unsigned char HeatConduct; + char *Description; + char State; + unsigned int Properties; + int (*Update) (UPDATE_FUNC_ARGS); + int (*Graphics) (GRAPHICS_FUNC_ARGS); + VideoBuffer * (*IconGenerator)(int, int, int); + + float HighPressure; + int HighPressureTransition; + float LowPressure; + int LowPressureTransition; + float HighTemperature; + int HighTemperatureTransition; + float LowTemperature; + int LowTemperatureTransition; + + Element(); + virtual ~Element() {} + static int defaultGraphics(GRAPHICS_FUNC_ARGS); + static int legacyUpdate(UPDATE_FUNC_ARGS); + + /** 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 **/ + static std::vector<StructProperty> GetProperties(); +}; + +#endif |
