Remove gfx_display_snow

This commit is contained in:
twinaphex 2020-09-30 15:57:21 +02:00
parent 7e597c3fd0
commit 0642ea6d5d
2 changed files with 0 additions and 79 deletions

View File

@ -1291,80 +1291,6 @@ void gfx_display_push_quad(
video_coord_array_append(p_dispca, &coords, 3);
}
void gfx_display_snow(
int16_t pointer_x,
int16_t pointer_y,
int width, int height)
{
struct display_particle
{
float x, y;
float xspeed, yspeed;
float alpha;
bool alive;
};
static struct display_particle particles[PARTICLES_COUNT] = {{0}};
static int timeout = 0;
unsigned i, max_gen = 2;
for (i = 0; i < PARTICLES_COUNT; ++i)
{
struct display_particle *p = (struct display_particle*)&particles[i];
if (p->alive)
{
p->y += p->yspeed;
p->x += gfx_display_scalef(
pointer_x, 0, width, -0.3, 0.3);
p->x += p->xspeed;
p->alive = p->y >= 0 && p->y < height
&& p->x >= 0 && p->x < width;
}
else if (max_gen > 0 && timeout <= 0)
{
p->xspeed = gfx_display_randf(-0.2, 0.2);
p->yspeed = gfx_display_randf(1, 2);
p->y = 0;
p->x = rand() % width;
p->alpha = (float)rand() / (float)RAND_MAX;
p->alive = true;
max_gen--;
}
}
if (max_gen == 0)
timeout = 3;
else
timeout--;
for (i = 0; i < PARTICLES_COUNT; ++i)
{
unsigned j;
float alpha, colors[16];
struct display_particle *p = &particles[i];
if (!p->alive)
continue;
alpha = gfx_display_randf(0, 100) > 90 ?
p->alpha/2 : p->alpha;
for (j = 0; j < 16; j++)
{
colors[j] = 1;
if (j == 3 || j == 7 || j == 11 || j == 15)
colors[j] = alpha;
}
gfx_display_push_quad(width, height,
colors, p->x-2, p->y-2, p->x+2, p->y+2);
j++;
}
}
/* Setup: Initializes the font associated
* to the menu driver */
font_data_t *gfx_display_font(

View File

@ -226,11 +226,6 @@ void gfx_display_push_quad(
const float *colors, int x1, int y1,
int x2, int y2);
void gfx_display_snow(
int16_t pointer_x,
int16_t pointer_y,
int width, int height);
void gfx_display_draw_cursor(
void *userdata,
unsigned video_width,