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