|
|
@ -671,6 +671,8 @@ static void ui(bool draw, float dt, float width, float height)
|
|
|
|
static bool picking_new_boxtype = false;
|
|
|
|
static bool picking_new_boxtype = false;
|
|
|
|
static float pick_opacity = 0.0f;
|
|
|
|
static float pick_opacity = 0.0f;
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if(keypressed[SAPP_KEYCODE_ESCAPE].pressed)
|
|
|
|
|
|
|
|
picking_new_boxtype = false;
|
|
|
|
AABB pick_modal = (AABB){
|
|
|
|
AABB pick_modal = (AABB){
|
|
|
|
.x = width * 0.25f,
|
|
|
|
.x = width * 0.25f,
|
|
|
|
.y = height * 0.25f,
|
|
|
|
.y = height * 0.25f,
|
|
|
@ -1759,9 +1761,7 @@ static void frame(void)
|
|
|
|
sgp_set_image(0, image_solarpanel_charging);
|
|
|
|
sgp_set_image(0, image_solarpanel_charging);
|
|
|
|
sgp_set_color(1.0f, 1.0f, 1.0f, b->sun_amount);
|
|
|
|
sgp_set_color(1.0f, 1.0f, 1.0f, b->sun_amount);
|
|
|
|
pipeline_scope(goodpixel_pipeline)
|
|
|
|
pipeline_scope(goodpixel_pipeline)
|
|
|
|
{
|
|
|
|
|
|
|
|
draw_texture_centered(entity_pos(b), BOX_SIZE);
|
|
|
|
draw_texture_centered(entity_pos(b), BOX_SIZE);
|
|
|
|
}
|
|
|
|
|
|
|
|
sgp_reset_image(0);
|
|
|
|
sgp_reset_image(0);
|
|
|
|
sgp_set_color(1.0f, 1.0f, 1.0f, 1.0f - b->sun_amount);
|
|
|
|
sgp_set_color(1.0f, 1.0f, 1.0f, 1.0f - b->sun_amount);
|
|
|
|
/* Color to_set = colhexcode(0xeb9834);
|
|
|
|
/* Color to_set = colhexcode(0xeb9834);
|
|
|
@ -1787,12 +1787,22 @@ static void frame(void)
|
|
|
|
if (b->box_type == BoxScanner)
|
|
|
|
if (b->box_type == BoxScanner)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sgp_set_image(0, image_scanner_head);
|
|
|
|
sgp_set_image(0, image_scanner_head);
|
|
|
|
sgp_rotate_at(b->scanner_head_rotate, entity_pos(b).x, entity_pos(b).y);
|
|
|
|
transform_scope
|
|
|
|
pipeline_scope(goodpixel_pipeline)
|
|
|
|
{
|
|
|
|
draw_texture_centered(entity_pos(b), BOX_SIZE);
|
|
|
|
sgp_rotate_at(b->scanner_head_rotate, entity_pos(b).x, entity_pos(b).y);
|
|
|
|
|
|
|
|
pipeline_scope(goodpixel_pipeline)
|
|
|
|
|
|
|
|
draw_texture_centered(entity_pos(b), BOX_SIZE);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sgp_reset_image(0);
|
|
|
|
set_color(WHITE);
|
|
|
|
set_color(WHITE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(b->box_type == BoxScanner)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
set_color(BLUE);
|
|
|
|
|
|
|
|
draw_circle(entity_pos(b), SCANNER_RADIUS);
|
|
|
|
|
|
|
|
set_color(WHITE);
|
|
|
|
|
|
|
|
}
|
|
|
|
sgp_set_color(0.5f, 0.1f, 0.1f, b->damage);
|
|
|
|
sgp_set_color(0.5f, 0.1f, 0.1f, b->damage);
|
|
|
|
draw_color_rect_centered(entity_pos(b), BOX_SIZE);
|
|
|
|
draw_color_rect_centered(entity_pos(b), BOX_SIZE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|