<?xml version='1.0'?>
<?xml:stylesheet type="text/xsl" href="function.xsl" ?>
<function-list>
  <function>
    <name>SpriteDefine Method</name>
    <description>Defines a sprite.</description>
    <syntax>Game1.SpriteDefine lSpriteNum, sFileName, iXPosBMP, iYPosBMP, iFrameWidth, iFrameHeight, iFrameCount, iFramesPerRow</syntax>
    <param-list>
      <param>
        <name>lSpriteNum</name>
	    <description>Long. A unique identifying ID for the sprite. Start at 0 (zero) and go up as you define sprites.
	    If a sprite has already been defined with this ID, then that sprite is deleted without an error being raised.</description>
      </param>
      <param>
        <name>sFileName</name>
	    <description>String. A full path to an image file containing the sprite's frames. JPEG, GIF, PNG, and BMP are supported formats.</description>
      </param>
      <param>
        <name>iXPosBMP</name>
	    <description>Integer. The X Position in the image file of the first frame's upper left corner.</description>
      </param>
      <param>
        <name>iYPosBMP</name>
	    <description>Integer. The Y Position in the image file of the first frame's upper left corner.</description>
      </param>
      <param>
        <name>iFrameWidth</name>
	    <description>Integer. The width of the frames for the sprite.</description>
      </param>
      <param>
        <name>iFrameHeight</name>
	    <description>Integer. The height of the frames for the sprite.</description>
      </param>
      <param>
        <name>iFrameCount</name>
	    <description>Integer. The number of the frames for the sprite.</description>
      </param>
      <param>
        <name>iFramesPerRow</name>
	    <description>Integer. The number of frames per row in the image file.</description>
      </param>
    </param-list>
	<remarks>This is the key method for getting a sprite defined for use. Note that you can put multiple sprites in a file if you wish, using the iXPosBMP and iYPosBMP to define where they start.
	When creating your game art, be sure to make each frame the same size. Avoid using JPEG format for transparent sprites, as it is a lossy algorithm and will leave artifacts where your transparency should be.</remarks>
	<example>
' define a soldier sprite
' each frame is 30x25 pixels in size
' there are 81 frames total, 9 per row
Game1.SpriteDefine SPRITE_SOLDIER, App.Path &amp; "\images\soldier.gif", 0, 0, 30, 25, 81, 9
	</example>
  </function>
</function-list>

