2022-04-10 00:17:06 +00:00
|
|
|
#ifndef _CRESFACTORY_HPP
|
|
|
|
#define _CRESFACTORY_HPP
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "rstl/list.hpp"
|
|
|
|
|
2022-08-09 23:03:51 +00:00
|
|
|
#include "Kyoto/CFactoryMgr.hpp"
|
|
|
|
#include "Kyoto/CResLoader.hpp"
|
2022-04-10 00:17:06 +00:00
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
class IFactory {
|
2022-09-14 05:24:12 +00:00
|
|
|
public:
|
|
|
|
virtual ~IFactory() {}
|
|
|
|
virtual CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&, CObjectReference*) = 0;
|
2022-09-18 06:05:46 +00:00
|
|
|
virtual void BuildAsync(const SObjectTag&, const CVParamTransfer&, rstl::auto_ptr< IObj >*,
|
|
|
|
CObjectReference*) = 0;
|
2022-09-14 05:24:12 +00:00
|
|
|
virtual void CancelBuild(const SObjectTag&) = 0;
|
|
|
|
virtual bool CanBuild(const SObjectTag&) = 0;
|
|
|
|
virtual const SObjectTag* GetResourceIdByName(const char* name) const = 0;
|
2022-09-13 04:26:54 +00:00
|
|
|
// TODO
|
|
|
|
};
|
|
|
|
|
|
|
|
class CResFactory : public IFactory {
|
2022-04-10 00:17:06 +00:00
|
|
|
public:
|
2022-09-13 04:26:54 +00:00
|
|
|
CResFactory();
|
2022-04-10 00:17:06 +00:00
|
|
|
virtual ~CResFactory() {}
|
|
|
|
|
2022-09-05 04:01:13 +00:00
|
|
|
void AsyncIdle(uint time);
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
CResLoader& GetResLoader() { return x4_resLoader; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
CResLoader x4_resLoader;
|
|
|
|
CFactoryMgr x5c_factoryMgr;
|
2022-09-05 04:01:13 +00:00
|
|
|
uint x94_;
|
|
|
|
uint x98_;
|
|
|
|
uint x9c_;
|
|
|
|
uint xa0_;
|
|
|
|
uint xa4_;
|
|
|
|
uint xa8_;
|
|
|
|
uint xac_;
|
2022-04-10 00:17:06 +00:00
|
|
|
rstl::list< void > xb0_;
|
|
|
|
};
|
2022-09-13 04:26:54 +00:00
|
|
|
CHECK_SIZEOF(CResFactory, 0xc8);
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
extern CResFactory* gpResourceFactory;
|
|
|
|
|
|
|
|
#endif
|