mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
VideoCommon: move factory names to be a static inside each action class, so that they can be reused in the future for serialization
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <picojson.h>
|
||||
@ -21,6 +22,7 @@ public:
|
||||
std::string m_pixel_material_asset;
|
||||
};
|
||||
|
||||
static constexpr std::string_view factory_name = "custom_pipeline";
|
||||
static std::unique_ptr<CustomPipelineAction>
|
||||
Create(const picojson::value& json_data,
|
||||
std::shared_ptr<VideoCommon::CustomAssetLibrary> library);
|
||||
|
@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include <picojson.h>
|
||||
|
||||
@ -12,6 +13,7 @@
|
||||
class MoveAction final : public GraphicsModAction
|
||||
{
|
||||
public:
|
||||
static constexpr std::string_view factory_name = "move";
|
||||
static std::unique_ptr<MoveAction> Create(const picojson::value& json_data);
|
||||
explicit MoveAction(Common::Vec3 position_offset);
|
||||
void OnProjection(GraphicsModActionData::Projection* projection) override;
|
||||
|
@ -3,11 +3,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "VideoCommon/GraphicsModSystem/Runtime/GraphicsModAction.h"
|
||||
|
||||
class PrintAction final : public GraphicsModAction
|
||||
{
|
||||
public:
|
||||
static constexpr std::string_view factory_name = "print";
|
||||
void OnDrawStarted(GraphicsModActionData::DrawStarted*) override;
|
||||
void OnEFB(GraphicsModActionData::EFB*) override;
|
||||
void OnProjection(GraphicsModActionData::Projection*) override;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include <picojson.h>
|
||||
|
||||
@ -12,6 +13,7 @@
|
||||
class ScaleAction final : public GraphicsModAction
|
||||
{
|
||||
public:
|
||||
static constexpr std::string_view factory_name = "scale";
|
||||
static std::unique_ptr<ScaleAction> Create(const picojson::value& json_data);
|
||||
explicit ScaleAction(Common::Vec3 scale);
|
||||
void OnEFB(GraphicsModActionData::EFB*) override;
|
||||
|
@ -8,6 +8,7 @@
|
||||
class SkipAction final : public GraphicsModAction
|
||||
{
|
||||
public:
|
||||
static constexpr std::string_view factory_name = "skip";
|
||||
void OnDrawStarted(GraphicsModActionData::DrawStarted*) override;
|
||||
void OnEFB(GraphicsModActionData::EFB*) override;
|
||||
};
|
||||
|
Reference in New Issue
Block a user