Is there anything wrong with using variables in For/Next because the code below only does 3 columns, the last next seems to skip? It should do columns 0 and 14 then 1 and 13
B4X:
Sub AddSprites
Lft=0
Rgt=14
'Add the master frames
Master.New2(AppPath & "\Psprite.png",6,15,15,6)
'Add remaining sprites, 3 colours
For i=0 To 1
For col=Lft To Rgt Step Rgt
For j=0 To 14
Pawn.New4(Master.FrameBitmaps,6,15,15,6)
'Binary data for later XOR, zero not usable so start at 1
Pawn.Data=Bin.ShiftLeft(1,j Mod 3)
Pawn.X = (col)*16+1
Pawn.Y = ((j+(i)*14) Mod 15)*16+1
'Zero frame not usable as binary so -1
Pawn.CurrentFrame=Pawn.Data-1
gw.SpriteAdd(Pawn.Value)
Next
Next
Lft=1
Rgt=13
Next
End Sub