Compare commits

..

No commits in common. "f137f6609f27b7b3d0137764fbdee0bf8de9506c" and "4109cfe1af380cfc57c468243f8eb3cb1962b7e8" have entirely different histories.

3 changed files with 8 additions and 5 deletions

View File

@ -4,6 +4,7 @@
#include "../sdlpp/sdlpp_rectrenderer.hpp" #include "../sdlpp/sdlpp_rectrenderer.hpp"
#include "sprites.hpp" #include "sprites.hpp"
#include "blocks.hpp" #include "blocks.hpp"
#include <_types/_uint8_t.h>
#define BIG_FLAG 0x0001 #define BIG_FLAG 0x0001
#define FIRE_FLAG 0x0002 #define FIRE_FLAG 0x0002

View File

@ -8,12 +8,13 @@
class MarioVisitor : public SDLPP::Visitor { class MarioVisitor : public SDLPP::Visitor {
public: public:
MarioVisitor(bool is_jumping, SDLPP::Scene &scene, int &coin_count, MarioVisitor(bool is_jumping, SDLPP::Scene &scene,
int &coin_count,
std::vector<std::shared_ptr<MarioBlock>> &moving_objects, std::vector<std::shared_ptr<MarioBlock>> &moving_objects,
bool is_big, bool has_star) bool is_big, bool has_star)
: jumping(is_jumping), _scene(scene), _coin_count(coin_count), : jumping(is_jumping), _scene(scene),
_moving_objects(moving_objects), _is_big(is_big), _coin_count(coin_count), _moving_objects(moving_objects),
_has_star(has_star) {} _is_big(is_big), _has_star(has_star) {}
void visit(const SDLPP::RenderObject &obj) override; void visit(const SDLPP::RenderObject &obj) override;
bool isOnGround() const { bool isOnGround() const {
return onGround; return onGround;

View File

@ -4,7 +4,8 @@
#include "../blocks.hpp" #include "../blocks.hpp"
std::shared_ptr<SDLPP::Visitor> std::shared_ptr<SDLPP::Visitor>
getVisitor(const MarioBlock &block, SDLPP::Scene &scene, int &coin_count, getVisitor(const MarioBlock &block, SDLPP::Scene &scene,
int &coin_count,
std::vector<std::shared_ptr<MarioBlock>> &moving_objects); std::vector<std::shared_ptr<MarioBlock>> &moving_objects);
#endif #endif