Code: Select all
Restore elfRun
Read.l fra
;Debug fra
For Frames = 1 To fra
For coordinates = 1 To 4
Read.l frameCoords
Debug frameCoords
Next
;If Frames = fra ;<--- these four lines make it loop
;Restore elfRun
;Frames = 1
;EndIf
Next
Debug " "
Restore elfRunF5 ;<--- here we just capture Frame 5 coordinates
For coordinates = 1 To 4
Read.l frameCoords
Debug frameCoords
Next
End
DataSection
;SpriteSheet0: IncludeBinary "/Users/jbaker/Desktop/elf_run.png" ;there's an option to change the sprite # in Sprite Monkey (SpriteSheet0)
elfRun: ;image name altered and minus the extension
Data.l 15 ;frames or the number of times to call Read.l without going into another label
elfRunF1:
Data.l 0, 0, 128, 128 ;frame 1 coordinates, x, y, width, height
elfRunF2:
Data.l 128, 0, 128, 128
elfRunF3:
Data.l 256, 0, 128, 128
elfRunF4:
Data.l 384, 0, 128, 128
elfRunF5:
Data.l 0, 128, 128, 128
elfRunF6:
Data.l 128, 128, 128, 128
elfRunF7:
Data.l 256, 128, 128, 128
elfRunF8:
Data.l 384, 128, 128, 128
elfRunF9:
Data.l 0, 256, 128, 128
elfRunF10:
Data.l 128, 256, 128, 128
elfRunF11:
Data.l 256, 256, 128, 128
elfRunF12:
Data.l 384, 256, 128, 128
elfRunF13:
Data.l 0, 384, 128, 128
elfRunF14:
Data.l 128, 384, 128, 128
elfRunF15:
Data.l 256, 384, 128, 128
EndDataSection

