Logo Search packages:      
Sourcecode: rafkill version File versions  Download package


#ifndef _player_hull_h
#define _player_hull_h

#include "allegro.h"
#include "hull.h"
#define MAX_ROTATE 7

class WeaponObject;

class PlayerHull:public HullObject{
//inherited function
      PlayerHull( BITMAP ** _pics, int _max_pics, int _maxlife,int _maxshield,int _number_of_guns,int _hull_number,ECollide *eb);

      virtual void Draw( BITMAP * who, int x, int y ); 
      //virtual void Shadow( BITMAP * who, int x, int y ); 
      virtual BITMAP * getShadow();
      virtual double Damage( double much );
      virtual int maxGuns();
      virtual WeaponObject ** Guns();
      virtual void giveWeapon( WeaponObject * weap, int num );

      virtual void Moved( double _dx, double _dy, double _ax, double _ay );
      virtual void addSection( SpaceObject * who, Section * onscreen, int x, int y );
      virtual HullObject * copy();

      virtual const int getShield() const;
      virtual void setShields( int s );
      virtual void incShield( int q );
      int getMaxLife();
      int getMaxShield();
      virtual ~PlayerHull();

//new functions
      void frameRight();
      void frameLeft();
      void frameStable();

      virtual void showAttribute( BITMAP * who, int amount, int MAX, int start_x, int offset );
      // int max( int q );
      int rank();
      virtual WeaponObject ** Accessories();
      virtual void NextAccessory();
      double shield;

      int frame;
      int cloak;

      virtual void drawGun( BITMAP * who, int x, int y );
      HullObject * rotate[ MAX_ROTATE ];
      HullObject * rotate_damage[ MAX_ROTATE ];
      int MAX_SHIELD;
      int MAX_LIFE;
      int hull_num;     // records which player hull we are using
      int internal_damage; //set to MAX_INTERNAL_DAMAGE when struck to show rotate_damage
      int * shade_damage; //blended palette for rotate_damage

      int current_accessory;
      WeaponObject * accessory[ MAX_ACCESSORY ];
      WeaponObject ** true_guns;
      BITMAP ** pics;
      BITMAP ** pics_shadow;
      int animation_pic;
      int max_pics;


Generated by  Doxygen 1.6.0   Back to index