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. --- .../Shared/Api/Implementation/LSL_Api.cs | 150 ++++++++++----------- 1 file changed, 75 insertions(+), 75 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9a3fc5c..410921a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1019,7 +1019,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LLObject.TextureEntry tex = part.Shape.Textures; if (face > -1) { - tex.CreateFace((uint) face); + tex.CreateFace((uint) face); tex.FaceTextures[face].Glow = glow; part.UpdateTexture(tex); return; @@ -1032,63 +1032,63 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { tex.FaceTextures[i].Glow = glow; } - tex.DefaultTexture.Glow = glow; + tex.DefaultTexture.Glow = glow; } part.UpdateTexture(tex); return; } } - - public void SetShiny(SceneObjectPart part, int face, int shiny, Bumpiness bump) - { - - Shininess sval = new Shininess(); - - switch (shiny) - { - case 0: - sval = Shininess.None; - break; - case 1: - sval = Shininess.Low; - break; - case 2: - sval = Shininess.Medium; - break; - case 3: - sval = Shininess.High; - break; - default: - sval = Shininess.None; - break; - } - - LLObject.TextureEntry tex = part.Shape.Textures; + + public void SetShiny(SceneObjectPart part, int face, int shiny, Bumpiness bump) + { + + Shininess sval = new Shininess(); + + switch (shiny) + { + case 0: + sval = Shininess.None; + break; + case 1: + sval = Shininess.Low; + break; + case 2: + sval = Shininess.Medium; + break; + case 3: + sval = Shininess.High; + break; + default: + sval = Shininess.None; + break; + } + + LLObject.TextureEntry tex = part.Shape.Textures; if (face > -1) { - tex.CreateFace((uint) face); - tex.FaceTextures[face].Shiny = sval; - tex.FaceTextures[face].Bump = bump; + tex.CreateFace((uint) face); + tex.FaceTextures[face].Shiny = sval; + tex.FaceTextures[face].Bump = bump; part.UpdateTexture(tex); - return; - } - else if (face == -1) - { + return; + } + else if (face == -1) + { for (uint i = 0; i < 32; i++) { if (tex.FaceTextures[i] != null) { tex.FaceTextures[i].Shiny = sval; - tex.FaceTextures[i].Bump = bump;; + tex.FaceTextures[i].Bump = bump;; } - tex.DefaultTexture.Shiny = sval; - tex.DefaultTexture.Bump = bump; + tex.DefaultTexture.Shiny = sval; + tex.DefaultTexture.Bump = bump; } part.UpdateTexture(tex); return; } - } - + } + public double llGetAlpha(int face) { m_host.AddScriptLPS(1); @@ -5484,21 +5484,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; face = Convert.ToInt32(rules.Data[idx++]); float glow = (float)Convert.ToDouble(rules.Data[idx++]); - + SetGlow(part, face, glow); break; - case (int)ScriptBaseClass.PRIM_BUMP_SHINY: - if (remain < 3) - return; - face = Convert.ToInt32(rules.Data[idx++]); - int shiny = Convert.ToInt32(rules.Data[idx++]); - Bumpiness bump = (Bumpiness)Convert.ToByte(rules.Data[idx++]); - - SetShiny(part, face, shiny, bump); - - break; - } + case (int)ScriptBaseClass.PRIM_BUMP_SHINY: + if (remain < 3) + return; + face = Convert.ToInt32(rules.Data[idx++]); + int shiny = Convert.ToInt32(rules.Data[idx++]); + Bumpiness bump = (Bumpiness)Convert.ToByte(rules.Data[idx++]); + + SetShiny(part, face, shiny, bump); + + break; + } } } @@ -5568,12 +5568,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api 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; } @@ -6662,20 +6662,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api 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++) { @@ -6753,12 +6753,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api 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++) { -- cgit v1.1