libeditwl
Lightweight C++ library for Nintendo DS(i) formats
Loading...
Searching...
No Matches
twl::fmt::BMG Struct Reference
Inheritance diagram for twl::fmt::BMG:
twl::fs::FileFormat

Classes

struct  Header
struct  InfoSection
struct  DataSection
struct  MessageIdSection
struct  MessageEscape
struct  MessageToken
struct  Message

Public Types

enum class  Encoding : u8 { CP1252 = 1 , UTF16 = 2 , ShiftJIS = 3 , UTF8 = 4 }
enum class  MessageTokenType : u8 { Text , Escape }

Public Member Functions

 BMG (const BMG &)=delete
 BMG (BMG &&)=default
bool HasMessageIds ()
void CreateFrom (const Encoding enc, const bool has_message_ids, const size_t attr_size, const std::vector< Message > &msgs, const u32 file_id)
Result ReadValidateFrom (fs::File &rf) override
Result ReadAllFrom (fs::File &rf) override
Result WriteTo (fs::File &wf) override
Public Member Functions inherited from twl::fs::FileFormat
Result ReadFrom (File &rf)

Static Public Member Functions

static constexpr size_t GetCharacterSize (const Encoding enc)
static constexpr bool IsValidEncoding (const Encoding enc)

Public Attributes

Header header
InfoSection info
DataSection data
std::optional< MessageIdSectionmsg_id
std::vector< Messagemessages

Member Function Documentation

◆ ReadAllFrom()

Result twl::fmt::BMG::ReadAllFrom ( fs::File & rf)
overridevirtual

Implements twl::fs::FileFormat.

◆ ReadValidateFrom()

Result twl::fmt::BMG::ReadValidateFrom ( fs::File & rf)
overridevirtual

Implements twl::fs::FileFormat.

◆ WriteTo()

Result twl::fmt::BMG::WriteTo ( fs::File & wf)
overridevirtual

Implements twl::fs::FileFormat.


The documentation for this struct was generated from the following files: