Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Verrigans Image System
#11
I get an invalid procedure call or argument error.

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, Key

I added the reference, and the file extension is correct (That wouldn't produce this error though anyway).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)