Mario: formatting

This commit is contained in:
2021-10-18 10:10:43 +02:00
parent 303490a619
commit 0d855ed218
20 changed files with 541 additions and 490 deletions
+9 -5
View File
@@ -8,8 +8,12 @@
class MarioVisitor : public SDLPP::Visitor {
public:
MarioVisitor(bool is_jumping, SDLPP::Scene &scene, bool &quit, int &coin_count, std::vector< std::shared_ptr< MarioBlock > > &moving_objects) : jumping(is_jumping), _scene(scene), _quit(quit), _coin_count(coin_count), _moving_objects(moving_objects) {}
void visit( const SDLPP::RenderObject &obj ) override;
MarioVisitor(bool is_jumping, SDLPP::Scene &scene, bool &quit,
int &coin_count,
std::vector<std::shared_ptr<MarioBlock>> &moving_objects)
: jumping(is_jumping), _scene(scene), _quit(quit),
_coin_count(coin_count), _moving_objects(moving_objects) {}
void visit(const SDLPP::RenderObject &obj) override;
bool isOnGround() const {
return onGround;
}
@@ -22,13 +26,13 @@ public:
double newXPos() const {
return newX;
}
void setFromId( uint64_t id ) override {
void setFromId(uint64_t id) override {
from = id;
}
uint64_t getFromId() const override {
return from;
}
void setVisitorType( uint64_t type ) override {
void setVisitorType(uint64_t type) override {
_type = type;
}
uint64_t getVisitorType() const override {
@@ -125,7 +129,7 @@ private:
bool &_quit;
int &_coin_count;
bool mushroom = false;
std::vector< std::shared_ptr< MarioBlock > > &_moving_objects;
std::vector<std::shared_ptr<MarioBlock>> &_moving_objects;
bool _bounce = false;
};