Mario editor: formatting
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user