2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-08-16 21:05:33 +00:00
|
|
|
|
2019-09-23 19:00:23 +00:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "Runtime/IFactory.hpp"
|
|
|
|
#include "Runtime/RetroTypes.hpp"
|
2016-08-16 21:05:33 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2018-12-08 05:30:43 +00:00
|
|
|
class CStringTable {
|
|
|
|
static FourCC mCurrentLanguage;
|
|
|
|
u32 x0_stringCount = 0;
|
2019-09-01 07:16:51 +00:00
|
|
|
std::unique_ptr<u8[]> x4_data;
|
2022-02-18 07:37:54 +00:00
|
|
|
u32 m_bufLen = 0;
|
2018-12-08 05:30:43 +00:00
|
|
|
|
2016-08-16 21:05:33 +00:00
|
|
|
public:
|
2020-03-26 01:25:11 +00:00
|
|
|
explicit CStringTable(CInputStream& in);
|
2018-12-08 05:30:43 +00:00
|
|
|
void LoadStringTable(CInputStream& in);
|
2016-08-16 21:05:33 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
const char16_t* GetString(s32) const;
|
|
|
|
u32 GetStringCount() const { return x0_stringCount; }
|
|
|
|
static void SetLanguage(s32);
|
2016-08-16 21:05:33 +00:00
|
|
|
};
|
2016-08-16 21:12:27 +00:00
|
|
|
|
2016-09-02 19:32:57 +00:00
|
|
|
CFactoryFnReturn FStringTableFactory(const SObjectTag&, CInputStream&, const CVParamTransfer&,
|
|
|
|
CObjectReference* selfRef);
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|