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
|
|
|
|
{
|
2014-06-29 19:31:44 +00:00
|
|
|
public:
|
|
|
|
CBannerLoaderWii(DiscIO::IVolume *pVolume);
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-06-29 19:31:44 +00:00
|
|
|
virtual ~CBannerLoaderWii();
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-06-29 19:31:44 +00:00
|
|
|
virtual std::vector<u32> GetBanner(int* pWidth, int* pHeight) override;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-06-29 19:31:44 +00:00
|
|
|
virtual std::vector<std::string> GetNames() override;
|
|
|
|
virtual std::string GetCompany() override;
|
|
|
|
virtual std::vector<std::string> GetDescriptions() override;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-06-29 19:31:44 +00:00
|
|
|
private:
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
TEXTURE_SIZE = 192 * 64 * 2,
|
|
|
|
ICON_SIZE = 48 * 48 * 2,
|
|
|
|
COMMENT_SIZE = 32
|
|
|
|
};
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-06-29 19:31:44 +00:00
|
|
|
enum CommentIndex
|
|
|
|
{
|
|
|
|
NAME_IDX,
|
|
|
|
DESC_IDX
|
|
|
|
};
|
2013-10-29 05:23:17 +00:00
|
|
|
|
2014-06-29 19:31:44 +00:00
|
|
|
struct SWiiBanner
|
|
|
|
{
|
|
|
|
u32 ID;
|
2011-11-28 07:17:10 +00:00
|
|
|
|
2014-06-29 19:31:44 +00:00
|
|
|
u32 m_Flag;
|
|
|
|
u16 m_Speed;
|
|
|
|
u8 m_Unknown[22];
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-06-29 19:31:44 +00:00
|
|
|
// Not null terminated!
|
|
|
|
u16 m_Comment[2][COMMENT_SIZE];
|
|
|
|
u8 m_BannerTexture[TEXTURE_SIZE];
|
|
|
|
u8 m_IconTexture[8][ICON_SIZE];
|
2014-06-29 19:38:48 +00:00
|
|
|
};
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-06-29 19:31:44 +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
|