Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into adapt-4inch-iphone5

Conflicts:
	samples/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj
This commit is contained in:
walzer 2012-09-24 15:17:58 +08:00
commit caa67d1eed
7 changed files with 25 additions and 25 deletions

View File

@ -320,6 +320,7 @@
"\"$(SRCROOT)/../../../cocos2dx\"",
"\"$(SRCROOT)/../../../cocos2dx/platform/ios\"",
"\"$(SRCROOT)/../../../cocos2dx/kazmath/include\"",
"$(SRCROOT)/../../../external/chipmunk/include/chipmunk",
);
INFOPLIST_FILE = "HelloCpp-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
@ -354,6 +355,7 @@
"\"$(SRCROOT)/../../../cocos2dx\"",
"\"$(SRCROOT)/../../../cocos2dx/platform/ios\"",
"\"$(SRCROOT)/../../../cocos2dx/kazmath/include\"",
"$(SRCROOT)/../../../external/chipmunk/include/chipmunk",
);
INFOPLIST_FILE = "HelloCpp-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.0;

View File

@ -34,8 +34,6 @@ bool AppDelegate::applicationDidFinishLaunching()
// set FPS. the default value is 1.0/60 if you don't call this
pDirector->setAnimationInterval(1.0 / 60);
CCScene * pScene = CCScene::create();
ScriptingCore* sc = ScriptingCore::getInstance();
sc->addRegisterCallback(register_all_cocos2dx);
sc->addRegisterCallback(register_cocos2dx_js_extensions);

View File

@ -106,7 +106,7 @@ class JSTouchDelegate: public CCTouchDelegate, public CCNode {
void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) {
CC_UNUSED_PARAM(pTouch);
CC_UNUSED_PARAM(pEvent);
jsval retval;
//jsval retval;
ScriptingCore::getInstance()->executeCustomTouchEvent(CCTOUCHMOVED,
pTouch, _mObj);
}

View File

@ -5,18 +5,18 @@
#include "cocos2d.h"
#include "js_manual_conversions.h"
#ifdef __cplusplus
extern "C" {
#endif
//#ifdef __cplusplus
//extern "C" {
//#endif
JSBool jsval_to_CGPoint( JSContext *cx, jsval vp, cpVect *out );
jsval CGPoint_to_jsval( JSContext *cx, cpVect p );
JSBool jsval_to_cpBB( JSContext *cx, jsval vp, cpBB *ret );
jsval cpBB_to_jsval(JSContext *cx, cpBB bb );
#ifdef __cplusplus
}
#endif
//#ifdef __cplusplus
//}
//#endif
#define cpVect_to_jsval CGPoint_to_jsval
#define jsval_to_cpVect jsval_to_CGPoint

View File

@ -90,7 +90,7 @@ static CCNode* loadReader(const char *file, jsval owner) {
ccBCallbackProxy->setJSOwner(owner);
//ccbReader->setOwner(dynamic_cast<CCObject *>(ccBCallbackProxy));
CCBSelectorResolver * targetAsCCBSelectorResolver = dynamic_cast<CCBSelectorResolver *>(ccBCallbackProxy);
//CCBSelectorResolver * targetAsCCBSelectorResolver = dynamic_cast<CCBSelectorResolver *>(ccBCallbackProxy);
CCNode * node = ccbReader->readNodeGraphFromFile(file, dynamic_cast<CCObject *>(ccBCallbackProxy));

View File

@ -400,7 +400,7 @@ template <class T>
js_type_class_t *js_get_type_from_native(T* native_obj) {
js_type_class_t *typeProxy;
uint32_t typeId = reinterpret_cast<int>(typeid(*native_obj).name());
const char *nam = typeid(*native_obj).name();
//const char *nam = typeid(*native_obj).name();
HASH_FIND_INT(_js_global_type_ht, &typeId, typeProxy);
if (!typeProxy) {
TypeInfo *typeInfo = dynamic_cast<TypeInfo *>(native_obj);

View File

@ -7,22 +7,22 @@
#include "jsapi.h"
#ifdef __cplusplus
extern "C" {
#endif
//#ifdef __cplusplus
//extern "C" {
//#endif
JSBool jsval_to_opaque( JSContext *cx, jsval vp, void **out );
JSBool jsval_to_int( JSContext *cx, jsval vp, int *out);
JSBool jsval_to_long( JSContext *cx, jsval vp, long *out);
JSBool jsval_to_longlong( JSContext *cx, jsval vp, long long *out);
jsval int_to_jsval( JSContext *cx, int l);
jsval long_to_jsval( JSContext *cx, long l);
jsval longlong_to_jsval( JSContext *cx, long long l);
jsval opaque_to_jsval( JSContext *cx, void* opaque);
extern JSBool jsval_to_opaque( JSContext *cx, jsval vp, void **out );
extern JSBool jsval_to_int( JSContext *cx, jsval vp, int *out);
extern JSBool jsval_to_long( JSContext *cx, jsval vp, long *out);
extern JSBool jsval_to_longlong( JSContext *cx, jsval vp, long long *out);
extern jsval int_to_jsval( JSContext *cx, int l);
extern jsval long_to_jsval( JSContext *cx, long l);
extern jsval longlong_to_jsval( JSContext *cx, long long l);
extern jsval opaque_to_jsval( JSContext *cx, void* opaque);
#ifdef __cplusplus
}
#endif
//#ifdef __cplusplus
//}
//#endif
#endif /* __JS_MANUAL_CONVERSIONS_H__ */