selection_end = selection_ini = Vector(0,0);
left_button = middle_button = mouse_moved = false;
level = 0;
selection_end = selection_ini = Vector(0,0);
left_button = middle_button = mouse_moved = false;
level = 0;
// don't scroll before the start or after the level's end
float width = sector->solids->get_width() * 32;
float height = sector->solids->get_height() * 32;
// don't scroll before the start or after the level's end
float width = sector->solids->get_width() * 32;
float height = sector->solids->get_height() * 32;
void LevelEditor::change(int x, int y, int newtile, int layer)
{
void LevelEditor::change(int x, int y, int newtile, int layer)
{
// find the tilemap of the current layer, and then change the tile
if(x < 0 || (unsigned int)x >= sector->solids->get_width()*32 ||
y < 0 || (unsigned int)y >= sector->solids->get_height()*32)
// find the tilemap of the current layer, and then change the tile
if(x < 0 || (unsigned int)x >= sector->solids->get_width()*32 ||
y < 0 || (unsigned int)y >= sector->solids->get_height()*32)