diff options
| author | jacob1 <jfu614@gmail.com> | 2013-03-13 19:54:34 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-03-13 19:54:34 (GMT) |
| commit | e493cf8a475baf2032f879b4c37a6b1ac1b51b54 (patch) | |
| tree | 78d068526f3ea4ed6a2eb5be4c808349b906152e /src/simulation/elements/SOAP.cpp | |
| parent | 7a055a9d90ea3464bbdc314df423e2aa768ce2be (diff) | |
| download | powder-e493cf8a475baf2032f879b4c37a6b1ac1b51b54.zip powder-e493cf8a475baf2032f879b4c37a6b1ac1b51b54.tar.gz | |
fix all tab spacing issues in all the element files
Diffstat (limited to 'src/simulation/elements/SOAP.cpp')
| -rw-r--r-- | src/simulation/elements/SOAP.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/src/simulation/elements/SOAP.cpp b/src/simulation/elements/SOAP.cpp index 72d74e0..fcdac37 100644 --- a/src/simulation/elements/SOAP.cpp +++ b/src/simulation/elements/SOAP.cpp @@ -2,49 +2,49 @@ //#TPT-Directive ElementClass Element_SOAP PT_SOAP 149 Element_SOAP::Element_SOAP() { - Identifier = "DEFAULT_PT_SOAP"; - Name = "SOAP"; - Colour = PIXPACK(0xF5F5DC); - MenuVisible = 1; - MenuSection = SC_LIQUID; - Enabled = 1; - - Advection = 0.6f; - AirDrag = 0.01f * CFDS; - AirLoss = 0.98f; - Loss = 0.95f; - Collision = 0.0f; - Gravity = 0.1f; - Diffusion = 0.00f; - HotAir = 0.000f * CFDS; - Falldown = 2; - - Flammable = 0; - Explosive = 0; - Meltable = 0; - Hardness = 20; - - Weight = 35; - - Temperature = R_TEMP-2.0f +273.15f; - HeatConduct = 29; - Description = "Soap. Creates bubbles."; - - State = ST_LIQUID; - Properties = TYPE_LIQUID|PROP_NEUTPENETRATE|PROP_LIFE_DEC; - - LowPressure = IPL; - LowPressureTransition = NT; - HighPressure = IPH; - HighPressureTransition = NT; - LowTemperature = ITL; - LowTemperatureTransition = NT; - HighTemperature = ITL; - HighTemperatureTransition = NT; - - Update = &Element_SOAP::update; - Graphics = &Element_SOAP::graphics; - + Identifier = "DEFAULT_PT_SOAP"; + Name = "SOAP"; + Colour = PIXPACK(0xF5F5DC); + MenuVisible = 1; + MenuSection = SC_LIQUID; + Enabled = 1; + + Advection = 0.6f; + AirDrag = 0.01f * CFDS; + AirLoss = 0.98f; + Loss = 0.95f; + Collision = 0.0f; + Gravity = 0.1f; + Diffusion = 0.00f; + HotAir = 0.000f * CFDS; + Falldown = 2; + + Flammable = 0; + Explosive = 0; + Meltable = 0; + Hardness = 20; + + Weight = 35; + + Temperature = R_TEMP-2.0f +273.15f; + HeatConduct = 29; + Description = "Soap. Creates bubbles."; + + State = ST_LIQUID; + Properties = TYPE_LIQUID|PROP_NEUTPENETRATE|PROP_LIFE_DEC; + + LowPressure = IPL; + LowPressureTransition = NT; + HighPressure = IPH; + HighPressureTransition = NT; + LowTemperature = ITL; + LowTemperatureTransition = NT; + HighTemperature = ITL; + HighTemperatureTransition = NT; + + Update = &Element_SOAP::update; + Graphics = &Element_SOAP::graphics; + } //#TPT-Directive ElementHeader Element_SOAP static void attach(Particle * parts, int i1, int i2) @@ -116,7 +116,7 @@ int Element_SOAP::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) @@ -130,7 +130,7 @@ int Element_SOAP::update(UPDATE_FUNC_ARGS) if (parts[i].life<=0) 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 && !sim->bmap[(y+ry)/CELL][(x+rx)/CELL]) @@ -139,7 +139,7 @@ int Element_SOAP::update(UPDATE_FUNC_ARGS) { if (sim->bmap[(y+ry)/CELL][(x+rx)/CELL] || (r && sim->elements[r&0xFF].State != ST_GAS - && (r&0xFF) != PT_SOAP && (r&0xFF) != PT_GLAS)) + && (r&0xFF) != PT_SOAP && (r&0xFF) != PT_GLAS)) { sim->detach(i); continue; @@ -202,7 +202,7 @@ int Element_SOAP::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) @@ -219,7 +219,7 @@ int Element_SOAP::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) |
