Commit graph

51 commits

Author SHA1 Message Date
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
jason@long.name
89d6839101 cleanup: rename fireZone to killZone
since the function is not about setting fire to a zone,
rather it is about nullifying the ability of the zone

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@568 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-20 02:05:04 +00:00
jason@long.name
1da609a5ce coalsmoke: when coal plant blows up, stop its smoke animation
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@567 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-20 02:04:58 +00:00
jason@long.name
4fe20e253e javadocs: document the BudgetNumbers class
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@565 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-20 01:36:57 +00:00
jason@long.name
16ad436a14 internal docs: explain fire as source of pollution
in getPollutionValue() function

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@559 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-18 01:58:29 +00:00
jason@long.name
0255ae0744 cleanup: remove duplicate definitions of min/max game level
i.e.
removed Micropolis.MIN_LEVEL and Micropolis.MAX_LEVEL
as it was superceded by
GameLevel.MIN_LEVEL and GameLevel.MAX_LEVEL

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@540 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-17 20:58:31 +00:00
jason@long.name
9943df80f4 javadocs: explain what the simulator's internal arrays do
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@539 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-17 20:58:24 +00:00
jason@long.name
50a7cf4770 cleanup: refactor smoothTerrain() to make it side-effect free
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@538 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-17 20:58:17 +00:00
jason@long.name
567adeee43 cleanup: make qtem a local instead of global variable
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@537 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-17 20:58:10 +00:00
jason@long.name
9cedc10ef8 cleanup: make tem[] a local variable instead of global
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@536 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-17 20:58:03 +00:00