Back to index

freedink-data  1.08.20080920
Functions
S2-CA-G.c File Reference

Go to the source code of this file.

Functions

void main (void)
void attack (void)
void hit (void)
void talk (void)
void die (void)
void enter (void)

Function Documentation

void attack ( void  )

Definition at line 12 of file S2-CA-G.c.

{
playsound(36, 22050,0,&current_sprite, 0);
&mcounter = random(4000,0);
sp_attack_wait(&current_sprite, &mcounter);

}
void die ( void  )

Definition at line 162 of file S2-CA-G.c.

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

wait(500);
say("Killing guards is fun!",1);
}

Here is the call graph for this function:

void enter ( void  )

Definition at line 172 of file S2-CA-G.c.

{
 int &gate = sp(4);
 sp_seq(&gate, 68);
script_attach(1000);
wait(1000);
fade_down();
&player_map = 102;
sp_x(1, 314);
sp_y(1, 349);
load_screen(102);
draw_screen();
fade_up();
unfreeze(1);
kill_this_task();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void hit ( void  )

Definition at line 21 of file S2-CA-G.c.

{
if (&story > 15)
  {
 say("`2Nice, you win the game, then start killing guards?  Get 'em!", &current_sprite);
sp_timing(&current_sprite, 0);
sp_speed(&current_sprite, 3);
return;
  }

 say("`2The guy just hit me!  I am now going to kill him.", &current_sprite);
sp_timing(&current_sprite, 0);
sp_speed(&current_sprite, 3);
}

Here is the call graph for this function:

void main ( void  )

Definition at line 1 of file S2-CA-G.c.

{
int &jerry;
int &mcounter;
&jerry = 1;
sp_base_attack(&current_sprite, 720);
 sp_distance(&current_sprite, 60);
 sp_strength(&current_sprite, 50);
sp_hitpoints(&current_sprite, 100);
}
void talk ( void  )

Definition at line 36 of file S2-CA-G.c.

{
 freeze(1);
 freeze(&current_sprite);
         choice_start()
         "Ask about the history of the castle"
         "Ask about the history of the King"
         "Request an audience with King Daniel"
         "Leave"
         choice_end()

if (&result == 1)
  {
   Say_stop("Tell me about this grand castle, friendly Knight.", 1); 
wait(500);  
   Say_stop("`2Castle Goodheart has stood here for centuries.", &current_sprite);
wait(500);  
   Say_stop("`2It is a magnificent testament to what a monarchy can do.", &current_sprite);
wait(500);  
   Say_stop("That castle actually doesn't look that big.", 1); 
wait(500);  
   Say_stop("`2It's bigger from the inside.", &current_sprite);
wait(500);  
   Say_stop("Ah.", 1); 
  }

if (&result == 2)
  {
   Say_stop("Tell me about our good King.", 1); 
wait(500);  
   Say_stop("`2King Daniel has ruled with an iron hand for nearly a decade now.", &current_sprite);
wait(500);  
   Say_stop("`2It was his strategic brilliance that stopped the Great Goblin invasion of '23.", &current_sprite);
wait(500);  
   Say_stop("Did he kill them all?", 1); 
wait(500);  
   Say_stop("`2No.  After the war was won he created a special place for them to live in peace.", &current_sprite);
wait(500);  
   Say_stop("Wow, quite a guy.", 1); 

  }


if (&result == 3)
  {
   Say_stop("I must see the King at once.", 1); 
wait(500);  

if (&story < 9)
{
   Say_stop("`2And you are?", &current_sprite);
wait(500);  
   Say_stop("Dink Smallwood.", 1); 
wait(500);  

}
  if (&story < 8)
   {
   Say_stop("`2I've never heard of you.  Please, go back to your village and play hero there.", &current_sprite);
   }

  if (&story == 8)
   {
   Say_stop("`2Ah, the one that saved that little girl.  Nice work.", &current_sprite);
wait(500);  
   Say_stop("So you will grant me access?", 1); 
wait(500);  
   Say_stop("`2I'm sorry, the King is otherwise engaged today.", &current_sprite);
   }

  if (&story == 9)
   {
   Say_stop("`2Ah, the one that saved that little girl.  Nice work.", &current_sprite);
wait(500);  
   Say_stop("I have news about a Cast plot!", 1); 
wait(500);  
   Say_stop("`2I'm sorry, the King is otherwise engaged today.", &current_sprite);
   }


  if (&story == 10)
   {
   Say_stop("`2Hello, Smallwood.  Congratulations on foiling that attack in KernSin.", &current_sprite);
   wait(500);  
   Say_stop("It was no more than any other man would have done.", 1); 
   wait(500);  
   Say_stop("`2But alas, the King is visiting abroad.", &current_sprite); 
   wait(500);  
   Say_stop("Damn.", 1); 
   }

  if (&story == 11)
   {
   Say_stop("`2Hey, it's Sir Smallwood!", &current_sprite);
   wait(500);  
   Say_stop("So is the King home?", 1); 
   wait(500);  
   Say_stop("`2No - He's seeing Milder off before his journey to the Darklands.", &current_sprite); 
   wait(500);  
   Say_stop("Milder?", 1); 
   wait(500);  
   Say_stop("`2Yes, Flatstomp is the bravest man in the kingdom.", &current_sprite); 
   wait(500);  
   Say_stop("Grrrrrrr.", 1); 
   }



  if (&story > 11)
   {
   Say_stop("`2Hello, Smallwood.  Of course you may see the King!", &current_sprite);
   wait(500);  
   Say_stop("`2GUARD, OPEN THE GATE!", &current_sprite);
   enter();
   }


  }

   unfreeze(1);
   unfreeze(&current_sprite);
 

 }                                   

Here is the call graph for this function: