Okay... Sometimes you should just follow suggestions before assuming they don't work..
Here's the deal. Dave told you to switch to system memory.. Look at this:
Code:
Public Sub InitSurfaces()
'****************************************************************
'* WHEN WHO WHAT
'* ---- --- ----
'* 07/12/2005 Shannara Optimized function, added gfx constants.
'****************************************************************
Dim Key As DDCOLORKEY
Dim FileName As String
' Set path prefix
FileName = App.Path & GFX_PATH
' Check for files existing
If FileExist(FileName & "sprites" & GFX_EXT, True) = False Or FileExist(FileName & "tiles" & GFX_EXT, True) = False Or FileExist(FileName & "items" & GFX_EXT, True) = False Then
Call MsgBox("You dont have the graphics files in the " & FileName & GFX_PATH & " directory!", vbOKOnly, GAME_NAME)
Call GameDestroy
End If
' Set the key for masks
With Key
.low = 0
.high = 0
End With
' Initialize back buffer
With DDSD_BackBuffer
.lFlags = DDSD_CAPS Or DDSD_HEIGHT Or DDSD_WIDTH
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_VIDEOMEMORY
.lWidth = (MAX_MAPX + 1) * PIC_X
.lHeight = (MAX_MAPY + 1) * PIC_Y
End With
Set DD_BackBuffer = DD.CreateSurface(DDSD_BackBuffer)
' Init sprite ddsd type and load the bitmap
With DDSD_Sprite
.lFlags = DDSD_CAPS
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_VIDEOMEMORY
End With
Set DD_SpriteSurf = DD.CreateSurfaceFromFile(FileName & "sprites" & GFX_EXT, DDSD_Sprite)
DD_SpriteSurf.SetColorKey DDCKEY_SRCBLT, Key
' Init tiles ddsd type and load the bitmap
With DDSD_Tile
.lFlags = DDSD_CAPS
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_VIDEOMEMORY
End With
Set DD_TileSurf = DD.CreateSurfaceFromFile(FileName & "tiles" & GFX_EXT, DDSD_Tile)
DD_TileSurf.SetColorKey DDCKEY_SRCBLT, Key
' Init items ddsd type and load the bitmap
With DDSD_Item
.lFlags = DDSD_CAPS
.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_VIDEOMEMORY
End With
Set DD_ItemSurf = DD.CreateSurfaceFromFile(FileName & "items" & GFX_EXT, DDSD_Item)
DD_ItemSurf.SetColorKey DDCKEY_SRCBLT, Key
End Sub
I was unable to get your source to load properly due to a missing file reference for some INI management system.. But...
See all of those DDSCAPS_VIDEOMEMORY entries? That's telling directx to load the graphics into video memory rather than RAM.. Now.. I have 128MB on my video card, and I tried to load all of your graphics into a vanilla MSE 1. I got the same result you did. (After changing the height of picbackselect to 1000 * PIC_Y, of course..) Blue tiles at the bottom of the tile set.
I switched VIDEOMEMORY (just on the tile's surface) to SYSTEMMEMORY (Don't forget the DDSCAPS_) and it worked like a champ.
Thanks for wasting our time... Some times you should just try the advice you're given.. Even if you are having a tough time. (Don't take your anger with something else out on other people..)
Sorry it took me so long to get this result to you.. I have children and a job.