mirror of https://github.com/libAthena/athena.git
Fix non-Qt build
This commit is contained in:
parent
f77b394c6b
commit
77599bad3a
|
@ -38,7 +38,7 @@ public:
|
|||
* \param filename The path of the offending file.
|
||||
*/
|
||||
inline FileNotFoundException(const std::string& filename) :
|
||||
Exception("FileNotFoundException:\nCouldn't not find \"" + filename + "\", please check that it exists."),
|
||||
Exception("Couldn't find \"" + filename + "\", please check that it exists."),
|
||||
m_filename(filename)
|
||||
{}
|
||||
|
||||
|
@ -53,4 +53,10 @@ private:
|
|||
} // error
|
||||
} // zelda
|
||||
|
||||
#define THROW_FILENOTFOUND_EXCEPTION(msg) \
|
||||
do \
|
||||
{ \
|
||||
throw zelda::error::FileNotFoundException(__LINE_STRING__ " " __FILE__ " " msg); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -41,10 +41,17 @@ public:
|
|||
* \param message The error message to throw
|
||||
*/
|
||||
inline IOException(const std::string& message) :
|
||||
Exception("IOException: " + message)
|
||||
Exception(message)
|
||||
{}
|
||||
};
|
||||
|
||||
} // error
|
||||
} // zelda
|
||||
|
||||
#define THROW_IO_EXCEPTION(msg) \
|
||||
do \
|
||||
{ \
|
||||
throw zelda::error::IOException(__LINE_STRING__ " " __FILE__ " " msg); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
* \param error The error message to throw
|
||||
*/
|
||||
inline InvalidOperationException(const std::string& error)
|
||||
: Exception("InvalidOperationException:\n" + error)
|
||||
: Exception(error)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -48,4 +48,10 @@ public:
|
|||
} // error
|
||||
} // zelda
|
||||
|
||||
#define THROW_INVALIDOPERATION_EXCEPTION(msg) \
|
||||
do \
|
||||
{ \
|
||||
throw zelda::error::InvalidOperationException(__LINE_STRING__ " " __FILE__ " " msg); \
|
||||
} while(0)
|
||||
|
||||
#endif // __INVALID_OPERATION_EXCEPTION_HPP__
|
||||
|
|
|
@ -149,7 +149,7 @@ public slots:
|
|||
* \param origin
|
||||
*/
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
void setOrigin(const Vector2Di& origin);
|
||||
void setOrigin(const Vector2Df& origin);
|
||||
#else
|
||||
void setOrigin(const QPoint& origin);
|
||||
#endif
|
||||
|
|
|
@ -42,8 +42,8 @@ HEADERS += \
|
|||
$$PWD/include/ZQuestFileWriter.hpp \
|
||||
$$PWD/include/ZQuestFileReader.hpp \
|
||||
$$PWD/include/Compression.hpp \
|
||||
$$PWD/include/lzo.h \
|
||||
$$PWD/include/WiiImage.hpp \
|
||||
$$PWD/include/lzo.h \
|
||||
$$PWD/include/WiiImage.hpp \
|
||||
$$PWD/include/ZQuestFile.hpp \
|
||||
$$PWD/include/Checksums.hpp \
|
||||
$$PWD/include/SkywardSwordFile.hpp \
|
||||
|
@ -56,7 +56,7 @@ HEADERS += \
|
|||
$$PWD/include/SpriteFileWriter.hpp \
|
||||
$$PWD/include/SpriteFrame.hpp \
|
||||
$$PWD/include/SpritePart.hpp \
|
||||
../libzelda/include/InvalidDataException.hpp
|
||||
$$PWD/include/InvalidDataException.hpp
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/src/utility.cpp \
|
||||
|
@ -84,7 +84,7 @@ SOURCES += \
|
|||
$$PWD/src/ZQuestFileWriter.cpp \
|
||||
$$PWD/src/ZQuestFileReader.cpp \
|
||||
$$PWD/src/Compression.cpp \
|
||||
$$PWD/src/lzo.c \
|
||||
$$PWD/src/lzo.c \
|
||||
$$PWD/src/WiiImage.cpp \
|
||||
$$PWD/src/ZQuestFile.cpp \
|
||||
$$PWD/src/Checksums.cpp \
|
||||
|
|
|
@ -3,7 +3,7 @@ TEMPLATE= lib
|
|||
DESTDIR = ./lib
|
||||
|
||||
# Uncomment this if you wish to use Qt with libZelda
|
||||
DEFINES += LIBZELDA_USE_QT
|
||||
#DEFINES += LIBZELDA_USE_QT
|
||||
|
||||
contains(DEFINES, LIBZELDA_USE_QT){
|
||||
QT += core
|
||||
|
|
|
@ -219,7 +219,7 @@ Uint32 Sprite::frameCount() const
|
|||
}
|
||||
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
std::vector<SpritePart*> Sprite::frames() const
|
||||
std::vector<SpriteFrame*> Sprite::frames() const
|
||||
#else
|
||||
QList<SpriteFrame*> Sprite::frames() const
|
||||
#endif
|
||||
|
|
|
@ -126,7 +126,7 @@ QPoint SpritePart::textureOffset() const
|
|||
void SpritePart::setSize(Uint32 width, Uint32 height)
|
||||
{
|
||||
#ifndef LIBZELDA_USE_QT
|
||||
setSize(Vector2Df(width, height));
|
||||
setSize(Vector2Di(width, height));
|
||||
#else
|
||||
setSize(QSize(width, height));
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue