Private Declare Function GetTickCount Lib "kernel32" () As Long
'Billlboard stuff
Public BE_BILLBOARD_FACE As D3DVECTOR
Public BE_BILLBOARD_POSX As Single
Public BE_BILLBOARD_POSY As Single
Public BE_BILLBOARD_POSZ As Single
Private BBSize As Single
Private CurrentFrame As Integer
Private TotalFrames As Integer
'Billboard frames
Private BBinterval As Integer
Private LastCheck As Long
'Billboarding angles
Private BBphi As Single
Private BBtheta As Single
'billboard texture
Private TexBillboard() As Direct3DTexture8
Public Function BE_BILLBOARD_INIT(TexturePath() As String, Interval As Integer, Position As D3DVECTOR, Width As Long, Height As Long, Depth As CONST_D3DFORMAT, Size As Integer) As Boolean
'initialize billboard
On Error GoTo Err
Dim i As Integer
'load all of the textures
For i = LBound(TexturePath) To UBound(TexturePath)
'resize variable
ReDim Preserve TexBillboard(0 To i) As Direct3DTexture8
'load texture
If D3D.CheckDeviceFormat(0, D3DDEVTYPE_HAL, Depth, 0, D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8) = D3D_OK Then