Changed MisoSceneModel so that it knows about the view width and height.
It no longer stores base tiles that are not visable in the view, in fact it stores the base tiles in an array almost half the size as the fully expanded scene array, and this new smaller array is used everywhere: when saving the scene, serializing it to the user, or saving it in the database. We must now use the getBaseTile() and setBaseTile() methods to access the base tiles because they are stored in this compressed format. Also removed the fringe layer completely from the MisoSceneModel. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1369 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: DisplayMisoSceneImpl.java,v 1.57 2002/05/03 04:12:48 mdb Exp $
|
||||
// $Id: DisplayMisoSceneImpl.java,v 1.58 2002/05/17 19:06:23 ray Exp $
|
||||
|
||||
package com.threerings.miso.scene;
|
||||
|
||||
@@ -117,7 +117,7 @@ public class DisplayMisoSceneImpl
|
||||
for (int column = 0; column < shei; column++) {
|
||||
for (int row = 0; row < swid; row++) {
|
||||
// first do the base layer
|
||||
int tsid = _model.baseTileIds[swid*row+column];
|
||||
int tsid = _model.getBaseTile(column, row);
|
||||
if (tsid > 0) {
|
||||
int tid = (tsid & 0xFFFF);
|
||||
tsid >>= 16;
|
||||
@@ -130,15 +130,6 @@ public class DisplayMisoSceneImpl
|
||||
BaseTile mtile = (BaseTile)_tmgr.getTile(tsid, tid);
|
||||
_base.setTile(column, row, mtile);
|
||||
}
|
||||
|
||||
// then the fringe layer
|
||||
tsid = _model.fringeTileIds[swid*row+column];
|
||||
if (tsid > 0) {
|
||||
int tid = (tsid & 0xFFFF);
|
||||
tsid >>= 16;
|
||||
Tile tile = _tmgr.getTile(tsid, tid);
|
||||
_fringe.setTile(column, row, tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user