diff options
Diffstat (limited to 'src/lua/modules/graphics/graphics.cpp')
-rw-r--r-- | src/lua/modules/graphics/graphics.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lua/modules/graphics/graphics.cpp b/src/lua/modules/graphics/graphics.cpp index 31f6fba..9322765 100644 --- a/src/lua/modules/graphics/graphics.cpp +++ b/src/lua/modules/graphics/graphics.cpp @@ -11,9 +11,10 @@ namespace jin namespace lua { using namespace std; - using namespace jin::graphics; - using jin::filesystem::Filesystem; - using jin::filesystem::Buffer; + using namespace JinEngine; + using namespace JinEngine::Graphics; + using JinEngine::Filesystem::AssetDatabase; + using JinEngine::Filesystem::Buffer; #include "../../resources/font.ttf.h" @@ -117,7 +118,7 @@ namespace lua else { const char* f = luax_checkstring(L, 1); - Filesystem* fs = Filesystem::get(); + AssetDatabase* fs = AssetDatabase::get(); if (!fs->exists(f)) { error(L, "No such image file %s", f); @@ -186,7 +187,7 @@ namespace lua static int l_newShaderf(lua_State* L) { const char* path = luax_checkstring(L, 1); - Filesystem* fs = Filesystem::get(); + AssetDatabase* fs = AssetDatabase::get(); if (!fs->exists(path)) { error(L, "No such shader file %s\n", path); @@ -346,7 +347,7 @@ namespace lua luax_typerror(L, 2, "table"); return 1; } - math::Quad q; + Math::Quad q; q.x = luax_rawgetnumber(L, 2, 1); q.y = luax_rawgetnumber(L, 2, 2); q.w = luax_rawgetnumber(L, 2, 3); @@ -485,7 +486,7 @@ namespace lua { int x = luax_checknumber(L, 1); int y = luax_checknumber(L, 2); - jin::graphics::point(x, y); + JinEngine::Graphics::point(x, y); return 0; } @@ -496,7 +497,7 @@ namespace lua int y1 = luax_checknumber(L, 2); int x2 = luax_checknumber(L, 3); int y2 = luax_checknumber(L, 4); - jin::graphics::line(x1, y1, x2, y2); + JinEngine::Graphics::line(x1, y1, x2, y2); return 0; } @@ -609,7 +610,7 @@ namespace lua TTFData* fd = nullptr; { const char* path = luax_checkstring(L, 1); - Filesystem* fs = Filesystem::get(); + AssetDatabase* fs = AssetDatabase::get(); if (!fs->exists(path)) { error(L, "No such font %s\n", path); |