kill_ship(Sprite *ship)
{
ship->flags = MOVE;
- // ship->flags = MOVE|DRAW; // FADE SHIP
- // SDL_SetAlpha(ship->image, SDL_SRCALPHA, 0); // FADE SHIP
bang = true;
}
}
} else {
if(state == DEAD_PAUSE) {
- float blast_radius;
- // float alpha; // FADE SHIP
- if(state_timeout >= DEAD_PAUSE_LENGTH - 20.0) {
- blast_radius = BLAST_RADIUS * (DEAD_PAUSE_LENGTH - state_timeout) / 20.0;
- blast_rocks(bangx, bangy, blast_radius);
- }
-
if(bangx < 60) bangx = 60;
-
- // FADE SHIP
- // alpha = 255.0 * (DEAD_PAUSE_LENGTH - state_timeout) / DEAD_PAUSE_LENGTH;
- // SDL_SetAlpha(ship.image, SDL_SRCALPHA, (uint8_t)alpha);
}
}
ship.dx = screendx; ship.dy = screendy;
ship.lives = 4;
ship.flags = MOVE|DRAW|COLLIDE;
- // SDL_SetAlpha(ship.image, SDL_SRCALPHA, SDL_ALPHA_OPAQUE); // FADE SHIP
add_sprite(SPRITE(&ship));
score = 0;