From 6fa26f5b41ab1a455783342c200fe68aeae515aa Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sat, 16 Aug 2008 17:26:25 +0000 Subject: Update svn properties, minor formatting cleanup. --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 46 +++--- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 182 ++++++++++----------- 2 files changed, 114 insertions(+), 114 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index d7cd027..25c0d9a 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -5704,12 +5704,12 @@ namespace OpenSim.Region.ScriptEngine.Common LSL_Types.list l = new LSL_Types.list(); ScenePresence av = World.GetScenePresence(id); - if( av == null ) + if (av == null) return l; LLUUID[] anims; anims = av.GetAnimationArray(); - foreach( LLUUID foo in anims ) - l.Add( foo.ToString() ); + foreach (LLUUID foo in anims) + l.Add(foo.ToString()); return l; } @@ -6813,20 +6813,20 @@ namespace OpenSim.Region.ScriptEngine.Common public void llParcelMediaCommandList(LSL_Types.list commandList) { //TO DO: Implement the missing commands - //PARCEL_MEDIA_COMMAND_STOP Stop the media stream and go back to the first frame. - //PARCEL_MEDIA_COMMAND_PAUSE Pause the media stream (stop playing but stay on current frame). - //PARCEL_MEDIA_COMMAND_PLAY Start the media stream playing from the current frame and stop when the end is reached. - //PARCEL_MEDIA_COMMAND_LOOP Start the media stream playing from the current frame. When the end is reached, loop to the beginning and continue. - //PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture. - //PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url. - //PARCEL_MEDIA_COMMAND_TIME float time Move a media stream to a specific time. - //PARCEL_MEDIA_COMMAND_AGENT key uuid Applies the media command to the specified agent only. - //PARCEL_MEDIA_COMMAND_UNLOAD Completely unloads the movie and restores the original texture. - //PARCEL_MEDIA_COMMAND_AUTO_ALIGN integer boolean Sets the parcel option 'Auto scale content'. - //PARCEL_MEDIA_COMMAND_TYPE string mime_type Use this to get or set the parcel media MIME type (e.g. "text/html"). (1.19.1 RC0 or later) - //PARCEL_MEDIA_COMMAND_SIZE integer x, integer y Use this to get or set the parcel media pixel resolution. (1.19.1 RC0 or later) - //PARCEL_MEDIA_COMMAND_DESC string desc Use this to get or set the parcel media description. (1.19.1 RC0 or later) - //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) + //PARCEL_MEDIA_COMMAND_STOP Stop the media stream and go back to the first frame. + //PARCEL_MEDIA_COMMAND_PAUSE Pause the media stream (stop playing but stay on current frame). + //PARCEL_MEDIA_COMMAND_PLAY Start the media stream playing from the current frame and stop when the end is reached. + //PARCEL_MEDIA_COMMAND_LOOP Start the media stream playing from the current frame. When the end is reached, loop to the beginning and continue. + //PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture. + //PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url. + //PARCEL_MEDIA_COMMAND_TIME float time Move a media stream to a specific time. + //PARCEL_MEDIA_COMMAND_AGENT key uuid Applies the media command to the specified agent only. + //PARCEL_MEDIA_COMMAND_UNLOAD Completely unloads the movie and restores the original texture. + //PARCEL_MEDIA_COMMAND_AUTO_ALIGN integer boolean Sets the parcel option 'Auto scale content'. + //PARCEL_MEDIA_COMMAND_TYPE string mime_type Use this to get or set the parcel media MIME type (e.g. "text/html"). (1.19.1 RC0 or later) + //PARCEL_MEDIA_COMMAND_SIZE integer x, integer y Use this to get or set the parcel media pixel resolution. (1.19.1 RC0 or later) + //PARCEL_MEDIA_COMMAND_DESC string desc Use this to get or set the parcel media description. (1.19.1 RC0 or later) + //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) m_host.AddScriptLPS(1); for (int i = 0; i < commandList.Data.Length; i++) { @@ -6904,12 +6904,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.AddScriptLPS(1); LSL_Types.list list = new LSL_Types.list(); //TO DO: make the implementation for the missing commands - //PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture. - //PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url. - //PARCEL_MEDIA_COMMAND_TYPE string mime_type Use this to get or set the parcel media MIME type (e.g. "text/html"). (1.19.1 RC0 or later) - //PARCEL_MEDIA_COMMAND_SIZE integer x, integer y Use this to get or set the parcel media pixel resolution. (1.19.1 RC0 or later) - //PARCEL_MEDIA_COMMAND_DESC string desc Use this to get or set the parcel media description. (1.19.1 RC0 or later) - //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) + //PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture. + //PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url. + //PARCEL_MEDIA_COMMAND_TYPE string mime_type Use this to get or set the parcel media MIME type (e.g. "text/html"). (1.19.1 RC0 or later) + //PARCEL_MEDIA_COMMAND_SIZE integer x, integer y Use this to get or set the parcel media pixel resolution. (1.19.1 RC0 or later) + //PARCEL_MEDIA_COMMAND_DESC string desc Use this to get or set the parcel media description. (1.19.1 RC0 or later) + //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) for (int i = 0; i < aList.Data.Length; i++) { diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index 3b2594d..e98dec6 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -634,97 +634,97 @@ namespace OpenSim.Region.ScriptEngine.Common } } - private class AlphanumComparatorFast : IComparer - { - public int Compare(object x, object y) - { - string s1 = x as string; - if (s1 == null) - { - return 0; - } - string s2 = y as string; - if (s2 == null) - { - return 0; - } - - int len1 = s1.Length; - int len2 = s2.Length; - int marker1 = 0; - int marker2 = 0; - - // Walk through two the strings with two markers. - while (marker1 < len1 && marker2 < len2) - { - char ch1 = s1[marker1]; - char ch2 = s2[marker2]; - - // Some buffers we can build up characters in for each chunk. - char[] space1 = new char[len1]; - int loc1 = 0; - char[] space2 = new char[len2]; - int loc2 = 0; - - // Walk through all following characters that are digits or - // characters in BOTH strings starting at the appropriate marker. - // Collect char arrays. - do - { - space1[loc1++] = ch1; - marker1++; - - if (marker1 < len1) - { - ch1 = s1[marker1]; - } - else - { - break; - } - } while (char.IsDigit(ch1) == char.IsDigit(space1[0])); - - do - { - space2[loc2++] = ch2; - marker2++; - - if (marker2 < len2) - { - ch2 = s2[marker2]; - } - else - { - break; - } - } while (char.IsDigit(ch2) == char.IsDigit(space2[0])); - - // If we have collected numbers, compare them numerically. - // Otherwise, if we have strings, compare them alphabetically. - string str1 = new string(space1); - string str2 = new string(space2); - - int result; - - if (char.IsDigit(space1[0]) && char.IsDigit(space2[0])) - { - int thisNumericChunk = int.Parse(str1); - int thatNumericChunk = int.Parse(str2); - result = thisNumericChunk.CompareTo(thatNumericChunk); - } - else - { - result = str1.CompareTo(str2); - } - - if (result != 0) - { - return result; - } - } - return len1 - len2; - } - } + private class AlphanumComparatorFast : IComparer + { + public int Compare(object x, object y) + { + string s1 = x as string; + if (s1 == null) + { + return 0; + } + string s2 = y as string; + if (s2 == null) + { + return 0; + } + + int len1 = s1.Length; + int len2 = s2.Length; + int marker1 = 0; + int marker2 = 0; + + // Walk through two the strings with two markers. + while (marker1 < len1 && marker2 < len2) + { + char ch1 = s1[marker1]; + char ch2 = s2[marker2]; + + // Some buffers we can build up characters in for each chunk. + char[] space1 = new char[len1]; + int loc1 = 0; + char[] space2 = new char[len2]; + int loc2 = 0; + + // Walk through all following characters that are digits or + // characters in BOTH strings starting at the appropriate marker. + // Collect char arrays. + do + { + space1[loc1++] = ch1; + marker1++; + + if (marker1 < len1) + { + ch1 = s1[marker1]; + } + else + { + break; + } + } while (char.IsDigit(ch1) == char.IsDigit(space1[0])); + + do + { + space2[loc2++] = ch2; + marker2++; + + if (marker2 < len2) + { + ch2 = s2[marker2]; + } + else + { + break; + } + } while (char.IsDigit(ch2) == char.IsDigit(space2[0])); + + // If we have collected numbers, compare them numerically. + // Otherwise, if we have strings, compare them alphabetically. + string str1 = new string(space1); + string str2 = new string(space2); + + int result; + + if (char.IsDigit(space1[0]) && char.IsDigit(space2[0])) + { + int thisNumericChunk = int.Parse(str1); + int thatNumericChunk = int.Parse(str2); + result = thisNumericChunk.CompareTo(thatNumericChunk); + } + else + { + result = str1.CompareTo(str2); + } + + if (result != 0) + { + return result; + } + } + return len1 - len2; + } + } public list Sort(int stride, int ascending) { -- cgit v1.1