diff --git a/mario/editor.cpp b/mario/editor.cpp index f378f2a..9fd5e0e 100644 --- a/mario/editor.cpp +++ b/mario/editor.cpp @@ -172,9 +172,9 @@ void pollEvents( SDLPP::Scene &scene ) { } } if(current_tool_box.getX() != -1) { - auto index = current_tool_index + current_tool_box.getY() * 4 + current_tool_box.getX(); + auto index = current_tool_box.getY() * 4 + current_tool_box.getX(); if(index < tools.size()) { - current_block = (current_tool_index * 8 - 1) + index; + current_block = current_tool_index * 8 + index; updateTool(); } }