VB Code:
Let I = Map.Object(L, X, Y) If Not I < 0 And Not I > TileObjectCount Then Let rTile.Left = 0 Let rTile.Top = 0 Let rTile.Right = TileObjects(I).Width Let rTile.Bottom = TileObjects(I).Height Let xObject = xDest - rTile.Right \ 2 * TileWidth If xObject < 0 Then Let rTile.Left = -xObject End If Let yObject = yDest - rTile.Bottom + TileHeight If yObject < 0 Then Let rTile.Top = -yObject End If Call BufferSurface.ddSurface.BltFast(xObject, yObject, TileObjects(I).ddSurface, rTile, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End If
when i place an object i use this code to draw it. but when you scoll my map and the object rect goes offscreen it still disapears the xObject, Yobject code is what i use to try to keep it on the surface but it doesnt work HELP.




Reply With Quote