Skip to content

Commit

Permalink
[stripes] Remove useless ribbon stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kivutar committed Apr 8, 2018
1 parent 34966e2 commit 3f32a7f
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions menu/drivers/stripes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3332,49 +3332,6 @@ static void stripes_layout(stripes_handle_t *stripes)
}
}

static void stripes_ribbon_set_vertex(float *ribbon_verts,
unsigned idx, unsigned row, unsigned col)
{
ribbon_verts[idx++] = ((float)col) / (STRIPES_RIBBON_COLS-1) * 2.0f - 1.0f;
ribbon_verts[idx++] = ((float)row) / (STRIPES_RIBBON_ROWS-1) * 2.0f - 1.0f;
}

static void stripes_init_ribbon(stripes_handle_t * stripes)
{
video_coords_t coords;
unsigned r, c, col;
unsigned i = 0;
video_coord_array_t *ca = menu_display_get_coords_array();
unsigned vertices_total = STRIPES_RIBBON_VERTICES;
float *dummy = (float*)calloc(4 * vertices_total, sizeof(float));
float *ribbon_verts = (float*)calloc(2 * vertices_total, sizeof(float));

/* Set up vertices */
for (r = 0; r < STRIPES_RIBBON_ROWS - 1; r++)
{
for (c = 0; c < STRIPES_RIBBON_COLS; c++)
{
col = r % 2 ? STRIPES_RIBBON_COLS - c - 1 : c;
stripes_ribbon_set_vertex(ribbon_verts, i, r, col);
stripes_ribbon_set_vertex(ribbon_verts, i + 2, r + 1, col);
i += 4;
}
}

coords.color = dummy;
coords.vertex = ribbon_verts;
coords.tex_coord = dummy;
coords.lut_tex_coord = dummy;
coords.vertices = vertices_total;

video_coord_array_append(ca, &coords, coords.vertices);

free(dummy);
free(ribbon_verts);
}



static void *stripes_init(void **userdata, bool video_is_threaded)
{
unsigned width, height;
Expand Down Expand Up @@ -3483,8 +3440,6 @@ static void *stripes_init(void **userdata, bool video_is_threaded)
if (stripes->horizontal_list)
stripes_init_horizontal_list(stripes);

stripes_init_ribbon(stripes);

return menu;

error:
Expand Down

0 comments on commit 3f32a7f

Please sign in to comment.