diff --git a/src/main/java/galaxyoyo/unknown/editor/MapPanel.java b/src/main/java/galaxyoyo/unknown/editor/MapPanel.java index 8da5ab2..9785292 100644 --- a/src/main/java/galaxyoyo/unknown/editor/MapPanel.java +++ b/src/main/java/galaxyoyo/unknown/editor/MapPanel.java @@ -41,33 +41,33 @@ public class MapPanel extends JPanel g.drawImage(getMap().getFont(), x, y, width, height, null); for (Case c : getMap().getAllCases()) - { - if (isEmpty(c.getCoucheOne().getImage())) - continue; - + { // BufferedImage image; - g.drawImage(c.getCoucheOne().getImage(), x + c.getPosX() * 34 + 2, y + c.getPosY() * 34 + 2, 32, 32, null); + if (!isEmpty(c.getCoucheOne().getImage())) + { + g.drawImage(c.getCoucheOne().getImage(), x + c.getPosX() * 34 + 2, y + c.getPosY() * 34 + 2, 32, 32, null); + } /* if (frame.getSelectedLayerIndex() != 0) { image = recalculateAplha(c.getCoucheOne().getImage(), 0); g.drawImage(image, x + c.getPosX() * 34 + 2, y + c.getPosY() * 34 + 2, 32, 32, null); }*/ - if (isEmpty(c.getCoucheTwo().getImage()) || (frame.getSelectedLayerIndex() != 1 && frame.getSelectedLayerIndex() != 2)) - continue; - - g.drawImage(c.getCoucheTwo().getImage(), x + c.getPosX() * 34 + 2, y + c.getPosY() * 34 + 2, 32, 32, null); + if (!isEmpty(c.getCoucheTwo().getImage()) || (frame.getSelectedLayerIndex() != 1 && frame.getSelectedLayerIndex() != 2)) + { + g.drawImage(c.getCoucheTwo().getImage(), x + c.getPosX() * 34 + 2, y + c.getPosY() * 34 + 2, 32, 32, null); + } /* if (frame.getSelectedLayerIndex() != 1) { image = recalculateAplha(c.getCoucheTwo().getImage(), 1); g.drawImage(image, x + c.getPosX() * 34 + 2, y + c.getPosY() * 34 + 2, 32, 32, null); }*/ - if (isEmpty(c.getCoucheThree().getImage()) || frame.getSelectedLayerIndex() != 2) - continue; - - g.drawImage(c.getCoucheThree().getImage(), x + c.getPosX() * 34 + 2, y + c.getPosY() * 34 + 2, 32, 32, null); + if (!isEmpty(c.getCoucheThree().getImage()) || frame.getSelectedLayerIndex() != 2) + { + g.drawImage(c.getCoucheThree().getImage(), x + c.getPosX() * 34 + 2, y + c.getPosY() * 34 + 2, 32, 32, null); + } /* if (frame.getSelectedLayerIndex() != 2) { image = recalculateAplha(c.getCoucheThree().getImage(), 2); diff --git a/src/main/java/galaxyoyo/unknown/frame/listeners/MapMouseListener.java b/src/main/java/galaxyoyo/unknown/frame/listeners/MapMouseListener.java index 99812e2..783fd25 100644 --- a/src/main/java/galaxyoyo/unknown/frame/listeners/MapMouseListener.java +++ b/src/main/java/galaxyoyo/unknown/frame/listeners/MapMouseListener.java @@ -38,10 +38,7 @@ public class MapMouseListener extends MouseAdapter if ((c = map.getCase((event.getX() - x + 2) / 34, (event.getY() - y + 2) / 34)) != null && event.getX() - x >= 2 && event.getY() - y >= 2) { if (getFrame().getSelectedSprite() != null) - { - if (getFrame().getSelectedSprite().getCouche() - 1 > getFrame().getSelectedLayerIndex()) - return; - + { Case n; switch (getFrame().getSelectedSprite().getCouche())