File: logic.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 (44 lines) | stat: -rw-r--r-- 1,019 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
#ifndef _game_logic_h_
#define _game_logic_h_

#include <vector>

using namespace std;

class SpaceObject;
class LevelCreator;
class Section;
class ExplosionClass;

#define MAX_EXPL 100

class Logic{
public:

	Logic();
	~Logic();

	int runCycle( SpaceObject * player, LevelCreator * level );

	vector< SpaceObject * > * getObjects();
	ExplosionClass ** getExplode();
	int maxExplode();

protected:
	
	void handleSpace( vector< SpaceObject * > * mv, Section * onscreen );
	void checkCollision( Section * fight, SpaceObject * take, int sound, int vol );
	void enforceUniverse( SpaceObject * player );
	void HandleExplosion();
	void DeleteSpace( vector< SpaceObject *> * objs, Section * sec, const SpaceObject * _player, LevelCreator * level );
	void clearCollide( vector< SpaceObject * > * contain );
	bool outOfBounds( SpaceObject * who );
	void vectorAdd( vector< SpaceObject * > * stable, vector< SpaceObject * > * state );

protected:
	ExplosionClass * expl[ MAX_EXPL ];
	vector< SpaceObject * > objects;

};

#endif