project_files/frontlib/model/map.h
changeset 7230 240620f46dd7
parent 7177 bf6cf4dd847a
child 7271 5608ac657362
equal deleted inserted replaced
7227:1c859f572d72 7230:240620f46dd7
    28 #define MAZE_SIZE_SMALL_ISLANDS 3
    28 #define MAZE_SIZE_SMALL_ISLANDS 3
    29 #define MAZE_SIZE_MEDIUM_ISLANDS 4
    29 #define MAZE_SIZE_MEDIUM_ISLANDS 4
    30 #define MAZE_SIZE_LARGE_ISLANDS 5
    30 #define MAZE_SIZE_LARGE_ISLANDS 5
    31 
    31 
    32 typedef struct {
    32 typedef struct {
       
    33 	int _referenceCount;
    33 	int mapgen;				// Always one of the MAPGEN_ constants
    34 	int mapgen;				// Always one of the MAPGEN_ constants
    34 	char *theme;			// Used for all except MAPGEN_NAMED
    35 	char *theme;			// Used for all except MAPGEN_NAMED
    35 	char *name;				// Used for MAPGEN_NAMED
    36 	char *name;				// Used for MAPGEN_NAMED
    36 	uint8_t *drawData;		// Used for MAPGEN_DRAWN
    37 	uint8_t *drawData;		// Used for MAPGEN_DRAWN
    37 	int drawDataSize;		// Used for MAPGEN_DRAWN
    38 	int drawDataSize;		// Used for MAPGEN_DRAWN
    77  * No NULL parameters allowed, returns NULL on failure.
    78  * No NULL parameters allowed, returns NULL on failure.
    78  */
    79  */
    79 flib_map *flib_map_create_drawn(const char *theme, const uint8_t *drawData, int drawDataSize);
    80 flib_map *flib_map_create_drawn(const char *theme, const uint8_t *drawData, int drawDataSize);
    80 
    81 
    81 /**
    82 /**
    82  * Free the memory taken up by the map. Passing NULL is allowed and does nothing.
    83  * Increase the reference count of the object. Call this if you store a pointer to it somewhere.
       
    84  * Returns the parameter.
    83  */
    85  */
    84 void flib_map_destroy(flib_map *map);
    86 flib_map *flib_map_retain(flib_map *map);
       
    87 
       
    88 /**
       
    89  * Decrease the reference count of the object and free it if this was the last reference.
       
    90  */
       
    91 void flib_map_release(flib_map *map);
    85 
    92 
    86 
    93 
    87 #endif
    94 #endif