- // Draw the heated part of the rock, in an alpha which reflects the
- // amount of heat in the rock.
- if(rock[i].heat>0) {
- SDL_Surface *deadrock;
- deadrock = surf_deadrock[rock[i].type_number];
- SDL_SetAlpha(deadrock,SDL_SRCALPHA,rock[i].heat*255/rock[i].image->h);
- dest.x = (int) rock[i].x; // kludge
- SDL_BlitSurface(deadrock,&src,surf_screen,&dest);
- if(rnd()<0.3) {
- rock[i].heat -= movementrate;
- }
- }
-
- // If the rock is heated past a certain point, the water content of
- // the rock flashes to steam, releasing enough energy to destroy
- // the rock in spectacular fashion.
- if(rock[i].heat>rock[i].image->h) {
- rock[i].active = 0;
- play_sound(1 + (int)(rnd()*3));
- makebangdots(rock[i].x,rock[i].y,rock[i].xvel,rock[i].yvel,rock[i].image,10);
- }
-