Scaling sprite groups

Horizontal shrinking parameters for sprite groups must be distributed by software to get smooth scaling steps.

If the same parameter is copied to all sprites in a group, the final size will be a multiple of the sprite count. For example, setting all sprites of a group of 5 to a 4-bit value of 13 will give a block 5*(13+1) = 70 pixels wide.

If the parameters are distributed based on a 8-bit value, the steps become smaller. For example, setting a group of 5 sprites to a shrinking value of 183 (scale 72%) will give the following 4-bit values: 10,11,11,10,11, making the group 11+12+12+11+12 = 58 pixels wide, which is 72% of the max width (5*16 = 80 pixels).

Code to distribute horizontal shrinking in sprite groups: