mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-15 22:19:07 +00:00
Fix wrongly adding shield song when loading a savegame. Also add obj_getTexture() function.
This commit is contained in:
parent
37654f4c8c
commit
84c49e5ce0
3 changed files with 11 additions and 1 deletions
|
@ -2543,6 +2543,7 @@ void Continuity::loadFile(int slot)
|
||||||
{
|
{
|
||||||
dsq->user.save();
|
dsq->user.save();
|
||||||
this->reset();
|
this->reset();
|
||||||
|
knowsSong.clear(); // Adds shield song by default, which interferes with mods that don't start with it
|
||||||
|
|
||||||
TiXmlDocument doc;
|
TiXmlDocument doc;
|
||||||
loadFileData(slot, doc);
|
loadFileData(slot, doc);
|
||||||
|
|
|
@ -988,6 +988,14 @@ luaFunc(obj_setTexture)
|
||||||
luaReturnNil();
|
luaReturnNil();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
luaFunc(obj_getTexture)
|
||||||
|
{
|
||||||
|
RenderObject *r = robj(L);
|
||||||
|
if (r && r->texture)
|
||||||
|
luaReturnStr(r->texture->name.c_str());
|
||||||
|
luaReturnStr("");
|
||||||
|
}
|
||||||
|
|
||||||
luaFunc(obj_delete)
|
luaFunc(obj_delete)
|
||||||
{
|
{
|
||||||
RenderObject *r = robj(L);
|
RenderObject *r = robj(L);
|
||||||
|
@ -1490,6 +1498,7 @@ luaFunc(quad_setHeight)
|
||||||
RO_FUNC(getter, prefix, internalOffset ) \
|
RO_FUNC(getter, prefix, internalOffset ) \
|
||||||
RO_FUNC(getter, prefix, getInternalOffset) \
|
RO_FUNC(getter, prefix, getInternalOffset) \
|
||||||
RO_FUNC(getter, prefix, getPosition ) \
|
RO_FUNC(getter, prefix, getPosition ) \
|
||||||
|
RO_FUNC(getter, prefix, getTexture ) \
|
||||||
RO_FUNC(getter, prefix, x ) \
|
RO_FUNC(getter, prefix, x ) \
|
||||||
RO_FUNC(getter, prefix, y ) \
|
RO_FUNC(getter, prefix, y ) \
|
||||||
RO_FUNC(getter, prefix, setBlendType ) \
|
RO_FUNC(getter, prefix, setBlendType ) \
|
||||||
|
|
|
@ -89,7 +89,7 @@ bool GLFont::Create (const char *file_name, int tex, bool loadTexture)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//Read character array
|
//Read character array
|
||||||
for (int i = 0; i < num_chars; i++)
|
for (unsigned int i = 0; i < num_chars; i++)
|
||||||
{
|
{
|
||||||
bb >> header.chars[i].dx;
|
bb >> header.chars[i].dx;
|
||||||
bb >> header.chars[i].dy;
|
bb >> header.chars[i].dy;
|
||||||
|
|
Loading…
Reference in a new issue