Beispiel #1
0
        private void block_quad_selected(object sender, EventArgs e)
        {
            block_editor block_ed = sender as block_editor;

            m_sel_ind        = block_ed.get_selected_quad_CHR_id();
            m_sel_block_CHRs = block_ed.get_selected_block_CHRs();

            update();
        }
        public tiles_processor(PictureBox _PBoxCHRBank,
                               GroupBox _CHRBankGrpBox,
                               PictureBox _PBoxBlockEditor,
                               PictureBox _PBoxTilePreview,
                               PictureBox _plt_main,
                               PictureBox _plt0,
                               PictureBox _plt1,
                               PictureBox _plt2,
                               PictureBox _plt3,
                               data_sets_manager _data_mngr)
        {
            m_palette_grp     = new palette_group(_plt_main, _plt0, _plt1, _plt2, _plt3);
            m_CHR_bank_viewer = new CHR_bank_viewer(_PBoxCHRBank, _CHRBankGrpBox);
            m_block_editor    = new block_editor(_PBoxBlockEditor);
            m_tile_editor     = new tile_editor(_PBoxTilePreview);

            m_CHR_bank_viewer.subscribe_event(m_block_editor);
            m_CHR_bank_viewer.subscribe_event(_data_mngr);
            m_block_editor.subscribe_event(_data_mngr);
            m_tile_editor.subscribe_event(_data_mngr);
            m_palette_grp.subscribe_event(_data_mngr);

            m_CHR_bank_viewer.subscribe_event(m_palette_grp);

            m_block_editor.subscribe_event(m_CHR_bank_viewer);
            m_block_editor.subscribe_event(m_tile_editor);
            m_tile_editor.subscribe_event(m_block_editor);

            m_CHR_bank_viewer.NeedGFXUpdate += new EventHandler(need_gfx_update_event);
            m_block_editor.NeedGFXUpdate    += new EventHandler(need_gfx_update_event);
            m_tile_editor.NeedGFXUpdate     += new EventHandler(need_gfx_update_event);
            m_palette_grp.NeedGFXUpdate     += new EventHandler(need_gfx_update_event);
#if DEF_PALETTE16_PER_CHR
            m_block_editor.UpdatePaletteListPos += new EventHandler(update_palette_list_pos);
#endif
            m_CHR_bank_viewer.subscribe_event(this);
            m_block_editor.subscribe_event(this);
            m_tile_editor.subscribe_event(this);
        }
Beispiel #3
0
 public void subscribe_event(block_editor _block_editor)
 {
     _block_editor.PixelChanged      += new EventHandler(pixel_changed);
     _block_editor.BlockQuadSelected += new EventHandler(block_quad_selected);
 }
Beispiel #4
0
 public void subscribe_event(block_editor _block_editor)
 {
     _block_editor.DataChanged += new EventHandler(update_data);
 }