2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:07:42 +00:00

Humungous refactor

This commit is contained in:
Jack Andersen
2016-03-04 13:04:53 -10:00
parent 552ec1db4a
commit 783fb4c4fe
330 changed files with 2943 additions and 3077 deletions

View File

@@ -5,21 +5,21 @@
#include "RetroTypes.hpp"
#include "IOStreams.hpp"
namespace pshag
namespace urde
{
struct SObjectTag;
class CVParamTransfer;
class IObj;
using CFactoryFnReturn = std::unique_ptr<IObj>;
using FFactoryFunc = std::function<CFactoryFnReturn(const pshag::SObjectTag& tag,
pshag::CInputStream& in,
const pshag::CVParamTransfer& vparms)>;
using FFactoryFunc = std::function<CFactoryFnReturn(const urde::SObjectTag& tag,
urde::CInputStream& in,
const urde::CVParamTransfer& vparms)>;
class CFactoryMgr
{
std::unordered_map<FourCC, FFactoryFunc> m_factories;
public:
CFactoryFnReturn MakeObject(const SObjectTag& tag, pshag::CInputStream& in,
CFactoryFnReturn MakeObject(const SObjectTag& tag, urde::CInputStream& in,
const CVParamTransfer& paramXfer);
CFactoryFnReturn MakeObjectFromMemory(const SObjectTag& tag, void* buf, int size, bool compressed,
const CVParamTransfer& paramXfer);