Commit Graph

1043 Commits

Author SHA1 Message Date
Michael Bayne 025f212df0 Use a BorderLayout.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1043 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:42:51 +00:00
Michael Bayne cbaba2b381 Tell the sprite manager about our viewport offset.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1042 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:41:55 +00:00
Michael Bayne 958cb213d5 Blarg. Have to tell the sprite manager about the viewport offset when
we're using it to render sprites into a view that is being displayed in a
viewport that is smaller than the actual size of the view. Oh the
jockeying.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1041 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:41:36 +00:00
Michael Bayne b01df00f3f Use a border layout.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1040 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:21:33 +00:00
Michael Bayne 74ae7214da Use full-screen mode if possible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1039 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:21:15 +00:00
Michael Bayne 922fdc292f Have to translate invalidated rectangles according to our viewport
translations for everything to work out.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1038 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:20:13 +00:00
Michael Bayne 3e68fd8994 Clear out our back buffer when we're validated (as we probably changed
sizes).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1037 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:19:04 +00:00
Michael Bayne 7db44c5ee3 Let the animated panel handle invalidating the regions exposed by
scrolling so that it can do so with the actual dimensions of the panel
(the scene view only knows how big its model wants to be). Changed
scrollView to viewWillScroll to more accurately reflect what's going on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1036 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 05:03:17 +00:00
Michael Bayne d6ad960a14 Don't show coordinates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1035 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 04:45:55 +00:00
Michael Bayne f2f6407c1e Need to account for negative scrolling deltas.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 04:45:14 +00:00
Michael Bayne b95f764282 Use smart polygons.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1033 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 04:02:50 +00:00
Michael Bayne fc58eec429 Whoops, missed a change.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1032 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 03:58:37 +00:00
Michael Bayne 9b9211de16 Use a SortableArrayList instead of going for object creation mania every
time we sort the sprite list.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1031 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 03:57:53 +00:00
Michael Bayne a6f63ee873 Need to set the absolute value of the velocity.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1030 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 03:57:30 +00:00
Michael Bayne 6a0ee2f291 Added support for null Streamable fields.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1029 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 03:30:55 +00:00
Michael Bayne b550063f04 Chain exceptions when we can.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1028 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 03:30:40 +00:00
Michael Bayne d8921f3c4b Modified the value marshaller to support reading and writing null.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1027 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 03:05:56 +00:00
Michael Bayne 3125782a15 Modifications to get scrolling working again. It's a bit smoother, but
we can do better.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1026 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 01:42:28 +00:00
Michael Bayne 68823a9f8a Updates to support new method signature.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1025 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 01:27:48 +00:00
Michael Bayne 7302924ea0 Can't ignore repaints, try not being decorated.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1024 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 01:27:34 +00:00
Michael Bayne b0364efa34 Only request a repaint in mouseMoved() when our hobject changes if we're
highlighting objects and the object's action status is in line with
whether or not we're only highlighting objects with actions. Also changed
some things to support the new, simpler, AnimatedView interface.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1023 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 01:26:17 +00:00
Michael Bayne e0e60c3fe3 Modifications to bring things up to speed with interface changes in the
animation base classes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1022 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 01:24:59 +00:00
Michael Bayne 63a32a6332 Modified rendering to use a hand managed volatile image as a back buffer
instead of using a buffer strategy. This will shortly be extended to
support more efficient scrolling as well.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1021 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 01:23:56 +00:00
Michael Bayne 8d56ec853a Documentation clarification.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1020 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-18 06:06:14 +00:00
Michael Bayne 06f9ac0c31 Disable scrolling when speed is set to zero mspp.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1019 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-18 06:05:59 +00:00
Michael Bayne f497a93541 Create the IsoSceneViewModel and no longer create the sprite manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1018 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-18 00:43:24 +00:00
Michael Bayne c97222993b Have the scene view panel create its own sprite manager and supply it with
a scene view model rather than a config object from which it would create
a model.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1017 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-18 00:40:58 +00:00
Michael Bayne 9faac13369 Added ability to construct a view model directly with the proper
parameters.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1016 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-18 00:37:55 +00:00
Michael Bayne 648c1c3c99 Need to use / not File.separator because apparently jar files always want
forward slashes. (Write once, run anywhere!)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1015 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-18 00:06:57 +00:00
Michael Bayne 718ca0de17 Test application for the scrolling isometric view.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1014 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 23:48:38 +00:00
Michael Bayne 7fa37c5837 No coordinates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1013 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 23:48:27 +00:00
Michael Bayne 4b783c4482 Enhancements to support simple scrolling. A number of things don't work if
the view is scrolled, like object tiles, mouse coordinate computation and
pretty much anything other than rendering a scrolling background under
some sprites. Someday we'll probably want to sort out all that other
business, but not under current monthstone circumstances.

Note: the scrolling still feels a bit choppy (even under Windows) which is
annoying, but I'm doing everything by the book and have spent too much
time fine tuning it already, so we'll have to come back to this later if
we're not happy with the visuals.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1012 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 23:45:36 +00:00
Michael Bayne fbc39605e7 Enhancements to support scrolling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1011 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 23:40:43 +00:00
Michael Bayne b1109c8370 The animated view is now passed its invalid rect count in
paintImmediately() so that it can figure out if it's being painted solely
to facilitate scrolling or because there are dirty regions.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1010 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 23:39:32 +00:00
Michael Bayne 7c5e5dbce9 Added support for animated views that scroll. The animation manager
attempts to tune its refresh interval to one that allows the animated view
to scroll in even pixel counts each time through the render loop.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1009 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 23:38:18 +00:00
Michael Bayne fdf15f0f52 Moved config toggle for showing object footprints into the scene view
model where it resides happily with existing toggles for showing
coordinates and sprite paths; did some other cosmetic cleanup.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1008 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 08:09:11 +00:00
Michael Bayne 42261772a5 Modified scene interface so that tiles are requested directly so that we
can implement "virtual" scenes which return tiles infinitely in all
directions in anticipation of supporting scrolling.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1007 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 08:01:15 +00:00
Michael Bayne 1bd4668067 Minor code cleanup; didn't turn out to be useful to have the object action
in the object metrics record.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1006 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 07:30:45 +00:00
Michael Bayne 070c12fbbe Automatically precalculate our precalculatables rather than having some
external entity instruct us to do so. We always want them and they're not
that expensive to calculate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1005 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 07:17:08 +00:00
Michael Bayne 318b476632 Create tile bounding polygons on demand; changed object tile handling such
that a list of object metric records is used rather than a hashtable
mapping tile coords to object tile bounding polygons because we were never
doing a hash lookup, only iterating over the whole table.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1004 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 07:16:21 +00:00
Michael Bayne 8db0bce2a7 Removed warning message because this is a normal occurrence.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1003 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 07:13:59 +00:00
Michael Bayne b3619774c3 Use setStateImmediate() when ending the game so that other game manager
code doesn't have to do something like that itself to prevent code from
being inadvertently executed after the game has been ended.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1002 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-15 03:42:32 +00:00
Michael Bayne 88a4dc157a Fixed up the didShutdown() business which was happening twice; moved the
delegation into the base callback methods.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1001 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-14 18:08:53 +00:00
Michael Bayne 573939b483 Ignore request to start up an in-play game; moved code that starts a game
when all players have arrived in the game room into a method that can be
overridden.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1000 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-14 07:28:12 +00:00
Michael Bayne 2e9627d601 New test scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@999 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-14 01:13:35 +00:00
Michael Bayne c25f5ce570 Out with the old, in with the new.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@998 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-14 01:11:14 +00:00
Michael Bayne 131ab59ad9 Whoops, need a length one not zero array.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@997 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-14 00:00:45 +00:00
Michael Bayne 6448309b0e startGame() and endGame() need to be public to be accessible to the
delegates; added isGameOver() to standardize the way that the delegates
determine that the game is over (isGameOver() may need to be customized by
the games, so we want the delegates to use the game's custom code when
appropriate).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@996 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-13 18:50:15 +00:00
Michael Bayne a00e7e5214 Automatically create a SpriteManager unless otherwise instructed; added
methods for starting and stopping the animation manager associated with an
animated panel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@995 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-13 18:48:56 +00:00
Michael Bayne a85a6f1394 Delegation! Since it's clear that extracting services into delegation
classes is only going to become more common, I've gone and created a
comprehensive facility for creating and using delegates in the place
controller and manager as well as the game controller and manager. With
the pattern nicely set, it is also easy to extend to controller/managers
further up the hierarchy that might need to delegate special methods of
their own. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@994 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-13 03:21:28 +00:00