[tiled] r585 - branches/bjorn branches/bjorn/src/tiled/core branches/bjorn/src/tiled/io/xml branches/bjorn/src/tiled/mapeditor branches/bjorn/src/tiled/mapeditor/dialogs branches/bjorn/src/tiled/mapeditor/widget branches/bjorn/src/tiled/view trunk/src/tiled/mapeditor/util

svn@biggeruniverse.com svn at biggeruniverse.com
Sat Feb 18 02:20:27 PST 2006


Author: bjorn
Date: 2006-02-18 04:20:26 -0600 (Sat, 18 Feb 2006)
New Revision: 585

Modified:
   branches/bjorn/SUGGESTIONS
   branches/bjorn/src/tiled/core/Map.java
   branches/bjorn/src/tiled/core/MultilayerPlane.java
   branches/bjorn/src/tiled/core/TileLayer.java
   branches/bjorn/src/tiled/core/TileSet.java
   branches/bjorn/src/tiled/io/xml/XMLMapTransformer.java
   branches/bjorn/src/tiled/mapeditor/MapEditor.java
   branches/bjorn/src/tiled/mapeditor/dialogs/ResizeDialog.java
   branches/bjorn/src/tiled/mapeditor/dialogs/TileDialog.java
   branches/bjorn/src/tiled/mapeditor/widget/ResizePanel.java
   branches/bjorn/src/tiled/view/HexMapView.java
   branches/bjorn/src/tiled/view/MapView.java
   branches/bjorn/src/tiled/view/OrthoMapView.java
   trunk/src/tiled/mapeditor/util/MapEventAdapter.java
Log:
Got rid of Map#getNullTile(), fixed some margins in ResizeDialog after internationalization and cleaned up ResizePanel a bit.

Modified: branches/bjorn/SUGGESTIONS
===================================================================
--- branches/bjorn/SUGGESTIONS	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/SUGGESTIONS	2006-02-18 10:20:26 UTC (rev 585)
@@ -155,3 +155,15 @@
             on their own "property"-layers? Things to consider are ease of use
             and flexibility. Also, is this functionality provided by objects?
 
+- 28 --------------------------------------------------------------------------
+Suggestor:  bjorn
+Date:       18/02/06
+Summary:    Removing of stupid features.
+State:      Discussed and partly in progress.
+Problems:   * Get rid of #getNullTile in favour of actually using null.
+            * Dump the whole tile image checksumming stuff in favour of
+              straightforward code and behaviour.
+            * Do not support embedding of tilesets or tile images and neither
+              multiple external individual tile images in a single tileset.
+            * Remove option for XML-based layer data storage.
+            * Do not support tile image rotation or flipping.

Modified: branches/bjorn/src/tiled/core/Map.java
===================================================================
--- branches/bjorn/src/tiled/core/Map.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/core/Map.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -21,7 +21,6 @@
 import tiled.mapeditor.util.MapChangeListener;
 import tiled.mapeditor.util.MapChangedEvent;
 
-
 /**
  * The Map class is the focal point of the <code>tiled.core</code> package.
  * This class also handles notifing listeners if there is a change to any layer
@@ -220,7 +219,7 @@
     }
 
     /**
-     * Calls super method, and additionally fires a MapChangedEvent.
+     * Calls super method, and additionally fires a {@link MapChangedEvent}.
      *
      * @see MultilayerPlane#removeLayer(int)
      */
@@ -247,7 +246,7 @@
 
     /**
      * Calls super method, and additionally fires a MapChangedEvent.
-     * 
+     *
      * @see MultilayerPlane#removeAllLayers
      */
 
@@ -334,15 +333,6 @@
     }
 
     /**
-     * Retrieves the designated "Blank" or "Null" tile
-     *
-     * @return Tile designated Null tile, or null by default
-     */
-    public Tile getNullTile() {
-        return null;
-    }
-
-    /**
      * Get the tile set that matches the given global tile id, only to be used
      * when loading a map.
      */
@@ -451,7 +441,7 @@
      * Returns the orientation of this map. Orientation will be one of
      * {@link Map#MDO_ISO}, {@link Map#MDO_ORTHO}, {@link Map#MDO_HEX},
      * {@link Map#MDO_OBLIQUE} and {@link Map#MDO_SHIFTED}.
-     * 
+     *
      * @return The orientation from the enumerated set
      */
     public int getOrientation() {

Modified: branches/bjorn/src/tiled/core/MultilayerPlane.java
===================================================================
--- branches/bjorn/src/tiled/core/MultilayerPlane.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/core/MultilayerPlane.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -15,15 +15,16 @@
 import java.awt.Rectangle;
 import java.util.*;
 
-
 /**
  * MultilayerPlane makes up the core functionality of both Maps and Brushes.
  * This class handles the order of layers as a group.
+ *
+ * @version $Id$
  */
 public class MultilayerPlane
 {
     private Vector layers;
-    protected int widthInTiles = 0, heightInTiles = 0;
+    protected int widthInTiles, heightInTiles;
 
     /**
      * Default constructor.
@@ -95,7 +96,7 @@
      * Adds the MapLayer <code>l</code> after the MapLayer <code>after</code>.
      *
      * @param l the layer to add
-     * @param after specifies the layer to add <code>l</code> after 
+     * @param after specifies the layer to add <code>l</code> after
      */
     public void addLayerAfter(MapLayer l, MapLayer after) {
         layers.add(layers.indexOf(after) + 1, l);

Modified: branches/bjorn/src/tiled/core/TileLayer.java
===================================================================
--- branches/bjorn/src/tiled/core/TileLayer.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/core/TileLayer.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -244,7 +244,7 @@
         for (int y = 0; y < bounds.height; y++) {
             for (int x = 0; x < bounds.width; x++) {
                 if (map[y][x] == tile) {
-                    setTileAt(x + bounds.x, y + bounds.y, myMap.getNullTile());
+                    setTileAt(x + bounds.x, y + bounds.y, null);
                 }
             }
         }
@@ -338,8 +338,8 @@
         for (int y = bounds.y; y < bounds.y + bounds.height; y++) {
             for (int x = bounds.x; x < bounds.x + bounds.width; x++) {
                 Tile tile = getTileAt(x, y);
-                if (myMap == null || tile != myMap.getNullTile()) {
-                    ((TileLayer)other).setTileAt(x, y, tile);
+                if (tile != null) {
+                    ((TileLayer) other).setTileAt(x, y, tile);
                 }
             }
         }
@@ -358,7 +358,7 @@
 
         for (int y = bounds.y; y < bounds.y + bounds.height; y++) {
             for (int x = bounds.x; x < bounds.x + bounds.width; x++) {
-                setTileAt(x, y, ((TileLayer)other).getTileAt(x, y));
+                setTileAt(x, y, ((TileLayer) other).getTileAt(x, y));
             }
         }
     }
@@ -379,7 +379,7 @@
         for (int y = boundBox.y; y < boundBox.y + boundBox.height; y++) {
             for (int x = boundBox.x; x < boundBox.x + boundBox.width; x++) {
                 if (mask.contains(x,y)) {
-                    setTileAt(x, y, ((TileLayer)other).getTileAt(x, y));
+                    setTileAt(x, y, ((TileLayer) other).getTileAt(x, y));
                 }
             }
         }
@@ -398,7 +398,7 @@
 
         for (int y = bounds.y; y < bounds.y + bounds.height; y++) {
             for (int x = bounds.x; x < bounds.x + bounds.width; x++) {
-                ((TileLayer)other).setTileAt(x, y, getTileAt(x, y));
+                ((TileLayer) other).setTileAt(x, y, getTileAt(x, y));
             }
         }
     }

Modified: branches/bjorn/src/tiled/core/TileSet.java
===================================================================
--- branches/bjorn/src/tiled/core/TileSet.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/core/TileSet.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -29,7 +29,6 @@
 
 import tiled.util.Util;
 
-
 /**
  * <p>TileSet handles operations on tiles as a set, or group. It has several
  * advanced internal functions aimed at reducing unnecessary data replication.
@@ -58,7 +57,7 @@
 {
     private String base;
     private Vector tiles;
-    private Hashtable images, orientedImages, imageCache;
+    private Hashtable images, imageCache;
     private int firstGid;
     private int tileHeight;
     private int tileWidth;
@@ -266,7 +265,7 @@
      * Removes a tile from this tileset. Does not invalidate other tile
      * indices. Removal is simply setting the reference at the specified
      * index to <b>null</b>
-     * 
+     *
      * @param i the index to remove
      */
     public void removeTile(int i) {
@@ -369,7 +368,7 @@
 
     /**
      * Returns the base directory for the tileset
-     * 
+     *
      * @return a directory in native format as given in the tileset file or tag
      */
     public String getBaseDir() {

Modified: branches/bjorn/src/tiled/io/xml/XMLMapTransformer.java
===================================================================
--- branches/bjorn/src/tiled/io/xml/XMLMapTransformer.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/io/xml/XMLMapTransformer.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -366,13 +366,13 @@
 	                                    trans.getWidth(null),
 	                                    trans.getHeight(null),
 	                                    BufferedImage.TYPE_INT_ARGB);
-	
+
 	                            img.getGraphics().drawImage(trans, 0, 0, null);
-	
+
 	                            set.importTileBitmap(img,
 	                                    tileWidth, tileHeight, tileSpacing,
 	                                    !hasTileElements);
-	
+
 	                            set.setTransparentColor(color);
 	                            set.setTilesetImageFilename(sourcePath);
                             } catch(IIOException iioe) {
@@ -542,7 +542,7 @@
                                     ml.setTileAt(x, y,
                                             ts.getTile(tileId - ts.getFirstGid()));
                                 } else {
-                                    ml.setTileAt(x, y, map.getNullTile());
+                                    ml.setTileAt(x, y, null);
                                 }
                             }
                         }
@@ -560,7 +560,7 @@
                                 ml.setTileAt(x, y,
                                         ts.getTile(tileId - ts.getFirstGid()));
                             } else {
-                                ml.setTileAt(x, y, map.getNullTile());
+                                ml.setTileAt(x, y, null);
                             }
 
                             x++;
@@ -692,7 +692,7 @@
         URL url = new URL(xmlFile);
         InputStream is = url.openStream();
 
-        // Wrap with GZIP decoder for .tmx.gz files 
+        // Wrap with GZIP decoder for .tmx.gz files
         if (filename.endsWith(".gz")) {
             is = new GZIPInputStream(is);
         }

Modified: branches/bjorn/src/tiled/mapeditor/MapEditor.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/MapEditor.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/mapeditor/MapEditor.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -714,7 +714,7 @@
 
     /**
      * Returns the currently selected tile.
-     * 
+     *
      * @return The currently selected tile.
      */
     public Tile getCurrentTile() {
@@ -723,7 +723,7 @@
 
     /**
      * Returns the current map.
-     * 
+     *
      * @return The currently selected map.
      */
     public Map getCurrentMap() {
@@ -732,7 +732,7 @@
 
     /**
      * Returns the currently selected layer.
-     * 
+     *
      * @return THe currently selected layer.
      */
     public MapLayer getCurrentLayer() {
@@ -741,7 +741,7 @@
 
     /**
      * Returns the main application frame.
-     * 
+     *
      * @return The frame of the main application
      */
     public Frame getAppFrame() {
@@ -871,8 +871,7 @@
                 case PS_ERASE:
                     paintEdit.setPresentationName("Erase");
                     if (layer instanceof TileLayer) {
-                        ((TileLayer)layer).setTileAt(tile.x, tile.y,
-                                                     currentMap.getNullTile());
+                        ((TileLayer) layer).setTileAt(tile.x, tile.y, null);
                     }
                     mapView.repaintRegion(new Rectangle(tile.x, tile.y, 1, 1));
                     break;
@@ -1564,7 +1563,7 @@
                     for (int i = area.y; i < area.height+area.y; i++) {
                         for (int j = area.x; j < area.width + area.x; j++){
                             if (mask.contains(j,i)) {
-                                tl.setTileAt(j, i, currentMap.getNullTile());
+                                tl.setTileAt(j, i, null);
                             }
                         }
                     }

Modified: branches/bjorn/src/tiled/mapeditor/dialogs/ResizeDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/ResizeDialog.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/ResizeDialog.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -5,7 +5,7 @@
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- * 
+ *
  *  Adam Turk <aturk at biggeruniverse.com>
  *  Bjorn Lindeijer <b.lindeijer at xs4all.nl>
  */
@@ -81,11 +81,13 @@
         GridBagConstraints c = new GridBagConstraints();
         c.anchor = GridBagConstraints.WEST;
         c.fill = GridBagConstraints.BOTH; c.weighty = 1;
-        c.insets = new Insets(5, 0, 0, 0);
+        c.insets = new Insets(5, 0, 0, 5);
         offsetPanel.add(new JLabel(X_LABEL), c);
         c.gridy = 1;
         offsetPanel.add(new JLabel(Y_LABEL), c);
-        c.gridx = 1; c.gridy = 0;
+        c.gridx = 1;
+        c.gridy = 0;
+        c.insets = new Insets(5, 0, 0, 0);
         offsetPanel.add(offsetX, c);
         c.gridy = 1;
         offsetPanel.add(offsetY, c);
@@ -102,12 +104,13 @@
         c = new GridBagConstraints();
         c.anchor = GridBagConstraints.WEST;
         c.fill = GridBagConstraints.BOTH; c.weighty = 1;
-        c.insets = new Insets(5, 0, 0, 0);
+        c.insets = new Insets(5, 0, 0, 5);
         newSizePanel.add(new JLabel(WIDTH_LABEL), c);
         c.gridy = 1;
         newSizePanel.add(new JLabel(HEIGHT_LABEL), c);
         c.fill = GridBagConstraints.HORIZONTAL;
         c.gridx = 1; c.gridy = 0; c.weightx = 1;
+        c.insets = new Insets(5, 0, 0, 0);
         newSizePanel.add(width, c);
         c.gridy = 1;
         newSizePanel.add(height, c);
@@ -120,7 +123,7 @@
         c = new GridBagConstraints();
         c.anchor = GridBagConstraints.EAST;
         c.fill = GridBagConstraints.BOTH; c.weighty = 1; c.weightx = 1;
-        c.insets = new Insets(5, 0, 0, 0);
+        c.insets = new Insets(5, 0, 0, 5);
         origSizePanel.add(new JLabel(WIDTH_LABEL), c);
         c.gridy = 1;
         origSizePanel.add(new JLabel(HEIGHT_LABEL), c);
@@ -195,7 +198,7 @@
             offsetY.setValue((int)(val / (currentMap.getTileHeight() * zoom)));
         }
     }
-    
+
     public void stateChanged(ChangeEvent e) {
         Object source = e.getSource();
 

Modified: branches/bjorn/src/tiled/mapeditor/dialogs/TileDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/TileDialog.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/TileDialog.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -5,7 +5,7 @@
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- * 
+ *
  *  Adam Turk <aturk at biggeruniverse.com>
  *  Bjorn Lindeijer <b.lindeijer at xs4all.nl>
  *  Rainer Deyke <rainerd at eldwood.com>
@@ -17,6 +17,7 @@
 import java.awt.event.*;
 import java.awt.image.BufferedImage;
 import java.io.File;
+import java.io.IOException;
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Properties;
@@ -30,7 +31,9 @@
 import tiled.mapeditor.util.*;
 import tiled.mapeditor.widget.*;
 
-
+/**
+ * @version $Id$
+ */
 public class TileDialog extends JDialog
     implements ActionListener, ListSelectionListener
 {
@@ -278,10 +281,10 @@
             return;
         }
 
-        File files[];
+        File[] files;
         JFileChooser ch = new JFileChooser(location);
         ch.setMultiSelectionEnabled(true);
-        BufferedImage image = null;
+        BufferedImage image;
 
         int ret = ch.showOpenDialog(this);
         files = ch.getSelectedFiles();
@@ -290,7 +293,7 @@
             try {
                 image = ImageIO.read(files[i]);
                 // TODO: Support for a transparent color
-            } catch (Exception e) {
+            } catch (IOException e) {
                 JOptionPane.showMessageDialog(this, e.getMessage(),
                         "Error!", JOptionPane.ERROR_MESSAGE);
                 return;
@@ -330,7 +333,6 @@
 
     public void queryTiles() {
         Vector listData;
-        int curSlot = 0;
 
         if (tileset != null && tileset.size() > 0) {
             listData = new Vector();
@@ -352,7 +354,6 @@
 
     public void queryImages() {
         Vector listData = new Vector();
-        int curSlot = 0;
 
         Enumeration ids = tileset.getImageIds();
         while(ids.hasMoreElements()) {
@@ -391,8 +392,8 @@
 
     private void updateEnabledState() {
         // boolean internal = (tileset.getSource() == null);
-        boolean tilebmp = (tileset.getTilebmpFile() != null);
-        boolean tileSelected = (currentTile != null);
+        boolean tilebmp = tileset.getTilebmpFile() != null;
+        boolean tileSelected = currentTile != null;
         boolean sharedImages = tileset.usesSharedImages();
         boolean atLeastOneSharedImage = sharedImages
           && tileset.getTotalImages() >= 1;
@@ -540,7 +541,7 @@
                 JOptionPane.YES_NO_OPTION,
                 JOptionPane.QUESTION_MESSAGE);
             if (answer == JOptionPane.YES_OPTION) {
-           
+
             	Enumeration ids = tileset.getImageIds();
                 while (ids.hasMoreElements()) {
                 	int id = Integer.parseInt((String)ids.nextElement());

Modified: branches/bjorn/src/tiled/mapeditor/widget/ResizePanel.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/ResizePanel.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/mapeditor/widget/ResizePanel.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -5,29 +5,31 @@
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- * 
+ *
  *  Adam Turk <aturk at biggeruniverse.com>
  *  Bjorn Lindeijer <b.lindeijer at xs4all.nl>
  */
 
 package tiled.mapeditor.widget;
 
-import java.awt.Point;
 import java.awt.Dimension;
-import java.awt.event.*;
+import java.awt.Point;
+import java.awt.event.MouseEvent;
+import javax.swing.BorderFactory;
+import javax.swing.JPanel;
+import javax.swing.OverlayLayout;
+import javax.swing.event.MouseInputAdapter;
 
-import javax.swing.*;
-
 import tiled.core.Map;
 import tiled.view.MapView;
 
-
 /**
  * A special widget designed as an aid for resizing the map. Based on a similar
  * widget used by the GIMP when resizing the image.
+ *
+ * @version $Id$
  */
-public class ResizePanel extends JPanel implements MouseListener,
-       MouseMotionListener
+public class ResizePanel extends JPanel
 {
     private MapView inner;
     private Map currentMap;
@@ -43,23 +45,27 @@
 
     public ResizePanel(Map map) {
         this();
-        inner = MapView.createViewforMap(map);
-        inner.addMouseListener(this);
-        inner.addMouseMotionListener(this);
-        add(inner);
         zoom = 0.1;
-        inner.setZoom(zoom);
         currentMap = map;
+
+        DragHandler dragHandler = new DragHandler();
+
+        inner = MapView.createViewforMap(map);
+        inner.setZoom(zoom);
+        inner.addMouseListener(dragHandler);
+        inner.addMouseMotionListener(dragHandler);
+        add(inner);
+
         Dimension old = inner.getPreferredSize();
         // TODO: get smaller dimension, zoom based on that...
-
         oldDim = old;
         setSize(old);
     }
 
     public ResizePanel(Dimension size, Map map) {
         this(map);
-        oldDim = newDim = size;
+        oldDim = size;
+        newDim = size;
         setSize(size);
     }
 
@@ -83,41 +89,31 @@
         return zoom;
     }
 
-    public void mouseClicked(MouseEvent e) {
-    }
-
-    public void mouseDragged(MouseEvent e) {		
-        int newOffsetX = offsetX + (e.getX() - startPress.x);
-        int newOffsetY = offsetY + (e.getY() - startPress.y);
-
-        newOffsetX /= currentMap.getTileWidth() * zoom;
-        newOffsetY /= currentMap.getTileHeight() * zoom;
-
-        if (newOffsetX != offsetX) {
-            firePropertyChange("offsetX", offsetX, newOffsetX);
-            offsetX = newOffsetX;
+    private class DragHandler extends MouseInputAdapter {
+        public void mousePressed(MouseEvent e) {
+            startPress = e.getPoint();
         }
 
-        if (newOffsetY != offsetY) {
-            firePropertyChange("offsetY", offsetY, newOffsetY);
-            offsetY = newOffsetY;
+        public void mouseReleased(MouseEvent e) {
+            startPress = null;
         }
-    }
 
-    public void mousePressed(MouseEvent e) {
-        startPress = e.getPoint();
-    }
+        public void mouseDragged(MouseEvent e) {
+            int newOffsetX = offsetX + (e.getX() - startPress.x);
+            int newOffsetY = offsetY + (e.getY() - startPress.y);
 
-    public void mouseReleased(MouseEvent e) {
-        startPress = null;
-    }
+            newOffsetX /= currentMap.getTileWidth() * zoom;
+            newOffsetY /= currentMap.getTileHeight() * zoom;
 
-    public void mouseEntered(MouseEvent e) {
-    }
+            if (newOffsetX != offsetX) {
+                firePropertyChange("offsetX", offsetX, newOffsetX);
+                offsetX = newOffsetX;
+            }
 
-    public void mouseExited(MouseEvent e) {
+            if (newOffsetY != offsetY) {
+                firePropertyChange("offsetY", offsetY, newOffsetY);
+                offsetY = newOffsetY;
+            }
+        }
     }
-
-    public void mouseMoved(MouseEvent e) {
-    }
 }

Modified: branches/bjorn/src/tiled/view/HexMapView.java
===================================================================
--- branches/bjorn/src/tiled/view/HexMapView.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/view/HexMapView.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -110,7 +110,7 @@
             for (int x = startX; x < endX; x++) {
                 Tile t = layer.getTileAt(x, y);
 
-                if (t != null && t != myMap.getNullTile()) {
+                if (t != null) {
                     if (layer.getClass() == SelectionLayer.class) {
                         g2d.fillPolygon(gridPoly);
                     } else {
@@ -176,7 +176,7 @@
                 grid.translate((int)(tileSize.getWidth() * .75), 0);
                 grid.translate(0,
                         -(int)((tileSize.getHeight() / 2) * (1 - x % 2)));
-            }            
+            }
         }
     }
 
@@ -303,7 +303,7 @@
 
     /**
      * Returns the location on screen for the given tile.
-     * 
+     *
      * @return The point at the centre of the Hex.
      */
     public Point tileToScreenCoords(double x, double y) {

Modified: branches/bjorn/src/tiled/view/MapView.java
===================================================================
--- branches/bjorn/src/tiled/view/MapView.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/view/MapView.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -292,10 +292,10 @@
     /**
      * Draws a TileLayer. Implemented in a subclass.
      *
-     * @param tileLayer the TileLayer to be drawn
-     * @param zoom      the zoom level to draw the layer on
+     * @param layer the TileLayer to be drawn
+     * @param zoom  the zoom level to draw the layer on
      */
-    protected abstract void paintLayer(Graphics2D g2d, TileLayer tileLayer,
+    protected abstract void paintLayer(Graphics2D g2d, TileLayer layer,
             double zoom);
 
     /**

Modified: branches/bjorn/src/tiled/view/OrthoMapView.java
===================================================================
--- branches/bjorn/src/tiled/view/OrthoMapView.java	2006-02-18 08:51:48 UTC (rev 584)
+++ branches/bjorn/src/tiled/view/OrthoMapView.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -89,7 +89,7 @@
                     x < endX; x++, gx += tsize.width) {
                 Tile tile = layer.getTileAt(x, y);
 
-                if (tile != null && tile != myMap.getNullTile()) {
+                if (tile != null) {
                     if (layer instanceof SelectionLayer) {
                         Polygon gridPoly = createGridPolygon(
                                 gx, gy - tsize.height, 0);

Modified: trunk/src/tiled/mapeditor/util/MapEventAdapter.java
===================================================================
--- trunk/src/tiled/mapeditor/util/MapEventAdapter.java	2006-02-18 08:51:48 UTC (rev 584)
+++ trunk/src/tiled/mapeditor/util/MapEventAdapter.java	2006-02-18 10:20:26 UTC (rev 585)
@@ -5,11 +5,11 @@
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- * 
+ *
  *  Adam Turk <aturk at biggeruniverse.com>
  *  Bjorn Lindeijer <b.lindeijer at xs4all.nl>
  */
- 
+
 package tiled.mapeditor.util;
 
 import java.awt.*;




More information about the tiled-commit mailing list