Mario: formatting

This commit is contained in:
2021-10-18 09:08:35 +02:00
parent f3062464d2
commit 8ca70fa11e
19 changed files with 1262 additions and 1250 deletions
+9 -5
View File
@@ -3,20 +3,24 @@
#include "blocks.hpp"
#include "sprites.hpp"
EditBox::EditBox(int x, int y, float start_x, float start_y, int map_width, int map_height, std::shared_ptr<SDLPP::Renderer> renderer) : SDLPP::RectangleRender(start_x + x*BLOCK_SIZE, start_y + y*BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE, renderer) {
EditBox::EditBox(int x, int y, float start_x, float start_y, int map_width,
int map_height, std::shared_ptr<SDLPP::Renderer> renderer)
: SDLPP::RectangleRender(start_x + x * BLOCK_SIZE,
start_y + y * BLOCK_SIZE, BLOCK_SIZE,
BLOCK_SIZE, renderer) {
_x = x;
_y = y;
setId(EDITOR_EDIT_SQUARE);
setColiderColor("#FF00AA");
setPermanent();
setAlignment(SDLPP::OBJ_CENTER, SDLPP::OBJ_CENTER);
addCollision(SDLPP::RectColider(0,0,1,1));
addCollision(SDLPP::RectColider(0, 0, 1, 1));
}
SDLPP::Vec2D<int> EditBox::getIndexes() const {
return {_x, _y};
return { _x, _y };
}
void EditBox::visit( SDLPP::Visitor &visitor ) {
visitor.visit( *this );
void EditBox::visit(SDLPP::Visitor &visitor) {
visitor.visit(*this);
}