diff options
| author | jacob1 <jfu614@gmail.com> | 2012-10-04 22:30:50 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-05 15:33:45 (GMT) |
| commit | f19f393e227e9158aced5ecd73dcb621e8d84569 (patch) | |
| tree | 60e5b3d1f92412250bc0e9aa3937767128f587ce /src/simulation/elements/BRCK.cpp | |
| parent | a16534e78247a4a2625a95adffddb1ef38ee6b02 (diff) | |
| download | powder-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.cpp | 33 |
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; } |
