crocparty/game/BUILD

53 lines
1.2 KiB
Python
Raw Normal View History

2024-02-27 01:04:37 +00:00
load("@bazel_skylib//rules:run_binary.bzl", "run_binary")
2024-02-25 21:49:21 +00:00
cc_library(
name = "game",
2024-02-27 23:57:37 +00:00
srcs = glob(["*.c"]) + [
"art/game_player.c",
"art/game_tiles.c",
"map/game_map.c",
],
hdrs = glob(["*.h", "art/*.h", "map/*.h"]),
2024-02-26 00:40:33 +00:00
visibility = ["//visibility:public"],
deps = ["//device:device", "//sys:sys"]
2024-02-27 01:04:37 +00:00
)
2024-02-27 23:57:37 +00:00
run_binary(
name = "game_player",
args = [
"game_player",
"64", # n sprites
"0", # key color
"$(location :art/game_player.png)",
"$(location :art/game_player.c)"
],
srcs = [":art/game_player.png"],
outs = [":art/game_player.c"],
tool = "//pytools:spritesheet",
)
2024-02-27 01:04:37 +00:00
run_binary(
2024-02-27 23:09:51 +00:00
name = "game_tiles",
2024-02-27 01:04:37 +00:00
args = [
2024-02-27 23:09:51 +00:00
"game_tiles",
"120", # n sprites
2024-02-27 01:04:37 +00:00
"0", # key color
2024-02-27 23:09:51 +00:00
"$(location :art/game_tiles.png)",
"$(location :art/game_tiles.c)"
2024-02-27 01:04:37 +00:00
],
2024-02-27 23:09:51 +00:00
srcs = [":art/game_tiles.png"],
outs = [":art/game_tiles.c"],
2024-02-27 01:04:37 +00:00
tool = "//pytools:spritesheet",
2024-02-27 03:51:26 +00:00
)
run_binary(
name = "game_map",
args = [
"game_map",
2024-02-27 23:09:51 +00:00
"$(location :map/game_map.ldtk)",
2024-02-27 03:51:26 +00:00
"$(location :map/game_map.c)",
],
2024-02-27 23:09:51 +00:00
srcs = [":map/game_map.ldtk"],
2024-02-27 03:51:26 +00:00
outs = [":map/game_map.c"],
tool = "//pytools:mapdata"
2024-02-26 00:40:33 +00:00
)