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.
|
* \param filename The path of the offending file.
|
||||||
*/
|
*/
|
||||||
inline FileNotFoundException(const std::string& filename) :
|
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)
|
m_filename(filename)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -53,4 +53,10 @@ private:
|
||||||
} // error
|
} // error
|
||||||
} // zelda
|
} // zelda
|
||||||
|
|
||||||
|
#define THROW_FILENOTFOUND_EXCEPTION(msg) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
throw zelda::error::FileNotFoundException(__LINE_STRING__ " " __FILE__ " " msg); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -41,10 +41,17 @@ public:
|
||||||
* \param message The error message to throw
|
* \param message The error message to throw
|
||||||
*/
|
*/
|
||||||
inline IOException(const std::string& message) :
|
inline IOException(const std::string& message) :
|
||||||
Exception("IOException: " + message)
|
Exception(message)
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // error
|
} // error
|
||||||
} // zelda
|
} // zelda
|
||||||
|
|
||||||
|
#define THROW_IO_EXCEPTION(msg) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
throw zelda::error::IOException(__LINE_STRING__ " " __FILE__ " " msg); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
* \param error The error message to throw
|
* \param error The error message to throw
|
||||||
*/
|
*/
|
||||||
inline InvalidOperationException(const std::string& error)
|
inline InvalidOperationException(const std::string& error)
|
||||||
: Exception("InvalidOperationException:\n" + error)
|
: Exception(error)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -48,4 +48,10 @@ public:
|
||||||
} // error
|
} // error
|
||||||
} // zelda
|
} // zelda
|
||||||
|
|
||||||
|
#define THROW_INVALIDOPERATION_EXCEPTION(msg) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
throw zelda::error::InvalidOperationException(__LINE_STRING__ " " __FILE__ " " msg); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
#endif // __INVALID_OPERATION_EXCEPTION_HPP__
|
#endif // __INVALID_OPERATION_EXCEPTION_HPP__
|
||||||
|
|
|
@ -149,7 +149,7 @@ public slots:
|
||||||
* \param origin
|
* \param origin
|
||||||
*/
|
*/
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef LIBZELDA_USE_QT
|
||||||
void setOrigin(const Vector2Di& origin);
|
void setOrigin(const Vector2Df& origin);
|
||||||
#else
|
#else
|
||||||
void setOrigin(const QPoint& origin);
|
void setOrigin(const QPoint& origin);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -56,7 +56,7 @@ HEADERS += \
|
||||||
$$PWD/include/SpriteFileWriter.hpp \
|
$$PWD/include/SpriteFileWriter.hpp \
|
||||||
$$PWD/include/SpriteFrame.hpp \
|
$$PWD/include/SpriteFrame.hpp \
|
||||||
$$PWD/include/SpritePart.hpp \
|
$$PWD/include/SpritePart.hpp \
|
||||||
../libzelda/include/InvalidDataException.hpp
|
$$PWD/include/InvalidDataException.hpp
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/src/utility.cpp \
|
$$PWD/src/utility.cpp \
|
||||||
|
|
|
@ -3,7 +3,7 @@ TEMPLATE= lib
|
||||||
DESTDIR = ./lib
|
DESTDIR = ./lib
|
||||||
|
|
||||||
# Uncomment this if you wish to use Qt with libZelda
|
# Uncomment this if you wish to use Qt with libZelda
|
||||||
DEFINES += LIBZELDA_USE_QT
|
#DEFINES += LIBZELDA_USE_QT
|
||||||
|
|
||||||
contains(DEFINES, LIBZELDA_USE_QT){
|
contains(DEFINES, LIBZELDA_USE_QT){
|
||||||
QT += core
|
QT += core
|
||||||
|
|
|
@ -219,7 +219,7 @@ Uint32 Sprite::frameCount() const
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef LIBZELDA_USE_QT
|
||||||
std::vector<SpritePart*> Sprite::frames() const
|
std::vector<SpriteFrame*> Sprite::frames() const
|
||||||
#else
|
#else
|
||||||
QList<SpriteFrame*> Sprite::frames() const
|
QList<SpriteFrame*> Sprite::frames() const
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -126,7 +126,7 @@ QPoint SpritePart::textureOffset() const
|
||||||
void SpritePart::setSize(Uint32 width, Uint32 height)
|
void SpritePart::setSize(Uint32 width, Uint32 height)
|
||||||
{
|
{
|
||||||
#ifndef LIBZELDA_USE_QT
|
#ifndef LIBZELDA_USE_QT
|
||||||
setSize(Vector2Df(width, height));
|
setSize(Vector2Di(width, height));
|
||||||
#else
|
#else
|
||||||
setSize(QSize(width, height));
|
setSize(QSize(width, height));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue