File: container.h

package info (click to toggle)
enemylines3 1.2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,380 kB
  • ctags: 1,444
  • sloc: cpp: 16,323; makefile: 74; sh: 52
file content (45 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (6)
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
#ifndef __el__container_h
#define __el__container_h

#include <iostream>
#include <list>

#include "entitytype.h"
#include "release.h"
#include "coordinate.h"

namespace PRJID {

class Entity;
class Game;


class Container {
	std::list <Entity *> entities;
	Game *game;
public:
	Container();
	~Container();

	void clear();
	void remove(unsigned int i);

	void add(Entity *e,bool special=false);

	void set_game(Game *g);
	
	void act(unsigned int ticks);
	void tick(unsigned int ticks);

	void draw();

	Entity *select(int x,int y);
	Entity *select_single(int x,int y);

	Entity *create(e_entitytype t);
};


} //namespace

#endif