Split the rendering into scrolled items and fixed items. Render the
sprites (and object tiles) as fixed items. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1047 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: IsoSceneView.java,v 1.100 2002/02/19 05:03:17 mdb Exp $
|
// $Id: IsoSceneView.java,v 1.101 2002/02/19 19:57:46 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene;
|
||||||
|
|
||||||
@@ -170,8 +170,8 @@ public class IsoSceneView implements SceneView
|
|||||||
// translate according to our scroll parameters
|
// translate according to our scroll parameters
|
||||||
gfx.translate(-_xoff, -_yoff);
|
gfx.translate(-_xoff, -_yoff);
|
||||||
|
|
||||||
// render the scene to the graphics context
|
// render the scrolling part of the scene
|
||||||
renderScene(gfx);
|
renderScrollingScene(gfx);
|
||||||
|
|
||||||
// draw tile coordinates
|
// draw tile coordinates
|
||||||
if (_model.showCoords) {
|
if (_model.showCoords) {
|
||||||
@@ -181,6 +181,9 @@ public class IsoSceneView implements SceneView
|
|||||||
// untranslate according to our scroll parameters
|
// untranslate according to our scroll parameters
|
||||||
gfx.translate(_xoff, _yoff);
|
gfx.translate(_xoff, _yoff);
|
||||||
|
|
||||||
|
// render the fixed part of the scene
|
||||||
|
renderFixedScene(gfx);
|
||||||
|
|
||||||
// draw frames of dirty tiles and rectangles
|
// draw frames of dirty tiles and rectangles
|
||||||
// drawDirtyRegions(gfx);
|
// drawDirtyRegions(gfx);
|
||||||
|
|
||||||
@@ -318,15 +321,25 @@ public class IsoSceneView implements SceneView
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the scene to the given graphics context.
|
* Renders the scrolling part of the scene to the given graphics
|
||||||
|
* context.
|
||||||
*
|
*
|
||||||
* @param gfx the graphics context.
|
* @param gfx the graphics context.
|
||||||
*/
|
*/
|
||||||
protected void renderScene (Graphics2D gfx)
|
protected void renderScrollingScene (Graphics2D gfx)
|
||||||
{
|
{
|
||||||
// Log.info("renderScene");
|
|
||||||
renderTiles(gfx);
|
renderTiles(gfx);
|
||||||
renderBaseDecorations(gfx);
|
renderBaseDecorations(gfx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the non-scrolling part of the scene to the given graphics
|
||||||
|
* context.
|
||||||
|
*
|
||||||
|
* @param gfx the graphics context.
|
||||||
|
*/
|
||||||
|
protected void renderFixedScene (Graphics2D gfx)
|
||||||
|
{
|
||||||
renderDirtyItems(gfx);
|
renderDirtyItems(gfx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user