1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00

Added maps (working \o/), small tweaks in texture.c

There shouldn't be any memory leak.
This commit is contained in:
Firew0lf 2015-08-22 02:08:30 +02:00
parent 819dabcf0f
commit 56b47153b7
4 changed files with 218 additions and 5 deletions

View file

@ -4,11 +4,9 @@
#include <lapi.h>
#include <lauxlib.h>
typedef struct {
sf2d_texture *texture;
float scaleX;
float scaleY;
} texture_userdata;
#include <stdlib.h>
#include "texture.h"
u8 getType(const char *name) {
// NYI, always return the PNG type, because PNG is the best type.
@ -113,6 +111,7 @@ static int texture_unload(lua_State *L) {
if (texture->texture != NULL) sf2d_free_texture(texture->texture);
texture->texture = NULL;
free(texture);
return 0;
}