summaryrefslogtreecommitdiff
path: root/src/simulation/elements/BRCK.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-04 22:30:50 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-05 15:33:45 (GMT)
commitf19f393e227e9158aced5ecd73dcb621e8d84569 (patch)
tree60e5b3d1f92412250bc0e9aa3937767128f587ce /src/simulation/elements/BRCK.cpp
parenta16534e78247a4a2625a95adffddb1ef38ee6b02 (diff)
downloadpowder-f19f393e227e9158aced5ecd73dcb621e8d84569.zip
powder-f19f393e227e9158aced5ecd73dcb621e8d84569.tar.gz
multiple BRCK colors (suggested by Catelite)
Diffstat (limited to 'src/simulation/elements/BRCK.cpp')
-rw-r--r--src/simulation/elements/BRCK.cpp33
1 files changed, 26 insertions, 7 deletions
diff --git a/src/simulation/elements/BRCK.cpp b/src/simulation/elements/BRCK.cpp
index 6769aa3..9c0e471 100644
--- a/src/simulation/elements/BRCK.cpp
+++ b/src/simulation/elements/BRCK.cpp
@@ -50,15 +50,34 @@ Element_BRCK::Element_BRCK()
int Element_BRCK::graphics(GRAPHICS_FUNC_ARGS)
{
if (cpart->tmp == 1)
- {
- *pixel_mode |= FIRE_ADD;
*colb += 100;
+ else if (cpart->tmp == 2)
+ *colr += 100;
+ else if (cpart->tmp == 3)
+ *colg += 100;
+ else if (cpart->tmp == 4) {
+ *colg += 100;
+ *colb += 100;
+ }
+ else if (cpart->tmp == 5) {
+ *colg += 100;
+ *colr += 100;
+ }
+ else if (cpart->tmp == 6) {
+ *colr += 100;
+ *colb += 100;
+ }
+ else if (cpart->tmp == 7) {
+ *colr += 100;
+ *colg += 100;
+ *colb += 100;
+ }
- *firea = 40;
- *firer = *colr;
- *fireg = *colg;
- *fireb = *colb;
- }
+ *pixel_mode |= FIRE_ADD;
+ *firea = 40;
+ *firer = *colr;
+ *fireg = *colg;
+ *fireb = *colb;
return 0;
}