It's basically the same function copy-pasted 4 times, differing only in the backdrop image coordinates and some other inconsequential details. Part of P0189, funded by Arandui and Lmocinemod.