Import LDTK maps

This commit is contained in:
2024-02-26 19:51:26 -08:00
parent f6d942c614
commit 055b3dd7b1
7 changed files with 2282 additions and 4 deletions

View File

@ -2,8 +2,8 @@ load("@bazel_skylib//rules:run_binary.bzl", "run_binary")
cc_library(
name = "game",
srcs = glob(["*.c"]) + [":art/game_demo_sprites.c"],
hdrs = glob(["*.h"]) + [":art/game_demo_sprites.h"],
srcs = glob(["*.c"]) + [":art/game_demo_sprites.c", ":map/game_map.c"],
hdrs = glob(["*.h"]) + [":art/game_demo_sprites.h", ":map/game_map.h"],
visibility = ["//visibility:public"],
deps = ["//device:device", "//sys:sys"]
)
@ -20,4 +20,16 @@ run_binary(
srcs = [":art/game_demo_sprites.png"],
outs = [":art/game_demo_sprites.c"],
tool = "//pytools:spritesheet",
)
run_binary(
name = "game_map",
args = [
"game_map",
"$(location :map/crocparty.ldtk)",
"$(location :map/game_map.c)",
],
srcs = [":map/crocparty.ldtk"],
outs = [":map/game_map.c"],
tool = "//pytools:mapdata"
)

2155
game/map/crocparty.ldtk Normal file

File diff suppressed because one or more lines are too long

5
game/map/game_map.h Normal file
View File

@ -0,0 +1,5 @@
#ifndef CROCPARTY_GAME_MAP_H
#define CROCPARTY_GAME_MAP_H
#endif