X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=newdungeon.py;h=e5169219404fe06992ca82ff0e4fa225e01d1178;hp=d02e8c3aeb472e227e32af496a1e43d8efd41381;hb=2fac8d1aefb3526618ba0f1e7d25c7c7c81dddf4;hpb=b626371b6cd3e338b7476fa4629c7bceec727cc1 diff --git a/newdungeon.py b/newdungeon.py index d02e8c3..e516921 100755 --- a/newdungeon.py +++ b/newdungeon.py @@ -51,7 +51,7 @@ typedef struct {{ const char** longs; const char** sounds; const char** texts; -}} object_description_t; +}} object_t; typedef struct {{ const char* small; @@ -95,7 +95,7 @@ typedef struct {{ }} vocabulary_t; extern const location_t locations[]; -extern const object_description_t object_descriptions[]; +extern const object_t objects[]; extern const char* arbitrary_messages[]; extern const class_t classes[]; extern const turn_threshold_t turn_thresholds[]; @@ -112,6 +112,7 @@ extern const long actspk[]; #define NDEATHS {} #define NTHRESHOLDS {} #define NVERBS {} +#define NVOCAB {} enum arbitrary_messages_refs {{ {} @@ -121,7 +122,7 @@ enum locations_refs {{ {} }}; -enum object_descriptions_refs {{ +enum object_refs {{ {} }}; @@ -152,7 +153,7 @@ const location_t locations[] = {{ {} }}; -const object_description_t object_descriptions[] = {{ +const object_t objects[] = {{ {} }}; @@ -258,7 +259,7 @@ def get_locations(loc): loc_str = loc_str[:-1] # trim trailing newline return loc_str -def get_object_descriptions(obj): +def get_objects(obj): template = """ {{ // {} .inventory = {}, .plac = {}, @@ -429,7 +430,7 @@ if __name__ == "__main__": get_class_messages(db["classes"]), get_turn_thresholds(db["turn_thresholds"]), get_locations(db["locations"]), - get_object_descriptions(db["object_descriptions"]), + get_objects(db["objects"]), get_obituaries(db["obituaries"]), get_hints(db["hints"], db["arbitrary_messages"]), get_condbits(db["locations"]), @@ -439,15 +440,16 @@ if __name__ == "__main__": h = h_template.format( len(db["locations"])-1, - len(db["object_descriptions"])-1, + len(db["objects"])-1, len(db["hints"]), len(db["classes"]), len(db["obituaries"]), len(db["turn_thresholds"]), len(db["actspk"]), + len(db["vocabulary"]), get_refs(db["arbitrary_messages"]), get_refs(db["locations"]), - get_refs(db["object_descriptions"]), + get_refs(db["objects"]), statedefines, )