Пример #1
0
        private void CutsceneForm_Load(object sender, EventArgs e)
        {
            if (!GameFileCache.IsInited)
            {
                return;                         //what to do here?
            }
            var rpfman  = GameFileCache.RpfMan;
            var rpflist = rpfman.AllRpfs; //loadedOnly ? gfc.ActiveMapRpfFiles.Values.ToList() :

            var dditems = new List <CutsceneDropdownItem>();

            foreach (var rpf in rpflist)
            {
                foreach (var entry in rpf.AllEntries)
                {
                    if (entry.NameLower.EndsWith(".cut"))
                    {
                        var dditem = new CutsceneDropdownItem();
                        dditem.RpfEntry = entry;
                        dditems.Add(dditem);
                    }
                }
            }

            CutsceneComboBox.Items.Clear();
            CutsceneComboBox.Items.AddRange(dditems.ToArray());
        }
Пример #2
0
        private void SelectCutscene(CutsceneDropdownItem dditem)
        {
            Cursor = Cursors.WaitCursor;
            Task.Run(() =>
            {
                CutFile cutFile   = null;
                Cutscene cutscene = null;

                if (GameFileCache.IsInited)
                {
                    var entry = dditem?.RpfEntry as RpfFileEntry;
                    if (entry != null)
                    {
                        cutFile = new CutFile(entry);
                        GameFileCache.RpfMan.LoadFile(cutFile, entry);

                        cutscene = new Cutscene();
                        cutscene.Init(cutFile, GameFileCache, WorldForm);
                    }
                }

                CutsceneLoaded(cutscene);
            });
        }