Commit graph

321 commits

Author SHA1 Message Date
jason@long.name
5252770d10 city-eval: use public getTrafficDensity() instead of direct access
of trfDensity[] array

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@865 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-28 16:34:37 +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
275139c2d1 refactor: make public getLandValue() method for accessing landValueMem[]
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@863 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-28 16:34:17 +00:00
jason@long.name
300adefd27 cleanup: use getTrafficDensity() instead of directly accessing the array
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@862 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-28 16:34:06 +00:00
jason@long.name
72fac6d84e refactor: move traffic-density mutation code to new function
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@861 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-28 16:33:56 +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
736754a5ab cleanup: rename FREEZ to RESCLR for consistency
matches the naming pattern used for COMCLR and INDCLR

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@858 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-20 11:21:28 +00:00
jason@long.name
d389124b86 cleanup: remove two more unused tile constants
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@857 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-20 11:21:06 +00:00
jason@long.name
e81b0096aa cleanup: remove unused constant: UNUSED_TRASH2
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@856 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-20 11:20:57 +00:00
jason@long.name
50600cef2e cleanup: reduce visibility of many of the named tiles
(no reason that the front-end needs to reference these tiles directly)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@855 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-20 11:20:47 +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
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
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
dc412a71b6 cleanup: remove no-longer-used isRadioactive()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@849 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-06 12:49:59 +00:00
jason@long.name
a3696e01ba cleanup: remove no-longer-used isFire()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@848 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-06 12:49:31 +00:00
jason@long.name
90149dc9c0 evalLog road test: let road/rail crossing count as road
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@847 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-06 12:49:10 +00:00
jason@long.name
36035942af copyright: add copyright notice to tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@846 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:23:36 +00:00
jason@long.name
d86c9f6b65 cleanup: remove a bunch of unused tile constants
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@845 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:23:28 +00:00
jason@long.name
c3e677047a strictness: getZoneSizeFor must be called on a zone-center tile
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@844 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:23:07 +00:00
jason@long.name
94e9892731 refactor: make getZoneSizeFor return CityDimension (width AND height)
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@843 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:22:56 +00:00
jason@long.name
2af5cf14a7 refactor: introduce new CityDimension class to encapsulate width/height
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@842 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:22:40 +00:00
jason@long.name
b22263b4b6 applyZone: rewrite to use tiles.rc annotations
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@841 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-05 11:22:09 +00:00
jason@long.name
400c2942ee pollution: coal plant animated tiles should emit pollution
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@840 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-04 18:58:31 +00:00
jason@long.name
f6601ac95d pollution: industrial zone animations should emit pollution
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@839 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-04 18:58:19 +00:00
jason@long.name
43455f1903 pollution: airport's radar dish should emit pollution just like rest of airport
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@838 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-04 18:58:06 +00:00
jason@long.name
ed88e75a34 tiles.rc: move pollution values from Java code to tiles.rc
This patch maintains exact values for every tile, even where it
is probably wrong.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@837 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-04 18:57:51 +00:00
jason@long.name
db6f3fb59c doSpecialZone: use annotations to control which special zone processing is done
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@836 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-03 01:07:35 +00:00
jason@long.name
18f00153a3 refactor: doSpecialZone- split up into separate functions for each zone type
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@835 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-03 01:07:25 +00:00
jason@long.name
1932084d22 cleanup: remove erroneous assertion
Usually after powerScan() the powerPlants list will be empty, but
not if powerScan() aborts upon detection of a brown-out condition.

It does not matter anyway; the powerPlants will be cleared and
repopulated in normal course by simulate() in phase 0.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@834 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:34:25 +00:00
jason@long.name
1b82d46aeb cleanup: remove two obsolete functions from TileConstants.java
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@833 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:34:16 +00:00
jason@long.name
bef75adc90 scanTile: use annotations in tiles.rc to determine behavior of tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@832 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:34:06 +00:00
jason@long.name
070cd90727 refactor: move checkZonePower down a level
(This will allow elimination of the doZone() intermediary function)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@831 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:33:56 +00:00
jason@long.name
1e4dd42655 gitignore: prevent VIM swap files from getting caught by repository
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@830 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:33:47 +00:00
jason@long.name
0f2c2f4617 refactor: checkZonePower() to set PWR bit and count zones
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@829 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:33:38 +00:00
jason@long.name
07bc48c34c cleanup: consolidate all doFire() functionality into doFire() method
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@828 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 21:33:28 +00:00
jason@long.name
821679d841 tile descriptions: consolidate to single string for 'Industrial'
Formerly #23 and #12 were both "Industrial", with #12 being used for
the basic industrial zones, and #23 being used for any animation
appearing for industrial zones.

Now that the tiles using a particular description number don't need
to be contiguous, we will consolidate to just use #12 for "industrial",
and this will free up #23 for some other use in the future.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@827 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:33:21 +00:00
jason@long.name
282cd77b48 tile descriptions: describe the animated zone destruction tiles as "Rubble"
rather than "Industrial"

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@826 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:33:12 +00:00
jason@long.name
f5180e9f9c tile descriptions: smoke on coal power plant should be "Coal Power" not "Industrial"
remove description annotation on the animated tiles of the coal power plant,
so that they inherit the description of the coal power plant, rather than
having a description of "Industrial"

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@825 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:33:04 +00:00
jason@long.name
93bf346065 tile descriptions: consolidate to a single string for 'draw bridge'
formerly, the string "Draw Bridge" was defined separately for
east-west and north-south bridges, simply because they were disjoint
in the tile numbering sequence.

Now both draw bridges use description number 20.
This frees up description number 25 for something else some day.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@824 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:55 +00:00
jason@long.name
21f1cff598 tiles.rc: remove 'description' annotation for undefined/unused tiles
The earlier commit that added the description annotations maintained
exact compatibility with the descriptions hardcoded in the source
code. Now we are going back and removing the descriptions that do
not apply.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@823 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:46 +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
52512c8987 tiles.rc: annotate each tile with its description number
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@820 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:14 +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
f09ba76a23 tiles: use new residential-zone/commercial-zone annotations
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@818 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:27:14 +00:00
jason@long.name
c86b9bc03b tiles: annotate commercial and residential zones
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@817 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:27:05 +00:00
jason@long.name
fb6db46fde tiles: remove old isIndustrialZone() function
Note: this old Industrial Zone checking function would erroneously
include the Coal power plant animated smoke.

You could see this bug by selecting "industrial zones" for the
overlay map, and looking closely where your coal power plants are.
You will see that the coal power plant is invisible in the overlay
except for the four tiles containing the smoke.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@816 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:26:44 +00:00