2015-07-13 06:29:12 +00:00
|
|
|
#ifndef __COMMON_STRG_HPP__
|
|
|
|
#define __COMMON_STRG_HPP__
|
|
|
|
|
|
|
|
#include <string>
|
2015-07-16 01:57:34 +00:00
|
|
|
#include <fstream>
|
|
|
|
#include <angelscript.h>
|
2015-07-13 06:29:12 +00:00
|
|
|
#include <HECL/HECL.hpp>
|
2015-07-16 01:57:34 +00:00
|
|
|
#include <HECL/Database.hpp>
|
2015-07-17 00:01:05 +00:00
|
|
|
#include <Athena/FileWriter.hpp>
|
2015-07-13 06:29:12 +00:00
|
|
|
#include "DNACommon.hpp"
|
|
|
|
|
|
|
|
namespace Retro
|
|
|
|
{
|
|
|
|
struct ISTRG
|
|
|
|
{
|
2015-07-16 01:57:34 +00:00
|
|
|
virtual ~ISTRG() {}
|
|
|
|
|
2015-07-13 06:29:12 +00:00
|
|
|
virtual size_t count() const=0;
|
|
|
|
virtual std::string getUTF8(const FourCC& lang, size_t idx) const=0;
|
|
|
|
virtual std::wstring getUTF16(const FourCC& lang, size_t idx) const=0;
|
|
|
|
virtual HECL::SystemString getSystemString(const FourCC& lang, size_t idx) const=0;
|
|
|
|
virtual int32_t lookupIdx(const std::string& name) const=0;
|
2015-07-16 01:57:34 +00:00
|
|
|
|
|
|
|
virtual bool readAngelScript(const AngelScript::asIScriptModule& in)=0;
|
|
|
|
virtual void writeAngelScript(std::ofstream& out) const=0;
|
2015-07-13 06:29:12 +00:00
|
|
|
};
|
|
|
|
std::unique_ptr<ISTRG> LoadSTRG(Athena::io::IStreamReader& reader);
|
2015-07-16 01:57:34 +00:00
|
|
|
|
|
|
|
extern HECL::Database::ASListType<std::string> ASTYPE_STRGLanguage;
|
|
|
|
|
2015-07-13 06:29:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __COMMON_STRG_HPP__
|