summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-03-06 17:05:59 (GMT)
committer jacob1 <jfu614@gmail.com>2013-03-06 17:05:59 (GMT)
commit037618e6f8e6a37574f7ef8ffd90e490fb0ea137 (patch)
treed80246d31a26aee7735a566bccc8ce9e8e4e305d /src/simulation/elements
parentad951eb9af20cd1a784fab39c41ade1c19dff2ca (diff)
downloadpowder-037618e6f8e6a37574f7ef8ffd90e490fb0ea137.zip
powder-037618e6f8e6a37574f7ef8ffd90e490fb0ea137.tar.gz
remove auto generated comments from all files, fix some missing tabs, remove unused variables from config.h
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/BCLN.cpp2
-rw-r--r--src/simulation/elements/CLNE.cpp2
-rw-r--r--src/simulation/elements/CONV.cpp2
-rw-r--r--src/simulation/elements/CRAY.cpp4
-rw-r--r--src/simulation/elements/PBCN.cpp2
-rw-r--r--src/simulation/elements/PCLN.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/simulation/elements/BCLN.cpp b/src/simulation/elements/BCLN.cpp
index a617620..de10464 100644
--- a/src/simulation/elements/BCLN.cpp
+++ b/src/simulation/elements/BCLN.cpp
@@ -57,7 +57,7 @@ int Element_BCLN::update(UPDATE_FUNC_ARGS)
parts[i].vx += advection*sim->vx[y/CELL][x/CELL];
parts[i].vy += advection*sim->vy[y/CELL][x/CELL];
}
- if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT)))
+ if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL)))
{
int r, rx, ry, rt;
for (rx=-1; rx<2; rx++)
diff --git a/src/simulation/elements/CLNE.cpp b/src/simulation/elements/CLNE.cpp
index f0a9c44..482d2c9 100644
--- a/src/simulation/elements/CLNE.cpp
+++ b/src/simulation/elements/CLNE.cpp
@@ -49,7 +49,7 @@ Element_CLNE::Element_CLNE()
//#TPT-Directive ElementHeader Element_CLNE static int update(UPDATE_FUNC_ARGS)
int Element_CLNE::update(UPDATE_FUNC_ARGS)
{
- if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT)))
+ if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL)))
{
int r, rx, ry, rt;
for (rx=-1; rx<2; rx++)
diff --git a/src/simulation/elements/CONV.cpp b/src/simulation/elements/CONV.cpp
index 8f2f0c6..bb313ac 100644
--- a/src/simulation/elements/CONV.cpp
+++ b/src/simulation/elements/CONV.cpp
@@ -50,7 +50,7 @@ Element_CONV::Element_CONV()
int Element_CONV::update(UPDATE_FUNC_ARGS)
{
int r, rx, ry;
- if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || parts[i].ctype==PT_CONV || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT)))
+ if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || parts[i].ctype==PT_CONV || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL)))
{
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp
index 55c9bf8..f0d276a 100644
--- a/src/simulation/elements/CRAY.cpp
+++ b/src/simulation/elements/CRAY.cpp
@@ -88,7 +88,7 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS)
break;
}
r = pmap[y+nyi+nyy][x+nxi+nxx];
- if (!sim->IsWallBlocking(x+nxi+nxx, y+nyi+nyy, parts[i].ctype) && (!sim->pmap[y+nyi+nyy][x+nxi+nxx] || (parts[i].ctype == PT_SPRK && !destroy))) { // create, also set color if it has passed through FILT
+ if (!sim->IsWallBlocking(x+nxi+nxx, y+nyi+nyy, parts[i].ctype) && (!sim->pmap[y+nyi+nyy][x+nxi+nxx] || (parts[i].ctype == PT_SPRK && parts[r>>8].type != PT_BREC && !destroy))) { // create, also set color if it has passed through FILT
int nr;
if (parts[i].ctype == PT_LIFE)
nr = sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, parts[i].ctype|(parts[i].tmp2<<8));
@@ -98,7 +98,7 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS)
parts[nr].dcolour = colored;
parts[nr].temp = parts[i].temp;
}
- if((!destroy || parts[i].ctype != PT_SPRK) && !--partsRemaining)
+ if((!destroy || (parts[i].ctype != PT_SPRK &&parts[r>>8].type != PT_BREC)) && !--partsRemaining)
docontinue = 0;
} else if ((r&0xFF)==PT_FILT) { // get color if passed through FILT
colored = wavelengthToDecoColour(parts[r>>8].ctype);
diff --git a/src/simulation/elements/PBCN.cpp b/src/simulation/elements/PBCN.cpp
index f0e4964..bec42db 100644
--- a/src/simulation/elements/PBCN.cpp
+++ b/src/simulation/elements/PBCN.cpp
@@ -63,7 +63,7 @@ int Element_PBCN::update(UPDATE_FUNC_ARGS)
return 1;
}
}
- if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT)))
+ if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL)))
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES)
diff --git a/src/simulation/elements/PCLN.cpp b/src/simulation/elements/PCLN.cpp
index fc9db0e..1cd2ede 100644
--- a/src/simulation/elements/PCLN.cpp
+++ b/src/simulation/elements/PCLN.cpp
@@ -77,7 +77,7 @@ int Element_PCLN::update(UPDATE_FUNC_ARGS)
parts[i].life = 10;
}
}
- if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOLALT)))
+ if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM || !sim->elements[parts[i].ctype].Enabled || (parts[i].ctype==PT_LIFE && (parts[i].tmp<0 || parts[i].tmp>=NGOL)))
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES)