#ifndef _ATTRHASH_H_ #define _ATTRHASH_H_ /* This file is only for the client. */ enum attr_type { ATTR_PUBLIC_WORKER, ATTR_TILE_IMPROVEMENT /* up to 256 */ }; void init_attrhash(void); /* Returns pointer to value. Returns length in *len, unless len == NULL. */ const void *get_attrib(enum attr_type, int id, int *len); /* Store attribute and send it to server. If len == 0, data is ignored. Otherwise it is copied. */ void set_attrib(enum attr_type, int id, int len, const void *data); void del_attrib(enum attr_type, int id); /* convenience */ inline void tile_set_attrib(enum attr_type, int x, int y, int len, const void *data) { } #endif