athena/include/WiiBanner.hpp

258 lines
4.9 KiB
C++
Raw Normal View History

// This file is part of libZelda.
//
// libZelda is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// libZelda is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with libZelda. If not, see <http://www.gnu.org/licenses/>
2013-02-16 04:22:16 +00:00
#ifndef WIIBANNER_H
#define WIIBANNER_H
#include <vector>
#include <string>
#include <Types.hpp>
2013-07-21 03:57:20 +00:00
namespace zelda
{
/*!
* \brief The WiiImage class
*/
2013-02-16 04:22:16 +00:00
class WiiImage
{
public:
2013-07-21 03:57:20 +00:00
/*!
* \brief WiiImage
*/
2013-02-16 04:22:16 +00:00
WiiImage();
2013-07-21 03:57:20 +00:00
/*!
* \brief WiiImage
* \param width
* \param height
* \param data
*/
2013-02-16 04:22:16 +00:00
WiiImage(Uint32 width, Uint32 height, Uint8* data);
~WiiImage();
2013-07-21 03:57:20 +00:00
/*!
* \brief setWidth
* \param width
*/
2013-02-16 04:22:16 +00:00
void setWidth(const Uint32 width);
2013-07-21 03:57:20 +00:00
/*!
* \brief width
* \return
*/
2013-02-16 04:22:16 +00:00
Uint32 width() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief setHeight
* \param height
*/
2013-02-16 04:22:16 +00:00
void setHeight(const Uint32 height);
2013-07-21 03:57:20 +00:00
/*!
* \brief height
* \return
*/
2013-02-16 04:22:16 +00:00
Uint32 height() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief setData
* \param data
*/
2013-02-16 04:22:16 +00:00
void setData(const Uint8* data);
2013-07-21 03:57:20 +00:00
/*!
* \brief data
* \return
*/
2013-02-16 04:22:16 +00:00
Uint8* data();
2013-07-21 03:57:20 +00:00
/*!
* \brief toRGBA32 DOES NOT WORK!!! DO NOT USE!!!
* \return
*/
2013-02-16 04:22:16 +00:00
Uint8* toRGBA32();
private:
Uint32 m_width;
Uint32 m_height;
Uint8* m_data;
};
2013-07-21 03:57:20 +00:00
/*! \class WiiBanner
* \brief Wii banner container class
*
* Contains all relevant data for a Wii banner.
*/
2013-02-16 04:22:16 +00:00
class WiiBanner
{
public:
2013-07-21 03:57:20 +00:00
enum
{
NoCopy = 0x00000001,
Bounce = 0x00000010,
NoCopyBounce = NoCopy | Bounce
};
/*!
* \brief WiiBanner
*/
2013-02-16 04:22:16 +00:00
WiiBanner();
2013-07-21 03:57:20 +00:00
/*!
* \brief WiiBanner
* \param gameId
* \param title
* \param subtitle
* \param m_banner
* \param icons
*/
2013-02-16 04:22:16 +00:00
WiiBanner(Uint32 gameId, const std::string& title, const std::string& subtitle, WiiImage* m_banner, std::vector<WiiImage*> icons);
virtual ~WiiBanner();
2013-07-21 03:57:20 +00:00
/*!
* \brief setGameID
* \param id
*/
2013-02-16 04:22:16 +00:00
void setGameID(Uint64 id);
2013-07-21 03:57:20 +00:00
/*!
* \brief gameID
* \return
*/
2013-02-16 04:22:16 +00:00
Uint64 gameID() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief setBannerImage
* \param banner
*/
2013-02-16 04:22:16 +00:00
void setBannerImage(WiiImage* banner);
2013-07-21 03:57:20 +00:00
/*!
* \brief bannerImage
* \return
*/
2013-02-16 04:22:16 +00:00
WiiImage* bannerImage() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief setBannerSize
* \param size
*/
2013-02-16 04:22:16 +00:00
void setBannerSize(Uint32 size);
2013-07-21 03:57:20 +00:00
/*!
* \brief bannerSize
* \return
*/
2013-02-16 04:22:16 +00:00
Uint32 bannerSize() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief setTitle
* \param title
*/
2013-02-16 04:22:16 +00:00
void setTitle(const std::string& title);
2013-07-21 03:57:20 +00:00
/*!
* \brief title
* \return
*/
2013-02-16 04:22:16 +00:00
std::string title() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief setSubtitle
* \param subtitle
*/
void setSubtitle(const std::string& subtitle);
/*!
* \brief subtitle
* \return
*/
2013-02-16 04:22:16 +00:00
std::string subtitle() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief addIcon
* \param icon
*/
2013-02-16 04:22:16 +00:00
void addIcon(WiiImage* icon);
2013-07-21 03:57:20 +00:00
/*!
* \brief setIcon
* \param id
* \param icon
*/
2013-02-16 04:22:16 +00:00
void setIcon(Uint32 id, WiiImage* icon);
2013-07-21 03:57:20 +00:00
/*!
* \brief getIcon
* \param id
* \return
*/
2013-02-16 04:22:16 +00:00
WiiImage* getIcon(Uint32 id) const;
2013-07-21 03:57:20 +00:00
/*!
* \brief icons
* \return
*/
2013-02-16 04:22:16 +00:00
std::vector<WiiImage*> icons() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief setAnimationSpeed
* \param animSpeed
*/
2013-02-16 04:22:16 +00:00
void setAnimationSpeed(Uint16 animSpeed);
2013-07-21 03:57:20 +00:00
/*!
* \brief animationSpeed
* \return
*/
2013-02-16 04:22:16 +00:00
Uint16 animationSpeed() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief setPermissions
* \param permissions
*/
2013-02-16 04:22:16 +00:00
void setPermissions(Uint8 permissions);
2013-07-21 03:57:20 +00:00
/*!
* \brief permissions
* \return
*/
2013-02-16 04:22:16 +00:00
Uint8 permissions() const;
2013-07-21 03:57:20 +00:00
/*!
* \brief setFlags
* \param flags
*/
2013-02-16 04:22:16 +00:00
void setFlags(Uint32 flags);
2013-07-21 03:57:20 +00:00
/*!
* \brief flags
* \return
*/
2013-02-16 04:22:16 +00:00
Uint32 flags() const;
protected:
private:
Uint64 m_gameId;
WiiImage* m_banner;
Uint32 m_animSpeed;
Uint8 m_permissions;
Uint32 m_flags;
Uint32 m_bannerSize;
std::vector<WiiImage*> m_icons;
std::string m_title;
std::string m_subtitle;
};
2013-07-21 03:57:20 +00:00
} // zelda
2013-02-16 04:22:16 +00:00
#endif // WIIBANNER_H