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
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
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
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
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
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
32d23d16bd
cleanup: use new isZoneCenter() check instead of testing for ZONEBIT flag
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@617 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-05 18:52:28 +00:00
jason@long.name
9c045da206
simspeed: no matter speed, always two animation cycles per sim step
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@614 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-29 22:02:29 +00:00
jason@long.name
f6fd885d75
simspeed: do not skip crime/fire/power scans when speed is faster
...
The original Micropolis code has logic where at the faster simulator
speeds, the crime/fire/power/etc. scans are performed less frequently,
presumably to more efficiently use CPU. However, CPUs are faster now
and I would prefer to not have the simulation change behavior based
on the speed setting.
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@612 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-29 22:02:13 +00:00
jason@long.name
7e52c97246
file-format: fix to load files generated by simcity classic
...
Warning- loading and then saving such a file will probably cause
the file to be unreadable to simcity classic
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@606 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-07 00:15:13 +00:00
jason@long.name
19a3fcefd7
game-load: fix bug in speed sanity check
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@604 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-07 00:14:42 +00:00
jason@long.name
93b5422afb
CityBudget: do not change funds when changing difficulty level
...
Before I had implemented the New City dialog box, the only way
to set the difficulty was via the menu after the game started.
Now that the difficulty level can be set before starting the game,
there is no need to give/take money when the difficulty changes.
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@603 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 15:46:18 +00:00
jason@long.name
2c69407d47
CityBudget: do not change funds when generating a map
...
initial funds are now set when player clicks Play button
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@602 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 15:46:05 +00:00
jason@long.name
0b8efea513
CityBudget: move in the four escrow-style account balances
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@601 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 15:45:52 +00:00
jason@long.name
04534d6273
refactor: move totalFunds property to separate class
...
this new class (CityBudget) will contain all finance-related balances
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@600 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 15:45:37 +00:00
jason@long.name
efd0326db2
engine: allow non-default sized maps to be instantiated
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@598 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 14:08:09 +00:00
jason@long.name
6ee909e10c
cleanup: create constants for fire/police station maintenance cost
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@586 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 21:26:17 +00:00
jason@long.name
6cfc5ef5ef
budget: fix bug that caused budget numbers to occassionally be wrong
...
when bringing up the budget manually, depending on the exact moment
the road/rail/etc counts might be wrong, leading to wrong numbers being
shown
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@583 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 21:25:59 +00:00
jason@long.name
e98727b601
cleanup: eliminate unused MiscHistory class
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@582 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 21:25:52 +00:00
jason@long.name
7473c893bd
java6-compat: eliminate use of diamond operator (a J7-only feature)
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@576 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 14:01:36 +00:00
jason@long.name
b1a1dea224
query tool: check bounds before attempting query
...
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@575 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 01:19:17 +00:00