athena/src/Athena/WiiBanner.cpp

144 lines
2.3 KiB
C++
Raw Normal View History

2014-04-20 09:14:15 +00:00
#include "Athena/WiiBanner.hpp"
#include "Athena/WiiImage.hpp"
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("")
{
}
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();
}
void WiiBanner::setGameID(atUint64 id)
2013-02-16 04:22:16 +00:00
{
m_gameId = id;
}
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);
}
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;
}
}
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;
}
void WiiBanner::setAnimationSpeed(atUint16 animSpeed)
2013-02-16 04:22:16 +00:00
{
m_animSpeed = animSpeed;
}
atUint16 WiiBanner::animationSpeed() const
2013-02-16 04:22:16 +00:00
{
return m_animSpeed;
}
void WiiBanner::setPermissions(atUint8 permissions)
2013-02-16 04:22:16 +00:00
{
m_permissions = permissions;
}
atUint8 WiiBanner::permissions() const
2013-02-16 04:22:16 +00:00
{
return m_permissions;
}
void WiiBanner::setBannerSize(atUint32 size)
2013-02-16 04:22:16 +00:00
{
m_bannerSize = size;
}
atUint32 WiiBanner::bannerSize() const
2013-02-16 04:22:16 +00:00
{
return m_bannerSize;
}
void WiiBanner::setFlags(atUint32 flags)
2013-02-16 04:22:16 +00:00
{
m_flags = flags;
}
atUint32 WiiBanner::flags() const
2013-02-16 04:22:16 +00:00
{
return m_flags;
}
2013-07-21 03:57:20 +00:00
} // zelda