2013-04-18 03:09:55 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
#ifndef _BANNER_LOADER_WII_H_
|
|
|
|
#define _BANNER_LOADER_WII_H_
|
|
|
|
|
|
|
|
#include "BannerLoader.h"
|
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
|
|
|
class CBannerLoaderWii
|
|
|
|
: public IBannerLoader
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2009-06-07 02:54:07 +00:00
|
|
|
CBannerLoaderWii(DiscIO::IVolume *pVolume);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
virtual ~CBannerLoaderWii();
|
|
|
|
|
|
|
|
virtual bool IsValid();
|
|
|
|
|
2013-09-25 07:05:36 +00:00
|
|
|
virtual std::vector<u32> GetBanner(int* pWidth, int* pHeight);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2013-03-03 01:46:55 +00:00
|
|
|
virtual std::vector<std::string> GetNames();
|
|
|
|
virtual std::string GetCompany();
|
|
|
|
virtual std::vector<std::string> GetDescriptions();
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
private:
|
2013-10-29 05:23:17 +00:00
|
|
|
|
2011-11-28 07:17:10 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
TEXTURE_SIZE = 192 * 64 * 2,
|
|
|
|
ICON_SIZE = 48 * 48 * 2,
|
|
|
|
COMMENT_SIZE = 32
|
|
|
|
};
|
|
|
|
|
|
|
|
enum CommentIndex
|
|
|
|
{
|
|
|
|
NAME_IDX,
|
|
|
|
DESC_IDX
|
|
|
|
};
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
struct SWiiBanner
|
|
|
|
{
|
|
|
|
u32 ID;
|
|
|
|
|
|
|
|
u32 m_Flag;
|
|
|
|
u16 m_Speed;
|
|
|
|
u8 m_Unknown[22];
|
|
|
|
|
2011-11-28 07:17:10 +00:00
|
|
|
// Not null terminated!
|
|
|
|
u16 m_Comment[2][COMMENT_SIZE];
|
|
|
|
u8 m_BannerTexture[TEXTURE_SIZE];
|
|
|
|
u8 m_IconTexture[8][ICON_SIZE];
|
2008-12-08 04:46:09 +00:00
|
|
|
} ;
|
|
|
|
|
|
|
|
u8* m_pBannerFile;
|
|
|
|
|
|
|
|
bool m_IsValid;
|
|
|
|
|
2011-11-28 07:17:10 +00:00
|
|
|
bool GetStringFromComments(const CommentIndex index, std::string& s);
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|