tmo commit for save changes

This commit is contained in:
Andrei Yankovich 2023-08-06 12:26:43 +02:00
parent dcf74f0bf5
commit 2c9df3de4d
39 changed files with 64 additions and 84 deletions

9
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "CMake"]
path = submodules/CMake
url = https://github.com/QuasarApp/CMake.git
[submodule "submodules/CMake"]
path = submodules/CMake
url = https://github.com/QuasarApp/CMake.git
[submodule "submodules/QuasarAppLib"]
path = submodules/QuasarAppLib
url = https://github.com/QuasarApp/QuasarAppLib.git

View File

@ -27,7 +27,7 @@ endif()
find_package(Qt6 COMPONENTS Core REQUIRED)
find_package(Qt6 COMPONENTS Test QUIET)
include(submodules/CMake/QuasarApp.cmake)
include(submodules/QuasarAppLib/CMake/QuasarApp.cmake)
updateGitVars()
set(BUTTERFLY_ENGINE_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
@ -35,18 +35,15 @@ set(BUTTERFLY_ENGINE_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
option(BUTTERFLY_ENGINE_TESTS "This option disables or enables tests of the ${PROJECT_NAME} project" ON)
option(BUTTERFLY_ENGINE_EXAMPLE "This option disables or enables example app of the ${PROJECT_NAME} project" ON)
if (ANDROID OR IOS OR NOT QT_VERSION_MAJOR OR QA_WASM32)
if (ANDROID OR IOS OR QA_WASM32)
set(BUTTERFLY_ENGINE_TESTS OFF CACHE BOOL "This option force disbled for ANDROID IOS QA_WASM32 and Not Qt projects" FORCE)
endif()
if (NOT QT_VERSION_MAJOR)
set(BUTTERFLY_ENGINE_EXAMPLE OFF CACHE BOOL "This option force disbled for Not Qt projects" FORCE)
endif()
make_directory(Distro)
initAll()
add_subdirectory(submodules/QuasarAppLib)
add_subdirectory(src/engine)
if (DEFINED BUTTERFLY_ENGINE_EXAMPLE)

View File

@ -1,31 +1,28 @@
<RCC>
<qresource prefix="/">
<file>CrawlModule/qmldir</file>
<file>CrawlModule/Crawl.qml</file>
<file>CrawlModule/GraphicItem.qml</file>
<file>CrawlModule/MainMenu.qml</file>
<file>CrawlModule/MainMenuButton.qml</file>
<file>CrawlModule/Metrix.qml</file>
<file>CrawlModule/PagePopUp.qml</file>
<file>CrawlModule/Scene.qml</file>
<file>CrawlModule/SettingsView.qml</file>
<file>CrawlModule/SnakeItem.qml</file>
<file>CrawlModule/DefaultMenu.qml</file>
<file>CrawlModule/AbstractMenuView.qml</file>
<file>CrawlModule/Light.qml</file>
<file>CrawlModule/DayLight.qml</file>
<file>CrawlModule/particles/ParticleEffect.qml</file>
<file>CrawlModule/particles/CrawlVectorDirection.qml</file>
<file>CrawlModule/particles/CrawlTargetDirection.qml</file>
<file>CrawlModule/particles/FireParticel.qml</file>
<file>CrawlCoreAssets/particles/fireColorTable.png</file>
<file>CrawlCoreAssets/particles/sphere.png</file>
<file>CrawlCoreAssets/particles/smokeSprite.png</file>
<file>CrawlModule/particles/Fire.qml</file>
<file>CrawlModule/particles/Wint.qml</file>
<file>CrawlModule/PreviewControl.qml</file>
<file>CrawlModule/StoreView.qml</file>
<file>CrawlModule/SelectLevelView.qml</file>
<file>src/ButterflyEngineModule/qmldir</file>
<file>src/ButterflyEngineModule/Crawl.qml</file>
<file>src/ButterflyEngineModule/GraphicItem.qml</file>
<file>src/ButterflyEngineModule/MainMenu.qml</file>
<file>src/ButterflyEngineModule/MainMenuButton.qml</file>
<file>src/ButterflyEngineModule/Metrix.qml</file>
<file>src/ButterflyEngineModule/PagePopUp.qml</file>
<file>src/ButterflyEngineModule/Scene.qml</file>
<file>src/ButterflyEngineModule/SettingsView.qml</file>
<file>src/ButterflyEngineModule/SnakeItem.qml</file>
<file>src/ButterflyEngineModule/DefaultMenu.qml</file>
<file>src/ButterflyEngineModule/AbstractMenuView.qml</file>
<file>src/ButterflyEngineModule/Light.qml</file>
<file>src/ButterflyEngineModule/DayLight.qml</file>
<file>src/ButterflyEngineModule/particles/ParticleEffect.qml</file>
<file>src/ButterflyEngineModule/particles/CrawlVectorDirection.qml</file>
<file>src/ButterflyEngineModule/particles/CrawlTargetDirection.qml</file>
<file>src/ButterflyEngineModule/particles/FireParticel.qml</file>
<file>src/ButterflyEngineModule/particles/Fire.qml</file>
<file>src/ButterflyEngineModule/particles/Wint.qml</file>
<file>src/ButterflyEngineModule/PreviewControl.qml</file>
<file>src/ButterflyEngineModule/StoreView.qml</file>
<file>src/ButterflyEngineModule/SelectLevelView.qml</file>
</qresource>
<qresource prefix="/ButterflyEngineTr">
<file>languages/en.qm</file>

View File

@ -13,24 +13,18 @@ add_definitions(-DBUTTERFLY_ENGINE_LIBRARY)
file(GLOB_RECURSE SOURCE_CPP
"src/*.cpp"
"src/*.h"
)
if (${QT_VERSION_MAJOR})
file(GLOB_RECURSE SOURCE_QRC
"*.qrc"
)
endif()
set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/public")
set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/private")
add_library(${CURRENT_PROJECT} ${SOURCE_CPP} ${SOURCE_QRC})
add_library(${CURRENT_PROJECT} ${SOURCE_CPP} )
find_package(Qt6 COMPONENTS Quick REQUIRED)
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt6::Core Qt6::Quick QuasarApp)
if (${QT_VERSION_MAJOR})
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt${QT_VERSION_MAJOR}::Core )
endif()
target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR})
target_include_directories(${CURRENT_PROJECT} PRIVATE ${PRIVATE_INCUDE_DIR})

View File

@ -5,9 +5,7 @@
//# of this license document, but changing it is not allowed.
//#
#include "availablelevelsmodel.h"
#include "engine.h"
#include "mainmenumodel.h"
#include <QQmlComponent>
#include <Crawl/guiobject.h>
@ -25,7 +23,6 @@ namespace ButterflyEngine {
Engine::Engine(QObject *parent): QObject(parent) {
_store = new Store();
_menu = new MainMenuModel();
setNewUser(new User());
@ -40,7 +37,6 @@ Engine::~Engine() {
_availableLvls.clear();
delete _menu;
delete _currentUser;
}
@ -70,8 +66,7 @@ void Engine::setLevel(ILevel *world) {
}
if (!_currentLevel->world()) {
QuasarAppUtils::Params::log("Failed to init world. The World Object is null: " +
_currentLevel->world()->itemName(),
QuasarAppUtils::Params::log("Failed to init world. The World Object is null: ",
QuasarAppUtils::Error);
_currentLevel = nullptr;

View File

@ -11,8 +11,8 @@
#include <QFuture>
#include <QObject>
#include <QQmlEngine>
#include <Crawl/diff.h>
#include <Crawl/ilevel.h>
#include <ButterflyEngine/core/diff.h>
#include <ButterflyEngine/interfaces/ilevel.h>
namespace ButterflyEngine {
@ -20,8 +20,6 @@ class IWorld;
class Store;
class StartData;
class User;
class StoreViewModel;
class MainMenuModel;
/**
* @brief The Engine class
@ -172,8 +170,6 @@ private:
ILevel* _currentLevel = nullptr;
QHash<int, ILevel*> _availableLvls;
MainMenuModel *_menu = nullptr;
User *_currentUser = nullptr;
Store *_store = nullptr;
};

View File

@ -8,7 +8,7 @@
#ifndef CLASTER_H
#define CLASTER_H
#include "Crawl/iworlditem.h"
#include "ButterflyEngine/interfaces/iworlditem.h"
namespace ButterflyEngine {

View File

@ -9,7 +9,7 @@
#ifndef PLAYER_H
#define PLAYER_H
#include "icontrol.h"
#include "ButterflyEngine/interfaces/icontrol.h"
namespace ButterflyEngine {

View File

@ -10,7 +10,7 @@
#include <QtCore/qglobal.h>
#define BUTTERFLY_ENGINE_VERSION "0.4.d1c1d18"
#define BUTTERFLY_ENGINE_VERSION "0.5.dcf74f0"
#if defined(BUTTERFLY_ENGINE_LIBRARY)
# define BUTTERFLY_ENGINE_EXPORT Q_DECL_EXPORT

View File

@ -8,7 +8,7 @@
#ifndef IAI_H
#define IAI_H
#include "global.h"
#include "ButterflyEngine/global.h"
namespace ButterflyEngine {

View File

@ -9,7 +9,7 @@
#define CRAWL_ICONTROL_H
#include <QObject>
#include "global.h"
#include "ButterflyEngine/global.h"
namespace ButterflyEngine {

View File

@ -12,7 +12,7 @@
#include <QList>
#include <QSet>
#include <QString>
#include "global.h"
#include "ButterflyEngine/global.h"
namespace ButterflyEngine {

View File

@ -5,11 +5,13 @@
//# of this license document, but changing it is not allowed.
//#
#include <QHash>
#ifndef LEVEL_H
#define LEVEL_H
#include "ButterflyEngine/global.h"
#include <QHash>
namespace ButterflyEngine {
@ -22,7 +24,7 @@ class IPreviewScaneWorld;
* All levels libraries should be override this interface.
*
*/
class ILevel
class BUTTERFLY_ENGINE_EXPORT ILevel
{
public:
ILevel() = default;

View File

@ -8,7 +8,7 @@
#ifndef IPREVIEWSCANEWORLD_H
#define IPREVIEWSCANEWORLD_H
#include "iworld.h"
#include "ButterflyEngine/interfaces/iworld.h"
namespace ButterflyEngine {

View File

@ -8,7 +8,7 @@
#ifndef IRENDER_H
#define IRENDER_H
#include "global.h"
#include "ButterflyEngine/global.h"
#include "quasarapp.h"
namespace ButterflyEngine {

View File

@ -8,7 +8,7 @@
#ifndef CRAWL_IWORLD_H
#define CRAWL_IWORLD_H
#include "gameresult.h"
#include "ButterflyEngine/core/gameresult.h"
#include "iitem.h"
#include "playableobject.h"
#include "startdata.h"

View File

@ -8,7 +8,7 @@
#ifndef IWORLDITEM_H
#define IWORLDITEM_H
#include <Crawl/guiobject.h>
#include <ButterflyEngine/core/guiobject.h>
#include "global.h"
namespace ButterflyEngine {

View File

@ -5,7 +5,7 @@
//# of this license document, but changing it is not allowed.
//#
#include "clasteritem.h"
#include "ButterflyEngine/core/clasteritem.h"
#ifndef IWORLDLIGHT_H
#define IWORLDLIGHT_H

View File

@ -30,6 +30,8 @@ updateGitVars()
qt_add_executable(${CURRENT_PROJECT} ${ALL_SOURCES})
find_package(Qt6 COMPONENTS Quick REQUIRED)
target_link_libraries(${CURRENT_PROJECT} PUBLIC ${PROJECT_NAME}Engine)
target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR})

View File

@ -4,11 +4,11 @@
"src/build/Debug/ButterflyEngineEaxample.exe"
],
"clear": true,
"binPrefix": "/media/D/builds/build-ButterflyEngine-Desktop_Qt_6_5_2_GCC_64bit-Debug",
"binPrefix": "/home/andrei/git/build-ButterflyEngine-Desktop_Qt_6_5_2_GCC_64bit-Debug",
"libDir": [
"/media/D/builds/ButterflyEngine",
"/home/andrei/git/ButterflyEngine",
"/home/andrei/Qt/6.5.2/gcc_64",
"/media/D/builds/build-ButterflyEngine-Desktop_Qt_6_5_2_GCC_64bit-Debug"
"/home/andrei/git/build-ButterflyEngine-Desktop_Qt_6_5_2_GCC_64bit-Debug"
],
"recursiveDepth": "10",
"deploySystem": false,
@ -17,11 +17,11 @@
"qif": true,
"zip": true,
"ignoreEnv": [
"/media/D/builds/ButterflyEngine/Distro"
"/home/andrei/git/ButterflyEngine/Distro"
],
"extraLib": "crypto",
"targetDir": "/media/D/builds/ButterflyEngine/Distro",
"deployVersion": "0.4.d1c1d18",
"targetDir": "/home/andrei/git/ButterflyEngine/Distro",
"deployVersion": "0.5.dcf74f0",
}

View File

@ -8,8 +8,8 @@
#ifndef DEFAULTBACKGROUNDAI_H
#define DEFAULTBACKGROUNDAI_H
#include "Crawl/defaultcontrol.h"
#include <Crawl/iai.h>
#include "ButterflyEngine/core/defaultcontrol.h"
#include <ButterflyEngine/interfaces/iai.h>
class QTimer;
namespace ButterflyEngine {

View File

@ -5,7 +5,7 @@
//# of this license document, but changing it is not allowed.
//#
#include <listviewmodel.h>
#include <ButterflyEngine/core/listviewmodel.h>
#include "availablelevelsmodel.h"
#include "mainmenumodel.h"
#include "settingsviewmodel.h"

@ -1 +0,0 @@
Subproject commit 3b89e311c350868cead4bf2a36fd557989716043

@ -0,0 +1 @@
Subproject commit 53a67709ff90b544036cb90edbfe8cb1ded6dc0b