Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Submap(mapping As Byte(), x As Integer, y As Integer, sizeWidth As Integer, sizeHeight As Integer, imageSizeWidth As Integer, imageSizeHeight As Integer) As Byte()
- Dim mapSplit As New List(Of Byte)
- For y1 = y / 4 * (imageSizeWidth / 8) To y / 4 * (imageSizeWidth / 8) + (sizeHeight / 8) * (imageSizeWidth / 8) * 2 - 1 Step (imageSizeWidth / 8) * 2
- For x1 = x / 8 To x / 8 + sizeWidth / 8 - 1
- mapSplit.Add(mapping(y1 + x1 * 2))
- mapSplit.Add(mapping(y1 + x1 * 2 + 1))
- Next
- Next
- Return mapSplit.ToArray
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement