Back to index

freedink-data  1.08.20080920
BOX2-SP.c
Go to the documentation of this file.
00001 //script for box type 1 with nothing in it
00002 
00003 void main( void)
00004 {
00005 preload_seq(444);
00006 }
00007 
00008 void hit ( void )
00009  {
00010   //play noise
00011   playsound(37, 22050, 0,0,0);
00012   int &hold = sp_editor_num(&current_sprite);
00013 
00014   if (&hold != 0)
00015     {
00016      //this was placed by the editor, lets make the box stay flat
00017      editor_type(&hold, 3); 
00018      editor_seq(&hold, 444);
00019      editor_frame(&hold, 7);
00020      //type means show this seq/frame combo as background in the future
00021     }
00022   sp_seq(&current_sprite, 444);
00023   sp_brain(&current_sprite, 5);
00024   sp_notouch(&current_sprite, 1);
00025   sp_nohit(&current_sprite, 1);
00026 &save_x = sp_x(&current_sprite, -1);
00027 &save_y = sp_y(&current_sprite, -1);
00028 
00029   external("make", "spotion");
00030   sp_hard(&current_sprite, 1);
00031   //sprite ain't hard no more!  Let's redraw the hard map in one area
00032   draw_hard_sprite(&current_sprite);
00033   kill_this_task();
00034  }