Jason Long
6d76b43164
TileImage: move Animation class from MakeTools into Graphics package
2015-01-13 20:11:45 -08:00
Jason Long
92776621d6
TileImage: refactor: LoaderContext now returns a TileImage-derived class
2015-01-11 12:33:44 -05:00
Jason Long
73b2e65e39
TileImages: gui: keep ref to SimpleTileImage
2015-01-11 12:33:43 -05:00
Jason Long
55f054a63e
TileImage: refactor: s/readTileImage/readTileImageM
...
this method is called in the context of the parent tag;
it reads all <image> tags that are children of the current tag
and only returns one of them
2015-01-11 12:33:41 -05:00
Jason Long
030abc4512
TileImages: refactor: move readTileImage() to graphics package
2015-01-11 12:33:40 -05:00
Jason Long
d64126f05e
TileImages: refactor: move AnimatedTile to graphics package
2015-01-11 12:33:39 -05:00
Jason Long
0c29bbfcf8
TileImages: refactor: move SimpleTileImage to graphics package
2015-01-11 12:33:34 -05:00
Jason Long
02ee143ce9
refactor: move LoaderContext to graphics package
2015-01-10 11:53:46 -05:00
Jason Long
21f983d4be
TileImages: make gui classes use same base class as MakeTiles component
2015-01-10 11:21:52 -05:00
Jason Long
409f338e6b
refactor: make readTileImage() to read any tile image descriptor type
2015-01-07 20:41:12 -05:00
Jason Long
cdcb63124a
TileImages: use new tile-drawing method in drawing-area
2015-01-07 13:26:41 -05:00
Jason Long
7b85b7bbe9
TileImages: load image file directly into BufferedImage
2015-01-07 13:22:22 -05:00
Jason Long
a68c533ef5
TileImages: fix bug (shadowed variable) in LoaderContext.getImage()
2015-01-07 13:22:17 -05:00
Jason Long
fbd3a0dc94
MakeTiles: change meaning of offsetY
2015-01-07 13:21:20 -05:00
Jason Long
7415edeb9e
TileImages: allow having multiple tile image files
2015-01-07 13:20:41 -05:00
Jason Long
dbdad3b37e
TileImages: more object-oriented tile-drawing code
2015-01-07 13:13:19 -05:00
Jason Long
6c0c9203a4
TileImages: share image-loading code between overlay map and main view
...
main view- tiles image is now loaded as a single buffered image,
and selected into "sub-images" where needed
overlay- the rgb drawing code is moved into TileImages class
2015-01-07 13:13:04 -05:00
Jason Long
ddd72b44e8
debug: giev more information on assertion failures
2014-09-21 16:37:45 -04:00
Jason Long
4dc9194fe4
TileImages: auto-redraw animated tiles
2014-09-21 16:37:44 -04:00
Jason Long
9c5c41e0f4
TileImages: draw animated frames
...
(still need to implement redrawing of animated frames)
2014-09-21 16:37:43 -04:00
Jason Long
0d6f6d4789
TileImages: put placeholder for animated tile support
2014-09-21 16:37:42 -04:00
Jason Long
2791a5658a
TileImages: allow loading a named tiles pack...
...
and make the overlay map use the 'sm' mapping
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
3597e11bbd
tile-names: teach GUI how to load images for dyn-numbered tiles
...
(this only handles the main view, it does not do anything for the overlay view)
2014-09-21 16:37:37 -04:00
Jason Long
d4a80ec466
cleanup: rename isRoadAny() to isRoad()... ditto for isRailAny()
2014-09-21 16:28:02 -04:00
Jason Long
bf25532d01
gui: draw tool cursor using fillRect rather than drawLine
...
this should help with higher-resolution displays where the stroke
behavior can be unpredictable. It works better to use filled
shapes which are more predictable.
2014-08-23 10:08:19 -07:00
Jason Long
d6a295cbe7
drawing-order: draw tiles right-to-left
...
to handle tall tiles correctly
2014-08-23 10:08:03 -07:00
Jason Long
f4fdb09481
graphics: change where images are loaded from when running the gui
...
tiles.png used to be at the root of the jar,
now it is in the '16x16' subdirectory (or '32x32' or '8x8' or 'sm'
depending on what resolution is being loaded)
2014-06-16 20:39:00 -04:00
jason@long.name
73800b13bf
tools: make translation strings optional for tools
...
If a translation string is not defined for the tool name, icon name,
or tool description, then an automatic string is generated.
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@915 d9718cc8-9f43-0410-858b-315f434eb58c
2014-01-05 22:13:51 +00:00
jason@long.name
ec0d9ffee6
tools: define default tool colors
...
so that colors do not need to be explicitly specified every time
a new tool is defined.
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@914 d9718cc8-9f43-0410-858b-315f434eb58c
2014-01-05 22:13:44 +00:00
jason@long.name
84d8906a88
overlay-map: remove upper tile number limit
...
also- refactor a for-loop into a separate method to avoid having
code indented too far
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@911 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-21 21:34:59 +00:00
jason@long.name
58ffb6c73b
api: provide isTilePowered() to check whether a given location has power
...
instead of requiring front-end to test for PWRBIT
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@888 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-03 01:04:22 +00:00
jason@long.name
2b60d14e96
overlay: use public getLandValue() method to draw landvalue overlay
...
instead of directly accessing the landValueMem[] array
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@864 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-28 16:34:28 +00:00
jason@long.name
99954a3619
overlay: use public getTrafficDensity() method to draw traffic overlay
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@860 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-28 16:33:43 +00:00
jason@long.name
b18b51d08e
refactor: remove isPic argument from cityMessage() notification
...
Have the decision of whether to show the message in the notification
pane be determined by the message type itself, rather than being
decided by the sender of the message.
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@859 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-22 00:48:34 +00:00
jason@long.name
2a0ec53a05
gui: DemandIndicator- replace hardcoded dimensions with constants
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@854 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-09 14:25:41 +00:00
jason@long.name
7b68e1299d
android port: convert use of java.awt.Rectangle to own CityRect class
...
java.awt.Rectangle does not exist in the android SDK, so this patch
replaces its use within the Micropolis engine code with a custom class
with equivalent functionality.
This way all the classes in micropolisj.engine can be compiled with
the subset of the Java SDK that also exists in the Android SDK.
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@853 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-09 14:11:55 +00:00
jason@long.name
436789c12e
gui: scroll with middle-button
...
Hold-down middle button and drag to scroll map without using
scroll bars. Contributed by askywhale (email, 2013-09-01)
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@850 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-07 15:18:38 +00:00
jason@long.name
fb52cfd504
cleanup: remove some debug code left in from a previous commit
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@822 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:38 +00:00
jason@long.name
521a41f028
tiles.rc: use description numbers from tiles.rc rather than hardcoded numbers
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@821 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:25 +00:00
jason@long.name
d14121b415
overlay-map: cleanup: use isResidentialZoneAny() instead of manual check
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@819 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:27:23 +00:00
jason@long.name
7069c8150c
buildings: for component tiles, link back to the owner tile
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@811 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:25:39 +00:00
jason@long.name
220f136848
GraphsPane: fix for graph reaching above 100% (issue #31 )
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@805 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-31 19:15:59 +00:00
jason@long.name
9e9d1b2e9b
TileConstants: remove hardcoded tile values from OverlayMapView
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@787 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-11 22:43:13 +00:00
jason@long.name
5adc2cd57a
keyboard: set keymap on content pane, not root pane.
...
This way, when the menu bar is active, the normal menu key sequences
(such as ESCAPE) will still work normally.
One quirk is the following-
* MINUS will still zoom out while the menu is active,
but PLUS will not work.
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@778 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-26 20:05:46 +00:00
jason@long.name
9e3e681a81
keyboard: ESC will now close the current notification, if one is open
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@777 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:48:28 +00:00
jason@long.name
c5872a6e9f
keyboard: ESC while dragging mouse will cancel the current op
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@776 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:48:19 +00:00
jason@long.name
bbb48f4e91
keyboard: let ESCAPE be used to close New City dialog
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@774 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:48:01 +00:00
jason@long.name
0465be13c1
keyboard: add hotkeys for Zones and Overlays menus
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@773 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:47:51 +00:00
jason@long.name
b4c3a8327e
zoom-levels: add menu options for Zoom In and Zoom Out
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@772 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:47:42 +00:00