mirror of https://github.com/libAthena/athena.git
* Remove remaining references to libZelda
This commit is contained in:
parent
0429eb57b8
commit
d54dc30cb6
|
@ -1,17 +1,17 @@
|
||||||
// This file is part of libZelda.
|
// This file is part of libAthena.
|
||||||
//
|
//
|
||||||
// libZelda is free software: you can redistribute it and/or modify
|
// libAthena is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// libZelda is distributed in the hope that it will be useful,
|
// libAthena is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
#ifndef __ALTTP_ENUMS_HPP__
|
#ifndef __ALTTP_ENUMS_HPP__
|
||||||
#define __ALTTP_ENUMS_HPP__
|
#define __ALTTP_ENUMS_HPP__
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
// This file is part of libZelda.
|
// This file is part of libAthena.
|
||||||
//
|
//
|
||||||
// libZelda is free software: you can redistribute it and/or modify
|
// libAthena is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// libZelda is distributed in the hope that it will be useful,
|
// libAthena is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
#ifndef __ALTTP_FILE_HPP__
|
#ifndef __ALTTP_FILE_HPP__
|
||||||
#define __ALTTP_FILE_HPP__
|
#define __ALTTP_FILE_HPP__
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
// This file is part of libZelda.
|
// This file is part of libAthena.
|
||||||
//
|
//
|
||||||
// libZelda is free software: you can redistribute it and/or modify
|
// libAthena is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// libZelda is distributed in the hope that it will be useful,
|
// libAthena is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
#ifndef __ALTTP_FILE_READER_HPP__
|
#ifndef __ALTTP_FILE_READER_HPP__
|
||||||
#define __ALTTP_FILE_READER_HPP__
|
#define __ALTTP_FILE_READER_HPP__
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
// This file is part of libZelda.
|
// This file is part of libAthena.
|
||||||
//
|
//
|
||||||
// libZelda is free software: you can redistribute it and/or modify
|
// libAthena is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// libZelda is distributed in the hope that it will be useful,
|
// libAthena is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
#ifndef __ALTTP_FILE_WRITER_HPP__
|
#ifndef __ALTTP_FILE_WRITER_HPP__
|
||||||
#define __ALTTP_FILE_WRITER_HPP__
|
#define __ALTTP_FILE_WRITER_HPP__
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
// This file is part of libZelda.
|
// This file is part of libAthena.
|
||||||
//
|
//
|
||||||
// libZelda is free software: you can redistribute it and/or modify
|
// libAthena is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// libZelda is distributed in the hope that it will be useful,
|
// libAthena is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
#ifndef __ALTTP_QUEST_HPP__
|
#ifndef __ALTTP_QUEST_HPP__
|
||||||
#define __ALTTP_QUEST_HPP__
|
#define __ALTTP_QUEST_HPP__
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
// This file is part of libZelda.
|
// This file is part of libAthena.
|
||||||
//
|
//
|
||||||
// libZelda is free software: you can redistribute it and/or modify
|
// libAthena is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// libZelda is distributed in the hope that it will be useful,
|
// libAthena is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
#ifndef __ALTTP_STRUCTS_HPP__
|
#ifndef __ALTTP_STRUCTS_HPP__
|
||||||
#define __ALTTP_STRUCTS_HPP__
|
#define __ALTTP_STRUCTS_HPP__
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
// This file is part of libZelda.
|
// This file is part of libAthena.
|
||||||
//
|
//
|
||||||
// libZelda is free software: you can redistribute it and/or modify
|
// libAthena is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// libZelda is distributed in the hope that it will be useful,
|
// libAthena is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
#ifndef __BINARYREADER_HPP__
|
#ifndef __BINARYREADER_HPP__
|
||||||
#define __BINARYREADER_HPP__
|
#define __BINARYREADER_HPP__
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef SSPRITE_HPP
|
#ifndef SSPRITE_HPP
|
||||||
#define SSPRITE_HPP
|
#define SSPRITE_HPP
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#else
|
#else
|
||||||
|
@ -34,7 +34,7 @@ namespace Sakura
|
||||||
class SpriteFile;
|
class SpriteFile;
|
||||||
class SpriteFrame;
|
class SpriteFrame;
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
class Sprite
|
class Sprite
|
||||||
{
|
{
|
||||||
#else
|
#else
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
virtual ~Sprite();
|
virtual ~Sprite();
|
||||||
|
|
||||||
virtual void setPosition(const float x, const float y);
|
virtual void setPosition(const float x, const float y);
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
virtual void setPosition(const Vector2Df& pos);
|
virtual void setPosition(const Vector2Df& pos);
|
||||||
virtual Vector2Df position() const;
|
virtual Vector2Df position() const;
|
||||||
void setName(const std::string& name);
|
void setName(const std::string& name);
|
||||||
|
@ -73,7 +73,7 @@ public:
|
||||||
*/
|
*/
|
||||||
int stateId(int index) const;
|
int stateId(int index) const;
|
||||||
void setStateIds(std::vector<int> ids);
|
void setStateIds(std::vector<int> ids);
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<int> stateIds() const;
|
std::vector<int> stateIds() const;
|
||||||
#else
|
#else
|
||||||
QList<int> stateIds() const;
|
QList<int> stateIds() const;
|
||||||
|
@ -86,14 +86,14 @@ public:
|
||||||
bool removeFrame(SpriteFrame* Frame);
|
bool removeFrame(SpriteFrame* Frame);
|
||||||
SpriteFrame* Frame(Uint32 id);
|
SpriteFrame* Frame(Uint32 id);
|
||||||
void setFrame(Uint32 id);
|
void setFrame(Uint32 id);
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setFrames(std::vector<SpriteFrame*> frames);
|
void setFrames(std::vector<SpriteFrame*> frames);
|
||||||
#else
|
#else
|
||||||
void setFrames(QList<SpriteFrame*> frames);
|
void setFrames(QList<SpriteFrame*> frames);
|
||||||
#endif
|
#endif
|
||||||
Uint32 frameCount() const;
|
Uint32 frameCount() const;
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<SpriteFrame*> frames() const;
|
std::vector<SpriteFrame*> frames() const;
|
||||||
#else
|
#else
|
||||||
QList<SpriteFrame*> frames() const;
|
QList<SpriteFrame*> frames() const;
|
||||||
|
@ -110,7 +110,7 @@ public:
|
||||||
|
|
||||||
void setRoot(SpriteFile* root);
|
void setRoot(SpriteFile* root);
|
||||||
SpriteFile* root() const;
|
SpriteFile* root() const;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
signals:
|
signals:
|
||||||
void frameChanged(SpriteFrame* frame);
|
void frameChanged(SpriteFrame* frame);
|
||||||
void nameChanged(QString);
|
void nameChanged(QString);
|
||||||
|
@ -118,7 +118,7 @@ signals:
|
||||||
#endif
|
#endif
|
||||||
private:
|
private:
|
||||||
SpriteFile* m_root;
|
SpriteFile* m_root;
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
Vector2Df m_position;
|
Vector2Df m_position;
|
||||||
std::vector<int> m_stateIds; //!< Stores the texture id's for each state.
|
std::vector<int> m_stateIds; //!< Stores the texture id's for each state.
|
||||||
|
@ -137,9 +137,9 @@ private:
|
||||||
} // Sakura
|
} // Sakura
|
||||||
} // zelda
|
} // zelda
|
||||||
|
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
Q_DECLARE_METATYPE(Uint32)
|
Q_DECLARE_METATYPE(Uint32)
|
||||||
Q_DECLARE_METATYPE(zelda::Sakura::Sprite*)
|
Q_DECLARE_METATYPE(Athena::Sakura::Sprite*)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // SSPRITE_HPP
|
#endif // SSPRITE_HPP
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef SSPRITEFILE_HPP
|
#ifndef SSPRITEFILE_HPP
|
||||||
#define SSPRITEFILE_HPP
|
#define SSPRITEFILE_HPP
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#else
|
#else
|
||||||
|
@ -41,7 +41,7 @@ struct STexture
|
||||||
};
|
};
|
||||||
|
|
||||||
class Sprite;
|
class Sprite;
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
class SpriteFile
|
class SpriteFile
|
||||||
{
|
{
|
||||||
#else
|
#else
|
||||||
|
@ -99,7 +99,7 @@ public:
|
||||||
* \param size
|
* \param size
|
||||||
* \param origin
|
* \param origin
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
SpriteFile(const Vector2Di& size, const Vector2Df& origin);
|
SpriteFile(const Vector2Di& size, const Vector2Df& origin);
|
||||||
#else
|
#else
|
||||||
SpriteFile(const QSize& size, const QPoint& origin);
|
SpriteFile(const QSize& size, const QPoint& origin);
|
||||||
|
@ -107,7 +107,7 @@ public:
|
||||||
|
|
||||||
~SpriteFile();
|
~SpriteFile();
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
public:
|
public:
|
||||||
#else
|
#else
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -124,7 +124,7 @@ public slots:
|
||||||
* \brief setSize
|
* \brief setSize
|
||||||
* \param size
|
* \param size
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setSize(const Vector2Di& size);
|
void setSize(const Vector2Di& size);
|
||||||
#else
|
#else
|
||||||
void setSize(const QSize& size);
|
void setSize(const QSize& size);
|
||||||
|
@ -134,7 +134,7 @@ public slots:
|
||||||
* \brief size
|
* \brief size
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Di size() const;
|
Vector2Di size() const;
|
||||||
#else
|
#else
|
||||||
QSize size() const;
|
QSize size() const;
|
||||||
|
@ -163,7 +163,7 @@ public slots:
|
||||||
* \brief setOrigin
|
* \brief setOrigin
|
||||||
* \param origin
|
* \param origin
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setOrigin(const Vector2Df& origin);
|
void setOrigin(const Vector2Df& origin);
|
||||||
#else
|
#else
|
||||||
void setOrigin(const QPoint& origin);
|
void setOrigin(const QPoint& origin);
|
||||||
|
@ -173,7 +173,7 @@ public slots:
|
||||||
* \brief origin
|
* \brief origin
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Df origin() const;
|
Vector2Df origin() const;
|
||||||
#else
|
#else
|
||||||
QPoint origin() const;
|
QPoint origin() const;
|
||||||
|
@ -211,7 +211,7 @@ public slots:
|
||||||
*/
|
*/
|
||||||
STexture* texture(Uint32 id);
|
STexture* texture(Uint32 id);
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<STexture*> textures() const;
|
std::vector<STexture*> textures() const;
|
||||||
#else
|
#else
|
||||||
QList<STexture*> textures() const;
|
QList<STexture*> textures() const;
|
||||||
|
@ -222,7 +222,7 @@ public slots:
|
||||||
* \param textures
|
* \param textures
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setTextures(std::vector<STexture*> textures);
|
void setTextures(std::vector<STexture*> textures);
|
||||||
#else
|
#else
|
||||||
void setTextures(QList<STexture*> textures);
|
void setTextures(QList<STexture*> textures);
|
||||||
|
@ -230,19 +230,19 @@ public slots:
|
||||||
|
|
||||||
void addSprite(Sprite* sprite);
|
void addSprite(Sprite* sprite);
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void removeSprite(const std::string& name);
|
void removeSprite(const std::string& name);
|
||||||
#else
|
#else
|
||||||
void removeSprite(const QString& name);
|
void removeSprite(const QString& name);
|
||||||
#endif
|
#endif
|
||||||
void removeSprite(Sprite* sprite);
|
void removeSprite(Sprite* sprite);
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setSprites(std::unordered_map<std::string, Sprite*> sprites);
|
void setSprites(std::unordered_map<std::string, Sprite*> sprites);
|
||||||
#else
|
#else
|
||||||
void setSprites(QMap<QString, Sprite*> sprites);
|
void setSprites(QMap<QString, Sprite*> sprites);
|
||||||
#endif
|
#endif
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Sprite* sprite(const std::string& name);
|
Sprite* sprite(const std::string& name);
|
||||||
std::unordered_map<std::string, Sprite*> sprites() const;
|
std::unordered_map<std::string, Sprite*> sprites() const;
|
||||||
#else
|
#else
|
||||||
|
@ -252,13 +252,13 @@ public slots:
|
||||||
|
|
||||||
Uint32 spriteCount() const;
|
Uint32 spriteCount() const;
|
||||||
|
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
signals:
|
signals:
|
||||||
void originChanged(QPoint);
|
void originChanged(QPoint);
|
||||||
void sizeChanged(QSize);
|
void sizeChanged(QSize);
|
||||||
#endif
|
#endif
|
||||||
private:
|
private:
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<STexture*> m_textures;
|
std::vector<STexture*> m_textures;
|
||||||
Vector2Di m_size;
|
Vector2Di m_size;
|
||||||
Vector2Df m_origin;
|
Vector2Df m_origin;
|
||||||
|
@ -273,8 +273,8 @@ signals:
|
||||||
} // Sakura
|
} // Sakura
|
||||||
} // Zelda
|
} // Zelda
|
||||||
|
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
Q_DECLARE_METATYPE(zelda::Sakura::SpriteFile*)
|
Q_DECLARE_METATYPE(Athena::Sakura::SpriteFile*)
|
||||||
Q_DECLARE_METATYPE(zelda::Sakura::STexture*)
|
Q_DECLARE_METATYPE(Athena::Sakura::STexture*)
|
||||||
#endif
|
#endif
|
||||||
#endif // SSPRITE_HPP
|
#endif // SSPRITE_HPP
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "Athena/Global.hpp"
|
#include "Athena/Global.hpp"
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#else
|
#else
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
@ -34,7 +34,7 @@ namespace Sakura
|
||||||
class Sprite;
|
class Sprite;
|
||||||
class SpritePart;
|
class SpritePart;
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
class SpriteFrame
|
class SpriteFrame
|
||||||
{
|
{
|
||||||
#else
|
#else
|
||||||
|
@ -63,7 +63,7 @@ public:
|
||||||
*/
|
*/
|
||||||
float frameTime() const;
|
float frameTime() const;
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setParts(std::vector<SpritePart*> parts);
|
void setParts(std::vector<SpritePart*> parts);
|
||||||
std::vector<SpritePart*> parts() const;
|
std::vector<SpritePart*> parts() const;
|
||||||
#else
|
#else
|
||||||
|
@ -75,14 +75,14 @@ public:
|
||||||
|
|
||||||
void setRoot(Sprite* root);
|
void setRoot(Sprite* root);
|
||||||
Sprite* root() const;
|
Sprite* root() const;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
signals:
|
signals:
|
||||||
void frameTimeChanged(float);
|
void frameTimeChanged(float);
|
||||||
#endif
|
#endif
|
||||||
private:
|
private:
|
||||||
Sprite* m_root;
|
Sprite* m_root;
|
||||||
float m_frameTime;
|
float m_frameTime;
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<SpritePart*> m_parts;
|
std::vector<SpritePart*> m_parts;
|
||||||
#else
|
#else
|
||||||
QList<SpritePart*> m_parts;
|
QList<SpritePart*> m_parts;
|
||||||
|
@ -92,8 +92,8 @@ private:
|
||||||
} // Sakura
|
} // Sakura
|
||||||
} // zelda
|
} // zelda
|
||||||
|
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
Q_DECLARE_METATYPE(zelda::Sakura::SpriteFrame*);
|
Q_DECLARE_METATYPE(Athena::Sakura::SpriteFrame*);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // SSPRITEFRAME_HPP
|
#endif // SSPRITEFRAME_HPP
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#define SSPRITEPART_HPP
|
#define SSPRITEPART_HPP
|
||||||
|
|
||||||
#include "Athena/Global.hpp"
|
#include "Athena/Global.hpp"
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
# include <vector>
|
# include <vector>
|
||||||
#else
|
#else
|
||||||
# include <QObject>
|
# include <QObject>
|
||||||
|
@ -34,7 +34,7 @@ namespace Sakura
|
||||||
{
|
{
|
||||||
class SpriteFrame;
|
class SpriteFrame;
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
class SpritePart
|
class SpritePart
|
||||||
{
|
{
|
||||||
#else
|
#else
|
||||||
|
@ -55,7 +55,7 @@ public:
|
||||||
virtual ~SpritePart();
|
virtual ~SpritePart();
|
||||||
|
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setName(const std::string& name);
|
void setName(const std::string& name);
|
||||||
std::string name() const;
|
std::string name() const;
|
||||||
#else
|
#else
|
||||||
|
@ -77,7 +77,7 @@ public:
|
||||||
* \brief setOffset
|
* \brief setOffset
|
||||||
* \param offset
|
* \param offset
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setOffset(const Vector2Df& offset);
|
void setOffset(const Vector2Df& offset);
|
||||||
#else
|
#else
|
||||||
void setOffset(const QPoint& offset);
|
void setOffset(const QPoint& offset);
|
||||||
|
@ -87,7 +87,7 @@ public:
|
||||||
* \brief offset
|
* \brief offset
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Df offset() const;
|
Vector2Df offset() const;
|
||||||
#else
|
#else
|
||||||
QPoint offset() const;
|
QPoint offset() const;
|
||||||
|
@ -104,7 +104,7 @@ public:
|
||||||
* \brief setTextureOffset
|
* \brief setTextureOffset
|
||||||
* \param texOff
|
* \param texOff
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setTextureOffset(const Vector2Df& offset);
|
void setTextureOffset(const Vector2Df& offset);
|
||||||
#else
|
#else
|
||||||
void setTextureOffset(const QPoint& offset);
|
void setTextureOffset(const QPoint& offset);
|
||||||
|
@ -114,7 +114,7 @@ public:
|
||||||
* \brief textureOffset
|
* \brief textureOffset
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Df textureOffset() const;
|
Vector2Df textureOffset() const;
|
||||||
#else
|
#else
|
||||||
QPoint textureOffset() const;
|
QPoint textureOffset() const;
|
||||||
|
@ -131,7 +131,7 @@ public:
|
||||||
* \brief setSize
|
* \brief setSize
|
||||||
* \param size
|
* \param size
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void setSize(const Vector2Di& size);
|
void setSize(const Vector2Di& size);
|
||||||
#else
|
#else
|
||||||
void setSize(const QSize& size);
|
void setSize(const QSize& size);
|
||||||
|
@ -141,7 +141,7 @@ public:
|
||||||
* \brief size
|
* \brief size
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Di size() const;
|
Vector2Di size() const;
|
||||||
#else
|
#else
|
||||||
QSize size() const;
|
QSize size() const;
|
||||||
|
@ -174,7 +174,7 @@ public:
|
||||||
void setRoot(SpriteFrame* root);
|
void setRoot(SpriteFrame* root);
|
||||||
SpriteFrame* root() const;
|
SpriteFrame* root() const;
|
||||||
|
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
signals:
|
signals:
|
||||||
void nameChanged(QString);
|
void nameChanged(QString);
|
||||||
void orientationChanged(bool,bool);
|
void orientationChanged(bool,bool);
|
||||||
|
@ -186,13 +186,13 @@ signals:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SpriteFrame* m_root;
|
SpriteFrame* m_root;
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
#else
|
#else
|
||||||
QString m_name;
|
QString m_name;
|
||||||
#endif
|
#endif
|
||||||
bool m_hasCollision;
|
bool m_hasCollision;
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Df m_offset;
|
Vector2Df m_offset;
|
||||||
Vector2Df m_textureOffset;
|
Vector2Df m_textureOffset;
|
||||||
Vector2Di m_size;
|
Vector2Di m_size;
|
||||||
|
@ -208,8 +208,8 @@ private:
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
Q_DECLARE_METATYPE(zelda::Sakura::SpritePart*)
|
Q_DECLARE_METATYPE(Athena::Sakura::SpritePart*)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // SSPRITEPART_HPP
|
#endif // SSPRITEPART_HPP
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
// This file is part of libZelda.
|
// This file is part of libAthena.
|
||||||
//
|
//
|
||||||
// libZelda is free software: you can redistribute it and/or modify
|
// libAthena is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// libZelda is distributed in the hope that it will be useful,
|
// libAthena is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
|
// along with libAthena. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
||||||
#include "Athena/Compression.hpp"
|
#include "Athena/Compression.hpp"
|
||||||
#include "Athena/Exception.hpp"
|
#include "Athena/Exception.hpp"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "Athena/SpriteFile.hpp"
|
#include "Athena/SpriteFile.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ Sprite::Sprite(SpriteFile* root, const std::string& name)
|
||||||
: m_root(root),
|
: m_root(root),
|
||||||
m_currentState(0)
|
m_currentState(0)
|
||||||
{
|
{
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
m_name = QString::fromStdString(name);
|
m_name = QString::fromStdString(name);
|
||||||
#else
|
#else
|
||||||
m_name = name;
|
m_name = name;
|
||||||
|
@ -46,7 +46,7 @@ Sprite::Sprite(SpriteFile* root, const std::string& name)
|
||||||
|
|
||||||
Sprite::~Sprite()
|
Sprite::~Sprite()
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
for (SpriteFrame* frame : m_frames)
|
for (SpriteFrame* frame : m_frames)
|
||||||
#else
|
#else
|
||||||
foreach(SpriteFrame* frame, m_frames)
|
foreach(SpriteFrame* frame, m_frames)
|
||||||
|
@ -61,14 +61,14 @@ Sprite::~Sprite()
|
||||||
|
|
||||||
void Sprite::setPosition(const float x, const float y)
|
void Sprite::setPosition(const float x, const float y)
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
setPosition(Vector2Df(x, y));
|
setPosition(Vector2Df(x, y));
|
||||||
#else
|
#else
|
||||||
setPosition(QPoint(x, y));
|
setPosition(QPoint(x, y));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void Sprite::setPosition(const Vector2Df& pos)
|
void Sprite::setPosition(const Vector2Df& pos)
|
||||||
#else
|
#else
|
||||||
void Sprite::setPosition(const QPoint& pos)
|
void Sprite::setPosition(const QPoint& pos)
|
||||||
|
@ -77,7 +77,7 @@ void Sprite::setPosition(const QPoint& pos)
|
||||||
m_position = pos;
|
m_position = pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Df Sprite::position() const
|
Vector2Df Sprite::position() const
|
||||||
#else
|
#else
|
||||||
QPoint Sprite::position() const
|
QPoint Sprite::position() const
|
||||||
|
@ -86,7 +86,7 @@ QPoint Sprite::position() const
|
||||||
return m_position;
|
return m_position;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void Sprite::setName(const std::string& name)
|
void Sprite::setName(const std::string& name)
|
||||||
#else
|
#else
|
||||||
void Sprite::setName(const QString& name)
|
void Sprite::setName(const QString& name)
|
||||||
|
@ -94,12 +94,12 @@ void Sprite::setName(const QString& name)
|
||||||
{
|
{
|
||||||
m_name = name;
|
m_name = name;
|
||||||
|
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit nameChanged(name);
|
emit nameChanged(name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::string Sprite::name() const
|
std::string Sprite::name() const
|
||||||
#else
|
#else
|
||||||
QString Sprite::name() const
|
QString Sprite::name() const
|
||||||
|
@ -130,14 +130,14 @@ void Sprite::setStateIds(std::vector<int> ids)
|
||||||
if (ids.size() == 0)
|
if (ids.size() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
m_stateIds = ids;
|
m_stateIds = ids;
|
||||||
#else
|
#else
|
||||||
m_stateIds = QList<int>::fromVector(QVector<int>::fromStdVector(ids));
|
m_stateIds = QList<int>::fromVector(QVector<int>::fromStdVector(ids));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<int> Sprite::stateIds() const
|
std::vector<int> Sprite::stateIds() const
|
||||||
#else
|
#else
|
||||||
QList<int> Sprite::stateIds() const
|
QList<int> Sprite::stateIds() const
|
||||||
|
@ -157,7 +157,7 @@ void Sprite::setCurrentState(const Uint32 id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_currentState = id;
|
m_currentState = id;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit stateChanged(id);
|
emit stateChanged(id);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ bool Sprite::addFrame(SpriteFrame* part)
|
||||||
|
|
||||||
bool Sprite::removeFrame(SpriteFrame* frame)
|
bool Sprite::removeFrame(SpriteFrame* frame)
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<SpriteFrame*>::iterator iter = std::find(m_frames.begin(), m_frames.end(), frame);
|
std::vector<SpriteFrame*>::iterator iter = std::find(m_frames.begin(), m_frames.end(), frame);
|
||||||
if (iter != m_frames.end())
|
if (iter != m_frames.end())
|
||||||
{
|
{
|
||||||
|
@ -203,7 +203,7 @@ void Sprite::setFrame(Uint32 id)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void Sprite::setFrames(std::vector<SpriteFrame*> frames)
|
void Sprite::setFrames(std::vector<SpriteFrame*> frames)
|
||||||
{
|
{
|
||||||
if (frames.size() == 0)
|
if (frames.size() == 0)
|
||||||
|
@ -233,7 +233,7 @@ Uint32 Sprite::frameCount() const
|
||||||
return m_frames.size();
|
return m_frames.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<SpriteFrame*> Sprite::frames() const
|
std::vector<SpriteFrame*> Sprite::frames() const
|
||||||
#else
|
#else
|
||||||
QList<SpriteFrame*> Sprite::frames() const
|
QList<SpriteFrame*> Sprite::frames() const
|
||||||
|
@ -267,7 +267,7 @@ void Sprite::setCurrentFrame(Uint32 id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_currentFrame = id;
|
m_currentFrame = id;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit frameChanged(currentFrame());
|
emit frameChanged(currentFrame());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ SpriteFile::SpriteFile(Uint32 width, Uint32 height, float originX, float originY
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
SpriteFile::SpriteFile(const Vector2Di& size, const Vector2Df& origin)
|
SpriteFile::SpriteFile(const Vector2Di& size, const Vector2Df& origin)
|
||||||
#else
|
#else
|
||||||
SpriteFile::SpriteFile(const QSize& size, const QPoint& origin)
|
SpriteFile::SpriteFile(const QSize& size, const QPoint& origin)
|
||||||
|
@ -53,7 +53,7 @@ SpriteFile::SpriteFile(const QSize& size, const QPoint& origin)
|
||||||
|
|
||||||
SpriteFile::~SpriteFile()
|
SpriteFile::~SpriteFile()
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
for (std::pair<std::string, Sprite*> sprite : m_sprites)
|
for (std::pair<std::string, Sprite*> sprite : m_sprites)
|
||||||
{
|
{
|
||||||
delete sprite.second;
|
delete sprite.second;
|
||||||
|
@ -65,26 +65,26 @@ SpriteFile::~SpriteFile()
|
||||||
|
|
||||||
void SpriteFile::setSize(Uint32 width, Uint32 height)
|
void SpriteFile::setSize(Uint32 width, Uint32 height)
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
setSize(Vector2Di(width, height));
|
setSize(Vector2Di(width, height));
|
||||||
#else
|
#else
|
||||||
setSize(QSize(width, height));
|
setSize(QSize(width, height));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpriteFile::setSize(const Vector2Di& size)
|
void SpriteFile::setSize(const Vector2Di& size)
|
||||||
#else
|
#else
|
||||||
void SpriteFile::setSize(const QSize& size)
|
void SpriteFile::setSize(const QSize& size)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
m_size = size;
|
m_size = size;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit sizeChanged(size);
|
emit sizeChanged(size);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Di SpriteFile::size() const
|
Vector2Di SpriteFile::size() const
|
||||||
#else
|
#else
|
||||||
QSize SpriteFile::size() const
|
QSize SpriteFile::size() const
|
||||||
|
@ -95,7 +95,7 @@ QSize SpriteFile::size() const
|
||||||
|
|
||||||
Uint32 SpriteFile::width() const
|
Uint32 SpriteFile::width() const
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
return m_size.x;
|
return m_size.x;
|
||||||
#else
|
#else
|
||||||
return m_size.width();
|
return m_size.width();
|
||||||
|
@ -104,7 +104,7 @@ Uint32 SpriteFile::width() const
|
||||||
|
|
||||||
Uint32 SpriteFile::height() const
|
Uint32 SpriteFile::height() const
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
return m_size.y;
|
return m_size.y;
|
||||||
#else
|
#else
|
||||||
return m_size.height();
|
return m_size.height();
|
||||||
|
@ -113,27 +113,27 @@ Uint32 SpriteFile::height() const
|
||||||
|
|
||||||
void SpriteFile::setOrigin(const float x, const float y)
|
void SpriteFile::setOrigin(const float x, const float y)
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
setOrigin(Vector2Df(x, y));
|
setOrigin(Vector2Df(x, y));
|
||||||
#else
|
#else
|
||||||
setOrigin(QPoint(x, y));
|
setOrigin(QPoint(x, y));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpriteFile::setOrigin(const Vector2Df& origin)
|
void SpriteFile::setOrigin(const Vector2Df& origin)
|
||||||
#else
|
#else
|
||||||
void SpriteFile::setOrigin(const QPoint& origin)
|
void SpriteFile::setOrigin(const QPoint& origin)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
m_origin = origin;
|
m_origin = origin;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit originChanged(origin);
|
emit originChanged(origin);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Df SpriteFile::origin() const
|
Vector2Df SpriteFile::origin() const
|
||||||
#else
|
#else
|
||||||
QPoint SpriteFile::origin() const
|
QPoint SpriteFile::origin() const
|
||||||
|
@ -144,7 +144,7 @@ QPoint SpriteFile::origin() const
|
||||||
|
|
||||||
float SpriteFile::originX() const
|
float SpriteFile::originX() const
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
return m_origin.x;
|
return m_origin.x;
|
||||||
#else
|
#else
|
||||||
return m_origin.x();
|
return m_origin.x();
|
||||||
|
@ -153,7 +153,7 @@ float SpriteFile::originX() const
|
||||||
|
|
||||||
float SpriteFile::originY() const
|
float SpriteFile::originY() const
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
return m_origin.y;
|
return m_origin.y;
|
||||||
#else
|
#else
|
||||||
return m_origin.y();
|
return m_origin.y();
|
||||||
|
@ -187,7 +187,7 @@ STexture* SpriteFile::texture(Uint32 id)
|
||||||
return m_textures[id];
|
return m_textures[id];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<STexture*> SpriteFile::textures() const
|
std::vector<STexture*> SpriteFile::textures() const
|
||||||
#else
|
#else
|
||||||
QList<STexture*> SpriteFile::textures() const
|
QList<STexture*> SpriteFile::textures() const
|
||||||
|
@ -203,7 +203,7 @@ Uint32 SpriteFile::textureCount() const
|
||||||
|
|
||||||
void SpriteFile::addSprite(Sprite* sprite)
|
void SpriteFile::addSprite(Sprite* sprite)
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::string name(sprite->name());
|
std::string name(sprite->name());
|
||||||
Athena::utility::tolower(name);
|
Athena::utility::tolower(name);
|
||||||
if (m_sprites.find(name) != m_sprites.end())
|
if (m_sprites.find(name) != m_sprites.end())
|
||||||
|
@ -217,7 +217,7 @@ void SpriteFile::addSprite(Sprite* sprite)
|
||||||
m_sprites[name] = sprite;
|
m_sprites[name] = sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpriteFile::removeSprite(const std::string& name)
|
void SpriteFile::removeSprite(const std::string& name)
|
||||||
{
|
{
|
||||||
std::string tmpName(name);
|
std::string tmpName(name);
|
||||||
|
@ -238,7 +238,7 @@ void SpriteFile::removeSprite(Sprite* sprite)
|
||||||
removeSprite(sprite->name());
|
removeSprite(sprite->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpriteFile::setSprites(std::unordered_map<std::string, Sprite*> sprites)
|
void SpriteFile::setSprites(std::unordered_map<std::string, Sprite*> sprites)
|
||||||
{
|
{
|
||||||
if (sprites.size() == 0)
|
if (sprites.size() == 0)
|
||||||
|
@ -265,7 +265,7 @@ void SpriteFile::setSprites(QMap<QString, Sprite *> sprites)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Sprite* SpriteFile::sprite(const std::string& name)
|
Sprite* SpriteFile::sprite(const std::string& name)
|
||||||
{
|
{
|
||||||
std::string nameLow(name);
|
std::string nameLow(name);
|
||||||
|
@ -285,7 +285,7 @@ Sprite* SpriteFile::sprite(const QString& name)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::unordered_map<std::string, Sprite*> SpriteFile::sprites() const
|
std::unordered_map<std::string, Sprite*> SpriteFile::sprites() const
|
||||||
#else
|
#else
|
||||||
QMap<QString, Sprite*> SpriteFile::sprites() const
|
QMap<QString, Sprite*> SpriteFile::sprites() const
|
||||||
|
@ -299,7 +299,7 @@ Uint32 SpriteFile::spriteCount() const
|
||||||
return m_sprites.size();
|
return m_sprites.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpriteFile::setTextures(std::vector<STexture*> textures)
|
void SpriteFile::setTextures(std::vector<STexture*> textures)
|
||||||
{
|
{
|
||||||
if (textures.size() == 0)
|
if (textures.size() == 0)
|
||||||
|
|
|
@ -83,7 +83,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
||||||
// it will be slow as hell, so we store them in a vector locally
|
// it will be slow as hell, so we store them in a vector locally
|
||||||
// then give that vector the the container, this bypasses the de-reference
|
// then give that vector the the container, this bypasses the de-reference
|
||||||
// for each texture
|
// for each texture
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<Sakura::STexture*> textures;
|
std::vector<Sakura::STexture*> textures;
|
||||||
#else
|
#else
|
||||||
QList<Sakura::STexture*> textures;
|
QList<Sakura::STexture*> textures;
|
||||||
|
@ -105,7 +105,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
||||||
// Normally this isn't a problem, but someone may decide to copy and paste a sprite
|
// Normally this isn't a problem, but someone may decide to copy and paste a sprite
|
||||||
// and forget to change the name, that needs to be handled, but it's outside the scope
|
// and forget to change the name, that needs to be handled, but it's outside the scope
|
||||||
// of this reader.
|
// of this reader.
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::unordered_map <std::string, Sakura::Sprite*> sprites;
|
std::unordered_map <std::string, Sakura::Sprite*> sprites;
|
||||||
#else
|
#else
|
||||||
QMap<QString, Sakura::Sprite*> sprites;
|
QMap<QString, Sakura::Sprite*> sprites;
|
||||||
|
@ -114,7 +114,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
||||||
for (Uint16 i = 0; i < spriteCount; i++)
|
for (Uint16 i = 0; i < spriteCount; i++)
|
||||||
{
|
{
|
||||||
Sakura::Sprite* sprite = new Sakura::Sprite(ret);
|
Sakura::Sprite* sprite = new Sakura::Sprite(ret);
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::string name = base::readString();
|
std::string name = base::readString();
|
||||||
#else
|
#else
|
||||||
QString name = QString::fromStdString(base::readString());
|
QString name = QString::fromStdString(base::readString());
|
||||||
|
@ -138,7 +138,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
||||||
// and the storage footprint, while Sakura supports packs and zips
|
// and the storage footprint, while Sakura supports packs and zips
|
||||||
// it's still a bad idea to have a metric ton of texture resources
|
// it's still a bad idea to have a metric ton of texture resources
|
||||||
// littering the place
|
// littering the place
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<Sakura::SpriteFrame*> frames;
|
std::vector<Sakura::SpriteFrame*> frames;
|
||||||
#else
|
#else
|
||||||
QList<Sakura::SpriteFrame*> frames;
|
QList<Sakura::SpriteFrame*> frames;
|
||||||
|
@ -151,7 +151,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
||||||
Uint16 partCount = base::readUint16();
|
Uint16 partCount = base::readUint16();
|
||||||
|
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<Sakura::SpritePart*> parts;
|
std::vector<Sakura::SpritePart*> parts;
|
||||||
#else
|
#else
|
||||||
QList<Sakura::SpritePart*> parts;
|
QList<Sakura::SpritePart*> parts;
|
||||||
|
@ -159,7 +159,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
||||||
for (Uint8 j = 0; j < partCount; j++)
|
for (Uint8 j = 0; j < partCount; j++)
|
||||||
{
|
{
|
||||||
Sakura::SpritePart* part = new Sakura::SpritePart(frame);
|
Sakura::SpritePart* part = new Sakura::SpritePart(frame);
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::string name = base::readString();
|
std::string name = base::readString();
|
||||||
#else
|
#else
|
||||||
QString name = QString::fromStdString(base::readString());
|
QString name = QString::fromStdString(base::readString());
|
||||||
|
@ -188,7 +188,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
sprite->setFrames(frames);
|
sprite->setFrames(frames);
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
if (sprite->name() != std::string())
|
if (sprite->name() != std::string())
|
||||||
{
|
{
|
||||||
std::string nameLow(sprite->name());
|
std::string nameLow(sprite->name());
|
||||||
|
|
|
@ -58,7 +58,7 @@ void SpriteFileWriter::writeFile(Sakura::SpriteFile* file)
|
||||||
base::writeBool(texture->Preload);
|
base::writeBool(texture->Preload);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
for (std::pair<std::string, Sakura::Sprite*> spritePair : file->sprites())
|
for (std::pair<std::string, Sakura::Sprite*> spritePair : file->sprites())
|
||||||
{
|
{
|
||||||
Sakura::Sprite* sprite = spritePair.second;
|
Sakura::Sprite* sprite = spritePair.second;
|
||||||
|
@ -81,13 +81,13 @@ void SpriteFileWriter::writeFile(Sakura::SpriteFile* file)
|
||||||
base::writeUint16(frame->partCount());
|
base::writeUint16(frame->partCount());
|
||||||
for (Sakura::SpritePart* part: frame->parts())
|
for (Sakura::SpritePart* part: frame->parts())
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
base::writeString(part->name());
|
base::writeString(part->name());
|
||||||
#else
|
#else
|
||||||
base::writeString(part->name().toStdString());
|
base::writeString(part->name().toStdString());
|
||||||
#endif
|
#endif
|
||||||
base::writeBool(part->hasCollision());
|
base::writeBool(part->hasCollision());
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
base::writeFloat(part->offset().x);
|
base::writeFloat(part->offset().x);
|
||||||
base::writeFloat(part->offset().y);
|
base::writeFloat(part->offset().y);
|
||||||
base::writeFloat(part->textureOffset().x);
|
base::writeFloat(part->textureOffset().x);
|
||||||
|
|
|
@ -34,12 +34,12 @@ SpriteFrame::SpriteFrame(Sprite* root)
|
||||||
void SpriteFrame::setFrameTime(float frameTime)
|
void SpriteFrame::setFrameTime(float frameTime)
|
||||||
{
|
{
|
||||||
m_frameTime = frameTime;
|
m_frameTime = frameTime;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit frameTimeChanged(frameTime);
|
emit frameTimeChanged(frameTime);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpriteFrame::setParts(std::vector<SpritePart*> parts)
|
void SpriteFrame::setParts(std::vector<SpritePart*> parts)
|
||||||
#else
|
#else
|
||||||
void SpriteFrame::setParts(QList<SpritePart*> parts)
|
void SpriteFrame::setParts(QList<SpritePart*> parts)
|
||||||
|
@ -48,7 +48,7 @@ void SpriteFrame::setParts(QList<SpritePart*> parts)
|
||||||
m_parts = parts;
|
m_parts = parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::vector<SpritePart*> SpriteFrame::parts() const
|
std::vector<SpritePart*> SpriteFrame::parts() const
|
||||||
#else
|
#else
|
||||||
QList<SpritePart*> SpriteFrame::parts() const
|
QList<SpritePart*> SpriteFrame::parts() const
|
||||||
|
|
|
@ -33,7 +33,7 @@ SpritePart::SpritePart(SpriteFrame* root, const std::string& name, bool hasColli
|
||||||
: m_root(root),
|
: m_root(root),
|
||||||
m_hasCollision(hasCollision)
|
m_hasCollision(hasCollision)
|
||||||
{
|
{
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
m_name = QString::fromStdString(name);
|
m_name = QString::fromStdString(name);
|
||||||
#else
|
#else
|
||||||
m_name = name;
|
m_name = name;
|
||||||
|
@ -44,19 +44,19 @@ SpritePart::~SpritePart()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpritePart::setName(const std::string& name)
|
void SpritePart::setName(const std::string& name)
|
||||||
#else
|
#else
|
||||||
void SpritePart::setName(const QString& name)
|
void SpritePart::setName(const QString& name)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
m_name = name;
|
m_name = name;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit nameChanged(name);
|
emit nameChanged(name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
std::string SpritePart::name() const
|
std::string SpritePart::name() const
|
||||||
#else
|
#else
|
||||||
QString SpritePart::name() const
|
QString SpritePart::name() const
|
||||||
|
@ -68,7 +68,7 @@ QString SpritePart::name() const
|
||||||
void SpritePart::setCollision(bool col)
|
void SpritePart::setCollision(bool col)
|
||||||
{
|
{
|
||||||
m_hasCollision = col;
|
m_hasCollision = col;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit collisionChanged(col);
|
emit collisionChanged(col);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -80,26 +80,26 @@ bool SpritePart::hasCollision() const
|
||||||
|
|
||||||
void SpritePart::setOffset(float x, float y)
|
void SpritePart::setOffset(float x, float y)
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
setOffset(Vector2Df(x, y));
|
setOffset(Vector2Df(x, y));
|
||||||
#else
|
#else
|
||||||
setOffset(QPoint(x, y));
|
setOffset(QPoint(x, y));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpritePart::setOffset(const Vector2Df& offset)
|
void SpritePart::setOffset(const Vector2Df& offset)
|
||||||
#else
|
#else
|
||||||
void SpritePart::setOffset(const QPoint& offset)
|
void SpritePart::setOffset(const QPoint& offset)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
m_offset = offset;
|
m_offset = offset;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit offsetChanged(offset);
|
emit offsetChanged(offset);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Df SpritePart::offset() const
|
Vector2Df SpritePart::offset() const
|
||||||
#else
|
#else
|
||||||
QPoint SpritePart::offset() const
|
QPoint SpritePart::offset() const
|
||||||
|
@ -110,26 +110,26 @@ QPoint SpritePart::offset() const
|
||||||
|
|
||||||
void SpritePart::setTextureOffset(float x, float y)
|
void SpritePart::setTextureOffset(float x, float y)
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
setTextureOffset(Vector2Df(x, y));
|
setTextureOffset(Vector2Df(x, y));
|
||||||
#else
|
#else
|
||||||
setTextureOffset(QPoint(x, y));
|
setTextureOffset(QPoint(x, y));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpritePart::setTextureOffset(const Vector2Df& offset)
|
void SpritePart::setTextureOffset(const Vector2Df& offset)
|
||||||
#else
|
#else
|
||||||
void SpritePart::setTextureOffset(const QPoint& offset)
|
void SpritePart::setTextureOffset(const QPoint& offset)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
m_textureOffset = offset;
|
m_textureOffset = offset;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit textureOffsetChanged(offset);
|
emit textureOffsetChanged(offset);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Df SpritePart::textureOffset() const
|
Vector2Df SpritePart::textureOffset() const
|
||||||
#else
|
#else
|
||||||
QPoint SpritePart::textureOffset() const
|
QPoint SpritePart::textureOffset() const
|
||||||
|
@ -140,26 +140,26 @@ QPoint SpritePart::textureOffset() const
|
||||||
|
|
||||||
void SpritePart::setSize(Uint32 width, Uint32 height)
|
void SpritePart::setSize(Uint32 width, Uint32 height)
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
setSize(Vector2Di(width, height));
|
setSize(Vector2Di(width, height));
|
||||||
#else
|
#else
|
||||||
setSize(QSize(width, height));
|
setSize(QSize(width, height));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
void SpritePart::setSize(const Vector2Di& size)
|
void SpritePart::setSize(const Vector2Di& size)
|
||||||
#else
|
#else
|
||||||
void SpritePart::setSize(const QSize& size)
|
void SpritePart::setSize(const QSize& size)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
m_size = size;
|
m_size = size;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit sizeChanged(size);
|
emit sizeChanged(size);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef ATHENA_USE_QT
|
||||||
Vector2Di SpritePart::size() const
|
Vector2Di SpritePart::size() const
|
||||||
#else
|
#else
|
||||||
QSize SpritePart::size() const
|
QSize SpritePart::size() const
|
||||||
|
@ -171,7 +171,7 @@ QSize SpritePart::size() const
|
||||||
void SpritePart::setFlippedHorizontally(const bool val)
|
void SpritePart::setFlippedHorizontally(const bool val)
|
||||||
{
|
{
|
||||||
m_flippedH = val;
|
m_flippedH = val;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit orientationChanged(val, flippedVertically());
|
emit orientationChanged(val, flippedVertically());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ bool SpritePart::flippedHorizontally() const
|
||||||
void SpritePart::setFlippedVertically(const bool val)
|
void SpritePart::setFlippedVertically(const bool val)
|
||||||
{
|
{
|
||||||
m_flippedV = val;
|
m_flippedV = val;
|
||||||
#ifdef LIBZELDA_USE_QT
|
#ifdef ATHENA_USE_QT
|
||||||
emit orientationChanged(flippedHorizontally(), val);
|
emit orientationChanged(flippedHorizontally(), val);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue