Exemple #1
0
 /// <summary>Selects the pattern group associated with the selected parrern-group-index-table entry.</summary>
 void LoadSelectedGroupIndex()
 {
     if (PatternGroupIndexTableList.SelectedIndex != -1)
     {
         PatternGroupsList.SelectedItems.Clear();
         int selectionIndex = int.Parse(PatternGroupIndexTableList.SelectedItem.ToString(), System.Globalization.NumberStyles.HexNumber);
         PatternGroupsList.SelectedIndices.Add(selectionIndex);
         PatternGroupsList.EnsureVisible(selectionIndex);
         LoadSelectedGroupsValues();
     }
 }
Exemple #2
0
        void ReloadSelectedPatternGroupListItem()
        {
            if (PatternGroupsList.SelectedIndices.Count > 0)
            {
                PatternGroupsList.BeginUpdate();

                int index            = PatternGroupsList.SelectedIndices[0];
                var item             = PatternGroupsList.SelectedItems[0];
                var patternGroupData = rom.PatternGroupOffsets[index];

                item.SubItems[1].Text = patternGroupData.SourceRomOffset.ToString("X");
                item.SubItems[2].Text = patternGroupData.DestTileIndex.ToString("X");
                item.SubItems[3].Text = patternGroupData.TileCount.ToString("X");
                item.SubItems[4].Text = patternGroupData.IsPage0 ? SpriteString : BgString;
                PatternGroupsList.EndUpdate();
            }
        }
Exemple #3
0
        /// <summary>Loads pattern groups from the rom.</summary>
        private void LoadPatternGroups()
        {
            PatternGroupsList.Items.Clear();

            PatternGroupsList.BeginUpdate();
            for (int i = 0; i < rom.PatternGroupOffsets.Count; i++)
            {
                PatternGroupOffsets o    = rom.PatternGroupOffsets[i];
                ListViewItem        item = new ListViewItem(new string[] {
                    i.ToString("X"),
                    o.SourceRomOffset.ToString("X"),
                    o.DestTileIndex.ToString("X"),
                    o.TileCount.ToString("X"),
                    o.IsPage0 ? SpriteString : BgString
                });

                PatternGroupsList.Items.Add(item);
            }
            PatternGroupsList.EndUpdate();
        }