void dump_tileset(tmx_tileset t) { printf("tileset={"); if (t) { printf("\n\tname=%s", t->name); printf("\n\ttile_height=%d", t->tile_height); printf("\n\ttile_width=%d", t->tile_width); printf("\n\tfirstgid=%d", t->firstgid); printf("\n\tmargin=%d", t->margin); printf("\n\tspacing=%d", t->spacing); } else { fputs("\n(NULL)", stdout); } puts("\n}"); if (t) { if (t->image) dump_image(t->image); if (t->next) dump_tileset(t->next); } }
void dump_map(tmx_map m) { fputs("map={", stdout); if (m) { printf("\n\torient=%d", m->orient); printf("\n\theight=%d", m->height); printf("\n\twidth=%d", m->width); printf("\n\ttheight=%d", m->tile_height); printf("\n\ttwidth=%d", m->tile_width); } else { fputs("\n(NULL)", stdout); } puts("\n}"); if (m) { dump_tileset(m->ts_head); dump_prop(m->properties); dump_layer(m->ly_head, m->height * m->width); } }
void dump_map(tmx_map *m) { fputs("map={", stdout); if (m) { printf("\n\t" "orient="); print_orient(m->orient); printf("\n\t" "renderorder=%d", m->renderorder); printf("\n\t" "height=%d", m->height); printf("\n\t" "width=%d", m->width); printf("\n\t" "theight=%d", m->tile_height); printf("\n\t" "twidth=%d", m->tile_width); printf("\n\t" "bgcol=#%.6X", m->backgroundcolor); } else { fputs("\n(NULL)", stdout); } puts("\n}"); if (m) { dump_tileset(m->ts_head); dump_layer(m->ly_head, m->height * m->width); dump_prop(m->properties, 0); } }
void dump_tileset(tmx_tileset *t) { printf("\ntileset={"); if (t) { printf("\n\t" "name=%s", t->name); printf("\n\t" "firstgid=%u", t->firstgid); printf("\n\t" "tile_height=%d", t->tile_height); printf("\n\t" "tile_width=%d", t->tile_width); printf("\n\t" "firstgid=%d", t->firstgid); printf("\n\t" "margin=%d", t->margin); printf("\n\t" "spacing=%d", t->spacing); printf("\n\t" "x_offset=%d", t->x_offset); printf("\n\t" "y_offset=%d", t->y_offset); dump_image(t->image, 1); dump_tile(t->tiles); dump_prop(t->properties, 1); printf("\n}"); } else { printf(" (NULL) }"); } if (t && t->next) { dump_tileset(t->next); } }