2021-07-22 22:08:05 +00:00
|
|
|
#include "simpleblocks.hpp"
|
|
|
|
#include "../global_vars.hpp"
|
|
|
|
#include "../sprites.hpp"
|
|
|
|
#include "../objectids.hpp"
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
FloorBlock::FloorBlock(int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, FLOOR_SRC, true) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(FLOOR_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
HillInclineBlock::HillInclineBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, HILL_INCLINE_SRC,
|
|
|
|
false) {
|
|
|
|
setId(HILL_INCLINE_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
HillDeclineBlock::HillDeclineBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, HILL_DECLINE_SRC,
|
|
|
|
false) {
|
|
|
|
setId(HILL_INCLINE_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
HillDotsRightBlock::HillDotsRightBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, HILL_DOTS_RIGHT_SRC,
|
|
|
|
false) {
|
|
|
|
setId(HILL_DOTS_RIGHT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
HillDotsLeftBlock::HillDotsLeftBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, HILL_DOTS_LEFT_SRC,
|
|
|
|
false) {
|
|
|
|
setId(HILL_DOTS_LEFT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
HillFillBlock::HillFillBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, HILL_FILL_SRC, false) {
|
|
|
|
setId(HILL_FILL_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
HillTopBlock::HillTopBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, HILL_TOP_SRC, false) {
|
|
|
|
setId(HILL_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
BushLeftBlock::BushLeftBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, BUSH_LEFT_SRC, false) {
|
|
|
|
setId(BUSH_LEFT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
BushMiddleBlock::BushMiddleBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, BUSH_MIDDLE_SRC,
|
|
|
|
false) {
|
|
|
|
setId(BUSH_MIDDLE_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
BushRightBlock::BushRightBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, BUSH_RIGHT_SRC, false) {
|
|
|
|
setId(BUSH_RIGHT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CloudLeftBottomBlock::CloudLeftBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CLOUD_LEFT_BOTTOM_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CLOUD_LEFT_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CloudMiddleBottomBlock::CloudMiddleBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CLOUD_MIDDLE_BOTTOM_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CLOUD_MIDDLE_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CloudRightBottomBlock::CloudRightBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CLOUD_RIGHT_BOTTOM_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CLOUD_RIGHT_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
CloudLeftTopBlock::CloudLeftTopBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CLOUD_LEFT_TOP_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CLOUD_LEFT_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CloudMiddleTopBlock::CloudMiddleTopBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CLOUD_MIDDLE_TOP_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CLOUD_MIDDLE_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CloudRightTopBlock::CloudRightTopBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CLOUD_RIGHT_TOP_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CLOUD_RIGHT_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PipeLeftBottomBlock::PipeLeftBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, PIPE_LEFT_BOTTOM_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(PIPE_LEFT_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PipeRightBottomBlock::PipeRightBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, PIPE_RIGHT_BOTTOM_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(PIPE_RIGHT_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
PipeLeftTopBlock::PipeLeftTopBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, PIPE_LEFT_TOP_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(PIPE_LEFT_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
PipeRightTopBlock::PipeRightTopBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, PIPE_RIGHT_TOP_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(PIPE_RIGHT_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
CastleLeftBlock::CastleLeftBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CASTLE_LEFT_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CASTLE_LEFT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
CastleRightBlock::CastleRightBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CASTLE_RIGHT_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CASTLE_RIGHT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
CastleBlackBlock::CastleBlackBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CASTLE_BLACK_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CASTLE_BLACK_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
CastleEntryBlock::CastleEntryBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CASTLE_ENTRY_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CASTLE_ENTRY_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
CastleTowerBlock::CastleTowerBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CASTLE_TOWER_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CASTLE_TOWER_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CastleTowerFilledBlock::CastleTowerFilledBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CASTLE_TOWER_FILLED_SRC,
|
|
|
|
false) {
|
|
|
|
setId(CASTLE_TOWER_FILLED_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
VineTopBlock::VineTopBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, VINE_TOP_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(VINE_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
VineBottomBlock::VineBottomBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, VINE_BOTTOM_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(VINE_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
PoleTopBlock::PoleTopBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, POLE_TOP_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(POLE_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
PoleBottomBlock::PoleBottomBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, POLE_BOTTOM_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(POLE_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
FlagBlock::FlagBlock(int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, FLAG_SRC, false) {
|
|
|
|
setId(FLAG_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
StepBlock::StepBlock(int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, STEP_SRC, true) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(STEP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
BrickBlock::BrickBlock(int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, BRICK_SRC, true) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(BRICK_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
BrickTopBlock::BrickTopBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, BRICK_TOP_SRC, true) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(BRICK_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SidewayPipeEndTopBlock::SidewayPipeEndTopBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
SIDEWAY_PIPE_END_TOP_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(SIDEWAY_PIPE_END_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SidewayPipeEndBottomBlock::SidewayPipeEndBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
SIDEWAY_PIPE_END_BOTTOM_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(SIDEWAY_PIPE_END_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SidewayPipeMiddleTopBlock::SidewayPipeMiddleTopBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
SIDEWAY_PIPE_MIDDLE_TOP_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(SIDEWAY_PIPE_MIDDLE_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SidewayPipeMiddleBottomBlock::SidewayPipeMiddleBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
SIDEWAY_PIPE_MIDDLE_BOTTOM_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(SIDEWAY_PIPE_MIDDLE_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SidewayPipeConnectorTopBlock::SidewayPipeConnectorTopBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
SIDEWAY_PIPE_CONNECTOR_TOP_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(SIDEWAY_PIPE_CONNECTOR_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SidewayPipeConnectorBottomBlock::SidewayPipeConnectorBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
SIDEWAY_PIPE_CONNECTOR_BOTTOM_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(SIDEWAY_PIPE_CONNECTOR_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TreePlatformTopLeftBlock::TreePlatformTopLeftBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
TREE_PLATFORM_TOP_LEFT_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(TREE_PLATFORM_TOP_LEFT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TreePlatformTopMiddleBlock::TreePlatformTopMiddleBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
TREE_PLATFORM_TOP_MIDDLE_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(TREE_PLATFORM_TOP_MIDDLE_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TreePlatformTopRightBlock::TreePlatformTopRightBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
TREE_PLATFORM_TOP_RIGHT_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(TREE_PLATFORM_TOP_RIGHT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TreePlatformBarkBlock::TreePlatformBarkBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, TREE_PLATFORM_BARK_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(TREE_PLATFORM_BARK_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
WaterTopBlock::WaterTopBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, WATER_TOP_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(WATER_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
WaterFillBlock::WaterFillBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, WATER_FILL_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(WATER_FILL_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MushroomPlatformTopLeftBlock::MushroomPlatformTopLeftBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
MUSHROOM_PLATFORM_TOP_LEFT_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(MUSHROOM_PLATFORM_TOP_LEFT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MushroomPlatformTopMiddleBlock::MushroomPlatformTopMiddleBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
MUSHROOM_PLATFORM_TOP_MIDDLE_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(MUSHROOM_PLATFORM_TOP_MIDDLE_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MushroomPlatformTopRightBlock::MushroomPlatformTopRightBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
MUSHROOM_PLATFORM_TOP_RIGHT_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(MUSHROOM_PLATFORM_TOP_RIGHT_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MushroomPlatformBarkTopBlock::MushroomPlatformBarkTopBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
MUSHROOM_PLATFORM_BARK_TOP_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(MUSHROOM_PLATFORM_BARK_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MushroomPlatformBarkBottomBlock::MushroomPlatformBarkBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture,
|
|
|
|
MUSHROOM_PLATFORM_BARK_BOTTOM_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(MUSHROOM_PLATFORM_BARK_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
TreeBarkBlock::TreeBarkBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, TREE_BARK_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(TREE_BARK_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TreeLeavesSmallBlock::TreeLeavesSmallBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, TREE_LEAVES_SMALL_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(TREE_LEAVES_SMALL_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TreeLeavesTopBlock::TreeLeavesTopBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, TREE_LEAVES_TOP_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(TREE_LEAVES_TOP_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TreeLeavesBottomBlock::TreeLeavesBottomBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, TREE_LEAVES_BOTTOM_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(TREE_LEAVES_BOTTOM_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
CannonTowerBlock::CannonTowerBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CANNON_TOWER_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(CANNON_TOWER_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CannonPedestalBlock::CannonPedestalBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CANNON_PEDESTAL_SRC,
|
|
|
|
false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(CANNON_PEDESTAL_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 08:10:43 +00:00
|
|
|
CannonBlock::CannonBlock(int x, int y,
|
|
|
|
std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_terrain_texture, CANNON_SRC, false) {
|
2021-07-22 22:08:05 +00:00
|
|
|
ensureCollision();
|
2021-10-18 08:10:43 +00:00
|
|
|
setId(CANNON_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
|
|
|
|
2021-08-07 19:39:54 +00:00
|
|
|
DestructibleModifierBlock::DestructibleModifierBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_mod_texture, MOD_DESTRUCTIBLE_SRC,
|
|
|
|
false) {
|
|
|
|
setId(DESTRUCTIBLE_MODIFIER_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
2021-10-18 08:10:43 +00:00
|
|
|
|
2021-08-07 19:39:54 +00:00
|
|
|
BackgroundModifierBlock::BackgroundModifierBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_mod_texture, MOD_BACKGROUND_SRC, false) {
|
|
|
|
setId(BACKGROUND_MODIFIER_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|
2021-10-18 08:10:43 +00:00
|
|
|
|
2021-08-07 19:39:54 +00:00
|
|
|
MushroomModifierBlock::MushroomModifierBlock(
|
2021-10-18 08:10:43 +00:00
|
|
|
int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
|
|
|
|
: MarioBlock(x, y, renderer, g_mod_texture, MOD_MUSHROOM_SRC, false) {
|
|
|
|
setId(MUSHROOM_MODIFIER_ID);
|
2021-07-22 22:08:05 +00:00
|
|
|
}
|