Commit graph

387 commits

Author SHA1 Message Date
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
e7207b1839 file-format: fix a bug in XML_Helper 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
6ccc6339fc cleanup: consolidate to a single isIndestructible() predicate 2014-09-21 16:35:00 -04:00
Jason Long
89e1b04f95 rewrite repairZone to handle dynamic tiles
also- fix a bug where repairZone() on an unpowerd zone
was incorrect
2014-09-21 16:34:50 -04:00
Jason Long
bbfc73961c cleanup: eliminate unused isHospitalOrChurch() function 2014-09-21 16:30:26 -04:00
Jason Long
d4a80ec466 cleanup: rename isRoadAny() to isRoad()... ditto for isRailAny() 2014-09-21 16:28:02 -04:00
Jason Long
1da5fdf402 cleanup: remove unused isRoad, isRail methods 2014-09-21 15:55:56 -04:00
Jason Long
ef5635f6a3 Sprite: destroyTile() should not destroy tunnels or underwater wires 2014-09-21 15:54:05 -04:00
Jason Long
ac1dc2bf92 Sprite: cleanup logic for how to destroy a tile
and remove the dependency on tile numbers
2014-09-21 15:53:34 -04:00
Jason Long
f944e5293c evalLot: fix so that railroads with wires are recognized as rails 2014-09-21 14:37:47 -04:00
Jason Long
6604b266aa tiles: eliminate redundant predicate checkWet in favor of isOverWater 2014-09-21 14:37:29 -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
ignatio
bdf41b12fb Fixed Shipwrecks
Shipwrecks only occur when disasters are enabled, similar to plane
crashes.
2014-06-28 13:16:37 -04:00
ignatio
e00810ef8f Removing Ship Explosions
Removed ship explosions due to spam in fastest speed setting.
2014-06-28 12:30:33 -04:00
Jason Long
060222a9c1 tools: limit tools for most buildings to a single building at a time
buildings like power plants, stadiums, etc. must be placed one at a time
now
2014-06-23 15:49:45 -04:00
Jason Long
951c0fecbf api: fix use of hi-bits in stadium-handling code 2014-06-20 12:23:43 -04:00
Jason Long
e913626f60 MakeTiles: use constant (STD_SIZE) to represent standard tile size of 16px 2014-06-20 11:46:26 -04:00
Jason Long
d207232fea MakeTiles: refactor: load images at parse time
this will allow me to detect and load animations (in a future commit)
2014-06-20 11:46:05 -04:00
Jason Long
cb84994ce8 MakeTiles: refactor: pushing caching down a level 2014-06-20 11:45:54 -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
69e50258e7 cleanup: better to use 'tile' than 'rawTile' in TerrainBehavior 2014-06-20 11:41:50 -04:00
Jason Long
c6586c322f cleanup: remove superfluous assignment of .tile property
the .tile property should already have the right value when this
method is entered
2014-06-20 11:41:46 -04: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
c0f1d6a486 MakeTiles: output to a graphics directory instead of a specific file 2014-06-16 20:35:32 -04:00
Jason Long
eb97e1c27c MakeTiles: remove support for width/height specifier 2014-06-16 20:32:03 -04:00
Jason Long
bb6ac09e5d MakeTiles: write unique index for each output file 2014-06-16 20:32:02 -04:00
Jason Long
bff42f0cf9 MakeTiles: allow non-integer tile names; generate an idx file 2014-06-16 20:32:01 -04:00
Jason Long
0bf95f4b19 MakeTiles: refactor to simplify main() method body 2014-06-16 20:32:00 -04:00
Jason Long
7b890e9d89 tiles: add name property to spec 2014-06-16 20:31:59 -04:00
jason@long.name
cf626bc30c docs: document the CityRect class
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@920 d9718cc8-9f43-0410-858b-315f434eb58c
2014-03-05 01:58:38 +00:00
jason@long.name
bde6014165 docs: document the Tiles class
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@919 d9718cc8-9f43-0410-858b-315f434eb58c
2014-03-05 01:58:31 +00:00
jason@long.name
a8710741d9 docs: add inline documentation for various Sprite classes
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@918 d9718cc8-9f43-0410-858b-315f434eb58c
2014-03-05 01:58:19 +00: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
2a77ddb26c tools: define size/cost of tool as regular properties of the tool
rather than using a giant switch block to determine size/cost

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@913 d9718cc8-9f43-0410-858b-315f434eb58c
2014-01-05 22:13:36 +00:00
jason@long.name
2d8e8ba86d tornado: add logic for when tornado runs out of steam
This is code from the original C/C++ release, modified to fix
what I perceived as a bug. After the tornado runs for 200 ticks,
there is a 0.2% chance of termination each tick.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@912 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-22 16:32:39 +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