diff options
Diffstat (limited to 'src/simulation/elements/COAL.cpp')
| -rw-r--r-- | src/simulation/elements/COAL.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/src/simulation/elements/COAL.cpp b/src/simulation/elements/COAL.cpp index a418971..991d553 100644 --- a/src/simulation/elements/COAL.cpp +++ b/src/simulation/elements/COAL.cpp @@ -2,48 +2,48 @@ //#TPT-Directive ElementClass Element_COAL PT_COAL 59 Element_COAL::Element_COAL() { - Identifier = "DEFAULT_PT_COAL"; - Name = "COAL"; - Colour = PIXPACK(0x222222); - MenuVisible = 1; - MenuSection = SC_SOLIDS; - Enabled = 1; - - Advection = 0.0f; - AirDrag = 0.00f * CFDS; - AirLoss = 0.90f; - Loss = 0.00f; - Collision = 0.0f; - Gravity = 0.0f; - Diffusion = 0.0f; - HotAir = 0.0f * CFDS; - Falldown = 0; - - Flammable = 0; - Explosive = 0; - Meltable = 0; - Hardness = 20; - - Weight = 100; - - Temperature = R_TEMP+0.0f +273.15f; - HeatConduct = 200; - Description = "Solid. Burns slowly."; - - State = ST_SOLID; - Properties = TYPE_SOLID; - - LowPressure = IPL; - LowPressureTransition = NT; - HighPressure = IPH; - HighPressureTransition = NT; - LowTemperature = ITL; - LowTemperatureTransition = NT; - HighTemperature = ITH; - HighTemperatureTransition = NT; - - Update = &Element_COAL::update; - Graphics = &Element_COAL::graphics; + Identifier = "DEFAULT_PT_COAL"; + Name = "COAL"; + Colour = PIXPACK(0x222222); + MenuVisible = 1; + MenuSection = SC_SOLIDS; + Enabled = 1; + + Advection = 0.0f; + AirDrag = 0.00f * CFDS; + AirLoss = 0.90f; + Loss = 0.00f; + Collision = 0.0f; + Gravity = 0.0f; + Diffusion = 0.0f; + HotAir = 0.0f * CFDS; + Falldown = 0; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 100; + + Temperature = R_TEMP+0.0f +273.15f; + HeatConduct = 200; + Description = "Solid. Burns slowly."; + + State = ST_SOLID; + Properties = TYPE_SOLID; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITH; + HighTemperatureTransition = NT; + + Update = &Element_COAL::update; + Graphics = &Element_COAL::graphics; } //#TPT-Directive ElementHeader Element_COAL static int update(UPDATE_FUNC_ARGS) @@ -67,7 +67,7 @@ int Element_COAL::update(UPDATE_FUNC_ARGS) } for (rx=-2; rx<3; rx++) for (ry=-2; ry<3; ry++) - if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) + if (BOUNDS_CHECK && (rx || ry)) { r = pmap[y+ry][x+rx]; if (!r) @@ -94,7 +94,7 @@ int Element_COAL::update(UPDATE_FUNC_ARGS) { rx = rand()%5-2; ry = rand()%5-2; - if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) + if (BOUNDS_CHECK && (rx || ry)) { r = pmap[y+ry][x+rx]; if (!r) |
