*** This script rotates selected sprites by any angle around board X-axis

// Parameter list begins
mov r99 2855 // Angle to rotate in internal units (65536 units per turn)
// Parameter list ends
~~~ Default parameters:
~~~ mov r99 8192 // Angle to rotate in internal units (65536 units per turn)
sin r03 r99
cos r04 r99
for each selected sprite r00
  getsprite r00 y r01
  getsprite r00 z r02
  div r02 -16

  mov r05 r01
  mul r05 r04
  div r05 65536
  mov r06 r02
  mul r06 r03
  div r06 65536
  add r05 r06 // Y

  mov r06 r01
  mul r06 r03
  div r06 -65536
  mov r01 r02
  mul r01 r04
  div r01 65536
  add r06 r01 // Z

  mul r06 16
  setsprite r00 y r05
  setsprite r00 z r06
continue