Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "timage.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TNZCORE_LIGHT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tpalette.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void TImage::setPalette(TPalette *palette)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	if (m_palette == palette)
Toshihiro Shimizu 890ddd
		return;
Toshihiro Shimizu 890ddd
	if (palette)
Toshihiro Shimizu 890ddd
		palette->addRef();
Toshihiro Shimizu 890ddd
	if (m_palette)
Toshihiro Shimizu 890ddd
		m_palette->release();
Toshihiro Shimizu 890ddd
	m_palette = palette;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TImage::~TImage()
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	if (m_palette)
Toshihiro Shimizu 890ddd
		m_palette->release();
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class TPalette
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void TImage::setPalette(TPalette *palette)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	assert(false);
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TImage::~TImage()
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//#include "tiio.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
DEFINE_CLASS_CODE(TImage, 4)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TImage::TImage()
Toshihiro Shimizu 890ddd
	: TSmartObject(m_classCode), m_palette(0)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
}