Opcode and unit test for sprite lookup function.