crocparty/game/BUILD

36 lines
950 B
Python
Raw Normal View History

2024-02-27 01:04:37 +00:00
load("@bazel_skylib//rules:run_binary.bzl", "run_binary")
2024-02-29 00:10:09 +00:00
load("helpers.bzl", "add_sprites")
2024-02-27 01:04:37 +00:00
2024-02-25 21:49:21 +00:00
cc_library(
name = "game",
2024-02-27 23:57:37 +00:00
srcs = glob(["*.c"]) + [
2024-02-29 00:10:09 +00:00
"art/game_collectibles.c",
2024-02-29 20:08:50 +00:00
"art/game_hud.c",
2024-02-29 03:42:03 +00:00
"art/game_npcs.c",
2024-02-27 23:57:37 +00:00
"art/game_player.c",
"art/game_tiles.c",
"map/game_map.c",
2024-02-28 21:14:48 +00:00
"map/game_map_entities.c",
2024-02-27 23:57:37 +00:00
],
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-29 00:10:09 +00:00
add_sprites(name="game_collectibles", n=24)
2024-02-29 20:08:50 +00:00
add_sprites(name="game_hud", n=2)
2024-02-29 00:10:09 +00:00
add_sprites(name="game_player", n=96)
2024-02-29 03:05:52 +00:00
add_sprites(name="game_npcs", n=64)
2024-02-29 00:10:09 +00:00
add_sprites(name="game_tiles", n=120)
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
)