05-09-2009, 02:17 AM
Using Giaken's clipping code, I'm trying to modify it a bit to work with Advocate/Matt's dynamic maps version of MS4. The X clipping works fine as:
I know the formula should be similar for the Y clipping, but I can't seem to get it to work properly. Any ideas?
Code:
' Is player's X more than max map values..?
If X + (DDSD_Sprite(Sprite).lWidth / 12) > MAX_MAPX * 32 + 32 Then
With rec
.Right = .Right - ((Map.MaxX / 2) - 24)
End With
End If
I know the formula should be similar for the Y clipping, but I can't seem to get it to work properly. Any ideas?