예제 #1
0
 /// <summary>Gets the ActionMap binding for the specified command.</summary>
 /// <description>
 /// Use getField() on the return value to get the device and action of the binding.
 /// </description>
 /// <param name="command">The function to search bindings for.</param>
 /// <returns>The binding against the specified command. Returns an empty string("") if a binding wasn't found.</returns>
 /// <code>
 /// // Find what the function "jump()" is bound to in moveMap
 /// %bind = moveMap.getBinding( "jump" );
 /// 
 /// if ( %bind !$= "" )
 /// {
 /// // Find out what device is used in the binding
 ///   %device = getField( %bind, 0 );
 /// 
 /// // Find out what action (such as a key) is used in the binding
 ///   %action = getField( %bind, 1 );
 /// }
 /// </code>
 /// <see cref="getField" />
 public string GetBinding(string command) {
      InternalUnsafeMethods.GetBinding__Args _args = new InternalUnsafeMethods.GetBinding__Args() {
         command = command,
      };
      IntPtr _engineResult = InternalUnsafeMethods.GetBinding()(ObjectPtr, _args);
      return StringMarshal.IntPtrToUtf8String(_engineResult);
 }
예제 #2
0
 /// <summary>Get information on the requested file within the zip archive.</summary>
 /// <description>
 /// This methods provides five different pieces of information for the requested file:
 /// <ul><li>filename - The path and name of the file within the zip archive</li><li>uncompressed size</li><li>compressed size</li><li>compression method</li><li>CRC32</li></ul>
 /// Use getFileEntryCount() to obtain the total number of files within the archive.
 /// </description>
 /// <param name="index">The index of the file within the zip archive.  Use getFileEntryCount() to determine the number of files.</param>
 /// <returns>A tab delimited list of information on the requested file, or an empty string if the file could not be found.</returns>
 /// <see cref="getFileEntryCount()" />
 public string GetFileEntry(int index) {
      InternalUnsafeMethods.GetFileEntry__Args _args = new InternalUnsafeMethods.GetFileEntry__Args() {
         index = index,
      };
      IntPtr _engineResult = InternalUnsafeMethods.GetFileEntry()(ObjectPtr, _args);
      return StringMarshal.IntPtrToUtf8String(_engineResult);
 }
예제 #3
0
 /// <description>
 /// (int id)
 /// </description>
 public string GetTextById(int id) {
      InternalUnsafeMethods.GetTextById__Args _args = new InternalUnsafeMethods.GetTextById__Args() {
         id = id,
      };
      IntPtr _engineResult = InternalUnsafeMethods.GetTextById()(ObjectPtr, _args);
      return StringMarshal.IntPtrToUtf8String(_engineResult);
 }
예제 #4
0
 /// <summary>Gets ActionMap command for the device and action.</summary>
 /// <description>
 /// 
 /// </description>
 /// <param name="device">The device that was bound. Can be a keyboard, mouse, joystick or a gamepad.</param>
 /// <param name="action">The device action that was bound.  The action is dependant upon the device. Specify a key for keyboards.</param>
 /// <returns>The command against the specified device and action.</returns>
 /// <code>
 /// // Find what function is bound to a device's action
 /// // In this example, "jump()" was assigned to the space key in another script
 /// %command = moveMap.getCommand("keyboard", "space");
 /// 
 /// // Should print "jump" in the console
 /// echo(%command)
 /// </code>
 public string GetCommand(string device, string action) {
      InternalUnsafeMethods.GetCommand__Args _args = new InternalUnsafeMethods.GetCommand__Args() {
         device = device,
         action = action,
      };
      IntPtr _engineResult = InternalUnsafeMethods.GetCommand()(ObjectPtr, _args);
      return StringMarshal.IntPtrToUtf8String(_engineResult);
 }
예제 #5
0
        /// <description>
        /// Returns the driver version string.
        /// </description>
        public static string GetVersion()
        {
            InternalUnsafeMethods.GetVersion__Args _args = new InternalUnsafeMethods.GetVersion__Args()
            {
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetVersion()(_args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #6
0
        /// <description>
        /// Dumps this PostEffect shader's disassembly to a temporary text file.
        /// </description>
        /// <returns>Full path to the dumped file or an empty string if failed.</returns>
        public string DumpShaderDisassembly()
        {
            InternalUnsafeMethods.DumpShaderDisassembly__Args _args = new InternalUnsafeMethods.DumpShaderDisassembly__Args()
            {
            };
            IntPtr _engineResult = InternalUnsafeMethods.DumpShaderDisassembly()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #7
0
        /// <description>
        /// Get the name of the parameter.
        /// </description>
        /// <returns>The paramete name.</returns>
        public string GetParameterName()
        {
            InternalUnsafeMethods.GetParameterName__Args _args = new InternalUnsafeMethods.GetParameterName__Args()
            {
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetParameterName()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #8
0
        /// <description>
        /// Get the text description of a spell.
        /// </description>
        public string GetSpellDescription()
        {
            InternalUnsafeMethods.GetSpellDescription__Args _args = new InternalUnsafeMethods.GetSpellDescription__Args()
            {
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetSpellDescription()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #9
0
        /// <summary>Read a string up to a maximum of 256 characters</summary>
        /// <returns>The string that was read from the stream.</returns>
        /// <see cref="writeString()" />
        /// <remarks> When working with these particular string reading and writing methods, the stream begins with the length of the string followed by the string itself, and does not include a NULL terminator.</remarks>
        public string ReadString()
        {
            InternalUnsafeMethods.ReadString__Args _args = new InternalUnsafeMethods.ReadString__Args()
            {
            };
            IntPtr _engineResult = InternalUnsafeMethods.ReadString()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #10
0
        /// <summary>Get the normal of the surface on which the object is stuck.</summary>
        /// <description>
        ///
        /// </description>
        /// <returns>Returns The XYZ normal from where this Item is stuck.</returns>
        /// <code>
        /// // Acquire the position where this Item is currently stuck
        /// %stuckPosition = %item.getLastStickPos();
        /// </code>
        /// <remarks> Server side only.
        /// </remarks>
        public string GetLastStickyNormal()
        {
            InternalUnsafeMethods.GetLastStickyNormal__Args _args = new InternalUnsafeMethods.GetLastStickyNormal__Args()
            {
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetLastStickyNormal()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #11
0
        /// <description>
        /// () - Return the type of the field edited by this inspector field.
        /// </description>
        public string GetInspectedFieldType()
        {
            InternalUnsafeMethods.GetInspectedFieldType__Args _args = new InternalUnsafeMethods.GetInspectedFieldType__Args()
            {
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetInspectedFieldType()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
        ///
        public string GetSelectedMissionArea()
        {
            InternalUnsafeMethods.GetSelectedMissionArea__Args _args = new InternalUnsafeMethods.GetSelectedMissionArea__Args()
            {
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetSelectedMissionArea()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #13
0
파일: Taml.cs 프로젝트: lukaspj/T3DSharp
        /// <description>
        /// () Gets the extension (end of filename) used to detect the XML format.
        /// </description>
        /// <returns>The extension (end of filename) used to detect the XML format.</returns>
        public string GetAutoFormatXmlExtension()
        {
            InternalUnsafeMethods.GetAutoFormatXmlExtension__Args _args = new InternalUnsafeMethods.GetAutoFormatXmlExtension__Args()
            {
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetAutoFormatXmlExtension()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #14
0
        /// <description>
        /// Gets the module dependency at the specified index.
        /// </description>
        /// <param name="dependencyIndex">The module dependency index.</param>
        /// <returns>(module - dependency) The module dependency at the specified index.</returns>
        public string GetDependency(uint dependencyIndex = 0)
        {
            InternalUnsafeMethods.GetDependency__Args _args = new InternalUnsafeMethods.GetDependency__Args()
            {
                dependencyIndex = dependencyIndex,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetDependency()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #15
0
        /// <description>
        /// (index)
        /// </description>
        public string GetUndoName(int index)
        {
            InternalUnsafeMethods.GetUndoName__Args _args = new InternalUnsafeMethods.GetUndoName__Args()
            {
                index = index,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetUndoName()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #16
0
        /// <description>
        /// Returns the file path to the icon file if found.
        /// </description>
        public static string FindIconBySimObject(SimObject obj)
        {
            InternalUnsafeMethods.FindIconBySimObject__Args _args = new InternalUnsafeMethods.FindIconBySimObject__Args()
            {
                obj = obj.ObjectPtr,
            };
            IntPtr _engineResult = InternalUnsafeMethods.FindIconBySimObject()(_args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #17
0
        /// <description>
        /// Gets the text for the currently selected option of the given row.
        /// </description>
        /// <param name="row">Index of the row to get the option from.</param>
        /// <returns>A string representing the text currently displayed as the selected option on the given row. If there is no such displayed text then the empty string is returned.</returns>
        public string GetCurrentOption(int row)
        {
            InternalUnsafeMethods.GetCurrentOption__Args _args = new InternalUnsafeMethods.GetCurrentOption__Args()
            {
                row = row,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetCurrentOption()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #18
0
        /// <description>
        /// getDecalTransform()
        /// </description>
        public string GetDecalTransform(uint id)
        {
            InternalUnsafeMethods.GetDecalTransform__Args _args = new InternalUnsafeMethods.GetDecalTransform__Args()
            {
                id = id,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetDecalTransform()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #19
0
        /// <description>
        /// Creates a new script asset using the targetFilePath.
        /// </description>
        /// <returns>The bool result of calling exec</returns>
        public string GetActivityLogLine(int i = 0)
        {
            InternalUnsafeMethods.GetActivityLogLine__Args _args = new InternalUnsafeMethods.GetActivityLogLine__Args()
            {
                i = i,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetActivityLogLine()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #20
0
        /// <description>
        /// Creates a new script asset using the targetFilePath.
        /// </description>
        /// <returns>The bool result of calling exec</returns>
        public string AutoImportFile(string path = "")
        {
            InternalUnsafeMethods.AutoImportFile__Args _args = new InternalUnsafeMethods.AutoImportFile__Args()
            {
                path = path,
            };
            IntPtr _engineResult = InternalUnsafeMethods.AutoImportFile()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #21
0
        /// <summary>Read in a string and place it on the string table.</summary>
        /// <description>
        ///
        /// </description>
        /// <param name="caseSensitive">If false then case will not be taken into account when attempting to match the read in string with what is already in the string table.</param>
        /// <returns>The string that was read from the stream.</returns>
        /// <see cref="writeString()" />
        /// <remarks> When working with these particular string reading and writing methods, the stream begins with the length of the string followed by the string itself, and does not include a NULL terminator.</remarks>
        public string ReadSTString(bool caseSensitive = false)
        {
            InternalUnsafeMethods.ReadSTString__Args _args = new InternalUnsafeMethods.ReadSTString__Args()
            {
                caseSensitive = caseSensitive,
            };
            IntPtr _engineResult = InternalUnsafeMethods.ReadSTString()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #22
0
        /// <description>
        /// Get the number of static fields on the object.
        /// </description>
        /// <returns>The number of static fields defined on the object.</returns>
        public string GetComponentFieldType(string fieldName)
        {
            InternalUnsafeMethods.GetComponentFieldType__Args _args = new InternalUnsafeMethods.GetComponentFieldType__Args()
            {
                fieldName = fieldName,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetComponentFieldType()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #23
0
        /// <description>
        /// ( string name="" ) - Push a CompoundUndoAction onto the compound stack for assembly.
        /// </description>
        public string PushCompound(string name = "")
        {
            InternalUnsafeMethods.PushCompound__Args _args = new InternalUnsafeMethods.PushCompound__Args()
            {
                name = name,
            };
            IntPtr _engineResult = InternalUnsafeMethods.PushCompound()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #24
0
        /// <description>
        /// (simObject) Query available static-field groups for selected object./
        /// </description>
        /// <param name="simObject">Object to query static-field groups on.</param>
        /// <returns>Space-seperated static-field group list.</returns>
        public string QueryGroups(string simObjName)
        {
            InternalUnsafeMethods.QueryGroups__Args _args = new InternalUnsafeMethods.QueryGroups__Args()
            {
                simObjName = simObjName,
            };
            IntPtr _engineResult = InternalUnsafeMethods.QueryGroups()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #25
0
        /// <summary>Returns the file path to the icon file if found.</summary>
        public static string FindIconByClassName(string className)
        {
            InternalUnsafeMethods.FindIconByClassName__Args _args = new InternalUnsafeMethods.FindIconByClassName__Args()
            {
                className = className,
            };
            IntPtr _engineResult = InternalUnsafeMethods.FindIconByClassName()(_args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #26
0
        /// <summary>Gets a Tab-Delimited list of information about a ComponentField specified by Index</summary>
        /// <description>
        ///
        /// </description>
        /// <param name="index">The index of the behavior</param>
        /// <returns>FieldName, FieldType and FieldDefaultValue, each separated by a TAB character.</returns>
        public string SetComponentield(int index)
        {
            InternalUnsafeMethods.SetComponentield__Args _args = new InternalUnsafeMethods.SetComponentield__Args()
            {
                index = index,
            };
            IntPtr _engineResult = InternalUnsafeMethods.SetComponentield()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #27
0
        /// <description>
        /// (int language)
        /// </description>
        /// <summary>Return the readable name of the language table</summary>
        /// <description>
        ///
        /// </description>
        /// <param name="language">Numerical ID of the language table to access</param>
        /// <returns>String containing the name of the table, NULL if ID was invalid or name was never specified</returns>
        public string GetLangName(int langId)
        {
            InternalUnsafeMethods.GetLangName__Args _args = new InternalUnsafeMethods.GetLangName__Args()
            {
                langId = langId,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetLangName()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #28
0
        /// <summary>Get the named damage location and modifier for a given world position.</summary>
        /// <description>
        /// the Player object can simulate different hit locations based on a pre-defined set of PlayerData defined percentages.  These hit percentages divide up the Player's bounding box into different regions.  The diagram below demonstrates how the various PlayerData properties split up the bounding volume:
        ///
        /// <img src="images/player_damageloc.png">
        ///
        /// While you may pass in any world position and getDamageLocation() will provide a best-fit location, you should be aware that this can produce some interesting results.  For example, any position that is above PlayerData::boxHeadPercentage will be considered a 'head' hit, even if the world position is high in the sky.  Therefore it may be wise to keep the passed in point to somewhere on the surface of, or within, the Player's bounding volume.
        /// </description>
        /// <remarks> This method will not return an accurate location when the player is prone or swimming.
        ///
        /// </remarks>
        /// <param name="pos">A world position for which to retrieve a body region on this player.</param>
        /// <returns>a string containing two words (space separated strings), where the first is a location and the second is a modifier.
        ///
        /// Posible locations:<ul><li>head</li><li>torso</li><li>legs</li></ul>
        /// Head modifiers:<ul><li>left_back</li><li>middle_back</li><li>right_back</li><li>left_middle</li><li>middle_middle</li><li>right_middle</li><li>left_front</li><li>middle_front</li><li>right_front</li></ul>
        /// Legs/Torso modifiers:<ul><li>front_left</li><li>front_right</li><li>back_left</li><li>back_right</li></ul></returns>
        /// <see cref="PlayerData::boxHeadPercentage" />
        /// <see cref="PlayerData::boxHeadFrontPercentage" />
        /// <see cref="PlayerData::boxHeadBackPercentage" />
        /// <see cref="PlayerData::boxHeadLeftPercentage" />
        /// <see cref="PlayerData::boxHeadRightPercentage" />
        /// <see cref="PlayerData::boxTorsoPercentage" />
        public string GetDamageLocation(Point3F pos)
        {
            pos.Alloc();             InternalUnsafeMethods.GetDamageLocation__Args _args = new InternalUnsafeMethods.GetDamageLocation__Args()
            {
                pos = pos.internalStructPtr,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetDamageLocation()(ObjectPtr, _args);

            pos.Free();             return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #29
0
        /// <description>
        /// (pos)
        /// </description>
        public string GetItemText(int pos)
        {
            InternalUnsafeMethods.GetItemText__Args _args = new InternalUnsafeMethods.GetItemText__Args()
            {
                pos = pos,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetItemText()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }
예제 #30
0
        /// <description>
        /// Gets the asset tag at the specified index.
        /// </description>
        /// <param name="tagIndex">The asset tag index.This must be 0 to the asset tag count less one.</param>
        /// <returns>The asset tag at the specified index or NULL if invalid.</returns>
        public string GetTag(int tagIndex)
        {
            InternalUnsafeMethods.GetTag__Args _args = new InternalUnsafeMethods.GetTag__Args()
            {
                tagIndex = tagIndex,
            };
            IntPtr _engineResult = InternalUnsafeMethods.GetTag()(ObjectPtr, _args);

            return(StringMarshal.IntPtrToUtf8String(_engineResult));
        }