summaryrefslogtreecommitdiff
path: root/src/simulation/elements/BCOL.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-03-13 19:54:34 (GMT)
committer jacob1 <jfu614@gmail.com>2013-03-13 19:54:34 (GMT)
commite493cf8a475baf2032f879b4c37a6b1ac1b51b54 (patch)
tree78d068526f3ea4ed6a2eb5be4c808349b906152e /src/simulation/elements/BCOL.cpp
parent7a055a9d90ea3464bbdc314df423e2aa768ce2be (diff)
downloadpowder-e493cf8a475baf2032f879b4c37a6b1ac1b51b54.zip
powder-e493cf8a475baf2032f879b4c37a6b1ac1b51b54.tar.gz
fix all tab spacing issues in all the element files
Diffstat (limited to 'src/simulation/elements/BCOL.cpp')
-rw-r--r--src/simulation/elements/BCOL.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/simulation/elements/BCOL.cpp b/src/simulation/elements/BCOL.cpp
index ff92f8f..3088dcf 100644
--- a/src/simulation/elements/BCOL.cpp
+++ b/src/simulation/elements/BCOL.cpp
@@ -2,48 +2,48 @@
//#TPT-Directive ElementClass Element_BCOL PT_BCOL 73
Element_BCOL::Element_BCOL()
{
- Identifier = "DEFAULT_PT_BCOL";
- Name = "BCOL";
- Colour = PIXPACK(0x333333);
- MenuVisible = 1;
- MenuSection = SC_POWDERS;
- Enabled = 1;
-
- Advection = 0.4f;
- AirDrag = 0.04f * CFDS;
- AirLoss = 0.94f;
- Loss = 0.95f;
- Collision = -0.1f;
- Gravity = 0.3f;
- Diffusion = 0.00f;
- HotAir = 0.000f * CFDS;
- Falldown = 1;
-
- Flammable = 0;
- Explosive = 0;
- Meltable = 5;
- Hardness = 2;
-
- Weight = 90;
-
- Temperature = R_TEMP+0.0f +273.15f;
- HeatConduct = 150;
- Description = "Broken Coal. Heavy particles. See COAL";
-
- State = ST_SOLID;
- Properties = TYPE_PART;
-
- LowPressure = IPL;
- LowPressureTransition = NT;
- HighPressure = IPH;
- HighPressureTransition = NT;
- LowTemperature = ITL;
- LowTemperatureTransition = NT;
- HighTemperature = ITH;
- HighTemperatureTransition = NT;
-
- Update = &Element_BCOL::update;
- Graphics = &Element_BCOL::graphics;
+ Identifier = "DEFAULT_PT_BCOL";
+ Name = "BCOL";
+ Colour = PIXPACK(0x333333);
+ MenuVisible = 1;
+ MenuSection = SC_POWDERS;
+ Enabled = 1;
+
+ Advection = 0.4f;
+ AirDrag = 0.04f * CFDS;
+ AirLoss = 0.94f;
+ Loss = 0.95f;
+ Collision = -0.1f;
+ Gravity = 0.3f;
+ Diffusion = 0.00f;
+ HotAir = 0.000f * CFDS;
+ Falldown = 1;
+
+ Flammable = 0;
+ Explosive = 0;
+ Meltable = 5;
+ Hardness = 2;
+
+ Weight = 90;
+
+ Temperature = R_TEMP+0.0f +273.15f;
+ HeatConduct = 150;
+ Description = "Broken Coal. Heavy particles. See COAL";
+
+ State = ST_SOLID;
+ Properties = TYPE_PART;
+
+ LowPressure = IPL;
+ LowPressureTransition = NT;
+ HighPressure = IPH;
+ HighPressureTransition = NT;
+ LowTemperature = ITL;
+ LowTemperatureTransition = NT;
+ HighTemperature = ITH;
+ HighTemperatureTransition = NT;
+
+ Update = &Element_BCOL::update;
+ Graphics = &Element_BCOL::graphics;
}
//#TPT-Directive ElementHeader Element_BCOL static int update(UPDATE_FUNC_ARGS)
@@ -60,7 +60,7 @@ int Element_BCOL::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)
@@ -76,7 +76,7 @@ int Element_BCOL::update(UPDATE_FUNC_ARGS)
if (parts[r>>8].ctype == PT_IRON && !(rand()%500)) {
parts[r>>8].ctype = PT_METL;
sim->kill_part(i);
- return 1;
+ return 1;
}
}
}
@@ -87,7 +87,7 @@ int Element_BCOL::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)