Change engine_createTexture to engine_texture_create

This commit is contained in:
Fierelier 2023-05-14 18:55:16 +02:00
parent 4769de1797
commit 2e593b1ab2
4 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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)

2
test.c
View File

@ -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) {