예제 #1
0
        public void RefreshPortraits()
        {
            FighterFile ff = (FighterFile)listBox2.SelectedItem;

            if (ff == null)
            {
                return;
            }

            int  portraitNum = ff.CostumeNum;
            bool confident   = false;

            if (pmap.ContainsMapping(ff.CharNum))
            {
                int[] mappings = pmap.GetPortraitMappings(ff.CharNum);
                int   index    = Array.IndexOf(mappings, ff.CostumeNum);
                if (index >= 0)
                {
                    portraitNum = index;
                    confident   = true;
                }
            }
            if (Swap_Wario && ff.CharNum == pmap.CharBustTexFor("wario"))
            {
                portraitNum = (portraitNum + 6) % 12;
            }
            foreach (PortraitViewer p in portraitViewers)
            {
                p.UpdateImage(ff.CharNum, portraitNum);
            }
            costumeNumberLabel.UpdateImage(ff.CharNum, portraitNum, confident);
        }
예제 #2
0
        private void listBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            FighterFile ff   = (FighterFile)listBox2.SelectedItem;
            string      path = ff.FullName;

            LoadFile(path);
            RefreshPortraits();
        }
예제 #3
0
        private void updateMewtwoHatForCurrentKirbyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string kirby, hat;

            FighterFile ff = (FighterFile)listBox2.SelectedItem;

            if (pmap.CharBustTexFor("kirby") != ff.CharNum)
            {
                MessageBox.Show(this, "Select a Kirby costume before using this feature.");
                return;
            }

            string p  = ff.FullName.ToLower();
            string nn = ff.CostumeNum.ToString("D2");

            if (p.Contains("fitkirbymewtwo"))
            {
                kirby = "kirby/FitKirby" + nn + ".pcs";
                hat   = ff.FullName;
            }
            else
            {
                kirby = ff.FullName;
                hat   = "kirby/FitKirbyMewtwo" + nn + ".pac";
            }
            if (!File.Exists(kirby))
            {
                MessageBox.Show(this, "Could not find file: " + kirby);
                return;
            }
            if (!File.Exists(hat))
            {
                MessageBox.Show(this, "Could not find file: " + hat);
                return;
            }

            if (DialogResult.OK == MessageBox.Show(this, "Copy from " + kirby + " to " + hat + "?", Text, MessageBoxButtons.OKCancel))
            {
                KirbyCopy.Copy(kirby, hat);
            }
        }