From f19f393e227e9158aced5ecd73dcb621e8d84569 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 4 Oct 2012 18:30:50 -0400 Subject: [PATCH] multiple BRCK colors (suggested by Catelite) --- src/simulation/elements/BRCK.cpp | 33 +++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/simulation/elements/BRCK.cpp b/src/simulation/elements/BRCK.cpp index 6769aa31a..9c0e4719c 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; }