Mercurial > molko
comparison libmlk-core/mlk/core/image.c @ 453:49e7024f5455
core: image -> mlk_image
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 18 Feb 2023 20:55:12 +0100 |
parents | 773a082f0b91 |
children | bc5483849614 |
comparison
equal
deleted
inserted
replaced
452:f89147faf8cf | 453:49e7024f5455 |
---|---|
37 tex->h = h; | 37 tex->h = h; |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 int | 41 int |
42 image_open(struct texture *tex, const char *path) | 42 mlk_image_open(struct texture *tex, const char *path) |
43 { | 43 { |
44 assert(tex); | 44 assert(tex); |
45 assert(path); | 45 assert(path); |
46 | 46 |
47 if (!(tex->handle = IMG_LoadTexture(RENDERER(), path))) | 47 if (!(tex->handle = IMG_LoadTexture(RENDERER(), path))) |
51 | 51 |
52 return 0; | 52 return 0; |
53 } | 53 } |
54 | 54 |
55 int | 55 int |
56 image_openmem(struct texture *tex, const void *buffer, size_t size) | 56 mlk_image_openmem(struct texture *tex, const void *buffer, size_t size) |
57 { | 57 { |
58 assert(buffer); | 58 assert(buffer); |
59 | 59 |
60 SDL_RWops *ops = SDL_RWFromConstMem(buffer, size); | 60 SDL_RWops *ops = SDL_RWFromConstMem(buffer, size); |
61 | 61 |