aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/graphics.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-20 15:50:06 +0800
committerchai <chaifix@163.com>2018-10-20 15:50:06 +0800
commite9410bd371fc68169c57d2c52382948a0b083da4 (patch)
treed8f7e600b4ffd6a5c4c9a30f68f9ee74b8491c3b /src/lua/modules/graphics/graphics.cpp
parent58ad98213763348b49d8313675203b287a5442bb (diff)
*修改名称空间
Diffstat (limited to 'src/lua/modules/graphics/graphics.cpp')
-rw-r--r--src/lua/modules/graphics/graphics.cpp19
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);