+h_template = """/* Generated from adventure.yaml - do not hand-hack! */
+#ifndef NEWDB_H
+#define NEWDB_H
+
+#include <stdio.h>
+
+typedef struct {{
+ const char* inventory;
+ const char** longs;
+}} object_description_t;
+
+typedef struct {{
+ const char* small;
+ const char* big;
+}} descriptions_t;
+
+typedef struct {{
+ descriptions_t description;
+}} location_t;
+
+typedef struct {{
+ const char* query;
+ const char* yes_response;
+}} obituary_t;
+
+typedef struct {{
+ const int threshold;
+ const int point_loss;
+ const char* message;
+}} turn_threshold_t;
+
+typedef struct {{
+ const int threshold;
+ const char* message;
+}} class_t;
+
+typedef struct {{
+ const int number;
+ const int turns;
+ const int penalty;
+ const char* question;
+ const char* hint;
+}} hint_t;
+
+extern location_t locations[];
+extern object_description_t object_descriptions[];
+extern const char* arbitrary_messages[];
+extern const class_t classes[];
+extern turn_threshold_t turn_thresholds[];
+extern obituary_t obituaries[];
+extern hint_t hints[];
+
+extern const size_t CLSSES;
+extern const int maximum_deaths;
+extern const int turn_threshold_count;
+#define HINT_COUNT {}
+
+enum arbitrary_messages_refs {{
+{}
+}};
+
+enum locations_refs {{
+{}
+}};
+
+enum object_descriptions_refs {{
+{}
+}};
+
+#endif /* end NEWDB_H */
+"""
+
+c_template = """/* Generated from adventure.yaml - do not hand-hack! */
+
+#include "{}"
+
+const char* arbitrary_messages[] = {{
+{}
+}};
+
+const class_t classes[] = {{
+{}
+}};
+
+turn_threshold_t turn_thresholds[] = {{
+{}
+}};
+
+location_t locations[] = {{
+{}
+}};
+
+object_description_t object_descriptions[] = {{
+{}
+}};
+
+obituary_t obituaries[] = {{
+{}
+}};
+
+hint_t hints[] = {{
+{}
+}};
+
+const size_t CLSSES = {};
+const int maximum_deaths = {};
+const int turn_threshold_count = {};
+
+/* end */
+"""
+
+def make_c_string(string):
+ """Render a Python string into C string literal format."""
+ if string == None:
+ return "NULL"