From f6325c5d4c8affe7b2ce864720c5cd6234fe36dd Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 27 May 2003 19:04:29 +0000 Subject: [PATCH] Pass all the object info along when visiting. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2615 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/miso/data/SparseMisoSceneModel.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/miso/data/SparseMisoSceneModel.java b/src/java/com/threerings/miso/data/SparseMisoSceneModel.java index 10208f86f..357c04517 100644 --- a/src/java/com/threerings/miso/data/SparseMisoSceneModel.java +++ b/src/java/com/threerings/miso/data/SparseMisoSceneModel.java @@ -1,5 +1,5 @@ // -// $Id: SparseMisoSceneModel.java,v 1.8 2003/05/22 22:18:02 mdb Exp $ +// $Id: SparseMisoSceneModel.java,v 1.9 2003/05/27 19:04:29 mdb Exp $ package com.threerings.miso.data; @@ -30,7 +30,7 @@ public class SparseMisoSceneModel extends MisoSceneModel public static interface ObjectVisitor { /** Called for each object in the scene, interesting and not. */ - public void visit (int tileId, int x, int y); + public void visit (ObjectInfo info); } /** Contains information on a section of this scene. This is only @@ -261,11 +261,14 @@ public class SparseMisoSceneModel extends MisoSceneModel Section sect = (Section)iter.next(); for (int oo = 0; oo < sect.objectInfo.length; oo++) { ObjectInfo oinfo = sect.objectInfo[oo]; - visitor.visit(oinfo.tileId, oinfo.x, oinfo.y); + visitor.visit(oinfo); } + ObjectInfo info = new ObjectInfo(); for (int oo = 0; oo < sect.objectTileIds.length; oo++) { - visitor.visit(sect.objectTileIds[oo], - sect.objectXs[oo], sect.objectYs[oo]); + info.tileId = sect.objectTileIds[oo]; + info.x = sect.objectXs[oo]; + info.y = sect.objectYs[oo]; + visitor.visit(info); } } }