cocos2d-x / cocos2dx-win8

102 stars 66 forks source link

Wp8 v2 #23

Closed QiMa closed 11 years ago

QiMa commented 11 years ago

Fixed almost all of the TestCpp could run on simulator and device

dumganhar commented 11 years ago

This pull request cannot be automatically merged. Please fix the conflicts.

bhavnasahu89 commented 11 years ago

Hi...i want to port cocos2dx code for ios in windows but extension folder is not der...i want to use ccbreader class but there is no class files....so plz tell how to load CCBI file in windows phone 8. or any alternative of ccbreader

QiMa commented 11 years ago

The feature of CCB hasn't be finished. Please wait two weeks.

bhavnasahu89 commented 11 years ago

thank you...may i know when u r going to add extension like cctableview...?

QiMa commented 11 years ago

extension is next goal.

saudahmed commented 11 years ago

BUG:

I am reading a plist into the CCArray but it returns a Null value. After debugging into the code I found out it is unable to read data into the buffer and I believe it is a bug. As Create2() return an invalid file handler. The Path to the assets is correct it is C:\Data\Programs{E0ED3292-F3AB-4D5F-B42C-396BD19004DE}\Install\Assets\BatchNode.plist on my device.

the code is simple works on other branch.

const char path = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath("BatchNode.plist"); CCArray \ parray = CCArray::createWithContentsOfFile(path);

// read the file from hardware hFile = ::CreateFile2(path.c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extendedParams); if (INVALID_HANDLE_VALUE == hFile) { break; }

In above code present in CCFileUtils_win8_metro.cpp it returns 0xfffffff and breaks so no data is read to the Buffer. So the buffer is never parsed to store data in the CCArray object and thus gets NULL value.

QiMa commented 11 years ago

Try http://github.com/qima/cocos2d-windowsphone, I have fixed this bug but haven't merge.

发自我的 iPhone

在 2013-4-5,20:10,"Saud Ahmed" notifications@github.com 写道:

BUG:

I am reading a plist into the CCArray but it returns a Null value. After debugging into the code I found out it is unable to read data into the buffer and I believe it is a bug. As Create2() return an invalid file handler. The Path to the assets is correct it is C:\Data\Programs{E0ED3292-F3AB-4D5F-B42C-396BD19004DE}\Install\Assets\BatchNode.plist on my device.

the code is simple works on other branch.

const char path = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath("BatchNode.plist"); CCArray \ parray = CCArray::createWithContentsOfFile(path);

// read the file from hardware hFile = ::CreateFile2(path.c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, &extendedParams); if (INVALID_HANDLE_VALUE == hFile) { break; }

In above code present in CCFileUtils_win8_metro.cpp it returns 0xfffffff and breaks so no data is read to the Buffer. So the buffer is never parsed to store data in the CCArray object and thus gets NULL value.

— Reply to this email directly or view it on GitHub.

saudahmed commented 11 years ago

Can you merge with master branch quickly for http://github.com/qima/cocos2d-windowsphone,. If not can you share a code snippet for this fix as I want to proceed quickly with my project. Fix: For unable to read plist into CCArray.

QiMa commented 11 years ago

I have confirmed that this feature is work. You need change the plist file project content attribute is true. The attribute of content is false.