|
|
@ -761,6 +761,7 @@ static void setup_hueshift(enum Squad squad)
|
|
|
|
hueshift_uniforms_t uniform = {
|
|
|
|
hueshift_uniforms_t uniform = {
|
|
|
|
.is_colorless = meta.is_colorless,
|
|
|
|
.is_colorless = meta.is_colorless,
|
|
|
|
.target_hue = (float)meta.hue,
|
|
|
|
.target_hue = (float)meta.hue,
|
|
|
|
|
|
|
|
.alpha = sgp_get_color().a,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
sgp_set_uniform(&uniform, sizeof(hueshift_uniforms_t));
|
|
|
|
sgp_set_uniform(&uniform, sizeof(hueshift_uniforms_t));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1142,6 +1143,7 @@ static void ui(bool draw, double dt, double width, double height)
|
|
|
|
|
|
|
|
|
|
|
|
pipeline_scope(hueshift_pipeline)
|
|
|
|
pipeline_scope(hueshift_pipeline)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
set_color(WHITE);
|
|
|
|
setup_hueshift(this_squad);
|
|
|
|
setup_hueshift(this_squad);
|
|
|
|
|
|
|
|
|
|
|
|
rotate_at(flag_rot[i], flag_pos[i].x, flag_pos[i].y);
|
|
|
|
rotate_at(flag_rot[i], flag_pos[i].x, flag_pos[i].y);
|
|
|
@ -1940,23 +1942,6 @@ static void frame(void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sgp_reset_image(0);
|
|
|
|
sgp_reset_image(0);
|
|
|
|
|
|
|
|
|
|
|
|
if (b->box_type == BoxMissileLauncher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
set_color(RED);
|
|
|
|
|
|
|
|
draw_circle(entity_pos(b), MISSILE_RANGE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// draw the charging missile
|
|
|
|
|
|
|
|
transform_scope
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
rotate_at(missile_launcher_target(&gs, b).facing_angle, entity_pos(b).x, entity_pos(b).y);
|
|
|
|
|
|
|
|
set_color_values(1.0, 1.0, 1.0, b->missile_construction_charge);
|
|
|
|
|
|
|
|
sgp_set_image(0, image_missile);
|
|
|
|
|
|
|
|
pipeline_scope(goodpixel_pipeline)
|
|
|
|
|
|
|
|
draw_texture_centered(entity_pos(b), BOX_SIZE);
|
|
|
|
|
|
|
|
sgp_reset_image(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (b->box_type == BoxScanner)
|
|
|
|
if (b->box_type == BoxScanner)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sgp_set_image(0, image_scanner_head);
|
|
|
|
sgp_set_image(0, image_scanner_head);
|
|
|
@ -2004,6 +1989,25 @@ static void frame(void)
|
|
|
|
draw_line(entity_pos(b).x, entity_pos(b).y, to.x, to.y);
|
|
|
|
draw_line(entity_pos(b).x, entity_pos(b).y, to.x, to.y);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (b->box_type == BoxMissileLauncher)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
set_color(RED);
|
|
|
|
|
|
|
|
draw_circle(entity_pos(b), MISSILE_RANGE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// draw the charging missile
|
|
|
|
|
|
|
|
transform_scope
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
rotate_at(missile_launcher_target(&gs, b).facing_angle, entity_pos(b).x, entity_pos(b).y);
|
|
|
|
|
|
|
|
sgp_set_image(0, image_missile);
|
|
|
|
|
|
|
|
pipeline_scope(hueshift_pipeline)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
set_color_values(1.0, 1.0, 1.0, b->missile_construction_charge);
|
|
|
|
|
|
|
|
setup_hueshift(b->owning_squad);
|
|
|
|
|
|
|
|
draw_texture_centered(entity_pos(b), BOX_SIZE);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sgp_reset_image(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -2024,9 +2028,14 @@ static void frame(void)
|
|
|
|
sgp_set_image(0, image_missile);
|
|
|
|
sgp_set_image(0, image_missile);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pipeline_scope(goodpixel_pipeline)
|
|
|
|
pipeline_scope(hueshift_pipeline)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
setup_hueshift(e->owning_squad);
|
|
|
|
draw_texture_rectangle_centered(entity_pos(e), MISSILE_SPRITE_SIZE);
|
|
|
|
draw_texture_rectangle_centered(entity_pos(e), MISSILE_SPRITE_SIZE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sgp_reset_image(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// draw player
|
|
|
|
// draw player
|
|
|
|