#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) |
| Tile * | getTileFromPixels (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 | addKill () |
| int | getScore () |
| void | setScore (int score) |
| void | drawHUD () |
| void | save () |
| void | restore () |
| bool | getWon () |
| void | setWon (bool won) |
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 | |
| bool | _won |
| bool | _timed |
| int | _levelTimer |
| int | _killed |
| int | _totBad |
| 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 |
| std::vector< Object * > | _save |
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 27 of file Level.cpp. References _instance, and loadObjects(). Referenced by instance(). |
|
|
Definition at line 36 of file Level.cpp. References _background, _music, _sounds, Sprite::cleanSprites(), CommandManager::flush(), and CommandManager::instance(). |
|
|
Definition at line 62 of file Level.h. References _killed. Referenced by Enemy::die(). |
|
||||||||||||
|
Definition at line 628 of file Level.cpp. References _drawnObjects, _ids, Object::getDepth(), and Object::id(). Referenced by levelObjectLoad(). |
|
|
Definition at line 61 of file Level.h. References _score. Referenced by Enemy::die(), and AddScoreCommand::execute(). |
|
|
Definition at line 668 of file Level.cpp. References _drawnObjects, _ids, _objects, Control::detachController(), Object::getType(), Object::id(), and TILE. Referenced by update(). |
|
|
Definition at line 524 of file Level.cpp. References _background, _drawnObjects, and Background::draw(). Referenced by Game::mainLoop(). |
|
|
Definition at line 542 of file Level.cpp. References _player, Sprite::draw(), Person::getHealth(), Sprite::loadSprite(), Sprite::SCREEN, and Sprite::width(). |
|
|
Definition at line 42 of file Level.h. References _height. Referenced by Background::draw(). |
|
|
Definition at line 51 of file Level.h. References _music. |
|
|
|
Definition at line 35 of file Level.h. References _objects. Referenced by CollisionHandler::ObjsColliding(). |
|
|
Definition at line 55 of file Level.h. References _player. Referenced by AimCommand::AimCommand(), ShootInRangeCommand::execute(), RunFromPlayerInRangeCommand::execute(), FollowPlayerInRangeCommand::execute(), FollowPlayerCommand::execute(), and EndLevelCommand::execute(). |
|
|
Definition at line 64 of file Level.h. References _score. |
|
|
Definition at line 683 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 38 of file Level.h. References _tiles, _width, tileHeight, and tileWidth. Referenced by Tile::calcDrawBox(), and Tile::getSquare(). |
|
|
Definition at line 43 of file Level.h. References _width. Referenced by Background::draw(). |
|
|
Definition at line 72 of file Level.h. References _won. Referenced by Game::wonLevel(). |
|
|
|
Definition at line 261 of file Level.cpp. References _filenamebase, _ids, _player, Screen::instance(), levelObjectLoad(), levelSpecsLoad(), levelTextureLoad(), and Screen::registerFollowObj(). Referenced by Game::loadLevel(). |
|
|
Definition at line 342 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 304 of file Level.cpp. References _levelTimer, _timed, List::empty(), List::firstList(), and Parser::parse(). Referenced by levelLoad(). |
|
|
Definition at line 387 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 151 of file Level.cpp. References _objectsLoaded, loadPixelFile(), readObjects(), readTextures(), WALKBEHIND, WALKINFRONT, and WALKINTO. Referenced by Level(). |
|
|
Definition at line 170 of file Level.cpp. References glfuncs::instance(), and glfuncs::load_image(). Referenced by loadObjects(). |
|
|
Definition at line 689 of file Level.cpp. References _sounds. Referenced by PlaySoundCommand::PlaySoundCommand(). |
|
|
Definition at line 180 of file Level.cpp. References glfuncs::instance(), glfuncs::load_image(), and OBJECTS. Referenced by loadObjects(). |
|
|
Definition at line 221 of file Level.cpp. References glfuncs::instance(), glfuncs::load_image(), Sprite::loadSprite(), and TEXTURES. Referenced by loadObjects(). |
|
|
Definition at line 606 of file Level.cpp. References _addQueue. Referenced by Person::die(), and Weapon::shoot(). |
|
||||||||||||||||
|
Definition at line 611 of file Level.cpp. References _drawnObjects, _tiles, _width, and Object::getDepth(). Referenced by levelTextureLoad(). |
|
|
Definition at line 122 of file Level.cpp. References restore(). Referenced by Game::resetLevel(). |
|
|
Definition at line 80 of file Level.cpp. References _drawnObjects, _objects, _save, and Control::detachController(). Referenced by RestoreCommand::execute(), and reset(). |
|
|
Definition at line 68 of file Level.cpp. References _objects, _save, and BULLET. Referenced by SaveCommand::execute(). |
|
|
Definition at line 663 of file Level.cpp. References _deleteQueue. Referenced by Person::die(), and Bullet::update(). |
|
|
Definition at line 678 of file Level.cpp. References _cutScene. Referenced by SetCutSceneCommand::execute(). |
|
|
Definition at line 59 of file Level.h. References _cutSceneText. Referenced by CutSceneTextCommand::execute(). |
|
|
Definition at line 335 of file Level.cpp. References _music. Referenced by PlayMusicCommand::PlayMusicCommand(). |
|
|
Definition at line 65 of file Level.h. References _score. Referenced by Player::die(). |
|
|
Definition at line 73 of file Level.h. References _won. Referenced by EndLevelCommand::execute(). |
|
|
Definition at line 474 of file Level.cpp. References _cutScene, _deleteQueue, _levelTimer, _player, _timed, _won, Player::copy(), deleteObject(), and Player::die(). Referenced by Game::mainLoop(). |
|
|
Definition at line 123 of file Level.h. Referenced by registerObject(). |
|
|
Definition at line 127 of file Level.h. Referenced by draw(), levelTextureLoad(), and ~Level(). |
|
|
Definition at line 104 of file Level.h. Referenced by setCutScene(), and update(). |
|
|
Definition at line 105 of file Level.h. Referenced by setCutSceneText(). |
|
|
Definition at line 122 of file Level.h. Referenced by scheduleDelete(), and update(). |
|
|
Definition at line 121 of file Level.h. Referenced by addObject(), deleteObject(), draw(), registerTile(), and restore(). |
|
|
Definition at line 101 of file Level.h. Referenced by levelLoad(). |
|
|
Definition at line 98 of file Level.h. Referenced by getHeight(), levelObjectLoad(), and levelTextureLoad(). |
|
|
Definition at line 124 of file Level.h. Referenced by addObject(), deleteObject(), getObject(), levelLoad(), and levelObjectLoad(). |
|
|
Definition at line 107 of file Level.h. Referenced by instance(), and Level(). |
|
|
Definition at line 95 of file Level.h. Referenced by addKill(). |
|
|
Definition at line 93 of file Level.h. Referenced by levelSpecsLoad(), and update(). |
|
|
Definition at line 125 of file Level.h. Referenced by getMusic(), setMusic(), and ~Level(). |
|
|
Definition at line 119 of file Level.h. Referenced by deleteObject(), getObjects(), levelObjectLoad(), restore(), and save(). |
|
|
Definition at line 131 of file Level.h. Referenced by loadObjects(). |
|
|
Definition at line 117 of file Level.h. Referenced by drawHUD(), getPlayer(), levelLoad(), and update(). |
|
|
|
|
|
Definition at line 115 of file Level.h. Referenced by addScore(), getScore(), and setScore(). |
|
|
Definition at line 126 of file Level.h. Referenced by getSound(), loadSound(), and ~Level(). |
|
|
Definition at line 120 of file Level.h. Referenced by getTile(), getTileFromPixels(), levelTextureLoad(), and registerTile(). |
|
|
Definition at line 92 of file Level.h. Referenced by levelSpecsLoad(), and update(). |
|
|
|
|
|
Definition at line 99 of file Level.h. Referenced by getTile(), getTileFromPixels(), getWidth(), levelObjectLoad(), levelTextureLoad(), and registerTile(). |
|
|
|
|
|
Definition at line 113 of file Level.h. Referenced by levelObjectLoad(), and readObjects(). |
|
|
Definition at line 112 of file Level.h. Referenced by levelTextureLoad(), and readTextures(). |
|
|
Definition at line 45 of file Level.h. Referenced by Tile::calcDrawBox(), Person::collide(), Tile::getSquare(), getTileFromPixels(), levelObjectLoad(), levelTextureLoad(), and CollisionHandler::ObjsColliding(). |
|
|
Definition at line 46 of file Level.h. Referenced by Tile::calcDrawBox(), Tile::getSquare(), getTileFromPixels(), levelObjectLoad(), levelTextureLoad(), and CollisionHandler::ObjsColliding(). |
|
|
Definition at line 109 of file Level.h. Referenced by levelTextureLoad(), and loadObjects(). |
|
|
Definition at line 111 of file Level.h. Referenced by levelTextureLoad(), and loadObjects(). |
|
|
Definition at line 110 of file Level.h. Referenced by levelTextureLoad(), and loadObjects(). |
1.4.6-NO