static void snowThink (SnowScreen *ss, SnowFlake *sf) { int boxing; boxing = firefliesGetScreenBoxing (ss->s->display); sf->age += 0.01; sf->lifecycle = (sf->age / 10) / sf->lifespan * (firefliesGetSnowSpeed(ss->s->display) / 10); int glowStage = (sf->lifecycle * GLOW_STAGES); sf->glowAlpha = bezierCurve(glowCurve[glowStage], sf->lifecycle); //if (sf->glowAlpha > 1.0) // sf->glowAlpha = 1.0; if ( sf->y <= -boxing || sf->y >= ss->s->height + boxing || sf->x <= -boxing || sf->x >= ss->s->width + boxing || sf->z <= -((float) firefliesGetScreenDepth (ss->s->display)) || sf->z >= 1 || sf->age > sf->lifespan) { initiateSnowFlake(ss,sf); } snowMove(ss->s->display, sf); }
static void snowThink (SnowScreen *ss, SnowFlake *sf) { int boxing; const BananaValue * option_screen_boxing = bananaGetOption (bananaIndex, "screen_boxing", -1); const BananaValue * option_screen_depth = bananaGetOption (bananaIndex, "screen_depth", -1); boxing = option_screen_boxing->i; if (sf->y >= ss->s->height + boxing || sf->x <= -boxing || sf->y >= ss->s->width + boxing || sf->z <= -((float) option_screen_depth->i / 500.0) || sf->z >= 1) { initiateSnowFlake (ss, sf); } snowMove (sf); }
static void snowThink (SnowScreen *ss, SnowFlake *sf) { int boxing; boxing = starGetScreenBoxing (ss->s->display); if (sf->y >= ss->s->height + boxing || sf->x <= -boxing || sf->y >= ss->s->width + boxing || sf->z <= -((float) starGetScreenDepth (ss->s->display) / 500.0) || sf->z >= 1) { initiateSnowFlake (ss, sf); } snowMove (ss->s->display, sf); }