summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-06-09 22:22:23 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-06-09 22:22:23 (GMT)
commit33b3355192c7289d1a4c8eae586c48b16de3d3ef (patch)
tree9e205c89fc9e9a8de0d051fbbcb4086d11511874 /src/interface.c
parent1f7106acb16962f925dfccc67dafc39f3bcfd877 (diff)
downloadpowder-33b3355192c7289d1a4c8eae586c48b16de3d3ef.zip
powder-33b3355192c7289d1a4c8eae586c48b16de3d3ef.tar.gz
A-Heat toggle for Simulation options
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c48
1 files changed, 31 insertions, 17 deletions
diff --git a/src/interface.c b/src/interface.c
index 82749a6..b26fbae 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -5082,33 +5082,39 @@ unsigned int decorations_ui(pixel *vid_buf,int *bsx,int *bsy, unsigned int saved
void simulation_ui(pixel * vid_buf)
{
int xsize = 300;
- int ysize = 140;
+ int ysize = 164;
int x0=(XRES-xsize)/2,y0=(YRES-MENUSIZE-ysize)/2,b=1,bq,mx,my;
int new_scale, new_kiosk;
ui_checkbox cb;
ui_checkbox cb2;
ui_checkbox cb3;
ui_checkbox cb4;
+ ui_checkbox cb5;
- cb.x = x0+xsize-16;
+ cb.x = x0+xsize-16; //Heat simulation
cb.y = y0+23;
cb.focus = 0;
cb.checked = !legacy_enable;
- cb2.x = x0+xsize-16;
- cb2.y = y0+51;
+ cb2.x = x0+xsize-16; //Newt. Gravity
+ cb2.y = y0+79;
cb2.focus = 0;
cb2.checked = ngrav_enable;
- cb3.x = x0+xsize-16;
- cb3.y = y0+77;
+ cb3.x = x0+xsize-16; //Large window
+ cb3.y = y0+113;
cb3.focus = 0;
cb3.checked = (sdl_scale==2)?1:0;
- cb4.x = x0+xsize-16;
- cb4.y = y0+103;
+ cb4.x = x0+xsize-16; //Fullscreen
+ cb4.y = y0+129;
cb4.focus = 0;
cb4.checked = (kiosk_enable==1)?1:0;
+
+ cb5.x = x0+xsize-16; //Ambient heat
+ cb5.y = y0+51;
+ cb5.focus = 0;
+ cb5.checked = aheat_enable;
while (!sdl_poll())
{
@@ -5130,18 +5136,23 @@ void simulation_ui(pixel * vid_buf)
drawtext(vid_buf, x0+8, y0+26, "Heat simulation", 255, 255, 255, 255);
drawtext(vid_buf, x0+12+textwidth("Heat simulation"), y0+26, "Introduced in version 34.", 255, 255, 255, 180);
- drawtext(vid_buf, x0+12, y0+40, "Older saves may behave oddly with this enabled.", 255, 255, 255, 180);
+ drawtext(vid_buf, x0+12, y0+40, "Older saves may behave oddly with this enabled.", 255, 255, 255, 120);
+
+ drawtext(vid_buf, x0+8, y0+54, "Ambient heat simulation", 255, 255, 255, 255);
+ drawtext(vid_buf, x0+12+textwidth("Ambient heat simulation"), y0+54, "Introduced in version 50.", 255, 255, 255, 180);
+ drawtext(vid_buf, x0+12, y0+68, "Older saves may behave oddly with this enabled.", 255, 255, 255, 120);
- drawtext(vid_buf, x0+8, y0+54, "Newtonian gravity", 255, 255, 255, 255);
- drawtext(vid_buf, x0+12+textwidth("Newtonian gravity"), y0+54, "Introduced in version 48.", 255, 255, 255, 180);
- drawtext(vid_buf, x0+12, y0+68, "May also cause slow performance on older computers", 255, 255, 255, 180);
+ drawtext(vid_buf, x0+8, y0+82, "Newtonian gravity", 255, 255, 255, 255);
+ drawtext(vid_buf, x0+12+textwidth("Newtonian gravity"), y0+82, "Introduced in version 48.", 255, 255, 255, 180);
+ drawtext(vid_buf, x0+12, y0+96, "May also cause slow performance on older computers", 255, 255, 255, 120);
+
+ draw_line(vid_buf, x0, y0+110, x0+xsize, y0+110, 150, 150, 150, XRES+BARSIZE);
- drawtext(vid_buf, x0+8, y0+80, "Large window", 255, 255, 255, 255);
- drawtext(vid_buf, x0+12+textwidth("Large window"), y0+80, "Double window size for small screens", 255, 255, 255, 180);
- //drawtext(vid_buf, x0+12, y0+68, "May also cause slow performance on older computers", 255, 255, 255, 180);
+ drawtext(vid_buf, x0+8, y0+116, "Large window", 255, 255, 255, 255);
+ drawtext(vid_buf, x0+12+textwidth("Large window"), y0+116, "Double window size for small screens", 255, 255, 255, 180);
- drawtext(vid_buf, x0+8, y0+106, "Fullscreen", 255, 255, 255, 255);
- drawtext(vid_buf, x0+12+textwidth("Fullscreen"), y0+106, "Fill the entire screen", 255, 255, 255, 180);
+ drawtext(vid_buf, x0+8, y0+132, "Fullscreen", 255, 255, 255, 255);
+ drawtext(vid_buf, x0+12+textwidth("Fullscreen"), y0+132, "Fill the entire screen", 255, 255, 255, 180);
//TODO: Options for Air and Normal gravity
//Maybe save/load defaults too.
@@ -5153,11 +5164,13 @@ void simulation_ui(pixel * vid_buf)
ui_checkbox_draw(vid_buf, &cb2);
ui_checkbox_draw(vid_buf, &cb3);
ui_checkbox_draw(vid_buf, &cb4);
+ ui_checkbox_draw(vid_buf, &cb5);
sdl_blit(0, 0, (XRES+BARSIZE), YRES+MENUSIZE, vid_buf, (XRES+BARSIZE));
ui_checkbox_process(mx, my, b, bq, &cb);
ui_checkbox_process(mx, my, b, bq, &cb2);
ui_checkbox_process(mx, my, b, bq, &cb3);
ui_checkbox_process(mx, my, b, bq, &cb4);
+ ui_checkbox_process(mx, my, b, bq, &cb5);
if (b && !bq && mx>=x0 && mx<x0+xsize && my>=y0+ysize-16 && my<=y0+ysize)
break;
@@ -5169,6 +5182,7 @@ void simulation_ui(pixel * vid_buf)
}
legacy_enable = !cb.checked;
+ aheat_enable = cb5.checked;
new_scale = (cb3.checked)?2:1;
new_kiosk = (cb4.checked)?1:0;
if(new_scale!=sdl_scale || new_kiosk!=kiosk_enable)