//---------------------------------------------------//
/*
 *Copyright Bryce Thorup, William Thorup, BitJag 2014
 *
 * Contact: contact@bitjag.com
 *
 *All content developed by BitJag (graphics & Code) is
 *for your personal use only.  Feel free to burn it to a CD, 
 *flash to a SkunkBoard, or use in an emulator.  We 
 *hope you also take the chance to learn from it if needed.
 * 
 *Do not redistribute, duplicate, charge for "handling" 
 *or cost to print, or charge for profit.
 * 
 *If there is someone you know who wants a copy,
 *physical or digital, please direct them to our website.
 *Any other questions about the use of the demo, please
 *shoot us an email.  We will be liberal, promise.
 *
 * http://bitjag.com/
 * 
 *This demo was developed with the Removers Library,
 *which is used under the LGPL licence 2.1, included
 *with the source.  The Removers library is free to 
 *download and use at this location.
 * 
 * http://removers.free.fr/softs/download.php?lang=en
 *
//---------------------------------------------------*/
 
#ifndef _BIRD_MOVEMENT_H
#define _BIRD_MOVEMENT_H

#include <stddef.h>
#include <jagdefs.h>
#include <op.h>
#include <display.h>

//Structure for bird movement
 //Structures===================
  //Motion Structure
  typedef struct {
    
   int delay; //Used to controll how long the bird goes up and down - Used in sudo gravity math
    
   int durration;  //Used in sudo gravity math
    
   int controller_delay; //Used to make sure when the user holds a button down, it sends an action only so often
    
   int controller_lock; //Used to lock the controller until the user releases the button
    
   int up_or_down; //Used to tell the program if the bird should be rising or falling
    
   int height; //How high do we want the bird to rise
   
   int begin; //Feeder variable to determine the location for each time the bird moves into the sudo gravity code
    
  }bird_fly; //standard name of the struct to use for every instance of this structure
  
  //=============================
  
  
  //Function Prototypes
  
  //Motion Initailizer - Used to initialize initial varibles for as many motion structures that you want
  
  bird_fly *bird_fly_init(
    
  );
	
  //the "move_me" Motion Function

  int birdy_move(
    
    sprite *bird,  //Insert the name of the sprite to apply motion to
    
    bird_fly *bird_move, //The structure for the specific sprite we wish to move
    
    int flap //controller input to flap up
  
    
);
	 
  //Reset the postion of a bird back to start. (CURRENTLY NOT IN USE)
	 
  int reset_bird_pos(
    
  );
	 
#endif
	 
	 