23static int dump_map(
struct BM *map);
46 for (i = 0; i <
SIZE; i++) {
58 for (y = 0; y <
SIZE; y++)
68 fp =
fopen(
"dumpfile",
"w");
72 fp =
fopen(
"dumpfile",
"r");
84static int dump_map(
struct BM *map)
88 for (y = 0; y < map->
rows; y++) {
89 for (x = 0;
x < map->
cols;
x++) {
int BM_get(struct BM *, int, int)
Gets 'val' from the bitmap.
int BM_file_write(FILE *, struct BM *)
Write bitmap out to file.
struct BM * BM_file_read(FILE *)
Create map structure and load it from file.
int BM_destroy(struct BM *)
Destroy bitmap and free all associated memory.
size_t BM_get_map_size(struct BM *)
Returns size in bytes that bitmap is taking up.
int BM_set(struct BM *, int, int, int)
Sets bitmap value to 'val' at location 'x' 'y'.
struct BM * BM_create(int, int)
Create bitmap of dimension x/y and return structure token.