File: shipobj.h

package info (click to toggle)
rafkill 1.2.2-3.3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 13,268 kB
  • sloc: cpp: 13,508; makefile: 64; sh: 14
file content (95 lines) | stat: -rw-r--r-- 2,357 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef _shipobj_h_
#define _shipobj_h_

#include "spaceobj.h"
#include "defs.h"
#include "bitmap.h"
#include <vector>

using namespace std;

class Booster;
class Move;
class WeaponObject;
class HullObject;
class WeaponNode;
class ExplosionClass;
class Section;
class Group;

class ShipObject:public SpaceObject{
public:

	ShipObject( int qx, int qy, int spc, HullObject * hnew, Group * _group, Move * movey, int al );

	virtual void MoveMe(vector< SpaceObject * > * Ammo, const vector< SpaceObject * > * fight, Section * onscreen );

	virtual void Died( SpaceObject * check, ExplosionClass ** explr, int ME );
	
	virtual void Explode( ExplosionClass ** explr, int ME );

	/*
	virtual double getDX();
	virtual double getDY();
	virtual double getAccelX();
	virtual double getAccelY();
	*/
	
	virtual double Hurt();
	
	virtual bool powerUp();
	
	//destructor
	virtual ~ShipObject();

protected:

	Move * style;
	int special;

};

class MeteorObject:public ShipObject{
public:
	MeteorObject( int qx, int qy, int spc, HullObject * hnew, Move * hmove );
	virtual void Explode( ExplosionClass ** explr, int ME );
};

//there must be a better way to implement this
class EnemyGeneric:public ShipObject{
public:
	EnemyGeneric( int qx, int qy, HullObject * hnew, WeaponObject * myW, Move * movey, Group * _group );
	virtual void Radar( const Bitmap & rad )const;
};

class PowerUp:public ShipObject{
public:
	PowerUp( int qx, int qy, HullObject * hnew, Move * movey );
	virtual bool Damage( double much );
	virtual void Died( SpaceObject * check, ExplosionClass ** explr, int ME );
	virtual bool powerUp();
	virtual bool isSpecial() const;
	virtual void Radar( const Bitmap & rad )const;
};

class Money:public PowerUp{
public:
	Money( int qx, int qy, int m, HullObject * hnew, Move * movey );
	virtual bool Damage( double much );
	virtual void Died( SpaceObject * check, ExplosionClass ** explr, int ME );
};

class Health:public PowerUp{
public:
	Health( int qx, int qy, HullObject * hnew, Move * movey );
	virtual void Died( SpaceObject * check, ExplosionClass ** explr, int ME );
};

class Cloak:public PowerUp{
public:

	Cloak( int qx, int qy, HullObject * hnew, Move * movey );
	virtual void Died( SpaceObject * check, ExplosionClass ** explr, int ME );
};

#endif