예제 #1
0
        public layout_screen_data copy()
        {
            layout_screen_data new_data = new layout_screen_data(m_scr_ind);

            new_data.mark = mark;

            m_ents.ForEach(delegate(entity_instance _ent_inst) { new_data.m_ents.Add(_ent_inst.copy()); });

            return(new_data);
        }
예제 #2
0
        public int layout_screen_num_entities(int _layout_ind, int _scr_pos_x, int _scr_pos_y)
        {
            layout_screen_data data = get_layout_screen_data(_layout_ind, _scr_pos_x, _scr_pos_y);

            if (data != null)
            {
                return(data.m_ents.Count);
            }

            return(-1);
        }
예제 #3
0
        public ushort layout_screen_marks(int _layout_ind, int _scr_pos_x, int _scr_pos_y)
        {
            layout_screen_data data = get_layout_screen_data(_layout_ind, _scr_pos_x, _scr_pos_y);

            if (data != null)
            {
                return(data.mark_adj_scr_mask);
            }

            return(ushort.MaxValue);
        }
예제 #4
0
        public int layout_screen_ind(int _layout_ind, int _scr_pos_x, int _scr_pos_y)
        {
            layout_screen_data data = get_layout_screen_data(_layout_ind, _scr_pos_x, _scr_pos_y);

            if (data != null)
            {
                return(data.m_scr_ind);
            }

            return(-1);
        }
예제 #5
0
        public void delete_screen_by_data(layout_screen_data _data, int _scr_ind)
        {
            _data.m_scr_ind = layout_data.CONST_EMPTY_CELL_ID;
            _data.mark      = _data.adj_scr_mask = 0;

            _data.m_ents.ForEach(delegate(entity_instance _ent_inst) { entity_instance_reset_target_uid(_ent_inst.uid); _ent_inst.reset(); });
            _data.m_ents.Clear();

            if (get_start_screen_ind() == _scr_ind)
            {
                set_start_screen_ind(-1);
            }
        }
예제 #6
0
        public bool set_adjacent_screen_mask(int _scr_ind, int _adj_scr_mask)
        {
            if (_scr_ind >= 0)
            {
                layout_screen_data scr_data = get_data(_scr_ind % get_width(), _scr_ind / get_width());

                if (scr_data.m_scr_ind != layout_data.CONST_EMPTY_CELL_ID)
                {
                    scr_data.adj_scr_mask = ( ushort )_adj_scr_mask;

                    return(true);
                }
            }

            return(false);
        }
예제 #7
0
        public mpd_inst_entity layout_get_inst_entity(int _layout_ind, int _scr_pos_x, int _scr_pos_y, int _ent_ind)
        {
            layout_screen_data data = get_layout_screen_data(_layout_ind, _scr_pos_x, _scr_pos_y);

            if (data != null && _ent_ind >= 0 && _ent_ind < data.m_ents.Count)
            {
                entity_instance ent = data.m_ents[_ent_ind];

                mpd_inst_entity inst_ent = new mpd_inst_entity();

                inst_ent.uid          = ent.uid;
                inst_ent.base_ent_uid = ent.base_entity.uid;
                inst_ent.target_uid   = ent.target_uid;
                inst_ent.x            = ent.x;
                inst_ent.y            = ent.y;
                inst_ent.properties   = ent.properties;

                return(inst_ent);
            }

            return(null);
        }
예제 #8
0
        public bool set_start_screen_ind(int _scr_ind)
        {
            if (_scr_ind >= 0)
            {
                layout_screen_data scr_data = get_data(_scr_ind % get_width(), _scr_ind / get_width());

                if (scr_data.m_scr_ind != layout_data.CONST_EMPTY_CELL_ID)
                {
                    m_start_scr_ind = _scr_ind;

                    return(true);
                }
            }
            else
            {
                m_start_scr_ind = _scr_ind;

                return(true);
            }

            return(false);
        }
예제 #9
0
 public void set_data(layout_screen_data _data, int _x, int _y)
 {
     m_layout[_y][_x] = _data;
 }