Exemple #1
0
        private void LoadDZSForStage(ZeldaArc stage)
        {
            int srcOffset = 0;

            _data = new DZSFormat(stage.DZSs[0].FileEntry.GetFileData(), ref srcOffset);

            //Now that the DZSFormat is populated with information, we're going to load the UI up!

            //EnvR
            foreach (DZSChunkHeader chunk in _data.ChunkHeaders)
            {
                switch (chunk.Tag)
                {
                case "EnvR":
                    //Populate the Dropdown
                    for (int i = 0; i < chunk.ElementCount; i++)
                    {
                        EnvRDropdown.Items.Add("EnvR [" + i + "]");
                    }
                    EnvRDropdown.SelectedIndex = 0;
                    break;

                case "Colo":
                    //Populate the Dropdown
                    for (int i = 0; i < chunk.ElementCount; i++)
                    {
                        ColorDropdown.Items.Add("Colo [" + i + "]");
                    }
                    ColorDropdown.SelectedIndex = 0;
                    break;

                case "Pale":
                    //Populate the Dropdown
                    for (int i = 0; i < chunk.ElementCount; i++)
                    {
                        PaleDropdown.Items.Add("Pale [" + i + "]");
                    }
                    PaleDropdown.SelectedIndex = 0;
                    break;

                case "Virt":
                    //Populate the Dropdown
                    for (int i = 0; i < chunk.ElementCount; i++)
                    {
                        VirtDropdown.Items.Add("Virt [" + i + "]");
                    }
                    VirtDropdown.SelectedIndex = 0;
                    break;

                default:
                    break;
                }
            }
        }
Exemple #2
0
        private void LoadDZSForStage(ZeldaArc stage)
        {
            int srcOffset = 0;
            _data = new DZSFormat(stage.DZRs[0].FileEntry.GetFileData(), ref srcOffset);

            List<IChunkType> plyrChunks = _data.GetChunksOfType(DZSChunkTypes.PLYR);
            if (plyrChunks == null)
                return;

            for (int i = 0; i < plyrChunks.Count; i++)
            {
                PlyrChunk plyrChunk = (PlyrChunk)plyrChunks[i];
                spawnDropdown.Items.Add("[" + i + "] - " + plyrChunk.Name);
            }

            spawnDropdown.SelectedIndex = 0;
            _plyrChunk = (PlyrChunk)plyrChunks[spawnDropdown.SelectedIndex];
            UpdateUIControlsFromFile();
        }
Exemple #3
0
        /// <summary>
        /// This is temporary until we replace out the main form's version of the DZS loading stuff.
        /// Sorry!
        /// </summary>
        /// <param name="stage"></param>
        private void LoadDZSForStage(ZeldaArc stage)
        {
            int srcOffset = 0;
            _data = new DZSFormat(stage.DZRs[0].FileEntry.GetFileData(), ref srcOffset);

            List<IChunkType> sclsChunks = _data.GetChunksOfType(DZSChunkTypes.SCLS);
            if (sclsChunks == null)
                return;

            for (int i = 0; i < sclsChunks.Count; i++)
            {
                SclsChunk exitChunk = (SclsChunk) sclsChunks[i];
                sclsDropdown.Items.Add("[" + i + "] - " + exitChunk.DestinationName);
            }

            sclsDropdown.SelectedIndex = 0;
            _sclsChunk = (SclsChunk) sclsChunks[sclsDropdown.SelectedIndex];
            UpdateSclsControlsFromFile();
        }
Exemple #4
0
        /// <summary>
        /// This is temporary until we replace out the main form's version of the DZS loading stuff.
        /// Sorry!
        /// </summary>
        /// <param name="stage"></param>
        private void LoadDZSForStage(ZeldaArc stage)
        {
            int srcOffset = 0;

            _data = new DZSFormat(stage.DZRs[0].FileEntry.GetFileData(), ref srcOffset);

            List <IChunkType> sclsChunks = _data.GetChunksOfType(DZSChunkTypes.SCLS);

            if (sclsChunks == null)
            {
                return;
            }

            for (int i = 0; i < sclsChunks.Count; i++)
            {
                SclsChunk exitChunk = (SclsChunk)sclsChunks[i];
                sclsDropdown.Items.Add("[" + i + "] - " + exitChunk.DestinationName);
            }

            sclsDropdown.SelectedIndex = 0;
            _sclsChunk = (SclsChunk)sclsChunks[sclsDropdown.SelectedIndex];
            UpdateSclsControlsFromFile();
        }
Exemple #5
0
        private void LoadDZSForStage(ZeldaArc stage)
        {
            int srcOffset = 0;

            _data = new DZSFormat(stage.DZRs[0].FileEntry.GetFileData(), ref srcOffset);

            List <IChunkType> plyrChunks = _data.GetChunksOfType(DZSChunkTypes.PLYR);

            if (plyrChunks == null)
            {
                return;
            }

            for (int i = 0; i < plyrChunks.Count; i++)
            {
                PlyrChunk plyrChunk = (PlyrChunk)plyrChunks[i];
                spawnDropdown.Items.Add("[" + i + "] - " + plyrChunk.Name);
            }

            spawnDropdown.SelectedIndex = 0;
            _plyrChunk = (PlyrChunk)plyrChunks[spawnDropdown.SelectedIndex];
            UpdateUIControlsFromFile();
        }
        private void LoadDZSForStage(ZeldaArc stage)
        {
            int srcOffset = 0;
            _data = new DZSFormat(stage.DZSs[0].FileEntry.GetFileData(), ref srcOffset);

            //Now that the DZSFormat is populated with information, we're going to load the UI up!

            //EnvR
            foreach (DZSChunkHeader chunk in _data.ChunkHeaders)
            {
                switch (chunk.Tag)
                {
                    case "EnvR":
                        //Populate the Dropdown
                        for (int i = 0; i < chunk.ElementCount; i++)
                            EnvRDropdown.Items.Add("EnvR [" + i + "]");
                        EnvRDropdown.SelectedIndex = 0;
                        break;
                    case "Colo":
                        //Populate the Dropdown
                        for (int i = 0; i < chunk.ElementCount; i++)
                            ColorDropdown.Items.Add("Colo [" + i + "]");
                        ColorDropdown.SelectedIndex = 0;
                        break;
                    case "Pale":
                        //Populate the Dropdown
                        for (int i = 0; i < chunk.ElementCount; i++)
                            PaleDropdown.Items.Add("Pale [" + i + "]");
                        PaleDropdown.SelectedIndex = 0;
                        break;
                    case "Virt":
                        //Populate the Dropdown
                        for (int i = 0; i < chunk.ElementCount; i++)
                            VirtDropdown.Items.Add("Virt [" + i + "]");
                        VirtDropdown.SelectedIndex = 0;
                        break;
                    default:
                        break;
                }
            }
        }