[tiled] r615 - in trunk/src/tiled: core io/xml mapeditor mapeditor/actions mapeditor/brush mapeditor/dialogs mapeditor/resources mapeditor/widget util
svn@biggeruniverse.com
svn at biggeruniverse.com
Mon Apr 24 11:39:50 PDT 2006
Author: bjorn
Date: 2006-04-24 13:39:49 -0500 (Mon, 24 Apr 2006)
New Revision: 615
Modified:
trunk/src/tiled/core/MapLayer.java
trunk/src/tiled/core/MultilayerPlane.java
trunk/src/tiled/core/TileLayer.java
trunk/src/tiled/core/TileSet.java
trunk/src/tiled/io/xml/XMLMapWriter.java
trunk/src/tiled/mapeditor/MapEditor.java
trunk/src/tiled/mapeditor/actions/SaveAsAction.java
trunk/src/tiled/mapeditor/brush/Brush.java
trunk/src/tiled/mapeditor/dialogs/BrushDialog.java
trunk/src/tiled/mapeditor/resources/gui.properties
trunk/src/tiled/mapeditor/resources/gui_nl.properties
trunk/src/tiled/mapeditor/widget/BrushBrowser.java
trunk/src/tiled/util/TileMergeHelper.java
trunk/src/tiled/util/TiledProperty.java
Log:
Removed "All Files" from the Save As dialog, added more Dutch translations and reintroduced the getBounds that creates a new Rectangle instance internally (that's not optimization, that's code duplication).
Modified: trunk/src/tiled/core/MapLayer.java
===================================================================
--- trunk/src/tiled/core/MapLayer.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/core/MapLayer.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -16,12 +16,11 @@
import java.awt.geom.Area;
import java.util.Properties;
-
/**
* A layer of a map.
*
- * @see tiled.core.Map
- * @see tiled.core.MultilayerPlane
+ * @see Map
+ * @see MultilayerPlane
*/
public abstract class MapLayer implements Cloneable
{
@@ -199,15 +198,22 @@
}
/**
- * Returns layer bounds in tiles.
- *
- * @param r
+ * Returns the layer bounds in tiles.
+ * @return the layer bounds in tiles
*/
- public void getBounds(Rectangle r) {
- r.setBounds(bounds);
+ public Rectangle getBounds() {
+ return new Rectangle(bounds);
}
/**
+ * Assigns the layer bounds in tiles to the given rectangle.
+ * @param rect the rectangle to which the layer bounds are assigned
+ */
+ public void getBounds(Rectangle rect) {
+ rect.setBounds(bounds);
+ }
+
+ /**
* A convenience method to check if a point in tile-space is within
* the layer boundaries.
*
@@ -250,8 +256,8 @@
/**
* Unlike mergeOnto, copyTo includes the null tile when merging
*
- * @see tiled.core.MapLayer#copyFrom
- * @see tiled.core.MapLayer#mergeOnto
+ * @see MapLayer#copyFrom
+ * @see MapLayer#mergeOnto
* @param other the layer to copy this layer to
*/
public abstract void copyTo(MapLayer other);
@@ -261,13 +267,12 @@
/**
* Creates a copy of this layer.
*
- * @see java.lang.Object#clone
+ * @see Object#clone
* @return a clone of this layer, as complete as possible
* @exception CloneNotSupportedException
*/
public Object clone() throws CloneNotSupportedException {
- MapLayer clone = null;
- clone = (MapLayer)super.clone();
+ MapLayer clone = (MapLayer) super.clone();
// Create a new bounds object
clone.bounds = new Rectangle(bounds);
Modified: trunk/src/tiled/core/MultilayerPlane.java
===================================================================
--- trunk/src/tiled/core/MultilayerPlane.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/core/MultilayerPlane.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -63,7 +63,7 @@
int height = 0;
Rectangle layerBounds = new Rectangle();
-
+
for (int i = 0; i < layers.size(); i++) {
getLayer(i).getBounds(layerBounds);
if (width < layerBounds.width) width = layerBounds.width;
@@ -77,10 +77,10 @@
/**
* Returns a <code>Rectangle</code> representing the maximum bounds in
* tiles.
- *
+ * @return a new rectangle containing the maximum bounds of this plane
*/
- public void getBounds(Rectangle r) {
- r.setBounds(bounds);
+ public Rectangle getBounds() {
+ return new Rectangle(bounds);
}
/**
@@ -105,7 +105,7 @@
}
/**
- * Add a layer at the specified index, which should be within
+ * Add a layer at the specified index, which should be within
* the valid range.
*
* @param index the position at which to add the layer
@@ -118,7 +118,7 @@
private void setLayer(int index, MapLayer layer) {
layers.set(index, layer);
}
-
+
/**
* Adds all the layers in a given java.util.Collection.
*
@@ -206,14 +206,14 @@
if (index - 1 < 0) {
throw new RuntimeException("Can't merge down bottom layer.");
}
-
- //TODO we're not accounting for different types of layers!!!
-
+
+ // TODO: We're not accounting for different types of layers!!!
+
TileLayer ntl = new TileLayer((TileLayer)getLayer(index - 1));
ntl.copyFrom(getLayer(index - 1));
getLayer(index).mergeOnto(ntl);
setLayer(index - 1, ntl);
-
+
//getLayer(index).mergeOnto(getLayer(index - 1));
removeLayer(index);
}
Modified: trunk/src/tiled/core/TileLayer.java
===================================================================
--- trunk/src/tiled/core/TileLayer.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/core/TileLayer.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -349,7 +349,7 @@
* Copy data from another layer onto this layer. Unlike mergeOnto,
* copyFrom() copies the empty cells as well.
*
- * @see tiled.core.MapLayer#mergeOnto
+ * @see MapLayer#mergeOnto
* @param other
*/
public void copyFrom(MapLayer other) {
@@ -366,7 +366,7 @@
/**
* Like copyFrom, but will only copy the area specified.
*
- * @see tiled.core.TileLayer#copyFrom(MapLayer)
+ * @see TileLayer#copyFrom(MapLayer)
* @param other
* @param mask
*/
@@ -388,8 +388,8 @@
/**
* Unlike mergeOnto, copyTo includes the null tile when merging
*
- * @see tiled.core.MapLayer#copyFrom
- * @see tiled.core.MapLayer#mergeOnto
+ * @see MapLayer#copyFrom
+ * @see MapLayer#mergeOnto
* @param other the layer to copy this layer to
*/
public void copyTo(MapLayer other) {
@@ -406,7 +406,7 @@
/**
* Creates a copy of this layer.
*
- * @see java.lang.Object#clone
+ * @see Object#clone
* @return a clone of this layer, as complete as possible
* @exception CloneNotSupportedException
*/
Modified: trunk/src/tiled/core/TileSet.java
===================================================================
--- trunk/src/tiled/core/TileSet.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/core/TileSet.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -42,7 +42,7 @@
private NumberedSet tiles, images;
private int firstGid;
private long tilebmpFileLastModified;
- private TileCutter myCutter;
+ private TileCutter tileCutter;
private Rectangle tileDimensions;
private String externalSource;
private File tilebmpFile;
@@ -100,8 +100,8 @@
assert (tilebmp != null);
assert (cutter != null);
- myCutter = cutter;
-
+ tileCutter = cutter;
+
tileDimensions = new Rectangle(cutter.getDimensions());
tileSetImage = tilebmp;
@@ -109,16 +109,16 @@
try {
BufferedImage tile;
- while ((tile = (BufferedImage) cutter.getNextTile()) != null) {
+ while ((tile = (BufferedImage) cutter.getNextTile()) != null) {
int newId = addImage(tile);
- if (createTiles) {
+ if (createTiles) {
Tile newTile = new Tile();
newTile.setImage(newId);
addNewTile(newTile);
}
- }
+ }
} catch (Exception e) {
- e.printStackTrace();
+ e.printStackTrace();
}
//FIXME: although faster, the following doesn't seem to handle alpha on some platforms...
@@ -145,12 +145,12 @@
}
public void checkUpdate() {
-
- if(tilebmpFile != null && tilebmpFile.lastModified() > tilebmpFileLastModified) {
-
- }
+ if (tilebmpFile != null &&
+ tilebmpFile.lastModified() > tilebmpFileLastModified)
+ {
+ }
}
-
+
/**
* Sets the URI path of the external source of this tile set. By setting
* this, the set is implied to be external in all other operations.
@@ -221,11 +221,11 @@
}
if (tileDimensions.width < t.getWidth()) {
- tileDimensions.width = t.getWidth();
+ tileDimensions.width = t.getWidth();
}
if (tileDimensions.height < t.getHeight()) {
- tileDimensions.height = t.getHeight();
+ tileDimensions.height = t.getHeight();
}
// Add any default properties
@@ -331,10 +331,10 @@
* tile exists with that id
*/
public Tile getTile(int i) {
- try {
- return (Tile)tiles.get(i);
- } catch (ArrayIndexOutOfBoundsException a) {}
- return null;
+ try {
+ return (Tile)tiles.get(i);
+ } catch (ArrayIndexOutOfBoundsException a) {}
+ return null;
}
/**
@@ -563,7 +563,7 @@
return true;
}
- public void setDefaultProperties(Properties defaultSetProperties) {
- defaultTileProperties = defaultSetProperties;
- }
+ public void setDefaultProperties(Properties defaultSetProperties) {
+ defaultTileProperties = defaultSetProperties;
+ }
}
Modified: trunk/src/tiled/io/xml/XMLMapWriter.java
===================================================================
--- trunk/src/tiled/io/xml/XMLMapWriter.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/io/xml/XMLMapWriter.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -324,8 +324,7 @@
prefs.getBoolean("layerCompression", true) &&
encodeLayerData;
- Rectangle bounds = new Rectangle();
- l.getBounds(bounds);
+ Rectangle bounds = l.getBounds();
if (l.getClass() == SelectionLayer.class) {
w.startElement("selection");
@@ -516,8 +515,7 @@
throws IOException
{
try {
- Rectangle b = new Rectangle();
- o.getBounds(b);
+ Rectangle b = o.getBounds();
w.startElement("object");
w.writeAttribute("x", m.getX() + b.x);
w.writeAttribute("y", m.getY() + b.y);
Modified: trunk/src/tiled/mapeditor/MapEditor.java
===================================================================
--- trunk/src/tiled/mapeditor/MapEditor.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/mapeditor/MapEditor.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -977,23 +977,20 @@
updateCursorHighlight(tile);
}
-
+
private void updateCursorHighlight(Point tile) {
if (prefs.getBoolean("cursorhighlight", true)) {
- Rectangle redraw = new Rectangle();
- Rectangle brushRedraw = new Rectangle();
-
- cursorHighlight.getBounds(redraw);
- currentBrush.getBounds(brushRedraw);
- brushRedraw.x = tile.x-brushRedraw.width/2;
- brushRedraw.y = tile.y-brushRedraw.height/2;
+ Rectangle redraw = cursorHighlight.getBounds();
+ Rectangle brushRedraw = currentBrush.getBounds();
+ brushRedraw.x = tile.x - brushRedraw.width / 2;
+ brushRedraw.y = tile.y - brushRedraw.height / 2;
+
if (!redraw.equals(brushRedraw)) {
mapView.repaintRegion(redraw);
cursorHighlight.setOffset(brushRedraw.x, brushRedraw.y);
mapView.repaintRegion(brushRedraw);
}
-
}
}
@@ -1363,9 +1360,7 @@
}
marqueeSelection = new SelectionLayer(
currentMap.getWidth(), currentMap.getHeight());
- Rectangle r = new Rectangle();
- marqueeSelection.getBounds(r);
- marqueeSelection.selectRegion(r);
+ marqueeSelection.selectRegion(marqueeSelection.getBounds());
currentMap.addLayerSpecial(marqueeSelection);
}
}
Modified: trunk/src/tiled/mapeditor/actions/SaveAsAction.java
===================================================================
--- trunk/src/tiled/mapeditor/actions/SaveAsAction.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/mapeditor/actions/SaveAsAction.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -65,8 +65,16 @@
{
// Start at the location of the most recently loaded map file
String startLocation = TiledConfiguration.node("recent").get("file0", "");
+
+ TiledFileFilter byExtensionFilter =
+ new TiledFileFilter(TiledFileFilter.FILTER_EXT);
+ TiledFileFilter tmxFilter =
+ new TiledFileFilter(TiledFileFilter.FILTER_TMX);
+
JFileChooser chooser = new ConfirmingFileChooser(startLocation);
- chooser.setDialogTitle(Resources.getString("dialog.saveas.title"));
+ chooser.addChoosableFileFilter(byExtensionFilter);
+ chooser.addChoosableFileFilter(tmxFilter);
+ chooser.setFileFilter(byExtensionFilter);
MapWriter[] writers = editor.getPluginLoader().getWriters();
for (int i = 0; i < writers.length; i++) {
@@ -77,11 +85,6 @@
}
}
- chooser.addChoosableFileFilter(
- new TiledFileFilter(TiledFileFilter.FILTER_TMX));
- chooser.addChoosableFileFilter(
- new TiledFileFilter(TiledFileFilter.FILTER_EXT));
-
int result = chooser.showSaveDialog(editor.getAppFrame());
if (result == JFileChooser.APPROVE_OPTION)
{
@@ -154,6 +157,8 @@
{
public ConfirmingFileChooser(String currentDirectoryPath) {
super(currentDirectoryPath);
+ setAcceptAllFileFilterUsed(false);
+ setDialogTitle(Resources.getString("dialog.saveas.title"));
}
public void approveSelection ()
@@ -203,7 +208,6 @@
// Confirm overwrite if the file happens to exist already
if (file.exists())
{
-
int answer = JOptionPane.showConfirmDialog(
editor.getAppFrame(),
FILE_EXISTS_MESSAGE, FILE_EXISTS_TITLE,
Modified: trunk/src/tiled/mapeditor/brush/Brush.java
===================================================================
--- trunk/src/tiled/mapeditor/brush/Brush.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/mapeditor/brush/Brush.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -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>
*/
@@ -23,7 +23,7 @@
{
/**
* Returns the number of layers affected by this brush.
- *
+ *
* @return int
*/
public int getAffectedLayers();
@@ -31,10 +31,8 @@
/**
* Returns the bounds of this brush. This is used for determining the area
* to redraw when the brush moves.
- *
- * @param r
*/
- public void getBounds(Rectangle r);
+ public Rectangle getBounds();
/**
* Called before painting operation starts. This is when the mouse is
@@ -60,7 +58,7 @@
*
* @return the rectangular region affected by the painting, used to
* determine which area to redraw.
- * @throws Exception
+ * @throws Exception
*/
public Rectangle doPaint(int x, int y) throws Exception;
@@ -71,13 +69,13 @@
public void endPaint();
/**
- * Draws a preview of the editing operation when applicable. This version
+ * Draws a preview of the editing operation when applicable. This version
* will draw the preview at the specified location.
*
* @param g2d The graphics context to draw to.
* @param x The x-coord to draw the preview at
* @param y The y-coord to draw the preview at
- * @param mv
+ * @param mv
*/
public void drawPreview(Graphics2D g2d, int x, int y, MapView mv);
@@ -85,14 +83,14 @@
* Draws a preview of the editing operation when applicable.
*
* @param g2d The graphics context to draw to.
- * @param mv
+ * @param mv
*/
public void drawPreview(Graphics2D g2d, MapView mv);
/**
* Returns wether this brush equals another brush.
- *
- * @param brush
+ *
+ * @param brush
* @return boolean
*/
public boolean equals(Brush brush);
Modified: trunk/src/tiled/mapeditor/dialogs/BrushDialog.java
===================================================================
--- trunk/src/tiled/mapeditor/dialogs/BrushDialog.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/mapeditor/dialogs/BrushDialog.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -63,7 +63,7 @@
private static final String CANCEL_BUTTON = Resources.getString("general.button.cancel");
private static final String SHAPE_TAB = Resources.getString("dialog.brush.tab.shape");
private static final String CUSTOM_TAB = Resources.getString("dialog.brush.tab.custom");
-
+
public BrushDialog(MapEditor editor, JFrame parent,
AbstractBrush currentBrush)
{
@@ -96,8 +96,7 @@
// Brush size
brushSize = new IntegerSpinner(1, 1);
if (myBrush != null) {
- Rectangle r = new Rectangle();
- myBrush.getBounds(r);
+ Rectangle r = myBrush.getBounds();
brushSize.setValue(r.width);
}
brushSize.addChangeListener(this);
@@ -313,9 +312,7 @@
if (evt.getPropertyName().equals("selectedbrush")) {
Brush b = brushes.getSelectedBrush();
if (b != null) {
- Rectangle r = new Rectangle();
- b.getBounds(r);
- brushSize.setValue(r.width);
+ brushSize.setValue(b.getBounds().width);
}
}
Modified: trunk/src/tiled/mapeditor/resources/gui.properties
===================================================================
--- trunk/src/tiled/mapeditor/resources/gui.properties 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/mapeditor/resources/gui.properties 2006-04-24 18:39:49 UTC (rev 615)
@@ -118,7 +118,7 @@
general.button.preview=Preview...
general.file.exists.message=The file already exists. Do you wish to overwrite it?
general.file.exists.title=Overwrite file?
-general.file.notexists.message=File does not exist
+general.file.notexists.message=File does not exist.
general.file.untitled=Untitled
general.maptype.hexagonal=Hexagonal (experimental)
general.maptype.isometric=Isometric
Modified: trunk/src/tiled/mapeditor/resources/gui_nl.properties
===================================================================
--- trunk/src/tiled/mapeditor/resources/gui_nl.properties 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/mapeditor/resources/gui_nl.properties 2006-04-24 18:39:49 UTC (rev 615)
@@ -17,6 +17,18 @@
action.layer.movedown.tooltip=Laag een positie naar beneden verplaatsen
action.layer.moveup.name=Laag Omhoog
action.layer.moveup.tooltip=Laag een positie naar boven verplaatsen
+action.main.exit.name=Afsluiten
+action.main.exit.tooltip=Map editor afsluiten
+action.map.close.name=Sluiten
+action.map.close.tooltip=Sluit deze map
+action.map.new.name=Nieuw...
+action.map.new.tooltip=Begin een nieuwe map
+action.map.open.name=Open...
+action.map.open.tooltip=Open een map
+action.map.save.name=Opslaan
+action.map.save.tooltip=Sla de map op
+action.map.saveas.name=Opslaan Als...
+action.map.saveas.tooltip=Sla deze map op onder een nieuwe naam
action.paste.name=Plakken
action.paste.tooltip=Plakken van klembord
action.select.all.name=Alles
@@ -33,6 +45,7 @@
action.zoom.normal.tooltip=Zoom 100%
action.zoom.out.name=Zoom Uit
action.zoom.out.tooltip=Een niveau uitzoomen
+dialog.brush.tab.shape=Vorm
dialog.brush.title=Penseel Opties
dialog.imagecolor.title=Kleurkiezer
dialog.main.opacity.label=Ondoorschijnend:
@@ -43,6 +56,7 @@
dialog.newmap.tilesize.title=Tile formaat
dialog.newmap.title=Nieuwe Map
dialog.newmap.width.label=Breedte:
+dialog.newtile.title=Nieuwe Tile
dialog.newtileset.autotiles.label=Maak automatisch tiles van de plaatjes
dialog.newtileset.button.properties=Standaard Eigenschappen...
dialog.newtileset.colorchoose.error.title=Fout tijdens het kiezen van de kleur
@@ -57,7 +71,6 @@
dialog.newtileset.tilewidth.label=Tile breedte:
dialog.newtileset.title=Nieuwe Tileset
dialog.newtileset.usetransparentcolor.label=Gebruik transparante kleur
-dialog.newtile.title=Nieuwe Tile
dialog.openmap.error.title=Fout tijdens het openen van de map
dialog.plugins.info.button=Info
dialog.plugins.remove.button=Verwijderen
@@ -78,9 +91,11 @@
dialog.resizemap.width.label=Breedte:
dialog.resizemap.x.label=X:
dialog.resizemap.y.label=Y:
+dialog.saveas.confirm.mismatch.title=Opslaan forceren?
dialog.saveas.confirm.mismatch=De bestandsextensie past niet bij de plugin. Toch doorgaan?
dialog.saveas.error.message=Fout tijdens het opslaan
dialog.saveas.error.title=Fout tijdens het opslaan van de map
+dialog.saveas.title=Opslaan Als
dialog.saveas.unknown-type.message=Fout tijdens opslaan, onbekend type
dialog.tile.button.animation=Animatie
dialog.tile.button.changeimage=Verander Afbeelding
@@ -88,11 +103,11 @@
dialog.tile.button.deletetile=Tile Verwijderen
dialog.tile.button.duptile=Tile Dupliceren
dialog.tile.button.newtile=Tile Toevoegen
+dialog.tile.imgload.error.message=Fout tijdens het openen van de afbeelding:
+dialog.tile.imgload.error.title=Fout tijdens het openen van de afbeelding
+dialog.tile.title=Tileset Bewerken
dialog.tileimage.title=Kies Tile Afbeelding
-dialog.tile.imgload.error.message=Fout tijdens het openen van de afbeelding:
-dialog.tile.imgload.error.title=Fout tijdens het openen van de afbeelding:
dialog.tilepalette.title=Palet
-dialog.tile.title=Tileset Bewerken
general.button.apply=Toepassen
general.button.browse=Bladeren...
general.button.cancel=Annuleren
@@ -102,7 +117,7 @@
general.button.preview=Voorbeeld...
general.file.exists.message=Een bestand met dezelfde naam bestaat al. Wil je deze overschrijven?
general.file.exists.title=Bestand overschrijven?
-general.file.notexists.message=Bestand bestaat niet
+general.file.notexists.message=Bestand bestaat niet.
general.file.untitled=Naamloos
general.maptype.hexagonal=Hexagonaal (experimenteel)
general.maptype.isometric=Isometrisch
Modified: trunk/src/tiled/mapeditor/widget/BrushBrowser.java
===================================================================
--- trunk/src/tiled/mapeditor/widget/BrushBrowser.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/mapeditor/widget/BrushBrowser.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -99,12 +99,11 @@
g.setColor(Color.black);
// Draw the brushes
- Rectangle bb = new Rectangle();
Iterator itr = brushes.iterator();
int x = 0, y = 0;
while (itr.hasNext()) {
Brush b = (Brush)itr.next();
- b.getBounds(bb);
+ //Rectangle bb = b.getBounds();
b.drawPreview((Graphics2D) g, null);
// x + (maxWidth / 2 - bb.width / 2),
// y + (maxWidth / 2 - bb.width / 2));
Modified: trunk/src/tiled/util/TileMergeHelper.java
===================================================================
--- trunk/src/tiled/util/TileMergeHelper.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/util/TileMergeHelper.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -29,7 +29,8 @@
/**
* @version $Id$
*/
-public class TileMergeHelper {
+public class TileMergeHelper
+{
private Map myMap;
private TileSet myTs;
private TileLayer mergedLayer;
@@ -43,8 +44,7 @@
}
public TileLayer merge(int start, int len, boolean all) {
- Rectangle r = new Rectangle();
- myMap.getBounds(r);
+ Rectangle r = myMap.getBounds();
mergedLayer = new TileLayer(r);
for (int i = 0; i < r.height; i++) {
Modified: trunk/src/tiled/util/TiledProperty.java
===================================================================
--- trunk/src/tiled/util/TiledProperty.java 2006-04-24 06:59:44 UTC (rev 614)
+++ trunk/src/tiled/util/TiledProperty.java 2006-04-24 18:39:49 UTC (rev 615)
@@ -1,24 +1,38 @@
+/*
+ * Tiled Map Editor, (c) 2004-2006
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * 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.util;
-public class TiledProperty {
+/**
+ * @version $Id$
+ */
+public class TiledProperty
+{
+ private String value;
+ private String min;
+ private String max;
+ private String type;
- private String value,
- min,
- max,
- type;
-
- public TiledProperty() {
- }
-
- public TiledProperty(String value, String min, String max, String type) {
- set(value, min, max, type);
- }
-
- public void set(String value, String min, String max, String type) {
- this.value = value;
- this.min = min;
- this.max = max;
- this.type = type;
- }
-
+ public TiledProperty() {
+ }
+
+ public TiledProperty(String value, String min, String max, String type) {
+ set(value, min, max, type);
+ }
+
+ public void set(String value, String min, String max, String type) {
+ this.value = value;
+ this.min = min;
+ this.max = max;
+ this.type = type;
+ }
}
Property changes on: trunk/src/tiled/util/TiledProperty.java
___________________________________________________________________
Name: svn:keywords
+ Id
More information about the tiled-commit
mailing list