[tiled] r564 - tags tags/0.5.2 trunk/tiled/core trunk/tiled/io trunk/tiled/mapeditor/selection

svn@biggeruniverse.com svn at biggeruniverse.com
Wed Jan 25 22:42:53 PST 2006


Author: aturk
Date: 2006-01-26 00:42:52 -0600 (Thu, 26 Jan 2006)
New Revision: 564

Added:
   tags/0.5.2/
   tags/0.5.2/CHANGES
   tags/0.5.2/tiled/
Removed:
   tags/0.5.2/CHANGES
   tags/0.5.2/tiled/
Modified:
   trunk/tiled/core/Sprite.java
   trunk/tiled/io/ImageHelper.java
   trunk/tiled/io/MapWriter.java
   trunk/tiled/mapeditor/selection/SelectionLayer.java
Log:
Created a tag for 0.5.2, any remaining changes before that point release should be made to the tag.


Copied: tags/0.5.2 (from rev 560, trunk)

Deleted: tags/0.5.2/CHANGES
===================================================================
--- trunk/CHANGES	2005-12-07 01:55:11 UTC (rev 560)
+++ tags/0.5.2/CHANGES	2006-01-26 06:42:52 UTC (rev 564)
@@ -1,153 +0,0 @@
-0.6.0 - TBD (+ means planned change)
-
-+ Added support for localization/internationalization
-+ Added a navigation minimap
-+ Fixed memory problems when loading several maps with many tilesets in a row
-
-0.5.2 - TBD (+ means planned change)
-
-+ Added more useful visual feedback for some brushes
-+ Added the Shifted view, which emulates several tiling configurations
-+ Added "stamp" tool
-* For pencil, right-click, drag now creates a stamp for easy copying
-+ Added ability to select multiple layers from layer table
-+ Added the ability to merge tile images when layers are merged
-* Added support for animated tiles
-* Added more error-checking to XMLMapTransformer, the default map reader
-+ Added "global properties" for tilesets (properties set for all tiles)
-* Added support for "tile cutters"
-+ Added preview of new tileset when creating a tileset
-* Fixed a bug when exporting a tileset with an external image
-* Fixed two cases of hanging when using the fill tool
-+ Fixed tile palette bug of displaying multiple tilesets over eachother
-* Fixed tile palette bug of not accounting for gaps in tile ids (old bug)
-* Fixed bug of adding a new tile even if cancelling out of new tile dialog
-
-0.5.1 - June 15th, 2005
-
-* Added a checkerboard background to tileset palette
-* Added support for layer locking (not editable when locked)
-* Added support for tmx.gz map files
-* Added selection addition and substraction via Shift and Ctrl respectively
-* Improved the drawing speed thanks to some thorough testing and suggestions
-  (Jerome Blouin)
-* Improved transformation so that it respects selections
-* Fixed the "Save As Image" feature to use current zoom level
-* Fixed drawing on invisible layers
-* Fixed selection rectangle to include one more tile
-* Fixed loading of plugins that only do export and no import
-* Fixed removing tilesets in the Tileset Manager
-* Fixed image loading to ensure hardware acceleration is used in Java 1.4 and
-  above (Jerome Blouin)
-* Fixed a NullPointerException when loading TSX files as imported tilesets
-* Fixed an "Unsupported protocol" error when loading TMX files which referenced
-  an external tileset under certain conditions
-* Fixed a ClassCastException when loading GIFs as tilesets
-
-0.5.0 - December 14th, 2004
-
-* Added width and height attributes to layer element
-* Added layer properties, analoguous to tile and map properties
-* Added a version attribute to the map tag
-* Added a basedir attribute to the tileset tag (suggested by Radomir
-  Dopieralski)
-* Added support for shared images (merged in Rainer Deyke's shared images code)
-* Added support for masked tileset images
-* Added support for highlighting tile under cursor
-* Added support for creating an image snapshot of the map
-* Added additional zoom levels (by Marc Ilgen)
-* Added background color option (by Marc Ilgen)
-* Added option to show coordinates on each tile (suggested by Ahmed Mohombe)
-* Added an option whether to automatically create tiles from tileset images
-  upon import or not.
-* Added support for reading TMX/TSX files from URLs
-* Added the RandomBrush for doing 'spray-paint' painting (suggested
-  by Rainer Deyke)
-* Added the brush dialog, and support for a wide range of brush operations
-  (Nephilim, Rainer Deyke, et al.)
-* Added a message framework for reporting load/save problems to the user
-* Improved GUI in several places
-* Improved TMX loading, it is now much more forgiving
-* Optimized rendering of isometric maps
-* Completed the Search/Replace dialog
-* Changed the MultisetListRenderer to show tiles actual-size when selected
-* Generalized the dialogs for properties and added delete capabilities.
-* Fixed determining the relative path to tileset images
-* Fixed some old things in the DTD (suggested by Radomir Dopieralski)
-* Fixed drawing artifacts in selections
-* Fixed Copy, Cut, and Paste menu options to be disabled when no map is loaded
-* Fixed cancelling Save As operation still saving the map
-* Fixed inverting selections
-
-0.4.2 - October 14th, 2004
-
-* Added a JNLP for WebStart, contributed by Chris Hazen
-* Added a simple plugin for the Mappy FMAP format maps
-* Added a plugin dialog for information about plugins
-* Added plugin target for building bundled plugins
-* Removed API usage deprecated by Java 5.0
-* Fixed a NullPointerException when loading plugins
-* Fixed layer naming on undo
-
-0.4.1 - September 24th, 2004
-
-* Added search/replace functionality
-* Added tooltips to buttons
-* Added map save/load plugin support
-* Added marquee selections
-* Added HexMapView, contributed by Andreas Mross (experimental)
-* Removed name and version attributes from map, custom properties suffice there
-* Removed name attribute from tile for same reason
-* More intelligent starting locations for file choosers
-* Grid display is now configurable (opacity, antialiasing)
-* Fixes to tileset editing dialog
-* Fixed config file saving to stop adding newlines to the config file
-* Fixed window close button to behave the same as File->Exit
-* Fixed undo/redo for moving layers
-* Fixed moving a duplicated layer to no longer move original too
-
-0.4.0 - August 4th, 2004
-
-* TiledConfiguration defaults to preset values initially, Tiled should now
-  work fine if there is no initial configuration file
-* Layer rotation and flipping
-* Map resizing (warning: cannot be undone yet)
-* Custom properties on tiles and map
-* A file filter on loading and saving for .tmx and .tsx
-* Several UI improvements (usage of JSplitPane and JSpinner for example)
-* Small changes to the map format (updated DTD)
-* Implemented a better underlying architecture for Maps and Brushes
-* Fixed several null pointer exceptions
-* An Ant build target for tiled-core.jar, for use in Java engines
-* Support for other than 2:1 isometric tile ratios (2:1 and 1:1 tested)
-* Fixed redo for painting operations (paint, fill, erase)
-* Improved undo/redo of layer organisation changes
-
-0.3.1 - June 17th, 2004
-
-* Tile palette dialog remembers size and position and doesn't close when a tile
-  is selected
-* Saving unencoded layers is possible through config options
-* The right mouse button now functions as eye dropper/tile grabber
-* Added "Preferences..." option under "Edit" menu
-* First tile of tileset is selected when map is loaded
-* Added toolbar buttons to zoom in and out
-* Removed select button and print menuitem, will come back when functional
-
-0.3.0 - June 15th, 2004
-
-* All the features and polish required to release the Mechanae map editor as
-  a more general Tiled map editor, including:
-* Support for isometric maps
-* Zooming in
-* Support for multiple tilesets
-* Support for external tilesets
-* Support for tileset bitmaps
-* A lot of stability and user interface enhancements
-* Shortcuts on menu items
-* New, XML-based, universal tiled map and tileset file formats (tmx, tsx)
-* Merging, cloning, deleting and rearranging of layers
-* Translating layers
-* Layer opacity
-* Undo/redo draw operations
-* Configuration file

Copied: tags/0.5.2/CHANGES (from rev 563, trunk/CHANGES)

Copied: tags/0.5.2/tiled (from rev 563, trunk/tiled)

Modified: trunk/tiled/core/Sprite.java
===================================================================
--- trunk/tiled/core/Sprite.java	2006-01-26 04:33:46 UTC (rev 563)
+++ trunk/tiled/core/Sprite.java	2006-01-26 06:42:52 UTC (rev 564)
@@ -133,16 +133,17 @@
     }
     
     public Sprite(Image image, int fpl, int border,int totalFrames) {
-        
-    	//TODO: break up the image into tiles
+        Tile [] frames = null;
         this.fpl=fpl;
         borderWidth=border;
 
+        //TODO: break up the image into tiles
+        
         //given this information, extrapolate the rest...
         
         frameSize.width=image.getWidth(null)/(fpl+borderWidth*fpl);
         frameSize.height=(int) (image.getHeight(null)/(Math.ceil(totalFrames/fpl)+Math.ceil(totalFrames/fpl)*borderWidth));
-		keys = new Vector();
+        createKey("", frames, KeyFrame.KEY_LOOP);
     }
 
     public void setFrames(Tile [] frames) {
@@ -352,6 +353,9 @@
     	return new Rectangle(x, y, frameSize.width, frameSize.height);
     }
 
+    /**
+     * @see Object#toString()
+     */
     public String toString() {
         String s = null;
         s = "Frame: ("+frameSize.width+"x"+frameSize.height+")\nBorder: "+borderWidth+"\nFPL: "+fpl+"\nTotal Frames: "+getTotalFrames()+"\nTotal keys: "+totalKeys;

Modified: trunk/tiled/io/ImageHelper.java
===================================================================
--- trunk/tiled/io/ImageHelper.java	2006-01-26 04:33:46 UTC (rev 563)
+++ trunk/tiled/io/ImageHelper.java	2006-01-26 06:42:52 UTC (rev 564)
@@ -56,7 +56,7 @@
      * 
      * @param imageData The byte array of the data to convert.
      * @return Image The image instance created from the byte array
-     * @see java.awt.Toolkit.createImage(byte[] imagedata)
+     * @see java.awt.Toolkit#createImage(byte[] imagedata)
      */
     static public Image bytesToImage(byte[] imageData) {
     	Image img = Toolkit.getDefaultToolkit().createImage(imageData);

Modified: trunk/tiled/io/MapWriter.java
===================================================================
--- trunk/tiled/io/MapWriter.java	2006-01-26 04:33:46 UTC (rev 563)
+++ trunk/tiled/io/MapWriter.java	2006-01-26 06:42:52 UTC (rev 564)
@@ -18,7 +18,11 @@
 import tiled.core.Map;
 import tiled.core.TileSet;
 
-
+/**
+ * Used by Tiled to denote a plugin for writing maps. The map file
+ * can have any format, as long as the MapWriter implementor accepts
+ * instances of tiled.core.Map and tiled.core.TileSet.
+ */
 public interface MapWriter  extends PluggableMapIO, FileFilter
 {
     /**
@@ -49,5 +53,12 @@
      */
     public void writeMap(Map map, OutputStream out) throws Exception;
     
+    /**
+     * Overload this to write a tileset to an open stream.
+     * 
+     * @param set
+     * @param out
+     * @throws Exception
+     */
     public void writeTileset(TileSet set, OutputStream out) throws Exception;
 }

Modified: trunk/tiled/mapeditor/selection/SelectionLayer.java
===================================================================
--- trunk/tiled/mapeditor/selection/SelectionLayer.java	2006-01-26 04:33:46 UTC (rev 563)
+++ trunk/tiled/mapeditor/selection/SelectionLayer.java	2006-01-26 06:42:52 UTC (rev 564)
@@ -55,7 +55,7 @@
     /**
      * Returns the selected area.
      * 
-     * @return
+     * @return Area
      */
     public Area getSelectedArea() {
         return selection;
@@ -93,19 +93,34 @@
         selection.subtract(area);
     }
 
+    /**
+     * Sets the selected area to the given Rectangle
+     * 
+     * @param region
+     */
     public void selectRegion(Rectangle region) {
         clearRegion(selection);
         selection = new Area(region);
         fillRegion(selection, selTile);
     }
 
+    /**
+     * Selects only the given tile location (adds it to the selection
+     * if one exists)
+     * 
+     * @param tx
+     * @param ty
+     */
     public void select(int tx, int ty) {
         setTileAt(tx, ty, selTile);
+        
+        Area a = new Area(new Rectangle2D.Double(tx, ty, 1, 1));
+        
         if (selection == null) {
-            selection = new Area(new Rectangle2D.Double(tx, ty, 1, 1));
+            selection = a;
         } else {
             if (!selection.contains(tx, ty)) {
-                selection.add(new Area(new Rectangle2D.Double(tx, ty, 1, 1)));
+                selection.add(a);
             }
         }
     }




More information about the tiled-commit mailing list