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
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (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
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// 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__
|
||||
#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
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (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
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// 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__
|
||||
#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
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (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
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// 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__
|
||||
#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
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (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
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// 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__
|
||||
#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
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (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
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// 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__
|
||||
#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
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (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
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// 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__
|
||||
#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
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (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
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// 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__
|
||||
#define __BINARYREADER_HPP__
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#ifndef SSPRITE_HPP
|
||||
#define SSPRITE_HPP
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#else
|
||||
|
@ -34,7 +34,7 @@ namespace Sakura
|
|||
class SpriteFile;
|
||||
class SpriteFrame;
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
class Sprite
|
||||
{
|
||||
#else
|
||||
|
@ -52,7 +52,7 @@ public:
|
|||
virtual ~Sprite();
|
||||
|
||||
virtual void setPosition(const float x, const float y);
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
virtual void setPosition(const Vector2Df& pos);
|
||||
virtual Vector2Df position() const;
|
||||
void setName(const std::string& name);
|
||||
|
@ -73,7 +73,7 @@ public:
|
|||
*/
|
||||
int stateId(int index) const;
|
||||
void setStateIds(std::vector<int> ids);
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<int> stateIds() const;
|
||||
#else
|
||||
QList<int> stateIds() const;
|
||||
|
@ -86,14 +86,14 @@ public:
|
|||
bool removeFrame(SpriteFrame* Frame);
|
||||
SpriteFrame* Frame(Uint32 id);
|
||||
void setFrame(Uint32 id);
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setFrames(std::vector<SpriteFrame*> frames);
|
||||
#else
|
||||
void setFrames(QList<SpriteFrame*> frames);
|
||||
#endif
|
||||
Uint32 frameCount() const;
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<SpriteFrame*> frames() const;
|
||||
#else
|
||||
QList<SpriteFrame*> frames() const;
|
||||
|
@ -110,7 +110,7 @@ public:
|
|||
|
||||
void setRoot(SpriteFile* root);
|
||||
SpriteFile* root() const;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
signals:
|
||||
void frameChanged(SpriteFrame* frame);
|
||||
void nameChanged(QString);
|
||||
|
@ -118,7 +118,7 @@ signals:
|
|||
#endif
|
||||
private:
|
||||
SpriteFile* m_root;
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::string m_name;
|
||||
Vector2Df m_position;
|
||||
std::vector<int> m_stateIds; //!< Stores the texture id's for each state.
|
||||
|
@ -137,9 +137,9 @@ private:
|
|||
} // Sakura
|
||||
} // zelda
|
||||
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
Q_DECLARE_METATYPE(Uint32)
|
||||
Q_DECLARE_METATYPE(zelda::Sakura::Sprite*)
|
||||
Q_DECLARE_METATYPE(Athena::Sakura::Sprite*)
|
||||
#endif
|
||||
|
||||
#endif // SSPRITE_HPP
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#ifndef SSPRITEFILE_HPP
|
||||
#define SSPRITEFILE_HPP
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#else
|
||||
|
@ -41,7 +41,7 @@ struct STexture
|
|||
};
|
||||
|
||||
class Sprite;
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
class SpriteFile
|
||||
{
|
||||
#else
|
||||
|
@ -99,7 +99,7 @@ public:
|
|||
* \param size
|
||||
* \param origin
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
SpriteFile(const Vector2Di& size, const Vector2Df& origin);
|
||||
#else
|
||||
SpriteFile(const QSize& size, const QPoint& origin);
|
||||
|
@ -107,7 +107,7 @@ public:
|
|||
|
||||
~SpriteFile();
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
public:
|
||||
#else
|
||||
public slots:
|
||||
|
@ -124,7 +124,7 @@ public slots:
|
|||
* \brief setSize
|
||||
* \param size
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setSize(const Vector2Di& size);
|
||||
#else
|
||||
void setSize(const QSize& size);
|
||||
|
@ -134,7 +134,7 @@ public slots:
|
|||
* \brief size
|
||||
* \return
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Di size() const;
|
||||
#else
|
||||
QSize size() const;
|
||||
|
@ -163,7 +163,7 @@ public slots:
|
|||
* \brief setOrigin
|
||||
* \param origin
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setOrigin(const Vector2Df& origin);
|
||||
#else
|
||||
void setOrigin(const QPoint& origin);
|
||||
|
@ -173,7 +173,7 @@ public slots:
|
|||
* \brief origin
|
||||
* \return
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Df origin() const;
|
||||
#else
|
||||
QPoint origin() const;
|
||||
|
@ -211,7 +211,7 @@ public slots:
|
|||
*/
|
||||
STexture* texture(Uint32 id);
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<STexture*> textures() const;
|
||||
#else
|
||||
QList<STexture*> textures() const;
|
||||
|
@ -222,7 +222,7 @@ public slots:
|
|||
* \param textures
|
||||
*/
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setTextures(std::vector<STexture*> textures);
|
||||
#else
|
||||
void setTextures(QList<STexture*> textures);
|
||||
|
@ -230,19 +230,19 @@ public slots:
|
|||
|
||||
void addSprite(Sprite* sprite);
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void removeSprite(const std::string& name);
|
||||
#else
|
||||
void removeSprite(const QString& name);
|
||||
#endif
|
||||
void removeSprite(Sprite* sprite);
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setSprites(std::unordered_map<std::string, Sprite*> sprites);
|
||||
#else
|
||||
void setSprites(QMap<QString, Sprite*> sprites);
|
||||
#endif
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Sprite* sprite(const std::string& name);
|
||||
std::unordered_map<std::string, Sprite*> sprites() const;
|
||||
#else
|
||||
|
@ -252,13 +252,13 @@ public slots:
|
|||
|
||||
Uint32 spriteCount() const;
|
||||
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
signals:
|
||||
void originChanged(QPoint);
|
||||
void sizeChanged(QSize);
|
||||
#endif
|
||||
private:
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<STexture*> m_textures;
|
||||
Vector2Di m_size;
|
||||
Vector2Df m_origin;
|
||||
|
@ -273,8 +273,8 @@ signals:
|
|||
} // Sakura
|
||||
} // Zelda
|
||||
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
Q_DECLARE_METATYPE(zelda::Sakura::SpriteFile*)
|
||||
Q_DECLARE_METATYPE(zelda::Sakura::STexture*)
|
||||
#ifdef ATHENA_USE_QT
|
||||
Q_DECLARE_METATYPE(Athena::Sakura::SpriteFile*)
|
||||
Q_DECLARE_METATYPE(Athena::Sakura::STexture*)
|
||||
#endif
|
||||
#endif // SSPRITE_HPP
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "Athena/Global.hpp"
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
#include <vector>
|
||||
#else
|
||||
#include <QObject>
|
||||
|
@ -34,7 +34,7 @@ namespace Sakura
|
|||
class Sprite;
|
||||
class SpritePart;
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
class SpriteFrame
|
||||
{
|
||||
#else
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
*/
|
||||
float frameTime() const;
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setParts(std::vector<SpritePart*> parts);
|
||||
std::vector<SpritePart*> parts() const;
|
||||
#else
|
||||
|
@ -75,14 +75,14 @@ public:
|
|||
|
||||
void setRoot(Sprite* root);
|
||||
Sprite* root() const;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
signals:
|
||||
void frameTimeChanged(float);
|
||||
#endif
|
||||
private:
|
||||
Sprite* m_root;
|
||||
float m_frameTime;
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<SpritePart*> m_parts;
|
||||
#else
|
||||
QList<SpritePart*> m_parts;
|
||||
|
@ -92,8 +92,8 @@ private:
|
|||
} // Sakura
|
||||
} // zelda
|
||||
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
Q_DECLARE_METATYPE(zelda::Sakura::SpriteFrame*);
|
||||
#ifdef ATHENA_USE_QT
|
||||
Q_DECLARE_METATYPE(Athena::Sakura::SpriteFrame*);
|
||||
#endif
|
||||
|
||||
#endif // SSPRITEFRAME_HPP
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#define SSPRITEPART_HPP
|
||||
|
||||
#include "Athena/Global.hpp"
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
# include <vector>
|
||||
#else
|
||||
# include <QObject>
|
||||
|
@ -34,7 +34,7 @@ namespace Sakura
|
|||
{
|
||||
class SpriteFrame;
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
class SpritePart
|
||||
{
|
||||
#else
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
virtual ~SpritePart();
|
||||
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setName(const std::string& name);
|
||||
std::string name() const;
|
||||
#else
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
* \brief setOffset
|
||||
* \param offset
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setOffset(const Vector2Df& offset);
|
||||
#else
|
||||
void setOffset(const QPoint& offset);
|
||||
|
@ -87,7 +87,7 @@ public:
|
|||
* \brief offset
|
||||
* \return
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Df offset() const;
|
||||
#else
|
||||
QPoint offset() const;
|
||||
|
@ -104,7 +104,7 @@ public:
|
|||
* \brief setTextureOffset
|
||||
* \param texOff
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setTextureOffset(const Vector2Df& offset);
|
||||
#else
|
||||
void setTextureOffset(const QPoint& offset);
|
||||
|
@ -114,7 +114,7 @@ public:
|
|||
* \brief textureOffset
|
||||
* \return
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Df textureOffset() const;
|
||||
#else
|
||||
QPoint textureOffset() const;
|
||||
|
@ -131,7 +131,7 @@ public:
|
|||
* \brief setSize
|
||||
* \param size
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void setSize(const Vector2Di& size);
|
||||
#else
|
||||
void setSize(const QSize& size);
|
||||
|
@ -141,7 +141,7 @@ public:
|
|||
* \brief size
|
||||
* \return
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Di size() const;
|
||||
#else
|
||||
QSize size() const;
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
void setRoot(SpriteFrame* root);
|
||||
SpriteFrame* root() const;
|
||||
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
signals:
|
||||
void nameChanged(QString);
|
||||
void orientationChanged(bool,bool);
|
||||
|
@ -186,13 +186,13 @@ signals:
|
|||
|
||||
private:
|
||||
SpriteFrame* m_root;
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::string m_name;
|
||||
#else
|
||||
QString m_name;
|
||||
#endif
|
||||
bool m_hasCollision;
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Df m_offset;
|
||||
Vector2Df m_textureOffset;
|
||||
Vector2Di m_size;
|
||||
|
@ -208,8 +208,8 @@ private:
|
|||
|
||||
}
|
||||
}
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
Q_DECLARE_METATYPE(zelda::Sakura::SpritePart*)
|
||||
#ifdef ATHENA_USE_QT
|
||||
Q_DECLARE_METATYPE(Athena::Sakura::SpritePart*)
|
||||
#endif
|
||||
|
||||
#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
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (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
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// 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/Exception.hpp"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "Athena/SpriteFile.hpp"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
#include <QVector>
|
||||
#endif
|
||||
|
||||
|
@ -37,7 +37,7 @@ Sprite::Sprite(SpriteFile* root, const std::string& name)
|
|||
: m_root(root),
|
||||
m_currentState(0)
|
||||
{
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
m_name = QString::fromStdString(name);
|
||||
#else
|
||||
m_name = name;
|
||||
|
@ -46,7 +46,7 @@ Sprite::Sprite(SpriteFile* root, const std::string& name)
|
|||
|
||||
Sprite::~Sprite()
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
for (SpriteFrame* frame : m_frames)
|
||||
#else
|
||||
foreach(SpriteFrame* frame, m_frames)
|
||||
|
@ -61,14 +61,14 @@ Sprite::~Sprite()
|
|||
|
||||
void Sprite::setPosition(const float x, const float y)
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
setPosition(Vector2Df(x, y));
|
||||
#else
|
||||
setPosition(QPoint(x, y));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void Sprite::setPosition(const Vector2Df& pos)
|
||||
#else
|
||||
void Sprite::setPosition(const QPoint& pos)
|
||||
|
@ -77,7 +77,7 @@ void Sprite::setPosition(const QPoint& pos)
|
|||
m_position = pos;
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Df Sprite::position() const
|
||||
#else
|
||||
QPoint Sprite::position() const
|
||||
|
@ -86,7 +86,7 @@ QPoint Sprite::position() const
|
|||
return m_position;
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void Sprite::setName(const std::string& name)
|
||||
#else
|
||||
void Sprite::setName(const QString& name)
|
||||
|
@ -94,12 +94,12 @@ void Sprite::setName(const QString& name)
|
|||
{
|
||||
m_name = name;
|
||||
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit nameChanged(name);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::string Sprite::name() const
|
||||
#else
|
||||
QString Sprite::name() const
|
||||
|
@ -130,14 +130,14 @@ void Sprite::setStateIds(std::vector<int> ids)
|
|||
if (ids.size() == 0)
|
||||
return;
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
m_stateIds = ids;
|
||||
#else
|
||||
m_stateIds = QList<int>::fromVector(QVector<int>::fromStdVector(ids));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<int> Sprite::stateIds() const
|
||||
#else
|
||||
QList<int> Sprite::stateIds() const
|
||||
|
@ -157,7 +157,7 @@ void Sprite::setCurrentState(const Uint32 id)
|
|||
return;
|
||||
|
||||
m_currentState = id;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit stateChanged(id);
|
||||
#endif
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ bool Sprite::addFrame(SpriteFrame* part)
|
|||
|
||||
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);
|
||||
if (iter != m_frames.end())
|
||||
{
|
||||
|
@ -203,7 +203,7 @@ void Sprite::setFrame(Uint32 id)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void Sprite::setFrames(std::vector<SpriteFrame*> frames)
|
||||
{
|
||||
if (frames.size() == 0)
|
||||
|
@ -233,7 +233,7 @@ Uint32 Sprite::frameCount() const
|
|||
return m_frames.size();
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<SpriteFrame*> Sprite::frames() const
|
||||
#else
|
||||
QList<SpriteFrame*> Sprite::frames() const
|
||||
|
@ -267,7 +267,7 @@ void Sprite::setCurrentFrame(Uint32 id)
|
|||
return;
|
||||
|
||||
m_currentFrame = id;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit frameChanged(currentFrame());
|
||||
#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)
|
||||
#else
|
||||
SpriteFile::SpriteFile(const QSize& size, const QPoint& origin)
|
||||
|
@ -53,7 +53,7 @@ SpriteFile::SpriteFile(const QSize& size, const QPoint& origin)
|
|||
|
||||
SpriteFile::~SpriteFile()
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
for (std::pair<std::string, Sprite*> sprite : m_sprites)
|
||||
{
|
||||
delete sprite.second;
|
||||
|
@ -65,26 +65,26 @@ SpriteFile::~SpriteFile()
|
|||
|
||||
void SpriteFile::setSize(Uint32 width, Uint32 height)
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
setSize(Vector2Di(width, height));
|
||||
#else
|
||||
setSize(QSize(width, height));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpriteFile::setSize(const Vector2Di& size)
|
||||
#else
|
||||
void SpriteFile::setSize(const QSize& size)
|
||||
#endif
|
||||
{
|
||||
m_size = size;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit sizeChanged(size);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Di SpriteFile::size() const
|
||||
#else
|
||||
QSize SpriteFile::size() const
|
||||
|
@ -95,7 +95,7 @@ QSize SpriteFile::size() const
|
|||
|
||||
Uint32 SpriteFile::width() const
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
return m_size.x;
|
||||
#else
|
||||
return m_size.width();
|
||||
|
@ -104,7 +104,7 @@ Uint32 SpriteFile::width() const
|
|||
|
||||
Uint32 SpriteFile::height() const
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
return m_size.y;
|
||||
#else
|
||||
return m_size.height();
|
||||
|
@ -113,27 +113,27 @@ Uint32 SpriteFile::height() const
|
|||
|
||||
void SpriteFile::setOrigin(const float x, const float y)
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
setOrigin(Vector2Df(x, y));
|
||||
#else
|
||||
setOrigin(QPoint(x, y));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpriteFile::setOrigin(const Vector2Df& origin)
|
||||
#else
|
||||
void SpriteFile::setOrigin(const QPoint& origin)
|
||||
#endif
|
||||
{
|
||||
m_origin = origin;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit originChanged(origin);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Df SpriteFile::origin() const
|
||||
#else
|
||||
QPoint SpriteFile::origin() const
|
||||
|
@ -144,7 +144,7 @@ QPoint SpriteFile::origin() const
|
|||
|
||||
float SpriteFile::originX() const
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
return m_origin.x;
|
||||
#else
|
||||
return m_origin.x();
|
||||
|
@ -153,7 +153,7 @@ float SpriteFile::originX() const
|
|||
|
||||
float SpriteFile::originY() const
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
return m_origin.y;
|
||||
#else
|
||||
return m_origin.y();
|
||||
|
@ -187,7 +187,7 @@ STexture* SpriteFile::texture(Uint32 id)
|
|||
return m_textures[id];
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<STexture*> SpriteFile::textures() const
|
||||
#else
|
||||
QList<STexture*> SpriteFile::textures() const
|
||||
|
@ -203,7 +203,7 @@ Uint32 SpriteFile::textureCount() const
|
|||
|
||||
void SpriteFile::addSprite(Sprite* sprite)
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::string name(sprite->name());
|
||||
Athena::utility::tolower(name);
|
||||
if (m_sprites.find(name) != m_sprites.end())
|
||||
|
@ -217,7 +217,7 @@ void SpriteFile::addSprite(Sprite* sprite)
|
|||
m_sprites[name] = sprite;
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpriteFile::removeSprite(const std::string& name)
|
||||
{
|
||||
std::string tmpName(name);
|
||||
|
@ -238,7 +238,7 @@ void SpriteFile::removeSprite(Sprite* sprite)
|
|||
removeSprite(sprite->name());
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpriteFile::setSprites(std::unordered_map<std::string, Sprite*> sprites)
|
||||
{
|
||||
if (sprites.size() == 0)
|
||||
|
@ -265,7 +265,7 @@ void SpriteFile::setSprites(QMap<QString, Sprite *> sprites)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Sprite* SpriteFile::sprite(const std::string& name)
|
||||
{
|
||||
std::string nameLow(name);
|
||||
|
@ -285,7 +285,7 @@ Sprite* SpriteFile::sprite(const QString& name)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::unordered_map<std::string, Sprite*> SpriteFile::sprites() const
|
||||
#else
|
||||
QMap<QString, Sprite*> SpriteFile::sprites() const
|
||||
|
@ -299,7 +299,7 @@ Uint32 SpriteFile::spriteCount() const
|
|||
return m_sprites.size();
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpriteFile::setTextures(std::vector<STexture*> textures)
|
||||
{
|
||||
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
|
||||
// then give that vector the the container, this bypasses the de-reference
|
||||
// for each texture
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<Sakura::STexture*> textures;
|
||||
#else
|
||||
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
|
||||
// and forget to change the name, that needs to be handled, but it's outside the scope
|
||||
// of this reader.
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::unordered_map <std::string, Sakura::Sprite*> sprites;
|
||||
#else
|
||||
QMap<QString, Sakura::Sprite*> sprites;
|
||||
|
@ -114,7 +114,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
|||
for (Uint16 i = 0; i < spriteCount; i++)
|
||||
{
|
||||
Sakura::Sprite* sprite = new Sakura::Sprite(ret);
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::string name = base::readString();
|
||||
#else
|
||||
QString name = QString::fromStdString(base::readString());
|
||||
|
@ -138,7 +138,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
|||
// and the storage footprint, while Sakura supports packs and zips
|
||||
// it's still a bad idea to have a metric ton of texture resources
|
||||
// littering the place
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<Sakura::SpriteFrame*> frames;
|
||||
#else
|
||||
QList<Sakura::SpriteFrame*> frames;
|
||||
|
@ -151,7 +151,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
|||
Uint16 partCount = base::readUint16();
|
||||
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<Sakura::SpritePart*> parts;
|
||||
#else
|
||||
QList<Sakura::SpritePart*> parts;
|
||||
|
@ -159,7 +159,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
|||
for (Uint8 j = 0; j < partCount; j++)
|
||||
{
|
||||
Sakura::SpritePart* part = new Sakura::SpritePart(frame);
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::string name = base::readString();
|
||||
#else
|
||||
QString name = QString::fromStdString(base::readString());
|
||||
|
@ -188,7 +188,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
|
|||
}
|
||||
|
||||
sprite->setFrames(frames);
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
if (sprite->name() != std::string())
|
||||
{
|
||||
std::string nameLow(sprite->name());
|
||||
|
|
|
@ -58,7 +58,7 @@ void SpriteFileWriter::writeFile(Sakura::SpriteFile* file)
|
|||
base::writeBool(texture->Preload);
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
for (std::pair<std::string, Sakura::Sprite*> spritePair : file->sprites())
|
||||
{
|
||||
Sakura::Sprite* sprite = spritePair.second;
|
||||
|
@ -81,13 +81,13 @@ void SpriteFileWriter::writeFile(Sakura::SpriteFile* file)
|
|||
base::writeUint16(frame->partCount());
|
||||
for (Sakura::SpritePart* part: frame->parts())
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
base::writeString(part->name());
|
||||
#else
|
||||
base::writeString(part->name().toStdString());
|
||||
#endif
|
||||
base::writeBool(part->hasCollision());
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
base::writeFloat(part->offset().x);
|
||||
base::writeFloat(part->offset().y);
|
||||
base::writeFloat(part->textureOffset().x);
|
||||
|
|
|
@ -34,12 +34,12 @@ SpriteFrame::SpriteFrame(Sprite* root)
|
|||
void SpriteFrame::setFrameTime(float frameTime)
|
||||
{
|
||||
m_frameTime = frameTime;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit frameTimeChanged(frameTime);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpriteFrame::setParts(std::vector<SpritePart*> parts)
|
||||
#else
|
||||
void SpriteFrame::setParts(QList<SpritePart*> parts)
|
||||
|
@ -48,7 +48,7 @@ void SpriteFrame::setParts(QList<SpritePart*> parts)
|
|||
m_parts = parts;
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::vector<SpritePart*> SpriteFrame::parts() const
|
||||
#else
|
||||
QList<SpritePart*> SpriteFrame::parts() const
|
||||
|
|
|
@ -33,7 +33,7 @@ SpritePart::SpritePart(SpriteFrame* root, const std::string& name, bool hasColli
|
|||
: m_root(root),
|
||||
m_hasCollision(hasCollision)
|
||||
{
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
m_name = QString::fromStdString(name);
|
||||
#else
|
||||
m_name = name;
|
||||
|
@ -44,19 +44,19 @@ SpritePart::~SpritePart()
|
|||
{
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpritePart::setName(const std::string& name)
|
||||
#else
|
||||
void SpritePart::setName(const QString& name)
|
||||
#endif
|
||||
{
|
||||
m_name = name;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit nameChanged(name);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
std::string SpritePart::name() const
|
||||
#else
|
||||
QString SpritePart::name() const
|
||||
|
@ -68,7 +68,7 @@ QString SpritePart::name() const
|
|||
void SpritePart::setCollision(bool col)
|
||||
{
|
||||
m_hasCollision = col;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit collisionChanged(col);
|
||||
#endif
|
||||
}
|
||||
|
@ -80,26 +80,26 @@ bool SpritePart::hasCollision() const
|
|||
|
||||
void SpritePart::setOffset(float x, float y)
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
setOffset(Vector2Df(x, y));
|
||||
#else
|
||||
setOffset(QPoint(x, y));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpritePart::setOffset(const Vector2Df& offset)
|
||||
#else
|
||||
void SpritePart::setOffset(const QPoint& offset)
|
||||
#endif
|
||||
{
|
||||
m_offset = offset;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit offsetChanged(offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Df SpritePart::offset() const
|
||||
#else
|
||||
QPoint SpritePart::offset() const
|
||||
|
@ -110,26 +110,26 @@ QPoint SpritePart::offset() const
|
|||
|
||||
void SpritePart::setTextureOffset(float x, float y)
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
setTextureOffset(Vector2Df(x, y));
|
||||
#else
|
||||
setTextureOffset(QPoint(x, y));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpritePart::setTextureOffset(const Vector2Df& offset)
|
||||
#else
|
||||
void SpritePart::setTextureOffset(const QPoint& offset)
|
||||
#endif
|
||||
{
|
||||
m_textureOffset = offset;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit textureOffsetChanged(offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Df SpritePart::textureOffset() const
|
||||
#else
|
||||
QPoint SpritePart::textureOffset() const
|
||||
|
@ -140,26 +140,26 @@ QPoint SpritePart::textureOffset() const
|
|||
|
||||
void SpritePart::setSize(Uint32 width, Uint32 height)
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
setSize(Vector2Di(width, height));
|
||||
#else
|
||||
setSize(QSize(width, height));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
void SpritePart::setSize(const Vector2Di& size)
|
||||
#else
|
||||
void SpritePart::setSize(const QSize& size)
|
||||
#endif
|
||||
{
|
||||
m_size = size;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit sizeChanged(size);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
#ifndef ATHENA_USE_QT
|
||||
Vector2Di SpritePart::size() const
|
||||
#else
|
||||
QSize SpritePart::size() const
|
||||
|
@ -171,7 +171,7 @@ QSize SpritePart::size() const
|
|||
void SpritePart::setFlippedHorizontally(const bool val)
|
||||
{
|
||||
m_flippedH = val;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit orientationChanged(val, flippedVertically());
|
||||
#endif
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ bool SpritePart::flippedHorizontally() const
|
|||
void SpritePart::setFlippedVertically(const bool val)
|
||||
{
|
||||
m_flippedV = val;
|
||||
#ifdef LIBZELDA_USE_QT
|
||||
#ifdef ATHENA_USE_QT
|
||||
emit orientationChanged(flippedHorizontally(), val);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue