diff options
Diffstat (limited to 'src/lua/modules/graphics/je_lua_graphics.cpp')
-rw-r--r-- | src/lua/modules/graphics/je_lua_graphics.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lua/modules/graphics/je_lua_graphics.cpp b/src/lua/modules/graphics/je_lua_graphics.cpp index d129e6a..6b84651 100644 --- a/src/lua/modules/graphics/je_lua_graphics.cpp +++ b/src/lua/modules/graphics/je_lua_graphics.cpp @@ -678,10 +678,10 @@ namespace JinEngine { Proxy* pxySSheet = luax_newinstance(L, JIN_GRAPHICS_SPRITESHEET); Graphic* graphic = pxyGraphic->getObject<Graphic>(); - Shared<SpriteSheet>& shrSSheet = pxySSheet->getShared<SpriteSheet>(); + Shared<SpriteSheet>* shrSSheet = new Shared<SpriteSheet>(new SpriteSheet(graphic), JIN_GRAPHICS_SPRITESHEET); Shared<Graphic>& shrGraphic = pxyGraphic->getShared<Graphic>(); - shrSSheet.setDependency(SpriteSheetDependency::DEP_GRAPHIC, &shrGraphic); - pxySSheet->bind(new Shared<SpriteSheet>(new SpriteSheet(graphic), JIN_GRAPHICS_SPRITESHEET)); + shrSSheet->setDependency((int)SpriteSheetDependency::DEP_GRAPHIC, &shrGraphic); + pxySSheet->bind(shrSSheet); return 1; } else @@ -776,6 +776,7 @@ namespace JinEngine luax_newclass(L, luaopen_Page); luax_newclass(L, luaopen_JSL); luax_newclass(L, luaopen_Sprite); + luax_newclass(L, luaopen_SpriteSheet); luaL_Reg f[] = { /* window */ |