--- deliantra/server/include/map.h 2006/08/31 09:19:34 1.16 +++ deliantra/server/include/map.h 2006/09/08 16:51:44 1.19 @@ -262,9 +262,10 @@ }; -struct shopitems { - const char *name; /* name of the item in question, null if it is the default item */ - const char *name_pl; /* plural name */ +struct shopitems : zero_initialised +{ + const char *name; /* name of the item in question, null if it is the default item */ + const char *name_pl; /* plural name */ int typenum; /* itemtype number we need to match 0 if it is the default price*/ sint8 strength; /* the degree of specialisation the shop has in this item, * as a percentage from -100 to 100 */ @@ -279,55 +280,57 @@ * (or even through the macros), but doing so will completely * break map tiling. */ -struct mapstruct : attachable { - struct mapstruct *next; /* Next map, linked list */ - char *tmpname; /* Name of temporary file */ - char *name; /* Name of map as given by its creator */ - struct region *region; /* What jurisdiction in the game world this map is ruled by - * points to the struct containing all the properties of - * the region */ - uint32 reset_time; /* when this map should reset */ - uint32 reset_timeout; /* How many seconds must elapse before this map - * should be reset - */ - uint32 fixed_resettime:1; /* if true, reset time is not affected by - * players entering/exiting map - */ - uint32 unique:1; /* if set, this is a per player unique map */ - uint32 templatemap:1; /* if set, this is a template map */ - uint32 nosmooth:1; /* if set the content of this map has smoothlevel=0 forced*/ - sint32 timeout; /* swapout is set to this */ - sint32 swap_time; /* When it reaches 0, the map will be swapped out */ - sint16 players; /* How many plares are on this level right now */ - uint32 in_memory; /* If not true, the map has been freed and must - * be loaded before used. The map,omap and map_ob - * arrays will be allocated when the map is loaded */ - uint16 difficulty; /* What level the player should be to play here */ - - uint8 darkness; /* indicates level of darkness of map */ - uint16 width,height; /* Width and height of map. */ - uint16 enter_x; /* enter_x and enter_y are default entrance location */ - uint16 enter_y; /* on the map if none are set in the exit */ - uint32 outdoor:1; /* True if an outdoor map */ - oblinkpt *buttons; /* Linked list of linked lists of buttons */ - struct MapSpace *spaces; /* Array of spaces on this map */ - sint16 temp; /* base temperature of this tile (F) */ - sint16 pressure; /* barometric pressure (mb) */ - sint8 humid; /* humitidy of this tile */ - sint8 windspeed; /* windspeed of this tile */ - sint8 winddir; /* direction of wind */ - sint8 sky; /* sky conditions */ - int wpartx,wparty; /*Highly fasten conversion between worldmap and weathermap*/ - struct shopitems *shopitems; /* a semi-colon seperated list of item-types the map's shop will trade in */ - char *shoprace; /* the preffered race of the local shopkeeper */ - double shopgreed; /* how much our shopkeeper overcharges */ - uint64 shopmin; /* minimum price a shop will trade for */ - uint64 shopmax; /* maximum price a shop will offer */ - char *msg; /* Message map creator may have left */ - char *maplore; /* Map lore information */ - char *tile_path[4]; /* path to adjoining maps */ - struct mapstruct *tile_map[4]; /* Next map, linked list */ - char path[HUGE_BUF]; /* Filename of the map */ +ACC_CLASS (mapstruct) +struct mapstruct : zero_initialised, attachable +{ + struct mapstruct *ACC (RW, next); /* Next map, linked list */ + char *ACC (RO, tmpname); /* Name of temporary file */ + char *ACC (RO, name); /* Name of map as given by its creator */ + struct region *ACC (RW, region); /* What jurisdiction in the game world this map is ruled by + * points to the struct containing all the properties of + * the region */ + uint32 ACC (RW, reset_time); /* when this map should reset */ + uint32 ACC (RW, reset_timeout); /* How many seconds must elapse before this map + * should be reset + */ + bool ACC (RW, fixed_resettime); /* if true, reset time is not affected by + * players entering/exiting map + */ + bool ACC (RW, unique); /* if set, this is a per player unique map */ + bool ACC (RW, templatemap); /* if set, this is a template map */ + bool ACC (RW, nosmooth); /* if set the content of this map has smoothlevel=0 forced*/ + sint32 ACC (RW, timeout); /* swapout is set to this */ + sint32 ACC (RW, swap_time); /* When it reaches 0, the map will be swapped out */ + sint16 ACC (RW, players); /* How many plares are on this level right now */ + uint32 ACC (RW, in_memory); /* If not true, the map has been freed and must + * be loaded before used. The map,omap and map_ob + * arrays will be allocated when the map is loaded */ + uint16 ACC (RW, difficulty); /* What level the player should be to play here */ + + uint8 ACC (RW, darkness); /* indicates level of darkness of map */ + uint16 ACC (RO, width), ACC (RO, height); /* Width and height of map. */ + uint16 ACC (RW, enter_x); /* enter_x and enter_y are default entrance location */ + uint16 ACC (RW, enter_y); /* on the map if none are set in the exit */ + bool ACC (RW, outdoor); /* True if an outdoor map */ + oblinkpt *buttons; /* Linked list of linked lists of buttons */ + struct MapSpace *spaces; /* Array of spaces on this map */ + sint16 ACC (RW, temp); /* base temperature of this tile (F) */ + sint16 ACC (RW, pressure); /* barometric pressure (mb) */ + sint8 ACC (RW, humid); /* humitidy of this tile */ + sint8 ACC (RW, windspeed); /* windspeed of this tile */ + sint8 ACC (RW, winddir); /* direction of wind */ + sint8 ACC (RW, sky); /* sky conditions */ + int ACC (RW, wpartx), ACC (RW, wparty); /*Highly fasten conversion between worldmap and weathermap*/ + struct shopitems *shopitems; /* a semi-colon seperated list of item-types the map's shop will trade in */ + char *ACC (RO, shoprace); /* the preffered race of the local shopkeeper */ + double ACC (RW, shopgreed); /* how much our shopkeeper overcharges */ + uint64 ACC (RW, shopmin); /* minimum price a shop will trade for */ + uint64 ACC (RW, shopmax); /* maximum price a shop will offer */ + char *ACC (RO, msg); /* Message map creator may have left */ + char *ACC (RO, maplore); /* Map lore information */ + char *tile_path[4]; /* path to adjoining maps */ + struct mapstruct *tile_map[4]; /* Next map, linked list */ + char ACC (RW, path)[HUGE_BUF]; /* Filename of the map */ }; /* This is used by get_rangevector to determine where the other @@ -348,3 +351,4 @@ }; #endif +