Mario: use .a library instead of dynamic

This commit is contained in:
2021-05-25 16:34:44 +02:00
parent df61983f55
commit 91df7c3f63
2 changed files with 18 additions and 28 deletions
+3
View File
@@ -15,6 +15,7 @@ MarioBlock::MarioBlock( int x, int y,
_destructible = destructible;
}
void MarioBlock::visit( SDLPP::Visitor &visitor ) {
#ifdef EDITOR
if ( !_tool && _terrain &&
visitor.getVisitorType() == VisitorType::Terrain ) {
destroy();
@@ -23,9 +24,11 @@ void MarioBlock::visit( SDLPP::Visitor &visitor ) {
visitor.getVisitorType() == VisitorType::Modifier ) {
destroy();
}
#else
if(visitor.getFromId() == MARIO_TOP_DETECT && _destructible && dynamic_cast<MarioVisitor&>(visitor).canDestroy()) {
destroy();
}
#endif
visitor.visit( *this );
}
void MarioBlock::setTool( bool tool ) {