private void TileEditorToolStripMenuItem_Click(object sender, EventArgs e) { if (tileEditor == null) { tileEditor = new TileEditor(); tileEditor.SetMemory(kernel.MemMgr); tileEditor.SetResourceChecker(kernel.ResCheckerRef); gpu.TileEditorMode = true; // Set Vicky into Tile mode previousGraphicMode = kernel.MemMgr.VICKY.ReadByte(0); kernel.MemMgr.VICKY.WriteByte(0, 0x10); // Enable borders kernel.MemMgr.VICKY.WriteByte(4, 1); CenterForm(tileEditor); tileEditor.Show(); tileEditor.FormClosed += new FormClosedEventHandler(EditorWindowClosed); // coordinate between the tile editor window and the GPU canvas this.TileClicked += new TileClickEvent(tileEditor.TileClicked_Click); } else { tileEditor.BringToFront(); } }
private void TileEditorToolStripMenuItem_Click(object sender, EventArgs e) { if (tileEditor == null) { tileEditor = new TileEditor(); tileEditor.SetMemory(system.MemoryManager); system.GPU.TileEditorMode = true; //// Set Vicky into Tile mode //previousGraphicMode = system.VICKY.ReadByte(0); //system.VICKY.WriteByte(0, 0x10); //// Enable borders //system.VICKY.WriteByte(4, 1); // Set Vicky into Tile mode previousGraphicMode = FoenixSystem.Current.MemoryManager.ReadByte(MemoryMap.VICKY_BASE_ADDR); FoenixSystem.Current.MemoryManager.WriteByte(MemoryMap.VICKY_BASE_ADDR, 0x10); // Enable borders FoenixSystem.Current.MemoryManager.WriteByte(MemoryMap.VICKY_BASE_ADDR + 4, 1); tileEditor.Show(); tileEditor.FormClosed += new FormClosedEventHandler(EditorWindowClosed); // coordinate between the tile editor window and the GPU canvas this.TileClicked += new TileClickEvent(tileEditor.TileClicked_Click); } else { tileEditor.BringToFront(); } }
static void Init() { TileEditor tEditor = (TileEditor)EditorWindow.GetWindow(typeof(TileEditor)); tEditor.Show(); tEditor.refreshSelection(); }
private void openTileEditor_Click(object sender, EventArgs e) { tileEditor.Show(this); }