changeset 453:49e7024f5455

core: image -> mlk_image
author David Demelier <markand@malikania.fr>
date Sat, 18 Feb 2023 20:55:12 +0100
parents f89147faf8cf
children 3e92d8309933
files libmlk-core/mlk/core/image.c libmlk-core/mlk/core/image.h libmlk-rpg/mlk/rpg/tileset-file.c
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libmlk-core/mlk/core/image.c	Sat Feb 18 20:46:48 2023 +0100
+++ b/libmlk-core/mlk/core/image.c	Sat Feb 18 20:55:12 2023 +0100
@@ -39,7 +39,7 @@
 }
 
 int
-image_open(struct texture *tex, const char *path)
+mlk_image_open(struct texture *tex, const char *path)
 {
 	assert(tex);
 	assert(path);
@@ -53,7 +53,7 @@
 }
 
 int
-image_openmem(struct texture *tex, const void *buffer, size_t size)
+mlk_image_openmem(struct texture *tex, const void *buffer, size_t size)
 {
 	assert(buffer);
 
--- a/libmlk-core/mlk/core/image.h	Sat Feb 18 20:46:48 2023 +0100
+++ b/libmlk-core/mlk/core/image.h	Sat Feb 18 20:55:12 2023 +0100
@@ -28,10 +28,10 @@
 CORE_BEGIN_DECLS
 
 int
-image_open(struct texture *, const char *);
+mlk_image_open(struct texture *, const char *);
 
 int
-image_openmem(struct texture *, const void *, size_t);
+mlk_image_openmem(struct texture *, const void *, size_t);
 
 CORE_END_DECLS
 
--- a/libmlk-rpg/mlk/rpg/tileset-file.c	Sat Feb 18 20:46:48 2023 +0100
+++ b/libmlk-rpg/mlk/rpg/tileset-file.c	Sat Feb 18 20:55:12 2023 +0100
@@ -193,7 +193,7 @@
 	while (fscanf(ctx->fp, "%hu|" MAX_F(FILENAME_MAX) "|%u", &id, filename, &delay) == 3) {
 		anim = mlk_alloc_pool_new(&ctx->tf->anims[0]);
 
-		if (image_open(&anim->texture, util_pathf("%s/%s", ctx->basedir, filename)) < 0)
+		if (mlk_image_open(&anim->texture, util_pathf("%s/%s", ctx->basedir, filename)) < 0)
 			return -1;
 
 		sprite_init(&anim->sprite, &anim->texture, ctx->tilewidth, ctx->tileheight);
@@ -236,7 +236,7 @@
 	if (!(p = strchr(line, '|')))
 		return errorf("could not parse image");
 
-	if (image_open(&ctx->tf->image, util_pathf("%s/%s", ctx->basedir, p + 1)) < 0)
+	if (mlk_image_open(&ctx->tf->image, util_pathf("%s/%s", ctx->basedir, p + 1)) < 0)
 		return -1;
 
 	sprite_init(&ctx->tf->sprite, &ctx->tf->image, ctx->tilewidth, ctx->tileheight);