c_name = "newdb.c"
h_template = """/* Generated from adventure.yaml - do not hand-hack! */
+#ifndef NEWDB_H
+#define NEWDB_H
#include <stdio.h>
extern const size_t CLSSES;
extern const int maximum_deaths;
extern const int turn_threshold_count;
+#define HINT_COUNT {}
enum arbitrary_messages_refs {{
{}
{}
}};
-/* end */
+#endif /* end NEWDB_H */
"""
c_template = """/* Generated from adventure.yaml - do not hand-hack! */
db = yaml.load(f)
h = h_template.format(
+ len(db["hints"]),
get_refs(db["arbitrary_messages"]),
get_refs(db["locations"]),
get_refs(db["object_descriptions"]),