Exemplo n.º 1
0
        private void MG_MagicButton_Click(object sender, EventArgs e)
        {
            GraphicsEditor editor = new GraphicsEditor();

            if (Core.CurrentROM is FE6)
            {
                editor.Core_SetEntry(GBA.Screen.W_TILES + 2, GBA.Screen.H_TILES,
                                     Core.GetPointer("Title Screen MG/FG Palette"), false,
                                     Core.GetPointer("Title Screen MG/FG Tileset"), true,
                                     Core.GetPointer("Title Screen MG TSA"), true, false);
            }
            if (Core.CurrentROM is FE7)
            {
                bool tsa = (Core.CurrentROM.Version != GameVersion.JAP);
                editor.Core_SetEntry(GBA.Screen.W_TILES + 2, GBA.Screen.H_TILES,
                                     Core.GetPointer("Title Screen MG Palette"), false,
                                     Core.GetPointer("Title Screen MG Tileset"), true,
                                     Core.GetPointer("Title Screen MG TSA"), tsa, true);
            }
            if (Core.CurrentROM is FE8)
            {
                editor.Core_SetEntry(GBA.Screen.W_TILES + 2, GBA.Screen.H_TILES,
                                     Core.GetPointer("Title Screen MG Palette"), false,
                                     Core.GetPointer("Title Screen MG Tileset"), true,
                                     Core.GetPointer("Title Screen MG TSA"), true, false);
            }

            Program.Core.Core_OpenEditor(editor);
        }
Exemplo n.º 2
0
        private void FG_MagicButton_Click(object sender, EventArgs e)
        {
            GraphicsEditor editor = new GraphicsEditor();

            if (Core.CurrentROM is FE6)
            {
                editor.Core_SetEntry(32, 25,
                                     Core.GetPointer("Title Screen MG/FG Palette"), false,
                                     Core.GetPointer("Title Screen FG Tileset"), true);
            }
            if (Core.CurrentROM is FE7)
            {
                editor.Core_SetEntry(32, 32,
                                     Core.GetPointer("Title Screen FG Palette"), false,
                                     Core.GetPointer("Title Screen FG Tileset"), true);
            }
            if (Core.CurrentROM is FE8)
            {
                editor.Core_SetEntry(32, 32,
                                     Core.GetPointer("Title Screen FG Palette"), false,
                                     Core.GetPointer("Title Screen FG Tileset 1"), true);
            }

            Program.Core.Core_OpenEditor(editor);
        }
Exemplo n.º 3
0
        private void BG_MagicButton_Click(object sender, EventArgs e)
        {
            GraphicsEditor editor = new GraphicsEditor();

            if (Core.CurrentROM is FE6)
            {
                editor.Core_SetEntry(GBA.Screen.W_TILES + 2, GBA.Screen.H_TILES,
                                     Core.GetPointer("Title Screen BG Palette"), false,
                                     Core.GetPointer("Title Screen BG Tileset"), true);
            }
            if (Core.CurrentROM is FE7)
            {
                editor.Core_SetEntry(GBA.Screen.W_TILES, GBA.Screen.H_TILES + 1,
                                     Core.GetPointer("Title Screen BG Palette"), false,
                                     Core.GetPointer("Title Screen BG Tileset"), true);
            }
            if (Core.CurrentROM is FE8)
            {
                editor.Core_SetEntry(GBA.Screen.W_TILES + 2, GBA.Screen.H_TILES,
                                     Core.GetPointer("Title Screen BG Palette"), false,
                                     Core.GetPointer("Title Screen BG Tileset 1"), true,
                                     Core.GetPointer("Title Screen BG TSA"), true, false);
            }

            Program.Core.Core_OpenEditor(editor);
        }
Exemplo n.º 4
0
        private void Platform_MagicButton_Click(Object sender, EventArgs e)
        {
            GraphicsEditor editor = new GraphicsEditor();

            editor.Core_SetEntry(32, 4,
                                 (Pointer)Current["Palette"], false,
                                 (Pointer)Current["Tileset"], true);

            Program.Core.Core_OpenEditor(editor);
        }
Exemplo n.º 5
0
        private void Move_MagicButton_Click(Object sender, EventArgs e)
        {
            GraphicsEditor editor = new GraphicsEditor();

            editor.Core_SetEntry(4, 60,
                                 CurrentPaletteAddress, false,
                                 (Pointer)CurrentMove["Sprite"], true);

            Program.Core.Core_OpenEditor(editor);
        }
Exemplo n.º 6
0
        private void Screen_MagicButton_Click(Object sender, EventArgs e)
        {
            GraphicsEditor editor = new GraphicsEditor();

            editor.Core_SetEntry(15, 34,
                                 Core.GetPointer("Battle Screen Palettes"), false,
                                 Core.GetPointer("Battle Screen Tileset"), true,
                                 Core.GetPointer("Battle Screen TSA"), false, false);

            Program.Core.Core_OpenEditor(editor);
        }
Exemplo n.º 7
0
        private void MagicButton_Click(Object sender, EventArgs e)
        {
            GraphicsEditor editor = new GraphicsEditor();

            editor.Core_SetEntry(GBA.Screen.W_TILES, GBA.Screen.H_TILES,
                                 Palette_PointerBox.Value, Palette_CheckBox.Checked,
                                 Tileset_PointerBox.Value, Tileset_CheckBox.Checked,
                                 TSA_PointerBox.Value, TSA_CheckBox.Checked, true);

            Program.Core.Core_OpenEditor(editor);
        }
Exemplo n.º 8
0
        private void Idle_MagicButton_Click(Object sender, EventArgs e)
        {
            GraphicsEditor editor = new GraphicsEditor();

            byte size = (byte)CurrentIdle["Size"];

            editor.Core_SetEntry(
                (size < 0x2 ? 2 : 4),
                (size < 0x1 ? 2 : 4) * 3,
                CurrentPaletteAddress, false,
                (Pointer)CurrentIdle["Sprite"], true);

            Program.Core.Core_OpenEditor(editor);
        }
Exemplo n.º 9
0
        private void MagicButton_Click(Object sender, EventArgs e)
        {
            GraphicsEditor editor = new GraphicsEditor();

            Size bgsize = Background.GetBGSize(CurrentType);

            switch (CurrentType)
            {
            case BackgroundType.Dialog:
                editor.Core_SetEntry(bgsize.Width, bgsize.Height,
                                     (Pointer)Current["Palette"], false,
                                     (Pointer)Current["Tileset"], true,
                                     (Pointer)Current["TSA"], false, true);
                break;

            case BackgroundType.Battle:
                editor.Core_SetEntry(bgsize.Width, bgsize.Height,
                                     (Pointer)Current["Palette"], true,
                                     (Pointer)Current["Tileset"], true,
                                     (Pointer)Current["TSA"], true, false);
                break;

            case BackgroundType.Screen:
                if (Core.CurrentROM is FE6)
                {
                    editor.Core_SetEntry(bgsize.Width, bgsize.Height,
                                         (Pointer)Current["Palette"], false,
                                         (Pointer)Current["Tileset"], true);
                }
                else if (Core.CurrentROM is FE7 && Core.ReadByte(Current.GetAddress(Current.EntryIndex)) == 0x00)
                {
                    editor.Core_SetEntry(bgsize.Width, bgsize.Height,
                                         (Pointer)Current["Palette"], false,
                                         (Pointer)Current["Tileset"], true,
                                         (Pointer)Current["TSA"], false, true);
                }
                else     // its stored in 32x2 strips
                {
                    editor.Core_SetEntry(bgsize.Width, bgsize.Height,
                                         (Pointer)Current["Palette"], false,
                                         (Pointer)Current["Tileset"], true,
                                         (Pointer)Current["TSA"], false, true);
                }
                break;

            default: throw new Exception("Invalid background type.");
            }
            Program.Core.Core_OpenEditor(editor);
        }