Esempio n. 1
0
 private void nIndex_ValueChanged(object sender, EventArgs e)
 {
     if (nIndex.Value == -1)
     {
         return;
     }
     nMap.Value = transitionLoader.transitions[(int)nIndex.Value].map;
     cboDirection.SelectedIndex = transitionLoader.transitions[(int)nIndex.Value].direction;
     nFrom.Minimum = nTo.Minimum = -1;
     nFrom.Value   = PaletteLoader.GetPaletteIndex(gb, game, transitionLoader.transitions[(int)nIndex.Value].from);
     nTo.Value     = PaletteLoader.GetPaletteIndex(gb, game, transitionLoader.transitions[(int)nIndex.Value].to);
     nFrom.Minimum = nTo.Minimum = 0;
 }
Esempio n. 2
0
        public frmPalette(PaletteLoader p, Form1 f, int tileset, int pal, Program.GameTypes game)
        {
            g       = game;
            pLoader = p;
            form1   = f; //To call the LoadTileset method

            InitializeComponent();
            nTileset.Enabled = nPalette.Enabled = false;

            nTileset.Value = tileset;
            nPalette.Value = pal;
            pLoader        = new PaletteLoader(f.gb);

            palette = pLoader.LoadPalette((int)nPalette.Value, g);
            drawPalette();
            pTileset.Image = f.loadTileset(tileset);
        }
Esempio n. 3
0
 public frmTransitions(TransitionLoader tl, GBHL.GBFile g, Program.GameTypes ga)
 {
     InitializeComponent();
     gb               = g;
     game             = ga;
     transitionLoader = tl;
     nIndex.Maximum   = tl.transitions.Count - 1;
     if (tl.transitions.Count == 0)
     {
         groupBox1.Enabled = false;
     }
     else
     {
         nMap.Value = transitionLoader.transitions[(int)nIndex.Value].map;
         cboDirection.SelectedIndex = transitionLoader.transitions[(int)nIndex.Value].direction;
         nFrom.Value = PaletteLoader.GetPaletteIndex(gb, game, transitionLoader.transitions[(int)nIndex.Value].from);
         nTo.Value   = PaletteLoader.GetPaletteIndex(gb, game, transitionLoader.transitions[(int)nIndex.Value].to);
     }
 }
Esempio n. 4
0
 private void nUknown2_ValueChanged(object sender, EventArgs e)
 {
     TransitionLoader.Transition t = transitionLoader.transitions[(int)nIndex.Value];
     t.to = PaletteLoader.GetPaletteAddress(gb, game, (int)nTo.Value);
     transitionLoader.transitions[(int)nIndex.Value] = t;
 }