AnimSprite

section index

## NAME

AnimSprite-Functions

## DESCRIPTION

For some 2D-Functions you can use this AnimSprite. It is basically a small Sprite-Wrapper for Irrlicht. So you can move, rotate and stretch the Sprite. You also able to use the different Material-Flags. A Sprite can also defined as a Animation-Strip. And then its easy to use this AnimSprite to animate them. There are some drawbacks at the moment - so you have to 'Draw' the sprite explicitly with IrrAnimSpripteDraw(). Credits for this Functions and the SceneNode in the Back goes to Emil Hamil.

## EXAMPLE

       ;; ////////////////////////////////////////////////////////////////////////////
       ;; Include the Irr3D-Requester
       XIncludeFile "Irr3DRequester.pb"

       ;Use the  3D-Requester
       If Irr3DRequester()

           ;Create the Anim-Sprite
           *animspritenode.l = IrrAddAnimSprite()

           ;Load the Sprite (size of texture = 512x128, size of frame = 128x128)
           IrrAnimSpriteLoad(*animspritenode, ".\media\animation.png" , 0,0,512,128,128,128)

           ;Set the Speed of the animation
           IrrAnimSpriteSetSpeed(*animspritenode,100)

           ; -----------------------------------------------------------------------------
           ; while the irrlicht environment is still running
           While IrrRunning()

               ; begin the scene, erasing the canvas with sky-blue before rendering
               IrrBeginScene( 0,0,0 )

               ; Draw the Scene (at the moment nothing there....)
               IrrDrawScene()

               : Draw this Sprite stretched from 10,10 to 200,200 (Screen-Cordinates !)
               IrrAnimSpriteDraw(*animspritenode,10,10,200,200)

               ; End the Scene
               IrrEndScene()

           Wend

       Endif

       ;End Irrlicht
       IrrStop()

       End

Contents=

- AnimSprite
- IrrAddAnimSprite
- IrrAnimSpriteCatch
- IrrAnimSpriteDraw
- IrrAnimSpriteGetLoop
- IrrAnimSpriteGetMaxFrames
- IrrAnimSpriteGetSize
- IrrAnimSpriteGetSpeed
- IrrAnimSpriteLoad
- IrrAnimSpritePlayBackward
- IrrAnimSpritePlayForward
- IrrAnimSpriteResetLoop
- IrrAnimSpriteSetColor
- IrrAnimSpriteSetFrame
- IrrAnimSpriteSetLoop
- IrrAnimSpriteSetPosition
- IrrAnimSpriteSetScaleToRect
- IrrAnimSpriteSetSpeed
- IrrAnimSpriteSetStartEndFrame