// mapbook.c typedef struct Bitmap Bitmap; typedef struct Mapbook Mapbook; typedef struct Aux Aux; struct Mapbook { int width; int height; int index; Bitmap *bitmaps; }; struct Bitmap { int id; char *name; uchar *data; Bitmap *next; }; Mapbook *new_mapbook(int width, int height); Mapbook *free_mapbook(Mapbook *m); void print_mapbook(Mapbook *m); Bitmap *get_bitmap(Mapbook *m, int id); Bitmap *blank_bitmap(Mapbook *m); Bitmap *get_or_create_bitmap(Mapbook *m, int id); void clear_mapbook(Mapbook *m); char *set_mapbook_width(Mapbook *m, int nw); char *set_mapbook_height(Mapbook *m, int nh);