Mario editor: added more terrain blocks

This commit is contained in:
zv0n 2021-05-07 10:36:45 +02:00
parent 900382bfce
commit 85807ca962
4 changed files with 47 additions and 2 deletions

View File

@ -34,7 +34,17 @@ const std::vector< uint64_t > possibleBlocks = { FLOOR_ID,
CLOUD_RIGHT_BOTTOM_ID, CLOUD_RIGHT_BOTTOM_ID,
CLOUD_LEFT_TOP_ID, CLOUD_LEFT_TOP_ID,
CLOUD_MIDDLE_TOP_ID, CLOUD_MIDDLE_TOP_ID,
CLOUD_RIGHT_TOP_ID }; CLOUD_RIGHT_TOP_ID,
PIPE_LEFT_BOTTOM_ID,
PIPE_LEFT_TOP_ID,
PIPE_RIGHT_BOTTOM_ID,
PIPE_RIGHT_TOP_ID,
CASTLE_LEFT_ID,
CASTLE_RIGHT_ID,
CASTLE_BLACK_ID,
CASTLE_ENTRY_ID,
CASTLE_TOWER_ID,
CASTLE_TOWER_FILLED_ID };
const std::unordered_map<uint64_t, const SDL_Rect*> block_mapping = { const std::unordered_map<uint64_t, const SDL_Rect*> block_mapping = {
{FLOOR_ID, &FLOOR_SRC}, {HILL_INCLINE_ID, &HILL_INCLINE_SRC}, {FLOOR_ID, &FLOOR_SRC}, {HILL_INCLINE_ID, &HILL_INCLINE_SRC},
@ -44,7 +54,12 @@ const std::unordered_map<uint64_t, const SDL_Rect*> block_mapping = {
{BUSH_RIGHT_ID, &BUSH_RIGHT_SRC}, {CLOUD_LEFT_BOTTOM_ID, &CLOUD_LEFT_BOTTOM_SRC}, {BUSH_RIGHT_ID, &BUSH_RIGHT_SRC}, {CLOUD_LEFT_BOTTOM_ID, &CLOUD_LEFT_BOTTOM_SRC},
{CLOUD_MIDDLE_BOTTOM_ID, &CLOUD_MIDDLE_BOTTOM_SRC}, {CLOUD_RIGHT_BOTTOM_ID, &CLOUD_RIGHT_BOTTOM_SRC}, {CLOUD_MIDDLE_BOTTOM_ID, &CLOUD_MIDDLE_BOTTOM_SRC}, {CLOUD_RIGHT_BOTTOM_ID, &CLOUD_RIGHT_BOTTOM_SRC},
{CLOUD_LEFT_TOP_ID, &CLOUD_LEFT_TOP_SRC}, {CLOUD_MIDDLE_TOP_ID, &CLOUD_MIDDLE_TOP_SRC}, {CLOUD_LEFT_TOP_ID, &CLOUD_LEFT_TOP_SRC}, {CLOUD_MIDDLE_TOP_ID, &CLOUD_MIDDLE_TOP_SRC},
{CLOUD_RIGHT_TOP_ID, &CLOUD_RIGHT_TOP_SRC} {CLOUD_RIGHT_TOP_ID, &CLOUD_RIGHT_TOP_SRC}, {PIPE_LEFT_BOTTOM_ID, &PIPE_LEFT_BOTTOM_SRC},
{PIPE_LEFT_TOP_ID, &PIPE_LEFT_TOP_SRC}, {PIPE_RIGHT_BOTTOM_ID, &PIPE_RIGHT_BOTTOM_SRC},
{PIPE_RIGHT_TOP_ID, &PIPE_RIGHT_TOP_SRC}, {CASTLE_LEFT_ID, &CASTLE_LEFT_SRC},
{CASTLE_RIGHT_ID, &CASTLE_RIGHT_SRC}, {CASTLE_BLACK_ID, &CASTLE_BLACK_SRC},
{CASTLE_ENTRY_ID, &CASTLE_ENTRY_SRC}, {CASTLE_TOWER_ID, &CASTLE_TOWER_SRC},
{CASTLE_TOWER_FILLED_ID, &CASTLE_TOWER_FILLED_SRC}
}; };
std::shared_ptr< SDLPP::RectangleRender > std::shared_ptr< SDLPP::RectangleRender >

View File

@ -18,6 +18,16 @@
#define CLOUD_LEFT_TOP_ID 0x700E #define CLOUD_LEFT_TOP_ID 0x700E
#define CLOUD_MIDDLE_TOP_ID 0x700F #define CLOUD_MIDDLE_TOP_ID 0x700F
#define CLOUD_RIGHT_TOP_ID 0x7010 #define CLOUD_RIGHT_TOP_ID 0x7010
#define PIPE_LEFT_BOTTOM_ID 0x7011
#define PIPE_LEFT_TOP_ID 0x7012
#define PIPE_RIGHT_BOTTOM_ID 0x7013
#define PIPE_RIGHT_TOP_ID 0x7014
#define CASTLE_LEFT_ID 0x7015
#define CASTLE_RIGHT_ID 0x7016
#define CASTLE_BLACK_ID 0x7017
#define CASTLE_ENTRY_ID 0x7018
#define CASTLE_TOWER_ID 0x7019
#define CASTLE_TOWER_FILLED_ID 0x701A
// character IDs // character IDs
#define MARIO_ID 0x0F #define MARIO_ID 0x0F

View File

@ -36,6 +36,16 @@ const SDL_Rect CLOUD_RIGHT_BOTTOM_SRC = {256,80,16,16};
const SDL_Rect CLOUD_LEFT_TOP_SRC = {222,63,16,16}; const SDL_Rect CLOUD_LEFT_TOP_SRC = {222,63,16,16};
const SDL_Rect CLOUD_MIDDLE_TOP_SRC = {239,63,16,16}; const SDL_Rect CLOUD_MIDDLE_TOP_SRC = {239,63,16,16};
const SDL_Rect CLOUD_RIGHT_TOP_SRC = {256,63,16,16}; const SDL_Rect CLOUD_RIGHT_TOP_SRC = {256,63,16,16};
const SDL_Rect PIPE_LEFT_BOTTOM_SRC = {103, 63, 16, 16};
const SDL_Rect PIPE_LEFT_TOP_SRC = {103, 46, 16, 16};
const SDL_Rect PIPE_RIGHT_BOTTOM_SRC = {120, 63, 16, 16};
const SDL_Rect PIPE_RIGHT_TOP_SRC = {120, 46, 16, 16};
const SDL_Rect CASTLE_LEFT_SRC = {69, 131, 16, 16};
const SDL_Rect CASTLE_RIGHT_SRC = {103, 131, 16, 16};
const SDL_Rect CASTLE_BLACK_SRC = {86, 131, 16, 16};
const SDL_Rect CASTLE_ENTRY_SRC = {86, 114, 16, 16};
const SDL_Rect CASTLE_TOWER_SRC = {69, 114, 16, 16};
const SDL_Rect CASTLE_TOWER_FILLED_SRC = {103, 114, 16, 16};
const SDLPP::Vec2D<uint64_t> OVERWORLD_SHIFT = {0, 0}; const SDLPP::Vec2D<uint64_t> OVERWORLD_SHIFT = {0, 0};
const SDLPP::Vec2D<uint64_t> UNDERWORLD_SHIFT = {274, 0}; const SDLPP::Vec2D<uint64_t> UNDERWORLD_SHIFT = {274, 0};

View File

@ -40,6 +40,16 @@ extern const SDL_Rect CLOUD_RIGHT_BOTTOM_SRC;
extern const SDL_Rect CLOUD_LEFT_TOP_SRC; extern const SDL_Rect CLOUD_LEFT_TOP_SRC;
extern const SDL_Rect CLOUD_MIDDLE_TOP_SRC; extern const SDL_Rect CLOUD_MIDDLE_TOP_SRC;
extern const SDL_Rect CLOUD_RIGHT_TOP_SRC; extern const SDL_Rect CLOUD_RIGHT_TOP_SRC;
extern const SDL_Rect PIPE_LEFT_BOTTOM_SRC;
extern const SDL_Rect PIPE_LEFT_TOP_SRC;
extern const SDL_Rect PIPE_RIGHT_BOTTOM_SRC;
extern const SDL_Rect PIPE_RIGHT_TOP_SRC;
extern const SDL_Rect CASTLE_LEFT_SRC;
extern const SDL_Rect CASTLE_RIGHT_SRC;
extern const SDL_Rect CASTLE_BLACK_SRC;
extern const SDL_Rect CASTLE_ENTRY_SRC;
extern const SDL_Rect CASTLE_TOWER_SRC;
extern const SDL_Rect CASTLE_TOWER_FILLED_SRC;
extern const SDLPP::Vec2D<uint64_t> OVERWORLD_SHIFT; extern const SDLPP::Vec2D<uint64_t> OVERWORLD_SHIFT;
extern const SDLPP::Vec2D<uint64_t> UNDERWORLD_SHIFT; extern const SDLPP::Vec2D<uint64_t> UNDERWORLD_SHIFT;