summaryrefslogtreecommitdiff
path: root/src/simulation/elements/REPL.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/REPL.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/REPL.cpp')
-rw-r--r--src/simulation/elements/REPL.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/simulation/elements/REPL.cpp b/src/simulation/elements/REPL.cpp
index 0b68487..aa513e9 100644
--- a/src/simulation/elements/REPL.cpp
+++ b/src/simulation/elements/REPL.cpp
@@ -2,48 +2,48 @@
//#TPT-Directive ElementClass Element_REPL PT_REPL 160
Element_REPL::Element_REPL()
{
- Identifier = "DEFAULT_PT_REPL";
- Name = "RPEL";
- Colour = PIXPACK(0x99CC00);
- MenuVisible = 1;
- MenuSection = SC_FORCE;
- Enabled = 1;
-
- Advection = 0.0f;
- AirDrag = 0.00f * CFDS;
- AirLoss = 0.90f;
- Loss = 0.00f;
- Collision = 0.0f;
- Gravity = 0.0f;
- Diffusion = 0.00f;
- HotAir = 0.000f * CFDS;
- Falldown = 0;
-
- Flammable = 0;
- Explosive = 0;
- Meltable = 0;
- Hardness = 1;
-
- Weight = 100;
-
- Temperature = 20.0f+0.0f +273.15f;
- HeatConduct = 0;
- Description = "Repel or attract particles based on temp value.";
-
- State = ST_NONE;
- Properties = TYPE_SOLID;
-
- LowPressure = IPL;
- LowPressureTransition = NT;
- HighPressure = IPH;
- HighPressureTransition = NT;
- LowTemperature = ITL;
- LowTemperatureTransition = NT;
- HighTemperature = ITH;
- HighTemperatureTransition = NT;
-
- Update = &Element_REPL::update;
-
+ Identifier = "DEFAULT_PT_REPL";
+ Name = "RPEL";
+ Colour = PIXPACK(0x99CC00);
+ MenuVisible = 1;
+ MenuSection = SC_FORCE;
+ Enabled = 1;
+
+ Advection = 0.0f;
+ AirDrag = 0.00f * CFDS;
+ AirLoss = 0.90f;
+ Loss = 0.00f;
+ Collision = 0.0f;
+ Gravity = 0.0f;
+ Diffusion = 0.00f;
+ HotAir = 0.000f * CFDS;
+ Falldown = 0;
+
+ Flammable = 0;
+ Explosive = 0;
+ Meltable = 0;
+ Hardness = 1;
+
+ Weight = 100;
+
+ Temperature = 20.0f+0.0f +273.15f;
+ HeatConduct = 0;
+ Description = "Repel or attract particles based on temp value.";
+
+ State = ST_NONE;
+ Properties = TYPE_SOLID;
+
+ LowPressure = IPL;
+ LowPressureTransition = NT;
+ HighPressure = IPH;
+ HighPressureTransition = NT;
+ LowTemperature = ITL;
+ LowTemperatureTransition = NT;
+ HighTemperature = ITH;
+ HighTemperatureTransition = NT;
+
+ Update = &Element_REPL::update;
+
}
//#TPT-Directive ElementHeader Element_REPL static int update(UPDATE_FUNC_ARGS)
@@ -54,7 +54,7 @@ int Element_REPL::update(UPDATE_FUNC_ARGS)
{
rx = (rand()%21)-10;
ry = (rand()%21)-10;
- 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)