Commit graph

56 commits

Author SHA1 Message Date
Jason Long
6d76b43164 TileImage: move Animation class from MakeTools into Graphics package 2015-01-13 20:11:45 -08:00
Jason Long
a99a6f0f1c TileImageLayer: require both elements to be non-null
simplifies some algorithms
2015-01-11 13:18:58 -05:00
Jason Long
744e74267a MakeTiles: use gui's parser for xml image specs 2015-01-11 12:34:15 -05:00
Jason Long
455fc004de TileImage: xml: replace offsetX/offsetY attrs with single 'at' attribute
I.e. instead of
<image offsetY="32"/>

we use
<image at="0,32"/>
2015-01-11 12:34:14 -05:00
Jason Long
860faa1081 TileImage: teach MakeTiles module how to use LoaderContext 2015-01-11 12:33:45 -05:00
Jason Long
4ec67e92fa TileImages: refactor: ren SourceImage to ScaledSourceImage
to allow a non-scaled version soon
2015-01-11 12:33:42 -05:00
Jason Long
9a285f18ab TileImage: s/drawTo/drawFragment 2015-01-09 22:46:59 -05:00
Jason Long
28be533163 MakeTiles: use BufferedImage, to be the same as gui 2015-01-09 18:07:30 -05:00
Jason Long
7592117306 TileImage: refactor: eliminate drawWithTimeTo()
having a context (such as time) may come back in the future,
but for now it seems better to not do this.
2015-01-09 13:32:50 -05:00
Jason Long
9e1f735b3f MakeTiles: refactor tile drawing code into drawFrames() method 2015-01-08 08:44:08 -05:00
Jason Long
e2e67a1810 MakeTiles: impl ComposeFrame class, to track where a composed frame came from 2015-01-08 08:33:04 -05:00
Jason Long
357a58f094 TileImage: remove getFrameEndTime() method
use "x instanceof Animation" to determine if a tile is animated
2015-01-07 22:26:12 -05:00
Jason Long
ec7641eadf MakeTiles: abstract tile mapping into prepareFrames() method 2015-01-07 21:16:40 -05:00
Jason Long
d95ad15b99 TileImage: make some properties final 2015-01-07 20:35:36 -05:00
Jason Long
a3afcde7bb refactor: move build_tool/TileImage to new package 2015-01-07 15:59:41 -05:00
Jason Long
1ec35c1d56 MakeTiles: abstract composition functionality 2015-01-07 14:14:07 -05:00
Jason Long
0fd637cc95 MakeTiles: prepare to abstract composition functionality 2015-01-07 13:30:02 -05:00
Jason Long
fbd3a0dc94 MakeTiles: change meaning of offsetY 2015-01-07 13:21:20 -05:00
Jason Long
7cfe0c1dc5 MakeTiles: find and use 128x128 versions of tile images 2015-01-03 21:04:55 -05:00
Jason Long
f17989412e MakeTiles: recognize .xml image specifications
with .xml image specifications, we can support layers, animations,
and (eventually) complex/conditional images.
2015-01-03 20:56:54 -05:00
Jason Long
8acf22d790 MakeTiles: Animation: draw the frames for different times during the animation 2014-09-21 16:37:42 -04:00
Jason Long
56a4b3da27 MakeTiles: refactor: move TileImage classes into separate file 2014-09-21 16:37:41 -04:00
Jason Long
372c1a6519 MakeTiles: fix a couple bugs in code for loading animation 2014-09-21 16:37:41 -04:00
Jason Long
41c8d68717 MakeTiles: working on support for animated tiles 2014-09-21 16:37:40 -04:00
Jason Long
de82160792 MakeTiles: refactor: paving the way to allow multiple images per tile 2014-09-21 16:37:40 -04:00
Jason Long
d5dbd8dc64 MakeTiles: track target size when loading a source image 2014-09-21 16:37:39 -04:00
Jason Long
70bb50fed2 MakeTiles: implement support for files specifying an animation 2014-09-21 16:37:39 -04:00
Jason Long
2ea3318dea MakeTiles: make tile drawing code more object-orientated
Separate classes for tile layers, tile sprites, etc., to make it easier
to introduce more complicated/flexible tile configurations in the future.
2014-09-21 16:37:38 -04:00
Jason Long
2112ee04f0 MakeTiles: change format of tiles.idx (preparing for future capability) 2014-09-21 16:37:37 -04:00
Jason Long
70d5d31aa5 MakeTiles: use an XML format for the tiles index
this will allow me to more easily add features (like animation)
without evolving into a hard-to-parse custom file format
2014-09-21 16:37:36 -04:00
Jason Long
e913626f60 MakeTiles: use constant (STD_SIZE) to represent standard tile size of 16px 2014-06-20 11:46:26 -04:00
Jason Long
d207232fea MakeTiles: refactor: load images at parse time
this will allow me to detect and load animations (in a future commit)
2014-06-20 11:46:05 -04:00
Jason Long
cb84994ce8 MakeTiles: refactor: pushing caching down a level 2014-06-20 11:45:54 -04:00
Jason Long
c0f1d6a486 MakeTiles: output to a graphics directory instead of a specific file 2014-06-16 20:35:32 -04:00
Jason Long
eb97e1c27c MakeTiles: remove support for width/height specifier 2014-06-16 20:32:03 -04:00
Jason Long
bb6ac09e5d MakeTiles: write unique index for each output file 2014-06-16 20:32:02 -04:00
Jason Long
bff42f0cf9 MakeTiles: allow non-integer tile names; generate an idx file 2014-06-16 20:32:01 -04:00
Jason Long
0bf95f4b19 MakeTiles: refactor to simplify main() method body 2014-06-16 20:32:00 -04:00
Jason Long
7b890e9d89 tiles: add name property to spec 2014-06-16 20:31:59 -04:00
jason@long.name
1026fdf34f make-tiles: allow tile specification to be empty
this fixes a build-crash bug if a tile is not given any images

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@886 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-02 01:44:52 +00:00
jason@long.name
6b899d096d MakeTiles: tolerate undefined tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@852 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-09 14:11:39 +00:00
jason@long.name
acce301d1d MakeTiles: support additional creation arguments
tile_count: to control how many tiles are generated
skip_tiles: to control which tile to start with

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@851 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-09 14:11:21 +00:00
jason@long.name
22c0edc7c1 tiles.rc syntax: allow inheriting of another tile's images/attributes
To inherit, just put the name of tile you want to inherit from in parenthesis
at the beginning of the specification.
E.g.

road-1-1     (road) roads/1-1 (road-north)(road-south)

will define a tile named "road-1-1", which first starts with all the images
and properties of tile "road" and then layers on top of that the 'road/1-1'
image, and then sets the 'road-north' and 'road-south' flags.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@754 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:47 +00:00
jason@long.name
8a9af13de9 MakeTiles: allow making generated images of an SVG image in a subdirectory
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@751 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:37 +00:00
jason@long.name
b5e86ff388 MakeTiles: when converting an SVG file, specify DPI rather than expected width/height
This way we can handle multi-tile SVG source files (e.g. for the larger zones) correctly.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@750 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:35 +00:00
jason@long.name
ef575b4125 MakeTiles: fix bug in SVG->PNG logic
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@749 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:32 +00:00
jason@long.name
f5b0089abc MakeTiles: when generating intermediate images, use a staging directory
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@748 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:28 +00:00
jason@long.name
e3dcff2804 MakeTiles: impl support for SVG files
SVG files are converted to PNG files at the appropriate resolution
by calling out to Inkscape.exe (must be installed somewhere)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@747 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:25 +00:00
jason@long.name
c334cfd9f0 MakeTiles: allow tiles recipe to be more size-agnostic
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@735 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-17 20:30:39 +00:00
jason@long.name
4c623c92c3 MakeTiles: impl generation of different-sized tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@734 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-17 20:30:36 +00:00