mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-30 22:44:22 +01:00
52 lines
810 B
C++
52 lines
810 B
C++
/****************************************************************************
|
|
* libwiigui
|
|
*
|
|
* Tantric 2009
|
|
*
|
|
* gui_imagedata.cpp
|
|
*
|
|
* GUI class definitions
|
|
***************************************************************************/
|
|
|
|
#include "gui.h"
|
|
|
|
/**
|
|
* Constructor for the GuiImageData class.
|
|
*/
|
|
GuiImageData::GuiImageData(const u8 * i, int maxw, int maxh)
|
|
{
|
|
data = NULL;
|
|
width = 0;
|
|
height = 0;
|
|
|
|
if(i)
|
|
data = DecodePNG(i, &width, &height, data, maxw, maxh);
|
|
}
|
|
|
|
/**
|
|
* Destructor for the GuiImageData class.
|
|
*/
|
|
GuiImageData::~GuiImageData()
|
|
{
|
|
if(data)
|
|
{
|
|
free(data);
|
|
data = NULL;
|
|
}
|
|
}
|
|
|
|
u8 * GuiImageData::GetImage()
|
|
{
|
|
return data;
|
|
}
|
|
|
|
int GuiImageData::GetWidth()
|
|
{
|
|
return width;
|
|
}
|
|
|
|
int GuiImageData::GetHeight()
|
|
{
|
|
return height;
|
|
}
|