From d54dc30cb670e0a41719969f8498925a6f17aa5c Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 20 Apr 2014 03:28:28 -0700 Subject: [PATCH] * Remove remaining references to libZelda --- include/Athena/ALTTPEnums.hpp | 8 +++--- include/Athena/ALTTPFile.hpp | 8 +++--- include/Athena/ALTTPFileReader.hpp | 8 +++--- include/Athena/ALTTPFileWriter.hpp | 8 +++--- include/Athena/ALTTPQuest.hpp | 8 +++--- include/Athena/ALTTPStructs.hpp | 8 +++--- include/Athena/BinaryReader.hpp | 8 +++--- include/Athena/Sprite.hpp | 20 +++++++------- include/Athena/SpriteFile.hpp | 36 ++++++++++++------------- include/Athena/SpriteFrame.hpp | 14 +++++----- include/Athena/SpritePart.hpp | 28 ++++++++++---------- src/Athena/Compression.cpp | 8 +++--- src/Athena/Sprite.cpp | 32 +++++++++++------------ src/Athena/SpriteFile.cpp | 42 +++++++++++++++--------------- src/Athena/SpriteFileReader.cpp | 14 +++++----- src/Athena/SpriteFileWriter.cpp | 6 ++--- src/Athena/SpriteFrame.cpp | 6 ++--- src/Athena/SpritePart.cpp | 38 +++++++++++++-------------- 18 files changed, 150 insertions(+), 150 deletions(-) diff --git a/include/Athena/ALTTPEnums.hpp b/include/Athena/ALTTPEnums.hpp index c5f557c..9bdb74b 100644 --- a/include/Athena/ALTTPEnums.hpp +++ b/include/Athena/ALTTPEnums.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 +// along with libAthena. If not, see #ifndef __ALTTP_ENUMS_HPP__ #define __ALTTP_ENUMS_HPP__ diff --git a/include/Athena/ALTTPFile.hpp b/include/Athena/ALTTPFile.hpp index 8c88bf5..d952ff6 100644 --- a/include/Athena/ALTTPFile.hpp +++ b/include/Athena/ALTTPFile.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 +// along with libAthena. If not, see #ifndef __ALTTP_FILE_HPP__ #define __ALTTP_FILE_HPP__ diff --git a/include/Athena/ALTTPFileReader.hpp b/include/Athena/ALTTPFileReader.hpp index b105d49..0d4b406 100644 --- a/include/Athena/ALTTPFileReader.hpp +++ b/include/Athena/ALTTPFileReader.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 +// along with libAthena. If not, see #ifndef __ALTTP_FILE_READER_HPP__ #define __ALTTP_FILE_READER_HPP__ diff --git a/include/Athena/ALTTPFileWriter.hpp b/include/Athena/ALTTPFileWriter.hpp index 8a60b94..bf35f22 100644 --- a/include/Athena/ALTTPFileWriter.hpp +++ b/include/Athena/ALTTPFileWriter.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 +// along with libAthena. If not, see #ifndef __ALTTP_FILE_WRITER_HPP__ #define __ALTTP_FILE_WRITER_HPP__ diff --git a/include/Athena/ALTTPQuest.hpp b/include/Athena/ALTTPQuest.hpp index d8e27d1..e3c123a 100644 --- a/include/Athena/ALTTPQuest.hpp +++ b/include/Athena/ALTTPQuest.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 +// along with libAthena. If not, see #ifndef __ALTTP_QUEST_HPP__ #define __ALTTP_QUEST_HPP__ diff --git a/include/Athena/ALTTPStructs.hpp b/include/Athena/ALTTPStructs.hpp index 1123fc7..bc41d62 100644 --- a/include/Athena/ALTTPStructs.hpp +++ b/include/Athena/ALTTPStructs.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 +// along with libAthena. If not, see #ifndef __ALTTP_STRUCTS_HPP__ #define __ALTTP_STRUCTS_HPP__ diff --git a/include/Athena/BinaryReader.hpp b/include/Athena/BinaryReader.hpp index 8edbeaa..b47b540 100644 --- a/include/Athena/BinaryReader.hpp +++ b/include/Athena/BinaryReader.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 +// along with libAthena. If not, see #ifndef __BINARYREADER_HPP__ #define __BINARYREADER_HPP__ diff --git a/include/Athena/Sprite.hpp b/include/Athena/Sprite.hpp index 1992a66..73a560e 100644 --- a/include/Athena/Sprite.hpp +++ b/include/Athena/Sprite.hpp @@ -16,7 +16,7 @@ #ifndef SSPRITE_HPP #define SSPRITE_HPP -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT #include #include #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 ids); -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT std::vector stateIds() const; #else QList 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 frames); #else void setFrames(QList frames); #endif Uint32 frameCount() const; -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT std::vector frames() const; #else QList 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 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 diff --git a/include/Athena/SpriteFile.hpp b/include/Athena/SpriteFile.hpp index 8ed39ea..1d19b0c 100644 --- a/include/Athena/SpriteFile.hpp +++ b/include/Athena/SpriteFile.hpp @@ -16,7 +16,7 @@ #ifndef SSPRITEFILE_HPP #define SSPRITEFILE_HPP -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT #include #include #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 textures() const; #else QList textures() const; @@ -222,7 +222,7 @@ public slots: * \param textures */ -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT void setTextures(std::vector textures); #else void setTextures(QList 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 sprites); #else void setSprites(QMap sprites); #endif -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT Sprite* sprite(const std::string& name); std::unordered_map 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 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 diff --git a/include/Athena/SpriteFrame.hpp b/include/Athena/SpriteFrame.hpp index 752a7bb..a93aced 100644 --- a/include/Athena/SpriteFrame.hpp +++ b/include/Athena/SpriteFrame.hpp @@ -19,7 +19,7 @@ #include "Athena/Global.hpp" -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT #include #else #include @@ -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 parts); std::vector 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 m_parts; #else QList 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 diff --git a/include/Athena/SpritePart.hpp b/include/Athena/SpritePart.hpp index 11630d9..2ec0fc4 100644 --- a/include/Athena/SpritePart.hpp +++ b/include/Athena/SpritePart.hpp @@ -17,7 +17,7 @@ #define SSPRITEPART_HPP #include "Athena/Global.hpp" -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT # include #else # include @@ -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 diff --git a/src/Athena/Compression.cpp b/src/Athena/Compression.cpp index 2bb284a..2403252 100644 --- a/src/Athena/Compression.cpp +++ b/src/Athena/Compression.cpp @@ -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 +// along with libAthena. If not, see #include "Athena/Compression.hpp" #include "Athena/Exception.hpp" diff --git a/src/Athena/Sprite.cpp b/src/Athena/Sprite.cpp index e220b8a..0119269 100644 --- a/src/Athena/Sprite.cpp +++ b/src/Athena/Sprite.cpp @@ -18,7 +18,7 @@ #include "Athena/SpriteFile.hpp" #include -#ifdef LIBZELDA_USE_QT +#ifdef ATHENA_USE_QT #include #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 ids) if (ids.size() == 0) return; -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT m_stateIds = ids; #else m_stateIds = QList::fromVector(QVector::fromStdVector(ids)); #endif } -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT std::vector Sprite::stateIds() const #else QList 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::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 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 Sprite::frames() const #else QList 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 } diff --git a/src/Athena/SpriteFile.cpp b/src/Athena/SpriteFile.cpp index 9589ab1..6f932eb 100644 --- a/src/Athena/SpriteFile.cpp +++ b/src/Athena/SpriteFile.cpp @@ -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 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 SpriteFile::textures() const #else QList 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 sprites) { if (sprites.size() == 0) @@ -265,7 +265,7 @@ void SpriteFile::setSprites(QMap 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 SpriteFile::sprites() const #else QMap 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 textures) { if (textures.size() == 0) diff --git a/src/Athena/SpriteFileReader.cpp b/src/Athena/SpriteFileReader.cpp index a2cb1c6..d3918f6 100644 --- a/src/Athena/SpriteFileReader.cpp +++ b/src/Athena/SpriteFileReader.cpp @@ -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 textures; #else QList 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 sprites; #else QMap 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 frames; #else QList frames; @@ -151,7 +151,7 @@ Sakura::SpriteFile* SpriteFileReader::readFile() Uint16 partCount = base::readUint16(); -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT std::vector parts; #else QList 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()); diff --git a/src/Athena/SpriteFileWriter.cpp b/src/Athena/SpriteFileWriter.cpp index e34bf43..2407629 100644 --- a/src/Athena/SpriteFileWriter.cpp +++ b/src/Athena/SpriteFileWriter.cpp @@ -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 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); diff --git a/src/Athena/SpriteFrame.cpp b/src/Athena/SpriteFrame.cpp index 97f89f7..0cd22c1 100644 --- a/src/Athena/SpriteFrame.cpp +++ b/src/Athena/SpriteFrame.cpp @@ -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 parts) #else void SpriteFrame::setParts(QList parts) @@ -48,7 +48,7 @@ void SpriteFrame::setParts(QList parts) m_parts = parts; } -#ifndef LIBZELDA_USE_QT +#ifndef ATHENA_USE_QT std::vector SpriteFrame::parts() const #else QList SpriteFrame::parts() const diff --git a/src/Athena/SpritePart.cpp b/src/Athena/SpritePart.cpp index d77e0c0..accc9f0 100644 --- a/src/Athena/SpritePart.cpp +++ b/src/Athena/SpritePart.cpp @@ -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 }