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 hud_enable;
|
||||||
extern int pretty_powder;
|
extern int pretty_powder;
|
||||||
extern int drawgrav_enable;
|
extern int drawgrav_enable;
|
||||||
|
extern int ngrav_enable;
|
||||||
int limitFPS;
|
int limitFPS;
|
||||||
int water_equal_test;
|
int water_equal_test;
|
||||||
extern int quickoptions_tooltip_fade;
|
extern int quickoptions_tooltip_fade;
|
||||||
|
@ -77,6 +77,8 @@ static quick_option quickmenu[] =
|
|||||||
{"P", "Sand effect", QM_TOGGLE, &pretty_powder},
|
{"P", "Sand effect", QM_TOGGLE, &pretty_powder},
|
||||||
{"G", "Draw gravity grid", QM_TOGGLE, &drawgrav_enable},
|
{"G", "Draw gravity grid", QM_TOGGLE, &drawgrav_enable},
|
||||||
{"D", "Show decorations", QM_TOGGLE, &decorations_enable},
|
{"D", "Show decorations", QM_TOGGLE, &decorations_enable},
|
||||||
|
{"N", "Newtonian gravity", QM_TOGGLE, &ngrav_enable},
|
||||||
|
{"A", "Ambient heat", QM_TOGGLE, &aheat_enable},
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1314,7 +1314,9 @@ void draw_air(pixel *vid)
|
|||||||
clamp_flt(pv[y][x], 0.0f, 8.0f),//pressure adds green
|
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
|
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))
|
||||||
|
{
|
||||||
|
if (aheat_enable)
|
||||||
{
|
{
|
||||||
float ttemp = hv[y][x]+(-MIN_TEMP);
|
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);
|
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);
|
||||||
@ -1323,6 +1325,9 @@ void draw_air(pixel *vid)
|
|||||||
// clamp_flt(hv[y][x], 0.0f, 1600.0f),//heat adds green
|
// 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
|
// 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)
|
else if (display_mode & DISPLAY_AIRC)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -2621,6 +2621,14 @@ void quickoptions_menu(pixel *vid_buf, int b, int bq, int x, int y)
|
|||||||
quickoptions_tooltip_y = (i*16)+5;
|
quickoptions_tooltip_y = (i*16)+5;
|
||||||
if(b && !bq)
|
if(b && !bq)
|
||||||
{
|
{
|
||||||
|
if (!strcmp(quickmenu[i].name,"Newtonian gravity"))
|
||||||
|
{
|
||||||
|
if(!ngrav_enable)
|
||||||
|
start_grav_async();
|
||||||
|
else
|
||||||
|
stop_grav_async();
|
||||||
|
}
|
||||||
|
else
|
||||||
*(quickmenu[i].variable) = !(*(quickmenu[i].variable));
|
*(quickmenu[i].variable) = !(*(quickmenu[i].variable));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2886,6 +2894,11 @@ void set_cmode(int cm) // sets to given view mode
|
|||||||
{
|
{
|
||||||
colour_mode = COLOUR_HEAT;
|
colour_mode = COLOUR_HEAT;
|
||||||
strcpy(itc_msg, "Heat Display");
|
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)
|
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)
|
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)
|
if (x>=(XRES+BARSIZE-(510-494)) && x<=(XRES+BARSIZE-(510-509)) && !bq)
|
||||||
sys_pause = !sys_pause;
|
sys_pause = !sys_pause;
|
||||||
|
Loading…
Reference in New Issue
Block a user