X-Git-Url: https://plomlompom.com/repos/index.html?a=blobdiff_plain;f=src%2Fobjects_on_map.h;h=0d56c018e28c9b0ee24b13754a2cf2ac2d3de316;hb=0e8033daabeddfea46bbb756280292df84cd61af;hp=ccb9bcd0f90389f948cfb5dc2201d738c6915a64;hpb=b4bb10b6e9089bd267a513dbf37543c318b5eb1e;p=plomrogue
diff --git a/src/objects_on_map.h b/src/objects_on_map.h
index ccb9bcd..0d56c01 100644
--- a/src/objects_on_map.h
+++ b/src/objects_on_map.h
@@ -1,6 +1,7 @@
#ifndef ACTORS_H
#define ACTORS_H
+#include
#include "yx_uint16.h"
struct World;
@@ -9,19 +10,29 @@ 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);
+extern void readwrite_map_objects_dummy (void *, FILE *);
+extern void write_map_objects_monsterdata (void *, FILE *);
+extern void write_map_objects (void * start, FILE *, void (*) (void *, FILE *) );
+extern void read_map_objects_monsterdata (void *, FILE *);
+extern void read_map_objects (void *, FILE *, size_t, void (*) (void *, FILE *) );
+extern void build_map_objects_monsterdata (void *);
+extern void build_map_objects_itemdata (void *);
+extern void build_map_objects (void *, unsigned char, size_t, void (*) (void *), struct Map *);
+
extern struct yx_uint16 find_passable_pos (struct Map *);
+extern char is_passable (struct Map *, struct yx_uint16);
extern void move_monster (struct World *, struct Monster *);
extern void move_player (struct World *, char);
extern void player_wait(struct World *);