dungeon_crawler

diff prototype/src/level.h @ 38:862461b686f4

start work on particle systems
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 29 Aug 2012 03:22:36 +0300
parents fa8f89d06f6f
children 38e16366efc2
line diff
     1.1 --- a/prototype/src/level.h	Wed Aug 29 01:04:01 2012 +0300
     1.2 +++ b/prototype/src/level.h	Wed Aug 29 03:22:36 2012 +0300
     1.3 @@ -15,6 +15,9 @@
     1.4  	int xsz, ysz;
     1.5  	float cell_size;
     1.6  
     1.7 +	// secondary data structure, simple list of all populated cells
     1.8 +	std::vector<GridCell*> cell_list;
     1.9 +
    1.10  	void draw_grid() const;
    1.11  
    1.12  public:
    1.13 @@ -28,6 +31,8 @@
    1.14  	Vector3 get_cell_pos(int x, int y) const;
    1.15  	unsigned int get_cell_dirmask(int x, int y) const;
    1.16  
    1.17 +	void update(unsigned long msec, float dt);
    1.18 +
    1.19  	void draw() const;
    1.20  	void draw_lights() const;
    1.21  };
    1.22 @@ -35,12 +40,14 @@
    1.23  class GridCell {
    1.24  private:
    1.25  	// each grid-cell might contain multiple tiles.
    1.26 -	std::vector<const Tile*> tiles;
    1.27 +	std::vector<Tile*> tiles;
    1.28  
    1.29  public:
    1.30 -	GridCell(const Tile *tile = 0);
    1.31 +	GridCell(Tile *tile = 0);
    1.32  
    1.33 -	void add_tile(const Tile *tile);
    1.34 +	void add_tile(Tile *tile);
    1.35 +
    1.36 +	void update(unsigned long msec, float dt);
    1.37  
    1.38  	void draw(unsigned int draw_mask) const;
    1.39  	void draw_lights(unsigned int draw_mask) const;