blob: b141a8ba053e2ec26d8b6ce3bd38bb4f2afe7829 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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};"
}
|