Commit graph

505 commits

Author SHA1 Message Date
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
0d82d3514c cleanup: no longer need to apply LOMASK
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@900 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 16:02:17 +00:00
jason@long.name
c2286465a7 api: TileConstants- never accept "raw" tile numbers
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@899 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 16:02:13 +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
dbb7029ec2 tiles.rc: annotate tiles that can be bulldozed
these tiles can be bulldozed clean using the bulldozer

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@893 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 16:01:45 +00:00
jason@long.name
721e135fee tool-effect: treat tiles outside of city boundary as dirt
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@892 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 02:48:06 +00:00
jason@long.name
2c517c476b cleanup: use named constants in isRiverEdge
instead of hard-coded numbers

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@891 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-06 02:48:00 +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
f8d3532cf7 cleanup: use constants for RivEdge table (in MapGenerator)
replace hard-coded numbers with constants and constants plus offsets

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@889 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-03 02:18:44 +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
a47ceac844 tiles.rc: remove tile information for 7 unused tile numbers (amongst roads tiles)
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@887 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-02 01:44:57 +00:00
jason@long.name
1026fdf34f make-tiles: allow tile specification to be empty
this fixes a build-crash bug if a tile is not given any images

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@886 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-02 01:44:52 +00:00
jason@long.name
685ccd22d5 tiles.rc: rewrite isOverWater() to use the new "over water" attribute
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@885 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-02 01:44:45 +00:00
jason@long.name
0654013c3e tiles.rc: tag which road/wire/rail tiles are "over water"
"over water" means when they decay or are bulldozed, they are replaced
with water instead of rubble/dirt.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@884 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-02 01:44:39 +00:00
jason@long.name
0640f78ebe tiles.rc: ensure that invisible open-drawbridge tiles do not burn
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@883 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-02 01:44:32 +00:00
jason@long.name
5278164215 build.xml: begin work on version 1.7
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@882 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-02 00:51:37 +00:00
jason@long.name
6bb702533f locale: remove country qualifier from Swedish strings files
This way the Swedish strings will be used for any locale beginning
with "sv" and not just "sv_SE".

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@879 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-02 00:40:40 +00:00
jason@long.name
e2e85ccdc0 locale: remove country qualifier from german strings files
This way the German strings will be used for any locale beginning
with "de" and not just "de_DE".

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@878 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-02 00:40:35 +00:00
jason@long.name
4651f39819 build: package Mac version of Micropolis
Contributed by benawatt@gmail.com.

Requires App Bundler (https://java.net/projects/appbundler/downloads)
To build, type

ant dist-mac

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@877 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-01 22:48:08 +00:00
jason@long.name
034c6afd5a localization: german language strings
contributed by matthias.schulze5,
2013-11-10,
https://code.google.com/p/micropolis/issues/detail?id=38

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@876 d9718cc8-9f43-0410-858b-315f434eb58c
2013-11-11 21:05:48 +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
ff84c48091 cleanup: move code that refreshes tile/rawTile closer to where it is needed
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@874 d9718cc8-9f43-0410-858b-315f434eb58c
2013-10-10 13:31:13 +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
e7cb33ca92 behaviors: move exploding-tile processing to new TileBehavior-based class
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@872 d9718cc8-9f43-0410-858b-315f434eb58c
2013-10-10 13:31:06 +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
f3ca16a672 behaviors: define a new class TileBehavior to be a base class
this will be a base class of all tile-behavior classes

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@868 d9718cc8-9f43-0410-858b-315f434eb58c
2013-10-04 12:53:52 +00:00
jason@long.name
6bd61e6575 behaviors: rename old TileBehavior class to make room for new one
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@867 d9718cc8-9f43-0410-858b-315f434eb58c
2013-10-04 12:53:49 +00:00
jason@long.name
eb76937e2c copyright: add copyright notices to source files missing it
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@866 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-28 20:23:22 +00:00
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