*** Select sprites with picnums as requisite tiles and hitags as tiles to replace.

mov r02 -1
for each selected sprite r02
  getsprite r02 hitag r03
  getsprite r02 picnum r04
  mov r00 -1
  for each nonignored sector r00
    getsector r00 floorpicnum r01
    if r01 == r03  setsector r00 floorpicnum r04  endif
    getsector r00 ceilingpicnum r01
    if r01 == r03  setsector r00 ceilingpicnum r04  endif
  continue
  mov r00 -1
  for each nonignored wall r00
    getwall r00 picnum r01
    if r01 == r03  setwall r00 picnum r04  endif
    getwall r00 overpicnum r01
    if r01 == r03  setwall r00 overpicnum r04  endif
  continue
  mov r00 -1
  for each nonignored sprite r00
    getselsprite r00 r01
    if r01 == 0
      getsprite r00 picnum r01
      if r01 == r03  setsprite r00 picnum r04  endif
    endif
  continue
continue