dungeon_crawler

diff prototype/src/level.h @ 49:303743485aba

pretty much implemented the positional torch sound sources
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 18 Sep 2012 00:34:29 +0300
parents aa9e28670ae2
children c40efa9cf844
line diff
     1.1 --- a/prototype/src/level.h	Mon Sep 17 08:40:59 2012 +0300
     1.2 +++ b/prototype/src/level.h	Tue Sep 18 00:34:29 2012 +0300
     1.3 @@ -2,9 +2,11 @@
     1.4  #define LEVEL_H_
     1.5  
     1.6  #include <vector>
     1.7 +#include <list>
     1.8  #include "vmath/vmath.h"
     1.9  #include "psys/psys.h"
    1.10  #include "tile.h"
    1.11 +#include "audio/auman.h"
    1.12  
    1.13  class GridCell;
    1.14  
    1.15 @@ -19,6 +21,10 @@
    1.16  	// secondary data structure, simple list of all populated cells
    1.17  	std::vector<GridCell*> cell_list;
    1.18  
    1.19 +	// audio manager for static sources in the level
    1.20 +	AudioManager austatic;
    1.21 +	Vector3 player_pos;
    1.22 +
    1.23  	void draw_grid() const;
    1.24  
    1.25  public:
    1.26 @@ -33,6 +39,7 @@
    1.27  	void get_cell_coords_at(const Vector3 &pos, int *xptr, int *yptr) const;
    1.28  	unsigned int get_cell_dirmask(int x, int y) const;
    1.29  
    1.30 +	void set_player_position(const Vector3 &ppos);
    1.31  	void update(unsigned long msec, float dt);
    1.32  
    1.33  	void draw() const;
    1.34 @@ -62,6 +69,8 @@
    1.35  	void draw_post(unsigned int draw_mask) const;
    1.36  
    1.37  	AudioSample *get_sample(int which) const;
    1.38 +
    1.39 +	std::list<Tile::AudioSourceDesc> get_audio_sources() const;
    1.40  };
    1.41  
    1.42  #endif	// LEVEL_H_