Add cosmetic scanner block

main
Cameron Murphy Reikes 2 years ago
parent 1bd53ab62a
commit f48a609ac8

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

@ -105,6 +105,7 @@ static sg_image image_squad_invite;
static sg_image image_check; static sg_image image_check;
static sg_image image_no; static sg_image image_no;
static sg_image image_solarpanel_charging; static sg_image image_solarpanel_charging;
static sg_image image_scanner_head;
static int cur_editing_boxtype = -1; static int cur_editing_boxtype = -1;
static int cur_editing_rotation = 0; static int cur_editing_rotation = 0;
@ -165,6 +166,11 @@ static struct BoxInfo
.image_path = "loaded/explosive.png", .image_path = "loaded/explosive.png",
.needs_tobe_unlocked = true, .needs_tobe_unlocked = true,
}, },
{
.type = BoxScanner,
.image_path = "loaded/scanner_base.png",
.needs_tobe_unlocked = false,
},
}; };
#define ENTITIES_ITER(cur) \ #define ENTITIES_ITER(cur) \
for (Entity *cur = gs.entities; cur < gs.entities + gs.cur_next_entity; \ 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_check = load_image("loaded/check.png");
image_no = load_image("loaded/no.png"); image_no = load_image("loaded/no.png");
image_solarpanel_charging = load_image("loaded/solarpanel_charging.png"); image_solarpanel_charging = load_image("loaded/solarpanel_charging.png");
image_scanner_head = load_image("loaded/scanner_head.png");
} }
// socket initialization // socket initialization
@ -1616,11 +1623,17 @@ static void frame(void)
sgp_set_color(0.2f, 0.2f, 0.2f, 1.0f); sgp_set_color(0.2f, 0.2f, 0.2f, 1.0f);
} }
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);
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); 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);
} }

@ -134,6 +134,7 @@ enum BoxType
BoxMedbay, BoxMedbay,
BoxSolarPanel, BoxSolarPanel,
BoxExplosive, BoxExplosive,
BoxScanner,
BoxLast, BoxLast,
}; };

Loading…
Cancel
Save