diff --git a/AUTHORS b/AUTHORS index 95aae15e61..3b4476539a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -46,6 +46,8 @@ Developers: DarraghCoy Fix a potential crash SimpleAudioEngineOpenSL::playEffect Fix some bugs with Set class + Add ccDrawSolidCircle + Add Rect::unionWithRect silverscania Pass correct parameter to glPixelStorei when creating a texture @@ -435,6 +437,7 @@ Developers: Fix for broken of ccArrayGetIndexOfObject after merging this commit(076f38c). Explicitly initialising CCAcceleration structure. Add support to save/retrieve CCData into/from CCUserDefault. + Text Shadows fix MarcelBloemendaal Adding secureTextEntry property to CCTextFieldTTF. diff --git a/cocos2dx/cocoa/CCGeometry.cpp b/cocos2dx/cocoa/CCGeometry.cpp index 23e4a932d2..5a3cb9db75 100644 --- a/cocos2dx/cocoa/CCGeometry.cpp +++ b/cocos2dx/cocoa/CCGeometry.cpp @@ -271,4 +271,44 @@ bool Rect::intersectsRect(const Rect& rect) const rect.getMaxY() < getMinY()); } +Rect Rect::unionWithRect(const Rect & rect) const +{ + float thisLeftX = origin.x; + float thisRightX = origin.x + size.width; + float thisTopY = origin.y + size.height; + float thisBottomY = origin.y; + + if (thisRightX < thisLeftX) + { + std::swap(thisRightX, thisLeftX); // This rect has negative width + } + + if (thisTopY < thisBottomY) + { + std::swap(thisTopY, thisBottomY); // This rect has negative height + } + + float otherLeftX = rect.origin.x; + float otherRightX = rect.origin.x + rect.size.width; + float otherTopY = rect.origin.y + rect.size.height; + float otherBottomY = rect.origin.y; + + if (otherRightX < otherLeftX) + { + std::swap(otherRightX, otherLeftX); // Other rect has negative width + } + + if (otherTopY < otherBottomY) + { + std::swap(otherTopY, otherBottomY); // Other rect has negative height + } + + float combinedLeftX = std::min(thisLeftX, otherLeftX); + float combinedRightX = std::max(thisRightX, otherRightX); + float combinedTopY = std::max(thisTopY, otherTopY); + float combinedBottomY = std::min(thisBottomY, otherBottomY); + + return Rect(combinedLeftX, combinedBottomY, combinedRightX - combinedLeftX, combinedTopY - combinedBottomY); +} + NS_CC_END diff --git a/cocos2dx/cocoa/CCGeometry.h b/cocos2dx/cocoa/CCGeometry.h index 680d330b55..cc254ccb4b 100644 --- a/cocos2dx/cocoa/CCGeometry.h +++ b/cocos2dx/cocoa/CCGeometry.h @@ -245,6 +245,7 @@ public: bool equals(const Rect& rect) const; bool containsPoint(const Point& point) const; bool intersectsRect(const Rect& rect) const; + Rect unionWithRect(const Rect & rect) const; }; diff --git a/cocos2dx/cocoa/CCObject.h b/cocos2dx/cocoa/CCObject.h index c28947e9b7..b1b4dd5550 100644 --- a/cocos2dx/cocoa/CCObject.h +++ b/cocos2dx/cocoa/CCObject.h @@ -100,14 +100,14 @@ typedef void (Object::*SEL_MenuHandler)(Object*); typedef void (Object::*SEL_EventHandler)(Event*); typedef int (Object::*SEL_Compare)(Object*); -#define schedule_selector(_SELECTOR) (SEL_SCHEDULE)(&_SELECTOR) -#define callfunc_selector(_SELECTOR) (SEL_CallFunc)(&_SELECTOR) -#define callfuncN_selector(_SELECTOR) (SEL_CallFuncN)(&_SELECTOR) -#define callfuncND_selector(_SELECTOR) (SEL_CallFuncND)(&_SELECTOR) -#define callfuncO_selector(_SELECTOR) (SEL_CallFuncO)(&_SELECTOR) -#define menu_selector(_SELECTOR) (SEL_MenuHandler)(&_SELECTOR) -#define event_selector(_SELECTOR) (SEL_EventHandler)(&_SELECTOR) -#define compare_selector(_SELECTOR) (SEL_Compare)(&_SELECTOR) +#define schedule_selector(_SELECTOR) static_cast(&_SELECTOR) +#define callfunc_selector(_SELECTOR) static_cast(&_SELECTOR) +#define callfuncN_selector(_SELECTOR) static_cast(&_SELECTOR) +#define callfuncND_selector(_SELECTOR) static_cast(&_SELECTOR) +#define callfuncO_selector(_SELECTOR) static_cast(&_SELECTOR) +#define menu_selector(_SELECTOR) static_cast(&_SELECTOR) +#define event_selector(_SELECTOR) static_cast(&_SELECTOR) +#define compare_selector(_SELECTOR) static_cast(&_SELECTOR) // new callbacks based on C++11 #define CC_CALLBACK_0(__selector__,__target__, ...) std::bind(&__selector__,__target__, ##__VA_ARGS__) diff --git a/cocos2dx/cocoa/CCSet.cpp b/cocos2dx/cocoa/CCSet.cpp index 6ca9342b80..c957dedffb 100644 --- a/cocos2dx/cocoa/CCSet.cpp +++ b/cocos2dx/cocoa/CCSet.cpp @@ -109,15 +109,20 @@ void Set::removeObject(Object *pObject) void Set::removeAllObjects() { - for (SetIterator it = _set->begin(); it != _set->end(); ) + SetIterator it = _set->begin(); + SetIterator tmp; + + while (it != _set->end()) { if (!(*it)) { break; } - (*it)->release(); - _set->erase(it++); + tmp = it; + ++tmp; + _set->erase(it); + it = tmp; } } diff --git a/cocos2dx/draw_nodes/CCDrawingPrimitives.cpp b/cocos2dx/draw_nodes/CCDrawingPrimitives.cpp index 30632f8958..8e55c894ad 100644 --- a/cocos2dx/draw_nodes/CCDrawingPrimitives.cpp +++ b/cocos2dx/draw_nodes/CCDrawingPrimitives.cpp @@ -383,6 +383,52 @@ void CC_DLL ccDrawCircle( const Point& center, float radius, float angle, unsign ccDrawCircle(center, radius, angle, segments, drawLineToCenter, 1.0f, 1.0f); } +void ccDrawSolidCircle( const Point& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY) +{ + lazy_init(); + + const float coef = 2.0f * (float)M_PI/segments; + + GLfloat *vertices = (GLfloat*)calloc( sizeof(GLfloat)*2*(segments+2), 1); + if( ! vertices ) + return; + + for(unsigned int i = 0;i <= segments; i++) { + float rads = i*coef; + GLfloat j = radius * cosf(rads + angle) * scaleX + center.x; + GLfloat k = radius * sinf(rads + angle) * scaleY + center.y; + + vertices[i*2] = j; + vertices[i*2+1] = k; + } + vertices[(segments+1)*2] = center.x; + vertices[(segments+1)*2+1] = center.y; + + s_pShader->use(); + s_pShader->setUniformsForBuiltins(); + s_pShader->setUniformLocationWith4fv(s_nColorLocation, (GLfloat*) &s_tColor.r, 1); + + ccGLEnableVertexAttribs( kVertexAttribFlag_Position ); + +#ifdef EMSCRIPTEN + setGLBufferData(vertices, sizeof(GLfloat)*2*(segments+2)); + glVertexAttribPointer(kVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, 0, 0); +#else + glVertexAttribPointer(kVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, 0, vertices); +#endif // EMSCRIPTEN + + glDrawArrays(GL_TRIANGLE_FAN, 0, (GLsizei) segments+1); + + free( vertices ); + + CC_INCREMENT_GL_DRAWS(1); +} + +void CC_DLL ccDrawSolidCircle( const Point& center, float radius, float angle, unsigned int segments) +{ + ccDrawSolidCircle(center, radius, angle, segments, 1.0f, 1.0f); +} + void ccDrawQuadBezier(const Point& origin, const Point& control, const Point& destination, unsigned int segments) { lazy_init(); diff --git a/cocos2dx/draw_nodes/CCDrawingPrimitives.h b/cocos2dx/draw_nodes/CCDrawingPrimitives.h index 8949aed7ab..d2cd24af75 100644 --- a/cocos2dx/draw_nodes/CCDrawingPrimitives.h +++ b/cocos2dx/draw_nodes/CCDrawingPrimitives.h @@ -113,6 +113,10 @@ void CC_DLL ccDrawSolidPoly( const Point *poli, unsigned int numberOfPoints, ccC void CC_DLL ccDrawCircle( const Point& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY); void CC_DLL ccDrawCircle( const Point& center, float radius, float angle, unsigned int segments, bool drawLineToCenter); +/** draws a solid circle given the center, radius and number of segments. */ +void CC_DLL ccDrawSolidCircle( const Point& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY); +void CC_DLL ccDrawSolidCircle( const Point& center, float radius, float angle, unsigned int segments); + /** draws a quad bezier path @warning This function could be pretty slow. Use it only for debugging purposes. @since v0.8 diff --git a/cocos2dx/misc_nodes/CCMotionStreak.cpp b/cocos2dx/misc_nodes/CCMotionStreak.cpp index 569ad430be..0ee045c9c1 100644 --- a/cocos2dx/misc_nodes/CCMotionStreak.cpp +++ b/cocos2dx/misc_nodes/CCMotionStreak.cpp @@ -65,7 +65,7 @@ MotionStreak::~MotionStreak() CC_SAFE_FREE(_texCoords); } -MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, ccColor3B color, const char* path) +MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path) { MotionStreak *pRet = new MotionStreak(); if (pRet && pRet->initWithFade(fade, minSeg, stroke, color, path)) @@ -78,7 +78,7 @@ MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, ccCol return NULL; } -MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, ccColor3B color, Texture2D* texture) +MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, const ccColor3B& color, Texture2D* texture) { MotionStreak *pRet = new MotionStreak(); if (pRet && pRet->initWithFade(fade, minSeg, stroke, color, texture)) @@ -91,7 +91,7 @@ MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, ccCol return NULL; } -bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path) +bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path) { CCAssert(path != NULL, "Invalid filename"); @@ -99,7 +99,7 @@ bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, ccColor3 return initWithFade(fade, minSeg, stroke, color, texture); } -bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, ccColor3B color, Texture2D* texture) +bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, Texture2D* texture) { Node::setPosition(PointZero); setAnchorPoint(PointZero); @@ -143,7 +143,7 @@ void MotionStreak::setPosition(const Point& position) _positionR = position; } -void MotionStreak::tintWithColor(ccColor3B colors) +void MotionStreak::tintWithColor(const ccColor3B& colors) { setColor(colors); diff --git a/cocos2dx/misc_nodes/CCMotionStreak.h b/cocos2dx/misc_nodes/CCMotionStreak.h index be8d7ff6da..47d5591fd3 100644 --- a/cocos2dx/misc_nodes/CCMotionStreak.h +++ b/cocos2dx/misc_nodes/CCMotionStreak.h @@ -53,17 +53,17 @@ public: virtual ~MotionStreak(); /** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename */ - static MotionStreak* create(float fade, float minSeg, float stroke, ccColor3B color, const char* path); + static MotionStreak* create(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path); /** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture */ - static MotionStreak* create(float fade, float minSeg, float stroke, ccColor3B color, Texture2D* texture); + static MotionStreak* create(float fade, float minSeg, float stroke, const ccColor3B& color, Texture2D* texture); /** initializes a motion streak with fade in seconds, minimum segments, stroke's width, color and texture filename */ - bool initWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path); + bool initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path); /** initializes a motion streak with fade in seconds, minimum segments, stroke's width, color and texture */ - bool initWithFade(float fade, float minSeg, float stroke, ccColor3B color, Texture2D* texture); + bool initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, Texture2D* texture); /** color used for the tint */ - void tintWithColor(ccColor3B colors); + void tintWithColor(const ccColor3B& colors); /** Remove all living segments of the ribbon */ void reset(); diff --git a/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxBitmap.java b/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxBitmap.java index fcd4598cde..2a0a915a02 100644 --- a/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxBitmap.java +++ b/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxBitmap.java @@ -128,7 +128,7 @@ public class Cocos2dxBitmap { if ( shadow ) { - int shadowColor = 0xff7d7d7d; + int shadowColor = 0x54000000; paint.setShadowLayer(shadowBlur, shadowDX, shadowDY, shadowColor); bitmapPaddingX = Math.abs(shadowDX); diff --git a/cocos2dx/platform/ios/CCImage.mm b/cocos2dx/platform/ios/CCImage.mm index cdd3a8a2c4..6c5f7e0a8c 100644 --- a/cocos2dx/platform/ios/CCImage.mm +++ b/cocos2dx/platform/ios/CCImage.mm @@ -365,10 +365,14 @@ static bool _initWithString(const char * pText, cocos2d::Image::ETextAlign eAlig textOrigingY = startH - shadowStrokePaddingY; } + CGRect rect = CGRectMake(textOriginX, textOrigingY, textWidth, textHeight); + CGContextBeginTransparencyLayerWithRect(context, rect, NULL); // actually draw the text in the context // XXX: ios7 casting - [str drawInRect:CGRectMake(textOriginX, textOrigingY, textWidth, textHeight) withFont:font lineBreakMode:NSLineBreakByWordWrapping alignment:(NSTextAlignment)align]; + [str drawInRect: rect withFont:font lineBreakMode:NSLineBreakByWordWrapping alignment:(NSTextAlignment)align]; + + CGContextEndTransparencyLayer(context); // pop the context UIGraphicsPopContext(); diff --git a/cocos2dx/sprite_nodes/CCSprite.cpp b/cocos2dx/sprite_nodes/CCSprite.cpp index f1c62c7145..fcdde05bb6 100644 --- a/cocos2dx/sprite_nodes/CCSprite.cpp +++ b/cocos2dx/sprite_nodes/CCSprite.cpp @@ -182,6 +182,9 @@ bool Sprite::initWithTexture(Texture2D *pTexture, const Rect& rect, bool rotated _quad.tl.colors = tmpColor; _quad.tr.colors = tmpColor; + // shader program + setShaderProgram(ShaderCache::sharedShaderCache()->programForKey(kShader_PositionTextureColor)); + // update texture (calls updateBlendFunc) setTexture(pTexture); setTextureRect(rect, rotated, rect.size); @@ -547,17 +550,22 @@ void Sprite::draw(void) CCAssert(!_batchNode, "If Sprite is being rendered by SpriteBatchNode, Sprite#draw SHOULD NOT be called"); - CC_NODE_DRAW_SETUP(); - ccGLBlendFunc( _blendFunc.src, _blendFunc.dst ); if (_texture != NULL) { + CC_NODE_DRAW_SETUP(); ccGLBindTexture2D( _texture->getName() ); ccGLEnableVertexAttribs( kVertexAttribFlag_PosColorTex ); } else { + // If the texture is invalid, uses the PositionColor shader instead. + // TODO: PostionTextureColor shader should support empty texture. In that way, we could get rid of next three lines. + GLProgram* prog = ShaderCache::sharedShaderCache()->programForKey(kShader_PositionColor); + prog->use(); + prog->setUniformsForBuiltins(); + ccGLBindTexture2D(0); ccGLEnableVertexAttribs( kVertexAttribFlag_Position | kVertexAttribFlag_Color ); } @@ -1081,16 +1089,6 @@ void Sprite::setTexture(Texture2D *texture) CCAssert(! _batchNode || texture->getName() == _batchNode->getTexture()->getName(), "CCSprite: Batched sprites should use the same texture as the batchnode"); // accept texture==nil as argument CCAssert( !texture || dynamic_cast(texture), "setTexture expects a Texture2D. Invalid argument"); - - // shader program - if (texture) - { - setShaderProgram(ShaderCache::sharedShaderCache()->programForKey(kShader_PositionTextureColor)); - } - else - { - setShaderProgram(ShaderCache::sharedShaderCache()->programForKey(kShader_PositionColor)); - } if (!_batchNode && _texture != texture) { diff --git a/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.cpp b/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.cpp index 81703d69da..ba1452b45f 100644 --- a/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.cpp +++ b/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.cpp @@ -226,7 +226,11 @@ void TMXLayer::parseInternalProperties() GLint alphaValueLocation = glGetUniformLocation(getShaderProgram()->getProgram(), kUniformAlphaTestValue); // NOTE: alpha test shader is hard-coded to use the equivalent of a glAlphaFunc(GL_GREATER) comparison + + // use shader program to set uniform + getShaderProgram()->use(); getShaderProgram()->setUniformLocationWith1f(alphaValueLocation, alphaFuncValue); + CHECK_GL_ERROR_DEBUG(); } else { diff --git a/plugin/plugins/uc/proj.android/.classpath b/plugin/plugins/uc/proj.android/.classpath new file mode 100644 index 0000000000..9754ad6c99 --- /dev/null +++ b/plugin/plugins/uc/proj.android/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/plugin/plugins/uc/proj.android/.project b/plugin/plugins/uc/proj.android/.project new file mode 100644 index 0000000000..073f0684d7 --- /dev/null +++ b/plugin/plugins/uc/proj.android/.project @@ -0,0 +1,33 @@ + + + libPluginUC + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/plugin/plugins/uc/proj.android/AndroidManifest.xml b/plugin/plugins/uc/proj.android/AndroidManifest.xml new file mode 100644 index 0000000000..c726c061ac --- /dev/null +++ b/plugin/plugins/uc/proj.android/AndroidManifest.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/plugin/plugins/uc/proj.android/ForManifest.xml b/plugin/plugins/uc/proj.android/ForManifest.xml new file mode 100644 index 0000000000..b5b2b1da45 --- /dev/null +++ b/plugin/plugins/uc/proj.android/ForManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/plugins/uc/proj.android/build.xml b/plugin/plugins/uc/proj.android/build.xml new file mode 100644 index 0000000000..363f87a933 --- /dev/null +++ b/plugin/plugins/uc/proj.android/build.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/plugins/uc/proj.android/project.properties b/plugin/plugins/uc/proj.android/project.properties new file mode 100644 index 0000000000..177743ede1 --- /dev/null +++ b/plugin/plugins/uc/proj.android/project.properties @@ -0,0 +1,16 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-17 +android.library=true +android.library.reference.1=../../../protocols/proj.android diff --git a/plugin/plugins/uc/proj.android/res/.gitignore b/plugin/plugins/uc/proj.android/res/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugin/plugins/uc/proj.android/sdk/UCGameSDK.jar.REMOVED.git-id b/plugin/plugins/uc/proj.android/sdk/UCGameSDK.jar.REMOVED.git-id new file mode 100644 index 0000000000..3a296deb29 --- /dev/null +++ b/plugin/plugins/uc/proj.android/sdk/UCGameSDK.jar.REMOVED.git-id @@ -0,0 +1 @@ +ba5cc5fb902013d53136f6b198055643d5d8a045 \ No newline at end of file diff --git a/plugin/plugins/uc/proj.android/sdk/alipay_msp.jar b/plugin/plugins/uc/proj.android/sdk/alipay_msp.jar new file mode 100644 index 0000000000..32bea3c115 Binary files /dev/null and b/plugin/plugins/uc/proj.android/sdk/alipay_msp.jar differ diff --git a/plugin/plugins/uc/proj.android/src/org/cocos2dx/plugin/UserUC.java b/plugin/plugins/uc/proj.android/src/org/cocos2dx/plugin/UserUC.java new file mode 100644 index 0000000000..ae149565d5 --- /dev/null +++ b/plugin/plugins/uc/proj.android/src/org/cocos2dx/plugin/UserUC.java @@ -0,0 +1,232 @@ +/**************************************************************************** +Copyright (c) 2012-2013 cocos2d-x.org + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +package org.cocos2dx.plugin; + +import java.util.Hashtable; + +import cn.uc.gamesdk.UCCallbackListener; +import cn.uc.gamesdk.UCGameSDK; +import cn.uc.gamesdk.UCGameSDKStatusCode; +import cn.uc.gamesdk.UCLogLevel; +import cn.uc.gamesdk.UCOrientation; +import cn.uc.gamesdk.info.GameParamInfo; + +import android.content.Context; +import android.content.pm.ActivityInfo; +import android.content.res.Configuration; +import android.util.Log; + +public class UserUC implements InterfaceUser { + + private static Context mContext = null; + protected static String TAG = "UserUC"; + private static InterfaceUser mAdapter = null; + private boolean mLogined = false; + + protected static void LogE(String msg, Exception e) { + Log.e(TAG, msg, e); + e.printStackTrace(); + } + + private static boolean isDebug = false; + private boolean isInited = false; + protected static void LogD(String msg) { + if (isDebug) { + Log.d(TAG, msg); + } + } + + public UserUC(Context context) { + mContext = context; + mAdapter = this; + } + + @Override + public void configDeveloperInfo(Hashtable cpInfo) { + final Hashtable curInfo = cpInfo; + PluginWrapper.runOnMainThread(new Runnable() { + @Override + public void run() { + try { + String strCpId = curInfo.get("UCCpId"); + String strGameId = curInfo.get("UCGameId"); + String strServerId = curInfo.get("UCServerId"); + + int cpId = Integer.parseInt(strCpId); + int gameId = Integer.parseInt(strGameId); + int serverId = Integer.parseInt(strServerId); + GameParamInfo gpi = new GameParamInfo(); + gpi.setCpId(cpId); + gpi.setGameId(gameId); + gpi.setServerId(serverId); + + UCGameSDK.defaultSDK().setLogoutNotifyListener(new UCCallbackListener() { + @Override + public void callback(int statuscode, String data) { + switch (statuscode) { + case UCGameSDKStatusCode.SUCCESS: + UserWrapper.onActionResult(mAdapter, UserWrapper.ACTION_RET_LOGOUT_SUCCEED, "User Logout!"); + mLogined = false; + break; + default: + break; + } + } + }); + + if (isLandscape()) { + UCGameSDK.defaultSDK().setOrientation(UCOrientation.LANDSCAPE); + } + + UCGameSDK.defaultSDK().initSDK(mContext, UCLogLevel.ERROR, isDebug, gpi, new UCCallbackListener() { + @Override + public void callback(int code, String msg) { + System.out.println("msg:" + msg); + switch (code) { + case UCGameSDKStatusCode.SUCCESS: + isInited = true; + break; + case UCGameSDKStatusCode.INIT_FAIL: + default: + isInited = false; + break; + } + } + }); + } catch(Exception e) { + isInited = false; + LogE("Init SDK failed", e); + } + } + }); + } + + private static boolean waitHandle = true; + @Override + public void login() { + if (! isInited) { + UserWrapper.onActionResult(mAdapter, UserWrapper.ACTION_RET_LOGIN_FAILED, "SDK init failed"); + return; + } + + if (isLogined()) { + UserWrapper.onActionResult(mAdapter, UserWrapper.ACTION_RET_LOGIN_SUCCEED, "Already logined!"); + return; + } + + PluginWrapper.runOnMainThread(new Runnable() { + @Override + public void run() { + try { + waitHandle = true; + UCGameSDK.defaultSDK().login(mContext, new UCCallbackListener() { + @Override + public void callback(int code, String msg) { + LogD("login ret : " + code + " , msg : " + msg); + if (! waitHandle) { + return; + } + + switch(code) { + case UCGameSDKStatusCode.SUCCESS: + mLogined = true; + UserWrapper.onActionResult(mAdapter, UserWrapper.ACTION_RET_LOGIN_SUCCEED, msg); + break; + default: + mLogined = false; + UserWrapper.onActionResult(mAdapter, UserWrapper.ACTION_RET_LOGIN_FAILED, msg); + break; + } + + waitHandle = false; + } + }); + } catch (Exception e) { + mLogined = false; + LogE("Login failed", e); + UserWrapper.onActionResult(mAdapter, UserWrapper.ACTION_RET_LOGIN_FAILED, "Login Failed!"); + } + } + }); + } + + @Override + public void logout() { + if (! isLogined()) { + LogD("User not logined!"); + return; + } + + PluginWrapper.runOnMainThread(new Runnable() { + @Override + public void run() { + try { + UCGameSDK.defaultSDK().logout(); + } catch (Exception e) { + LogE("User logout failed", e); + } + } + }); + } + + @Override + public boolean isLogined() { + return mLogined; + } + + @Override + public String getSessionID() { + LogD("getSessionID() invoked!"); + return UCGameSDK.defaultSDK().getSid(); + } + + @Override + public void setDebugMode(boolean debug) { + isDebug = debug; + } + + @Override + public String getPluginVersion() { + return "0.2.0"; + } + + @Override + public String getSDKVersion() { + return "2.3.4"; + } + + private static boolean isLandscape() + { + Configuration config = mContext.getResources().getConfiguration(); + int orientation = config.orientation; + + if (orientation != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE || + orientation != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) + { + orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; + } + + return (orientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); + } +} diff --git a/plugin/samples/HelloPlugins/Classes/TestUser/MyUserManager.cpp b/plugin/samples/HelloPlugins/Classes/TestUser/MyUserManager.cpp index d4c12b583c..2c76144d64 100644 --- a/plugin/samples/HelloPlugins/Classes/TestUser/MyUserManager.cpp +++ b/plugin/samples/HelloPlugins/Classes/TestUser/MyUserManager.cpp @@ -34,6 +34,7 @@ MyUserManager::MyUserManager() : _retListener(NULL) , _qh360(NULL) , _nd91(NULL) +, _uc(NULL) { } @@ -101,6 +102,27 @@ void MyUserManager::loadPlugin() _nd91->setActionListener(_retListener); } } + +#if TEST_UC + { + _uc = dynamic_cast(PluginManager::getInstance()->loadPlugin("UserUC")); + if (NULL != _uc) + { + TUserDeveloperInfo pUCInfo; + pUCInfo["UCCpId"] = "20087"; + pUCInfo["UCGameId"] = "119474"; + pUCInfo["UCServerId"] = "1333"; + if (pUCInfo.empty()) { + char msg[256] = { 0 }; + sprintf(msg, "Developer info is empty. PLZ fill your UC info in %s(nearby line %d)", __FILE__, __LINE__); + MessageBox(msg, "UC Warning"); + } + _uc->setDebugMode(true); + _uc->configDeveloperInfo(pUCInfo); + _uc->setActionListener(_retListener); + } + } +#endif } void MyUserManager::unloadPlugin() @@ -116,6 +138,12 @@ void MyUserManager::unloadPlugin() PluginManager::getInstance()->unloadPlugin("UserNd91"); _nd91 = NULL; } + + if (_uc) + { + PluginManager::getInstance()->unloadPlugin("UserUC"); + _uc = NULL; + } } void MyUserManager::loginByMode(MyUserMode mode) @@ -129,6 +157,11 @@ void MyUserManager::loginByMode(MyUserMode mode) case kND91: pUser = _nd91; break; +#if TEST_UC + case kUC: + pUser = _uc; + break; +#endif default: break; } @@ -149,6 +182,11 @@ void MyUserManager::logoutByMode(MyUserMode mode) case kND91: pUser = _nd91; break; +#if TEST_UC + case kUC: + pUser = _uc; + break; +#endif default: break; } diff --git a/plugin/samples/HelloPlugins/Classes/TestUser/MyUserManager.h b/plugin/samples/HelloPlugins/Classes/TestUser/MyUserManager.h index 05ec6f2143..a05bd23eff 100755 --- a/plugin/samples/HelloPlugins/Classes/TestUser/MyUserManager.h +++ b/plugin/samples/HelloPlugins/Classes/TestUser/MyUserManager.h @@ -26,6 +26,13 @@ THE SOFTWARE. #include "ProtocolUser.h" +/** @warning + * The file UCGameSDK.jar conflicts with weiboSDK.jar + * if you want test the login/logout of UC, + * modify the android project config: remove the weiboSDK.jar, and add UCGameSDK.jar +*/ +#define TEST_UC 0 + class MyUserActionResult : public cocos2d::plugin::UserActionListener { public: @@ -42,6 +49,9 @@ public: kNoneMode = 0, kQH360, kND91, +#if TEST_UC + kUC, +#endif } MyUserMode; void unloadPlugin(); @@ -57,6 +67,7 @@ private: cocos2d::plugin::ProtocolUser* _qh360; cocos2d::plugin::ProtocolUser* _nd91; + cocos2d::plugin::ProtocolUser* _uc; MyUserActionResult* _retListener; }; diff --git a/plugin/samples/HelloPlugins/Classes/TestUser/TestUserScene.cpp b/plugin/samples/HelloPlugins/Classes/TestUser/TestUserScene.cpp index fc18b4b597..b07f6e1965 100644 --- a/plugin/samples/HelloPlugins/Classes/TestUser/TestUserScene.cpp +++ b/plugin/samples/HelloPlugins/Classes/TestUser/TestUserScene.cpp @@ -7,6 +7,9 @@ USING_NS_CC; const std::string s_aTestCases[] = { "QH360", "ND91", +#if TEST_UC + "UC", +#endif }; Scene* TestUser::scene() diff --git a/plugin/samples/HelloPlugins/proj.android/.classpath b/plugin/samples/HelloPlugins/proj.android/.classpath index 78c6a50901..bb53076fa4 100644 --- a/plugin/samples/HelloPlugins/proj.android/.classpath +++ b/plugin/samples/HelloPlugins/proj.android/.classpath @@ -24,5 +24,6 @@ + diff --git a/plugin/samples/HelloPlugins/proj.android/AndroidManifest.xml b/plugin/samples/HelloPlugins/proj.android/AndroidManifest.xml index 4e3f48d5d7..4c2a828f40 100644 --- a/plugin/samples/HelloPlugins/proj.android/AndroidManifest.xml +++ b/plugin/samples/HelloPlugins/proj.android/AndroidManifest.xml @@ -36,6 +36,16 @@ + + + + + + diff --git a/plugin/tools/config.sh b/plugin/tools/config.sh index a6edee3084..20c34ad1ff 100755 --- a/plugin/tools/config.sh +++ b/plugin/tools/config.sh @@ -3,7 +3,7 @@ export ALL_PLUGINS=("flurry" "umeng" \ "alipay" "nd91" \ "admob" \ "twitter" "weibo" \ -"qh360") +"qh360" "uc") # define the plugin root directory & publish target directory export TARGET_DIR_NAME="publish" diff --git a/samples/Cpp/TestCpp/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp b/samples/Cpp/TestCpp/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp index a3a72e8622..bd35b80d5c 100644 --- a/samples/Cpp/TestCpp/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp +++ b/samples/Cpp/TestCpp/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp @@ -172,6 +172,13 @@ void DrawPrimitivesTest::draw() CHECK_GL_ERROR_DEBUG(); + // draw a pink solid circle with 50 segments + glLineWidth(2); + ccDrawColor4B(255, 0, 255, 255); + ccDrawSolidCircle( VisibleRect::center() + ccp(140,0), 40, CC_DEGREES_TO_RADIANS(90), 50, 1.0f, 1.0f); + + CHECK_GL_ERROR_DEBUG(); + // open yellow poly ccDrawColor4B(255, 255, 0, 255); glLineWidth(10); diff --git a/samples/Javascript/Shared b/samples/Javascript/Shared index 38374930ae..e4b1b15b70 160000 --- a/samples/Javascript/Shared +++ b/samples/Javascript/Shared @@ -1 +1 @@ -Subproject commit 38374930ae707c70611ad1fcb3a5af91d50d72d0 +Subproject commit e4b1b15b70075dee1f20afff4741eb0be88b0a8b diff --git a/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj b/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj index 677f53aa3e..c5d8940979 100644 --- a/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj +++ b/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 15A3D5631682F20C002FB0C5 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D4621682F14C002FB0C5 /* main.js */; }; 15A3D5651682F20C002FB0C5 /* tests_resources-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D4711682F14C002FB0C5 /* tests_resources-jsb.js */; }; 15A3D5681682F20C002FB0C5 /* tests-main.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D4741682F14C002FB0C5 /* tests-main.js */; }; + 1A42C7A81782CEA100F738F6 /* MotionStreakTest in Resources */ = {isa = PBXBuildFile; fileRef = 1A42C7A71782CEA100F738F6 /* MotionStreakTest */; }; 1A4C3F1317784B6000EDFB3B /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A4C3F0E17784B6000EDFB3B /* libchipmunk.a */; }; 1A4C3F1417784B6000EDFB3B /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A4C3F0F17784B6000EDFB3B /* libcocos2dx.a */; }; 1A4C3F1517784B6000EDFB3B /* libCocosDenshion.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A4C3F1017784B6000EDFB3B /* libCocosDenshion.a */; }; @@ -117,6 +118,7 @@ 15A3D4621682F14C002FB0C5 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../../Shared/tests/main.js; sourceTree = ""; }; 15A3D4711682F14C002FB0C5 /* tests_resources-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "tests_resources-jsb.js"; path = "../../Shared/tests/tests_resources-jsb.js"; sourceTree = ""; }; 15A3D4741682F14C002FB0C5 /* tests-main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "tests-main.js"; path = "../../Shared/tests/tests-main.js"; sourceTree = ""; }; + 1A42C7A71782CEA100F738F6 /* MotionStreakTest */ = {isa = PBXFileReference; lastKnownFileType = folder; name = MotionStreakTest; path = ../../Shared/tests/MotionStreakTest; sourceTree = ""; }; 1A4C3F0E17784B6000EDFB3B /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libchipmunk.a; sourceTree = BUILT_PRODUCTS_DIR; }; 1A4C3F0F17784B6000EDFB3B /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libcocos2dx.a; sourceTree = BUILT_PRODUCTS_DIR; }; 1A4C3F1017784B6000EDFB3B /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libCocosDenshion.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -333,14 +335,13 @@ D401B5FC16FB169100F2529D /* js_src_raw */ = { isa = PBXGroup; children = ( - A22656EE1743DCBB00598A2C /* ClippingNodeTest */, - A218F7DB1743D97E00F65883 /* XHRTest */, 1AA51A7816F708FA000FDF05 /* ActionManagerTest */, 1AA51A7916F708FA000FDF05 /* ActionsTest */, 1AA51A7A16F708FA000FDF05 /* BaseTestLayer */, 1AA51A7B16F708FA000FDF05 /* Box2dTest */, 1AA51A7C16F708FA000FDF05 /* ChipmunkTest */, 1AA51A7D16F708FA000FDF05 /* ClickAndMoveTest */, + A22656EE1743DCBB00598A2C /* ClippingNodeTest */, 1AA51A7E16F708FA000FDF05 /* CocosDenshionTest */, 1AA51A7F16F708FA000FDF05 /* CocosNodeTest */, 1AA51A8016F708FA000FDF05 /* CurrentLanguageTest */, @@ -355,7 +356,9 @@ 1AA51A8816F708FA000FDF05 /* IntervalTest */, 1AA51A8916F708FA000FDF05 /* LabelTest */, 1AA51A8A16F708FA000FDF05 /* LayerTest */, + 15A3D4621682F14C002FB0C5 /* main.js */, 1AA51A8B16F708FA000FDF05 /* MenuTest */, + 1A42C7A71782CEA100F738F6 /* MotionStreakTest */, 1AA51A8C16F708FA000FDF05 /* OpenGLTest */, 1AA51A8D16F708FA000FDF05 /* ParallaxTest */, 1AA51A8E16F708FA000FDF05 /* ParticleTest */, @@ -368,16 +371,16 @@ 1AA51A9616F708FA000FDF05 /* SchedulerTest */, 1AA51A9716F708FA000FDF05 /* SpriteTest */, 1AA51A9816F708FA000FDF05 /* SysTest */, + D401B6DE16FC071100F2529D /* tests-boot-jsb.js */, + 15A3D4741682F14C002FB0C5 /* tests-main.js */, + 15A3D4711682F14C002FB0C5 /* tests_resources-jsb.js */, 1AA51A9916F708FA000FDF05 /* TextInputTest */, 1AA51A9A16F708FA000FDF05 /* TextureCacheTest */, 1AA51A9B16F708FA000FDF05 /* TileMapTest */, 1AA51A9C16F708FA000FDF05 /* TouchesTest */, 1AA51A9D16F708FA000FDF05 /* TransitionsTest */, 1AA51A9E16F708FA000FDF05 /* UnitTest */, - 15A3D4621682F14C002FB0C5 /* main.js */, - D401B6DE16FC071100F2529D /* tests-boot-jsb.js */, - 15A3D4741682F14C002FB0C5 /* tests-main.js */, - 15A3D4711682F14C002FB0C5 /* tests_resources-jsb.js */, + A218F7DB1743D97E00F65883 /* XHRTest */, ); name = js_src_raw; sourceTree = ""; @@ -549,6 +552,7 @@ 1A80332C1728F1FB00240CC3 /* res in Resources */, A218F7DC1743D97E00F65883 /* XHRTest in Resources */, A22656EF1743DCBB00598A2C /* ClippingNodeTest in Resources */, + 1A42C7A81782CEA100F738F6 /* MotionStreakTest in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id b/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id index 2fd19b673d..7c93b3b955 100644 --- a/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id +++ b/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id @@ -1 +1 @@ -b30514e90b5ed9a70853c63f20e9204052679459 \ No newline at end of file +2fe7237c56cf52c3ca577e33fc39aa5c9e2469ba \ No newline at end of file diff --git a/scripting/javascript/bindings/cocos2d_specifics.hpp b/scripting/javascript/bindings/cocos2d_specifics.hpp index 8e816cdb9c..8501a71b92 100644 --- a/scripting/javascript/bindings/cocos2d_specifics.hpp +++ b/scripting/javascript/bindings/cocos2d_specifics.hpp @@ -101,9 +101,9 @@ public: const jsval& getJSCallbackThis() const; const jsval& getJSExtraData() const; protected: - jsval jsCallback; - jsval jsThisObj; - jsval extraData; + jsval _jsCallback; + jsval _jsThisObj; + jsval _extraData; }; @@ -112,13 +112,13 @@ public: JSCCBAnimationWrapper() {} virtual ~JSCCBAnimationWrapper() {} - void animationCompleteCallback() const { + void animationCompleteCallback() { JSContext *cx = ScriptingCore::getInstance()->getGlobalContext(); jsval retval = JSVAL_NULL; - if(!JSVAL_IS_VOID(jsCallback) && !JSVAL_IS_VOID(jsThisObj)) { - JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(jsThisObj), jsCallback, 0, NULL, &retval); + if(!JSVAL_IS_VOID(_jsCallback) && !JSVAL_IS_VOID(_jsThisObj)) { + JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(_jsThisObj), _jsCallback, 0, NULL, &retval); } } @@ -135,7 +135,7 @@ public: static void setTargetForNativeNode(Node *pNode, JSCallFuncWrapper *target); static Array * getTargetForNativeNode(Node *pNode); - void callbackFunc(Node *node) const; + void callbackFunc(Node *node); }; @@ -162,7 +162,7 @@ public: void pause(); - void scheduleFunc(float dt) const; + void scheduleFunc(float dt); virtual void update(float dt); Object* getTarget(); diff --git a/scripting/javascript/bindings/generated b/scripting/javascript/bindings/generated index 1aef083d39..5df9199315 160000 --- a/scripting/javascript/bindings/generated +++ b/scripting/javascript/bindings/generated @@ -1 +1 @@ -Subproject commit 1aef083d3959574072f234cd31c5a53ac52b58a9 +Subproject commit 5df9199315b9e9972da23e478808a2e9152e9980 diff --git a/tools/bindings-generator b/tools/bindings-generator index 6a45a0770c..b09d920cdb 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit 6a45a0770c4e6075f20d5049c88e3cb5f8aa83eb +Subproject commit b09d920cdb2523ba7ee1a5ee4419fe11f1bc5e7b diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index 14ec24745a..1adc23b24c 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -26,7 +26,7 @@ headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/CocosDenshion/inc # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". -classes = Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Data SimpleAudioEngine Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode +classes = Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Data SimpleAudioEngine Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak # what should we skip? in the format ClassName::[function function] # ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also @@ -35,17 +35,17 @@ classes = Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* # will apply to all class names. This is a convenience wildcard to be able to skip similar named # functions from all classes. -skip = Node::[convertToWindowSpace ^setPosition$ getGrid setGLServerState description getUserObject .*UserData getGLServerState .*schedule], +skip = Node::[^setPosition$ getGrid setGLServerState description getUserObject .*UserData getGLServerState .*schedule], Sprite::[getQuad displayFrame getBlendFunc ^setPosition$ setBlendFunc setSpriteBatchNode getSpriteBatchNode], SpriteBatchNode::[getBlendFunc setBlendFunc], - MotionStreak::[getBlendFunc setBlendFunc], + MotionStreak::[getBlendFunc setBlendFunc draw update], AtlasNode::[getBlendFunc setBlendFunc], ParticleBatchNode::[getBlendFunc setBlendFunc], LayerColor::[getBlendFunc setBlendFunc], ParticleSystem::[getBlendFunc setBlendFunc], DrawNode::[getBlendFunc setBlendFunc drawPolygon], Director::[getAccelerometer (g|s)et.*Dispatcher getOpenGLView getProjection getClassTypeInfo], - Layer.*::[didAccelerate (g|s)etBlendFunc], + Layer.*::[didAccelerate (g|s)etBlendFunc keyPressed keyReleased unregisterScriptKeypadHandler], Menu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns], MenuItem.*::[create setCallback initWithCallback], Copying::[*],