From 2e593b1ab2a9cb2f4754d219bdeb5a92e28c5680 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Sun, 14 May 2023 18:55:16 +0200 Subject: [PATCH] Change engine_createTexture to engine_texture_create --- README.txt | 2 +- modules/engine/addon/lua.c | 2 +- modules/engine/frontend/generic/textures.c | 2 +- test.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.txt b/README.txt index 5964f16..cc4d644 100644 --- a/README.txt +++ b/README.txt @@ -17,7 +17,7 @@ A software accelerated (CPU-only) game engine for older computers. It uses a lay > struct ENGINE_EVENT engine_event_get() >> TEXTURES -struct ENGINE_TEXTURE engine_createTexture(int width,int height) +> struct ENGINE_TEXTURE * engine_texture_create(int width,int height) > void engine_texture_color_set(char r,char g,char b,char a) > void engine_texture_draw_pixel(struct ENGINE_TEXTURE * texture,int x,int y) > void engine_texture_destroy(struct ENGINE_TEXTURE * texture) diff --git a/modules/engine/addon/lua.c b/modules/engine/addon/lua.c index 606f6cc..e7d18b2 100644 --- a/modules/engine/addon/lua.c +++ b/modules/engine/addon/lua.c @@ -20,7 +20,7 @@ int engine_luaf_time_sleep(lua_State *L) { int engine_luaf_texture_create(lua_State *L) { int width = luaL_checkinteger(L,1); int height = luaL_checkinteger(L,2); - struct ENGINE_TEXTURE * texture = engine_createTexture(width,height); + struct ENGINE_TEXTURE * texture = engine_texture_create(width,height); lua_pushlightuserdata(L,texture); return 1; } diff --git a/modules/engine/frontend/generic/textures.c b/modules/engine/frontend/generic/textures.c index 69d1567..e290831 100644 --- a/modules/engine/frontend/generic/textures.c +++ b/modules/engine/frontend/generic/textures.c @@ -4,7 +4,7 @@ struct ENGINE_TEXTURE { int width; int height; void * fe_texture; }; struct ENGINE_GENERIC_TEXTURE { char * pixels; }; -struct ENGINE_TEXTURE * engine_createTexture(int width,int height) { +struct ENGINE_TEXTURE * engine_texture_create(int width,int height) { // frontend texture char * pixels = engine_malloc(NULL,sizeof(char) * width * height * 4); #if (ENGINE_GENERIC_TEXTURE_NOCLEAR == 0) diff --git a/test.c b/test.c index d6fe4e2..4aa22f3 100644 --- a/test.c +++ b/test.c @@ -124,7 +124,7 @@ void tick() { } int main(int argc, char **argv) { - texture = engine_createTexture(8,8); + texture = engine_texture_create(8,8); engine_texture_from_file(texture,"assets/textures/fier.rgba"); for (int i = 0; i < argc; ++i) {