-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using consistent member name format "my_member"
- Loading branch information
1 parent
bb09edc
commit 5aa42de
Showing
1 changed file
with
41 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,50 @@ | ||
#pragma once | ||
|
||
#include <Tile.hpp> | ||
#include <boost/multi_array.hpp> | ||
|
||
#include <iostream> | ||
#include <map> | ||
#include <string> | ||
#include <map> | ||
#include <boost/multi_array.hpp> | ||
|
||
using tileArray = boost::multi_array<Tile, 2>; | ||
using entityMap = std::map<uint32_t, entity::Entity>; | ||
using tileArray = boost::multi_array<Tile,2>; | ||
using entityMap = std::map<uint32_t,entity::Entity>; | ||
|
||
class Map { | ||
private: | ||
uint16_t id_; | ||
uint8_t currentType_; | ||
std::string mapName_; | ||
std::string bitmapName_; | ||
tileArray tiles_; | ||
entityMap entities_; | ||
|
||
public: | ||
Map(); | ||
Map(const uint16_t& id, const uint8_t& currentType, const std::string& mapName, const std::string& bitmapName, const tileArray& tiles, const uint16_t& dimensionX, const uint16_t& dimensionY, | ||
const entityMap& entities); | ||
~Map(); | ||
|
||
void setId(const uint16_t& id); | ||
void setCurrentType(const uint8_t& currentType); | ||
void setMapName(const std::string& mapName); | ||
void setBitmapName(const std::string& bitmapName); | ||
void setTiles(const tileArray tiles, const uint16_t& dimensionX, const uint16_t& dimensionY); | ||
void setEntities(const entityMap& entities); | ||
void setTile(const utils::Coordinate& coordinate, const Tile& tile); | ||
|
||
const uint16_t getId(); | ||
const uint8_t getCurrentType(); | ||
const std::string getMapName(); | ||
const std::string getBitmapName(); | ||
const tileArray getTiles(); | ||
const entityMap getEntities(); | ||
|
||
void swapTiles(Tile tile1, Tile Tile2); | ||
|
||
bool doesItCollide(const tils::Coordinate& coordinate, const uint8_t& direction); | ||
bool doesItInteract(const utils::Coordinate& coordinate, const uint8_t& direction); | ||
bool isPokemonBattleTriggered(); | ||
bool isTrainerBattleTriggered(); | ||
private: | ||
uint16_t id_; | ||
uint8_t current_type_; | ||
std::string map_name_; | ||
std::string bitmap_name_; | ||
tileArray tiles_; | ||
entityMap entities_; | ||
|
||
public: | ||
|
||
Map(); | ||
Map(const uint16_t &id, const uint8_t ¤t_type, const std::string &map_name, const std::string &bitmap_name, const tileArray &tiles, const uint16_t &dimensionX, const uint16_t &dimensionY, const entityMap &entities); | ||
~Map(); | ||
|
||
void setId(const uint16_t &id); | ||
void setCurrentType(const uint8_t ¤t_type); | ||
void setMapName(const std::string &map_name); | ||
void setBitmapName(const std::string &bitmap_name); | ||
void setTiles(const tileArray tiles, const uint16_t &dimensionX, const uint16_t &dimensionY); | ||
void setEntities(const entityMap &entities); | ||
void setTile(const utils::Coordinate &coordinate, const Tile &tile); | ||
|
||
const uint16_t getId(); | ||
const uint8_t getCurrentType(); | ||
const std::string getMapName(); | ||
const std::string getBitmapName(); | ||
const tileArray getTiles(); | ||
const entityMap getEntities(); | ||
|
||
void swapTiles(Tile tile1, Tile Tile2); | ||
|
||
bool doesItCollide(const tils::Coordinate &coordinate, const uint8_t &direction); | ||
bool doesItInteract(const utils::Coordinate &coordinate, const uint8_t &direction); | ||
bool isPokemonBattleTriggered(); | ||
bool isTrainerBattleTriggered(); | ||
|
||
} |