コード例 #1
0
ファイル: ProjectSong.cs プロジェクト: Nanook/TheGHOST
        internal ProjectSong(Project project, SongQb songQb)
        {
            _lastChanged = DateTime.MinValue;
            _qbLastChanged = DateTime.MinValue;
            _recordChange = false;

            _project = project;
            _songQb = songQb;
            _artist = this.SongQb.Artist;
            _title = this.SongQb.Title;

            if (_project.Defaults.SongVolumeMode == DefaultSettingMode.Game)
                _year = this.SongQb.Year;
            else
                _year = _project.Defaults.Year;

            if (_project.Defaults.SongVolumeMode == DefaultSettingMode.Game)
                _songVolume = this.SongQb.SongVolume;
            else
                _songVolume = _project.Defaults.SongVolume;

            if (_project.Defaults.GuitarVolumeMode == DefaultSettingMode.Game)
                _guitarVolume = this.SongQb.GuitarVolume;
            else
                _guitarVolume = _project.Defaults.GuitarVolume;

            if (_project.Defaults.SingerMode == DefaultSettingMode.Game)
                _singer = this.SongQb.Singer;
            else
                _singer = _project.Defaults.Singer;

            _originalArtist = true; // this.Song.OriginalArtist;

            _minMsBeforeNotesStart = _project.Defaults.MinMsBeforeNotesStart;
            _startPaddingMs = 0;

            _audio = new ProjectSongAudio(_project, this);
            _notes = new ProjectSongNotes(_project, this);

            _audio.PreviewFadeLength = _project.Defaults.PreviewFadeLength;
            _audio.PreviewLength = _project.Defaults.PreviewLength;
            _audio.PreviewStart = _project.Defaults.PreviewStart;
            _audio.PreviewVolume = _project.Defaults.PreviewVolume;
            _audio.PreviewIncludeGuitar = _project.Defaults.PreviewIncludeGuitar;
            _audio.PreviewIncludeRhythm = _project.Defaults.PreviewIncludeRhythm;

            _notes.HoPoMeasure = _project.Defaults.HoPoMeasure;
            _notes.Gh3SustainClipping = _project.Defaults.Gh3SustainClipping;
            _notes.ForceNoStarPower = _project.Defaults.ForceNoStarPower;
        }
コード例 #2
0
ファイル: TrackSelectScreen.cs プロジェクト: Nanook/TheGHOST
        private void setSavedSong(ListViewItem li, SongQb song, bool blankIfNotFound)
        {
            ProjectSong ps = null;
            if (_backupSettings.ContainsKey(song.Id.Crc))
            {
                ps = _backupSettings[song.Id.Crc];
                ((TrackMap)li.Tag).TierSong.Song = ps;

                //li = new ListViewItem(string.Format("{0}   -   {1}{2}{3}{4}", ps.Artist, ps.Title, ps.Year.Length == 0 ? string.Empty : "   (", ps.Year, ps.Year.Length == 0 ? string.Empty : ")"));
                li.UseItemStyleForSubItems = false;
                li.SubItems[1].Text = string.Format("{0} - {1}{2}{3}{4}", ps.Artist, ps.Title, ps.Year.Length == 0 ? string.Empty : " (", ps.Year, ps.Year.Length == 0 ? string.Empty : ")");
                if (ps.AllFilesExist)
                    li.SubItems[1].ForeColor = Color.Black;
                else
                {
                    li.SubItems[1].ForeColor = Color.Red;
                    li.SubItems[1].Text = string.Concat(li.SubItems[1].Text, "  *");
                }
                li.SubItems[1].Font = li.Font;
                li.ImageIndex = (ps.LastChanged > ps.LastApplied || _project.Defaults.ReapplyAll) ? 2 : 1;
                li.Checked = false;
            }
            else if (blankIfNotFound)
            {
                li.UseItemStyleForSubItems = false;
                li.SubItems[1].Text = string.Empty;
                //li.SubItems[1].ForeColor = Color.Blue;
                li.SubItems[1].Font = new Font(li.Font, FontStyle.Bold);
                li.ImageIndex = 0;
                li.Checked = false;
            }
        }
コード例 #3
0
ファイル: TrackMap.cs プロジェクト: Nanook/TheGHOST
 public TrackMap(SongQb songQb, ProjectTierSong tierSong)
 {
     this.SongQb = songQb;
     this.TierSong = tierSong;
     this.MappedDir = null;
 }
コード例 #4
0
ファイル: Project.cs プロジェクト: Nanook/TheGHOST
        private void buildCompleteList()
        {
            try
            {
                QbKey qkKqCredits = QbKey.Create("kingsandqueenscredits");

                Dictionary<uint, SongQb> songListComplete = new Dictionary<uint, SongQb>();

                _songs = new Dictionary<uint, ProjectTierSong>();
                _tiers = new List<ProjectTier>();

                QbFile slQb = this.FileManager.SongListQbFile;
                QbItemBase permSongsQi = slQb.FindItem(QbKey.Create("permanent_songlist_props"), false);

                if (permSongsQi != null)
                {
                    permSongsQi.FindItem(false, delegate(QbItemBase item)
                    {
                        if (item.QbItemType == QbItemType.StructItemStruct)
                        {
                            SongQb s = new SongQb(this, (QbItemStruct)item);
                            if ((s.IsSetList || s.Id.Crc == qkKqCredits.Crc) && !songListComplete.ContainsKey(s.Id.Crc))
                                songListComplete.Add(s.Id.Crc, s);
                        }
                        return false; //if we return false then the search continues
                    });
                }

                int tierNo = 1;
                //career
                foreach (TierQb t in BuildTierList(this.FileManager.GuitarProgressionQbFile, QbKey.Create("GH3_Career_Songs")))
                    _tiers.Add(new ProjectTier(t, TierType.Career, tierNo++));
                //bonus
                foreach (TierQb t in BuildTierList(this.FileManager.StoreDataQbFile, QbKey.Create("GH3_Bonus_Songs")))
                    _tiers.Add(new ProjectTier(t, TierType.Bonus, tierNo++));

                int si;
                foreach (ProjectTier pt in _tiers)
                {
                    si = 1;
                    pt.Save(songListComplete);
                    foreach (ProjectTierSong pts in pt.Songs)
                    {
                        _songs.Add(pts.SongQb.Id.Crc, pts);
                        if (pt.Type == TierType.Bonus)
                            pts.IsBonusSong = true;
                        pts.Number = si++;
                    }
                }

                int gs = this.AddedGhostSongCount;
                //build a list of keys
                List<QbKey> theGhostSongs = new List<QbKey>(gs);
                for (int i = 1; i <= gs; i++)
                {
                    QbKey qk = QbKey.Create(string.Format("theghost{0}", i.ToString().PadLeft(3, '0')));

                    if (_songs.ContainsKey(qk.Crc))
                        _songs[qk.Crc].IsAddedWithTheGhost = true;
                }

                List<TierQb> quickList = BuildTierList(this.FileManager.GuitarProgressionQbFile, QbKey.Create("GH3_General_Songs")); //quickplay

                //find the non career songs or bonus
                ProjectTier ncTier = new ProjectTier(null);
                foreach (TierQb tier in quickList)
                {
                    foreach (QbKey song in tier.Songs)
                    {
                        if (!_songs.ContainsKey(song.Crc))
                        {
                            if (songListComplete.ContainsKey(song.Crc))
                            {
                                ProjectTierSong pts = new ProjectTierSong(songListComplete[song.Crc]);
                                _songs.Add(song.Crc, pts);
                                pts.Tier = ncTier;
                                ncTier.InsertSong(pts, ncTier.Songs.Count);
                            }
                            else
                            {
                            }
                        }
                    }
                }

                if (this.GameInfo.Game == Game.GHA_Wii)
                {
                    QbKey song = qkKqCredits;
                    if (!_songs.ContainsKey(song.Crc) && songListComplete.ContainsKey(song.Crc))
                    {
                        ProjectTierSong pts = new ProjectTierSong(songListComplete[song.Crc]);
                        _songs.Add(song.Crc, pts);
                        pts.Tier = ncTier;
                        ncTier.InsertSong(pts, ncTier.Songs.Count);
                    }
                }

                if (ncTier.Songs.Count != 0)
                {
                    ncTier.Type = TierType.NonCareer;
                    _tiers.Add(ncTier);
                }

                //foreach (ProjectTierSong pts in _songs.Values)
                //    System.Diagnostics.Debug.WriteLine(pts.SongQb.Id.Text);

            }
            catch
            {
                throw;
            }
        }
コード例 #5
0
ファイル: Project.cs プロジェクト: Nanook/TheGHOST
 public ProjectSong CreateProjectSong(SongQb songQb, bool recordChange)
 {
     ProjectSong ps = new ProjectSong(this, songQb);
     if (recordChange)
         ((ISettingsChange)ps).RecordChange();
     return ps;
 }
コード例 #6
0
ファイル: ProjectTierSong.cs プロジェクト: Nanook/TheGHOST
 internal ProjectTierSong(SongQb songQb)
 {
     _songQb = songQb;
     _number = 0;
 }