mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 13:07:42 +00:00
Character factory support classes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef __PSHAG_IFACTORY_HPP__
|
||||
#define __PSHAG_IFACTORY_HPP__
|
||||
#ifndef __URDE_IFACTORY_HPP__
|
||||
#define __URDE_IFACTORY_HPP__
|
||||
|
||||
#include <memory>
|
||||
#include "RetroTypes.hpp"
|
||||
@@ -9,11 +9,19 @@ namespace urde
|
||||
class CVParamTransfer;
|
||||
class IObj;
|
||||
|
||||
using CFactoryFnReturn = std::unique_ptr<IObj>;
|
||||
using FFactoryFunc = std::function<CFactoryFnReturn(const urde::SObjectTag& tag,
|
||||
urde::CInputStream& in,
|
||||
const urde::CVParamTransfer& vparms)>;
|
||||
using FMemFactoryFunc = std::function<CFactoryFnReturn(const urde::SObjectTag& tag,
|
||||
std::unique_ptr<u8[]>&& in, u32 len,
|
||||
const urde::CVParamTransfer& vparms)>;
|
||||
|
||||
class IFactory
|
||||
{
|
||||
public:
|
||||
virtual ~IFactory() = default;
|
||||
virtual std::unique_ptr<IObj> Build(const SObjectTag&, const CVParamTransfer&)=0;
|
||||
virtual CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&)=0;
|
||||
virtual void BuildAsync(const SObjectTag&, const CVParamTransfer&, IObj**)=0;
|
||||
virtual void CancelBuild(const SObjectTag&)=0;
|
||||
virtual bool CanBuild(const SObjectTag&)=0;
|
||||
@@ -22,4 +30,4 @@ public:
|
||||
|
||||
}
|
||||
|
||||
#endif // __PSHAG_IFACTORY_HPP__
|
||||
#endif // __URDE_IFACTORY_HPP__
|
||||
|
||||
Reference in New Issue
Block a user