diff options
| author | Jacob1 <jfu614@gmail.com> | 2012-03-15 01:03:00 (GMT) |
|---|---|---|
| committer | Jacob1 <jfu614@gmail.com> | 2012-03-15 01:03:00 (GMT) |
| commit | 51c8dfcef4b3c44826fe16b12b6b825daaea1efe (patch) | |
| tree | fd69209c96373d80b30cd54a86cc71a3bf33e5f1 /src/graphics.c | |
| parent | a27d97124cb985c5e064547e55b401bbb7ec01a1 (diff) | |
| download | powder-51c8dfcef4b3c44826fe16b12b6b825daaea1efe.zip powder-51c8dfcef4b3c44826fe16b12b6b825daaea1efe.tar.gz | |
ngrav/amb. heat quickoptions, amb. heat drawn in heat display when on, fix render_ui position
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/graphics.c b/src/graphics.c index 080cb2a..cf5a760 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1314,14 +1314,19 @@ void draw_air(pixel *vid) clamp_flt(pv[y][x], 0.0f, 8.0f),//pressure adds green clamp_flt(fabsf(vy[y][x]), 0.0f, 8.0f));//vy adds blue } - else if (display_mode & DISPLAY_AIRH) + else if ((display_mode & DISPLAY_AIRH)) { - float ttemp = hv[y][x]+(-MIN_TEMP); - int caddress = restrict_flt((int)( restrict_flt(ttemp, 0.0f, MAX_TEMP+(-MIN_TEMP)) / ((MAX_TEMP+(-MIN_TEMP))/1024) ) *3, 0.0f, (1024.0f*3)-3); - c = PIXRGB((int)((unsigned char)color_data[caddress]*0.7f), (int)((unsigned char)color_data[caddress+1]*0.7f), (int)((unsigned char)color_data[caddress+2]*0.7f)); - //c = PIXRGB(clamp_flt(fabsf(vx[y][x]), 0.0f, 8.0f),//vx adds red - // clamp_flt(hv[y][x], 0.0f, 1600.0f),//heat adds green - // clamp_flt(fabsf(vy[y][x]), 0.0f, 8.0f));//vy adds blue + if (aheat_enable) + { + float ttemp = hv[y][x]+(-MIN_TEMP); + int caddress = restrict_flt((int)( restrict_flt(ttemp, 0.0f, MAX_TEMP+(-MIN_TEMP)) / ((MAX_TEMP+(-MIN_TEMP))/1024) ) *3, 0.0f, (1024.0f*3)-3); + c = PIXRGB((int)((unsigned char)color_data[caddress]*0.7f), (int)((unsigned char)color_data[caddress+1]*0.7f), (int)((unsigned char)color_data[caddress+2]*0.7f)); + //c = PIXRGB(clamp_flt(fabsf(vx[y][x]), 0.0f, 8.0f),//vx adds red + // clamp_flt(hv[y][x], 0.0f, 1600.0f),//heat adds green + // clamp_flt(fabsf(vy[y][x]), 0.0f, 8.0f));//vy adds blue + } + else + c = PIXRGB(0,0,0); } else if (display_mode & DISPLAY_AIRC) { |
