Commit Graph

273 Commits

Author SHA1 Message Date
Ray Greenwell 193cffe8ea Don't freak out if a base tile is null: now all the off-screen base
tiles are null...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1371 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 19:07:47 +00:00
Ray Greenwell 0c664ce9b7 Use the new accessor methods for getting base tile ids from the model.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1370 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 19:07:04 +00:00
Ray Greenwell bb6b0f56ca Changed MisoSceneModel so that it knows about the view width and height.
It no longer stores base tiles that are not visable in the view,
in fact it stores the base tiles in an array almost half the size as the
fully expanded scene array, and this new smaller array is used everywhere:
when saving the scene, serializing it to the user, or saving it in
the database.
We must now use the getBaseTile() and setBaseTile() methods to access the
base tiles because they are stored in this compressed format.
Also removed the fringe layer completely from the MisoSceneModel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1369 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 19:06:23 +00:00
Michael Bayne 7ba2173174 Fixed bug whereby byte buffer that held scene data was still big enough to
accomodate the fringe layer and the way the ByteBuffer stuff works, it
writes out the whole enchilada even if there are a bunch of zeros at the
end.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1367 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-16 03:54:18 +00:00
Ray Greenwell b63c2aeeba never output the fringe layer.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1364 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-16 02:25:19 +00:00
Michael Bayne 609c6939da Minor formatting edits that occurred in the course of debugging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 16:48:34 +00:00
Michael Bayne 8ad4c1abea Dooh! Graphics not Graphics2D.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1353 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-09 16:47:48 +00:00
Michael Bayne 6dcdba4540 Added toString() to records; report which record we're failing to add when
such things happen.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1343 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-07 00:05:02 +00:00
Michael Bayne 99c4330646 The vast and the sweeping. Modified the tile framework such that tiles no
longer provide access to their underlying image (they actually still do,
but not in the normal course of affairs). This will allow us to use
"trimmed" tiles which are trimmed to the smallest rectangle that contains
the non-transparent pixels in a tile image, which will shrink up our
components and other tiles a great deal.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-06 18:08:32 +00:00
Michael Bayne 2005f22000 Moved fringing code into base display miso scene and added code to fringe
a scene when it is first displayed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1327 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-03 04:12:48 +00:00
Michael Bayne dc5d23e3e4 Don't foolishly blow away a perfectly good set of object tile ids and
actions unless we're actually loaded into the editor and turned into a
real editable scene.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1315 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 03:14:15 +00:00
Michael Bayne f79d048084 Create the lists and tables at construct time in case we never load up a
scene and are asked to look at that stuff.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1312 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 01:37:02 +00:00
Michael Bayne 4d62053e4d Check for tile intersection using the polygon's bounds rather than doing
the expensive polygon/rectangle intersection test (since we're doing 400
of these every frame).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1308 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 23:07:41 +00:00
Michael Bayne 938445071e Removed the last vestiges of the object "layer". Scenes now simply have a
list of objects, they can overlap (I think that objects added to a scene
later will be rendered before objects added earlier which ends up feeling
natural in the editor); no longer are objects ignored when their footprint
lies outside the scene bounds.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1302 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 18:41:14 +00:00
Michael Bayne 1ba123de96 Need to restrict the clipping rectangle not replace it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1291 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 03:11:17 +00:00
Michael Bayne 0bde11ee81 Major low-level rendering rethink.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1287 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 01:18:17 +00:00
Michael Bayne 8d41371457 Added getProjectedIsoDirection() for obtaining the isometric direction
between two screen coordinates. The screen coordinates are "projected"
into isometric space and the vector between them is calculated (except we
don't actually do the projection because we can tell just by looking at
the points what the projected orientation will be).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1257 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-16 17:20:09 +00:00
Michael Bayne 18475fd820 Added removeSprite() to go with addSprite().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1254 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 23:10:40 +00:00
Ray Greenwell f687571d0f How did this get away with having the old path for the .dat file?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1249 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 21:30:56 +00:00
Ray Greenwell 95017c3ebf Changed default base tile to default base tileset.
Clearing a base tile sets it to a random tile from the default tileset.
setBaseTiles() now takes a tileset and fills the rectangular area with
random tiles from that set.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1227 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-09 18:06:37 +00:00
Ray Greenwell 02dd621601 If fringing a rectangular area, you must pass in your own Random object.
If fringing an entire scene, you must pass in a randomization seed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1226 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-09 18:05:07 +00:00
Ray Greenwell 5cedd42923 optimized getMultiTilePolygon to do less swapping
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1225 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-09 17:02:50 +00:00
Ray Greenwell 595aa68539 we love to comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1224 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-09 04:37:38 +00:00
Ray Greenwell b1d7c171f0 added getMultiTilePolygon, which returns a Polygon describing a rectangle
bounding the two specified tiles.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1223 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-09 04:36:06 +00:00
Ray Greenwell dc82aa0a98 We needn't add the first vertex of a polygon again at the end.
Quoth the java.awt.Polygon documentation:
    The first and final pairs of (x, y) points are joined by a line
    segment that closes the polygon.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1222 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-09 03:12:43 +00:00
Ray Greenwell 8adde69e3b make sure we fringe when a base tile is deleted.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1221 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-09 01:58:37 +00:00
Ray Greenwell 94feee3436 Moved the bits -> index reverse lookup from FringeConfiguration to
AutoFringer because our fringe tileset is hardcoded now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1220 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-08 19:41:52 +00:00
Ray Greenwell 41185335c7 Don't parse the 'tiles' attribute, we decide to just hardcode the tiles
since the autofringer can create any fringe now anyway.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1219 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-08 19:40:04 +00:00
Ray Greenwell 03579fa0ef Oops: our variables were still defined as 'static'.
Changed private to protected.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1218 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-08 18:41:58 +00:00
Ray Greenwell 601d515df2 If we fail on a lookup of turning fringebits into a fringe index,
try decomposing the bits into contiguous regions and see if we
can't get fringe indexes for those regions.
This makes everything always fringes everywhere.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1211 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 22:07:41 +00:00
Ray Greenwell 0768f82fd9 Use the FringeTile multi-image functionality to allow different base tilesets
to simultaneously fringe upon another base.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1210 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 20:50:30 +00:00
Ray Greenwell 79cde8f9eb cleanup
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1206 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 03:52:28 +00:00
Ray Greenwell 91b7065486 Store images in our mask cache, use the new FringeTile object and
ImageUtil.composeMaskedImage() to create the masked fringe images.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1204 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 03:43:24 +00:00
Ray Greenwell 3474c9c199 FringeTile- a Tile object that may contain multiple images.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1203 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 03:41:58 +00:00
Ray Greenwell af777c5ab6 bugfix
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1201 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 02:43:34 +00:00
Ray Greenwell e61181ed5e fixed import; implemented setBaseTiles in the Impl
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1199 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 02:08:21 +00:00
Ray Greenwell 07eb05ce27 compiles now!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1198 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 02:07:13 +00:00
Michael Bayne b6c69d1fca Return a MisoTileManager now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1197 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 02:04:23 +00:00
Michael Bayne 168b16d006 Screw the miso tileset repository; we'll just have the miso tile manager
load the fringe configuration from a standard place in the classpath.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1194 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:56:46 +00:00
Ray Greenwell 825cbb969d Added method to fill a rectangle with a base tile. Will only fringe once
the entire rectangle is set.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1193 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:55:28 +00:00
Ray Greenwell 7bac770744 The AutoFringer!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1192 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:53:58 +00:00
Michael Bayne b06c592a1b Display and editable miso scenes now take a miso tile manager so that they
can do their fringing business.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1191 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:52:34 +00:00
Michael Bayne b4d6464075 Miso tile manager extends regular tile manager and provides access to an
auto fringer; miso tileset repository does same and provides access to
fringe configuration.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1190 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:46:56 +00:00
Michael Bayne bab3b54d41 Moved into miso.tile from miso.scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1189 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:38:32 +00:00
Ray Greenwell b2180b0072 Added method to get a whole random FringeTileSetRecord, instead of getting
the fringe tsid.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1188 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 01:34:12 +00:00
Ray Greenwell 3ca8de355e Fixed turning a String into a boolean value.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1187 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-05 23:18:36 +00:00
Ray Greenwell 5805f6bd5b Moved code to determine if the records are fully specified into
FringeConfiguration- the parser now just reports the error but doesn't
know exactly what it did wrong.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1186 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-05 01:45:53 +00:00
Ray Greenwell d92f623f17 Moved all validation into the parser.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1185 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-05 01:35:11 +00:00
Ray Greenwell 42e773579a Fixed bug with bogus tileset ids being inserted into fringe configuration.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1184 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-05 00:34:57 +00:00
Ray Greenwell 833aa75ff4 Added code to read configuration of which fringing tiles we have images
for.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1183 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-04 04:06:57 +00:00