Fix comments

master
NaiJi ✨ 4 years ago
parent 56376641f2
commit 6896cf037d

@ -179,16 +179,13 @@ CellPtr TeleportCell::clone() const
return std::make_unique<TeleportCell>();
}
///////////////////////////////////////
const std::vector<CELL_TYPE> TriggerCell::cells_to_cast { PASSABLE_CELL, WATER_CELL, WALL_CELL, EXIT_CELL };
TriggerCell::TriggerCell(/*std::vector<CellPtr> &&cells_to_change,*/ coordinate cell_row, coordinate cell_col, const sf::Color &color) :
TriggerCell::TriggerCell(coordinate cell_row, coordinate cell_col, const sf::Color &color) :
Cell(cell_row, cell_col, color)
{
//cells = std::move(cells_to_change);
// triggers are a bit higher than ground and water, but lower than walls
height_shift = 5;
}

@ -178,6 +178,7 @@ public:
virtual ~TeleportCell() override;
/// Set the coordinates of this teleport destination
void setDestination(coordinate new_cell_row, coordinate new_cell_col);
virtual bool onMovingTo(HeroPtr &hero, LevelPtr &level) override;
@ -195,16 +196,16 @@ private:
std::vector<CellPtr> cells;
public:
// Vector of cell types you can cast in to
/// Vector of cell types you can cast in to
static const std::vector<CELL_TYPE> cells_to_cast;
TriggerCell(//std::vector<CellPtr> &&cells_to_change,
coordinate cell_row = 0,
TriggerCell(coordinate cell_row = 0,
coordinate cell_col = 0,
const sf::Color &color = palette::Pink);
virtual ~TriggerCell() override;
/// Add a cell which has to be placed to map when the trigger gets activated
void addTarget(CellPtr &&cell);
virtual bool onMovingTo(HeroPtr &hero, LevelPtr &level) override;

@ -45,7 +45,7 @@ private:
/// Prepare prototypes of default cells
void prepareDefaultCells();
/// Map file section readers
// Map file section readers
void readMapSize(std::istringstream &sstr);
void readMapRow(std::istringstream &sstr);
void readTeleport(std::istringstream &sstr);

@ -18,7 +18,9 @@ private:
float cell_width, cell_height, cell_deviation;
unsigned int window_size;
// Reset for each iteration of window pulling
float init_painter_x, init_painter_y;
float painter_x, painter_y;
float vertical_shift, horizontal_shift;

Loading…
Cancel
Save