More fix to compile libjscocos2dx as dll under win32

This commit is contained in:
XiaoFeng 2016-03-14 12:06:14 +08:00
parent f32cc6bee6
commit 06ac05259b
2 changed files with 12 additions and 4 deletions

View File

@ -1081,7 +1081,7 @@ bool __jsb_cpSpace_addCollisionHandler(JSContext *cx, jsval *vp, jsval *argvp, J
cpCollisionHandler* cp_collision_handler = cpSpaceAddCollisionHandler(space, handler->typeA, handler->typeB);
cp_collision_handler->userData = handler;
#ifdef _USRDLL
#if defined(_WINDOWS) && (defined(_WIN32) || defined(WIN32))
cpCollisionHandler * cpHandler = get_cpCollisionHandlerDoNothing();
cp_collision_handler->beginFunc = handler->begin ? &myCollisionBegin : cpHandler->beginFunc;
cp_collision_handler->preSolveFunc = handler->pre ? &myCollisionPre : cpHandler->preSolveFunc;
@ -1092,7 +1092,7 @@ bool __jsb_cpSpace_addCollisionHandler(JSContext *cx, jsval *vp, jsval *argvp, J
cp_collision_handler->preSolveFunc = handler->pre ? &myCollisionPre : cpCollisionHandlerDoNothing.preSolveFunc;
cp_collision_handler->postSolveFunc = handler->post ? &myCollisionPost : cpCollisionHandlerDoNothing.postSolveFunc;
cp_collision_handler->separateFunc = handler->separate ? &myCollisionSeparate : cpCollisionHandlerDoNothing.separateFunc;
#endif
#endif // DEBUG
//
// Already added ? If so, remove it.
@ -1213,10 +1213,18 @@ bool __jsb_cpSpace_removeCollisionHandler(JSContext *cx, jsval *vp, jsval *argvp
JSB_PRECONDITION(ok, "Error parsing arguments");
cpCollisionHandler* collisionHandler = cpSpaceAddCollisionHandler(space, typeA, typeB);
#if defined(_WINDOWS) && (defined(_WIN32) || defined(WIN32))
cpCollisionHandler * cpHandler = get_cpCollisionHandlerDoNothing();
collisionHandler->beginFunc = cpHandler->beginFunc;
collisionHandler->postSolveFunc = cpHandler->postSolveFunc;
collisionHandler->preSolveFunc = cpHandler->preSolveFunc;
collisionHandler->separateFunc = cpHandler->separateFunc;
#else
collisionHandler->beginFunc = cpCollisionHandlerDoNothing.beginFunc;
collisionHandler->postSolveFunc = cpCollisionHandlerDoNothing.postSolveFunc;
collisionHandler->preSolveFunc = cpCollisionHandlerDoNothing.preSolveFunc;
collisionHandler->separateFunc = cpCollisionHandlerDoNothing.separateFunc;
#endif // _WINDOWS
// Remove it
struct collision_handler *hashElement = NULL;

View File

@ -1,6 +1,6 @@
{
"version":"v3-deps-83",
"zip_file_size":"127264511",
"version":"v3-deps-84",
"zip_file_size":"127264546",
"repo_name":"cocos2d-x-3rd-party-libs-bin",
"repo_parent":"https://github.com/cocos2d/",
"move_dirs":{