Mercurial > molko
diff libmlk-rpg/rpg/tileset-file.c @ 261:bfde372bf152
core: prefix utilities with util_
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 06 Dec 2020 23:06:34 +0100 |
parents | f978fa0137ce |
children | e48ffbcf9bcc |
line wrap: on
line diff
--- a/libmlk-rpg/rpg/tileset-file.c Sun Dec 06 22:50:48 2020 +0100 +++ b/libmlk-rpg/rpg/tileset-file.c Sun Dec 06 23:06:34 2020 +0100 @@ -196,7 +196,7 @@ if (!(anim = alloc_pool_new(&ctx->tf->anims[0]))) return false; - if (!image_open(&anim->texture, pprintf("%s/%s", ctx->basedir, filename))) + if (!image_open(&anim->texture, util_pathf("%s/%s", ctx->basedir, filename))) return false; sprite_init(&anim->sprite, &anim->texture, ctx->tilewidth, ctx->tileheight); @@ -239,7 +239,7 @@ if (!(p = strchr(line, '|'))) return errorf(_("could not parse image")); - if (!image_open(&ctx->tf->image, pprintf("%s/%s", ctx->basedir, p + 1))) + if (!image_open(&ctx->tf->image, util_pathf("%s/%s", ctx->basedir, p + 1))) return false; sprite_init(&ctx->tf->sprite, &ctx->tf->image, ctx->tilewidth, ctx->tileheight); @@ -262,7 +262,7 @@ { "image", parse_image } }; - for (size_t i = 0; i < NELEM(props); ++i) { + for (size_t i = 0; i < UTIL_SIZE(props); ++i) { if (strncmp(line, props[i].property, strlen(props[i].property)) == 0) return props[i].read(ctx, line); }