mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-26 17:54:42 +00:00
Merge branch 'engine' of github.com:QuasarApp/Snake into engine
This commit is contained in:
commit
8f4043f5df
@ -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();
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef ICONTROL_H
|
||||
#define ICONTROL_H
|
||||
|
||||
#include <QObject>
|
||||
#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)
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <QString>
|
||||
#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)
|
||||
|
@ -2,12 +2,13 @@
|
||||
#define IWORLDITEM_H
|
||||
|
||||
#include <SnakeProject/guiobject.h>
|
||||
#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();
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user