Commit Graph

1067 Commits

Author SHA1 Message Date
Ray Greenwell 1c182d6e36 this line should have been commented out too
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1338 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 21:36:32 +00:00
Michael Bayne 37a1167fb5 Revamped component action animation support so that we're not passing
around arrays of multi-frame images but instead pass around one object
that knows how to render any action frame in any orientation. This
apparently fixed some horrible bug that we had introduced in doing JITC
and now the whole thing is super fast, just like I always thought it would
be. Once we introduce trimmed images, it will blaze!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1336 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 19:38:14 +00:00
Michael Bayne 47e38b4fa8 Changed MultiFrameImage around so that it retains total control over its
internal images and doesn't necessarily need to decode them into multiple
images or even have actual images at all. This cleans things up and paves
the way for our "trimmed" image support which is forthcoming.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1335 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 19:35:31 +00:00
Michael Bayne 0492637aa0 Moved hitTest() into ImageUtil where its accessible to all that need it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1334 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 19:34:14 +00:00
Michael Bayne 554fb9e249 First pass at just in time compositing (JITC!). Things aren't quite as
fast as I'd have hoped, but I'm optimistic that the image compression
business that Walter and I are embarking upon will solve that handily.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1333 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 06:57:24 +00:00
Michael Bayne 33eb11b8f6 Fixed yet another bug with the Swing rendering code: apparently the
JEditorPane, when displaying HTML that contains forms, pointlessly wraps
its Swing components in heavy weight AWT components which would otherwise
trigger some funny business that we don't want it to trigger.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1332 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 05:13:54 +00:00
Michael Bayne d43442b3dd Changed debug logging so that it is easier to enable and disable since I
seem to be debugging the fucking rendering every other day. Fixed bug with
dirty region combining.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1331 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 03:09:46 +00:00
Michael Bayne a98f5f617a Yet more rendering fixes: we render the frame participants before the dirty
Swing components and we go through and specifically render any components
in the upper layers (see JLayeredPane for what this means) that overlap
our frame participants every frame. This is non-optimal, but the hairy
code that somehow magically works out who to repaint when components
overlap is not even something that I want to dig more deeply into. There
are generally not many components in the upper layers (only popups like
menus and tooltips and internal frames when we use them).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1329 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-03 04:16:41 +00:00
Michael Bayne 4da9a66c1d Fixed more repaint bugs. We weren't properly painting the opaque component
when doing old-skool rendering. We also needed to climb up the hierarchy
looking to see if a parent is dirty for each dirty component and combine
the child and parent dirty rects and only repaint the parent otherwise we
can run into problems with render order. Oh the complexity (though Swing
does this too).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1328 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-03 04:14:20 +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 ccf0dca140 Don't issue an ALREADY_THERE response if a user requests to move to a zone
they already occupy. When a client logs on after a disconnect, it needs to
do a zoned moveTo request to get back to where it was because it doesn't
have the zone summary and associated good stuff.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1326 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-03 00:00:17 +00:00
Michael Bayne 9abf440dde If the client asks to move to the location they're already in, just go
along with them rather than sticking a fork in the program.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1325 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-02 21:19:28 +00:00
Michael Bayne c15f763ba0 It's a feature!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1324 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-02 19:34:51 +00:00
Ray Greenwell 9503d37d90 added getResourceString() which actually gets the business from
the ResourceBundle, making this class easy to extend...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1323 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-01 03:39:13 +00:00
Michael Bayne e13f354672 Oops, forgot that ResourceBundle throws a MissingResourceException rather
than returning null. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-01 02:47:18 +00:00
Michael Bayne 3f91aed3aa Added code to allow the creation of custom message bundles to go along
with a particular bundle's translation files. Mainly so Ray can do his
funny business with the pirate message translations.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1321 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-01 02:45:00 +00:00
Michael Bayne d026daa466 Not to choke if we can't resolve a resource bundle.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1320 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-30 17:45:27 +00:00
Michael Bayne 4ec673e6c2 Localized chat! Server entities may now fake speak and tell messages that
are translated by the client upon receipt. We love to translate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1319 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-30 17:27:30 +00:00
Michael Bayne 530a348890 Added tileImageDown().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1318 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-30 02:14:13 +00:00
Ray Greenwell 0fe4f660a5 Let any object receive success/failure responses for a traversePortal
request.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1317 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-29 21:03:00 +00:00
Michael Bayne 6ecc381180 Added tileImageAcross().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1316 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-29 01:12:54 +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 d107dd790f If we have no clip, we need to repaint our whole bounds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1314 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 02:50:32 +00:00
Michael Bayne b602cb4fce Modified frame manager to do the right thing in terms of repainting
everything if we lose our volatile offscreen buffer image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1313 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 02:49:32 +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 7af3e3afdc Was preferring lowest not highest.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1311 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 01:30:10 +00:00
Michael Bayne 872e10f11d Catch IllegalArgumentException if it's thrown while we're loading our
images. The PNG loader seems to be kind enough to throw fucking runtime
exceptions when it encounters file format problems instead of throwing
IOException or some other declared exception.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1310 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-28 01:19:11 +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 b68d34e4e8 Use the width and height that we so handily obtained earlier.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1307 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 22:40:09 +00:00
Michael Bayne 46b6defc06 Removed some debug logging; tried the buffer strategy approach which won't
work because we're not painting everything on every frame, but left the
commented out alternative rendering code in there in case we want to
fiddle with it at a later date (or provide support for buffer strategies
for applications that do want to paint everything).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1306 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 22:39:45 +00:00
Michael Bayne 116ce388ca Need to translate to the coordinates of the opaque parent we're
repainting, not necessarily the original component we're repainting.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1305 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 19:12:00 +00:00
Michael Bayne b9af18d10e We need to paint the first opaque parent of a dirty component rather than
the dirty component directly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1304 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 18:59:55 +00:00
Michael Bayne 6a7fd11321 Try filling the offscreen buffer with a solid color after we create it to
avoid painting garbage to the screen.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1303 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 18:59:27 +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 3fa39d06ff Fixed up borked translated dirty region handling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1298 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 04:57:05 +00:00
Michael Bayne 3713cf1034 More repaint manager fixes. We're now behaving even more closely like
Swing would behave.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1296 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 02:33:14 +00:00
Michael Bayne 52790799d2 Name changes; comment fix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1295 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-26 02:34:11 +00:00
Michael Bayne e3fafb5b8c Exposed the mechanism for locking down client objects during a client
session so that fake sessions can effect their own locking.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1294 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-26 02:32:27 +00:00
Ray Greenwell 57a937839d Allow any object to be used as the response target for a moveTo request.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1293 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-26 00:07:05 +00:00
Michael Bayne 23d170c83e Added support for pausing a media panel which pauses all sprites and
animations currently operating therein. (It doesn't pause scrolling which
I suppose I'll have to fix at some point if we ever need it.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1292 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-25 16:23:31 +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 6549a27189 Need to avoid counting a components offset twice.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1290 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 03:10:59 +00:00
Michael Bayne 47c94068ec Need to restrict the clipping rectangle, not replace it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1289 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 03:10:39 +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 cc6a9d00ef Major low-level rendering rethink. There will be much follow-on cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1286 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 01:16:28 +00:00
Ray Greenwell 849eaec47b gameDidEnd will now be called even if the game is cancelled.
Made AI ticking only happen while the game is IN_PLAY.
Added forgotten comment.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1285 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-19 21:40:38 +00:00
Ray Greenwell 575c276c9a hold gamemanagers in a set instead of a list since their order doesn't matter
and we want to prevent them from being added twice.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1284 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-19 21:33:21 +00:00
Ray Greenwell 4b0b462c3a Tick for each AI, pass the tick to the delegates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1283 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-19 21:16:42 +00:00
Ray Greenwell 48ad174dd7 initial revision.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1282 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-19 18:33:32 +00:00
Ray Greenwell e73350838f - Moved AI handling framework here from PuzzleManager.
- Set game state to CANCELLED if it wasn't yet GAME_OVER when shutting down
  the game.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1281 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-19 18:33:10 +00:00