aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorUnavailableDev <ggwildplay@gmail.com>2023-04-06 12:33:09 +0200
committerUnavailableDev <ggwildplay@gmail.com>2023-04-06 12:33:09 +0200
commit93e9426d5642dfab7a13d5a34873b296de1d9642 (patch)
treea2efebcb9917d7f4f3666a722338f50b9590e843 /scripts
parent0dd7be7230b3ccba9a930c01549d79d108d091c4 (diff)
parent5c9e951408399ebda98a2007d7cd24912ba64c49 (diff)
Merge branch 'dev' of https://github.com/heavydemon21/avans-arcade into dev
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/manifest2header.awk10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/manifest2header.awk b/scripts/manifest2header.awk
index 15cd682..b141a8b 100755
--- a/scripts/manifest2header.awk
+++ b/scripts/manifest2header.awk
@@ -1,13 +1,23 @@
#!/bin/awk -f
BEGIN {
offset = 0
+ groups = 0
+ arr = "0"
print "#pragma once"
+ print "#include <stddef.h>"
+}
+(offset > 0) {
+ arr = arr ", " offset
}
1 {
+ sub(".*/", "", $1)
print "#define HH_TM_"toupper($1)"_OFFSET "offset
print "#define HH_TM_"toupper($1)"_SIZE "$2
+ groups += 1
offset += $2
}
END {
print "#define HH_TM_SIZE "offset
+ print "#define HH_TM_GROUPS "groups
+ print "const static uint8_t hh_palette_lut[]={"arr", NULL};"
}