+h += "enum locations_refs {\n"
+c += "location_t locations[] = {\n"
+for key, data in dungeon["locations"]:
+ h += " {},\n".format(key)
+
+ try:
+ short = quotewrap(c_escape(data["description"]["short"]))
+ except AttributeError:
+ short = "NULL"
+ try:
+ long = quotewrap(c_escape(data["description"]["long"]))
+ except AttributeError:
+ long = "NULL"
+
+ c += """ {{
+ .description = {{
+ .small = {},
+ .big = {},
+ }},
+ }},
+""".format(short, long)
+
+c += "};\n\n"
+h += "};\n\n"
+