Commit Graph

295 Commits

Author SHA1 Message Date
Michael Bayne 624923ed40 Brought comment into line with reality.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1538 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 01:20:07 +00:00
Ray Greenwell c467da448a The tragic end of ScreenTilePath
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1534 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-22 01:00:32 +00:00
Ray Greenwell d597e91e44 rollback to 1.7, which is the same as 1.5 (ugh)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1533 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-22 00:59:02 +00:00
Ray Greenwell 7846ddd0d7 Re-enabled the ability to traverse offscreen, but fixed some
problems with my previous hack and made offscreen also paths have
huge 'costs', and also bound in potential paths from being
too expensive (to prevent infinite loops if there's no path to a location.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1532 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-22 00:49:15 +00:00
Ray Greenwell 7860992f57 Allow paths to go to offscreen coordinates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1531 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-22 00:45:18 +00:00
Michael Bayne 53ca4a30ce Whoops, -1 is not a good value for "invalid offset" because object tiles
may well have a -1 origin offset. We use Integer.MIN_VALUE now which is
definitely not going to be a valid value.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1527 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:52:36 +00:00
Michael Bayne a42e485d06 Only bound our view's coordinates if the view model is configured for a
bounded view.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1522 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 00:04:41 +00:00
Michael Bayne ea31232166 Added code to ensure that the scene view is not scrolled outside the
bounds described by the view model.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1508 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 07:50:33 +00:00
Walter Korman 43191a0512 Minor reformatting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1505 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 07:47:14 +00:00
Michael Bayne 4036904d0e Brought miso stuff into line with new media architecture; implemented
various and sundry optimizations in the process. We love the spiral
development.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1476 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 22:38:12 +00:00
Ray Greenwell f91f47d73b Added ScreenTilePath, which does everything in screen coordinates,
but after each movement it updates the sprite that it's moving to tell
it the latest tile coordinates.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1472 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 21:22:34 +00:00
Walter Korman a68638ddb9 Added facility for toggling whether object footprints are to be shown.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1469 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-17 18:01:47 +00:00
Ray Greenwell 4f2ca1dae9 Undid last revision.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1454 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 23:31:42 +00:00
Ray Greenwell 4623c07fc2 Undid revisions 1.16 and 1.15:
null tiles and invalid coordinates are unpassable again.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1453 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 23:30:40 +00:00
Ray Greenwell 9a27409a97 occam's razor
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1452 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 21:51:19 +00:00
Ray Greenwell a3628a419c Upped the ante from my last modification:
- invalid coordinates are traversable.
- check to see if an out-of-bounds node is requested and gracefully create it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1451 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 17:48:11 +00:00
Ray Greenwell b27a863f62 behavior change: null tiles are passable. Hopefully this doesn't break
anything, but it was required to make sprites walk off/on-screen.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1446 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 07:02:31 +00:00
Ray Greenwell 7de32e1c24 Be compatible with out superclass, LineSegmentPath, if someone
calls it's addNode() method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1445 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 07:01:29 +00:00
Michael Bayne ccbc47a7de Separated path code from sprite code so that we can have other things
follow a path (specifically, I want to allow the media panel to be
"scrolled" along a path).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1409 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-31 03:38:03 +00:00
Ray Greenwell f448ebe4f1 Create the polygon cache hash with custom parameters to the constructor
to optimize memory performance.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1408 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-30 22:21:51 +00:00
Ray Greenwell fe645cf2b7 typofix
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1389 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-24 20:32:11 +00:00
Ray Greenwell 984fa75229 made getIsoDirection() and getProjectedIsoDirection() more accurate.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1388 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-24 20:15:04 +00:00
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