home · contact · privacy
Restructured chained objects on map via new ChainMapObject struct, allowing for great...
[plomrogue] / src / objects_on_map.h
index ccb9bcd0f90389f948cfb5dc2201d738c6915a64..e9c7c65c6a11a7327b76d349a81ec1d021637d72 100644 (file)
@@ -9,15 +9,16 @@ struct Map;
 struct Player {
   struct yx_uint16 pos; };
 
-struct Item {
-  struct Item * next;
+struct ChainMapObject {
+  void * next;
   unsigned char name;
   struct yx_uint16 pos; };
 
+struct Item {
+  struct ChainMapObject cmo; };
+
 struct Monster {
-  struct Monster * next;
-  unsigned char name;
-  struct yx_uint16 pos;
+  struct ChainMapObject cmo;
   unsigned char hitpoints; };
 
 extern char is_passable (struct Map *, struct yx_uint16);