via N = column + row*16, updating the current SPRITE values as Y = N div 16, and X = N - Y*16.
Perhaps, it's possible via ASM keywords, yet except a "control" god-object, I found no simple way to use subs (extracts of similar/identical code) for different sprites, so copypasting/duplication is a must, alas.
Maybe Jonathan would update the Speccy AGD version too, and for now I can't help wondering whether the PC AGD version is more flexible in terms of re-usability
Post by Jonathan Cauldwell on Mar 3, 2019 16:35:04 GMT
Subroutines have been suggested before so may be added to MPAGD at some point.
MPAGD does have more global variables, a full set A to Z minus X and Y of course. It also has extra sprite variables. If you still need to multiply or divide by 16 in the way you described you'll find it far more efficient than AGD 4.7. The old version ALWAYS called the multiplication or division routines, whereas the compiler in the PC version will see that you're multiplying or dividing by 16 and convert that into 4 shifts left or right instead. Much, much faster.