#include <Level.h>
Public Member Functions | |
| Level () | |
| ~Level () | |
| void | reset () | 
| bool | update () | 
| void | draw () | 
| void | levelLoad (std::string filenamebase) | 
| void | registerObject (Object *o) | 
| void | registerTile (Tile *t, int h, int w) | 
| std::vector< Object * > & | getObjects () | 
| Tile * | getTile (int w, int h) | 
| void | deleteObject (Object *o) | 
| void | scheduleDelete (Object *o) | 
| int | getHeight () | 
| int | getWidth () | 
| Object * | getObject (std::string id) | 
| Mix_Music * | getMusic () | 
| void | setMusic (Mix_Music *music) | 
| Mix_Chunk * | getSound (std::string filename) | 
| void | loadSound (std::string filename) | 
| Player * | getPlayer () | 
| void | setCutScene (bool cutScene) | 
| void | setCutSceneText (std::string text) | 
| void | addScore (int score) | 
| void | drawHUD () | 
Static Public Member Functions | |
| static Level * | instance () | 
Static Public Attributes | |
| static const int | tileHeight = 32 | 
| static const int | tileWidth = 32 | 
Private Member Functions | |
| void | loadObjects () | 
| void | readTextures (std::string extension) | 
| void | readObjects (std::string dir) | 
| void | levelTextureLoad (std::string filenamebase) | 
| void | levelObjectLoad (std::string filenamebase) | 
| void | levelSpecsLoad (std::string filenamebase) | 
| void | addObject (Object *o, std::vector< Object * > &vec) | 
| Uint32 | loadPixelFile (std::string filename) | 
Private Attributes | |
| int | _height | 
| int | _width | 
| std::string | _filenamebase | 
| bool | _cutScene | 
| std::string | _cutSceneText | 
| int | _score | 
| Player * | _player | 
| std::vector< Object * > | _objects | 
| std::vector< Tile * > | _tiles | 
| std::vector< Object * > | _drawnObjects | 
| std::vector< Object * > | _deleteQueue | 
| std::queue< Object * > | _addQueue | 
| std::map< std::string, Object * > | _ids | 
| Mix_Music * | _music | 
| std::map< std::string, Mix_Chunk * > | _sounds | 
| Background * | _background | 
Static Private Attributes | |
| static Level * | _instance = NULL | 
| static Uint32 | WALKBEHIND = 0 | 
| static Uint32 | WALKINTO = 0 | 
| static Uint32 | WALKINFRONT = 0 | 
| static std::map< Uint32, Sprite * > | TEXTURES | 
| static std::map< Uint32, std::string > | OBJECTS | 
| static bool | _objectsLoaded = false | 
Definition at line 22 of file Level.h.
      
  | 
  
| 
 
 Definition at line 25 of file Level.cpp. References _instance, and loadObjects(). Referenced by instance().  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  ||||||||||||
| 
 
 Definition at line 431 of file Level.cpp. References _drawnObjects, _ids, Object::getDepth(), and Object::id(). Referenced by levelObjectLoad().  | 
  
      
  | 
  
| 
 
 Definition at line 58 of file Level.h. References _score. Referenced by Enemy::die(), and AddScoreCommand::execute().  | 
  
      
  | 
  
| 
 
 Definition at line 471 of file Level.cpp. References _drawnObjects, and _objects. Referenced by update().  | 
  
      
  | 
  
| 
 
 Definition at line 359 of file Level.cpp. References _background, _drawnObjects, and Background::draw(). Referenced by main().  | 
  
      
  | 
  
| 
 
 Definition at line 377 of file Level.cpp. References _player, Sprite::draw(), Person::getHealth(), Sprite::loadSprite(), Sprite::SCREEN, and Sprite::width().  | 
  
      
  | 
  
| 
 
 Definition at line 39 of file Level.h. References _height. Referenced by Background::draw().  | 
  
      
  | 
  
| 
 
 Definition at line 48 of file Level.h. References _music.  | 
  
      
  | 
  
      
  | 
  
| 
 
 Definition at line 35 of file Level.h. References _objects. Referenced by CollisionHandler::ObjsColliding().  | 
  
      
  | 
  
| 
 
 Definition at line 52 of file Level.h. References _player. Referenced by AimCommand::AimCommand(), ShootInRangeCommand::execute(), FollowPlayerInRangeCommand::execute(), and FollowPlayerCommand::execute().  | 
  
      
  | 
  
| 
 
 Definition at line 484 of file Level.cpp. References _sounds.  | 
  
      
  | 
  ||||||||||||
| 
 
 Definition at line 36 of file Level.h. References _tiles, and _width. Referenced by CollisionHandler::ObjsColliding().  | 
  
      
  | 
  
| 
 
 Definition at line 40 of file Level.h. References _width. Referenced by Background::draw().  | 
  
      
  | 
  
      
  | 
  
| 
 
 Definition at line 177 of file Level.cpp. References _filenamebase, _ids, _player, Screen::instance(), levelObjectLoad(), levelSpecsLoad(), levelTextureLoad(), Control::registerController(), and Screen::registerFollowObj(). Referenced by main().  | 
  
      
  | 
  
| 
 
 Definition at line 217 of file Level.cpp. References _height, _ids, _objects, _width, addObject(), Object::id(), glfuncs::load_image(), Object::loadObject(), OBJECTS, tileHeight, and tileWidth. Referenced by levelLoad().  | 
  
      
  | 
  
| 
 
 Definition at line 198 of file Level.cpp. References List::empty(), List::firstList(), getObject(), Object::load(), Parser::parse(), and List::rest(). Referenced by levelLoad().  | 
  
      
  | 
  
| 
 
 Definition at line 262 of file Level.cpp. References _background, _height, _tiles, _width, glfuncs::load_image(), registerTile(), Object::setCollidable(), Object::setDepth(), TEXTURES, tileHeight, tileWidth, WALKBEHIND, WALKINFRONT, and WALKINTO. Referenced by levelLoad().  | 
  
      
  | 
  
| 
 
 Definition at line 67 of file Level.cpp. References _objectsLoaded, loadPixelFile(), readObjects(), readTextures(), WALKBEHIND, WALKINFRONT, and WALKINTO. Referenced by Level().  | 
  
      
  | 
  
| 
 
 Definition at line 86 of file Level.cpp. References glfuncs::instance(), and glfuncs::load_image(). Referenced by loadObjects().  | 
  
      
  | 
  
| 
 
 Definition at line 490 of file Level.cpp. References _sounds. Referenced by PlaySoundCommand::PlaySoundCommand().  | 
  
      
  | 
  
| 
 
 Definition at line 96 of file Level.cpp. References glfuncs::instance(), glfuncs::load_image(), and OBJECTS. Referenced by loadObjects().  | 
  
      
  | 
  
| 
 
 Definition at line 137 of file Level.cpp. References glfuncs::instance(), glfuncs::load_image(), Sprite::loadSprite(), and TEXTURES. Referenced by loadObjects().  | 
  
      
  | 
  
| 
 
 Definition at line 410 of file Level.cpp. References _addQueue. Referenced by Person::shoot().  | 
  
      
  | 
  ||||||||||||||||
| 
 
 Definition at line 415 of file Level.cpp. References _drawnObjects, _tiles, _width, Object::collidable(), and Object::getDepth(). Referenced by levelTextureLoad().  | 
  
      
  | 
  
| 
 
 Definition at line 43 of file Level.cpp. References _addQueue, _deleteQueue, _drawnObjects, _ids, _objects, and _tiles. Referenced by main().  | 
  
      
  | 
  
| 
 
 Definition at line 466 of file Level.cpp. References _deleteQueue. Referenced by Bullet::collide(), Person::die(), and Bullet::update().  | 
  
      
  | 
  
| 
 
 Definition at line 479 of file Level.cpp. References _cutScene. Referenced by SetCutSceneCommand::execute().  | 
  
      
  | 
  
| 
 
 Definition at line 56 of file Level.h. References _cutSceneText. Referenced by CutSceneTextCommand::execute().  | 
  
      
  | 
  
| 
 
 Definition at line 49 of file Level.h. References _music. Referenced by PlayMusicCommand::PlayMusicCommand().  | 
  
      
  | 
  
| 
 
 Definition at line 321 of file Level.cpp. References _deleteQueue, _player, and deleteObject(). Referenced by main().  | 
  
      
  | 
  
| 
 
 Definition at line 103 of file Level.h. Referenced by registerObject(), and reset().  | 
  
      
  | 
  
| 
 
 Definition at line 107 of file Level.h. Referenced by draw(), and levelTextureLoad().  | 
  
      
  | 
  
| 
 
 Definition at line 84 of file Level.h. Referenced by setCutScene().  | 
  
      
  | 
  
| 
 
 Definition at line 85 of file Level.h. Referenced by setCutSceneText().  | 
  
      
  | 
  
| 
 
 Definition at line 102 of file Level.h. Referenced by reset(), scheduleDelete(), and update().  | 
  
      
  | 
  
| 
 
 Definition at line 101 of file Level.h. Referenced by addObject(), deleteObject(), draw(), registerTile(), and reset().  | 
  
      
  | 
  
| 
 
 Definition at line 81 of file Level.h. Referenced by levelLoad().  | 
  
      
  | 
  
| 
 
 Definition at line 78 of file Level.h. Referenced by getHeight(), levelObjectLoad(), and levelTextureLoad().  | 
  
      
  | 
  
| 
 
 Definition at line 104 of file Level.h. Referenced by addObject(), getObject(), levelLoad(), levelObjectLoad(), and reset().  | 
  
      
  | 
  
| 
 
 Definition at line 87 of file Level.h. Referenced by instance(), and Level().  | 
  
      
  | 
  
| 
 
 Definition at line 105 of file Level.h. Referenced by getMusic(), and setMusic().  | 
  
      
  | 
  
| 
 
 Definition at line 99 of file Level.h. Referenced by deleteObject(), getObjects(), levelObjectLoad(), reset(), and ~Level().  | 
  
      
  | 
  
| 
 
 Definition at line 109 of file Level.h. Referenced by loadObjects().  | 
  
      
  | 
  
| 
 
 Definition at line 97 of file Level.h. Referenced by drawHUD(), getPlayer(), levelLoad(), and update().  | 
  
      
  | 
  
| 
 
 Definition at line 95 of file Level.h. Referenced by addScore().  | 
  
      
  | 
  
| 
 
 Definition at line 106 of file Level.h. Referenced by getSound(), and loadSound().  | 
  
      
  | 
  
| 
 
 Definition at line 100 of file Level.h. Referenced by getTile(), levelTextureLoad(), registerTile(), reset(), and ~Level().  | 
  
      
  | 
  
| 
 
 Definition at line 79 of file Level.h. Referenced by getTile(), getWidth(), levelObjectLoad(), levelTextureLoad(), and registerTile().  | 
  
      
  | 
  
| 
 
 Definition at line 93 of file Level.h. Referenced by levelObjectLoad(), and readObjects().  | 
  
      
  | 
  
| 
 
 Definition at line 92 of file Level.h. Referenced by levelTextureLoad(), and readTextures().  | 
  
      
  | 
  
| 
 
 Definition at line 42 of file Level.h. Referenced by levelObjectLoad(), levelTextureLoad(), and CollisionHandler::ObjsColliding().  | 
  
      
  | 
  
| 
 
 Definition at line 43 of file Level.h. Referenced by levelObjectLoad(), levelTextureLoad(), and CollisionHandler::ObjsColliding().  | 
  
      
  | 
  
| 
 
 Definition at line 89 of file Level.h. Referenced by levelTextureLoad(), and loadObjects().  | 
  
      
  | 
  
| 
 
 Definition at line 91 of file Level.h. Referenced by levelTextureLoad(), and loadObjects().  | 
  
      
  | 
  
| 
 
 Definition at line 90 of file Level.h. Referenced by levelTextureLoad(), and loadObjects().  | 
  
 1.4.6-NO