2013-04-17 21:09:55 -06:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-20 17:47:53 -07:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "DiscIO/BannerLoader.h"
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2014-02-20 17:47:53 -07:00
|
|
|
|
|
|
|
class IVolume;
|
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
class CBannerLoaderWii
|
|
|
|
: public IBannerLoader
|
|
|
|
{
|
2014-06-29 13:31:44 -06:00
|
|
|
public:
|
|
|
|
CBannerLoaderWii(DiscIO::IVolume *pVolume);
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-06-29 13:31:44 -06:00
|
|
|
virtual ~CBannerLoaderWii();
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-06-29 13:31:44 -06:00
|
|
|
virtual std::vector<u32> GetBanner(int* pWidth, int* pHeight) override;
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-06-29 13:31:44 -06:00
|
|
|
virtual std::vector<std::string> GetNames() override;
|
|
|
|
virtual std::string GetCompany() override;
|
|
|
|
virtual std::vector<std::string> GetDescriptions() override;
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-06-29 13:31:44 -06:00
|
|
|
private:
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
TEXTURE_SIZE = 192 * 64 * 2,
|
|
|
|
ICON_SIZE = 48 * 48 * 2,
|
|
|
|
COMMENT_SIZE = 32
|
|
|
|
};
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-06-29 13:31:44 -06:00
|
|
|
enum CommentIndex
|
|
|
|
{
|
|
|
|
NAME_IDX,
|
|
|
|
DESC_IDX
|
|
|
|
};
|
2013-10-28 23:23:17 -06:00
|
|
|
|
2014-06-29 13:31:44 -06:00
|
|
|
struct SWiiBanner
|
|
|
|
{
|
|
|
|
u32 ID;
|
2011-11-28 00:17:10 -07:00
|
|
|
|
2014-06-29 13:31:44 -06:00
|
|
|
u32 m_Flag;
|
|
|
|
u16 m_Speed;
|
|
|
|
u8 m_Unknown[22];
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-06-29 13:31:44 -06:00
|
|
|
// Not null terminated!
|
|
|
|
u16 m_Comment[2][COMMENT_SIZE];
|
|
|
|
u8 m_BannerTexture[TEXTURE_SIZE];
|
|
|
|
u8 m_IconTexture[8][ICON_SIZE];
|
2014-06-29 13:38:48 -06:00
|
|
|
};
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-06-29 13:31:44 -06:00
|
|
|
bool GetStringFromComments(const CommentIndex index, std::string& s);
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|
2014-02-20 17:47:53 -07:00
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
} // namespace
|