Back to index

freedink-data  1.08.20080920
Functions
FISH1.c File Reference

Go to the source code of this file.

Functions

void main (void)
void die (void)

Function Documentation

void die ( void  )

Definition at line 53 of file FISH1.c.

{


//let's give 'em a random amount of exp, what fun!

 int &rand = random(100, 50);
 add_exp(&rand, &current_sprite);

 sp_brain(&current_sprite, 0);

  int &hold = sp_editor_num(&current_sprite);
  if (&hold != 0)
  editor_type(&hold, 6); 


 sp_active(&current_sprite, 0);


}

Here is the call graph for this function:

void main ( void  )

Definition at line 3 of file FISH1.c.

  {
   //fish anim
   preload_seq(434);
   //splash anim
   preload_seq(433);
   sp_frame_delay(&current_sprite, 110);
   sp_hitpoints(&current_sprite, 25);
   //set to normal size
   sp_size(&current_sprite, 100);
   //give monster brain, but freeze
   sp_brain(&current_sprite, 9);
   freeze(&current_sprite);
  int &timer;

   int &splash;

  loop:

   //can't be hit or seen yet
   sp_nohit(&current_sprite, 1);
   sp_nodraw(&current_sprite, 1)

  //random wait
  &timer = random(6000,0);
  wait(&timer);
  playsound(35, 20000, 3000, &current_sprite, 0);
  //let's splash around
   sp_nohit(&current_sprite, 0);
   sp_nodraw(&current_sprite, 0)
   sp_seq(&current_sprite, 434);
   wait(700);

  //create splash sprite where fish is

  &save_x = sp_x(&current_sprite, -1);
  &save_y = sp_y(&current_sprite, -1);
  &save_y += 1;
  &save_x -= 30;

   &splash = create_sprite(&save_x, &save_y, 7, 0,0);
   sp_nohit(&splash, 1);
   sp_seq(&splash, 433);
   //playnoise

   goto loop;

  }

Here is the call graph for this function: