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
jason@long.name
f0f101b78d
keyboard: define access keys for more menus
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@771 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:47:32 +00:00
jason@long.name
f55492f8b8
keyboard: add shortcut keys to Game menu
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@770 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:47:19 +00:00
jason@long.name
a1fc7c20a2
zoom-levels: fix to recognize the numpad "-" key to zoom out
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@769 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-22 16:03:49 +00:00
jason@long.name
060fdc4b94
drawing-area: fix so that keyboard zoom works even when a button has focus
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@767 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:35:01 +00:00
jason@long.name
6851224c10
drawing-area: scale sprite images with tile resolution
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@766 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:56 +00:00
jason@long.name
1429407d9f
drawing-area: fix where sprites are drawn when zoom level is not 16px
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@765 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:51 +00:00
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
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
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
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
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
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
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
99756b5d0a
translations: merge in my older work on the translation tool
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@662 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-21 13:28:32 +00:00