load("@bazel_skylib//rules:run_binary.bzl", "run_binary")

def add_sprites(name, n):
    run_binary(
        name = name,
        args = [
            name,
            "{}".format(n),  # n sprites
            "0",  # key color
            "$(location :art/{}.png)".format(name),
            "$(location :art/{}.c)".format(name)
        ],
        srcs = [":art/{}.png".format(name)],
        outs = [":art/{}.c".format(name)],
        tool = "//pytools:spritesheet",
    )