file$ - name of image file with animation frames laid out in left-right, top-to-bottom order flags (optional) - texture flag: 1: dxColor (default) 2: Alpha 4: Masked 8: Mipmapped 16: Clamp U 32: Clamp V 64: Spherical reflection map 128: Cubic environment map 256: Store texture in vram 512: Force the use of high dxColor textures frame_width - width of each animation frame frame_height - height of each animation frame first_frame - the first frame to be used as an animation frame frame_count - the amount of frames to be used |
Loads an animated texture from an image file and returns the texture's handle. The flags parameter allows you to apply certain effects to the texture. Flags can be added to combine two or more effects, e.g. 3 (1+2) = texture with colour and alpha maps. See dxCreateTexture for more detailed descriptions of the texture flags. The frame_width, frame_height, first_frame and frame_count parameters determine how Blitz will separate the image file into individual animation frames. See also: dxCreateTexture, dxLoadTexture. |
; dxLoadAnimTexture Example ; ----------------------- dxGraphics3D 640,480 dxSetBuffer dxBackBuffer() camera=dxCreateCamera() light=dxCreateLight() dxRotateEntity light,90,0,0 cube=dxCreateCube() dxPositionEntity cube,0,0,5 ; Load anim texture anim_tex=dxLoadAnimTexture( "media/boomstrip.bmp",49,64,64,0,39 ) While Not dxKeyDown( 1 ) ; Cycle through anim frame values. 100 represents delay, 39 represents no. of anim frames frame=MilliSecs()/100 Mod 39 ; Texture cube with anim texture frame dxEntityTexture cube,anim_tex,frame pitch#=0 yaw#=0 roll#=0 If dxKeyDown( 208 )=True Then pitch#=-1 If dxKeyDown( 200 )=True Then pitch#=1 If dxKeyDown( 203 )=True Then yaw#=-1 If dxKeyDown( 205 )=True Then yaw#=1 If dxKeyDown( 45 )=True Then roll#=-1 If dxKeyDown( 44 )=True Then roll#=1 dxTurnEntity cube,pitch#,yaw#,roll# dxRenderWorld dxFlip Wend End |