mirror of https://github.com/axmolengine/axmol.git
issue #2430:fix android compiling error
This commit is contained in:
parent
4d7ac6c800
commit
17946c084a
|
@ -91,7 +91,7 @@ Image::~Image()
|
|||
CC_SAFE_DELETE_ARRAY(_data);
|
||||
}
|
||||
|
||||
bool Image::initWithImageFile(const char * strPath, EImageFormat eImgFmt/* = eFmtPng*/)
|
||||
bool Image::initWithImageFile(const char * strPath, Format eImgFmt/* = eFmtPng*/)
|
||||
{
|
||||
bool bRet = false;
|
||||
|
||||
|
@ -128,7 +128,7 @@ bool Image::initWithImageFile(const char * strPath, EImageFormat eImgFmt/* = eFm
|
|||
return bRet;
|
||||
}
|
||||
|
||||
bool Image::initWithImageFileThreadSafe(const char *fullpath, EImageFormat imageType)
|
||||
bool Image::initWithImageFileThreadSafe(const char *fullpath, Format imageType)
|
||||
{
|
||||
bool bRet = false;
|
||||
unsigned long nSize = 0;
|
||||
|
@ -148,7 +148,7 @@ bool Image::initWithImageFileThreadSafe(const char *fullpath, EImageFormat image
|
|||
|
||||
bool Image::initWithImageData(void * pData,
|
||||
int nDataLen,
|
||||
EImageFormat eFmt/* = eSrcFmtPng*/,
|
||||
Format eFmt/* = eSrcFmtPng*/,
|
||||
int nWidth/* = 0*/,
|
||||
int nHeight/* = 0*/,
|
||||
int nBitsPerComponent/* = 8*/)
|
||||
|
@ -158,27 +158,27 @@ bool Image::initWithImageData(void * pData,
|
|||
{
|
||||
CC_BREAK_IF(! pData || nDataLen <= 0);
|
||||
|
||||
if (kFmtPng == eFmt)
|
||||
if (FORMAT_PNG == eFmt)
|
||||
{
|
||||
bRet = _initWithPngData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtJpg == eFmt)
|
||||
else if (FORMAT_JPG == eFmt)
|
||||
{
|
||||
bRet = _initWithJpgData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtTiff == eFmt)
|
||||
else if (FORMAT_TIFF == eFmt)
|
||||
{
|
||||
bRet = _initWithTiffData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtWebp == eFmt)
|
||||
else if (FORMAT_WEBP == eFmt)
|
||||
{
|
||||
bRet = _initWithWebpData(pData, nDataLen);
|
||||
break;
|
||||
}
|
||||
else if (kFmtRawData == eFmt)
|
||||
else if (FORMAT_RAW_DATA == eFmt)
|
||||
{
|
||||
bRet = initWithRawData(pData, nDataLen, nWidth, nHeight, nBitsPerComponent, false);
|
||||
break;
|
||||
|
|
|
@ -433,7 +433,7 @@ Texture2D * TextureCache::addPVRImage(const char* path)
|
|||
{
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
// cache the texture file name
|
||||
VolatileTexture::addImageTexture(texture, fullpath.c_str(), Image::kFmtRawData);
|
||||
VolatileTexture::addImageTexture(texture, fullpath.c_str(), Image::FORMAT_RAW_DATA);
|
||||
#endif
|
||||
_textures->setObject(texture, key.c_str());
|
||||
texture->autorelease();
|
||||
|
@ -643,7 +643,7 @@ VolatileTexture::VolatileTexture(Texture2D *t)
|
|||
, _textureData(NULL)
|
||||
, _pixelFormat(Texture2D::PIXEL_FORMAT_RGBA8888)
|
||||
, _fileName("")
|
||||
, _fmtImage(Image::kFmtPng)
|
||||
, _fmtImage(Image::FORMAT_PNG)
|
||||
, _text("")
|
||||
, _uiImage(NULL)
|
||||
{
|
||||
|
@ -660,7 +660,7 @@ VolatileTexture::~VolatileTexture()
|
|||
CC_SAFE_RELEASE(_uiImage);
|
||||
}
|
||||
|
||||
void VolatileTexture::addImageTexture(Texture2D *tt, const char* imageFileName, Image::EImageFormat format)
|
||||
void VolatileTexture::addImageTexture(Texture2D *tt, const char* imageFileName, Image::Format format)
|
||||
{
|
||||
if (_isReloading)
|
||||
{
|
||||
|
|
|
@ -218,7 +218,7 @@ public:
|
|||
VolatileTexture(Texture2D *t);
|
||||
~VolatileTexture();
|
||||
|
||||
static void addImageTexture(Texture2D *tt, const char* imageFileName, Image::EImageFormat format);
|
||||
static void addImageTexture(Texture2D *tt, const char* imageFileName, Image::Format format);
|
||||
static void addStringTexture(Texture2D *tt, const char* text, const FontDefinition& fontDefinition);
|
||||
static void addDataTexture(Texture2D *tt, void* data, Texture2D::PixelFormat pixelFormat, const Size& contentSize);
|
||||
static void addImage(Texture2D *tt, Image *image);
|
||||
|
@ -248,7 +248,7 @@ protected:
|
|||
Texture2D::PixelFormat _pixelFormat;
|
||||
|
||||
std::string _fileName;
|
||||
Image::EImageFormat _fmtImage;
|
||||
Image::Format _fmtImage;
|
||||
|
||||
ccTexParams _texParams;
|
||||
std::string _text;
|
||||
|
|
Loading…
Reference in New Issue