' ########################################################################################
' Microsoft Windows
' File: d3dx9anim.inc
' Contents: D3DX mesh types and functions
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_d3dx9anim_PBI)
#DEFINE PBX_d3dx9anim_PBI
%EQUATE `D3DX9ANIM_INC = 1
#INCLUDE ONCE "Legacy/Graphics/d3dx9.inc"
$IID_ID3DXAnimationSet = GUID$("{698CFB3F-9289-4d95-9A57-33A94B5A65F9}")
$IID_ID3DXKeyframedAnimationSet = GUID$("{FA4E8E3A-9786-407d-8B4C-5995893764AF}")
$IID_ID3DXCompressedAnimationSet = GUID$("{6CC2480D-3808-4739-9F88-DE49FACD8D4C}")
$IID_ID3DXAnimationController = GUID$("{AC8948EC-F86D-43e2-96DE-31FC35F96D9E}")
'//----------------------------------------------------------------------------
'// D3DXMESHDATATYPE:
'// -----------------
'// This enum defines the type of mesh data present in a MeshData structure.
'//----------------------------------------------------------------------------
%EQUATE `D3DXMESHTYPE_MESH = &H001 ' // Normal ID3DXMesh data
%EQUATE `D3DXMESHTYPE_PMESH = &H002 ' // Progressive Mesh - ID3DXPMesh
%EQUATE `D3DXMESHTYPE_PATCHMESH = &H003 ' // Patch Mesh - ID3DXPatchMesh
%EQUATE `D3DXMESHTYPE_FORCE_DWORD = &H7FFFFFFF ' /* force 32-bit size enum */
'//----------------------------------------------------------------------------
'// D3DXMESHDATA:
'// -------------
'// This struct encapsulates a the mesh data that can be present in a mesh
'// container. The supported mesh types are pMesh, pPMesh, pPatchMesh.
'// The valid way to access this is determined by the Type enum.
'//----------------------------------------------------------------------------
' // Size = 4 bytes
UNION D3DXMESHDATA_UNION DWORD
 pMesh AS DWORD ' LPD3DXMESH
 pPMesh AS DWORD ' LPD3DXPMESH
 pPatchMesh AS DWORD ' LPD3DXPATCHMESH
END UNION
' // Size = 8 bytes
TYPE D3DXMESHDATA DWORD
 Type AS DWORD ' D3DXMESHDATATYPE
 D3DXMESHDATA_UNION
END TYPE
'//----------------------------------------------------------------------------
'// D3DXMESHCONTAINER:
'// ------------------
'// This struct encapsulates a mesh object in a transformation frame
'// hierarchy. The app can derive from this structure to add other app specific
'// data to this.
'//----------------------------------------------------------------------------
' // Size = 32 bytes
TYPE D3DXMESHCONTAINER DWORD
 Name AS ASCIIZ PTR
 MeshData AS DWORD ' D3DXMESHDATA
 pMaterials AS DWORD ' LPD3DXMATERIAL
 pEffects AS DWORD ' LPD3DXEFFECTINSTANCE
 NumMaterials AS DWORD
 pAdjacency AS DWORD PTR ' DWORD *
 pSkinInfo AS DWORD ' LPD3DXSKININFO
 pNextMeshContainer AS D3DXMESHCONTAINER PTR ' struct _D3DXMESHCONTAINER *
END TYPE
'//----------------------------------------------------------------------------
'// D3DXFRAME:
'// ----------
'// This struct is the encapsulates a transform frame in a transformation frame
'// hierarchy. The app can derive from this structure to add other app specific
'// data to this
'//----------------------------------------------------------------------------
' // Size = 20 bytes
TYPE D3DXFRAME DWORD
 Name AS ASCIIZ PTR
 TransformationMatrix AS DWORD ' D3DXMATRIX
 pMeshContainer AS DWORD ' LPD3DXMESHCONTAINER
 pFrameSibling AS D3DXFRAME PTR ' struct _D3DXFRAME *
 pFrameFirstChild AS D3DXFRAME PTR ' struct _D3DXFRAME *
END TYPE
'//----------------------------------------------------------------------------
'// ID3DXAllocateHierarchy:
'// -----------------------
'// This interface is implemented by the application to allocate/free frame and
'// mesh container objects. Methods on this are called during loading and
'// destroying frame hierarchies
'//----------------------------------------------------------------------------
'DECLARE_INTERFACE(ID3DXAllocateHierarchy)
'{
' // ID3DXAllocateHierarchy
'	//------------------------------------------------------------------------
'	// CreateFrame:
'	// ------------
'	// Requests allocation of a frame object.
'	//
'	// Parameters:
'	// Name
'	//		Name of the frame to be created
'	//	ppNewFrame
'	//		Returns the created frame object
'	//
'	//------------------------------------------------------------------------
' STDMETHOD(CreateFrame)(THIS_ LPCSTR Name,
' LPD3DXFRAME *ppNewFrame) PURE;
'	//------------------------------------------------------------------------
'	// CreateMeshContainer:
'	// --------------------
'	// Requests allocation of a mesh container object.
'	//
'	// Parameters:
'	// Name
'	//		Name of the mesh
'	//	pMesh
'	//		Pointer to the mesh object if basic polygon data found
'	//	pPMesh
'	//		Pointer to the progressive mesh object if progressive mesh data found
'	//	pPatchMesh
'	//		Pointer to the patch mesh object if patch data found
'	//	pMaterials
'	//		Array of materials used in the mesh
'	//	pEffectInstances
'	//		Array of effect instances used in the mesh
'	//	NumMaterials
'	//		Num elements in the pMaterials array
'	//	pAdjacency
'	//		Adjacency array for the mesh
'	//	pSkinInfo
'	//		Pointer to the skininfo object if the mesh is skinned
'	//	pBoneNames
'	//		Array of names, one for each bone in the skinned mesh.
'	//		The numberof bones can be found from the pSkinMesh object
'	//	pBoneOffsetMatrices
'	//		Array of matrices, one for each bone in the skinned mesh.
'	//
'	//------------------------------------------------------------------------
' STDMETHOD(CreateMeshContainer)(THIS_
' LPCSTR Name,
' CONST D3DXMESHDATA *pMeshData,
' CONST D3DXMATERIAL *pMaterials,
' CONST D3DXEFFECTINSTANCE *pEffectInstances,
' DWORD NumMaterials,
' CONST DWORD *pAdjacency,
' LPD3DXSKININFO pSkinInfo,
' LPD3DXMESHCONTAINER *ppNewMeshContainer) PURE;
'	//------------------------------------------------------------------------
'	// DestroyFrame:
'	// -------------
'	// Requests de-allocation of a frame object.
'	//
'	// Parameters:
'	// pFrameToFree
'	//		Pointer to the frame to be de-allocated
'	//
'	//------------------------------------------------------------------------
' STDMETHOD(DestroyFrame)(THIS_ LPD3DXFRAME pFrameToFree) PURE;
'	//------------------------------------------------------------------------
'	// DestroyMeshContainer:
'	// ---------------------
'	// Requests de-allocation of a mesh container object.
'	//
'	// Parameters:
'	// pMeshContainerToFree
'	//		Pointer to the mesh container object to be de-allocated
'	//
'	//------------------------------------------------------------------------
' STDMETHOD(DestroyMeshContainer)(THIS_ LPD3DXMESHCONTAINER pMeshContainerToFree) PURE;
'};
'//----------------------------------------------------------------------------
'// ID3DXLoadUserData:
'// ------------------
'// This interface is implemented by the application to load user data in a .X file
'// When user data is found, these callbacks will be used to allow the application
'// to load the data.
'//----------------------------------------------------------------------------
'DECLARE_INTERFACE(ID3DXLoadUserData)
'{
' STDMETHOD(LoadTopLevelData)(LPD3DXFILEDATA pXofChildData) PURE;
' STDMETHOD(LoadFrameChildData)(LPD3DXFRAME pFrame,
' LPD3DXFILEDATA pXofChildData) PURE;
' STDMETHOD(LoadMeshChildData)(LPD3DXMESHCONTAINER pMeshContainer,
' LPD3DXFILEDATA pXofChildData) PURE;
'};
'//----------------------------------------------------------------------------
'// ID3DXSaveUserData:
'// ------------------
'// This interface is implemented by the application to save user data in a .X file
'// The callbacks are called for all data saved. The user can then add any
'// child data objects to the object provided to the callback.
'//----------------------------------------------------------------------------
'DECLARE_INTERFACE(ID3DXSaveUserData)
'{
' STDMETHOD(AddFrameChildData)(CONST D3DXFRAME *pFrame,
' LPD3DXFILESAVEOBJECT pXofSave,
' LPD3DXFILESAVEDATA pXofFrameData) PURE;
' STDMETHOD(AddMeshChildData)(CONST D3DXMESHCONTAINER *pMeshContainer,
' LPD3DXFILESAVEOBJECT pXofSave,
' LPD3DXFILESAVEDATA pXofMeshData) PURE;
' // NOTE: this is called once per Save. All top level objects should be added using the
' // provided interface. One call adds objects before the frame hierarchy, the other after
' STDMETHOD(AddTopLevelDataObjectsPre)(LPD3DXFILESAVEOBJECT pXofSave) PURE;
' STDMETHOD(AddTopLevelDataObjectsPost)(LPD3DXFILESAVEOBJECT pXofSave) PURE;
' // callbacks for the user to register and then save templates to the XFile
' STDMETHOD(RegisterTemplates)(LPD3DXFILE pXFileApi) PURE;
' STDMETHOD(SaveTemplates)(LPD3DXFILESAVEOBJECT pXofSave) PURE;
'};
'//----------------------------------------------------------------------------
'// D3DXCALLBACK_SEARCH_FLAGS:
'// --------------------------
'// Flags that can be passed into ID3DXAnimationSet::GetCallback.
'//----------------------------------------------------------------------------
%EQUATE `D3DXCALLBACK_SEARCH_EXCLUDING_INITIAL_POSITION = &H01 ' // exclude callbacks at the initial position from the search
%EQUATE `D3DXCALLBACK_SEARCH_BEHIND_INITIAL_POSITION = &H02 ' // reverse the callback search direction
%EQUATE `D3DXCALLBACK_SEARCH_FORCE_DWORD = &H7FFFFFFF
'//----------------------------------------------------------------------------
'// ID3DXAnimationSet:
'// ------------------
'// This interface implements an animation set.
'//----------------------------------------------------------------------------
INTERFACE ID3DXAnimationSet $IID_ID3DXAnimationSet
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetName ( ' VTable offset = 12
 ) AS DWORD
 ' =====================================================================================
 METHOD GetPeriod ( ' VTable offset = 16
 ) AS DOUBLE ' DOUBLE
 ' =====================================================================================
 METHOD GetPeriodicPosition ( ' VTable offset = 20
 ) AS DOUBLE ' DOUBLE
 ' =====================================================================================
 METHOD GetNumAnimations ( ' VTable offset = 24
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetAnimationNameByIndex ( ' VTable offset = 28
 BYVAL Index AS DWORD
 , BYREF ppName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetAnimationIndexByName ( ' VTable offset = 32
 BYREF pName AS ASCIIZ
 , BYREF pIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSRT ( ' VTable offset = 36
 BYVAL PeriodicPosition AS DOUBLE
 , BYVAL Animation AS DWORD
 , BYREF pScale AS D3DXVECTOR3
 , BYREF pRotation AS D3DXQUATERNION
 , BYREF pTranslation AS D3DXVECTOR3
 ) AS LONG
 ' =====================================================================================
 METHOD GetCallback ( ' VTable offset = 40
 BYVAL Position AS DOUBLE
 , BYVAL Flags AS DWORD
 , BYREF pCallbackPosition AS DOUBLE
 , BYREF ppCallbackData AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
'//----------------------------------------------------------------------------
'// D3DXPLAYBACK_TYPE:
'// ------------------
'// This enum defines the type of animation set loop modes.
'//----------------------------------------------------------------------------
%EQUATE `D3DXPLAY_LOOP = 0
%EQUATE `D3DXPLAY_ONCE = 1
%EQUATE `D3DXPLAY_PINGPONG = 2
%EQUATE `D3DXPLAY_FORCE_DWORD = &H7FFFFFFF ' /* force 32-bit size enum */
'//----------------------------------------------------------------------------
'// D3DXKEY_VECTOR3:
'// ----------------
'// This structure describes a vector key for use in keyframe animation.
'// It specifies a vector Value at a given Time. This is used for scale and
'// translation keys.
'//----------------------------------------------------------------------------
' // Size = 16 bytes
TYPE D3DXKEY_VECTOR3 DWORD
 Time AS SINGLE
 Value AS D3DXVECTOR3
END TYPE
'//----------------------------------------------------------------------------
'// D3DXKEY_QUATERNION:
'// -------------------
'// This structure describes a quaternion key for use in keyframe animation.
'// It specifies a quaternion Value at a given Time. This is used for rotation
'// keys.
'//----------------------------------------------------------------------------
' // Size = 20 bytes
TYPE D3DXKEY_QUATERNION DWORD
 Time AS SINGLE
 Value AS D3DXQUATERNION
END TYPE
'//----------------------------------------------------------------------------
'// D3DXKEY_CALLBACK:
'// -----------------
'// This structure describes an callback key for use in keyframe animation.
'// It specifies a pointer to user data at a given Time.
'//----------------------------------------------------------------------------
' // Size = 8 bytes
TYPE D3DXKEY_CALLBACK DWORD
 Time AS SINGLE
 pCallbackData AS DWORD
END TYPE
'//----------------------------------------------------------------------------
'// D3DXCOMPRESSION_FLAGS:
'// ----------------------
'// Flags that can be passed into ID3DXKeyframedAnimationSet::Compress.
'//----------------------------------------------------------------------------
%EQUATE `D3DXCOMPRESS_DEFAULT = &H00
%EQUATE `D3DXCOMPRESS_FORCE_DWORD = &H7FFFFFFF
'//----------------------------------------------------------------------------
'// ID3DXKeyframedAnimationSet:
'// ---------------------------
'// This interface implements a compressable keyframed animation set.
'//----------------------------------------------------------------------------
INTERFACE ID3DXKeyframedAnimationSet $IID_ID3DXKeyframedAnimationSet
 INHERIT IUnknown
 ' =====================================================================================
 ' ID3DXAnimationSet methods
 ' =====================================================================================
 METHOD GetName ( ' VTable offset = 12
 ) AS DWORD
 ' =====================================================================================
 METHOD GetPeriod ( ' VTable offset = 16
 ) AS DOUBLE ' DOUBLE
 ' =====================================================================================
 METHOD GetPeriodicPosition ( ' VTable offset = 20
 ) AS DOUBLE ' DOUBLE
 ' =====================================================================================
 METHOD GetNumAnimations ( ' VTable offset = 24
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetAnimationNameByIndex ( ' VTable offset = 28
 BYVAL Index AS DWORD
 , BYREF ppName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetAnimationIndexByName ( ' VTable offset = 32
 BYREF pName AS ASCIIZ
 , BYREF pIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSRT ( ' VTable offset = 36
 BYVAL PeriodicPosition AS DOUBLE
 , BYVAL Animation AS DWORD
 , BYREF pScale AS D3DXVECTOR3
 , BYREF pRotation AS D3DXQUATERNION
 , BYREF pTranslation AS D3DXVECTOR3
 ) AS LONG
 ' =====================================================================================
 METHOD GetCallback ( ' VTable offset = 40
 BYVAL Position AS DOUBLE
 , BYVAL Flags AS DWORD
 , BYREF pCallbackPosition AS DOUBLE
 , BYREF ppCallbackData AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ID3DXKeyframedAnimationSet methods
 ' =====================================================================================
 METHOD GetPlaybackType ( ' VTable offset = 44
 ) AS DWORD ' D3DXPLAYBACK_TYPE
 ' =====================================================================================
 METHOD GetSourceTicksPerSecond ( ' VTable offset = 48
 ) AS DOUBLE ' DOUBLE
 ' =====================================================================================
 METHOD GetNumScaleKeys ( ' VTable offset = 52
 BYVAL DWORD
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetScaleKeys ( ' VTable offset = 56
 BYVAL Animation AS DWORD
 , BYREF pScaleKeys AS D3DXKEY_VECTOR3
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetScaleKey ( ' VTable offset = 60
 BYVAL Animation AS DWORD
 , BYVAL Key AS DWORD
 , BYREF pScaleKey AS D3DXKEY_VECTOR3
 ) AS LONG
 ' =====================================================================================
 METHOD SetScaleKey ( ' VTable offset = 64
 BYVAL Animation AS DWORD
 , BYVAL Key AS DWORD
 , BYREF pScaleKey AS D3DXKEY_VECTOR3
 ) AS LONG
 ' =====================================================================================
 METHOD GetNumRotationKeys ( ' VTable offset = 68
 BYVAL Animation AS DWORD
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetRotationKeys ( ' VTable offset = 72
 BYVAL Animation AS DWORD
 , BYREF pRotationKeys AS D3DXKEY_QUATERNION
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetRotationKey ( ' VTable offset = 76
 BYVAL Animation AS DWORD
 , BYVAL Key AS DWORD
 , BYREF pRotationKey AS D3DXKEY_QUATERNION
 ) AS LONG
 ' =====================================================================================
 METHOD SetRotationKey ( ' VTable offset = 80
 BYVAL Animation AS DWORD
 , BYVAL Key AS DWORD
 , BYREF pRotationKey AS D3DXKEY_QUATERNION
 ) AS LONG
 ' =====================================================================================
 METHOD GetNumTranslationKeys ( ' VTable offset = 84
 BYVAL Animation AS DWORD
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetTranslationKeys ( ' VTable offset = 88
 BYVAL Animation AS DWORD
 , BYREF pTranslationKeys AS D3DXKEY_VECTOR3
 ) AS LONG
 ' =====================================================================================
 METHOD GetTranslationKey ( ' VTable offset = 92
 BYVAL Animation AS DWORD
 , BYVAL Key AS DWORD
 , BYREF pTranslationKey AS D3DXKEY_VECTOR3
 ) AS LONG
 ' =====================================================================================
 METHOD SetTranslationKey ( ' VTable offset = 96
 BYVAL Animation AS DWORD
 , BYVAL Key AS DWORD
 , BYREF pTranslationKey AS D3DXKEY_VECTOR3
 ) AS LONG
 ' =====================================================================================
 METHOD GetNumCallbackKeys ( ' VTable offset = 100
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetCallbackKeys ( ' VTable offset = 104
 BYREF pCallbackKeys AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCallbackKey ( ' VTable offset = 108
 BYVAL Key AS DWORD
 , BYREF pCallbackKey AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCallbackKey ( ' VTable offset = 112
 BYVAL Key AS DWORD
 , BYREF pCallbackKey AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterScaleKey ( ' VTable offset = 116
 BYVAL Animation AS DWORD
 , BYVAL Key AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterRotationKey ( ' VTable offset = 120
 BYVAL Animation AS DWORD
 , BYVAL Key AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterTranslationKey ( ' VTable offset = 124
 BYVAL Animation AS DWORD
 , BYVAL Key AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RegisterAnimationSRTKeys ( ' VTable offset = 128
 BYREF pName AS ASCIIZ
 , BYVAL NumScaleKeys AS DWORD
 , BYVAL NumRotationKeys AS DWORD
 , BYVAL NumTranslationKeys AS DWORD
 , BYREF pScaleKeys AS D3DXKEY_VECTOR3
 , BYREF pRotationKeys AS D3DXKEY_QUATERNION
 , BYREF pTranslationKeys AS D3DXKEY_VECTOR3
 , BYREF pAnimationIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Compress ( ' VTable offset = 132
 BYVAL Flags AS DWORD
 , BYVAL Lossiness AS SINGLE
 , BYREF pHierarchy AS D3DXFRAME
 , BYREF ppCompressedData AS ID3DXBuffer
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterAnimation ( ' VTable offset = 136
 BYVAL Index AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
'//----------------------------------------------------------------------------
'// ID3DXCompressedAnimationSet:
'// ----------------------------
'// This interface implements a compressed keyframed animation set.
'//----------------------------------------------------------------------------
INTERFACE ID3DXCompressedAnimationSet $IID_ID3DXCompressedAnimationSet
 INHERIT IUnknown
 ' =====================================================================================
 ' ID3DXAnimationSet methods
 ' =====================================================================================
 METHOD GetName ( ' VTable offset = 12
 ) AS DWORD
 ' =====================================================================================
 METHOD GetPeriod ( ' VTable offset = 16
 ) AS DOUBLE ' DOUBLE
 ' =====================================================================================
 METHOD GetPeriodicPosition ( ' VTable offset = 20
 ) AS DOUBLE ' DOUBLE
 ' =====================================================================================
 METHOD GetNumAnimations ( ' VTable offset = 24
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetAnimationNameByIndex ( ' VTable offset = 28
 BYVAL Index AS DWORD
 , BYREF ppName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetAnimationIndexByName ( ' VTable offset = 32
 BYREF pName AS ASCIIZ
 , BYREF pIndex AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSRT ( ' VTable offset = 36
 BYVAL PeriodicPosition AS DOUBLE
 , BYVAL Animation AS DWORD
 , BYREF pScale AS D3DXVECTOR3
 , BYREF pRotation AS D3DXQUATERNION
 , BYREF pTranslation AS D3DXVECTOR3
 ) AS LONG
 ' =====================================================================================
 METHOD GetCallback ( ' VTable offset = 40
 BYVAL Position AS DOUBLE
 , BYVAL Flags AS DWORD
 , BYREF pCallbackPosition AS DOUBLE
 , BYREF ppCallbackData AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' ID3DXCompressedAnimationSet methods
 ' =====================================================================================
 METHOD GetPlaybackType ( ' VTable offset = 44
 ) AS DWORD ' D3DXPLAYBACK_TYPE
 ' =====================================================================================
 METHOD GetSourceTicksPerSecond ( ' VTable offset = 48
 ) AS DOUBLE ' DOUBLE
 ' =====================================================================================
 METHOD GetCompressedData ( ' VTable offset = 52
 BYREF ppCompressedData AS ID3DXBuffer
 ) AS LONG
 ' =====================================================================================
 METHOD GetNumCallbackKeys ( ' VTable offset = 56
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetCallbackKeys ( ' VTable offset = 60
 BYREF pCallbackKeys AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
'//----------------------------------------------------------------------------
'// D3DXPRIORITY_TYPE:
'// ------------------
'// This enum defines the type of priority group that a track can be assigned to.
'//----------------------------------------------------------------------------
%EQUATE `D3DXPRIORITY_LOW = 0 ' // This track should be blended with all low priority tracks before mixed with the high priority result
%EQUATE `D3DXPRIORITY_HIGH = 1 ' // This track should be blended with all high priority tracks before mixed with the low priority result
%EQUATE `D3DXPRIORITY_FORCE_DWORD = &H7FFFFFFF ' /* force 32-bit size enum */
'//----------------------------------------------------------------------------
'// D3DXTRACK_DESC:
'// ---------------
'// This structure describes the mixing information of an animation track.
'// The mixing information consists of the current position, speed, and blending
'// weight for the track. The Flags field also specifies whether the track is
'// low or high priority. Tracks with the same priority are blended together
'// and then the two resulting values are blended using the priority blend factor.
'// A track also has an animation set (stored separately) associated with it.
'//----------------------------------------------------------------------------
' // Size = 24 bytes
TYPE D3DXTRACK_DESC DWORD
 Priority AS DWORD ' D3DXPRIORITY_TYPE
 Weight AS SINGLE ' FLOAT
 Speed AS SINGLE ' FLOAT
 Position AS DOUBLE ' DOUBLE
 Enable AS LONG
END TYPE
'//----------------------------------------------------------------------------
'// D3DXEVENT_TYPE:
'// ---------------
'// This enum defines the type of events keyable via the animation controller.
'//----------------------------------------------------------------------------
%EQUATE `D3DXEVENT_TRACKSPEED = 0
%EQUATE `D3DXEVENT_TRACKWEIGHT = 1
%EQUATE `D3DXEVENT_TRACKPOSITION = 2
%EQUATE `D3DXEVENT_TRACKENABLE = 3
%EQUATE `D3DXEVENT_PRIORITYBLEND = 4
%EQUATE `D3DXEVENT_FORCE_DWORD = &H7FFFFFFF ' /* force 32-bit size enum */
'//----------------------------------------------------------------------------
'// D3DXTRANSITION_TYPE:
'// --------------------
'// This enum defines the type of transtion performed on a event that
'// transitions from one value to another.
'//----------------------------------------------------------------------------
%EQUATE `D3DXTRANSITION_LINEAR = &H000 ' // Linear transition from one value to the next
%EQUATE `D3DXTRANSITION_EASEINEASEOUT = &H001 ' // Ease-In Ease-Out spline transtion from one value to the next
%EQUATE `D3DXTRANSITION_FORCE_DWORD = &H7FFFFFFF ' /* force 32-bit size enum */
'//----------------------------------------------------------------------------
'// D3DXEVENT_DESC:
'// ---------------
'// This structure describes a animation controller event.
'// It gives the event's type, track (if the event is a track event), global
'// start time, duration, transition method, and target value.
'//----------------------------------------------------------------------------
' // Size = 8 bytes
UNION D3DXEVENT_DESC_UNION DWORD
 Weight AS SINGLE ' FLOAT
 Speed AS SINGLE ' FLOAT
 Position AS DOUBLE ' FLOAT
 Enable AS LONG
END UNION
' // Size = 36 bytes
TYPE D3DXEVENT_DESC DWORD
 Type AS DWORD ' D3DXEVENT_TYPE
 Track AS DWORD ' UINT
 StartTime AS DOUBLE ' DOUBLE
 Duration AS DOUBLE ' DOUBLE
 Transition AS DWORD ' D3DXTRANSITION_TYPE
 D3DXEVENT_DESC_UNION
END TYPE
'//----------------------------------------------------------------------------
'// D3DXEVENTHANDLE:
'// ----------------
'// Handle values used to efficiently reference animation controller events.
'//----------------------------------------------------------------------------
'MACRO D3DXEVENTHANDLE = DWORD
'MACRO LPD3DXEVENTHANDLE = D3DXEVENTHANDLE PTR
'//----------------------------------------------------------------------------
'// ID3DXAnimationCallbackHandler:
'// ------------------------------
'// This interface is intended to be implemented by the application, and can
'// be used to handle callbacks in animation sets generated when
'// ID3DXAnimationController::AdvanceTime() is called.
'//----------------------------------------------------------------------------
'DECLARE_INTERFACE(ID3DXAnimationCallbackHandler)
'{
' //----------------------------------------------------------------------------
' // ID3DXAnimationCallbackHandler::HandleCallback:
' // ----------------------------------------------
' // This method gets called when a callback occurs for an animation set in one
' // of the tracks during the ID3DXAnimationController::AdvanceTime() call.
' //
' // Parameters:
' // Track
' // Index of the track on which the callback occured.
' // pCallbackData
' // Pointer to user owned callback data.
' //
' //----------------------------------------------------------------------------
' STDMETHOD(HandleCallback)(THIS_ UINT Track, LPVOID pCallbackData) PURE;
'};
'//----------------------------------------------------------------------------
'// ID3DXAnimationController:
'// -------------------------
'// This interface implements the main animation functionality. It connects
'// animation sets with the transform frames that are being animated. Allows
'// mixing multiple animations for blended animations or for transistions
'// It adds also has methods to modify blending parameters over time to
'// enable smooth transistions and other effects.
'//----------------------------------------------------------------------------
INTERFACE ID3DXAnimationController $IID_ID3DXAnimationController
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetMaxNumAnimationOutputs ( ' VTable offset = 12
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetMaxNumAnimationSets ( ' VTable offset = 16
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetMaxNumTracks ( ' VTable offset = 20
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetMaxNumEvents ( ' VTable offset = 24
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD RegisterAnimationOutput ( ' VTable offset = 28
 BYREF pName AS ASCIIZ
 , BYREF pMatrix AS D3DXMATRIX
 , BYREF pScale AS D3DXVECTOR3
 , BYREF pRotation AS D3DXQUATERNION
 , BYREF pTranslation AS D3DXVECTOR3
 ) AS LONG
 ' =====================================================================================
 METHOD RegisterAnimationSet ( ' VTable offset = 32
 BYVAL pAnimSet AS ID3DXAnimationSet
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterAnimationSet ( ' VTable offset = 36
 BYVAL pAnimSet AS ID3DXAnimationSet
 ) AS LONG
 ' =====================================================================================
 METHOD GetNumAnimationSets ( ' VTable offset = 40
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetAnimationSet ( ' VTable offset = 44
 BYVAL Index AS DWORD
 , BYREF ppAnimationSet AS ID3DXAnimationSet
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetAnimationSetByName ( ' VTable offset = 48
 BYREF szName AS ASCIIZ
 , BYREF ppAnimationSet AS ID3DXAnimationSet
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD AdvanceTime ( ' VTable offset = 52
 BYVAL TimeDelta AS DOUBLE
 , BYVAL pCallbackHandler AS DWORD
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD ResetTime ( ' VTable offset = 56
 ) AS DWORD ' UINT
 ' =====================================================================================
 METHOD GetTime ( ' VTable offset = 60
 ) AS DOUBLE ' DOUBLE
 ' =====================================================================================
 METHOD SetTrackAnimationSet ( ' VTable offset = 64
 BYVAL Track AS DWORD
 , BYVAL pAnimSet AS ID3DXAnimationSet
 ) AS LONG
 ' =====================================================================================
 METHOD GetTrackAnimationSet ( ' VTable offset = 68
 BYVAL Track AS DWORD
 , BYREF ppAnimSet AS ID3DXAnimationSet
 ) AS LONG
 ' =====================================================================================
 METHOD SetTrackPriority ( ' VTable offset = 72
 BYVAL Track AS DWORD
 , BYVAL Priority AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetTrackSpeed ( ' VTable offset = 76
 BYVAL Track AS DWORD
 , BYVAL Speed AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetTrackWeight ( ' VTable offset = 80
 BYVAL Track AS DWORD
 , BYVAL Weight AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetTrackPosition ( ' VTable offset = 84
 BYVAL Track AS DWORD
 , BYVAL Position AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD SetTrackEnable ( ' VTable offset = 88
 BYVAL Track AS DWORD
 , BYVAL Enable AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetTrackDesc ( ' VTable offset = 92
 BYVAL Track AS DWORD
 , BYREF pDesc AS D3DXTRACK_DESC
 ) AS LONG
 ' =====================================================================================
 METHOD GetTrackDesc ( ' VTable offset = 96
 BYVAL Track AS DWORD
 , BYREF pDesc AS D3DXTRACK_DESC
 ) AS LONG
 ' =====================================================================================
 METHOD SetPriorityBlend ( ' VTable offset = 100
 BYVAL BlendWeight AS SINGLE
 ) AS LONG
 ' =====================================================================================
 METHOD GetPriorityBlend ( ' VTable offset = 104
 ) AS SINGLE ' SINGLE
 ' =====================================================================================
 METHOD KeyTrackSpeed ( ' VTable offset = 108
 BYVAL Track AS DWORD
 , BYVAL NewSpeed AS SINGLE
 , BYVAL StartTime AS DOUBLE
 , BYVAL Duration AS DOUBLE
 , BYVAL Transition AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD KeyTrackWeight ( ' VTable offset = 112
 BYVAL Track AS DWORD
 , BYVAL NewWeight AS SINGLE
 , BYVAL StartTime AS DOUBLE
 , BYVAL Duration AS DOUBLE
 , BYVAL Transition AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD KeyTrackPosition ( ' VTable offset = 116
 BYVAL Track AS DWORD
 , BYVAL NewPosition AS SINGLE
 , BYVAL StartTime AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD KeyTrackEnable ( ' VTable offset = 120
 BYVAL Track AS DWORD
 , BYVAL NewEnable AS LONG
 , BYVAL StartTime AS DOUBLE
 ) AS LONG
 ' =====================================================================================
 METHOD KeyPriorityBlend ( ' VTable offset = 124
 BYVAL NewBlendWeight AS SINGLE
 , BYVAL StartTime AS DOUBLE
 , BYVAL Duration AS DOUBLE
 , BYVAL Transition AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnkeyEvent ( ' VTable offset = 128
 BYVAL hEvent AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnkeyAllTrackEvents ( ' VTable offset = 132
 BYVAL Track AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnkeyAllPriorityBlends ( ' VTable offset = 136
 ) AS LONG
 ' =====================================================================================
 METHOD GetCurrentTrackEvent ( ' VTable offset = 140
 BYVAL Track AS DWORD
 , BYVAL EventType AS DWORD
 ) AS DWORD ' D3DXEVENTHANDLE
 ' =====================================================================================
 METHOD GetCurrentPriorityBlend ( ' VTable offset = 144
 ) AS DWORD ' D3DXEVENTHANDLE
 ' =====================================================================================
 METHOD GetUpcomingTrackEvent ( ' VTable offset = 148
 BYVAL Track AS DWORD
 , BYVAL hEvent AS DWORD
 ) AS DWORD ' D3DXEVENTHANDLE
 ' =====================================================================================
 METHOD GetUpcomingPriorityBlend ( ' VTable offset = 152
 BYVAL hEvent AS DWORD
 ) AS DWORD ' D3DXEVENTHANDLE
 ' =====================================================================================
 METHOD ValidateEvent ( ' VTable offset = 156
 BYVAL hEvent AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetEventDesc ( ' VTable offset = 160
 BYVAL hEvent AS DWORD
 , BYREF pDesc AS D3DXEVENT_DESC
 ) AS LONG
 ' =====================================================================================
 METHOD CloneAnimationController ( ' VTable offset = 164
 BYVAL MaxNumAnimationOutputs AS DWORD
 , BYVAL MaxNumAnimationSets AS DWORD
 , BYVAL MaxNumTracks AS DWORD
 , BYVAL MaxNumEvents AS DWORD
 , BYREF ppAnimController AS ID3DXAnimationController ' LPD3DXANIMATIONCONTROLLER *ppAnimController
 ) AS LONG
 ' =====================================================================================
END INTERFACE
'//----------------------------------------------------------------------------
'// D3DXLoadMeshHierarchyFromX:
'// ---------------------------
'// Loads the first frame hierarchy in a .X file.
'//
'// Parameters:
'// Filename
'// Name of the .X file
'// MeshOptions
'// Mesh creation options for meshes in the file (see d3dx9mesh.h)
'// pD3DDevice
'// D3D9 device on which meshes in the file are created in
'// pAlloc
'// Allocation interface used to allocate nodes of the frame hierarchy
'// pUserDataLoader
'// Application provided interface to allow loading of user data
'// ppFrameHierarchy
'// Returns root node pointer of the loaded frame hierarchy
'// ppAnimController
'// Returns pointer to an animation controller corresponding to animation
'//		in the .X file. This is created with default max tracks and events
'//
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DXLoadMeshHierarchyFromXA IMPORT $D3DX_DLLNAME ALIAS "D3DXLoadMeshHierarchyFromXA" (_
 BYREF Filename AS ASCIIZ
 , BYVAL MeshOptions AS DWORD
 , BYVAL pD3DDevice AS IDirect3DDevice9
 , BYVAL pAlloc AS IUnknown
 , BYVAL pUserDataLoader AS IUnknown
 , BYREF ppFrameHierarchy AS D3DXFRAME
 , BYREF ppAnimController AS ID3DXAnimationController
 ) AS LONG
DECLARE FUNCTION D3DXLoadMeshHierarchyFromXW IMPORT $D3DX_DLLNAME ALIAS "D3DXLoadMeshHierarchyFromXW" (_
 BYREF Filename AS WSTRINGZ
 , BYVAL MeshOptions AS DWORD
 , BYVAL pD3DDevice AS IDirect3DDevice9
 , BYVAL pAlloc AS IUnknown
 , BYVAL pUserDataLoader AS IUnknown
 , BYREF ppFrameHierarchy AS D3DXFRAME
 , BYREF ppAnimController AS ID3DXAnimationController
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DXLoadMeshHierarchyFromX = D3DXLoadMeshHierarchyFromXW
#ELSE
 MACRO D3DXLoadMeshHierarchyFromX = D3DXLoadMeshHierarchyFromXA
#ENDIF
DECLARE FUNCTION D3DXLoadMeshHierarchyFromXInMemory IMPORT $D3DX_DLLNAME ALIAS "D3DXLoadMeshHierarchyFromXInMemory" (_
 BYVAL Memory AS DWORD
 , BYVAL SizeOfMemory AS DWORD
 , BYVAL MeshOptions AS DWORD
 , BYVAL pD3DDevice AS IDirect3DDevice9
 , BYVAL pAlloc AS IUnknown
 , BYVAL pUserDataLoader AS IUnknown
 , BYREF ppFrameHierarchy AS D3DXFRAME
 , BYREF ppAnimController AS ID3DXAnimationController
 ) AS LONG
'//----------------------------------------------------------------------------
'// D3DXSaveMeshHierarchyToFile:
'// ----------------------------
'// Creates a .X file and saves the mesh hierarchy and corresponding animations
'// in it
'//
'// Parameters:
'// Filename
'// Name of the .X file
'// XFormat
'// Format of the .X file (text or binary, compressed or not, etc)
'// pFrameRoot
'// Root node of the hierarchy to be saved
'// pAnimController
'// The animation controller whose animation sets are to be stored
'// pUserDataSaver
'// Application provided interface to allow adding of user data to
'// data objects saved to .X file
'//
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DXSaveMeshHierarchyToFileA IMPORT $D3DX_DLLNAME ALIAS "D3DXSaveMeshHierarchyToFileA" (_
 BYREF Filename AS ASCIIZ
 , BYVAL XFormat AS DWORD
 , BYREF pFrameRoot AS D3DXFRAME
 , BYVAL pAnimcontroller AS ID3DXAnimationController
 , BYVAL pUserDataSaver AS IUnknown
 ) AS LONG
DECLARE FUNCTION D3DXSaveMeshHierarchyToFileW IMPORT $D3DX_DLLNAME ALIAS "D3DXSaveMeshHierarchyToFileW" (_
 BYREF Filename AS WSTRINGZ
 , BYVAL XFormat AS DWORD
 , BYREF pFrameRoot AS D3DXFRAME
 , BYVAL pAnimcontroller AS ID3DXAnimationController
 , BYVAL pUserDataSaver AS IUnknown
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO D3DXSaveMeshHierarchyToFile = D3DXSaveMeshHierarchyToFileW
#ELSE
 MACRO D3DXSaveMeshHierarchyToFile = D3DXSaveMeshHierarchyToFileA
#ENDIF
'//----------------------------------------------------------------------------
'// D3DXFrameDestroy:
'// -----------------
'// Destroys the subtree of frames under the root, including the root
'//
'// Parameters:
'//	pFrameRoot
'//		Pointer to the root node
'// pAlloc
'// Allocation interface used to de-allocate nodes of the frame hierarchy
'//
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DXFrameDestroy IMPORT $D3DX_DLLNAME ALIAS "D3DXFrameDestroy" (_
 BYREF pFrameRoot AS D3DXFRAME
 , BYVAL pAlloc AS IUnknown
 ) AS LONG
'//----------------------------------------------------------------------------
'// D3DXFrameAppendChild:
'// ---------------------
'// Add a child frame to a frame
'//
'// Parameters:
'//	pFrameParent
'//		Pointer to the parent node
'// pFrameChild
'// Pointer to the child node
'//
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DXFrameAppendChild IMPORT $D3DX_DLLNAME ALIAS "D3DXFrameAppendChild" (_
 BYREF pFrameParent AS D3DXFRAME
 , BYREF pFrameChild AS D3DXFRAME
 ) AS LONG
'//----------------------------------------------------------------------------
'// D3DXFrameFind:
'// --------------
'// Finds a frame with the given name. Returns NULL if no frame found.
'//
'// Parameters:
'//	pFrameRoot
'//		Pointer to the root node
'// Name
'// Name of frame to find
'//
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DXFrameFind IMPORT $D3DX_DLLNAME ALIAS "D3DXFrameFind" (_
 BYREF pFrameRoot AS D3DXFRAME
 , BYREF Name AS ASCIIZ
 ) AS DWORD ' LPD3DXFRAME
'//----------------------------------------------------------------------------
'// D3DXFrameRegisterNamedMatrices:
'// -------------------------------
'// Finds all frames that have non-null names and registers each of those frame
'// matrices to the given animation controller
'//
'// Parameters:
'//	pFrameRoot
'//		Pointer to the root node
'//	pAnimController
'//		Pointer to the animation controller where the matrices are registered
'//
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DXFrameRegisterNamedMatrices IMPORT $D3DX_DLLNAME ALIAS "D3DXFrameRegisterNamedMatrices" (_
 BYREF pFrameRoot AS D3DXFRAME
 , BYVAL pAnimController AS ID3DXAnimationController
 ) AS LONG
'//----------------------------------------------------------------------------
'// D3DXFrameNumNamedMatrices:
'// --------------------------
'// Counts number of frames in a subtree that have non-null names
'//
'// Parameters:
'//	pFrameRoot
'//		Pointer to the root node of the subtree
'// Return Value:
'//		Count of frames
'//
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DXFrameNumNamedMatrices IMPORT $D3DX_DLLNAME ALIAS "D3DXFrameNumNamedMatrices" (_
 BYREF pFrameRoot AS D3DXFRAME
 ) AS DWORD ' UINT
'//----------------------------------------------------------------------------
'// D3DXFrameCalculateBoundingSphere:
'// ---------------------------------
'// Computes the bounding sphere of all the meshes in the frame hierarchy.
'//
'// Parameters:
'//	pFrameRoot
'//		Pointer to the root node
'//	pObjectCenter
'//		Returns the center of the bounding sphere
'//	pObjectRadius
'//		Returns the radius of the bounding sphere
'//
'//----------------------------------------------------------------------------
DECLARE FUNCTION D3DXFrameCalculateBoundingSphere IMPORT $D3DX_DLLNAME ALIAS "D3DXFrameCalculateBoundingSphere" (_
 BYREF pFrameRoot AS D3DXFRAME
 , BYREF pObjectCenter AS D3DXVECTOR3
 , BYREF pObjectRadius AS SINGLE
 ) AS LONG
'//----------------------------------------------------------------------------
'// D3DXCreateKeyframedAnimationSet:
'// --------------------------------
'// This function creates a compressable keyframed animations set interface.
'//
'// Parameters:
'// pName
'// Name of the animation set
'// TicksPerSecond
'// Number of keyframe ticks that elapse per second
'// Playback
'// Playback mode of keyframe looping
'// NumAnimations
'// Number of SRT animations
'// NumCallbackKeys
'// Number of callback keys
'// pCallbackKeys
'// Array of callback keys
'// ppAnimationSet
'// Returns the animation set interface
'//
'//-----------------------------------------------------------------------------
DECLARE FUNCTION D3DXCreateKeyframedAnimationSet IMPORT $D3DX_DLLNAME ALIAS "D3DXCreateKeyframedAnimationSet" (_
 BYREF pName AS ASCIIZ
 , BYVAL TicksPerSecond AS DOUBLE
 , BYVAL Playback AS DWORD
 , BYVAL NumAnimations AS DWORD
 , BYVAL NumCallbackKeys AS DWORD
 , BYREF pCallbackKeys AS D3DXKEY_CALLBACK
 , BYREF ppAnimationSet AS ID3DXKeyframedAnimationSet
 ) AS LONG
'//----------------------------------------------------------------------------
'// D3DXCreateCompressedAnimationSet:
'// --------------------------------
'// This function creates a compressed animations set interface from
'// compressed data.
'//
'// Parameters:
'// pName
'// Name of the animation set
'// TicksPerSecond
'// Number of keyframe ticks that elapse per second
'// Playback
'// Playback mode of keyframe looping
'// pCompressedData
'// Compressed animation SRT data
'// NumCallbackKeys
'// Number of callback keys
'// pCallbackKeys
'// Array of callback keys
'// ppAnimationSet
'// Returns the animation set interface
'//
'//-----------------------------------------------------------------------------
DECLARE FUNCTION D3DXCreateCompressedAnimationSet IMPORT $D3DX_DLLNAME ALIAS "D3DXCreateCompressedAnimationSet" (_
 BYREF pName AS ASCIIZ
 , BYVAL TicksPerSecond AS DOUBLE
 , BYVAL Playback AS DWORD
 , BYVAL pCompressedData AS ID3DXBuffer
 , BYVAL NumCallbackKeys AS DWORD
 , BYREF pCallbackKeys AS D3DXKEY_CALLBACK
 , BYREF ppAnimationSet AS ID3DXCompressedAnimationSet
 ) AS LONG
'//----------------------------------------------------------------------------
'// D3DXCreateAnimationController:
'// ------------------------------
'// This function creates an animation controller object.
'//
'// Parameters:
'// MaxNumMatrices
'// Maximum number of matrices that can be animated
'// MaxNumAnimationSets
'// Maximum number of animation sets that can be played
'// MaxNumTracks
'// Maximum number of animation sets that can be blended
'// MaxNumEvents
'// Maximum number of outstanding events that can be scheduled at any given time
'// ppAnimController
'// Returns the animation controller interface
'//
'//-----------------------------------------------------------------------------
DECLARE FUNCTION D3DXCreateAnimationController IMPORT $D3DX_DLLNAME ALIAS "D3DXCreateAnimationController" (_
 BYVAL MaxNumMatrices AS DWORD
 , BYVAL MaxNumAnimationSets AS DWORD
 , BYVAL MaxNumTracks AS DWORD
 , BYVAL MaxNumEvents AS DWORD
 , BYREF ppAnimController AS ID3DXAnimationController
 ) AS LONG
#ENDIF
