mirror of
https://github.com/libretro/RetroArch
synced 2025-03-17 19:21:09 +00:00
[stripes] Remove useless ribbon stuff
This commit is contained in:
parent
34966e2ffc
commit
3f32a7f1b7
@ -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;
|
||||
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user