issue #18, debug

This commit is contained in:
Walzer 2010-08-19 05:46:34 +00:00
parent a08b17b4aa
commit b2585b1d4b
1 changed files with 4 additions and 1 deletions

View File

@ -25,6 +25,7 @@ THE SOFTWARE.
#include "CCXBitmapDC.h" #include "CCXBitmapDC.h"
#include "CCXApplication_uphone.h" #include "CCXApplication_uphone.h"
#include "CCDirector.h" #include "CCDirector.h"
#include "platform/platform.h"
namespace cocos2d { namespace cocos2d {
@ -37,7 +38,8 @@ namespace cocos2d {
// create font // create font
TFont font; TFont font;
font.Create(0, (Int32)fontSize); font.Create(0, (Int32)fontSize);
int len = strlen(text) + 1; // text
Int32 len = strlen(text) + 1;
TUChar *pText = new TUChar[len]; TUChar *pText = new TUChar[len];
TUString::StrUtf8ToStrUnicode(pText, (Char*)text); TUString::StrUtf8ToStrUnicode(pText, (Char*)text);
// calculate text size // calculate text size
@ -82,6 +84,7 @@ namespace cocos2d {
m_pBitmap = pWindow->GetBitmap()->DupBitmapTo32(); m_pBitmap = pWindow->GetBitmap()->DupBitmapTo32();
// close window // close window
pWindow->CloseWindowNow(); pWindow->CloseWindowNow();
delete [] pText;
} }
void *CCXBitmapDC::getBuffer() void *CCXBitmapDC::getBuffer()
{ {