예제 #1
0
        public override InfoBlock GetInfoBlock()
        {
            TextLine line = reader.ReadLine();

            if (line.Id != "info")
            {
                throw new Exception("Failed to load angel bmp file, unexpected block '" + line.Id + "'");
            }

            InfoBlock block = new InfoBlock();

            block.FontName  = line.GetString("face") ?? "";
            block.FontSize  = line.GetInt("size") ?? 0;
            block.IsBold    = line.GetBool("bold") ?? false;
            block.IsItalic  = line.GetBool("italic") ?? false;
            block.CharSet   = line.GetUInt("charset") ?? 0;
            block.IsUnicode = line.GetBool("unicode") ?? false;
            block.StretchH  = line.GetUInt("stretchH") ?? 0;
            block.IsSmooth  = line.GetBool("smooth") ?? false;
            block.AA        = line.GetUInt("aa") ?? 0;
            Vector4i padding = line.GetVector4i("padding") ?? Vector4i.Zero;

            block.PaddingUp    = (uint)padding.X;
            block.PaddingRight = (uint)padding.Y;
            block.PaddingDown  = (uint)padding.Z;
            block.PaddingLeft  = (uint)padding.W;
            Vector2i spacing = line.GetVector2i("spacing") ?? Vector2i.Zero;

            block.SpacingHoriz = spacing.X;
            block.SpacingVert  = spacing.Y;
            block.Outline      = line.GetInt("outline") ?? 0;

            return(block);
        }
예제 #2
0
        /// <summary>
        /// This pops up a new window with information from the block (selection in context menu).
        /// </summary>
        public static void popOut(object sender, EventArgs e)
        {
            MenuItem  menuItem = sender as MenuItem;
            InfoBlock block    = (InfoBlock)menuItem.Tag;

            block.PopOutInfo();
        }
예제 #3
0
        public void OutputHtmlFileTest()
        {
            List <Node> nodeList = new List <Node>();

            Dictionary <string, string> shellItemProperties = new Dictionary <string, string>();

            shellItemProperties.Add("Size", "0");
            shellItemProperties.Add("Type", "31");
            shellItemProperties.Add("TypeName", "Some Type Name");
            shellItemProperties.Add("Name", "Some Name");
            shellItemProperties.Add("ModifiedDate", "1/1/0001 12:00:00 AM");
            shellItemProperties.Add("AccessedDate", "1/1/0001 12:00:00 AM");
            shellItemProperties.Add("CreationDate", "1/1/0001 12:00:00 AM");
            CsvParsedShellItem ShellItem = new CsvParsedShellItem(shellItemProperties);

            Event     aEvent = new Event("item1", DateTime.Now, ShellItem, "Access");
            InfoBlock block  = new InfoBlock();
            Node      aNode  = new Node(aEvent, block);

            nodeList.Add(aNode);

            if (File.Exists("timeline.html"))
            {
                File.Delete("timeline.html");
            }
            HtmlIO.OutputHtmlFile(nodeList, "timeline.html");
            Assert.IsTrue(File.Exists("timeline.html"));
        }
예제 #4
0
        public override InfoBlock GetInfoBlock()
        {
            byte blockId   = r.ReadByte();
            int  blockSize = r.ReadInt16();

            InfoBlock block = new InfoBlock();

            block.FontSize = r.ReadInt16();
            byte bitField = r.ReadByte();

            block.IsSmooth      = r.GetBit(bitField, 0);
            block.IsUnicode     = r.GetBit(bitField, 1);
            block.IsItalic      = r.GetBit(bitField, 2);
            block.IsBold        = r.GetBit(bitField, 3);
            block.IsFixedHeight = r.GetBit(bitField, 4);
            block.CharSet       = r.ReadByte();
            block.StretchH      = r.ReadUInt16();
            block.AA            = r.ReadByte();
            block.PaddingUp     = r.ReadByte();
            block.PaddingRight  = r.ReadByte();
            block.PaddingDown   = r.ReadByte();
            block.PaddingLeft   = r.ReadByte();
            block.SpacingHoriz  = r.ReadByte();
            block.SpacingVert   = r.ReadByte();
            block.Outline       = r.ReadByte();
            block.FontName      = r.ReadString();

            return(block);
        }
예제 #5
0
        public MockNode(IEvent aEvent, InfoBlock block) : base(aEvent, block)
        {
            AEvent = aEvent;
            Block  = block;

            this.Visibility = System.Windows.Visibility.Visible;
        }
예제 #6
0
        private void FillInfoBlock(InfoBlock block, IList <ISystemInfo> info)
        {
            var sb = new StringBuilder();

            var maxTitleLength = 0;

            foreach (var systemInfo in info)
            {
                if (systemInfo.Title.Length > maxTitleLength)
                {
                    maxTitleLength = systemInfo.Title.Length;
                }
            }

            maxTitleLength += 2;

            var first = true;

            foreach (var i in info)
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    sb.AppendLine();
                }

                sb.Append("<color=");
                sb.Append(NameColor);
                sb.Append(">");

                sb.Append(i.Title);
                sb.Append(": ");

                sb.Append("</color>");

                for (var j = i.Title.Length; j <= maxTitleLength; ++j)
                {
                    sb.Append(' ');
                }


                if (i.Value is bool)
                {
                    sb.Append((bool)i.Value ? Tick : Cross);
                }
                else
                {
                    sb.Append(i.Value);
                }
            }

            block.Content.text = sb.ToString();
        }
예제 #7
0
 private void AccountInfo_Click(object sender, RoutedEventArgs e)
 {
     if (webinInfo)
     {
         InfoBlock.Navigate(new UserInfo(user));
     }
     else
     {
         InfoBlock.Navigate(new WebinarInfo(localWebinar));
     }
     webinInfo = !webinInfo;
 }
예제 #8
0
        void setBlock(aBinaryReader reader)
        {
            int widthBlocks = 0;
            int glyphBlocks = 0;
            int mapBlocks   = 0;

            reader.Goto(0x20u);
            for (uint i = 0; i < mFontHeader.blockCount; ++i)
            {
                var blockStart = reader.Position;
                var typeID     = reader.Read32();
                var size       = reader.Read32();
                switch (typeID)
                {
                case cINF1: {
                    mInfoBlock     = new InfoBlock(reader);
                    mDecoderMethod = sAboutEncoding[(int)mInfoBlock.fontType];
                    break;
                }

                case cWID1: {
                    mWidthBlocks[widthBlocks++] = new WidthBlock(reader);
                    break;
                }

                case cGLY1: {
                    mGlyphBlocks[glyphBlocks++] = new GlyphBlock(reader);
                    break;
                }

                case cMAP1: {
                    mMapBlocks[mapBlocks] = new MapBlock(reader);
                    int firstChar = mMapBlocks[mapBlocks].firstChar;
                    if (mFirstChar > firstChar)
                    {
                        mFirstChar = firstChar;
                    }
                    ++mapBlocks;
                    break;
                }

                default: {
                    Debug.Fail("Unknown data block.");
                    break;
                }
                }
                reader.Goto(blockStart + size);
            }
        }
예제 #9
0
        public void Equals()
        {
            IPAddress address1 = new IPAddress(new byte[] { 1, 2, 3, 4 });

            Assert.AreEqual(AddressFamily.InterNetwork, address1.AddressFamily);

            IPAddress address2 = new IPAddress(new byte[] { 2, 4, 6, 8 });

            Assert.AreEqual(AddressFamily.InterNetwork, address2.AddressFamily);

            IPAddress address3 = new IPAddress(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 });

            Assert.AreEqual(AddressFamily.InterNetworkV6, address3.AddressFamily);

            InfoBlock infoBlock11 = new InfoBlock(address1);

            infoBlock11.m_iRTT = 1;

            InfoBlock infoBlock21 = new InfoBlock(address2);

            infoBlock21.m_iRTT = 2;

            InfoBlock infoBlock31 = new InfoBlock(address3);

            infoBlock31.m_iRTT = 3;

            InfoBlock infoBlock12 = new InfoBlock(address1);

            infoBlock11.m_iRTT = 2;

            InfoBlock infoBlock22 = new InfoBlock(address2);

            infoBlock21.m_iRTT = 4;

            InfoBlock infoBlock32 = new InfoBlock(address3);

            infoBlock31.m_iRTT = 6;

            Assert.AreEqual(infoBlock11, infoBlock12);
            Assert.AreEqual(infoBlock21, infoBlock22);
            Assert.AreEqual(infoBlock31, infoBlock32);

            Assert.AreNotEqual(infoBlock11, infoBlock21);
            Assert.AreNotEqual(infoBlock11, infoBlock31);
            Assert.AreNotEqual(infoBlock21, infoBlock31);
            Assert.AreNotEqual(infoBlock12, infoBlock22);
            Assert.AreNotEqual(infoBlock12, infoBlock32);
            Assert.AreNotEqual(infoBlock22, infoBlock32);
        }
예제 #10
0
        public void EncryptDecryptInfoBlock()
        {
            // Arrange
            InfoBlock InfoBlock01 = new InfoBlock();

            // Act
            InfoBlock01.Token = InfoBlock.SOMETHINGELSE;
            InfoBlock01.Data  = "Testing 123: Add some special characters &é@#'öçà!£$<ù}";

            var encryptedString1 = InfoBlockConvertor.EncodeToString(InfoBlock01);
            var encryptedString2 = InfoBlockConvertor.EncodeToString(InfoBlock01);

            var InfoBlock02 = InfoBlockConvertor.DecodeFromString(encryptedString2);

            // Assert
            Assert.AreNotEqual(encryptedString1, encryptedString2, "Infoblock should never be encrypted the same twice");
            Assert.AreEqual(InfoBlock01.Token, InfoBlock02.Token, "Tokens should match original value");
            Assert.AreEqual(InfoBlock01.Data, InfoBlock02.Data, "Data should match original value");
        }
예제 #11
0
        public RARC(byte[] Data)
        {
            EndianBinaryReader er = new EndianBinaryReader(new MemoryStream(Data), Endianness.BigEndian);

            try
            {
                Header                 = new RARCHeader(er);
                ArchiveInfo            = new InfoBlock(er);
                er.BaseStream.Position = ArchiveInfo.FolderTableOffset + Header.HeaderSize;
                FolderTable            = new FolderTableEntry[ArchiveInfo.NrFolderTableEntries];
                for (int i = 0; i < ArchiveInfo.NrFolderTableEntries; i++)
                {
                    FolderTable[i] = new FolderTableEntry(er);
                }

                er.BaseStream.Position = ArchiveInfo.FileTableOffset + Header.HeaderSize;
                FileTable = new FileTableEntry[ArchiveInfo.NrFileTableEntries];
                for (int i = 0; i < ArchiveInfo.NrFileTableEntries; i++)
                {
                    FileTable[i] = new FileTableEntry(er);
                }

                for (int i = 0; i < ArchiveInfo.NrFolderTableEntries; i++)
                {
                    er.BaseStream.Position = ArchiveInfo.StringTableOffset + Header.HeaderSize + FolderTable[i].NameOffset;
                    FolderTable[i].Name    = er.ReadStringNT(Encoding.ASCII);
                }

                for (int i = 0; i < ArchiveInfo.NrFileTableEntries; i++)
                {
                    er.BaseStream.Position = ArchiveInfo.StringTableOffset + Header.HeaderSize + FileTable[i].NameOffset;
                    FileTable[i].Name      = er.ReadStringNT(Encoding.ASCII);
                }

                er.BaseStream.Position = Header.HeaderSize + Header.FileDataOffset;
                this.Data = er.ReadBytes((int)Header.FileDataLength1);
            }
            finally
            {
                er.Close();
            }
        }
예제 #12
0
        public Week()
        {
            InitializeComponent();

            WebinarApiInstance = new WebinApi();
            UserApiInstance    = new UserApi();
            try
            {
                token    = Application.Current.Resources["token"].ToString();
                user     = UserApiInstance.GetUserInfo(token);
                webinars = WebinarApiInstance.GetWeekWebinars(token, StartOfWeek(localDateTime));
            } catch (Exception e) { }

            AccountName.Text = user.LastName + " " + user.FirstName;

            localWebinar = FindCurrentWebinar(webinars);
            InfoBlock.Navigate(new WebinarInfo(localWebinar));

            CalendarView.Navigate(new WeekCalendar(webinars, localDateTime));
            Date.Text    = StartOfWeek(localDateTime).ToString("dd") + " - " + EndOfWeek(localDateTime).ToString("dd") + " " + localDateTime.ToString("MMMM", CultureInfo.GetCultureInfo("ru-ru"));
            weekNum.Text = WeekNum(localDateTime) + " неделя";
        }
예제 #13
0
        /// <summary>
        /// Load a file.
        /// </summary>
        /// <param name="b">The file.</param>
        public void Load(byte[] b)
        {
            //Set up the reader.
            MemoryStream     src = new MemoryStream(b);
            BinaryDataReader br  = new BinaryDataReader(src);

            //Read file header.
            fileHeader = new FileHeader(ref br);

            //Read info block.
            info = null;
            if (fileHeader.blockOffsets[0].offset != Reference.NULL_PTR && fileHeader.blockOffsets[0].typeId == ReferenceTypes.WAV_Block_Info)
            {
                br.Position = fileHeader.blockOffsets[0].offset;
                info        = new InfoBlock
                {
                    magic               = br.ReadChars(4),
                    blockSize           = br.ReadUInt32(),
                    encoding            = br.ReadByte(),
                    isLoop              = br.ReadBoolean(),
                    padding             = br.ReadUInt16(),
                    sampleRate          = br.ReadUInt32(),
                    loopStart           = br.ReadUInt32(),
                    loopEnd             = br.ReadUInt32(),
                    originalLoopStart   = br.ReadUInt32(),
                    channelInfoRefTable = new ReferenceTable(ref br),
                    channelInfo         = new List <InfoBlock.ChannelInfo>()
                };

                //Read channel info.
                foreach (Reference r in info.channelInfoRefTable.references)
                {
                    //Set position.
                    br.Position = 0x5C + r.offset;

                    //New channel info.
                    InfoBlock.ChannelInfo c = new InfoBlock.ChannelInfo()
                    {
                        samplesRef      = new Reference(ref br),
                        dspAdpcmInfoRef = new Reference(ref br),
                        reserved        = br.ReadUInt32(),
                        dspAdpcmInfo    = null
                    };

                    //Read Dsp-Apdcm info.
                    if (c.dspAdpcmInfoRef.offset != Reference.NULL_PTR)
                    {
                        br.Position = 0x5C + r.offset + c.dspAdpcmInfoRef.offset;

                        c.dspAdpcmInfo                 = new DspAdpcmInfo();
                        c.dspAdpcmInfo.coefs           = new Int16[8][];
                        c.dspAdpcmInfo.coefs[0]        = br.ReadInt16s(2);
                        c.dspAdpcmInfo.coefs[1]        = br.ReadInt16s(2);
                        c.dspAdpcmInfo.coefs[2]        = br.ReadInt16s(2);
                        c.dspAdpcmInfo.coefs[3]        = br.ReadInt16s(2);
                        c.dspAdpcmInfo.coefs[4]        = br.ReadInt16s(2);
                        c.dspAdpcmInfo.coefs[5]        = br.ReadInt16s(2);
                        c.dspAdpcmInfo.coefs[6]        = br.ReadInt16s(2);
                        c.dspAdpcmInfo.coefs[7]        = br.ReadInt16s(2);
                        c.dspAdpcmInfo.pred_scale      = br.ReadUInt16();
                        c.dspAdpcmInfo.yn1             = br.ReadInt16();
                        c.dspAdpcmInfo.yn2             = br.ReadInt16();
                        c.dspAdpcmInfo.loop_pred_scale = br.ReadUInt16();
                        c.dspAdpcmInfo.loop_yn1        = br.ReadInt16();
                        c.dspAdpcmInfo.loop_yn2        = br.ReadInt16();
                    }

                    info.channelInfo.Add(c);
                }
            }

            //Read data block.
            if (fileHeader.blockOffsets[1].offset != Reference.NULL_PTR && fileHeader.blockOffsets[1].typeId == ReferenceTypes.WAV_Block_Data)
            {
                br.Position = fileHeader.blockOffsets[1].offset;
                data        = new SoundNStreamDataBlock(ref br, info);
            }
        }
예제 #14
0
 public void OpenWebinarInfo(Webinar webinar)
 {
     webinInfo    = true;
     localWebinar = webinar;
     InfoBlock.Navigate(new WebinarInfo(webinar));
 }
예제 #15
0
        public void OnGUI()
        {
            ScreenRect.size = position.size;

            Graphics.DrawTexture(ScreenRect, Textures.DuskLighter);
            GUI.skin = Theme.GameBridgeSkin;
            CheckSelection();


            if (story == null)
            {
                EditID = 0;
            }

            var windowArea = ScreenRect;
            var headerArea = windowArea.ToUpperLeft(0, 50);

            if (EditID != 0)
            {
                Graphics.DrawTexture(headerArea, Textures.DuskLight);
                Graphics.DrawTexture(headerArea.ToLowerLeft(0, 2), Textures.Blue);
            }

            if (!M5_64_F1H)
            {
                GUI.Label(ScreenRect.ToCenter(500, 20), "Please download the latest version of storyteller");
                return;
            }

            switch (EditID)
            {
            case 0:

                //GUI.color = new Color(1, 1, 1,Mathf.Lerp(0,1,));
                GUI.DrawTexture(ScreenRect.ToCenter(100, 100), ImageLibrary.GameBridgeIcon);

                break;

            case 1:
                #region Scene Data Setup interface

                if (SelectedSceneData.SceneID != -1)
                {
                    GUI.Label(headerArea, "Push Data To Game Scene", Theme.GameBridgeSkin.customStyles[0]);
                }

                if (SelectedSceneData.SceneID == -1)
                {
                    #region we will prompt to uses to slect a scene , onve the scen is selected, we pass the scenes sceneid value to the dialogue scene id value.

                    GUI.Label(headerArea.ToCenter(0, 30), story.name, Theme.GameBridgeSkin.customStyles[0]);

                    var newarea = windowArea.AddRect(0, 50, 0, -10);
                    Grid.BeginDynaicGuiGrid(newarea.AddRect(0, 20), scenesAreas, 20, 50, 65, 75, story.Scenes.Count);

                    scrollView = GUI.BeginScrollView(new Rect(0, 0, newarea.width, newarea.height), scrollView,
                                                     newarea.AddRect(0, 0, 0, Grid.AreaHeight));

                    var activeClipArea = new Rect(0, scrollView.y, windowArea.width, windowArea.height);

                    #region we display all the scenes that can be uses and when the uses selects one, we pass hat scenes sceneId to the selectedDialiguers sceneId
                    foreach (var area in scenesAreas.Select((v, i) => new { value = v, index = i }))
                    {
                        if (activeClipArea.Contains(area.value.TopLeft()) || activeClipArea.Contains(area.value.BottomRight()))
                        {
                            GUI.DrawTexture(area.value, ImageLibrary.sceneIcon);



                            var textArea = area.value.PlaceUnder(0, 20);

                            GUI.Label(textArea, story.Scenes[area.index].SceneName);

                            if (ClickEvent.Click(3, area.value))
                            {
                                SelectedSceneData.SceneID = area.index;
                            }
                        }
                    }
                    #endregion

                    GUI.EndScrollView();

                    Grid.EndDynaicGuiGrid();
                    #endregion
                }

                else
                {
                    var activeDataPushArea = headerArea.PlaceUnder(0, ScreenRect.height - headerArea.height);


                    #region Push Data Settings

                    #region Overview Export Settings
                    var generalSettingsHeaderArea = activeDataPushArea.ToUpperLeft(0, 20);
                    GUI.DrawTexture(generalSettingsHeaderArea, Textures.DuskLight);
                    GUI.Label(generalSettingsHeaderArea, "General Settings");

                    var pushSoundEfectToggleArea = generalSettingsHeaderArea.PlaceUnder(0, 0, 0, 10);
                    pushSettings.PushSoundEffects = GUI.Toggle(pushSoundEfectToggleArea, pushSettings.PushSoundEffects, "Sound Effects");

                    var pushVoiceOverToggleArea = pushSoundEfectToggleArea.PlaceUnder(0, 0, 0, 10);
                    pushSettings.PushVoiceOver = GUI.Toggle(pushVoiceOverToggleArea, pushSettings.PushVoiceOver, "Voice Over");

                    var pushStoryboardImageToggleArea = pushVoiceOverToggleArea.PlaceUnder(0, 0, 0, 10);
                    pushSettings.PushStoryboardImage = GUI.Toggle(pushStoryboardImageToggleArea, pushSettings.PushStoryboardImage, "Storyboard Images");


                    #endregion

                    #region Push Data Update Setings

                    var dataUpdateSettingsAreaHeader = pushStoryboardImageToggleArea.PlaceUnder(0, 20);
                    GUI.DrawTexture(dataUpdateSettingsAreaHeader, Textures.DuskLight);
                    GUI.Label(dataUpdateSettingsAreaHeader, "Pushed Data Update Settings");

                    var dataUpdateSettingsArea = dataUpdateSettingsAreaHeader.PlaceUnder(0, 200);
                    GUI.DrawTexture(dataUpdateSettingsArea.PlaceUnder(0, 1), Textures.Blue);

                    Grid.BeginDynaicGuiGrid(dataUpdateSettingsArea, pushSettings.Areas, 5, 10, 100, 20, pushSettings.pushOptions.Count);

                    for (var i = 0; i < pushSettings.pushOptions.Count; i++)
                    {
                        var updateSettingArea = pushSettings.Areas[i];
                        pushSettings.pushOptions[i] = GUI.Toggle(updateSettingArea, pushSettings.pushOptions[i], pushSettings.optionNames[i]);
                    }

                    Grid.EndDynaicGuiGrid();

                    #endregion

                    #endregion


                    #region here we allow the uses to push their selected scenes data over into the DiaogueData asset. how this works is further broken down in this region


                    var pushDataButtonArea = activeDataPushArea.ToCenterBottom(50, 20);

                    #region begin pushing storyteller data over into dialogue Data Asset
                    if (GUI.Button(pushDataButtonArea, "Push"))
                    {
                        if (SelectedSceneData == null)
                        {
                            Debug.Log("please assign a Scene Data Object before pushing data");
                            return;
                        }

                        #region find each character in the scene and aggregate the nodes in its chain. Rechaining
                        foreach (var ch in story.Scenes[SelectedSceneData.SceneID].Characters)
                        {
                            // this is not a critical step. it simply ensures that he data being pushed is not flawed. this is the same as refreshing the timeline
                            ch.AggregateNodesInChain();
                        }
                        #endregion

                        #region we create a new list which we will all nodes except Abstract and Media nodes in
                        var sortedList = new List <StoryElement>();
                        #endregion

                        #region iterating through all the nodes in the current storyteller scene
                        foreach (var el in story.Scenes[SelectedSceneData.SceneID].NodeElements)
                        {
                            #region we only want Character nodes, Link nodes, Route nodes, Dialogue nodes and Action Nodes Added to the list
                            if (el.GetType() != typeof(MediaNode) || el.GetType() != typeof(AbstractNode))
                            {
                                #region prevent nodes that are not connected to a character from being added to the list
                                if (el.CallingNode != null)
                                {
                                    sortedList.Add(el);
                                }
                                #endregion
                            }
                            #endregion
                        }
                        #endregion

                        // increate the size of the list of node dataset to be the same as the sorted list
                        SelectedSceneData.FullCharacterDialogueSet.Resize(sortedList.Count);



                        SelectedSceneData.Characters = new List <CharacterNodeData>();

                        // loop through the sorted list
                        for (var i = 0; i < sortedList.Count; i++)
                        {
                            #region here we lookat each sorted list StoryElement and we pass their relevant data over into NodeData scriptable object data which had similar properties and names

                            if (sortedList[i].GetType() == typeof(CharacterNode))
                            {
                                var character = (CharacterNode)sortedList[i];
                                SelectedSceneData.FullCharacterDialogueSet[i] = ScriptableObject.CreateInstance(typeof(CharacterNodeData)) as NodeData;
                                AssetDatabase.AddObjectToAsset(SelectedSceneData.FullCharacterDialogueSet[i], SelectedSceneData);
                                var imagePath = Application.dataPath;
                                // File.WriteAllBytes(imagePath+"/" + character.CharacterBios[character.BioID].CharacterName+ ".png", character.CharacterBios[character.BioID].CharacterImage.EncodeToPNG());
                                // var image = AssetDatabase.LoadAssetAtPath("Assets/" + character.CharacterBios[character.BioID].CharacterName+".png", typeof(Texture2D));
                                /// AssetDatabase.AddObjectToAsset(image, SelectedDialogueData);
                                // AssetDatabase.Refresh();
                                SelectedSceneData.FullCharacterDialogueSet[i].hideFlags = HideFlags.HideInHierarchy;
                                var data = (CharacterNodeData)SelectedSceneData.FullCharacterDialogueSet[i];
                                data.UID = character.UID;
                                data.OverrideStartTime = character.OverrideStartTime;
                                data.name          = data.Name = character.CharacterBios[character.BioID].CharacterName;
                                data.CharacterName = character.CharacterBios[character.BioID].CharacterName;
                                SelectedSceneData.Characters.Add(data);
                            }

                            if (sortedList[i].GetType() == typeof(EnvironmentNode))
                            {
                                var environment = (EnvironmentNode)sortedList[i];
                                SelectedSceneData.FullCharacterDialogueSet[i] = ScriptableObject.CreateInstance(typeof(EnvironmentNodeData)) as NodeData;
                                AssetDatabase.AddObjectToAsset(SelectedSceneData.FullCharacterDialogueSet[i], SelectedSceneData);
                                SelectedSceneData.FullCharacterDialogueSet[i].hideFlags = HideFlags.HideInHierarchy;
                                var data = (EnvironmentNodeData)SelectedSceneData.FullCharacterDialogueSet[i];
                                data.UID = environment.UID;
                                data.OverrideStartTime = environment.OverrideStartTime;
                                data.name          = data.Name = environment.Name;
                                data.CharacterName = environment.CallingNode.Name;
                            }

                            if (sortedList[i].GetType() == typeof(RouteNode))
                            {
                                var route = (RouteNode)sortedList[i];
                                SelectedSceneData.FullCharacterDialogueSet[i] = ScriptableObject.CreateInstance(typeof(RouteNodeData)) as NodeData;
                                AssetDatabase.AddObjectToAsset(SelectedSceneData.FullCharacterDialogueSet[i], SelectedSceneData);
                                SelectedSceneData.FullCharacterDialogueSet[i].hideFlags = HideFlags.HideInHierarchy;
                                var data = (RouteNodeData)SelectedSceneData.FullCharacterDialogueSet[i];
                                data.UID = route.UID;
                                data.OverrideStartTime = route.OverrideStartTime;
                                data.DurationSum       = route.NodeDurationSum;
                                data.AutoSwitchValue   = route.AutoSwitchValue;
                                data.Pass          = route.Pass;
                                data.RouteID       = route.RouteId;
                                data.name          = data.Name = route.Name;
                                data.CharacterName = route.CallingNode.CharacterBios[route.CallingNode.BioID].CharacterName;
                                if (route.Environment)
                                {
                                    data.EnvironmentName = route.Environment.Name;
                                }
                            }

                            if (sortedList[i].GetType() == typeof(LinkNode))
                            {
                                var link = (LinkNode)sortedList[i];
                                SelectedSceneData.FullCharacterDialogueSet[i] = ScriptableObject.CreateInstance(typeof(LinkNodeData)) as NodeData;
                                AssetDatabase.AddObjectToAsset(SelectedSceneData.FullCharacterDialogueSet[i], SelectedSceneData);
                                SelectedSceneData.FullCharacterDialogueSet[i].hideFlags = HideFlags.HideInHierarchy;
                                var data = (LinkNodeData)SelectedSceneData.FullCharacterDialogueSet[i];
                                data.UID = link.UID;
                                data.OverrideStartTime = link.OverrideStartTime;
                                data.LoopValue         = link.LoopValue;
                                data.name          = data.Name = link.Name;
                                data.Pass          = link.Pass;
                                data.Loop          = link.Loop;
                                data.CharacterName = link.CallingNode.CharacterBios[link.CallingNode.BioID].CharacterName;
                                if (link.Environment)
                                {
                                    data.EnvironmentName = link.Environment.Name;
                                }
                            }

                            if (sortedList[i].GetType() == typeof(EndNode))
                            {
                                var end = (EndNode)sortedList[i];
                                SelectedSceneData.FullCharacterDialogueSet[i] = ScriptableObject.CreateInstance(typeof(EndNodeData)) as NodeData;
                                AssetDatabase.AddObjectToAsset(SelectedSceneData.FullCharacterDialogueSet[i], SelectedSceneData);
                                SelectedSceneData.FullCharacterDialogueSet[i].hideFlags = HideFlags.HideInHierarchy;
                                var data = (EndNodeData)SelectedSceneData.FullCharacterDialogueSet[i];
                                data.UID = end.UID;
                                data.OverrideStartTime = end.OverrideStartTime;
                                data.Pass          = end.Pass;
                                data.name          = data.Name = end.Name;
                                data.CharacterName = end.CallingNode.CharacterBios[end.CallingNode.BioID].CharacterName;
                                if (end.Environment)
                                {
                                    data.EnvironmentName = end.Environment.Name;
                                }
                            }

                            if (sortedList[i].GetType() == typeof(ActionNode))
                            {
                                var action = (ActionNode)sortedList[i];
                                SelectedSceneData.FullCharacterDialogueSet[i] = ScriptableObject.CreateInstance(typeof(ActionNodeData)) as NodeData;
                                AssetDatabase.AddObjectToAsset(SelectedSceneData.FullCharacterDialogueSet[i], SelectedSceneData);
                                SelectedSceneData.FullCharacterDialogueSet[i].hideFlags = HideFlags.HideInHierarchy;
                                var data = (ActionNodeData)SelectedSceneData.FullCharacterDialogueSet[i];
                                data.UID = action.UID;
                                data.OverrideStartTime = action.OverrideStartTime;
                                data.Delay             = action.DelayTimeInSeconds;
                                data.Duration          = action.TimeInSeconds;
                                data.StartTime         = action.StartingTime;
                                data.DurationSum       = action.NodeDurationSum;

                                if (action.StoryboardImage)
                                {
                                    data.StoryboardImage = Sprite.Create(action.StoryboardImage, new Rect(0, 0, action.StoryboardImage.width, action.StoryboardImage.height), new Vector2(action.StoryboardImage.width / 2, action.StoryboardImage.height / 2));
                                }

                                if (pushSettings.PushSoundEffects)
                                {
                                    data.SoundEffect = action.SoundEffect;
                                }

                                data.Pass          = action.Pass;
                                data.name          = data.Name = action.Name;
                                data.Text          = action.Text;
                                data.Tag           = action.Tag;
                                data.CharacterName = action.CallingNode.CharacterBios[action.CallingNode.BioID].CharacterName;

                                if (action.Environment)
                                {
                                    data.EnvironmentName = action.Environment.Name;
                                }
                                //  data.EnvironmentLocation = action.Environment.EnvironmentInfo.Location;
                            }

                            if (sortedList[i].GetType() == typeof(DialogueNode))
                            {
                                var dialogue = (DialogueNode)sortedList[i];
                                SelectedSceneData.FullCharacterDialogueSet[i] = ScriptableObject.CreateInstance(typeof(DialogueNodeData)) as NodeData;
                                AssetDatabase.AddObjectToAsset(SelectedSceneData.FullCharacterDialogueSet[i], SelectedSceneData);
                                SelectedSceneData.FullCharacterDialogueSet[i].hideFlags = HideFlags.HideInHierarchy;
                                var data = (DialogueNodeData)SelectedSceneData.FullCharacterDialogueSet[i];
                                data.UID = dialogue.UID;
                                data.OverrideStartTime = dialogue.OverrideStartTime;
                                data.Delay             = dialogue.DelayTimeInSeconds;
                                data.Duration          = dialogue.TimeInSeconds;
                                data.StartTime         = dialogue.StartingTime;
                                data.DurationSum       = dialogue.NodeDurationSum;

                                if (dialogue.StoryboardImage)
                                {
                                    data.StoryboardImage = Sprite.Create(dialogue.StoryboardImage, new Rect(0, 0, dialogue.StoryboardImage.width, dialogue.StoryboardImage.height), new Vector2(dialogue.StoryboardImage.width / 2, dialogue.StoryboardImage.height / 2));
                                }

                                if (pushSettings.PushSoundEffects)
                                {
                                    data.SoundEffect = dialogue.SoundEffect;
                                }

                                if (pushSettings.UpdateVoiceover)
                                {
                                    data.VoicedDialogue = dialogue.VoiceRecording;
                                }

                                //  if (pushSettings.PushStoryboardImage)
                                //  data.StoryboardImage = dialogue.StoryboardImage;

                                data.Pass = dialogue.Pass;
                                data.name = data.Name = dialogue.Name;
                                data.Text = dialogue.Text;
                                data.Tag  = dialogue.Tag;

                                data.CharacterName = dialogue.CallingNode.CharacterBios[dialogue.CallingNode.BioID].CharacterName;
                                if (dialogue.Environment)
                                {
                                    data.EnvironmentName = dialogue.Environment.Name;
                                }
                            }

                            #endregion
                        }

                        #region we do the loop yet again , this time to pass in specific data to nodes that have properties that take in node data values like character nodes Nodes in its hain, link nodes linked nodes and route nodes routed nodes
                        // the process is quite efficient a node data in the sortedDataList and fullChracterDialogueSet have data with UID values that match.
                        for (var i = 0; i < sortedList.Count; i++)
                        {
                            if (sortedList[i].GetType() == typeof(CharacterNode))
                            {
                                var character = (CharacterNode)sortedList[i];
                                var data      = (CharacterNodeData)SelectedSceneData.FullCharacterDialogueSet[i];
                                // selectedDialoguer.Characters.Add(data);

                                for (var n = 0; n < sortedList.Count; n++)
                                {
                                    var node = sortedList[n];
                                    if (node.CallingNode == character)     //&& node != character
                                    {
                                        // we add to the NodeDataInMyChain  node data list, the node data in the NodeDataInMyChain that have matching UIDs to the
                                        // nodes in the  sorted list  that have character as their calling node .
                                        // this could be done in another way.
                                        data.NodeDataInMyChain.Add(SelectedSceneData.FullCharacterDialogueSet.Find(c => c.UID == node.UID));
                                    }
                                }
                                //   data.NodeDataInMyChain = data.NodeDataInMyChain.OrderBy(m => m.StartTime).ToList();
                                data.NodeDataInMyChain.All(a => a.CallingNodeData = data);
                            }

                            if (sortedList[i].GetType() == typeof(RouteNode))
                            {
                                var route = (RouteNode)sortedList[i];
                                var data  = (RouteNodeData)SelectedSceneData.FullCharacterDialogueSet[i];

                                if (route.LinkedRout != null)
                                {
                                    var idOfLinkRoute = route.LinkedRout.UID;
                                    data.LinkedRoute = SelectedSceneData.FullCharacterDialogueSet.Find(id => id.UID == idOfLinkRoute) as RouteNodeData;

                                    data.LinkedRoute.RoutesLinkedToMe.Add(data);
                                }
                            }

                            if (sortedList[i].GetType() != typeof(LinkNode))
                            {
                                continue;
                            }
                            {
                                var link = (LinkNode)sortedList[i];
                                var data = (LinkNodeData)SelectedSceneData.FullCharacterDialogueSet[i];


                                if (link.LoopRoute == null)
                                {
                                    continue;
                                }
                                var idOfLinkedLink = link.LoopRoute.UID;
                                data.loopRoute = SelectedSceneData.FullCharacterDialogueSet.Find(id => id.UID == idOfLinkedLink) as RouteNodeData;
                            }
                        }
                        #endregion

                        #region now we use our matching UID's again to find out which nodes were connected in the SortedData list and we connect the nodes with matching UIDs in the FullCharacterDataList with the same UID's
                        for (var i = 0; i < SelectedSceneData.FullCharacterDialogueSet.Count; i++)
                        {
                            var data = SelectedSceneData.FullCharacterDialogueSet[i];
                            var matchingStoryElement = CurrentStory.ActiveStory.Scenes[SelectedSceneData.SceneID].NodeElements.Find(id => id.UID == data.UID);
                            data.DataIconnectedTo.Resize(matchingStoryElement.NodesIMadeConnectionsTo.Count);
                            data.DataConnectedToMe.Resize(matchingStoryElement.NodesThatMadeAConnectionToMe.Count);

                            // assign all the node data that the fullcharacterdataset element at i connected to
                            for (int d = 0; d < data.DataIconnectedTo.Count; d++)
                            {
                                //   var iConnectedTo = matchingStoryElement.NodesIMadeConnectionsTo[d];
                                //   if (iConnectedTo.GetType() == typeof(DialogueNode)|| iConnectedTo.GetType() == typeof(ActionNode) || iConnectedTo.GetType() == typeof(RouteNode)|| iConnectedTo.GetType() == typeof(LinkNode))

                                data.DataIconnectedTo[d] = SelectedSceneData.FullCharacterDialogueSet.Find(v => v.UID == matchingStoryElement.NodesIMadeConnectionsTo[d].UID);
                            }
                            // assign all the node data that are connected to the fullcharacterdataset element at i
                            for (var d = 0; d < data.DataConnectedToMe.Count; d++)
                            {
                                data.DataConnectedToMe[d] = SelectedSceneData.FullCharacterDialogueSet.Find(v => v.UID == matchingStoryElement.NodesThatMadeAConnectionToMe[d].UID);
                            }
                        }
                        #endregion

                        // lastly we order the list of NodeData by their startStime value, this is  necessary for when we populate the  ActiveCharacterDialogueSet
                        SelectedSceneData.FullCharacterDialogueSet = SelectedSceneData.FullCharacterDialogueSet.OrderBy(r => r.StartTime).ToList();
                    }
                    #endregion
                    #endregion
                }

                #endregion
                break;

            case 2:

                #region Component addition

                GUI.Label(headerArea.ToCenter(0, 30), story.name, Theme.GameBridgeSkin.customStyles[0]);

                Grid.BeginDynaicGuiGrid(headerArea.PlaceUnder(0, Screen.height - headerArea.height, 0, 30), 1, 2, _componentAreas, 0, 130, 0, 70);

                for (var a = 0; a < _componentAreas.Count; a++)
                {
                    var area = _componentAreas[a];

                    GUI.DrawTexture(area, Textures.DuskLight);
                    if (InfoBlock.Click(1, area, _componentData[a].Icons, SnapPosition.TopMiddle, Color.clear, InfoBlock.HoverEvent.None, Theme.GameBridgeSkin.customStyles[0], Theme.GameBridgeSkin.customStyles[1], _componentData[a].Name, _componentData[a].Description, 0, 0, 180, 60))
                    {
                        AttachComponen(a);
                    }
                }

                Grid.EndDynaicGuiGrid();


                #endregion

                break;

            default:
                break;
            }
        }
예제 #16
0
        /// <summary>
        /// Load a file.
        /// </summary>
        /// <param name="b">The file.</param>
        public void Load(byte[] b)
        {
            //Set up the reader.
            MemoryStream     src = new MemoryStream(b);
            BinaryDataReader br  = new BinaryDataReader(src);

            //Read the header.
            fileHeader = new FileHeader(ref br);

            //Read blocks.
            foreach (SizedReference s in fileHeader.blockOffsets)
            {
                if (s.offset != Reference.NULL_PTR)
                {
                    br.Position = s.offset;
                    switch (s.typeId)
                    {
                    //Info block.
                    case ReferenceTypes.STRM_Block_Info:
                        long basePos = br.Position + 8;
                        info = new InfoBlock()
                        {
                            magic               = br.ReadChars(4),
                            blockSize           = br.ReadUInt32(),
                            streamSoundInfoRef  = new Reference(ref br),
                            trackInfoTableRef   = new Reference(ref br),
                            channelInfoTableRef = new Reference(ref br),
                            streamSoundInfo     = null,
                            trackInfoRefTable   = null,
                            channelInfoRefTable = null,
                            tracks              = null,
                            channels            = null
                        };

                        //Stream sound info.
                        if (info.streamSoundInfoRef.typeId == ReferenceTypes.STRM_Info_StreamSound && info.streamSoundInfoRef.offset != Reference.NULL_PTR)
                        {
                            br.Position          = basePos + info.streamSoundInfoRef.offset;
                            info.streamSoundInfo = new StreamSoundInfo()
                            {
                                encoding                = br.ReadByte(),
                                isLoop                  = br.ReadBoolean(),
                                channelCount            = br.ReadByte(),
                                regionCount             = br.ReadByte(),
                                sampleRate              = br.ReadUInt32(),
                                loopStart               = br.ReadUInt32(),
                                sampleCount             = br.ReadUInt32(),
                                blockCount              = br.ReadUInt32(),
                                oneBlockBytesize        = br.ReadUInt32(),
                                oneBlockSamples         = br.ReadUInt32(),
                                lastBlockBytesize       = br.ReadUInt32(),
                                lastBlockSamples        = br.ReadUInt32(),
                                lastBlockPaddedBytesize = br.ReadUInt32(),
                                sizeOfSeekInfo          = br.ReadUInt32(),
                                seekInfoIntervalSamples = br.ReadUInt32(),
                                sampleDataOffset        = new Reference(ref br),
                                regionInfoBytesize      = 0x100,
                                padding                 = 0,
                                regionDataOffset        = new Reference(0, 0x18),
                                originalLoopStart       = 0,
                                originalLoopEnd         = 0,
                                secretInfo              = 0
                            };

                            if (fileHeader.vMajor >= regionInfo)
                            {
                                info.streamSoundInfo.regionInfoBytesize = br.ReadUInt16();
                                info.streamSoundInfo.padding            = br.ReadUInt16();
                                info.streamSoundInfo.regionDataOffset   = new Reference(ref br);
                            }

                            if (fileHeader.vMajor >= originalLoopInfo)
                            {
                                info.streamSoundInfo.originalLoopStart = br.ReadUInt32();
                                info.streamSoundInfo.originalLoopEnd   = br.ReadUInt32();
                            }

                            if (fileHeader.vMajor >= secretInfo)
                            {
                                info.streamSoundInfo.secretInfo = br.ReadUInt32();
                            }
                        }

                        //Track info.
                        if (info.trackInfoTableRef.typeId == ReferenceTypes.Tables + 1 && info.trackInfoTableRef.offset != Reference.NULL_PTR)
                        {
                            br.Position = basePos + info.trackInfoTableRef.offset;
                            long newPos = br.Position;
                            info.trackInfoRefTable = new ReferenceTable(ref br);

                            //Get tracks.
                            info.tracks = new List <TrackInfo>();
                            foreach (Reference r in info.trackInfoRefTable.references)
                            {
                                TrackInfo t = null;
                                if (r.typeId == ReferenceTypes.STRM_Info_Track && r.offset != Reference.NULL_PTR)
                                {
                                    br.Position = newPos + r.offset;
                                    t           = new TrackInfo()
                                    {
                                        volume       = br.ReadByte(),
                                        pan          = br.ReadByte(),
                                        span         = br.ReadByte(),
                                        surroundMode = br.ReadByte(),
                                        globalChannelIndexTableRef = new Reference(ref br),
                                        globalChannelIndexTable    = null
                                    };

                                    if (t.globalChannelIndexTableRef.offset != Reference.NULL_PTR)
                                    {
                                        br.Position = newPos + r.offset + t.globalChannelIndexTableRef.offset;
                                        t.globalChannelIndexTable         = new Table <byte>();
                                        t.globalChannelIndexTable.count   = br.ReadUInt32();
                                        t.globalChannelIndexTable.entries = new List <byte>();
                                        for (int i = 0; i < t.globalChannelIndexTable.count; i++)
                                        {
                                            t.globalChannelIndexTable.entries.Add(br.ReadByte());
                                        }
                                    }
                                }
                                info.tracks.Add(t);
                            }
                        }

                        //Channel info.
                        if (info.channelInfoTableRef.typeId == ReferenceTypes.Tables + 1 && info.channelInfoTableRef.offset != Reference.NULL_PTR)
                        {
                            br.Position = basePos + info.channelInfoTableRef.offset;
                            long newPos = br.Position;
                            info.channelInfoRefTable = new ReferenceTable(ref br);

                            //Get channels.
                            info.channels = new List <ChannelInfo>();
                            foreach (Reference r in info.channelInfoRefTable.references)
                            {
                                ChannelInfo c = null;
                                if (r.offset != Reference.NULL_PTR)
                                {
                                    br.Position = newPos + r.offset;
                                    c           = new ChannelInfo()
                                    {
                                        dspAdpcmInfoRef = new Reference(ref br),
                                        dspAdpcmInfo    = null
                                    };

                                    if (c.dspAdpcmInfoRef.offset != Reference.NULL_PTR)
                                    {
                                        br.Position    = newPos + r.offset + c.dspAdpcmInfoRef.offset;
                                        c.dspAdpcmInfo = new DspAdpcmInfo();
                                        c.dspAdpcmInfo = new DspAdpcmInfo()
                                        {
                                            coefs = new short[8][]
                                        };
                                        c.dspAdpcmInfo.coefs[0]        = br.ReadInt16s(2);
                                        c.dspAdpcmInfo.coefs[1]        = br.ReadInt16s(2);
                                        c.dspAdpcmInfo.coefs[2]        = br.ReadInt16s(2);
                                        c.dspAdpcmInfo.coefs[3]        = br.ReadInt16s(2);
                                        c.dspAdpcmInfo.coefs[4]        = br.ReadInt16s(2);
                                        c.dspAdpcmInfo.coefs[5]        = br.ReadInt16s(2);
                                        c.dspAdpcmInfo.coefs[6]        = br.ReadInt16s(2);
                                        c.dspAdpcmInfo.coefs[7]        = br.ReadInt16s(2);
                                        c.dspAdpcmInfo.pred_scale      = br.ReadUInt16();
                                        c.dspAdpcmInfo.yn1             = br.ReadInt16();
                                        c.dspAdpcmInfo.yn2             = br.ReadInt16();
                                        c.dspAdpcmInfo.loop_pred_scale = br.ReadUInt16();
                                        c.dspAdpcmInfo.loop_yn1        = br.ReadInt16();
                                        c.dspAdpcmInfo.loop_yn2        = br.ReadInt16();
                                    }
                                }
                                info.channels.Add(c);
                            }
                        }

                        break;

                    //Seek block.
                    case ReferenceTypes.STRM_Block_Seek:
                        seek = new SoundNStreamSeekBlock(ref br, info.streamSoundInfo, fileHeader);
                        break;

                    //Region block.
                    case ReferenceTypes.STRM_Block_Region:
                        region = new SoundNStreamRegionBlock(ref br, info.streamSoundInfo);
                        break;

                    //Data block.
                    case ReferenceTypes.STRM_Block_Data:
                        data = new SoundNStreamDataBlock(ref br, info);
                        break;
                    }
                }
            }
        }
예제 #17
0
        public void Cache()
        {
            IPAddress address1 = new IPAddress(new byte[] { 1, 2, 3, 4 });

            Assert.AreEqual(AddressFamily.InterNetwork, address1.AddressFamily);

            IPAddress address2 = new IPAddress(new byte[] { 2, 4, 6, 8 });

            Assert.AreEqual(AddressFamily.InterNetwork, address2.AddressFamily);

            IPAddress address3 = new IPAddress(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 });

            Assert.AreEqual(AddressFamily.InterNetworkV6, address3.AddressFamily);

            InfoBlock infoBlock1 = new InfoBlock(address1);

            infoBlock1.m_iRTT = 1;

            InfoBlock infoBlock2 = new InfoBlock(address2);

            infoBlock2.m_iRTT = 2;

            InfoBlock infoBlock3 = new InfoBlock(address3);

            infoBlock3.m_iRTT = 3;

            HashSet <InfoBlock> cache = new HashSet <InfoBlock>();
            bool bAdded = cache.Add(infoBlock1);

            Assert.IsTrue(bAdded);

            bAdded = cache.Add(infoBlock2);
            Assert.IsTrue(bAdded);

            bAdded = cache.Add(infoBlock3);
            Assert.IsTrue(bAdded);

            Assert.AreEqual(3, cache.Count);

            InfoBlock findBlock1 = new InfoBlock(address1);

            bool bFound = cache.TryGetValue(findBlock1, out findBlock1);

            Assert.IsTrue(bFound);

            Assert.AreEqual(1, findBlock1.m_iRTT);

            InfoBlock findBlock2 = new InfoBlock(address2);

            bFound = cache.TryGetValue(findBlock2, out findBlock2);
            Assert.IsTrue(bFound);

            Assert.AreEqual(2, findBlock2.m_iRTT);

            InfoBlock findBlock3 = new InfoBlock(address3);

            bFound = cache.TryGetValue(findBlock3, out findBlock3);
            Assert.IsTrue(bFound);

            Assert.AreEqual(3, findBlock3.m_iRTT);

            infoBlock1.m_iBandwidth = 1000;
            bAdded = cache.Add(infoBlock1);
            Assert.IsFalse(bAdded);

            bFound = cache.TryGetValue(findBlock1, out findBlock1);
            Assert.IsTrue(bFound);

            Assert.AreEqual(1000, findBlock1.m_iBandwidth);
            Assert.AreEqual(1, findBlock1.m_iRTT);
        }