// effect routine

last_letter = numletters - 1;
if (last_letter){
 if (sub_order < 2){
  letter_perc = letter / last_letter;
  if (sub_order == 1) letter_perc = 1 - letter_perc;
 } else if (sub_order < 4){
  my_letter = 2 * letter;
  if (my_letter >= numletters) my_letter = 2 * numletters - my_letter - 2;
  letter_perc = my_letter / last_letter;
  if (sub_order == 3) letter_perc = 1 - letter_perc;
 } else {
  letter_perc = frame / lastsubframe;
 }
 perc = Math.min(1, Math.max(0, 2 * frame / lastsubframe - letter_perc));
} else perc = frame / lastsubframe;
if (reverse_sub_effect == true) perc = 1 - perc;
if (use_alpha) alpha = 100 * perc;
if (use_scaling) zed = 2 else zed = 1;
if (numletters == 1) letPerc = 1 else letPerc = letter / last_letter
inc = letPerc * 180;
angle = inc * 22 / 7 / 180;
tx = __x / 2;
tz = max_delta_z * zed * (1 - perc) * (1 - perc);
xrotate = -360 * x_rotations * (1-perc) * (1-perc);
zscale = 7 - (Math.sin(angle) * 5);
yscale = 4 - (Math.sin(angle) * 3);


// RetroScope by Alun Cross.
