Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature] Dynamic sprite sizes!
#36
Hey well im just going through all the tutorials and imma fix them. But i've got stuck on this. anyone care to help?

its in

Public Sub BltNpc(ByVal MapNpcNum As Long)

Quote: ' Check to see if we want to stop making him attack
With MapNpc(MapNpcNum)
' Calculate X
X = .X * PIC_X + .XOffset - ((DDS_Sprite(Sprite).lWidth / 12 - 32) / 2)
' Is sprite more than 32..?
If ((DDS_Sprite(Sprite).lHeight) - 32) > 0 Then
' Create a 32 pixel offset for larger sprites
Y = MapNpc(MapNpcNum).Y * PIC_Y + MapNpc(MapNpcNum).YOffset - ((DDS_Sprite(Sprite).lHeight) - 32)
Else
' Proceed as normal
Y = MapNpc(MapNpcNum).Y * PIC_Y + MapNpc(MapNpcNum).YOffset
End If
End With

Meathod or data member not found
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)