Code: Select all
'rect information | dest position | texture
0,0,342,224|50,50|media/stonepath.bmp
Code: Select all
Public Class mapreader
Public arpos(1) As String
Public arcoords(3) As String
Public Mystring(2) As String
Public Sub readmap(ByVal path As String)
Dim mapread As New StreamReader(path)
Dim line As String
'while not EOF
While mapread.Peek <> -1
'read each line into a string
line = mapread.ReadLine()
Mystring = Strings.Split(line, "|", -1) 'this would just be the string you get from your above code...
arcoords = Strings.Split(Mystring(0), ",")
arpos = Strings.Split(Mystring(1), ",")
End While
End Sub
End Class
Code: Select all
device.VideoDriver.Draw2DImage(images, New Position2D(read.arpos(0), read.arpos(0)), _
New Rect(read.arcoords(0), read.arcoords(1), read.arcoords(2), _
read.arcoords(3)), New Color(255, 255, 255, 255), True)