Example #1
0
        int last_bucket; /**< Last bucket acted upon. */

        #endregion Fields

        #region Constructors

        public MapContent(Map map)
        {
            last_bucket=0;
            zones=null;

            buckets[0]=new ObjectBucket();
            buckets[0].allocate(); // Skip ID 0
            for(int i=1; i<256; ++i) //TODO Unötig in C#?
            {
                buckets[i]=null;
            }

            mapWidth=(ushort)((map.getWidth()*map.getTileWidth()+zoneDiam-1)
                /zoneDiam);
            mapHeight=(ushort)((map.getHeight()*map.getTileHeight()+zoneDiam-1)
                /zoneDiam);
            zones=new MapZone[mapWidth*mapHeight];

            //ZOnen initialisieren //TODO wird das an anderer Stelle getan?
            for(int i=0; i<zones.Length; i++)
            {
                zones[i]=new MapZone();
            }

            things=new List<Thing>();
        }