Back to index

freedink-data  1.08.20080920
S1-H1-M.c
Go to the documentation of this file.
00001 
00002 void main(void)
00003 {
00004 int &whob = sp(26);
00005 sp_hitpoints(&current_sprite, 0);
00006 
00007 
00008  if (&story > 2)
00009  {
00010  sp_active(&whob,0);
00011 // draw_hard_map();
00012  return;
00013  }
00014 
00015  if (&old_womans_duck > 2)
00016  {
00017  if (&pig_story == 0)
00018  {
00019 move_stop(&current_sprite, 2, 160, 1);
00020 freeze(&current_sprite);
00021 wait(200);
00022 say_stop("`#Dink, it's getting late!  No food until you feed the pigs!", &current_sprite);
00023 wait(200);
00024 unfreeze(&current_sprite);
00025 return;
00026  }
00027  &story = 2;
00028  move_stop(1, 8, 370, 1);
00029 freeze(1);
00030 move_stop(&current_sprite, 2, 200, 1);
00031 freeze(&current_sprite);
00032 wait(1000);
00033  say_stop("`#Dink, can you do something for me?", &current_sprite);
00034  wait(500);
00035  say_stop("Yes, what is it?", 1);
00036  wait(500);
00037  say_stop("`#Can you go out to the woods and see if you can get,", &current_sprite);
00038  wait(500);
00039  say_stop("`#some AlkTree nuts, I think they're in season.", &current_sprite);
00040  wait(500);
00041  say_stop("No problem, I'll be right back.", 1);
00042  wait(250);
00043  say_stop("`#You're a dear.", &current_sprite);
00044  unfreeze(1);
00045  unfreeze(&current_sprite);
00046  return;
00047  }
00048 
00049 
00050 
00051  if (&story == 0)
00052  {
00053  //new game was just started.
00054  //make script live on
00055  int &cur_sprite = &current_sprite;
00056  playmidi("dance.mid");
00057  freeze(1);
00058  freeze(&cur_sprite);
00059  wait(1000);
00060  say_stop("`#Dink, would you go feed the pigs?", &cur_sprite);
00061  wait(200);
00062  say_stop("What, now?", 1);
00063  wait(200);
00064  say_stop("`#YES, NOW.", &cur_sprite);
00065  unfreeze(1);
00066  unfreeze(&cur_sprite);
00067  playsound(22, 22050, 0,0,0);
00068  &update_status = 1;
00069  draw_status();
00070  &story = 1;
00071  return;
00072  }
00073 
00074 }
00075 
00076 void talk(void)
00077 {
00078  freeze(1);
00079  freeze(&current_sprite);
00080  choice_start();
00081    "Ask about pig feeding"
00082    "Ask about your father" 
00083    "Get info about the village"
00084    "Get angry for no reason"
00085 (&pig_story == 1) "Tell her you fed the pigs"
00086    "Leave"
00087  choice_end();
00088 
00089  wait(200);
00090 
00091  if (&result == 1)
00092   {
00093   say_stop("Mother, how do I feed the pigs?  I forgot!",1);
00094   wait(200);
00095   say_stop("`#That's very amusing, Dink.  You get the sack of feed, and you", &current_sprite);
00096   say_stop("`#sprinkle it in the pig pen.  And don't tease them!", &current_sprite);
00097   wait(100);
00098   }
00099 
00100  if (&result == 2)
00101   {
00102   say_stop("What kind of a man was father?",1);
00103   wait(200);
00104   say_stop("`#He was a peasant like us.", &current_sprite);
00105   wait(200);
00106   say_stop("Was he good with the sword?",1);
00107   wait(200);
00108   say_stop("`#Of course not.  He was a wonderful farmer and husband.", &current_sprite);
00109 
00110   }
00111  if (&result == 3)
00112   {
00113   say_stop("Tell me about this village.",1);
00114   wait(200);
00115   say_stop("`#The villagers are very friendly.  Oh, Ethel wants to see you.", &current_sprite);
00116   wait(200);
00117   say_stop("Ethel?  She's old, isn't she?",1);
00118   wait(200);
00119   say_stop("`#Yes Dink, she is. <laugh>", &current_sprite);
00120   }
00121 
00122  if (&result == 4)
00123   {
00124   say_stop("I HATE YOU!",1);
00125   wait(200);
00126   say_stop("`#You'll get over it.",&current_sprite);
00127   }
00128 
00129  if (&result == 5)
00130   {
00131   say_stop("I'm finished with my chores, mother.",1);
00132   wait(200);
00133   say_stop("`#Good boy.  Go visit our neighbors while I prepare dinner.", &current_sprite);
00134   }
00135 
00136 
00137  unfreeze(1);
00138  unfreeze(&current_sprite);
00139 
00140   }
00141 
00142 }
00143 
00144 void hit(void)
00145 {
00146  say_stop("`#Ouch!  Stop it!", &current_sprite);
00147 
00148 }
00149