aboutsummaryrefslogtreecommitdiff
path: root/src/world.h
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2016-04-16 21:16:44 -0400
committerFranklin Wei <git@fwei.tk>2016-04-16 21:16:44 -0400
commita305a931726bc13c604afca1209a656a8fbedc46 (patch)
treee8ce29b2354aca21dae1bb1f0b1bc227b34adf17 /src/world.h
parentcfe28eb7eda17e4a604749fe2f027153a2ac5b6e (diff)
downloadnetcosm-a305a931726bc13c604afca1209a656a8fbedc46.zip
netcosm-a305a931726bc13c604afca1209a656a8fbedc46.tar.gz
netcosm-a305a931726bc13c604afca1209a656a8fbedc46.tar.bz2
netcosm-a305a931726bc13c604afca1209a656a8fbedc46.tar.xz
allow for modular world loading
Diffstat (limited to 'src/world.h')
-rw-r--r--src/world.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/world.h b/src/world.h
index 50f9769..5dcd85d 100644
--- a/src/world.h
+++ b/src/world.h
@@ -26,19 +26,23 @@
/* the world module MUST define all of the following: */
+#ifndef _WORLD_MODULE_
+/* note that these are now dynamically loaded */
+
/* verb classes */
-extern const struct verb_class_t netcosm_verb_classes[];
-extern const size_t netcosm_verb_classes_sz;
+extern const struct verb_class_t *netcosm_verb_classes;
+extern size_t netcosm_verb_classes_sz;
/* object classes */
-extern const struct obj_class_t netcosm_obj_classes[];
-extern const size_t netcosm_obj_classes_sz;
+extern const struct obj_class_t *netcosm_obj_classes;
+extern size_t netcosm_obj_classes_sz;
/* rooms */
-extern const struct roomdata_t netcosm_world[];
-extern const size_t netcosm_world_sz;
+extern const struct roomdata_t *netcosm_world;
+extern size_t netcosm_world_sz;
extern const char *netcosm_world_name;
+#endif
/*** loads the world into RAM for the first time, resets the game state ***/
void world_init(const struct roomdata_t *data, size_t sz, const char *name);