diff --git a/.luaurc b/.luaurc index 192531f..1cfeb33 100644 --- a/.luaurc +++ b/.luaurc @@ -16,10 +16,12 @@ "native_draw_color", "native_draw_flush", "native_draw_font", + "native_draw_image", "native_draw_line", "native_draw_rect", "native_draw_start", "native_draw_text", + "native_get_system_lang", "io" ] } diff --git a/src/engine/core/native/main.lua b/src/engine/core/native/main.lua index 9a80a0c..8619831 100644 --- a/src/engine/core/native/main.lua +++ b/src/engine/core/native/main.lua @@ -59,6 +59,7 @@ function native_callback_init(width, height, game_lua) :package('@color', engine_color) :package('@draw.fps', engine_draw_fps) :package('@draw.poly', engine_draw_poly, native_dict_poly) + :package('@memory', engine_memory) :package('load', zeebo_module.load) :package('math', engine_math.clib) :package('math.random', engine_math.clib_random) diff --git a/src/lib/engine/memory.lua b/src/lib/engine/memory.lua index eb2b435..266fa4e 100644 --- a/src/lib/engine/memory.lua +++ b/src/lib/engine/memory.lua @@ -76,12 +76,11 @@ local function gc_clear_all() local items = #memory_list while index <= items do - cache_clear(memory_list[index]) + unset(memory_list[index]) index = index + 1 end memory_list = {} - memory_queue_list = {} return items end @@ -97,7 +96,7 @@ local function install(std, game, application) std.mem.gc_clear_all = gc_clear_all return { - std={mem=mem} + mem=std.mem } end