Commit Graph

1556 Commits

Author SHA1 Message Date
Michael Bayne db0c1b59b8 It's not kosher to set a sprite's location until after it is fully
constructed. The reason being that derived classes want to override things
like updateRenderOrigin() which should be called every time the sprite's
location is set, but if we do it in the base class constructor, a derived
class's updateRenderOrigin() will be called before the derived class's
constructor has been called. This is not good. Neither was the existing
code which simply half-assed a location change by updating the sprite's
origin position but not calling updateRenderOrigin(), leaving things
generally confuzzled.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1559 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-08 21:15:35 +00:00
Walter Korman 6260633ec3 Added a variant of createImage() that takes an existing image to be
rendered into the optimized image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1558 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-06 00:38:45 +00:00
Walter Korman 627ee5a1db Javadoc fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1557 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-02 23:15:53 +00:00
Walter Korman 4dcb62d186 Make all simulants AI players.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1556 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-02 21:14:23 +00:00
Ray Greenwell a31730278b added hoverObjectWillChange()
fixed bug that happened when HIGHLIGHT_WITH_ACTION was on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1555 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-29 01:32:28 +00:00
Ray Greenwell 7982e21fc1 Added a primitive mute director to get the ball rolling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1554 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-28 04:09:39 +00:00
Michael Bayne 6d1185c208 Fixed bug in normal rendering, caused the angle to rotate for more
thorough testing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1553 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-28 01:31:11 +00:00
Michael Bayne 00986b3bfd Center the window before displaying.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1552 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-28 01:29:43 +00:00
Michael Bayne 976627a5b9 Test app for GeomUtil.whichSide().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1551 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-28 01:29:32 +00:00
Michael Bayne afeab1ae90 Added convenience versions of the dot product method that assume both
vectors share a common origin; added whichSide() which determines whether
a point is on the left or right hand side of a line.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1550 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-28 01:29:08 +00:00
Ray Greenwell 99f7c227c7 Minor bugfix: fix tile coordinate computation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1549 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-27 01:27:13 +00:00
Michael Bayne e75ae89f22 Various and sundry modifications to clean up orientation handling and add
support for 16 orientations in situations where it is merited.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 23:53:07 +00:00
Michael Bayne d1b428158a Added getOrientation() as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1547 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 23:51:06 +00:00
Michael Bayne b1f17bd32d Trimmed the test component set down to a few essentials; updated the
test vessel components.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1546 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 21:57:01 +00:00
Michael Bayne c3bbaa3e40 Modified getDirection() to use arc tangent so that it maps angles smoothly
to their nearest compass direction instead of the wacky way it did before.
Also added getFineDirection() along with rotateCW() and rotateCCW() to
rotate through (fine) directions (though coarse directions can be rotated
as well, simply by always requesting two ticks of rotation). Also wrote
some test code to make sure everything works.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1545 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 02:54:56 +00:00
Michael Bayne 5124b68339 Added fine compass directions (NNW, ENE, etc.).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1544 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 02:37:18 +00:00
Michael Bayne baab1443ef Added method for obtaining access to an immutable list of the sprites
currently registered with the sprite manager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1543 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 02:36:50 +00:00
Michael Bayne a930ae0f0c Added clearSprites() for clearing all sprites in one fell swoop.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1542 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 17:31:17 +00:00
Michael Bayne 9bffbc0b18 Stuck a final fork (I hope) in the repaint problems associated with popups
and other layered components.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1541 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 01:43:29 +00:00
Ray Greenwell 3d71bd858a added a getUnoccupiedLocation() that only gets a location within
a specified cluster.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1540 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 01:41:59 +00:00
Michael Bayne 4724e25154 Added debug code and commented it out.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1539 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 01:21:17 +00:00
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
Michael Bayne b45bfb9ad3 Removed pointless and incorrect hitTest() override.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1537 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 01:19:08 +00:00
Michael Bayne 5d7decd03b Whoops, invalidate() means mark the component as needing to be relaid out.
We don't want to do that when we mean simply to repaint the whole
component.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1536 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 01:00:22 +00:00
Michael Bayne c6878853e5 Fun with geometry.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1535 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 00:22:44 +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 d497d45176 Notes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1530 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 20:44:52 +00:00
Michael Bayne e2219ca3b0 Removed debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1529 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 20:16:34 +00:00
Michael Bayne d756fa50cd Trimmed objects! The weight loss program proceeds apace.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1528 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:53:13 +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 9ff74211d4 Obsolete.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1526 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:44:50 +00:00
Michael Bayne 4357c047f3 Trimmed tileset takes care of setting up its name, but the image path must
be set by the caller.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1525 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:44:28 +00:00
Michael Bayne c3c08a03b3 Refactored the tileset trimming code so that it can more easily be reused
to trim object tilesets.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1524 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:09:37 +00:00
Michael Bayne ad9a54086e Validate invalid components and *then* tick our frame participants for two
reasons: we don't want anything coming in between the call to tick() and
the call to paint() and components will likely want to be validated before
they are ticked if they happen to be a frame participant and are invalid.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1523 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 03:43:59 +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 cabfc118cb Whoops; don't try to mark a location as reserved if we couldn't find one.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1521 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 23:06:40 +00:00
Michael Bayne b32ca52809 Fixed up logging; added code to mark a location as reserved when we return
it from a call to getUnoccupiedLocation(). Anyone can move into the
location (regardless of who reserved it), but it won't be reported as
unoccupied until someone enters it and leaves from it once again.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1520 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 22:38:58 +00:00
Michael Bayne 01d2318133 Convenience method for reporting username and object oid easily.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1519 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 22:37:32 +00:00
Michael Bayne 9f61770db1 Removed verbose debugging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1518 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 22:16:09 +00:00
Michael Bayne eb3a4909d6 Moved getUnoccupiedLocation() into SpotSceneManager; created SpotSceneUtil
which contains the routines to do it; modified said routines to allow them
to be called with the internal location tracking array maintained by the
spot scene manager because that is the only thing guaranteed to be truly
up to date; made use of where() in spot scene manager's log messages.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1517 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 22:14:58 +00:00
Michael Bayne cb14ec144c Use IntListUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1516 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 22:13:39 +00:00
Michael Bayne 300312782a Added a StringUtil Formatter for printing out only the user oid and
location id from an occupantInfo set.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1515 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 22:13:20 +00:00
Michael Bayne fadf226677 Added convenient where() method to PlaceManager which is used when logging
errors to report the "place" in which the error happen. The SceneManager
overrides this to include scene information. Scrupulous use will make log
messages much more scrutable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1514 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 22:12:23 +00:00
Michael Bayne d88e6bc490 Provide access to scene name.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1513 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 22:10:56 +00:00
Michael Bayne 1f80cf9805 Cleaned up some sprite business: better documented various things, changed
local member names to reflect their actual functionality, flipped the sign
of the origin offset so that it's an offset rather than a negative offset.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1512 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 21:42:53 +00:00
Michael Bayne 29cd8ec051 Sanity check the sources we're passed for compositing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1511 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 18:31:03 +00:00
Michael Bayne 15e23c1076 Only fetch our default GraphicsConfiguration if we're using it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1510 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 17:54:26 +00:00