Compare commits

..

No commits in common. "f0182cf4d4d34d04672a37a1a643fdadcb21c014" and "c453c2fe9acf9a7829a1420760846767edf5fc9e" have entirely different histories.

11 changed files with 1 additions and 38 deletions

View File

@ -73,14 +73,12 @@ target_sources(mario
PRIVATE visitors/mario_visitor.cpp
PRIVATE visitors/mushroom_visitor.cpp
PRIVATE visitors/goomba_visitor.cpp
PRIVATE visitors/turtle_visitor.cpp
PRIVATE visitors/bounce_visitor.cpp
PRIVATE visitors/visitor_generator.cpp
PRIVATE visitors/projectile_visitor.cpp
PRIVATE blocks/coinblock.cpp
PRIVATE blocks/mushroomblock.cpp
PRIVATE blocks/goombablock.cpp
PRIVATE blocks/turtleblock.cpp
PRIVATE blocks/fireball.cpp
PRIVATE scenes/load_scene.cpp
PRIVATE scenes/game_main_menu.cpp
@ -93,7 +91,6 @@ target_sources(editor
PRIVATE ${CommonFiles}
PRIVATE blocks/coineditorblock.cpp
PRIVATE blocks/goombablock.cpp
PRIVATE blocks/turtleblock.cpp
PRIVATE editor.cpp
PRIVATE edit_box.cpp
PRIVATE tool_box.cpp

View File

@ -13,7 +13,6 @@
#include "blocks/coinblock.hpp"
#include "blocks/mushroomblock.hpp"
#include "blocks/goombablock.hpp"
#include "blocks/turtleblock.hpp"
#include "mario.hpp"
#define CAN_BE_DESTROYED_FLAG 0x0000000000000001
@ -323,7 +322,6 @@ const std::vector<uint64_t> possibleMods = {
const std::vector<uint64_t> possibleCharacters = {
MARIO_ID,
GOOMBA_ID,
TURTLE_ID,
};
const std::vector<LandType::Value> possibleLands = {
@ -575,10 +573,6 @@ createBlockById(uint64_t id, int x, int y,
result = std::static_pointer_cast<MarioBlock>(
std::make_shared<GoombaBlock>(x, y, renderer));
break;
case TURTLE_ID:
result = std::static_pointer_cast<MarioBlock>(
std::make_shared<TurtleBlock>(x, y, renderer));
break;
#ifdef EDITOR
case DESTRUCTIBLE_MODIFIER_ID:
result = std::static_pointer_cast<MarioBlock>(

View File

@ -371,7 +371,6 @@ SceneStruct mainGameScene(const std::string &level_path) {
moving_objects.push_back(mario);
std::unordered_set<int> moving_object_ids = {
GOOMBA_ID,
TURTLE_ID,
};
for (auto &obj : scene->getObjects(moving_object_ids)) {
moving_objects.push_back(std::dynamic_pointer_cast<MarioBlock>(obj));

View File

@ -74,7 +74,6 @@
// character IDs
#define MARIO_ID 0x0F
#define GOOMBA_ID 0x0E
#define TURTLE_ID 0x0D
#define DEATH_ID 0x1001
#define STOP_MOVEMENT 0x2000

View File

@ -111,8 +111,3 @@ const SDLPP::Vec2D<uint64_t> BOWSER_SHIFT = { 0, 173 };
const std::vector<SDL_Rect> GOOMBA_WALK_ANIM = { { 1, 28, 16, 16 },
{ 18, 28, 16, 16 } };
const SDL_Rect GOOMBA_DEATH_SRC = { 39, 28, 16, 16 };
const std::vector<SDL_Rect> TURTLE_WALK_ANIM = { { 60, 12, 16, 32 },
{ 77, 12, 16, 32 } };
const std::vector<SDL_Rect> TURTLE_SHELL_ANIM = { { 136, 28, 16, 16},
{ 136, 28, 16, 16},
{ 153, 28, 16, 16} };

View File

@ -107,8 +107,6 @@ extern const SDL_Rect MOD_TELEPORT_SRC;
//------------------ ENEMIES -------------------------
extern const SDL_Rect GOOMBA_DEATH_SRC;
extern const std::vector<SDL_Rect> GOOMBA_WALK_ANIM;
extern const std::vector<SDL_Rect> TURTLE_WALK_ANIM;
extern const std::vector<SDL_Rect> TURTLE_SHELL_ANIM;
extern const SDLPP::Vec2D<uint64_t> OVERWORLD_SHIFT;
extern const SDLPP::Vec2D<uint64_t> UNDERWORLD_SHIFT;

View File

@ -3,7 +3,6 @@
#include "../objectids.hpp"
#include "../sprites.hpp"
#include "../mario.hpp"
#include "../blocks/turtleblock.hpp"
void GoombaVisitor::visit(const SDLPP::RenderObject &obj) {
auto id = obj.getId();
@ -48,15 +47,7 @@ void GoombaVisitor::visit(const SDLPP::RenderObject &obj) {
}
break;
case DEATH_ID:
instant_death = true;
break;
case TURTLE_ID:
{
auto &turtle = dynamic_cast<const TurtleBlock &>(obj);
if(turtle.isShell() && turtle.getMovement().getX() != 0) {
death = true;
}
}
break;
case MARIO_ID:
{

View File

@ -62,7 +62,6 @@ void MarioVisitor::visit(const SDLPP::RenderObject &obj) {
_instant_death = true;
break;
case GOOMBA_ID:
case TURTLE_ID:
if (from != MARIO_FLOOR_DETECT && from != MARIO_ENEMY_DETECT) {
_death = true;
} else if (from == MARIO_FLOOR_DETECT || from == MARIO_ENEMY_DETECT) {

View File

@ -46,7 +46,6 @@ void ProjectileVisitor::visit(const SDLPP::RenderObject &obj) {
}
break;
case GOOMBA_ID:
case TURTLE_ID:
death = true;
default:
break;

View File

@ -3,7 +3,6 @@
#include "mario_visitor.hpp"
#include "mushroom_visitor.hpp"
#include "goomba_visitor.hpp"
#include "turtle_visitor.hpp"
#include "projectile_visitor.hpp"
#include "../mario.hpp"
@ -30,10 +29,6 @@ getVisitor(const MarioBlock &block, SDLPP::Scene &scene,
result = std::static_pointer_cast<SDLPP::Visitor>(
std::make_shared<GoombaVisitor>(block.getPos()));
break;
case TURTLE_ID:
result = std::static_pointer_cast<SDLPP::Visitor>(
std::make_shared<TurtleVisitor>(block.getPos()));
break;
case FIREBALL_ID:
result = std::static_pointer_cast<SDLPP::Visitor>(
std::make_shared<ProjectileVisitor>());

View File

@ -119,9 +119,6 @@ Scene::getCollisions( RenderObject &r ) {
return {};
std::vector< std::pair< uint64_t, std::shared_ptr< RenderObject > > > ret{};
for ( const auto &x : collision_objects ) {
if(x.get() == &r) {
continue;
}
for ( auto id : r.colidesWith( *x ) ) {
ret.emplace_back( id, x );
}