aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lua/modules/graphics/je_lua_animation.cpp8
-rw-r--r--src/lua/modules/graphics/je_lua_graphics.cpp18
-rw-r--r--src/lua/modules/graphics/je_lua_spritesheet.cpp22
-rw-r--r--src/lua/modules/graphics/je_lua_texture_font.cpp6
-rw-r--r--src/lua/modules/graphics/je_lua_ttf.cpp10
-rw-r--r--src/lua/modules/graphics/je_lua_ttf_data.cpp4
6 files changed, 34 insertions, 34 deletions
diff --git a/src/lua/modules/graphics/je_lua_animation.cpp b/src/lua/modules/graphics/je_lua_animation.cpp
index 4cb513c..bdba10d 100644
--- a/src/lua/modules/graphics/je_lua_animation.cpp
+++ b/src/lua/modules/graphics/je_lua_animation.cpp
@@ -40,8 +40,8 @@ namespace JinEngine
{
LuaObject* luaObj = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Animation);
SharedAnimation shrAnimation = luaObj->getShared<Animation>();
- LuaObject* pxySprite = (LuaObject*)luax_checktype(L, 2, Jin_Lua_Sprite);
- Shared<Sprite>& shrSprite = pxySprite->getShared<Sprite>();
+ LuaObject* luaSprite = (LuaObject*)luax_checktype(L, 2, Jin_Lua_Sprite);
+ Shared<Sprite>& shrSprite = luaSprite->getShared<Sprite>();
shrAnimation->addFrame(shrSprite.getObject());
int i = shrAnimation->getFrameCount() - 1;
luaObj->setDependency((int)AnimationDependency::DEP_SPRITES + i, &shrSprite);
@@ -62,8 +62,8 @@ namespace JinEngine
for (int i = 1; i <= n; ++i)
{
luax_rawgeti(L, 2, i);
- LuaObject* pxySprite = (LuaObject*)luax_checktype(L, -1, Jin_Lua_Sprite);
- Shared<Sprite>& shrSprite = pxySprite->getShared<Sprite>();
+ LuaObject* luaSprite = (LuaObject*)luax_checktype(L, -1, Jin_Lua_Sprite);
+ Shared<Sprite>& shrSprite = luaSprite->getShared<Sprite>();
shrAnimation->addFrame(shrSprite.getObject());
int index = shrAnimation->getFrameCount() - 1;
luaObj->setDependency((int)AnimationDependency::DEP_SPRITES + index, &shrSprite);
diff --git a/src/lua/modules/graphics/je_lua_graphics.cpp b/src/lua/modules/graphics/je_lua_graphics.cpp
index 34ef8e7..867547d 100644
--- a/src/lua/modules/graphics/je_lua_graphics.cpp
+++ b/src/lua/modules/graphics/je_lua_graphics.cpp
@@ -388,8 +388,8 @@ namespace JinEngine
{
if (!luax_istype(L, 1, Jin_Lua_Sprite))
return;
- LuaObject* pxySprite = (LuaObject*)luax_toudata(L, 1);
- Sprite* sprite = pxySprite->getObject<Sprite>();
+ LuaObject* luaSprite = (LuaObject*)luax_toudata(L, 1);
+ Sprite* sprite = luaSprite->getObject<Sprite>();
float x = luax_checknumber(L, 2);
float y = luax_checknumber(L, 3);
float sx = luax_checknumber(L, 4);
@@ -809,8 +809,8 @@ namespace JinEngine
for (int i = 1; i <= n; ++i)
{
luax_rawgeti(L, 1, i);
- LuaObject* pxySprite = (LuaObject*)luax_checktype(L, -1, Jin_Lua_Sprite);
- Shared<Sprite>& shrSprite = pxySprite->getShared<Sprite>();
+ LuaObject* luaSprite = (LuaObject*)luax_checktype(L, -1, Jin_Lua_Sprite);
+ Shared<Sprite>& shrSprite = luaSprite->getShared<Sprite>();
(*shrAnimation)->addFrame(shrSprite.getObject());
int index = (*shrAnimation)->getFrameCount() - 1;
luaAnimation->setDependency((int)AnimationDependency::DEP_SPRITES + index, &shrSprite);
@@ -829,14 +829,14 @@ namespace JinEngine
Shared<Animator>* shrAniamtor = new Shared<Animator>(new Animator(), Jin_Lua_Animator);
if (argc >= 1)
{
- LuaObject* pxyAnimation = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Animation);
- Shared<Animation>& shrAnimtion = pxyAnimation->getShared<Animation>();
+ LuaObject* luaAnimation = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Animation);
+ Shared<Animation>& shrAnimtion = luaAnimation->getShared<Animation>();
(*shrAniamtor)->setAnimation(shrAnimtion.getObject());
- LuaObject* pxyAnimator = luax_newinstance(L, Jin_Lua_Animator, shrAniamtor);
- pxyAnimator->setDependency((int)AnimatorDependency::DEP_ANIMATION, &shrAnimtion);
+ LuaObject* luaAnimator = luax_newinstance(L, Jin_Lua_Animator, shrAniamtor);
+ luaAnimator->setDependency((int)AnimatorDependency::DEP_ANIMATION, &shrAnimtion);
return 1;
}
- LuaObject* pxyAnimator = luax_newinstance(L, Jin_Lua_Animator, shrAniamtor);
+ LuaObject* luaAnimator = luax_newinstance(L, Jin_Lua_Animator, shrAniamtor);
return 1;
}
diff --git a/src/lua/modules/graphics/je_lua_spritesheet.cpp b/src/lua/modules/graphics/je_lua_spritesheet.cpp
index 8e336c3..23b655e 100644
--- a/src/lua/modules/graphics/je_lua_spritesheet.cpp
+++ b/src/lua/modules/graphics/je_lua_spritesheet.cpp
@@ -19,16 +19,16 @@ namespace JinEngine
LUA_IMPLEMENT int l_gc(lua_State* L)
{
- LuaObject* pxySSheet = (LuaObject*)luax_checktype(L, 1, Jin_Lua_SpriteSheet);
- pxySSheet->release();
+ LuaObject* luaSSheet = (LuaObject*)luax_checktype(L, 1, Jin_Lua_SpriteSheet);
+ luaSSheet->release();
return 0;
}
LUA_IMPLEMENT int l_newSprite(lua_State* L)
{
- LuaObject* pxySSheet = (LuaObject*)luax_checktype(L, 1, Jin_Lua_SpriteSheet);
- Shared<SpriteSheet>& shrSSheet = pxySSheet->getShared<SpriteSheet>();
- SpriteSheet* sheet = pxySSheet->getObject<SpriteSheet>();
+ LuaObject* luaSSheet = (LuaObject*)luax_checktype(L, 1, Jin_Lua_SpriteSheet);
+ Shared<SpriteSheet>& shrSSheet = luaSSheet->getShared<SpriteSheet>();
+ SpriteSheet* sheet = luaSSheet->getObject<SpriteSheet>();
Quad quad;
quad.x = luax_rawgetnumberthenpop(L, 2, 1);
quad.y = luax_rawgetnumberthenpop(L, 2, 2);
@@ -49,17 +49,17 @@ namespace JinEngine
spr = sheet->createSprite(quad, origin);
}
Shared<Sprite>* shrSprite = new Shared<Sprite>(spr, Jin_Lua_Sprite);
- LuaObject* pxySprite = luax_newinstance(L, Jin_Lua_Sprite, shrSprite);
- pxySprite->setDependency((int)SpriteDependency::DEP_SPRITESHEET, &shrSSheet);
+ LuaObject* luaSprite = luax_newinstance(L, Jin_Lua_Sprite, shrSprite);
+ luaSprite->setDependency((int)SpriteDependency::DEP_SPRITESHEET, &shrSSheet);
return 1;
}
// {} = newSprites
LUA_IMPLEMENT int l_newSprites(lua_State* L)
{
- LuaObject* pxySS = (LuaObject*)luax_checktype(L, 1, Jin_Lua_SpriteSheet);
- Shared<SpriteSheet>& shrSS = pxySS->getShared<SpriteSheet>();
- SpriteSheet* ss = pxySS->getObject<SpriteSheet>();
+ LuaObject* luaSS = (LuaObject*)luax_checktype(L, 1, Jin_Lua_SpriteSheet);
+ Shared<SpriteSheet>& shrSS = luaSS->getShared<SpriteSheet>();
+ SpriteSheet* ss = luaSS->getObject<SpriteSheet>();
int count = luax_checkinteger(L, 2);
int r = luax_checkinteger(L, 3);
int c = luax_checkinteger(L, 4);
@@ -93,7 +93,7 @@ namespace JinEngine
return 1;
}
luax_newtable(L);
- SharedBase* shrGraphic = pxySS->getDependency((int)SpriteSheetDependency::DEP_GRAPHIC);
+ SharedBase* shrGraphic = luaSS->getDependency((int)SpriteSheetDependency::DEP_GRAPHIC);
for (int i = 0; i < sprs.size(); ++i)
{
Sprite* spr = sprs[i];
diff --git a/src/lua/modules/graphics/je_lua_texture_font.cpp b/src/lua/modules/graphics/je_lua_texture_font.cpp
index afabf18..8a3eca0 100644
--- a/src/lua/modules/graphics/je_lua_texture_font.cpp
+++ b/src/lua/modules/graphics/je_lua_texture_font.cpp
@@ -25,9 +25,9 @@ namespace JinEngine
/* typeset(Text | string, lineheight, spacing) */
LUA_IMPLEMENT int l_typeset(lua_State* L)
{
- LuaObject* pxyTexFont = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TextureFont);
- Shared<TextureFont>& shrTexFont = pxyTexFont->getShared<TextureFont>();
- TextureFont* tf = pxyTexFont->getObject<TextureFont>();
+ LuaObject* luaTexFont = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TextureFont);
+ Shared<TextureFont>& shrTexFont = luaTexFont->getShared<TextureFont>();
+ TextureFont* tf = luaTexFont->getObject<TextureFont>();
int lineheight = luax_checkinteger(L, 3);
int spacing = luax_optnumber(L, 4, 0);
Page* page = nullptr;
diff --git a/src/lua/modules/graphics/je_lua_ttf.cpp b/src/lua/modules/graphics/je_lua_ttf.cpp
index 875c132..317670c 100644
--- a/src/lua/modules/graphics/je_lua_ttf.cpp
+++ b/src/lua/modules/graphics/je_lua_ttf.cpp
@@ -25,9 +25,9 @@ namespace JinEngine
/* typeset(Text | string, lineheight, spacing) */
LUA_IMPLEMENT int l_typeset(lua_State* L)
{
- LuaObject* pxyTTF = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TTF);
- Shared<TTF>& shrTTF = pxyTTF->getShared<TTF>();
- TTF* ttf = pxyTTF->getObject<TTF>();
+ LuaObject* luaTTF = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TTF);
+ Shared<TTF>& shrTTF = luaTTF->getShared<TTF>();
+ TTF* ttf = luaTTF->getObject<TTF>();
int lineheight = luax_optnumber(L, 3, ttf->getFontSize());
int spacing = luax_optnumber(L, 4, 0);
Page* page = nullptr;
@@ -40,8 +40,8 @@ namespace JinEngine
}
else if (luax_istype(L, 2, Jin_Lua_Text))
{
- LuaObject* pxyText = (LuaObject*)luax_checktype(L, 2, Jin_Lua_Text);
- Text* text = pxyText->getObject<Text>();
+ LuaObject* luaText = (LuaObject*)luax_checktype(L, 2, Jin_Lua_Text);
+ Text* text = luaText->getObject<Text>();
page = ttf->typeset(*text, lineheight, spacing);
}
Shared<Page>* refPage = new Shared<Page>(page, Jin_Lua_Page);
diff --git a/src/lua/modules/graphics/je_lua_ttf_data.cpp b/src/lua/modules/graphics/je_lua_ttf_data.cpp
index a4e8d2c..9f4437e 100644
--- a/src/lua/modules/graphics/je_lua_ttf_data.cpp
+++ b/src/lua/modules/graphics/je_lua_ttf_data.cpp
@@ -17,9 +17,9 @@ namespace JinEngine
LUA_IMPLEMENT int l_newTTF(lua_State* L)
{
- LuaObject* pxyTTFData = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TTFData);
+ LuaObject* luaTTFData = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TTFData);
int fontsize = luax_checkinteger(L, 2);
- Shared<TTFData>& shrFontData = pxyTTFData->getShared<TTFData>();
+ Shared<TTFData>& shrFontData = luaTTFData->getShared<TTFData>();
TTFData* fontData = shrFontData.getObject();
TTF* font = fontData->createTTF(fontsize);
Shared<TTF>* shrTTF = new Shared<TTF>(font, Jin_Lua_TTF);