mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Eliminate the wstring game name.
Some cleanup throughout related code. (try to make logic in ISOFile understandable by a human) Encode strings in UTF-8 rather than somehow trying to determine the encoding in the GUI code. Non-windows OSes temporarily broken.
This commit is contained in:
@ -32,9 +32,10 @@ class CBannerLoaderGC
|
||||
virtual bool IsValid();
|
||||
|
||||
virtual bool GetBanner(u32* _pBannerImage);
|
||||
virtual bool GetName(std::string* _rName);
|
||||
virtual bool GetCompany(std::string& _rCompany);
|
||||
virtual bool GetDescription(std::string* _rDescription);
|
||||
|
||||
virtual std::vector<std::string> GetNames();
|
||||
virtual std::string GetCompany();
|
||||
virtual std::vector<std::string> GetDescriptions();
|
||||
|
||||
private:
|
||||
enum
|
||||
@ -60,24 +61,25 @@ class CBannerLoaderGC
|
||||
char comment[128]; // Game description shown in IPL game start screen in two lines.
|
||||
};
|
||||
|
||||
// "opening.bnr" file format for JP/US console
|
||||
struct DVDBanner
|
||||
{
|
||||
u32 id; // 'BNR1'
|
||||
u32 padding[7];
|
||||
u16 image[DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT]; // RGB5A3 96x32 texture image
|
||||
DVDBannerComment comment;
|
||||
};
|
||||
|
||||
// "opening.bnr" file format for EU console
|
||||
struct DVDBanner2
|
||||
struct DVDBanner
|
||||
{
|
||||
u32 id; // 'BNR2'
|
||||
u32 padding[7];
|
||||
u16 image[DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT]; // RGB5A3 96x32 texture image
|
||||
DVDBannerComment comment[6]; // Comments in six languages
|
||||
DVDBannerComment comment[6]; // Comments in six languages (only 1 for BNR1 type)
|
||||
};
|
||||
|
||||
static const u32 BNR1_SIZE = sizeof(DVDBanner) - sizeof(DVDBannerComment) * 5;
|
||||
static const u32 BNR2_SIZE = sizeof(DVDBanner);
|
||||
|
||||
template <u32 N>
|
||||
std::string GetDecodedString(const char (&data)[N])
|
||||
{
|
||||
// Can I always assume SHIFT-JIS?
|
||||
return SHIFTJISToUTF8(std::string(data, strnlen(data, sizeof(data))));
|
||||
}
|
||||
|
||||
u8* m_pBannerFile;
|
||||
bool m_IsValid;
|
||||
BANNER_TYPE m_BNRType;
|
||||
|
Reference in New Issue
Block a user