I'll keep to enhance "dixu" with DirectX stuff. Regarding the Sprite part, I'll hope to be able to use DirectAnimation against a DirectDraw surface created with DirectX Fundation and perhaps to be then able to use the Sprite library (or also the Effect library) provided with IE4...

That's all you need to initialize DirectDraw ! This app will run in full screen mode in a 320x200 pixels mode and with 65536 colors (16 bits per pixel).dixuInit dixuInitFullScreen, Me, 320, 200, 16
Then back in the Form_Load event, write the sprite initialization code :Dim Donut As dixuSprite
The sprite is now ready !Set Donut = New dixuSprite With Donut .Surface=dixuCreateSurfaceFromBitmap(App.Path & "\donut.bmp") .Height = 64 .Width = 64 .VelocityX = 5 .VelocityY = 5 End With
Note that the created sprite is automatically registered when created. The sprite is painted by the dixuBackBufferDraw sub...While Not blnEnd dixuBackBufferDraw DoEvents ' Enables events to be handled by Windows Wend ' Clear objects and terminate dixuDone UnLoad Me
To quit the app, just press any key... You should finally ends with the followin code :blnEnd=True
' Bouncing Donut demo : demonstrates the use of dixu.bas and sprite.cls Option Explicit Dim blnEnd As Boolean Dim Donut As dixuSprite Private Sub Form_Load() ' Initialize DirectX dixuInit dixuInitFullScreen, Me, 320, 200, 16 ' Initialize a sprite Set Donut = New dixuSprite With Donut ' Loads the sprite bitmap .Surface = dixuCreateSurfaceFromBitmap(App.Path & "\donut.bmp") .Height = 64 ' Height of a sprite image .Width = 64 ' Width of a sprite image .VelocityX = 5 ' Velocity in pixels/s along the X axis .VelocityY = 5 ' Velocity in pixels/s along the Y axis End With While Not blnEnd dixuBackBufferDraw ' Clear the back buffer surface DoEvents Wend Set Donut = Nothing ' Clear the sprite dixuDone ' Clear DirectX object UnLoad Me End Sub Private Sub Form_Keypress blnEnd = True End Sub

Regarding dixu the only difference is the use of the dixuInit3DDevice flag ! You have also to initialize the 3D scene before beginning the rendering loop. This initialization code uses the top level Direct3D objects exposed by dixu such as dixuScene or dixuCamera. It is just regular DirectX code. Check the source code and the DirectX docs for more explanations... You may also want to check the Collision detection using Pick that explains some implementation details regarding dixu functions (such as collision detection for camera movements)...Private Sub Form_Load() dixuInit dixuInitFullScreen Or dixuInit3DDevice, Me, 320, 200, 16 SceneInit While Not dixuAppEnd dixuBackBufferDraw DoEvents Wend dixuDone Unload Me End Sub Private Sub Form_KeyPress() blnEnd = TrueEnd Sub End Sub Private Sub Form_KeyPress dixuCameraMove KeyCode End Sub
If you define this constant to anything but 0, all parts relevant to the dixuSprite class in the dixu "core" library (needed to register and handle automatically sprites, see dixuFrameDraw) will not be compiled. This allow to leave the sprites relevant code in Direct3D Retained Mode apps. This constant must be declared in needed in the Project Properties within the Make tab. The syntax is :DIXU_NOSPRITE constant
A DirectDrawSurface2 object used as a back buffer for DirectDraw apps. You should use this object when you want to draw custom drawings to the surface. For example you could use GetDC or Lock to gain direct access to the surface and perform custom operation...dixuBackBuffer object
This sub performs automatically the following operations :dixuBackBufferDraw
If dixuBackBufferClear has been called prior to the last dixuBackBufferDraw, the first step (clearing the dixuBackBuffer object) is not performed. This allow to add easily your own rendering code in the rendering loop :
dixuBackBufferClear ' Your own rendering code... dixuBackBufferDraw ' As dixuBackBufferClear has been called the back buffer is not cleared...
Public Sub dixuCameraMove(ByVal KeyAscii As Long)
A DirectDrawClipper object used to manage windowed application. In most cases, you shoudn't have to use this object.dixuClipper object
Returns a new DirectDrawSurface2 object initialized with the specified bitmap file.dixuCreateSurfaceFromBitmap(FileName) function
A Direct3DRM object at top of the Direct3D Retained Mode hierarchy. This objects allows to create other objects and to control overall characteristics of 3D rendering.dixuD3DRM object
A Direct3DRMDevice used for 3D rendering. In most cases you shouldn't have to use this object.dixuD3DRMDevice
A Direct3DRMViewport object used for 3D rendering. In most cases you shouldn't have to use this object.dixuD3DRMViewport
Clears all DirectX objects and restore display mode.dixuDone
This sub initializes all the DirectX objects for the specified display mode.dixuInit Flags, frm, Width, Height, BitsPerPixel
A Direct3DRMFrame object used as a scenedixuScene
The height in pixels of each sprite image.Height
A DirectDrawSurface2 object used as the source for the various sprite images. You can initialize this surface by using the dixuCreateSurfaceFromBitmap function. As this surface is exposed you could also use the regular DirectX methods (for example to set the color keys to achieve transparent blit).Surface
VelocityX is the velocity of the sprite along the X axis (in pixels/s).VelocityX
VelocityY is the velocity of the sprite along the Y axis (in pixels/s).VelocityY
The width in pixels of each sprite image.Width