Commit graph

173 commits

Author SHA1 Message Date
jason@long.name
4a38afc40f drawing-area: fix crash bug caused by not loading sprite images
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@764 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:46 +00:00
jason@long.name
298d789df2 overlay-map: fix selection rectangle for non-default zoom levels
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@763 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:41 +00:00
jason@long.name
1e21066cf2 drawing-area: allow zooming in and out with keyboard
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@762 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:36 +00:00
jason@long.name
7540682a06 tile animation: make industrial zone smoke animations initiated by tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@760 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:35:09 +00:00
jason@long.name
0c497aa434 tile animation: use tiles.rc to control termination of coal plant smoke
when the coal plant is killed

Also, this sets up a framework to handle industrial zones in the same way.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@759 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:35:05 +00:00
jason@long.name
a190bbf88b engine: only use PWRBIT flag on zone center tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@758 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:35:02 +00:00
jason@long.name
ba7ade2fa4 tile-animation: let tiles.rc determine coal plant's smoke animation
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@757 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:34:58 +00:00
jason@long.name
1ce5080705 drawing-area: allow zooming from 8px to 32px, using unique graphics source for each level
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@756 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:53 +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
103999e578 drawing-area: allow zooming in to 32px tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@753 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:44 +00:00
jason@long.name
d452c45d21 drawing-area: hold in-memory tile images in an object, rather than static variables
This will allow changing tile sizes on a per-window basis.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@752 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:40 +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
68717e3ea6 tiles.rc: move CONDBIT knowledge from source code to tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@746 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:10:50 +00:00
jason@long.name
92ba9642f2 TileSpec: fix bug with parsing of 'noburn'
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@744 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:10:44 +00:00
jason@long.name
c2cfeb540c tiles.rc: move BURNBIT knowledge from source code to tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@743 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:10:40 +00:00
jason@long.name
0a65ac514c TileConstants: replace BLBN, BLBNCN, BNCN constants with definitions
This will make it easier to find and replace uses of BULLBIT, BURNBIT, and
CONDBIT.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@741 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:10:34 +00:00
jason@long.name
91b3736886 tiles: transfer ZONEBIT knowledge to tiles.rc
and synthesize ZONEBIT when saving (for compatibility)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@740 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:10:29 +00:00
jason@long.name
9bf2e91783 tile animation: synthesize ANIMBIT when saving (for compatibility)
Also, add some safety checks in case Tiles.get() is called with an out-of-range tile number.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@739 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-18 13:31:50 +00:00
jason@long.name
000036c303 tile animation: cleanup, remove obsolete ANIMBIT constant
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@737 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-17 20:59:06 +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
jason@long.name
3859ca16d7 tile animation: animation is now controlled by tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@732 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-17 20:11:54 +00:00
jason@long.name
cf6fce279c tiles.rc: rename tiles.dat to tiles.rc, bring TileSpec into main program
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@730 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-17 20:11:47 +00:00
jason@long.name
2cef8e368a tiles.rc: revise syntax of tile specification
changed my mind on tile specification syntax

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@728 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-17 19:58:14 +00:00
jason@long.name
153e0e48f5 tiles.rc: impl TileSpec class for reading tile specification
and rewrite MakeTiles to use the TileSpec class

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@727 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-17 19:58:02 +00:00
jason@long.name
8793847415 TileConstants: simplify logic in isBridge()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@726 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-07 14:11:02 +00:00
jason@long.name
6406c12c14 TileConstants: implement isCombustible()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@725 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-07 13:16:54 +00:00
jason@long.name
94dc4ea7be timers: try to be more disciplined about starting/stopping the timer
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@724 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-05 12:49:40 +00:00
jason@long.name
158e85a784 graphics: tile recipe now parsed using Java properties format
This replaces the custom parser with the standard Java properties
parser, which has more features.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@720 d9718cc8-9f43-0410-858b-315f434eb58c
2013-06-29 17:55:11 +00:00
jason@long.name
a560ccd1dd graphics: include RearrangeTiles.java (another utility script I wrote)
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@716 d9718cc8-9f43-0410-858b-315f434eb58c
2013-06-26 22:12:03 +00:00
jason@long.name
4fdc4fb34f graphics: move "MakeTiles" program into src/ directory
(but do not include it in the generated jar file)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@714 d9718cc8-9f43-0410-858b-315f434eb58c
2013-06-26 22:11:38 +00:00
jason@long.name
f7c8cb53e2 gui: change layout of new-city-dialog to work with wider dialog
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@691 d9718cc8-9f43-0410-858b-315f434eb58c
2013-06-15 12:41:54 +00:00
jason@long.name
3138b04741 translation tool: if language already has translated strings, load them
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@690 d9718cc8-9f43-0410-858b-315f434eb58c
2013-06-15 12:41:46 +00:00
jason@long.name
873caa361b cleanup: move tile value comparisons into TileConstants class
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@688 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:55:58 +00:00
jason@long.name
f5e1793592 cleanup: move res/com/ind Zone Pop() functions to TileConstants
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@687 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:55:49 +00:00
jason@long.name
25751e73c4 cleanup: do not refetch the tile value when a property exists having it
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@686 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:55:41 +00:00
jason@long.name
cd7537768d road/rail deteriation: use isOverWater() instead of hard-coded numbers
Note- this will allow deteriation of bridges even when there is
traffic.  This is a change from previous versions.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@685 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:55:33 +00:00
jason@long.name
c272e200bf cleanup: isOverWater() should neutralize traffic, not the caller
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@684 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:55:25 +00:00
jason@long.name
599ea026f3 cleanup: move neutralizeRoad() to TileConstants
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@683 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:55:17 +00:00
jason@long.name
e2fd24ff10 tiles: document the underwater railroad tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@682 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:55:08 +00:00
jason@long.name
9ff3e14eb5 cleanup: avoid comparisons with tile constants
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@681 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:55:00 +00:00
jason@long.name
906a0c4570 tiles: helper function- isTinyExplosion
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@680 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:52:36 +00:00
jason@long.name
6794888026 tiles: helper functions- isFire, isRadioactive, isFlood
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@679 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-28 01:52:27 +00:00
jason@long.name
f3af16e2e4 rail tool: fix bug where laying rail on moving traffic did not work
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@673 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-22 11:33:09 +00:00
jason@long.name
682c9964a5 translation-tool: allow Test to work even if java not in path
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@672 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-21 13:37:44 +00:00
jason@long.name
88fc2ae4bb translation-tool: make Submit button show submission instructions
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@671 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-21 13:31:03 +00:00