Mario editor: formatting

This commit is contained in:
2021-05-09 00:46:10 +02:00
parent b54ba5034c
commit 83cda5f860
8 changed files with 595 additions and 458 deletions
+10 -8
View File
@@ -30,30 +30,30 @@ void MouseVisitor::visit( const SDLPP::RenderObject &obj ) {
break;
case EDITOR_EDIT_SQUARE:
edit_box = true;
edit_box_location = dynamic_cast<const EditBox&>(obj).getIndexes();
edit_box_location = dynamic_cast< const EditBox & >( obj ).getIndexes();
break;
case EDITOR_TOOL_ID:
tool_box = true;
tool_box_location = dynamic_cast<const ToolBox&>(obj).getIndexes();
tool_box_location = dynamic_cast< const ToolBox & >( obj ).getIndexes();
break;
default:
break;
}
}
bool MouseVisitor::moveMapLeft(uint64_t flags) {
bool MouseVisitor::moveMapLeft( uint64_t flags ) {
return flags & SELECTED_LEFT_MAP;
}
bool MouseVisitor::moveMapRight(uint64_t flags) {
bool MouseVisitor::moveMapRight( uint64_t flags ) {
return flags & SELECTED_RIGHT_MAP;
}
bool MouseVisitor::moveToolsLeft(uint64_t flags) {
bool MouseVisitor::moveToolsLeft( uint64_t flags ) {
return flags & SELECTED_LEFT_TOOL;
}
bool MouseVisitor::moveToolsRight(uint64_t flags) {
bool MouseVisitor::moveToolsRight( uint64_t flags ) {
return flags & SELECTED_RIGHT_TOOL;
}
@@ -62,12 +62,14 @@ void ToolVisitor::visit( const SDLPP::RenderObject &obj ) {
switch ( id ) {
case EDITOR_TERRAIN_ID:
remove_block = true;
if(obj.getId() == source_id && getVisitorType() == VisitorType::Terrain) {
if ( obj.getId() == source_id &&
getVisitorType() == VisitorType::Terrain ) {
add_block = false;
}
case EDITOR_CHARACTER_ID:
remove_block = true;
if(obj.getId() == source_id && getVisitorType() == VisitorType::Modifier) {
if ( obj.getId() == source_id &&
getVisitorType() == VisitorType::Modifier ) {
add_block = false;
}
default: