#ifndef PLAYER_H
#define PLAYER_H

class PLAYER
{
public:
 int active;
 fix x,y,xn,yn;
 fix ang;

 int shot[max_upgr];
 int hp;

 int shoot_time[max_upgr];
 int spr_size;

 int upgr;

 int score,lives,num;

 BITMAP *image;
 int imgw,imgh;
 BITMAP *back;
 int backw,backh;

 PLAYER() {}
 ~PLAYER() {}
 void init();
 void deinit();
 void respawn();
 void die();

 void accel(fix);
 void turn(fix);
 void update();
 void shoot();

private:
};

// types
#define OBJTYPE_ASTEROID   1
#define OBJTYPE_BONUS      2

// subtypes
#define ASTEROID_ROCKY     0
#define ASTEROID_METAL     1
#define ASTEROID_GOLD      2

#define BONUS_29           0
#define BONUS_UPGRADE      1

struct OBJECT  //asteroids, powerups, etc.
{
 fix x,y,xn,yn;
 fix ang,dir;

 int active;

 int spr_size;
 int size,type,subtype;
 int hp;

 BITMAP *image;
 int imgw,imgh;
 BITMAP *back;
 int backw,backh;
};

struct BULLET
{
 fix x,y,xn,yn;
 fix ang;

 int active;
 int owner;

 int spr_size;
 int type,time,deathtime;
 int power;

 BITMAP *image;
 int imgw,imgh;
 BITMAP *back;
 int backw,backh;
};
struct EXPLOSION
{
 fix x,y;

 int active;

 int type,size,time,deathtime;

 BITMAP *back;
 int backw,backh;
};

#endif
