ngrav/amb. heat quickoptions, amb. heat drawn in heat display when on, fix render_ui position
This commit is contained in:
parent
a27d97124c
commit
51c8dfcef4
@ -166,6 +166,7 @@ extern int active_menu;
|
||||
extern int hud_enable;
|
||||
extern int pretty_powder;
|
||||
extern int drawgrav_enable;
|
||||
extern int ngrav_enable;
|
||||
int limitFPS;
|
||||
int water_equal_test;
|
||||
extern int quickoptions_tooltip_fade;
|
||||
|
@ -77,6 +77,8 @@ static quick_option quickmenu[] =
|
||||
{"P", "Sand effect", QM_TOGGLE, &pretty_powder},
|
||||
{"G", "Draw gravity grid", QM_TOGGLE, &drawgrav_enable},
|
||||
{"D", "Show decorations", QM_TOGGLE, &decorations_enable},
|
||||
{"N", "Newtonian gravity", QM_TOGGLE, &ngrav_enable},
|
||||
{"A", "Ambient heat", QM_TOGGLE, &aheat_enable},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -2621,7 +2621,15 @@ void quickoptions_menu(pixel *vid_buf, int b, int bq, int x, int y)
|
||||
quickoptions_tooltip_y = (i*16)+5;
|
||||
if(b && !bq)
|
||||
{
|
||||
*(quickmenu[i].variable) = !(*(quickmenu[i].variable));
|
||||
if (!strcmp(quickmenu[i].name,"Newtonian gravity"))
|
||||
{
|
||||
if(!ngrav_enable)
|
||||
start_grav_async();
|
||||
else
|
||||
stop_grav_async();
|
||||
}
|
||||
else
|
||||
*(quickmenu[i].variable) = !(*(quickmenu[i].variable));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2886,6 +2894,11 @@ void set_cmode(int cm) // sets to given view mode
|
||||
{
|
||||
colour_mode = COLOUR_HEAT;
|
||||
strcpy(itc_msg, "Heat Display");
|
||||
free(display_modes);
|
||||
display_modes = calloc(2, sizeof(unsigned int));
|
||||
display_mode |= DISPLAY_AIRH;
|
||||
display_modes[0] = DISPLAY_AIRH;
|
||||
display_modes[1] = 0;
|
||||
}
|
||||
else if (cmode==CM_FANCY)
|
||||
{
|
||||
|
@ -2227,7 +2227,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
if (x>=(XRES+BARSIZE-(510-476)) && x<=(XRES+BARSIZE-(510-491)) && !bq)
|
||||
{
|
||||
render_ui(vid_buf, XRES+BARSIZE-(510-491), YRES+(MENUSIZE-19), 3);
|
||||
render_ui(vid_buf, XRES+BARSIZE-(510-491), YRES-2, 3);
|
||||
}
|
||||
if (x>=(XRES+BARSIZE-(510-494)) && x<=(XRES+BARSIZE-(510-509)) && !bq)
|
||||
sys_pause = !sys_pause;
|
||||
|
Loading…
Reference in New Issue
Block a user