Ejemplo n.º 1
0
        private ObservableCollection <GameEntity> LoadCharacterNames(CMS_File cmsFile, ERS_File ersFile)
        {
            ObservableCollection <GameEntity> entities = new ObservableCollection <GameEntity>();

            MSG_File characterMsgFile = MSG_File.Load(fileIO.GetFileFromGame(CHARACTER_MSG_PATH));

            foreach (var ersEntry in ersFile.GetSubentryList(2))
            {
                CMS_Entry cmsEntry = cmsFile.GetEntry(ersEntry.Index);
                string    name     = null;
                string    eepkPath = string.Format("vfx/{0}", ersEntry.FILE_PATH);

                if (cmsEntry != null)
                {
                    name = characterMsgFile.GetCharacterName(cmsEntry.Str_04);


                    if (string.IsNullOrWhiteSpace(name))
                    {
                        name = String.Format("??? ({0} / {1})", cmsEntry.Index, cmsEntry.Str_04);
                    }
                }


                entities.Add(new GameEntity()
                {
                    Name     = name,
                    EepkPath = eepkPath
                });
            }

            return(entities);
        }
Ejemplo n.º 2
0
        private ObservableCollection <GameEntity> LoadDemoNames(ERS_File ersFile)
        {
            ObservableCollection <GameEntity> entities = new ObservableCollection <GameEntity>();

            foreach (var entry in ersFile.GetSubentryList(4))
            {
                entities.Add(new GameEntity()
                {
                    Name     = Path.GetFileNameWithoutExtension(entry.FILE_PATH),
                    EepkPath = String.Format("vfx/{0}", entry.FILE_PATH)
                });
            }

            return(entities);
        }