blob: b51bddccd7c66bd7478bef25189b06d915318e29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
|