mirror of https://github.com/AxioDL/metaforce.git
Add factory function
This commit is contained in:
parent
de7d5f9d59
commit
bb0977733f
|
@ -1,4 +1,5 @@
|
|||
#include "CStringTable.hpp"
|
||||
#include "CToken.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
@ -76,4 +77,10 @@ void CStringTable::SetLanguage(s32 lang)
|
|||
{
|
||||
mCurrentLanguage = skLanguages[lang];
|
||||
}
|
||||
|
||||
CFactoryFnReturn FStringTableFactory(const SObjectTag&, CInputStream& in, const CVParamTransfer&)
|
||||
{
|
||||
return TToken<CStringTable>::GetIObjObjectFor(std::make_unique<CStringTable>(in));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define __URDE_CSTRINGTABLE_HPP__
|
||||
|
||||
#include "RetroTypes.hpp"
|
||||
#include "IFactory.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
@ -19,5 +20,7 @@ public:
|
|||
std::wstring GetString(s32) const;
|
||||
static void SetLanguage(s32);
|
||||
};
|
||||
|
||||
CFactoryFnReturn FStringTableFactory(const SObjectTag&, CInputStream&, const CVParamTransfer&);
|
||||
}
|
||||
#endif // __URDE_CSTRINGTABLE_HPP__
|
||||
|
|
Loading…
Reference in New Issue