diff --git a/loaded/scanner_base.png b/loaded/scanner_base.png new file mode 100644 index 0000000..6100a95 Binary files /dev/null and b/loaded/scanner_base.png differ diff --git a/loaded/scanner_head.png b/loaded/scanner_head.png new file mode 100644 index 0000000..501f2a5 Binary files /dev/null and b/loaded/scanner_head.png differ diff --git a/main.c b/main.c index d7517a2..87da037 100644 --- a/main.c +++ b/main.c @@ -105,6 +105,7 @@ static sg_image image_squad_invite; static sg_image image_check; static sg_image image_no; static sg_image image_solarpanel_charging; +static sg_image image_scanner_head; static int cur_editing_boxtype = -1; static int cur_editing_rotation = 0; @@ -165,6 +166,11 @@ static struct BoxInfo .image_path = "loaded/explosive.png", .needs_tobe_unlocked = true, }, + { + .type = BoxScanner, + .image_path = "loaded/scanner_base.png", + .needs_tobe_unlocked = false, + }, }; #define ENTITIES_ITER(cur) \ for (Entity *cur = gs.entities; cur < gs.entities + gs.cur_next_entity; \ @@ -497,6 +503,7 @@ static void init(void) image_check = load_image("loaded/check.png"); image_no = load_image("loaded/no.png"); image_solarpanel_charging = load_image("loaded/solarpanel_charging.png"); + image_scanner_head = load_image("loaded/scanner_head.png"); } // socket initialization @@ -1616,10 +1623,16 @@ static void frame(void) sgp_set_color(0.2f, 0.2f, 0.2f, 1.0f); } pipeline_scope(goodpixel_pipeline) - { draw_texture_centered(entity_pos(b), BOX_SIZE); - } sgp_reset_image(0); + + if(b->box_type == BoxScanner) + { + sgp_set_image(0, image_scanner_head); + sgp_rotate_at((float)gs.time*3.0f, entity_pos(b).x, entity_pos(b).y); + pipeline_scope(goodpixel_pipeline) + draw_texture_centered(entity_pos(b), BOX_SIZE); + } sgp_set_color(0.5f, 0.1f, 0.1f, b->damage); draw_color_rect_centered(entity_pos(b), BOX_SIZE); diff --git a/types.h b/types.h index 80a5394..87e72b5 100644 --- a/types.h +++ b/types.h @@ -134,6 +134,7 @@ enum BoxType BoxMedbay, BoxSolarPanel, BoxExplosive, + BoxScanner, BoxLast, };