Esempio n. 1
0
        public static void Initialize()
        {
            mFilesystem = new RARCFilesystem(Program.sGame.mFilesystem.OpenFile("/LocalizeData/UsEnglish/MessageData/SystemMessage.arc"));

            mGalaxyNames   = new MSBT(mFilesystem.OpenFile("/boop/GalaxyName.msbt"));
            mScenarioNames = new MSBT(mFilesystem.OpenFile("/boop/ScenarioName.msbt"));
        }
Esempio n. 2
0
        public Galaxy(Game game, string name)
        {
            mGame       = game;
            mFilesystem = game.mFilesystem;
            mName       = name;

            mZones = new Dictionary <string, Zone>();
            RARCFilesystem scenarioFile = new RARCFilesystem(mFilesystem.OpenFile($"/StageData/{name}/{name}Scenario.arc"));
            BCSV           scenarioBCSV = new BCSV(scenarioFile.OpenFile("/root/ScenarioData.bcsv"));

            mScenarioEntries = scenarioBCSV.mEntries;
            scenarioBCSV.Close();

            BCSV zonesBCSV = new BCSV(scenarioFile.OpenFile("/root/ZoneList.bcsv"));

            foreach (BCSV.Entry e in zonesBCSV.mEntries)
            {
                string n = e.Get <string>("ZoneName");
                mZones.Add(n, new Zone(this, n));
            }

            zonesBCSV.Close();
            scenarioFile.Close();

            if (!NameHolder.HasGalaxyName(name))
            {
                return;
            }

            mGalaxyName = NameHolder.GetGalaxyName(name);
        }
Esempio n. 3
0
        public EditorWindow(string galaxyName)
        {
            InitializeComponent();

            RARCFilesystem fs  = new RARCFilesystem(Program.sGame.mFilesystem.OpenFile("/ObjectData/Kuribo.arc"));
            BMD            bmd = new BMD(fs.OpenFile("/Kuribo/Kuribo.bdl"));
        }
Esempio n. 4
0
        public void LoadMessages()
        {
            if (mFilesystem.DoesFileExist($"/LocalizeData/UsEnglish/MessageData/{mZoneName}.arc"))
            {
                RARCFilesystem msg = new RARCFilesystem(mFilesystem.OpenFile($"/LocalizeData/UsEnglish/MessageData/{mZoneName}.arc"));

                if (msg.DoesFileExist($"/root/{mZoneName}.msbt"))
                {
                    mMessages = new MSBT(msg.OpenFile($"/root/{mZoneName}.msbt"));
                }

                if (msg.DoesFileExist($"/root/{mZoneName}.msbf"))
                {
                    mMessageFlows = new MSBF(msg.OpenFile($"/root/{mZoneName}.msbf"));
                }
            }
        }
Esempio n. 5
0
        public static void Initialize()
        {
            mLights     = new List <LightEntry>();
            mFilesystem = new RARCFilesystem(Program.sGame.mFilesystem.OpenFile("/LightData/LightData.arc"));
            mBCSV       = new BCSV(mFilesystem.OpenFile("/LightData/LightData.bcsv"));

            mBCSV.mEntries.ForEach(e => mLights.Add(new LightEntry(e)));
        }
Esempio n. 6
0
        public PathObj(BCSV.Entry entry, Zone parentZone, RARCFilesystem filesystem)
        {
            mName = entry.Get <string>("name");
            mID   = entry.Get <short>("no");
            mZone = parentZone;

            mPathPointObjs = new List <PathPointObj>();

            BCSV b = new BCSV(filesystem.OpenFile($"/Stage/jmp/Path/CommonPathPointInfo.{mID}"));

            foreach (BCSV.Entry e in b.mEntries)
            {
                mPathPointObjs.Add(new PathPointObj(this, e));
            }
        }
Esempio n. 7
0
        //private BCSV mFile;

        private void filesystemView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (filesystemView.SelectedNode != null)
            {
                // this is simply a file vs folder check, since we don't assign tags to folders
                if (filesystemView.SelectedNode.Tag == null)
                {
                    return;
                }

                string tag = Convert.ToString(filesystemView.SelectedNode.Tag);

                if (mFiles.ContainsKey(tag))
                {
                    return;
                }


                BCSV file = new BCSV(mFilesystem.OpenFile(tag));
                mFiles.Add(tag, file);


                TabPage      tab      = new TabPage(tag);
                DataGridView dataGrid = new DataGridView();
                dataGrid.CellValueChanged += Grid_CellValueChanged;
                dataGrid.Dock              = DockStyle.Fill;
                tab.Controls.Add(dataGrid);
                bcsvEditorsTabControl.TabPages.Add(tab);
                mEditors.Add(tag, dataGrid);

                saveBCSVBtn.Enabled = true;
                saveAll_Btn.Enabled = true;

                dataGrid.Rows.Clear();
                dataGrid.Columns.Clear();

                foreach (BCSV.Field f in file.mFields.Values)
                {
                    int columnIdx = dataGrid.Columns.Add(f.mHash.ToString("X8"), f.mName);

                    // format floating point cells to show the first decimal point
                    if (f.mType == 2)
                    {
                        dataGrid.Columns[columnIdx].DefaultCellStyle.Format = "N1";
                    }
                }

                foreach (BCSV.Entry entry in file.mEntries)
                {
                    object[] row = new object[entry.Count];
                    int      i   = 0;

                    foreach (KeyValuePair <uint, object> _val in entry)
                    {
                        object val = _val.Value;
                        row[i++] = val;
                    }

                    dataGrid.Rows.Add(row);
                }

                // now we can jump to that page
                bcsvEditorsTabControl.SelectedTab = tab;
            }
        }