@TerryRitchie I don't know if you picked a good sheet to illustrate problem?
I had no problem blocking it out from the pixel dimensions given in file properties:
I had no problem blocking it out from the pixel dimensions given in file properties:
Code: (Select All)
' Terry's sprite sheet demon.png is 781 X 360
' there are 11 images across 781 / 11 = 71 exactly
' thereare 6 images down 360 / 6 = 60
' Hence each image should be 71 X 60
' Let's check that!
Screen _NewImage(800, 600, 32)
_ScreenMove 240, 70
D& = _LoadImage("demon.png", 32)
_PutImage (0, 0), D&, 0 ' OK (finally?)
'For x = 0 To 780 Step 71
' Line (x, 0)-(x, 359),
'Next
'For y = 0 To 359 Step 60
' Line (0, y)-(780, y)
'Next
' looks good
Sleep
Dim i&(0 To 57)
For j = 0 To 57
col = j Mod 11
row = Int(j / 11)
i&(j) = _NewImage(71, 60, 32)
_PutImage , 0, i&(j), (col * 71, row * 60)-Step(70, 59)
Next
'Cls
For j = 0 To 57
Cls
_PutImage (0, 0), i&(j), 0
_PrintString (22, 70), Str$(j)
Sleep
Next
b = b + ...