This commit is contained in:
natural-law 2010-10-11 07:35:36 +00:00
parent 05bea6a707
commit 09e9638b03
2 changed files with 3 additions and 7 deletions

View File

@ -52,6 +52,7 @@ typedef struct
int offset;
}tImageSource;
typedef map<std::string, int> ResourceImageMap;
static ResourceImageMap s_ImgMap;
static ResourceHandle s_HRes;
@ -193,7 +194,7 @@ void UIImage::setImageMap(const std::string keys[], const int values[], int nCou
for (int i = 0; i < nCount; ++i)
{
std::string key = CCFileUtils::fullPathFromRelativePath((keys[i]).c_str());
Int32 nResID = values[i];
int nResID = values[i];
s_ImgMap.insert(ResourceImageMap::value_type(key, nResID));
}
@ -466,8 +467,6 @@ bool UIImage::initWithBitmap(const TBitmap* pBmp)
{
CCX_BREAK_IF(! pBmp);
// TBitmap* pBitmap = pBmp->DupBitmapTo32();
// init imageinfo
INT32 nWidth = pBmp->GetWidth();
INT32 nHeight = pBmp->GetHeight();
@ -522,7 +521,7 @@ void ResourceHandle::setResourceEntry(const AppResourceEntry* pResEntry)
m_pResLib = new TResourceLib(pResEntry);
}
const TBitmap* ResourceHandle::LoadConstBitmap(Int32 nResID)
const TBitmap* ResourceHandle::LoadConstBitmap(int nResID)
{
const TBitmap* pResult = NULL;

View File

@ -25,7 +25,6 @@ THE SOFTWARE.
#ifndef __PLATFORM_UPHONE_UIIMAGE_H__
#define __PLATFORM_UPHONE_UIIMAGE_H__
#include <map>
#include <string>
#include "ccxCommon.h"
#include "CCRenderTexture.h"
@ -48,8 +47,6 @@ typedef struct
unsigned char *data;
} tImageInfo;
typedef std::map<std::string, int> ResourceImageMap;
class ResourceHandle
{
public: