Commit graph

82 commits

Author SHA1 Message Date
Jason Long
206c12a0c4 tile-names: rename old tile names to new tile names automatically
when loading a saved city file.
2014-12-21 15:20:49 -05:00
Jason Long
c3fde70ddc tile-names: remember PWRBIT when loading tiles from save-file 2014-12-21 15:08:44 -05:00
Jason Long
f136a3f4f4 tile-names: let loadMap() handle dyn-numbered tiles 2014-09-21 16:37:48 -04:00
Jason Long
40d2d08e0c animation: make all fires synchronized
(so that it can be represented as a single tile number, which is then animated)
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
9b769d17b3 file-format: throw an exception if an unrecognized tile id is seen 2014-09-21 16:37:36 -04:00
Jason Long
71790c078f file-format: use tile names instead of numbers (load)
in addition, use :pwr suffix for any tile where the PWR bit is set
2014-09-21 16:37:35 -04:00
Jason Long
3a16d982a4 file-format: use tile names instead of numbers (write only) 2014-09-21 16:37:35 -04:00
Jason Long
da7b30af88 file-format: do not synthesize compatibility bits
since there's no software we need to be compatible with
2014-09-21 16:37:34 -04:00
Jason Long
4a0cfc2bcc file-format: move timing information into <cityTime> child element 2014-09-21 16:37:33 -04:00
Jason Long
98a2b4b007 file-format: keep misc sanity checks in place 2014-09-21 16:37:33 -04:00
Jason Long
95155a579f file-format: save/restore the "noDisasters" option 2014-09-21 16:37:32 -04:00
Jason Long
8ac2e902bc file-format: markup history with <shortTerm> and <longTerm> 2014-09-21 16:37:32 -04:00
Jason Long
78bddb83fe file-format: check gameLevel against range when reading from xml 2014-09-21 16:37:31 -04:00
Jason Long
f17021066a file-format: move taxRate and budget levels from <misc> to <budget> 2014-09-21 16:37:31 -04:00
Jason Long
4ee34ba245 file-format: use Boolean.toString rather than hardcoding "true"/"false" 2014-09-21 16:37:30 -04:00
Jason Long
e9e7425701 file-format: complete XML load implementation 2014-09-21 16:37:29 -04:00
Jason Long
481417e5ee file-format: ability to read in history arrays from xml 2014-09-21 16:37:29 -04:00
Jason Long
69bf269655 file-format: writeMap() use tags to indicate where new rows start 2014-09-21 16:37:28 -04:00
Jason Long
a3d2c1f441 file-format: rewrite save() to use a new XML-based file format
a file format that I just made up
2014-09-21 16:37:28 -04:00
Jason Long
300acc7381 api: setTile() no longer accepts upper bits
also- eliminate "rawTile" from TileBehavior class and subclasses
2014-06-20 11:41:57 -04:00
jason@long.name
c5b6b9db4a cleanup: use getTile() instead of direct access where possible
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@901 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 16:02:20 +00:00
jason@long.name
78d094c8ac api: use masked tile number for tile-check methods
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@898 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 16:02:07 +00:00
jason@long.name
a8713b682e api: getTile() now returns masked tile number
use getTileRaw() to get the raw tile number

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@897 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 16:02:02 +00:00
jason@long.name
8ce6a1fdd5 tiles.rc: re-allow bulldozing dead zones
That is, we allow tiles that belong to zones whose center tile has been destroyed
(e.g. from a fire) to be individually bulldozed. This used to be allowed by setting
the BULLBIT on those tiles when the center tile is destroyed (see killZone() method)
but now that we no longer use BULLBIT, we need to test whether the center tile still
exists when deciding if a tile can be bulldozed.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@896 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 16:01:58 +00:00
jason@long.name
6d7e94bf97 tiles.rc: synthesize BULLBIT when saving file
this allows files to correctly load in older versions of Micropolis

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@895 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 16:01:54 +00:00
jason@long.name
454409cecf tiles.rc: eliminate BULLBIT and use annotation instead
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@894 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 16:01:48 +00:00
jason@long.name
3d2eaa62ff cleanup: do not use TileConstants. prefix when not needed
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@890 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 02:47:51 +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
280126ac05 refactor: move makeTraffic() from city to zone-behavior class
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@875 d9718cc8-9f43-0410-858b-315f434eb58c
2013-10-10 13:31:16 +00:00
jason@long.name
93381a3490 refactor: make accessor method for fireRate[] array
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@873 d9718cc8-9f43-0410-858b-315f434eb58c
2013-10-10 13:31:09 +00:00
jason@long.name
81c05604df behaviors: move terrain-related behaviors from MapScanner
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@871 d9718cc8-9f43-0410-858b-315f434eb58c
2013-10-04 12:54:03 +00:00
jason@long.name
4717c93039 behaviors: dispatch behavior from mapScan() method
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@870 d9718cc8-9f43-0410-858b-315f434eb58c
2013-10-04 12:53:59 +00:00
jason@long.name
fb4f1fee98 behaviors: MapScanner: s/cchr/rawTile and s/cchr9/tile
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@869 d9718cc8-9f43-0410-858b-315f434eb58c
2013-10-04 12:53:56 +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
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
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
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
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
8f7523fd62 demand valves: fix bug in demand valve determination
is supposed to be dependent on tax rate, but due to using the wrong
local variable, it was ignoring the tax rate.
This fix will make the economy a little slower.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@801 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-25 02:22:30 +00:00
jason@long.name
2eee88e529 getPollutionValue: move to TileConstants
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@785 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-11 22:43:04 +00:00
jason@long.name
6f3029fc92 getPollutionValue: use isFire and isRadioactive instead of comparing numbers
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@784 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-11 22:42:59 +00:00
jason@long.name
9c209fa6b2 TileConstants: isConstructed() returns true if tile >= ROADBASE
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@783 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-11 22:42:54 +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
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