mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
chore: fix inconsistencies
This commit is contained in:
parent
bf74a94420
commit
bf44e7d7f0
@ -29,6 +29,7 @@ struct EffectPass {
|
||||
/** The target this material renders to (if specified) */
|
||||
std::optional <std::string> target;
|
||||
};
|
||||
|
||||
struct Effect {
|
||||
/** Effect's name for the UI */
|
||||
std::string name;
|
||||
|
@ -7,13 +7,14 @@
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "Types.h"
|
||||
#include "Effect.h"
|
||||
#include "UserSetting.h"
|
||||
#include "Material.h"
|
||||
#include "Model.h"
|
||||
#include "Effect.h"
|
||||
#include "WallpaperEngine/Data/Utils/TypeCaster.h"
|
||||
|
||||
namespace WallpaperEngine::Data::Model {
|
||||
using TypeCaster = WallpaperEngine::Data::Utils::TypeCaster;
|
||||
using namespace WallpaperEngine::Data::Utils;
|
||||
|
||||
struct ObjectData {
|
||||
int id;
|
||||
@ -48,7 +49,7 @@ struct ImageEffectPassOverride {
|
||||
int id;
|
||||
ComboMap combos;
|
||||
ShaderConstantMap constants;
|
||||
std::map <int, std::string> textures;
|
||||
TextureMap textures;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -10,7 +10,6 @@ namespace WallpaperEngine::Data::Model {
|
||||
* Represents a wallpaper engine project
|
||||
*/
|
||||
struct Project {
|
||||
public:
|
||||
enum Type {
|
||||
Type_Scene = 0,
|
||||
Type_Web = 1,
|
||||
|
@ -60,7 +60,7 @@ class PropertyBoolean : public Property {
|
||||
class PropertyColor : public Property {
|
||||
public:
|
||||
explicit PropertyColor (PropertyData data, std::string value) : Property (std::move(data)) {
|
||||
this->update (value);
|
||||
this->PropertyColor::update (value);
|
||||
}
|
||||
|
||||
using Property::update;
|
||||
@ -113,7 +113,7 @@ class PropertyColor : public Property {
|
||||
class PropertyCombo : public Property, ComboData {
|
||||
public:
|
||||
PropertyCombo (PropertyData data, ComboData comboData, std::string value) : Property (std::move(data)), ComboData (std::move(comboData)) {
|
||||
this->update (value);
|
||||
this->PropertyCombo::update (value);
|
||||
}
|
||||
|
||||
using Property::update;
|
||||
@ -139,7 +139,7 @@ class PropertyText : public Property {
|
||||
class PropertySceneTexture : public Property {
|
||||
public:
|
||||
explicit PropertySceneTexture (PropertyData data, std::string value) : Property (std::move(data)) {
|
||||
this->update (value);
|
||||
this->PropertySceneTexture::update (value);
|
||||
}
|
||||
|
||||
void update(const std::string& value) override {
|
||||
|
@ -14,7 +14,7 @@ class Wallpaper;
|
||||
class Scene;
|
||||
class Web;
|
||||
class Video;
|
||||
class UserSetting;
|
||||
struct UserSetting;
|
||||
class Object;
|
||||
class Sound;
|
||||
class Image;
|
||||
|
@ -8,12 +8,11 @@
|
||||
|
||||
namespace WallpaperEngine::Data::Model {
|
||||
struct ConditionInfo {
|
||||
public:
|
||||
std::string name;
|
||||
std::string condition;
|
||||
};
|
||||
|
||||
struct UserSetting {
|
||||
public:
|
||||
/**
|
||||
* The value of this setting, can be a few different things:
|
||||
* - a value connected to the property
|
||||
|
@ -8,11 +8,9 @@
|
||||
#include "Types.h"
|
||||
#include "Object.h"
|
||||
#include "WallpaperEngine/Data/Utils/TypeCaster.h"
|
||||
#include "WallpaperEngine/Data/JSON.h"
|
||||
|
||||
namespace WallpaperEngine::Data::Model {
|
||||
using json = WallpaperEngine::Data::JSON::JSON;
|
||||
using TypeCaster = WallpaperEngine::Data::Utils::TypeCaster;
|
||||
using namespace WallpaperEngine::Data::Utils;
|
||||
|
||||
struct WallpaperData {
|
||||
std::string filename;
|
||||
@ -110,10 +108,8 @@ struct SceneData {
|
||||
|
||||
class Scene : public Wallpaper, public SceneData {
|
||||
public:
|
||||
explicit Scene (WallpaperData data, SceneData sceneData) noexcept : SceneData (std::move(sceneData)), Wallpaper (data) {}
|
||||
explicit Scene (WallpaperData data, SceneData sceneData) noexcept : Wallpaper (std::move (data)), SceneData (std::move (sceneData)) {}
|
||||
|
||||
~Scene () override = default;
|
||||
|
||||
// TODO: ADD OBJECTS HERE
|
||||
};
|
||||
} // namespace WallpaperEngine::Data::Model
|
||||
|
@ -17,6 +17,7 @@ using namespace WallpaperEngine::Render;
|
||||
using namespace WallpaperEngine::Data::Model;
|
||||
using namespace WallpaperEngine::Data::Parsers;
|
||||
using namespace WallpaperEngine::Render::Wallpapers;
|
||||
using JSON = WallpaperEngine::Data::JSON::JSON;
|
||||
|
||||
CScene::CScene (
|
||||
const Wallpaper& wallpaper, CRenderContext& context, CAudioContext& audioContext,
|
||||
@ -88,7 +89,7 @@ CScene::CScene (
|
||||
const auto bloomOrigin = glm::vec3 { sceneWidth / 2, sceneHeight / 2, 0.0f };
|
||||
const auto bloomSize = glm::vec2 { sceneWidth, sceneHeight };
|
||||
|
||||
const nlohmann::json bloom = {
|
||||
const JSON bloom = {
|
||||
{"image", "models/wpenginelinux.json"},
|
||||
{"name", "bloomimagewpenginelinux"},
|
||||
{"visible", true},
|
||||
@ -98,14 +99,14 @@ CScene::CScene (
|
||||
{"size", std::to_string (bloomSize.x) + " " + std::to_string (bloomSize.y)},
|
||||
{"id", -1},
|
||||
{"effects",
|
||||
json::array (
|
||||
JSON::array (
|
||||
{
|
||||
{
|
||||
{"file", "effects/wpenginelinux/bloomeffect.json"},
|
||||
{"id", 15242000},
|
||||
{"name", ""},
|
||||
{"passes",
|
||||
json::array (
|
||||
JSON::array (
|
||||
{
|
||||
{
|
||||
{"constantshadervalues",
|
||||
|
Loading…
Reference in New Issue
Block a user