2014-04-20 09:14:15 +00:00
|
|
|
#include "Athena/WiiBanner.hpp"
|
|
|
|
#include "Athena/WiiImage.hpp"
|
2013-07-21 07:49:07 +00:00
|
|
|
|
2014-04-20 09:14:15 +00:00
|
|
|
#include "Athena/Utility.hpp"
|
2013-02-16 04:22:16 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2014-04-20 09:14:15 +00:00
|
|
|
namespace Athena
|
2013-07-21 03:57:20 +00:00
|
|
|
{
|
|
|
|
|
2013-02-16 04:22:16 +00:00
|
|
|
WiiBanner::WiiBanner() :
|
|
|
|
m_gameId(0),
|
|
|
|
m_banner(NULL),
|
|
|
|
m_flags(0),
|
|
|
|
m_bannerSize(0),
|
|
|
|
m_title(""),
|
|
|
|
m_subtitle("")
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
WiiBanner::WiiBanner(atUint32 gameId, const std::string& title,
|
2013-02-16 04:22:16 +00:00
|
|
|
const std::string& subtitle, WiiImage* banner, std::vector<WiiImage*> icons) :
|
|
|
|
m_gameId(gameId),
|
|
|
|
m_banner(banner),
|
|
|
|
m_flags(0),
|
|
|
|
m_bannerSize(0),
|
|
|
|
m_icons(icons),
|
|
|
|
m_title(title),
|
|
|
|
m_subtitle(subtitle)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
WiiBanner::~WiiBanner()
|
|
|
|
{
|
|
|
|
delete m_banner;
|
|
|
|
m_icons.clear();
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
void WiiBanner::setGameID(atUint64 id)
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
m_gameId = id;
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
atUint64 WiiBanner::gameID() const
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
return m_gameId;
|
|
|
|
}
|
|
|
|
void WiiBanner::setTitle(const std::string& title)
|
|
|
|
{
|
|
|
|
m_title = title;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string WiiBanner::title() const
|
|
|
|
{
|
|
|
|
return m_title;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WiiBanner::setSubtitle(const std::string& subtitle)
|
|
|
|
{
|
|
|
|
m_subtitle = subtitle;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string WiiBanner::subtitle() const
|
|
|
|
{
|
|
|
|
return m_subtitle;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WiiBanner::addIcon(WiiImage* icon)
|
|
|
|
{
|
|
|
|
m_icons.push_back(icon);
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
void WiiBanner::setIcon(atUint32 id, WiiImage* icon)
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
if (m_icons[id] != NULL)
|
|
|
|
{
|
|
|
|
delete m_icons[id];
|
|
|
|
m_icons[id] = icon;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
WiiImage* WiiBanner::getIcon(atUint32 id) const
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
if (!m_icons[id])
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
return m_icons[id];
|
|
|
|
}
|
|
|
|
std::vector<WiiImage*> WiiBanner::icons() const
|
|
|
|
{
|
|
|
|
return m_icons;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WiiBanner::setBannerImage(WiiImage* banner)
|
|
|
|
{
|
|
|
|
m_banner = banner;
|
|
|
|
}
|
|
|
|
|
|
|
|
WiiImage* WiiBanner::bannerImage() const
|
|
|
|
{
|
|
|
|
return m_banner;
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
void WiiBanner::setAnimationSpeed(atUint16 animSpeed)
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
m_animSpeed = animSpeed;
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
atUint16 WiiBanner::animationSpeed() const
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
return m_animSpeed;
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
void WiiBanner::setPermissions(atUint8 permissions)
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
m_permissions = permissions;
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
atUint8 WiiBanner::permissions() const
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
return m_permissions;
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
void WiiBanner::setBannerSize(atUint32 size)
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
m_bannerSize = size;
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
atUint32 WiiBanner::bannerSize() const
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
return m_bannerSize;
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
void WiiBanner::setFlags(atUint32 flags)
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
m_flags = flags;
|
|
|
|
}
|
|
|
|
|
2014-06-18 04:51:18 +00:00
|
|
|
atUint32 WiiBanner::flags() const
|
2013-02-16 04:22:16 +00:00
|
|
|
{
|
|
|
|
return m_flags;
|
|
|
|
}
|
|
|
|
|
2013-07-21 03:57:20 +00:00
|
|
|
} // zelda
|