Back to index

freedink-data  1.08.20080920
Functions | Variables
S4-HEALP.c File Reference

Go to the source code of this file.

Functions

void main (void)
void buybottle (void)
void hit (void)
void talk (void)
 choice_start ()

Variables

startchoice __pad1__
amount = &life
goto mainloop
 return

Function Documentation

Definition at line 40 of file S4-HEALP.c.

{
int &junk = free_items();


if (&junk < 1)
 {
         choice_start()
        set_y 240
        title_start();
You are carrying too much.
        title_end();
         "Ok"
         choice_end()
 return;
 }


if (&gold < 100)
 {
         choice_start()
        set_y 240
        title_start();
You don't have enough gold to buy elixer.
        title_end();
         "Ok"
         choice_end()
 return;
 }

&gold -= 100;
add_item("item-eli",438, 9);

}

Here is the call graph for this function:

Definition at line 118 of file S4-HEALP.c.

  {
   if (&gold < &amount)
   {
         choice_start()
        set_y 240
        title_start();
You don't have enough gold.
        title_end();
         "Ok"
         choice_end()
   goto startchoice;    
   }
&life = &lifemax;
&gold -= &amount;
Playsound(22,22050,0,0,0);
say("I am healed.", 1);
 unfreeze(1);
 goto mainloop;
  }
void hit ( void  )

Definition at line 76 of file S4-HEALP.c.

{
sp_speed(&current_sprite, 0);
wait(400);
say_stop("`%Please don't wreck the place, thanks.", &temphold);
wait(800);
goto mainloop;
}
void main ( void  )

Definition at line 3 of file S4-HEALP.c.

{

 int &crap = create_sprite(185,150, 0, 0, 0);
 &temphold = &crap;
 int &amount = 0;

preload_seq(251);
preload_seq(253);
int &myrand;
sp_brain(&temphold, 0);
sp_base_walk(&temphold, 250);
sp_speed(&temphold, 0);

//set starting pic

sp_pseq(&temphold, 253);
sp_pframe(&temphold, 1);

mainloop:
wait(500);
&myrand = random(8, 1);

  if (&myrand == 1)
  {
  sp_pseq(&temphold, 253);
  }

  if (&myrand == 2)
  {
  sp_pseq(&temphold, 251);
  }

&myrand = random(20, 1);
goto mainloop;
}

Here is the call graph for this function:

void talk ( void  )

Definition at line 85 of file S4-HEALP.c.

{

 freeze(1);
startok:

if (&life >= &lifemax)
{
 choice_start();
        set_y 240
        set_title_color 15
        title_start();
"You are the perfect picture of health, sir."
        title_end();
         "Buy a bottle of elixer for $100"
         "Leave"
 choice_end();

  if (&result == 1)
  {
  buybottle();
  }
   unfreeze(1);
   goto mainloop;
   return;
}


}

Variable Documentation

startchoice __pad1__

Definition at line 115 of file S4-HEALP.c.

& amount = &life

Definition at line 116 of file S4-HEALP.c.

goto mainloop

Definition at line 150 of file S4-HEALP.c.

Definition at line 157 of file S4-HEALP.c.