07-03-2007, 08:45 AM
I get an invalid procedure call or argument error.
Here is my code in my init sub:
I added the reference, and the file extension is correct (That wouldn't produce this error though anyway).
Code:
Set DD_SpriteSurf = DD.CreateSurface(DDSD_Sprite)Here is my code in my init sub:
Code:
' Init sprite ddsd type and load the bitmap
Call BMUtil.LoadByteData(FileName & "sprites" & GFX_EXT)
Call BMUtil.DecryptByteData("47dn45")
Call BMUtil.DecompressByteData
With DDSD_Sprite
.lFlags = DDSD_CAPS Or DDSD_HEIGHT Or DDSD_WIDTH
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_VIDEOMEMORY
.lWidth = BMUtil.ImageWidth
.lHeight = BMUtil.ImageHeight
End With
Set DD_SpriteSurf = DD.CreateSurface(DDSD_Sprite)
DC = DD_SpriteSurf.GetDC
Call BMUtil.Blt(DC)
Call DD_SpriteSurf.ReleaseDC(DC)
DD_SpriteSurf.SetColorKey DDCKEY_SRCBLT, Key
' Init tiles ddsd type and load the bitmap
Call BMUtil.LoadByteData(FileName & "tiles" & GFX_EXT)
Call BMUtil.DecryptByteData("47dn45")
Call BMUtil.DecompressByteData
With DDSD_Tile
.lFlags = DDSD_CAPS Or DDSD_HEIGHT Or DDSD_WIDTH
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_VIDEOMEMORY
.lWidth = BMUtil.ImageWidth
.lHeight = BMUtil.ImageHeight
End With
Set DD_TileSurf = DD.CreateSurface(DDSD_Tile)
DC = DD_TileSurf.GetDC
Call BMUtil.Blt(DC)
Call DD_TileSurf.ReleaseDC(DC)
DD_TileSurf.SetColorKey DDCKEY_SRCBLT, Key
' Init item ddsd type and load the bitmap
Call BMUtil.LoadByteData(FileName & "items" & GFX_EXT)
Call BMUtil.DecryptByteData("47dn45")
Call BMUtil.DecompressByteData
With DDSD_Item
.lFlags = DDSD_CAPS Or DDSD_HEIGHT Or DDSD_WIDTH
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_VIDEOMEMORY
.lWidth = BMUtil.ImageWidth
.lHeight = BMUtil.ImageHeight
End With
Set DD_ItemSurf = DD.CreateSurface(DDSD_Item)
DC = DD_ItemSurf.GetDC
Call BMUtil.Blt(DC)
Call DD_ItemSurf.ReleaseDC(DC)
DD_ItemSurf.SetColorKey DDCKEY_SRCBLT, KeyI added the reference, and the file extension is correct (That wouldn't produce this error though anyway).

