Back to index

freedink-data  1.08.20080920
S4-ROCK.c
Go to the documentation of this file.
00001 void hit( void )
00002 {
00003 int &rcrap = compare_sprite_script(&missle_source, "dam-bomn");
00004 if (&rcrap == 1)
00005   {
00006   //rock just got hit by a sprite with a script named dam-bomn, I'm gonna
00007   //guess it was the bomb.
00008 
00009   //remove rocks hardness and sprite
00010   sp_hard(&current_sprite, 1);
00011   draw_hard_map(&current_sprite);
00012   sp_active(&current_sprite, 0);
00013 
00014   //remove the cracks as well, as they would look silly now
00015 
00016   &rcrap = sp(16);
00017   sp_active(&rcrap, 0);
00018   &rcrap = sp(26);
00019   sp_active(&rcrap, 0);
00020 
00021   //play 'found something special' sound
00022 
00023   playsound(43, 22050, 0,0,0);
00024   &s4-duck = 1;
00025   }
00026 
00027 }
00028 
00029