From 4233bc743c272b9c60a16928ed49bbddaf635a98 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 3 Aug 2012 01:18:39 +0100 Subject: [PATCH] Use HFLM colour data, addresses some of issue #41 --- src/simulation/elements/HFLM.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/simulation/elements/HFLM.cpp b/src/simulation/elements/HFLM.cpp index dcd9f9a23..e4fb3b45f 100644 --- a/src/simulation/elements/HFLM.cpp +++ b/src/simulation/elements/HFLM.cpp @@ -1,4 +1,9 @@ #include "simulation/Elements.h" +extern "C" +{ + #include "hmap.h" +} + //#TPT-Directive ElementClass Element_HFLM PT_HFLM 68 Element_HFLM::Element_HFLM() { @@ -51,9 +56,9 @@ int Element_HFLM::graphics(GRAPHICS_FUNC_ARGS) { int caddress = restrict_flt(restrict_flt((float)((int)(cpart->life/2)), 0.0f, 200.0f)*3, 0.0f, (200.0f*3)-3); - *colr = 0;//(unsigned char)hflm_data[caddress]; - *colg = 0;//(unsigned char)hflm_data[caddress+1]; - *colb = 0;//(unsigned char)hflm_data[caddress+2]; + *colr = (unsigned char)hflm_data[caddress]; + *colg = (unsigned char)hflm_data[caddress+1]; + *colb = (unsigned char)hflm_data[caddress+2]; *firea = 255; *firer = *colr;