//renders the loading screen
//won't work if loadmass is higher than loadwidth. if that's the case, use alternate route (commented out)
if done=false {
draw_set_alpha(1) //prep
c_col = draw_merge_color(c_black,loadwidth-load,c_aqua,load)
//c_col = draw_merge_color(c_blue,loadmass-load,c_aqua,load)
c_bak = draw_merge_color(c_red,loadwidth-load,c_black,load)
//c_bak = draw_merge_color(c_red,loadmass-load,c_maroon,load)
draw_sprite_stretched_ext(spr_bar,-1,hw-(loadwidth/2)+1,hh-2,loadwidth+2,6,c_bak,true) //bak
draw_sprite_stretched_ext(spr_bar,-1,hw-(loadwidth/2)+1,hh-2,load,6,c_col,true) //bar
//draw_sprite_stretched_ext(spr_bar,-1,hw-(loadwidth/2)+1,hh-2,(loadwidth*load)/loadmass,6,c_col,true)
draw_sprite_ext(spr_end,-1,hw-(loadwidth/2)-1,hh-2,1,1,0,c_col,1)
draw_sprite_ext(spr_end,-1,hw+(loadwidth/2)+3,hh-2,-1,1,0,c_bak,1)
draw_set_color(c_white) //border
draw_sprite_ext(spr_casing,-1,hw-(loadwidth/2)-1,hh-3,1,1,0,c_white,1)
draw_sprite_ext(spr_casing,-1,hw+(loadwidth/2)+3,hh-3,-1,1,0,c_white,1)
draw_line(3+hw-(loadwidth/2),hh-3,hw+(loadwidth/2),hh-3)
draw_line(3+hw-(loadwidth/2),hh+3,hw+(loadwidth/2),hh+3)
draw_set_font(fnt_Load) //other
draw_set_halign(fa_center)
draw_text(hw,hh-24,"Initializing "+ltext+"")
draw_line(hw-(loadwidth/2)+load,hh-7,hw-(loadwidth/2)+load,hh+7)
} else {
}