nactors* { ldy sorted_indices+i ;3 lax actorY,y ;4 sta sort_table,y ;5 lda bucket,x ;4 sta bucketnext,y ;5 tya ;2 sta bucket,x ;5 total 28*na, assuming last frame's sort indices are in zp }

nactors * { ldy sort_table+i ; 3 ldx bucket,y ; 4 lda bucket_next,x ; 4 sta bucket,y ; 5 sta sort_indices+i ; 3 total 19*na }