Back to index

freedink-data  1.08.20080920
S1-ROC.c
Go to the documentation of this file.
00001 void main( void )
00002 {
00003  sp_speed(&current_sprite, 1);
00004  int &mydir;
00005  if(&rock_placement == 1)
00006  {
00007   sp_x(&current_sprite, 350);
00008   draw_hard_map();
00009  }
00010 }
00011 
00012 void talk( void )
00013 {
00014  say_stop("Hey, looks like there's an opening behind this rock.", 1);
00015 }
00016 
00017 void push( void )
00018 {
00019 
00020  if (&strength < 4)
00021  {
00022   say_stop("It's too heavy for me.  If I was a little stronger...", 1);
00023   return;
00024  }
00025 
00026    &mydir = sp_dir(1, -1);
00027 
00028    if (&rock_placement == 0)
00029    {
00030    //rock is over hole
00031 
00032    if (&mydir == 6)
00033      {
00034       say("It's .. it's moving...", 1);
00035       freeze(1);
00036       move_stop(&current_sprite, 6, 350, 1);
00037       unfreeze(1);
00038       draw_hard_map();
00039       &rock_placement = 1;
00040       return;
00041       }
00042    }
00043 
00044    if (&rock_placement == 1)
00045    {
00046     //rock has already been pushed, can we push it back?
00047 
00048    if (&mydir == 4)
00049     {
00050       say("..heavy..heavy..", 1);
00051       freeze(1);
00052       move_stop(&current_sprite, 4, 285, 1);
00053       unfreeze(1);
00054       draw_hard_map();
00055       &rock_placement = 0;
00056       return;
00057      }
00058    }
00059 
00060       say("It won't budge from this angle.", 1);
00061 
00062 }