mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-25 14:15:46 +00:00
minor things, added entity_loadSkin function
This commit is contained in:
parent
e94de627eb
commit
83dbb7e310
3 changed files with 35 additions and 14 deletions
|
@ -5806,7 +5806,7 @@ Entity* Game::setActivePet(int flag)
|
|||
|
||||
void Game::createLi()
|
||||
{
|
||||
int liFlag = dsq->continuity.getFlag(1000);
|
||||
int liFlag = dsq->continuity.getFlag(FLAG_LI);
|
||||
std::ostringstream os;
|
||||
os << "liFlag: " << liFlag;
|
||||
debugLog(os.str());
|
||||
|
|
|
@ -3370,9 +3370,12 @@ void SceneEditor::updateText()
|
|||
os << "entities (" << dsq->entities.size() << ")";
|
||||
if (editingEntity)
|
||||
{
|
||||
os << " id: " << editingEntity->getID() << " name: " << editingEntity->name << " flag: " << dsq->continuity.getEntityFlag(dsq->game->sceneName, editingEntity->getID());
|
||||
os << " groupID: " << editingEntity->getGroupID() << " ";
|
||||
os << " state: " << editingEntity->getState();
|
||||
os << " id: " << editingEntity->getID()
|
||||
<< " name: " << editingEntity->name
|
||||
<< " flag:" << dsq->continuity.getEntityFlag(dsq->game->sceneName, editingEntity->getID())
|
||||
<< " fh:" << editingEntity->isfh()
|
||||
<< " fv:" << editingEntity->isfv()
|
||||
<< " state:" << editingEntity->getState();
|
||||
}
|
||||
break;
|
||||
case ET_PATHS:
|
||||
|
|
|
@ -3233,16 +3233,30 @@ luaFunc(entity_initStrands)
|
|||
|
||||
luaFunc(entity_initSkeletal)
|
||||
{
|
||||
ScriptedEntity *e = scriptedEntity(L);
|
||||
e->renderQuad = false;
|
||||
e->setWidthHeight(128, 128);
|
||||
e->skeletalSprite.loadSkeletal(getString(L, 2));
|
||||
const char *s = lua_tostring(L, 3);
|
||||
if (s && *s)
|
||||
e->skeletalSprite.loadSkin(s);
|
||||
Entity *e = entity(L);
|
||||
if (e)
|
||||
{
|
||||
e->renderQuad = false;
|
||||
e->setWidthHeight(128, 128);
|
||||
e->skeletalSprite.loadSkeletal(getString(L, 2));
|
||||
const char *s = lua_tostring(L, 3);
|
||||
if (s && *s)
|
||||
e->skeletalSprite.loadSkin(s);
|
||||
}
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
luaFunc(entity_loadSkin)
|
||||
{
|
||||
Entity *e = entity(L);
|
||||
if (e && e->skeletalSprite.isLoaded())
|
||||
{
|
||||
const char *s = lua_tostring(L, 2);
|
||||
if (s && *s)
|
||||
e->skeletalSprite.loadSkin(s);
|
||||
}
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
luaFunc(entity_idle)
|
||||
{
|
||||
|
@ -7099,21 +7113,24 @@ luaFunc(createBitmapText)
|
|||
luaFunc(text_setText)
|
||||
{
|
||||
BaseText *txt = getText(L);
|
||||
txt->setText(getString(L, 2));
|
||||
if (txt)
|
||||
txt->setText(getString(L, 2));
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
luaFunc(text_setFontSize)
|
||||
{
|
||||
BaseText *txt = getText(L);
|
||||
txt->setFontSize(lua_tointeger(L, 2));
|
||||
if (txt)
|
||||
txt->setFontSize(lua_tointeger(L, 2));
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
luaFunc(text_setWidth)
|
||||
{
|
||||
BaseText *txt = getText(L);
|
||||
txt->setWidth(lua_tointeger(L, 2));
|
||||
if (txt)
|
||||
txt->setWidth(lua_tointeger(L, 2));
|
||||
luaReturnNil();
|
||||
}
|
||||
|
||||
|
@ -7408,6 +7425,7 @@ static const struct {
|
|||
luaRegister(entity_initSegments),
|
||||
luaRegister(entity_warpSegments),
|
||||
luaRegister(entity_initSkeletal),
|
||||
luaRegister(entity_loadSkin),
|
||||
luaRegister(entity_initStrands),
|
||||
|
||||
luaRegister(entity_hurtTarget),
|
||||
|
|
Loading…
Reference in a new issue