*** This script is useful for matching the relative textures of structures such as revolved or extruded shapes, arch- and sphere-type primitives.

// Parameter list begins
mov r94 128 // Number of transitions
mov r95 1 // Transitive wall position relative to the first wall
mov r96 0 // Floor X panning increment
mov r97 -64 // Floor Y panning increment
mov r98 0 // Ceiling X panning increment
mov r99 -96 // Ceiling Y panning increment
// Parameter list ends
~~~ Default parameters:
~~~ mov r94 128 // Number of transitions
~~~ mov r95 1 // Transitive wall position relative to the first wall
~~~ mov r96 0 // Floor X panning increment
~~~ mov r97 -64 // Floor Y panning increment
~~~ mov r98 0 // Ceiling X panning increment
~~~ mov r99 -96 // Ceiling Y panning increment
getfirstselectedsector r00
while r94 > 0
  dec r94
  getsector r00 floorxpanning r03  add r03 r96
  getsector r00 floorypanning r04  add r04 r97
  getsector r00 ceilingxpanning r05  add r05 r98
  getsector r00 ceilingypanning r06  add r06 r99
  getsector r00 wallptr r01
  add r01 r95
  getwall r01 nextsector r02
  if r02 > -1
    mov r00 r02
    setsector r00 floorxpanning r03
    setsector r00 floorypanning r04
    setsector r00 ceilingxpanning r05
    setsector r00 ceilingypanning r06
  else
    mov r94 0
  endif
continue