metaforce/Runtime/GuiSys/CStringTable.hpp

27 lines
676 B
C++
Raw Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2016-08-16 14:05:33 -07:00
#include <memory>
#include "Runtime/Factory/IFactory.hpp"
#include "Runtime/RetroTypes.hpp"
2016-08-16 14:05:33 -07:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
2018-12-07 21:30:43 -08:00
class CStringTable {
static FourCC mCurrentLanguage;
u32 x0_stringCount = 0;
std::unique_ptr<u8[]> x4_data;
u32 m_bufLen = 0;
2018-12-07 21:30:43 -08:00
2016-08-16 14:05:33 -07:00
public:
explicit CStringTable(CInputStream& in);
2018-12-07 21:30:43 -08:00
void LoadStringTable(CInputStream& in);
2016-08-16 14:05:33 -07:00
2018-12-07 21:30:43 -08:00
const char16_t* GetString(s32) const;
u32 GetStringCount() const { return x0_stringCount; }
static void SetLanguage(s32);
2016-08-16 14:05:33 -07:00
};
2016-08-16 14:12:27 -07:00
CFactoryFnReturn FStringTableFactory(const SObjectTag&, CInputStream&, const CVParamTransfer&,
CObjectReference* selfRef);
2021-04-10 01:42:06 -07:00
} // namespace metaforce