diff --git a/src/Core/SnakeProject/defaultcontrol.h b/src/Core/SnakeProject/defaultcontrol.h index 5fc19b2..1e8466f 100644 --- a/src/Core/SnakeProject/defaultcontrol.h +++ b/src/Core/SnakeProject/defaultcontrol.h @@ -2,11 +2,12 @@ #define DEFAULTCONTROL_H #include "icontrol.h" +#include "global.h" /** * @brief The DefaultControl class This class contains default implementation of the game menu. */ -class DefaultControl : public IControl { +class SNAKEPROJECT_EXPORT DefaultControl : public IControl { Q_OBJECT public: DefaultControl(); diff --git a/src/Core/SnakeProject/guiobject.h b/src/Core/SnakeProject/guiobject.h index 9f80259..3c67bf2 100644 --- a/src/Core/SnakeProject/guiobject.h +++ b/src/Core/SnakeProject/guiobject.h @@ -11,8 +11,7 @@ /** * @brief The GuiObject class This base model for gui objects. */ -class GuiObject: public QObject, public IRender -{ +class SNAKEPROJECT_EXPORT GuiObject: public QObject, public IRender { Q_OBJECT Q_PROPERTY(QString color READ color WRITE setColor NOTIFY colorChanged) Q_PROPERTY(int guiId READ guiId NOTIFY guiIdChanged) diff --git a/src/Core/SnakeProject/iai.h b/src/Core/SnakeProject/iai.h index e827b5c..1fe6fd3 100644 --- a/src/Core/SnakeProject/iai.h +++ b/src/Core/SnakeProject/iai.h @@ -1,6 +1,8 @@ #ifndef IAI_H #define IAI_H +#include "global.h" + /** * @brief The IAI class Is default interface for ai classes. * @note example of use : @@ -11,7 +13,7 @@ * } * ``` */ -class IAI { +class SNAKEPROJECT_EXPORT IAI { public: IAI(); virtual ~IAI() = default; diff --git a/src/Core/SnakeProject/icontrol.h b/src/Core/SnakeProject/icontrol.h index 446e41c..7f7cbd9 100644 --- a/src/Core/SnakeProject/icontrol.h +++ b/src/Core/SnakeProject/icontrol.h @@ -1,6 +1,8 @@ #ifndef ICONTROL_H #define ICONTROL_H + #include +#include "global.h" /** * @brief The IControl class This interface should be contains implementation of custom user interface @@ -11,7 +13,7 @@ * For more information see the DefaultControl class. * */ -class IControl : public QObject { +class SNAKEPROJECT_EXPORT IControl : public QObject { Q_OBJECT Q_PROPERTY(QString view READ view NOTIFY viewChanged) diff --git a/src/Core/SnakeProject/iground.h b/src/Core/SnakeProject/iground.h index 9358158..757cfc7 100644 --- a/src/Core/SnakeProject/iground.h +++ b/src/Core/SnakeProject/iground.h @@ -2,12 +2,12 @@ #define IGROUND_H #include "iworlditem.h" +#include "global.h" /** * @brief The IGround class This is one tile of the world. Any objects of this type created automatically for filing ground plain. */ -class IGround: public IWorldItem -{ +class SNAKEPROJECT_EXPORT IGround: public IWorldItem { public: IGround(); diff --git a/src/Core/SnakeProject/iplayer.h b/src/Core/SnakeProject/iplayer.h index 698cea5..4efb124 100644 --- a/src/Core/SnakeProject/iplayer.h +++ b/src/Core/SnakeProject/iplayer.h @@ -3,14 +3,14 @@ #include "gameresult.h" #include "iworlditem.h" +#include "global.h" class IControl; /** * @brief The IPlayer class This is base class of the player functions. */ -class IPlayer: public IWorldItem -{ +class SNAKEPROJECT_EXPORT IPlayer: public IWorldItem { Q_OBJECT public: IPlayer(); diff --git a/src/Core/SnakeProject/irender.h b/src/Core/SnakeProject/irender.h index f6ebd56..90da072 100644 --- a/src/Core/SnakeProject/irender.h +++ b/src/Core/SnakeProject/irender.h @@ -1,13 +1,13 @@ #ifndef IRENDER_H #define IRENDER_H +#include "global.h" /** * @brief The IRender class This interface provide render functionality for all objects. * @note Override the render method. */ -class IRender -{ +class SNAKEPROJECT_EXPORT IRender { public: IRender(); diff --git a/src/Core/SnakeProject/iworld.h b/src/Core/SnakeProject/iworld.h index fe82e5b..245ad7d 100644 --- a/src/Core/SnakeProject/iworld.h +++ b/src/Core/SnakeProject/iworld.h @@ -11,6 +11,7 @@ #include #include "irender.h" #include "diff.h" +#include "global.h" class IWorldItem; class IPlayer; @@ -39,7 +40,7 @@ struct WorldObjectWraper { /** * @brief The IWorld class use this interface for implementation your own game levels */ -class IWorld : public QObject, public IRender +class SNAKEPROJECT_EXPORT IWorld : public QObject, public IRender { Q_OBJECT Q_PROPERTY(QVector3D cameraReleativePosition READ cameraReleativePosition NOTIFY cameraReleativePositionChanged) diff --git a/src/Core/SnakeProject/iworlditem.h b/src/Core/SnakeProject/iworlditem.h index c99676f..b523816 100644 --- a/src/Core/SnakeProject/iworlditem.h +++ b/src/Core/SnakeProject/iworlditem.h @@ -2,12 +2,13 @@ #define IWORLDITEM_H #include +#include "global.h" class IWorld; /** * @brief The IWorldItem class This is World item. This class contains functions for control event system. */ -class IWorldItem: public GuiObject { +class SNAKEPROJECT_EXPORT IWorldItem: public GuiObject { Q_OBJECT public: IWorldItem(); diff --git a/src/Core/private/pluginloader.cpp b/src/Core/private/pluginloader.cpp index 24526fc..72e5703 100644 --- a/src/Core/private/pluginloader.cpp +++ b/src/Core/private/pluginloader.cpp @@ -17,7 +17,7 @@ IWorld* PluginLoader::load(const QString &pluginPath) { QuasarAppUtils::Params::log("Fail to load game module. Message: " + lib.errorString(), QuasarAppUtils::Error); - return {}; + return nullptr; } worldInstance worldFunc = (worldInstance)lib.resolve("worldInstance"); @@ -28,7 +28,7 @@ IWorld* PluginLoader::load(const QString &pluginPath) { QuasarAppUtils::Error); lib.unload(); - return {}; + return nullptr; } return worldFunc();