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
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-21 00:47:53 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "DiscIO/BannerLoader.h"
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2014-02-21 00:47:53 +00:00
|
|
|
|
|
|
|
class IVolume;
|
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
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,
|
2014-02-09 21:03:16 +00:00
|
|
|
ICON_SIZE = 48 * 48 * 2,
|
2011-11-28 07:17:10 +00:00
|
|
|
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
|
|
|
};
|
2014-02-21 00:47:53 +00:00
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
} // namespace
|