Mario Editor: add land type switching
This commit is contained in:
+8
-4
@@ -4,6 +4,10 @@
|
||||
#include "../sdlpp/sdlpp_rectrenderer.hpp"
|
||||
#include <memory>
|
||||
|
||||
struct LandType {
|
||||
enum Value { OVERWORLD = 0, UNDERWORLD = 1, WATER = 2, BOWSER = 4 };
|
||||
};
|
||||
|
||||
class MarioBlock : public SDLPP::RectangleRender {
|
||||
public:
|
||||
MarioBlock( int x, int y, std::shared_ptr< SDLPP::Renderer > renderer,
|
||||
@@ -13,6 +17,8 @@ public:
|
||||
void setTerrain( bool terrain = true );
|
||||
void bounce();
|
||||
virtual void custom_move(int ticks) override;
|
||||
void setType(LandType::Value type);
|
||||
LandType::Value getType() const;
|
||||
|
||||
private:
|
||||
bool _tool = false;
|
||||
@@ -22,15 +28,13 @@ private:
|
||||
const int bounce_ticks = 100;
|
||||
int ticks_to_bounce = bounce_ticks;
|
||||
SDLPP::Vec2D<double> og_pos = {};
|
||||
LandType::Value _type;
|
||||
};
|
||||
|
||||
extern const std::vector< uint64_t > possibleBlocks;
|
||||
extern const std::vector< uint64_t > possibleMods;
|
||||
extern const std::vector< uint64_t > possibleCharacters;
|
||||
|
||||
struct LandType {
|
||||
enum Value { OVERWORLD = 0, UNDERWORLD = 1, WATER = 2, BOWSER = 4 };
|
||||
};
|
||||
extern const std::vector< LandType::Value > possibleLands;
|
||||
|
||||
struct BlockRole {
|
||||
enum Value {
|
||||
|
||||
Reference in New Issue
Block a user