Merge branch 'v3' into v3_trianglesCommand

Conflicts:
	cocos/renderer/CCQuadCommand.h
This commit is contained in:
Huabing.Xu 2014-09-01 14:27:19 +08:00
commit dad62ad6df
328 changed files with 7114 additions and 5084 deletions

View File

@ -368,6 +368,7 @@ Developers:
giginet giginet
Fix CCRepeat#create is recieved bad argument on Lua binding. Fix CCRepeat#create is recieved bad argument on Lua binding.
Added a feature that CCSSceneReader can load name properties as node names.
neokim neokim
Adds 'setFont' and 'setAnchorPoint' to CCEditBox. Adds 'setFont' and 'setAnchorPoint' to CCEditBox.
@ -807,6 +808,7 @@ Developers:
Fixed a bug that before touchMove Touch::_prevPoint contains junk Fixed a bug that before touchMove Touch::_prevPoint contains junk
Added Device::setKeepScreenOn() Added Device::setKeepScreenOn()
Fixed Label performance problem Fixed Label performance problem
Added Node::stopAllActionsByTag && ActionManager::removeAllActionsByTag
youknowone youknowone
Adds iOS-like elastic bounceback support for cocos2d::extension::ScrollView Adds iOS-like elastic bounceback support for cocos2d::extension::ScrollView
@ -918,6 +920,7 @@ Developers:
Fix video scale issue in iOS Fix video scale issue in iOS
Fix iOS VideoPlayer memory leak Fix iOS VideoPlayer memory leak
Added c++11 random library support Added c++11 random library support
Added WebView widget which supports iOS and Android
billtt billtt
Fixed a bug that Node::setScale(float) may not work properly Fixed a bug that Node::setScale(float) may not work properly

View File

@ -1,3 +1,12 @@
cocos2d-x-3.3?? ??
[NEW] ActionManager: added removeAllActionsByTag()
[NEW] Node: added stopAllActionsByTag()
[NEW] UI: added `WebView` on iOS and Android
[FIX] Node: create unneeded temple `Vec2` object in `setPosition(int, int)`, `setPositionX()` and `setPositionY()`
[FIX] Node: skew effect is wrong
[FIX] TextureAtlas: may crash if only drawing part of it
cocos2d-x-3.3alpha0 Aug.28 2014 cocos2d-x-3.3alpha0 Aug.28 2014
[NEW] 3D: Added Camera, AABB, OBB and Ray [NEW] 3D: Added Camera, AABB, OBB and Ray
[NEW] 3D: Added better reskin model support [NEW] 3D: Added better reskin model support
@ -58,7 +67,7 @@ cocos2d-x-3.3alpha0 Aug.28 2014
[FIX] Lua-binding: replace dynamic_cast to std::is_base_of in object_to_luaval [FIX] Lua-binding: replace dynamic_cast to std::is_base_of in object_to_luaval
[3rd] fbx-conv: complex FBX model support which is sseful for reskin, multiple meshes and multiple materials support [3rd] fbx-conv: complex FBX model support which is useful for reskin, multiple meshes and multiple materials support
cocos2d-x-3.2 Jul.17 2014 cocos2d-x-3.2 Jul.17 2014
[NEW] Node: added getChildByName method for get a node that can be cast to Type T [NEW] Node: added getChildByName method for get a node that can be cast to Type T

View File

@ -1350,6 +1350,14 @@
1ABA68B11888D700007D1BB4 /* CCFontCharMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */; }; 1ABA68B11888D700007D1BB4 /* CCFontCharMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */; };
1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; };
1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; };
29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; };
29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; };
29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; };
29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; };
29394CF419B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */; };
29394CF519B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */; };
29394CF619B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */; };
29394CF719B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */; };
2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; }; 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; };
299754F4193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; 299754F4193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; };
299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; };
@ -2300,6 +2308,10 @@
2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = "<group>"; }; 2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = "<group>"; };
2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = "<group>"; }; 2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = "<group>"; };
29080DEB191B82CE0066F8DF /* UIDeprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIDeprecated.h; sourceTree = "<group>"; }; 29080DEB191B82CE0066F8DF /* UIDeprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIDeprecated.h; sourceTree = "<group>"; };
29394CEC19B01DBA00D2DE1A /* UIWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebView.h; sourceTree = "<group>"; };
29394CED19B01DBA00D2DE1A /* UIWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebView.mm; sourceTree = "<group>"; };
29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebViewImpl_iOS.h; sourceTree = "<group>"; };
29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebViewImpl_iOS.mm; sourceTree = "<group>"; };
2958244919873D8E00F9746D /* UIScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9Sprite.cpp; sourceTree = "<group>"; }; 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9Sprite.cpp; sourceTree = "<group>"; };
2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = "<group>"; }; 2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = "<group>"; };
2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = "<group>"; }; 2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = "<group>"; };
@ -3351,13 +3363,6 @@
name = "text-input-node"; name = "text-input-node";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
1A5702CC180BCE410088DEC7 /* textures */ = {
isa = PBXGroup;
children = (
);
name = textures;
sourceTree = "<group>";
};
1A5702DF180BCE610088DEC7 /* tilemap-parallax-nodes */ = { 1A5702DF180BCE610088DEC7 /* tilemap-parallax-nodes */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -4018,6 +4023,10 @@
29CB8F521929D65500C841D6 /* experimental */ = { 29CB8F521929D65500C841D6 /* experimental */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
29394CEC19B01DBA00D2DE1A /* UIWebView.h */,
29394CED19B01DBA00D2DE1A /* UIWebView.mm */,
29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */,
29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */,
3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */, 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */,
3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */, 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */,
); );
@ -4489,7 +4498,6 @@
1A570275180BCC840088DEC7 /* sprite-nodes */, 1A570275180BCC840088DEC7 /* sprite-nodes */,
1A57029A180BCD4F0088DEC7 /* support */, 1A57029A180BCD4F0088DEC7 /* support */,
1A5702BC180BCE0A0088DEC7 /* text-input-node */, 1A5702BC180BCE0A0088DEC7 /* text-input-node */,
1A5702CC180BCE410088DEC7 /* textures */,
1A5702DF180BCE610088DEC7 /* tilemap-parallax-nodes */, 1A5702DF180BCE610088DEC7 /* tilemap-parallax-nodes */,
); );
name = 2d; name = 2d;
@ -5040,6 +5048,7 @@
1A570093180BC5A10088DEC7 /* CCActionTween.h in Headers */, 1A570093180BC5A10088DEC7 /* CCActionTween.h in Headers */,
50ABBD4A1925AB0000A911A9 /* Mat4.h in Headers */, 50ABBD4A1925AB0000A911A9 /* Mat4.h in Headers */,
15AE1A6919AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, 15AE1A6919AAD40300C27E9E /* b2WorldCallbacks.h in Headers */,
29394CF419B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */,
1A57009A180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, 1A57009A180BC5C10088DEC7 /* CCAtlasNode.h in Headers */,
15AE190819AAD35000C27E9E /* CCDatas.h in Headers */, 15AE190819AAD35000C27E9E /* CCDatas.h in Headers */,
1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */, 1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */,
@ -5237,6 +5246,7 @@
15AE191019AAD35000C27E9E /* CCInputDelegate.h in Headers */, 15AE191019AAD35000C27E9E /* CCInputDelegate.h in Headers */,
15AE184C19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, 15AE184C19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */,
50ABBDA11925AB4100A911A9 /* CCGroupCommand.h in Headers */, 50ABBDA11925AB4100A911A9 /* CCGroupCommand.h in Headers */,
29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */,
15AE186519AAD31D00C27E9E /* CDOpenALSupport.h in Headers */, 15AE186519AAD31D00C27E9E /* CDOpenALSupport.h in Headers */,
15AE1B5C19AADA9900C27E9E /* UITextAtlas.h in Headers */, 15AE1B5C19AADA9900C27E9E /* UITextAtlas.h in Headers */,
1A5702FC180BCE750088DEC7 /* CCTMXXMLParser.h in Headers */, 1A5702FC180BCE750088DEC7 /* CCTMXXMLParser.h in Headers */,
@ -5567,6 +5577,7 @@
15AE1AB319AAD40300C27E9E /* b2CircleContact.h in Headers */, 15AE1AB319AAD40300C27E9E /* b2CircleContact.h in Headers */,
5034CA2E191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, 5034CA2E191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */,
15AE1A4F19AAD3D500C27E9E /* b2Shape.h in Headers */, 15AE1A4F19AAD3D500C27E9E /* b2Shape.h in Headers */,
29394CF519B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */,
50ABBD5B1925AB0000A911A9 /* Vec2.h in Headers */, 50ABBD5B1925AB0000A911A9 /* Vec2.h in Headers */,
50ABBD411925AB0000A911A9 /* CCMath.h in Headers */, 50ABBD411925AB0000A911A9 /* CCMath.h in Headers */,
1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */, 1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */,
@ -5680,6 +5691,7 @@
15AE1BAC19AADFDF00C27E9E /* UILayout.h in Headers */, 15AE1BAC19AADFDF00C27E9E /* UILayout.h in Headers */,
1A570230180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 1A570230180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */,
15AE1AF619AAD42500C27E9E /* chipmunk_ffi.h in Headers */, 15AE1AF619AAD42500C27E9E /* chipmunk_ffi.h in Headers */,
29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */,
15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, 15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */,
B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */, B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */,
15AE1AB919AAD40300C27E9E /* b2EdgeAndCircleContact.h in Headers */, 15AE1AB919AAD40300C27E9E /* b2EdgeAndCircleContact.h in Headers */,
@ -6132,6 +6144,7 @@
15AE187A19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */, 15AE187A19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */,
15AE1B6D19AADA9900C27E9E /* UIHelper.cpp in Sources */, 15AE1B6D19AADA9900C27E9E /* UIHelper.cpp in Sources */,
15AE1A8A19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */, 15AE1A8A19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */,
29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */,
15AE1BD419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */, 15AE1BD419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */,
1A57019D180BCB590088DEC7 /* CCFont.cpp in Sources */, 1A57019D180BCB590088DEC7 /* CCFont.cpp in Sources */,
1A5701A1180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, 1A5701A1180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */,
@ -6298,6 +6311,7 @@
15AE196E19AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, 15AE196E19AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */,
50ABBEB31925AB6F00A911A9 /* CCUserDefault.mm in Sources */, 50ABBEB31925AB6F00A911A9 /* CCUserDefault.mm in Sources */,
50ABBEB51925AB6F00A911A9 /* CCUserDefaultAndroid.cpp in Sources */, 50ABBEB51925AB6F00A911A9 /* CCUserDefaultAndroid.cpp in Sources */,
29394CF619B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */,
50ABBE831925AB6F00A911A9 /* ccFPSImages.c in Sources */, 50ABBE831925AB6F00A911A9 /* ccFPSImages.c in Sources */,
15AE1B7019AADA9900C27E9E /* CocosGUI.cpp in Sources */, 15AE1B7019AADA9900C27E9E /* CocosGUI.cpp in Sources */,
15AE19D019AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */, 15AE19D019AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */,
@ -6642,6 +6656,7 @@
50ABBD9C1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */, 50ABBD9C1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */,
1A5701E7180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, 1A5701E7180BCB8C0088DEC7 /* CCTransition.cpp in Sources */,
15AE1AC019AAD40300C27E9E /* b2MotorJoint.cpp in Sources */, 15AE1AC019AAD40300C27E9E /* b2MotorJoint.cpp in Sources */,
29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */,
15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, 15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */,
50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */, 50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */,
15AE1B3A19AAD43700C27E9E /* cpBB.c in Sources */, 15AE1B3A19AAD43700C27E9E /* cpBB.c in Sources */,
@ -6684,6 +6699,7 @@
15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */,
B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */,
15AE18CE19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, 15AE18CE19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */,
29394CF719B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */,
15AE1AC619AAD40300C27E9E /* b2GearJoint.cpp in Sources */, 15AE1AC619AAD40300C27E9E /* b2GearJoint.cpp in Sources */,
B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */,
1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */, 1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */,

View File

@ -865,6 +865,8 @@
290E94B6196FC16900694919 /* CocostudioParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 290E94B3196FC16900694919 /* CocostudioParserTest.cpp */; }; 290E94B6196FC16900694919 /* CocostudioParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 290E94B3196FC16900694919 /* CocostudioParserTest.cpp */; };
295824591987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; 295824591987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; };
2958245A1987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; 2958245A1987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; };
298D7F6F19AC31F300FF096D /* UIWebViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */; };
29AFEF6719ACCAA000F6B10A /* Test.html in Resources */ = {isa = PBXBuildFile; fileRef = 29AFEF6619ACCAA000F6B10A /* Test.html */; };
29FBBBFE196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; }; 29FBBBFE196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; };
29FBBBFF196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; }; 29FBBBFF196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; };
38FA2E73194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */; }; 38FA2E73194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */; };
@ -2886,6 +2888,9 @@
290E94B4196FC16900694919 /* CocostudioParserTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CocostudioParserTest.h; path = ../CocostudioParserTest.h; sourceTree = "<group>"; }; 290E94B4196FC16900694919 /* CocostudioParserTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CocostudioParserTest.h; path = ../CocostudioParserTest.h; sourceTree = "<group>"; };
295824571987415900F9746D /* UIScale9SpriteTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9SpriteTest.cpp; sourceTree = "<group>"; }; 295824571987415900F9746D /* UIScale9SpriteTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9SpriteTest.cpp; sourceTree = "<group>"; };
295824581987415900F9746D /* UIScale9SpriteTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9SpriteTest.h; sourceTree = "<group>"; }; 295824581987415900F9746D /* UIScale9SpriteTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9SpriteTest.h; sourceTree = "<group>"; };
298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIWebViewTest.cpp; path = UIWebViewTest/UIWebViewTest.cpp; sourceTree = "<group>"; };
298D7F6E19AC31F300FF096D /* UIWebViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIWebViewTest.h; path = UIWebViewTest/UIWebViewTest.h; sourceTree = "<group>"; };
29AFEF6619ACCAA000F6B10A /* Test.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = Test.html; path = "../tests/cpp-tests/Resources/Test.html"; sourceTree = "<group>"; };
29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocostudioParserJsonTest.cpp; sourceTree = "<group>"; }; 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocostudioParserJsonTest.cpp; sourceTree = "<group>"; };
29FBBBFD196A9ECD00E65826 /* CocostudioParserJsonTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocostudioParserJsonTest.h; sourceTree = "<group>"; }; 29FBBBFD196A9ECD00E65826 /* CocostudioParserJsonTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocostudioParserJsonTest.h; sourceTree = "<group>"; };
38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActionTimelineTestScene.cpp; sourceTree = "<group>"; }; 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActionTimelineTestScene.cpp; sourceTree = "<group>"; };
@ -6495,6 +6500,7 @@
1AC35CB518CED84500F37B72 /* effect1.raw */, 1AC35CB518CED84500F37B72 /* effect1.raw */,
1AC35CB618CED84500F37B72 /* effect1.wav */, 1AC35CB618CED84500F37B72 /* effect1.wav */,
1AC35CC418CED84500F37B72 /* pew-pew-lei.wav */, 1AC35CC418CED84500F37B72 /* pew-pew-lei.wav */,
29AFEF6619ACCAA000F6B10A /* Test.html */,
); );
name = Resources; name = Resources;
sourceTree = "<group>"; sourceTree = "<group>";
@ -6907,6 +6913,15 @@
path = UIWidgetAddNodeTest; path = UIWidgetAddNodeTest;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
298D7F6C19AC31C000FF096D /* UIWebViewTest */ = {
isa = PBXGroup;
children = (
298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */,
298D7F6E19AC31F300FF096D /* UIWebViewTest.h */,
);
name = UIWebViewTest;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -6988,6 +7003,7 @@
29FBBC00196A9F0D00E65826 /* UIAndEditorTests */ = { 29FBBC00196A9F0D00E65826 /* UIAndEditorTests */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
298D7F6C19AC31C000FF096D /* UIWebViewTest */,
295824571987415900F9746D /* UIScale9SpriteTest.cpp */, 295824571987415900F9746D /* UIScale9SpriteTest.cpp */,
295824581987415900F9746D /* UIScale9SpriteTest.h */, 295824581987415900F9746D /* UIScale9SpriteTest.h */,
29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */, 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */,
@ -7816,6 +7832,7 @@
1AC35D0918CED84500F37B72 /* TileMaps in Resources */, 1AC35D0918CED84500F37B72 /* TileMaps in Resources */,
1AC35CFF18CED84500F37B72 /* Particles in Resources */, 1AC35CFF18CED84500F37B72 /* Particles in Resources */,
1AC35C8818CECF1400F37B72 /* Default-568h@2x.png in Resources */, 1AC35C8818CECF1400F37B72 /* Default-568h@2x.png in Resources */,
29AFEF6719ACCAA000F6B10A /* Test.html in Resources */,
1AC35CD518CED84500F37B72 /* ccb in Resources */, 1AC35CD518CED84500F37B72 /* ccb in Resources */,
1AC35CE118CED84500F37B72 /* configs in Resources */, 1AC35CE118CED84500F37B72 /* configs in Resources */,
1AC35CE918CED84500F37B72 /* extensions in Resources */, 1AC35CE918CED84500F37B72 /* extensions in Resources */,
@ -8316,6 +8333,7 @@
1AC35B3E18CECF0C00F37B72 /* Bug-422.cpp in Sources */, 1AC35B3E18CECF0C00F37B72 /* Bug-422.cpp in Sources */,
29080DAC191B595E0066F8DF /* UIFocusTest.cpp in Sources */, 29080DAC191B595E0066F8DF /* UIFocusTest.cpp in Sources */,
1AC35BF618CECF0C00F37B72 /* HttpClientTest.cpp in Sources */, 1AC35BF618CECF0C00F37B72 /* HttpClientTest.cpp in Sources */,
298D7F6F19AC31F300FF096D /* UIWebViewTest.cpp in Sources */,
29080DA6191B595E0066F8DF /* UIButtonTest_Editor.cpp in Sources */, 29080DA6191B595E0066F8DF /* UIButtonTest_Editor.cpp in Sources */,
1AC35B5018CECF0C00F37B72 /* ClickAndMoveTest.cpp in Sources */, 1AC35B5018CECF0C00F37B72 /* ClickAndMoveTest.cpp in Sources */,
); );

View File

@ -259,8 +259,8 @@ void Follow::step(float dt)
Vec2 tempPos = _halfScreenSize - _followedNode->getPosition(); Vec2 tempPos = _halfScreenSize - _followedNode->getPosition();
_target->setPosition(Vec2(clampf(tempPos.x, _leftBoundary, _rightBoundary), _target->setPosition(clampf(tempPos.x, _leftBoundary, _rightBoundary),
clampf(tempPos.y, _bottomBoundary, _topBoundary))); clampf(tempPos.y, _bottomBoundary, _topBoundary));
} }
else else
{ {

View File

@ -115,8 +115,7 @@ void ActionCamera::updateTransform()
mv = mv * t; mv = mv * t;
} }
// XXX FIXME TODO // FIXME: Using the AdditionalTransform is a complete hack.
// Using the AdditionalTransform is a complete hack.
// This should be done by multipliying the lookup-Matrix with the Node's MV matrix // This should be done by multipliying the lookup-Matrix with the Node's MV matrix
// And then setting the result as the new MV matrix // And then setting the result as the new MV matrix
// But that operation needs to be done after all the 'updates'. // But that operation needs to be done after all the 'updates'.

View File

@ -424,7 +424,7 @@ CallFuncN * CallFuncN::create(const std::function<void(Node*)> &func)
return nullptr; return nullptr;
} }
// XXX deprecated // FIXME: deprecated
CallFuncN * CallFuncN::create(Ref* selectorTarget, SEL_CallFuncN selector) CallFuncN * CallFuncN::create(Ref* selectorTarget, SEL_CallFuncN selector)
{ {
CallFuncN *ret = new (std::nothrow) CallFuncN(); CallFuncN *ret = new (std::nothrow) CallFuncN();

View File

@ -335,7 +335,7 @@ void Sequence::update(float t)
else if(found==0 && _last==1 ) else if(found==0 && _last==1 )
{ {
// Reverse mode ? // Reverse mode ?
// XXX: Bug. this case doesn't contemplate when _last==-1, found=0 and in "reverse mode" // FIXME: Bug. this case doesn't contemplate when _last==-1, found=0 and in "reverse mode"
// since it will require a hack to know if an action is on reverse mode or not. // since it will require a hack to know if an action is on reverse mode or not.
// "step" should be overriden, and the "reverseMode" value propagated to inner Sequences. // "step" should be overriden, and the "reverseMode" value propagated to inner Sequences.
_actions[1]->update(0); _actions[1]->update(0);
@ -981,7 +981,7 @@ void RotateBy::startWithTarget(Node *target)
void RotateBy::update(float time) void RotateBy::update(float time)
{ {
// XXX: shall I add % 360 // FIXME: shall I add % 360
if (_target) if (_target)
{ {
if(_is3D) if(_is3D)
@ -2183,7 +2183,7 @@ void ReverseTime::update(float time)
ReverseTime* ReverseTime::reverse() const ReverseTime* ReverseTime::reverse() const
{ {
// XXX: This looks like a bug // FIXME: This looks like a bug
return (ReverseTime*)_other->clone(); return (ReverseTime*)_other->clone();
} }

View File

@ -287,9 +287,37 @@ void ActionManager::removeActionByTag(int tag, Node *target)
} }
} }
void ActionManager::removeAllActionsByTag(int tag, Node *target)
{
CCASSERT(tag != Action::INVALID_TAG, "");
CCASSERT(target != nullptr, "");
tHashElement *element = nullptr;
HASH_FIND_PTR(_targets, &target, element);
if (element)
{
auto limit = element->actions->num;
for (int i = 0; i < limit;)
{
Action *action = (Action*)element->actions->arr[i];
if (action->getTag() == (int)tag && action->getOriginalTarget() == target)
{
removeActionAtIndex(i, element);
--limit;
}
else
{
++i;
}
}
}
}
// get // get
// XXX: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer // FIXME: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer
// and, it is not possible to get the address of a reference // and, it is not possible to get the address of a reference
Action* ActionManager::getActionByTag(int tag, const Node *target) const Action* ActionManager::getActionByTag(int tag, const Node *target) const
{ {
@ -323,7 +351,7 @@ Action* ActionManager::getActionByTag(int tag, const Node *target) const
return nullptr; return nullptr;
} }
// XXX: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer // FIXME: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer
// and, it is not possible to get the address of a reference // and, it is not possible to get the address of a reference
ssize_t ActionManager::getNumberOfRunningActionsInTarget(const Node *target) const ssize_t ActionManager::getNumberOfRunningActionsInTarget(const Node *target) const
{ {

View File

@ -93,6 +93,9 @@ public:
/** Removes an action given its tag and the target */ /** Removes an action given its tag and the target */
void removeActionByTag(int tag, Node *target); void removeActionByTag(int tag, Node *target);
/** Removes all actions given its tag and the target */
void removeAllActionsByTag(int tag, Node *target);
/** Gets an action given its tag an a target /** Gets an action given its tag an a target
@return the Action the with the given tag @return the Action the with the given tag
*/ */

View File

@ -25,10 +25,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "2d/CCAnimation.h" #include "2d/CCAnimation.h"
#include "2d/CCSpriteFrame.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "renderer/CCTexture2D.h" #include "renderer/CCTexture2D.h"
#include "base/ccMacros.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -30,9 +30,8 @@ THE SOFTWARE.
#include "base/CCPlatformConfig.h" #include "base/CCPlatformConfig.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "base/CCValue.h" #include "base/CCValue.h"
#include "math/CCGeometry.h"
#include "2d/CCSpriteFrame.h"
#include "base/CCVector.h" #include "base/CCVector.h"
#include "2d/CCSpriteFrame.h"
#include <string> #include <string>

View File

@ -25,12 +25,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "2d/CCAnimationCache.h" #include "2d/CCAnimationCache.h"
#include "base/ccMacros.h"
#include "2d/CCAnimation.h"
#include "2d/CCSpriteFrame.h"
#include "2d/CCSpriteFrameCache.h" #include "2d/CCSpriteFrameCache.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
#include "deprecated/CCString.h"
using namespace std; using namespace std;

View File

@ -26,14 +26,11 @@
*/ */
#include "2d/CCClippingNode.h" #include "2d/CCClippingNode.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramCache.h"
#include "2d/CCDrawingPrimitives.h" #include "2d/CCDrawingPrimitives.h"
#include "renderer/CCGLProgramCache.h"
#include "renderer/CCRenderer.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCGroupCommand.h"
#include "renderer/CCCustomCommand.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -248,7 +245,7 @@ void ClippingNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32
program->use(); program->use();
program->setUniformLocationWith1f(alphaValueLocation, _alphaThreshold); program->setUniformLocationWith1f(alphaValueLocation, _alphaThreshold);
// we need to recursively apply this shader to all the nodes in the stencil node // we need to recursively apply this shader to all the nodes in the stencil node
// XXX: we should have a way to apply shader to all nodes without having to do this // FIXME: we should have a way to apply shader to all nodes without having to do this
setProgram(_stencil, program); setProgram(_stencil, program);
#endif #endif
@ -438,7 +435,7 @@ void ClippingNode::onAfterDrawStencil()
glDisable(GL_ALPHA_TEST); glDisable(GL_ALPHA_TEST);
} }
#else #else
// XXX: we need to find a way to restore the shaders of the stencil node and its childs // FIXME: we need to find a way to restore the shaders of the stencil node and its childs
#endif #endif
} }

View File

@ -23,7 +23,6 @@ THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "2d/CCComponent.h" #include "2d/CCComponent.h"
#include "base/CCScriptSupport.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -25,7 +25,7 @@ THE SOFTWARE.
#include "2d/CCComponentContainer.h" #include "2d/CCComponentContainer.h"
#include "2d/CCComponent.h" #include "2d/CCComponent.h"
#include "base/CCDirector.h" #include "2d/CCNode.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -27,6 +27,7 @@
#include "base/CCConfiguration.h" #include "base/CCConfiguration.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "renderer/ccGLStateCache.h" #include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgramState.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/CCEventListenerCustom.h" #include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h" #include "base/CCEventDispatcher.h"

View File

@ -157,7 +157,7 @@ void drawPoints( const Vec2 *points, unsigned int numberOfPoints )
s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1);
s_shader->setUniformLocationWith1f(s_pointSizeLocation, s_pointSize); s_shader->setUniformLocationWith1f(s_pointSizeLocation, s_pointSize);
// XXX: Mac OpenGL error. arrays can't go out of scope before draw is executed // FIXME: Mac OpenGL error. arrays can't go out of scope before draw is executed
Vec2* newPoints = new (std::nothrow) Vec2[numberOfPoints]; Vec2* newPoints = new (std::nothrow) Vec2[numberOfPoints];
// iPhone and 32-bit machines optimization // iPhone and 32-bit machines optimization
@ -268,7 +268,7 @@ void drawPoly(const Vec2 *poli, unsigned int numberOfPoints, bool closePolygon)
else else
{ {
// Mac on 64-bit // Mac on 64-bit
// XXX: Mac OpenGL error. arrays can't go out of scope before draw is executed // FIXME: Mac OpenGL error. arrays can't go out of scope before draw is executed
Vec2* newPoli = new (std::nothrow) Vec2[numberOfPoints]; Vec2* newPoli = new (std::nothrow) Vec2[numberOfPoints];
for( unsigned int i=0; i<numberOfPoints;i++) { for( unsigned int i=0; i<numberOfPoints;i++) {
newPoli[i].x = poli[i].x; newPoli[i].x = poli[i].x;
@ -302,7 +302,7 @@ void drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, Color4F color)
GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION ); GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION );
// XXX: Mac OpenGL error. arrays can't go out of scope before draw is executed // FIXME: Mac OpenGL error. arrays can't go out of scope before draw is executed
Vec2* newPoli = new (std::nothrow) Vec2[numberOfPoints]; Vec2* newPoli = new (std::nothrow) Vec2[numberOfPoints];
// iPhone and 32-bit machines optimization // iPhone and 32-bit machines optimization
@ -568,7 +568,7 @@ void setPointSize( GLfloat pointSize )
{ {
s_pointSize = pointSize * CC_CONTENT_SCALE_FACTOR(); s_pointSize = pointSize * CC_CONTENT_SCALE_FACTOR();
//TODO :glPointSize( pointSize ); // TODO: glPointSize( pointSize );
} }

View File

@ -34,20 +34,16 @@ THE SOFTWARE.
It was rewritten again, and only a small part of the original HK ideas/code remains in this implementation It was rewritten again, and only a small part of the original HK ideas/code remains in this implementation
*/ */
#include "CCFastTMXLayer.h" #include "2d/CCFastTMXLayer.h"
#include "CCTMXXMLParser.h" #include "2d/CCFastTMXTiledMap.h"
#include "CCFastTMXTiledMap.h"
#include "2d/CCSprite.h" #include "2d/CCSprite.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramCache.h" #include "renderer/CCGLProgramCache.h"
#include "renderer/ccGLStateCache.h" #include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgram.h"
#include "base/CCDirector.h"
#include "base/CCConfiguration.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "renderer/CCVertexIndexBuffer.h"
#include "base/CCDirector.h"
#include "deprecated/CCString.h" #include "deprecated/CCString.h"
#include "renderer/CCGLProgramStateCache.h"
#include <algorithm>
NS_CC_BEGIN NS_CC_BEGIN
namespace experimental { namespace experimental {
@ -491,7 +487,7 @@ void TMXLayer::updateTotalQuads()
if(tileGID & kTMXTileDiagonalFlag) if(tileGID & kTMXTileDiagonalFlag)
{ {
// XXX: not working correcly // FIXME: not working correcly
quad.bl.vertices.x = left; quad.bl.vertices.x = left;
quad.bl.vertices.y = bottom; quad.bl.vertices.y = bottom;
quad.bl.vertices.z = z; quad.bl.vertices.z = z;
@ -836,8 +832,8 @@ void TMXLayer::setupTileSprite(Sprite* sprite, Vec2 pos, int gid)
{ {
// put the anchor in the middle for ease of rotation. // put the anchor in the middle for ease of rotation.
sprite->setAnchorPoint(Vec2(0.5f,0.5f)); sprite->setAnchorPoint(Vec2(0.5f,0.5f));
sprite->setPosition(Vec2(getPositionAt(pos).x + sprite->getContentSize().height/2, sprite->setPosition(getPositionAt(pos).x + sprite->getContentSize().height/2,
getPositionAt(pos).y + sprite->getContentSize().width/2 ) ); getPositionAt(pos).y + sprite->getContentSize().width/2 );
int flag = gid & (kTMXTileHorizontalFlag | kTMXTileVerticalFlag ); int flag = gid & (kTMXTileHorizontalFlag | kTMXTileVerticalFlag );

View File

@ -27,15 +27,12 @@ THE SOFTWARE.
#ifndef __CC_FAST_TMX_LAYER_H__ #ifndef __CC_FAST_TMX_LAYER_H__
#define __CC_FAST_TMX_LAYER_H__ #define __CC_FAST_TMX_LAYER_H__
#include "CCTMXObjectGroup.h"
#include "CCTMXXMLParser.h"
#include "CCNode.h"
#include "renderer/CCCustomCommand.h"
#include "renderer/CCQuadCommand.h"
#include "renderer/CCPrimitiveCommand.h"
#include <map> #include <map>
#include <unordered_map> #include <unordered_map>
#include "2d/CCNode.h"
#include "2d/CCTMXXMLParser.h"
#include "renderer/CCPrimitiveCommand.h"
#include "base/CCMap.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -24,13 +24,8 @@ 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "CCFastTMXTiledMap.h" #include "2d/CCFastTMXTiledMap.h"
#include "2d/CCFastTMXLayer.h"
#include <algorithm>
#include "CCTMXXMLParser.h"
#include "CCFastTMXLayer.h"
#include "CCSprite.h"
#include "deprecated/CCString.h" #include "deprecated/CCString.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -138,7 +133,7 @@ TMXTilesetInfo * TMXTiledMap::tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInf
// gid = CFSwapInt32( gid ); // gid = CFSwapInt32( gid );
/* We support little endian.*/ /* We support little endian.*/
// XXX: gid == 0 --> empty tile // FIXME: gid == 0 --> empty tile
if( gid != 0 ) if( gid != 0 )
{ {
// Optimization: quick return // Optimization: quick return

View File

@ -32,7 +32,6 @@ THE SOFTWARE.
NS_CC_BEGIN NS_CC_BEGIN
class TMXObjectGroup;
class TMXLayerInfo; class TMXLayerInfo;
class TMXTilesetInfo; class TMXTilesetInfo;
class TMXMapInfo; class TMXMapInfo;

View File

@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#include "2d/CCFontFNT.h" #include "2d/CCFontFNT.h"
#include <set>
#include "base/uthash.h" #include "base/uthash.h"
#include "2d/CCFontAtlas.h" #include "2d/CCFontAtlas.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
@ -102,7 +103,7 @@ typedef struct _KerningHashElement
*/ */
class CC_DLL BMFontConfiguration : public Ref class CC_DLL BMFontConfiguration : public Ref
{ {
// XXX: Creating a public interface so that the bitmapFontArray[] is accessible // FIXME: Creating a public interface so that the bitmapFontArray[] is accessible
public://@public public://@public
// BMFont definitions // BMFont definitions
tFontDefHashElement *_fontDefDictionary; tFontDefHashElement *_fontDefDictionary;
@ -313,7 +314,7 @@ std::set<unsigned int>* BMFontConfiguration::parseConfigFile(const std::string&
if(line.substr(0,strlen("info face")) == "info face") if(line.substr(0,strlen("info face")) == "info face")
{ {
// XXX: info parsing is incomplete // FIXME: info parsing is incomplete
// Not needed for the Hiero editors, but needed for the AngelCode editor // Not needed for the Hiero editors, but needed for the AngelCode editor
// [self parseInfoArguments:line]; // [self parseInfoArguments:line];
this->parseInfoArguments(line); this->parseInfoArguments(line);

View File

@ -68,7 +68,7 @@ void Grabber::beforeRender(Texture2D *texture)
// save clear color // save clear color
glGetFloatv(GL_COLOR_CLEAR_VALUE, _oldClearColor); glGetFloatv(GL_COLOR_CLEAR_VALUE, _oldClearColor);
// BUG XXX: doesn't work with RGB565. // FIXME: doesn't work with RGB565.
glClearColor(0, 0, 0, 0); glClearColor(0, 0, 0, 0);

View File

@ -151,7 +151,7 @@ GridBase::~GridBase(void)
{ {
CCLOGINFO("deallocing GridBase: %p", this); CCLOGINFO("deallocing GridBase: %p", this);
//TODO: ? why 2.0 comments this line setActive(false); //TODO: ? why 2.0 comments this line: setActive(false);
CC_SAFE_RELEASE(_texture); CC_SAFE_RELEASE(_texture);
CC_SAFE_RELEASE(_grabber); CC_SAFE_RELEASE(_grabber);
} }
@ -220,7 +220,7 @@ void GridBase::afterDraw(cocos2d::Node *target)
// Vec2 offset = target->getAnchorPointInPoints(); // Vec2 offset = target->getAnchorPointInPoints();
// //
// // // //
// // XXX: Camera should be applied in the AnchorPoint // // FIXME: Camera should be applied in the AnchorPoint
// // // //
// kmGLTranslatef(offset.x, offset.y, 0); // kmGLTranslatef(offset.x, offset.y, 0);
// target->getCamera()->locate(); // target->getCamera()->locate();
@ -230,8 +230,8 @@ void GridBase::afterDraw(cocos2d::Node *target)
GL::bindTexture2D(_texture->getName()); GL::bindTexture2D(_texture->getName());
// restore projection for default FBO .fixed bug #543 #544 // restore projection for default FBO .fixed bug #543 #544
//TODO: Director::getInstance()->setProjection(Director::getInstance()->getProjection()); //TODO: Director::getInstance()->setProjection(Director::getInstance()->getProjection());
//TODO: Director::getInstance()->applyOrientation(); //TODO: Director::getInstance()->applyOrientation();
blit(); blit();
} }

View File

@ -772,7 +772,7 @@ void Label::enableShadow(const Color4B& shadowColor /* = Color4B::BLACK */,const
auto contentScaleFactor = CC_CONTENT_SCALE_FACTOR(); auto contentScaleFactor = CC_CONTENT_SCALE_FACTOR();
_shadowOffset.width = offset.width * contentScaleFactor; _shadowOffset.width = offset.width * contentScaleFactor;
_shadowOffset.height = offset.height * contentScaleFactor; _shadowOffset.height = offset.height * contentScaleFactor;
//todo:support blur for shadow //TODO: support blur for shadow
_shadowBlurRadius = 0; _shadowBlurRadius = 0;
if (_textSprite && _shadowNode) if (_textSprite && _shadowNode)
@ -1157,8 +1157,8 @@ Sprite * Label::getLetter(int letterIndex)
sp = Sprite::createWithTexture(_fontAtlas->getTexture(letter.def.textureID),uvRect); sp = Sprite::createWithTexture(_fontAtlas->getTexture(letter.def.textureID),uvRect);
sp->setBatchNode(_batchNodes[letter.def.textureID]); sp->setBatchNode(_batchNodes[letter.def.textureID]);
sp->setPosition(Vec2(letter.position.x + uvRect.size.width / 2, sp->setPosition(letter.position.x + uvRect.size.width / 2,
letter.position.y - uvRect.size.height / 2)); letter.position.y - uvRect.size.height / 2);
sp->setOpacity(_realOpacity); sp->setOpacity(_realOpacity);
_batchNodes[letter.def.textureID]->addSpriteWithoutQuad(sp, letter.atlasIndex, letterIndex); _batchNodes[letter.def.textureID]->addSpriteWithoutQuad(sp, letter.atlasIndex, letterIndex);

View File

@ -31,6 +31,7 @@ THE SOFTWARE.
#include "platform/CCDevice.h" #include "platform/CCDevice.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "renderer/ccGLStateCache.h" #include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgramState.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/CCEventDispatcher.h" #include "base/CCEventDispatcher.h"
#include "base/CCEventListenerTouch.h" #include "base/CCEventListenerTouch.h"

View File

@ -141,7 +141,7 @@ bool Menu::initWithArray(const Vector<MenuItem*>& arrayOfItems)
setAnchorPoint(Vec2(0.5f, 0.5f)); setAnchorPoint(Vec2(0.5f, 0.5f));
this->setContentSize(s); this->setContentSize(s);
setPosition(Vec2(s.width/2, s.height/2)); setPosition(s.width/2, s.height/2);
int z=0; int z=0;
@ -321,7 +321,7 @@ void Menu::alignItemsVerticallyWithPadding(float padding)
float y = height / 2.0f; float y = height / 2.0f;
for(const auto &child : _children) { for(const auto &child : _children) {
child->setPosition(Vec2(0, y - child->getContentSize().height * child->getScaleY() / 2.0f)); child->setPosition(0, y - child->getContentSize().height * child->getScaleY() / 2.0f);
y -= child->getContentSize().height * child->getScaleY() + padding; y -= child->getContentSize().height * child->getScaleY() + padding;
} }
} }
@ -340,7 +340,7 @@ void Menu::alignItemsHorizontallyWithPadding(float padding)
float x = -width / 2.0f; float x = -width / 2.0f;
for(const auto &child : _children) { for(const auto &child : _children) {
child->setPosition(Vec2(x + child->getContentSize().width * child->getScaleX() / 2.0f, 0)); child->setPosition(x + child->getContentSize().width * child->getScaleX() / 2.0f, 0);
x += child->getContentSize().width * child->getScaleX() + padding; x += child->getContentSize().width * child->getScaleX() + padding;
} }
} }
@ -419,8 +419,8 @@ void Menu::alignItemsInColumnsWithArray(const ValueVector& rows)
float tmp = child->getContentSize().height; float tmp = child->getContentSize().height;
rowHeight = (unsigned int)((rowHeight >= tmp || isnan(tmp)) ? rowHeight : tmp); rowHeight = (unsigned int)((rowHeight >= tmp || isnan(tmp)) ? rowHeight : tmp);
child->setPosition(Vec2(x - winSize.width / 2, child->setPosition(x - winSize.width / 2,
y - child->getContentSize().height / 2)); y - child->getContentSize().height / 2);
x += w; x += w;
++columnsOccupied; ++columnsOccupied;
@ -520,8 +520,8 @@ void Menu::alignItemsInRowsWithArray(const ValueVector& columns)
float tmp = child->getContentSize().width; float tmp = child->getContentSize().width;
columnWidth = (unsigned int)((columnWidth >= tmp || isnan(tmp)) ? columnWidth : tmp); columnWidth = (unsigned int)((columnWidth >= tmp || isnan(tmp)) ? columnWidth : tmp);
child->setPosition(Vec2(x + columnWidths[column] / 2, child->setPosition(x + columnWidths[column] / 2,
y - winSize.height / 2)); y - winSize.height / 2);
y -= child->getContentSize().height + 10; y -= child->getContentSize().height + 10;
++rowsOccupied; ++rowsOccupied;

View File

@ -28,12 +28,10 @@ THE SOFTWARE.
#include "2d/CCMenuItem.h" #include "2d/CCMenuItem.h"
#include "2d/CCActionInterval.h" #include "2d/CCActionInterval.h"
#include "2d/CCSprite.h" #include "2d/CCSprite.h"
#include "CCLabelAtlas.h" #include "2d/CCLabelAtlas.h"
#include "2d/CCLabel.h" #include "2d/CCLabel.h"
#include "base/CCScriptSupport.h"
#include "deprecated/CCString.h" #include "deprecated/CCString.h"
#include <stdarg.h> #include <stdarg.h>
#include <cstring>
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@ -63,7 +61,7 @@ MenuItem* MenuItem::create()
return MenuItem::create((const ccMenuCallback&)nullptr); return MenuItem::create((const ccMenuCallback&)nullptr);
} }
// XXX deprecated // FIXME: deprecated
MenuItem* MenuItem::create(Ref *target, SEL_MenuHandler selector) MenuItem* MenuItem::create(Ref *target, SEL_MenuHandler selector)
{ {
MenuItem *ret = new (std::nothrow) MenuItem(); MenuItem *ret = new (std::nothrow) MenuItem();
@ -80,7 +78,7 @@ MenuItem* MenuItem::create( const ccMenuCallback& callback)
return ret; return ret;
} }
// XXX deprecated // FIXME: deprecated
bool MenuItem::initWithTarget(cocos2d::Ref *target, SEL_MenuHandler selector ) bool MenuItem::initWithTarget(cocos2d::Ref *target, SEL_MenuHandler selector )
{ {
_target = target; _target = target;
@ -153,7 +151,7 @@ bool MenuItem::isSelected() const
return _selected; return _selected;
} }
// XXX deprecated // FIXME: deprecated
void MenuItem::setTarget(Ref *target, SEL_MenuHandler selector) void MenuItem::setTarget(Ref *target, SEL_MenuHandler selector)
{ {
_target = target; _target = target;
@ -192,7 +190,7 @@ void MenuItemLabel::setLabel(Node* var)
_label = var; _label = var;
} }
// XXX: deprecated // FIXME:: deprecated
MenuItemLabel * MenuItemLabel::create(Node*label, Ref* target, SEL_MenuHandler selector) MenuItemLabel * MenuItemLabel::create(Node*label, Ref* target, SEL_MenuHandler selector)
{ {
MenuItemLabel *ret = new (std::nothrow) MenuItemLabel(); MenuItemLabel *ret = new (std::nothrow) MenuItemLabel();
@ -217,7 +215,7 @@ MenuItemLabel* MenuItemLabel::create(Node *label)
return ret; return ret;
} }
// XXX: deprecated // FIXME:: deprecated
bool MenuItemLabel::initWithLabel(Node* label, Ref* target, SEL_MenuHandler selector) bool MenuItemLabel::initWithLabel(Node* label, Ref* target, SEL_MenuHandler selector)
{ {
_target = target; _target = target;
@ -322,7 +320,7 @@ MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const st
return MenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, (const ccMenuCallback&)nullptr); return MenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, (const ccMenuCallback&)nullptr);
} }
// XXX: deprecated // FIXME:: deprecated
MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector) MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector)
{ {
MenuItemAtlasFont *ret = new (std::nothrow) MenuItemAtlasFont(); MenuItemAtlasFont *ret = new (std::nothrow) MenuItemAtlasFont();
@ -339,7 +337,7 @@ MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const st
return ret; return ret;
} }
// XXX: deprecated // FIXME:: deprecated
bool MenuItemAtlasFont::initWithString(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector) bool MenuItemAtlasFont::initWithString(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector)
{ {
_target = target; _target = target;
@ -388,7 +386,7 @@ const std::string& MenuItemFont::getFontName()
return _globalFontName; return _globalFontName;
} }
// XXX: deprecated // FIXME:: deprecated
MenuItemFont * MenuItemFont::create(const std::string& value, Ref* target, SEL_MenuHandler selector) MenuItemFont * MenuItemFont::create(const std::string& value, Ref* target, SEL_MenuHandler selector)
{ {
MenuItemFont *ret = new (std::nothrow) MenuItemFont(); MenuItemFont *ret = new (std::nothrow) MenuItemFont();
@ -423,7 +421,7 @@ MenuItemFont::~MenuItemFont()
CCLOGINFO("In the destructor of MenuItemFont (%p).", this); CCLOGINFO("In the destructor of MenuItemFont (%p).", this);
} }
// XXX: deprecated // FIXME:: deprecated
bool MenuItemFont::initWithString(const std::string& value, Ref* target, SEL_MenuHandler selector) bool MenuItemFont::initWithString(const std::string& value, Ref* target, SEL_MenuHandler selector)
{ {
CCASSERT( !value.empty(), "Value length must be greater than 0"); CCASSERT( !value.empty(), "Value length must be greater than 0");
@ -546,7 +544,7 @@ MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite
return MenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, (const ccMenuCallback&)nullptr); return MenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, (const ccMenuCallback&)nullptr);
} }
// XXX deprecated // FIXME: deprecated
MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite, Ref* target, SEL_MenuHandler selector) MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite, Ref* target, SEL_MenuHandler selector)
{ {
return MenuItemSprite::create(normalSprite, selectedSprite, nullptr, target, selector); return MenuItemSprite::create(normalSprite, selectedSprite, nullptr, target, selector);
@ -557,7 +555,7 @@ MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite
return MenuItemSprite::create(normalSprite, selectedSprite, nullptr, callback); return MenuItemSprite::create(normalSprite, selectedSprite, nullptr, callback);
} }
// XXX deprecated // FIXME: deprecated
MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite, Node *disabledSprite, Ref *target, SEL_MenuHandler selector) MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite, Node *disabledSprite, Ref *target, SEL_MenuHandler selector)
{ {
MenuItemSprite *ret = new (std::nothrow) MenuItemSprite(); MenuItemSprite *ret = new (std::nothrow) MenuItemSprite();
@ -574,7 +572,7 @@ MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite
return ret; return ret;
} }
// XXX deprecated // FIXME: deprecated
bool MenuItemSprite::initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, Ref* target, SEL_MenuHandler selector) bool MenuItemSprite::initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, Ref* target, SEL_MenuHandler selector)
{ {
_target = target; _target = target;
@ -706,7 +704,7 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std:
return MenuItemImage::create(normalImage, selectedImage, "", (const ccMenuCallback&)nullptr); return MenuItemImage::create(normalImage, selectedImage, "", (const ccMenuCallback&)nullptr);
} }
// XXX deprecated // FIXME: deprecated
MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, Ref* target, SEL_MenuHandler selector) MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, Ref* target, SEL_MenuHandler selector)
{ {
return MenuItemImage::create(normalImage, selectedImage, "", target, selector); return MenuItemImage::create(normalImage, selectedImage, "", target, selector);
@ -717,7 +715,7 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std:
return MenuItemImage::create(normalImage, selectedImage, "", callback); return MenuItemImage::create(normalImage, selectedImage, "", callback);
} }
// XXX deprecated // FIXME: deprecated
MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector) MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector)
{ {
MenuItemImage *ret = new (std::nothrow) MenuItemImage(); MenuItemImage *ret = new (std::nothrow) MenuItemImage();
@ -754,7 +752,7 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std:
return nullptr; return nullptr;
} }
// XXX: deprecated // FIXME:: deprecated
bool MenuItemImage::initWithNormalImage(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector) bool MenuItemImage::initWithNormalImage(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector)
{ {
_target = target; _target = target;
@ -806,7 +804,7 @@ void MenuItemImage::setDisabledSpriteFrame(SpriteFrame * frame)
// MenuItemToggle // MenuItemToggle
// //
// XXX: deprecated // FIXME:: deprecated
MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler selector, const Vector<MenuItem*>& menuItems) MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler selector, const Vector<MenuItem*>& menuItems)
{ {
MenuItemToggle *ret = new (std::nothrow) MenuItemToggle(); MenuItemToggle *ret = new (std::nothrow) MenuItemToggle();
@ -827,7 +825,7 @@ MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callba
return ret; return ret;
} }
// XXX: deprecated // FIXME:: deprecated
MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, ...) MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, ...)
{ {
va_list args; va_list args;
@ -871,7 +869,7 @@ MenuItemToggle * MenuItemToggle::create()
return ret; return ret;
} }
// XXX: deprecated // FIXME:: deprecated
bool MenuItemToggle::initWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, va_list args) bool MenuItemToggle::initWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, va_list args)
{ {
_target = target; _target = target;
@ -948,7 +946,7 @@ void MenuItemToggle::setSelectedIndex(unsigned int index)
this->addChild(item, 0, kCurrentItem); this->addChild(item, 0, kCurrentItem);
Size s = item->getContentSize(); Size s = item->getContentSize();
this->setContentSize(s); this->setContentSize(s);
item->setPosition( Vec2( s.width/2, s.height/2 ) ); item->setPosition(s.width/2, s.height/2);
} }
} }

View File

@ -26,14 +26,12 @@ THE SOFTWARE.
#include "2d/CCMotionStreak.h" #include "2d/CCMotionStreak.h"
#include "math/CCVertex.h" #include "math/CCVertex.h"
#include "base/ccMacros.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "renderer/ccGLStateCache.h" #include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgram.h" #include "renderer/CCTexture2D.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCCustomCommand.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "renderer/CCGLProgramState.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -27,16 +27,13 @@ THE SOFTWARE.
#define __CCMOTION_STREAK_H__ #define __CCMOTION_STREAK_H__
#include "base/CCProtocols.h" #include "base/CCProtocols.h"
#include "renderer/CCTexture2D.h"
#include "base/ccTypes.h"
#include "2d/CCNode.h" #include "2d/CCNode.h"
#include "renderer/CCCustomCommand.h" #include "renderer/CCCustomCommand.h"
#ifdef EMSCRIPTEN
#include "CCGLBufferedNode.h"
#endif // EMSCRIPTEN
NS_CC_BEGIN NS_CC_BEGIN
class Texture2D;
/** /**
* @addtogroup misc_nodes * @addtogroup misc_nodes
* @{ * @{
@ -46,9 +43,6 @@ NS_CC_BEGIN
Creates a trailing path. Creates a trailing path.
*/ */
class CC_DLL MotionStreak : public Node, public TextureProtocol class CC_DLL MotionStreak : public Node, public TextureProtocol
#ifdef EMSCRIPTEN
, public GLBufferedNode
#endif // EMSCRIPTEN
{ {
public: public:
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename */ /** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename */

View File

@ -43,6 +43,7 @@ THE SOFTWARE.
#include "2d/CCComponent.h" #include "2d/CCComponent.h"
#include "2d/CCComponentContainer.h" #include "2d/CCComponentContainer.h"
#include "renderer/CCGLProgram.h" #include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"
#include "math/TransformUtils.h" #include "math/TransformUtils.h"
#include "deprecated/CCString.h" #include "deprecated/CCString.h"
@ -68,9 +69,11 @@ bool nodeComparisonLess(Node* n1, Node* n2)
); );
} }
// XXX: Yes, nodes might have a sort problem once every 15 days if the game runs at 60 FPS and each frame sprites are reordered. // FIXME:: Yes, nodes might have a sort problem once every 15 days if the game runs at 60 FPS and each frame sprites are reordered.
int Node::s_globalOrderOfArrival = 1; int Node::s_globalOrderOfArrival = 1;
// MARK: Constructor, Destructor, Init
Node::Node(void) Node::Node(void)
: _rotationX(0.0f) : _rotationX(0.0f)
, _rotationY(0.0f) , _rotationY(0.0f)
@ -143,6 +146,20 @@ Node::Node(void)
_transform = _inverse = _additionalTransform = Mat4::IDENTITY; _transform = _inverse = _additionalTransform = Mat4::IDENTITY;
} }
Node * Node::create()
{
Node * ret = new (std::nothrow) Node();
if (ret && ret->init())
{
ret->autorelease();
}
else
{
CC_SAFE_DELETE(ret);
}
return ret;
}
Node::~Node() Node::~Node()
{ {
CCLOGINFO( "deallocing Node: %p - tag: %i", this, _tag ); CCLOGINFO( "deallocing Node: %p - tag: %i", this, _tag );
@ -193,6 +210,34 @@ bool Node::init()
return true; return true;
} }
void Node::cleanup()
{
// actions
this->stopAllActions();
this->unscheduleAllSelectors();
#if CC_ENABLE_SCRIPT_BINDING
if ( _scriptType != kScriptTypeNone)
{
int action = kNodeOnCleanup;
BasicScriptData data(this,(void*)&action);
ScriptEvent scriptEvent(kNodeEvent,(void*)&data);
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&scriptEvent);
}
#endif // #if CC_ENABLE_SCRIPT_BINDING
// timers
for( const auto &child: _children)
child->cleanup();
}
std::string Node::getDescription() const
{
return StringUtils::format("<Node | Tag = %d", _tag);
}
// MARK: getters / setters
float Node::getSkewX() const float Node::getSkewX() const
{ {
return _skewX; return _skewX;
@ -472,10 +517,23 @@ const Vec2& Node::getPosition() const
/// position setter /// position setter
void Node::setPosition(const Vec2& position) void Node::setPosition(const Vec2& position)
{ {
if (_position.equals(position)) setPosition(position.x, position.y);
}
void Node::getPosition(float* x, float* y) const
{
*x = _position.x;
*y = _position.y;
}
void Node::setPosition(float x, float y)
{
if (_position.x == x && _position.y == y)
return; return;
_position = position; _position.x = x;
_position.y = y;
_transformUpdated = _transformDirty = _inverseDirty = true; _transformUpdated = _transformDirty = _inverseDirty = true;
_usingNormalizedPosition = false; _usingNormalizedPosition = false;
@ -487,21 +545,10 @@ void Node::setPosition(const Vec2& position)
#endif #endif
} }
void Node::getPosition(float* x, float* y) const
{
*x = _position.x;
*y = _position.y;
}
void Node::setPosition(float x, float y)
{
setPosition(Vec2(x, y));
}
void Node::setPosition3D(const Vec3& position) void Node::setPosition3D(const Vec3& position)
{ {
_positionZ = position.z; setPositionZ(position.z);
setPosition(Vec2(position.x, position.y)); setPosition(position.x, position.y);
} }
Vec3 Node::getPosition3D() const Vec3 Node::getPosition3D() const
@ -520,7 +567,7 @@ float Node::getPositionX() const
void Node::setPositionX(float x) void Node::setPositionX(float x)
{ {
setPosition(Vec2(x, _position.y)); setPosition(x, _position.y);
} }
float Node::getPositionY() const float Node::getPositionY() const
@ -530,7 +577,7 @@ float Node::getPositionY() const
void Node::setPositionY(float y) void Node::setPositionY(float y)
{ {
setPosition(Vec2(_position.x, y)); setPosition(_position.x, y);
} }
float Node::getPositionZ() const float Node::getPositionZ() const
@ -547,7 +594,7 @@ void Node::setPositionZ(float positionZ)
_positionZ = positionZ; _positionZ = positionZ;
// XXX BUG // FIXME: BUG
// Global Z Order should based on the modelViewTransform // Global Z Order should based on the modelViewTransform
setGlobalZOrder(positionZ); setGlobalZOrder(positionZ);
} }
@ -755,46 +802,7 @@ Rect Node::getBoundingBox() const
return RectApplyAffineTransform(rect, getNodeToParentAffineTransform()); return RectApplyAffineTransform(rect, getNodeToParentAffineTransform());
} }
Node * Node::create() // MARK: Children logic
{
Node * ret = new (std::nothrow) Node();
if (ret && ret->init())
{
ret->autorelease();
}
else
{
CC_SAFE_DELETE(ret);
}
return ret;
}
void Node::cleanup()
{
// actions
this->stopAllActions();
this->unscheduleAllSelectors();
#if CC_ENABLE_SCRIPT_BINDING
if ( _scriptType != kScriptTypeNone)
{
int action = kNodeOnCleanup;
BasicScriptData data(this,(void*)&action);
ScriptEvent scriptEvent(kNodeEvent,(void*)&data);
ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&scriptEvent);
}
#endif // #if CC_ENABLE_SCRIPT_BINDING
// timers
for( const auto &child: _children)
child->cleanup();
}
std::string Node::getDescription() const
{
return StringUtils::format("<Node | Tag = %d", _tag);
}
// lazy allocs // lazy allocs
void Node::childrenAlloc() void Node::childrenAlloc()
@ -1181,6 +1189,8 @@ void Node::sortAllChildren()
} }
} }
// MARK: draw / visit
void Node::draw() void Node::draw()
{ {
auto renderer = Director::getInstance()->getRenderer(); auto renderer = Director::getInstance()->getRenderer();
@ -1289,6 +1299,8 @@ Mat4 Node::transform(const Mat4& parentTransform)
return ret; return ret;
} }
// MARK: events
void Node::onEnter() void Node::onEnter()
{ {
if (_onEnterCallback) if (_onEnterCallback)
@ -1417,6 +1429,8 @@ void Node::setActionManager(ActionManager* actionManager)
} }
} }
// MARK: actions
Action * Node::runAction(Action* action) Action * Node::runAction(Action* action)
{ {
CCASSERT( action != nullptr, "Argument must be non-nil"); CCASSERT( action != nullptr, "Argument must be non-nil");
@ -1440,6 +1454,12 @@ void Node::stopActionByTag(int tag)
_actionManager->removeActionByTag(tag, this); _actionManager->removeActionByTag(tag, this);
} }
void Node::stopAllActionsByTag(int tag)
{
CCASSERT( tag != Action::INVALID_TAG, "Invalid tag");
_actionManager->removeAllActionsByTag(tag, this);
}
Action * Node::getActionByTag(int tag) Action * Node::getActionByTag(int tag)
{ {
CCASSERT( tag != Action::INVALID_TAG, "Invalid tag"); CCASSERT( tag != Action::INVALID_TAG, "Invalid tag");
@ -1451,7 +1471,7 @@ ssize_t Node::getNumberOfRunningActions() const
return _actionManager->getNumberOfRunningActionsInTarget(this); return _actionManager->getNumberOfRunningActionsInTarget(this);
} }
// Node - Callbacks // MARK: Callbacks
void Node::setScheduler(Scheduler* scheduler) void Node::setScheduler(Scheduler* scheduler)
{ {
@ -1582,6 +1602,8 @@ void Node::update(float fDelta)
} }
} }
// MARK: coordinates
AffineTransform Node::getNodeToParentAffineTransform() const AffineTransform Node::getNodeToParentAffineTransform() const
{ {
AffineTransform ret; AffineTransform ret;
@ -1649,7 +1671,7 @@ const Mat4& Node::getNodeToParentTransform() const
_transform.translate(anchorPoint.x, anchorPoint.y, 0); _transform.translate(anchorPoint.x, anchorPoint.y, 0);
} }
// XXX // FIXME:
// FIX ME: Expensive operation. // FIX ME: Expensive operation.
// FIX ME: It should be done together with the rotationZ // FIX ME: It should be done together with the rotationZ
if(_rotationY) { if(_rotationY) {
@ -1668,22 +1690,26 @@ const Mat4& Node::getNodeToParentTransform() const
_transform.translate(-anchorPoint.x, -anchorPoint.y, 0); _transform.translate(-anchorPoint.x, -anchorPoint.y, 0);
} }
// XXX: Try to inline skew // FIXME:: Try to inline skew
// If skew is needed, apply skew and then anchor point // If skew is needed, apply skew and then anchor point
if (needsSkewMatrix) if (needsSkewMatrix)
{ {
Mat4 skewMatrix(1, (float)tanf(CC_DEGREES_TO_RADIANS(_skewY)), 0, 0, float skewMatArray[16] =
(float)tanf(CC_DEGREES_TO_RADIANS(_skewX)), 1, 0, 0, {
0, 0, 1, 0, 1, (float)tanf(CC_DEGREES_TO_RADIANS(_skewY)), 0, 0,
0, 0, 0, 1); (float)tanf(CC_DEGREES_TO_RADIANS(_skewX)), 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
};
Mat4 skewMatrix(skewMatArray);
_transform = _transform * skewMatrix; _transform = _transform * skewMatrix;
// adjust anchor point // adjust anchor point
if (!_anchorPointInPoints.equals(Vec2::ZERO)) if (!_anchorPointInPoints.equals(Vec2::ZERO))
{ {
// XXX: Argh, Mat4 needs a "translate" method. // FIXME:: Argh, Mat4 needs a "translate" method.
// XXX: Although this is faster than multiplying a vec4 * mat4 // FIXME:: Although this is faster than multiplying a vec4 * mat4
_transform.m[12] += _transform.m[0] * -_anchorPointInPoints.x + _transform.m[4] * -_anchorPointInPoints.y; _transform.m[12] += _transform.m[0] * -_anchorPointInPoints.x + _transform.m[4] * -_anchorPointInPoints.y;
_transform.m[13] += _transform.m[1] * -_anchorPointInPoints.x + _transform.m[5] * -_anchorPointInPoints.y; _transform.m[13] += _transform.m[1] * -_anchorPointInPoints.x + _transform.m[5] * -_anchorPointInPoints.y;
} }
@ -1836,6 +1862,8 @@ void Node::updateTransform()
child->updateTransform(); child->updateTransform();
} }
// MARK: components
Component* Node::getComponent(const std::string& name) Component* Node::getComponent(const std::string& name)
{ {
if( _componentContainer ) if( _componentContainer )
@ -1873,6 +1901,9 @@ void Node::removeAllComponents()
} }
#if CC_USE_PHYSICS #if CC_USE_PHYSICS
// MARK: Physics
void Node::updatePhysicsBodyTransform(Scene* scene) void Node::updatePhysicsBodyTransform(Scene* scene)
{ {
updatePhysicsBodyScale(scene); updatePhysicsBodyScale(scene);
@ -2026,6 +2057,8 @@ PhysicsBody* Node::getPhysicsBody() const
} }
#endif //CC_USE_PHYSICS #endif //CC_USE_PHYSICS
// MARK: Opacity and Color
GLubyte Node::getOpacity(void) const GLubyte Node::getOpacity(void) const
{ {
return _realOpacity; return _realOpacity;
@ -2175,6 +2208,7 @@ void Node::disableCascadeColor()
} }
} }
// MARK: Camera
void Node::setCameraMask(unsigned short mask, bool applyChildren) void Node::setCameraMask(unsigned short mask, bool applyChildren)
{ {
_cameraMask = mask; _cameraMask = mask;
@ -2186,6 +2220,8 @@ void Node::setCameraMask(unsigned short mask, bool applyChildren)
} }
} }
// MARK: Deprecated
__NodeRGBA::__NodeRGBA() __NodeRGBA::__NodeRGBA()
{ {
CCLOG("NodeRGBA deprecated."); CCLOG("NodeRGBA deprecated.");

View File

@ -290,7 +290,7 @@ public:
* This code snippet sets the node in the center of screen. * This code snippet sets the node in the center of screen.
@code @code
Size size = Director::getInstance()->getWinSize(); Size size = Director::getInstance()->getWinSize();
node->setPosition( Vec2(size.width/2, size.height/2) ) node->setPosition(size.width/2, size.height/2)
@endcode @endcode
* *
* @param position The position (x,y) of the node in OpenGL coordinates * @param position The position (x,y) of the node in OpenGL coordinates
@ -1128,6 +1128,13 @@ public:
*/ */
void stopActionByTag(int tag); void stopActionByTag(int tag);
/**
* Removes all actions from the running action list by its tag.
*
* @param tag A tag that indicates the action to be removed.
*/
void stopAllActionsByTag(int tag);
/** /**
* Gets an action from the running action list by its tag. * Gets an action from the running action list by its tag.
* *

View File

@ -24,11 +24,7 @@
#include "2d/CCNodeGrid.h" #include "2d/CCNodeGrid.h"
#include "2d/CCGrid.h" #include "2d/CCGrid.h"
#include "renderer/CCGroupCommand.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "renderer/CCCustomCommand.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -24,7 +24,7 @@ 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "CCParallaxNode.h" #include "2d/CCParallaxNode.h"
#include "base/ccCArray.h" #include "base/ccCArray.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -165,7 +165,7 @@ void ParallaxNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32
PointObject *point = (PointObject*)_parallaxArray->arr[i]; PointObject *point = (PointObject*)_parallaxArray->arr[i];
float x = -pos.x + pos.x * point->getRatio().x + point->getOffset().x; float x = -pos.x + pos.x * point->getRatio().x + point->getOffset().x;
float y = -pos.y + pos.y * point->getRatio().y + point->getOffset().y; float y = -pos.y + pos.y * point->getRatio().y + point->getOffset().y;
point->getChild()->setPosition(Vec2(x,y)); point->getChild()->setPosition(x,y);
} }
_lastPosition = pos; _lastPosition = pos;
} }

View File

@ -30,22 +30,13 @@
#include "2d/CCParticleBatchNode.h" #include "2d/CCParticleBatchNode.h"
#include "renderer/CCTextureAtlas.h"
#include "2d/CCGrid.h" #include "2d/CCGrid.h"
#include "2d/CCParticleSystem.h" #include "2d/CCParticleSystem.h"
#include "platform/CCFileUtils.h"
#include "base/CCProfiling.h"
#include "base/ccConfig.h"
#include "base/ccMacros.h"
#include "base/base64.h"
#include "base/ZipUtils.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCGLProgram.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCQuadCommand.h" #include "renderer/CCQuadCommand.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "renderer/CCTextureAtlas.h"
#include "deprecated/CCString.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -207,8 +198,8 @@ void ParticleBatchNode::addChildByTagOrName(ParticleSystem* child, int zOrder, i
} }
// don't use lazy sorting, reordering the particle systems quads afterwards would be too complex // don't use lazy sorting, reordering the particle systems quads afterwards would be too complex
// XXX research whether lazy sorting + freeing current quads and calloc a new block with size of capacity would be faster // FIXME: research whether lazy sorting + freeing current quads and calloc a new block with size of capacity would be faster
// XXX or possibly using vertexZ for reordering, that would be fastest // FIXME: or possibly using vertexZ for reordering, that would be fastest
// this helper is almost equivalent to Node's addChild, but doesn't make use of the lazy sorting // this helper is almost equivalent to Node's addChild, but doesn't make use of the lazy sorting
int ParticleBatchNode::addChildHelper(ParticleSystem* child, int z, int aTag, const std::string &name, bool setTag) int ParticleBatchNode::addChildHelper(ParticleSystem* child, int z, int aTag, const std::string &name, bool setTag)
{ {

View File

@ -26,7 +26,6 @@ THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "2d/CCParticleExamples.h" #include "2d/CCParticleExamples.h"
#include "platform/CCImage.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/firePngData.h" #include "base/firePngData.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
@ -115,7 +114,7 @@ bool ParticleFire::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, 60)); this->setPosition(winSize.width/2, 60);
this->_posVar = Vec2(40, 20); this->_posVar = Vec2(40, 20);
// life of particles // life of particles
@ -216,7 +215,7 @@ bool ParticleFireworks::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, winSize.height/2)); this->setPosition(winSize.width/2, winSize.height/2);
// angle // angle
this->_angle= 90; this->_angle= 90;
@ -325,7 +324,7 @@ bool ParticleSun::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, winSize.height/2)); this->setPosition(winSize.width/2, winSize.height/2);
setPosVar(Vec2::ZERO); setPosVar(Vec2::ZERO);
// life of particles // life of particles
@ -432,7 +431,7 @@ bool ParticleGalaxy::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, winSize.height/2)); this->setPosition(winSize.width/2, winSize.height/2);
setPosVar(Vec2::ZERO); setPosVar(Vec2::ZERO);
// life of particles // life of particles
@ -541,7 +540,7 @@ bool ParticleFlower::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, winSize.height/2)); this->setPosition(winSize.width/2, winSize.height/2);
setPosVar(Vec2::ZERO); setPosVar(Vec2::ZERO);
// life of particles // life of particles
@ -649,7 +648,7 @@ bool ParticleMeteor::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, winSize.height/2)); this->setPosition(winSize.width/2, winSize.height/2);
setPosVar(Vec2::ZERO); setPosVar(Vec2::ZERO);
// life of particles // life of particles
@ -758,7 +757,7 @@ bool ParticleSpiral::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, winSize.height/2)); this->setPosition(winSize.width/2, winSize.height/2);
setPosVar(Vec2::ZERO); setPosVar(Vec2::ZERO);
// life of particles // life of particles
@ -866,7 +865,7 @@ bool ParticleExplosion::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, winSize.height/2)); this->setPosition(winSize.width/2, winSize.height/2);
setPosVar(Vec2::ZERO); setPosVar(Vec2::ZERO);
// life of particles // life of particles
@ -971,7 +970,7 @@ bool ParticleSmoke::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, 0)); this->setPosition(winSize.width/2, 0);
setPosVar(Vec2(20, 0)); setPosVar(Vec2(20, 0));
// life of particles // life of particles
@ -1076,7 +1075,7 @@ bool ParticleSnow::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, winSize.height + 10)); this->setPosition(winSize.width/2, winSize.height + 10);
setPosVar(Vec2(winSize.width/2, 0)); setPosVar(Vec2(winSize.width/2, 0));
// angle // angle
@ -1188,7 +1187,7 @@ bool ParticleRain::initWithTotalParticles(int numberOfParticles)
// emitter position // emitter position
Size winSize = Director::getInstance()->getWinSize(); Size winSize = Director::getInstance()->getWinSize();
this->setPosition(Vec2(winSize.width/2, winSize.height)); this->setPosition(winSize.width/2, winSize.height);
setPosVar(Vec2(winSize.width/2, 0)); setPosVar(Vec2(winSize.width/2, 0));
// life of particles // life of particles

View File

@ -48,16 +48,12 @@ THE SOFTWARE.
#include "2d/CCParticleBatchNode.h" #include "2d/CCParticleBatchNode.h"
#include "renderer/CCTextureAtlas.h" #include "renderer/CCTextureAtlas.h"
#include "platform/CCFileUtils.h"
#include "platform/CCImage.h"
#include "base/ccTypes.h"
#include "base/base64.h" #include "base/base64.h"
#include "base/ZipUtils.h" #include "base/ZipUtils.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/CCProfiling.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "deprecated/CCString.h"
#include "CCGL.h" #include "platform/CCFileUtils.h"
using namespace std; using namespace std;
@ -174,7 +170,7 @@ bool ParticleSystem::initWithFile(const std::string& plistFile)
CCASSERT( !dict.empty(), "Particles: file not found"); CCASSERT( !dict.empty(), "Particles: file not found");
// XXX compute path from a path, should define a function somewhere to do it // FIXME: compute path from a path, should define a function somewhere to do it
string listFilePath = plistFile; string listFilePath = plistFile;
if (listFilePath.find('/') != string::npos) if (listFilePath.find('/') != string::npos)
{ {
@ -257,7 +253,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string&
// position // position
float x = dictionary["sourcePositionx"].asFloat(); float x = dictionary["sourcePositionx"].asFloat();
float y = dictionary["sourcePositiony"].asFloat(); float y = dictionary["sourcePositiony"].asFloat();
this->setPosition( Vec2(x,y) ); this->setPosition(x,y);
_posVar.x = dictionary["sourcePositionVariancex"].asFloat(); _posVar.x = dictionary["sourcePositionVariancex"].asFloat();
_posVar.y = dictionary["sourcePositionVariancey"].asFloat(); _posVar.y = dictionary["sourcePositionVariancey"].asFloat();
@ -465,7 +461,7 @@ bool ParticleSystem::initWithTotalParticles(int numberOfParticles)
_emitterMode = Mode::GRAVITY; _emitterMode = Mode::GRAVITY;
// default: modulate // default: modulate
// XXX: not used // FIXME:: not used
// colorModulate = YES; // colorModulate = YES;
_isAutoRemoveOnFinish = false; _isAutoRemoveOnFinish = false;

View File

@ -30,7 +30,6 @@ THE SOFTWARE.
#include "base/CCProtocols.h" #include "base/CCProtocols.h"
#include "2d/CCNode.h" #include "2d/CCNode.h"
#include "base/CCValue.h" #include "base/CCValue.h"
#include "deprecated/CCString.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -26,26 +26,21 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "CCGL.h"
#include "2d/CCParticleSystemQuad.h" #include "2d/CCParticleSystemQuad.h"
#include "2d/CCSpriteFrame.h" #include "2d/CCSpriteFrame.h"
#include "2d/CCParticleBatchNode.h" #include "2d/CCParticleBatchNode.h"
#include "renderer/CCTextureAtlas.h" #include "renderer/CCTextureAtlas.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCRenderer.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/CCEventType.h" #include "base/CCEventType.h"
#include "base/CCConfiguration.h" #include "base/CCConfiguration.h"
#include "math/TransformUtils.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCQuadCommand.h"
#include "renderer/CCCustomCommand.h"
// extern
#include "base/CCEventListenerCustom.h" #include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h" #include "base/CCEventDispatcher.h"
#include "deprecated/CCString.h"
NS_CC_BEGIN NS_CC_BEGIN
ParticleSystemQuad::ParticleSystemQuad() ParticleSystemQuad::ParticleSystemQuad()

View File

@ -28,7 +28,7 @@ THE SOFTWARE.
#ifndef __CC_PARTICLE_SYSTEM_QUAD_H__ #ifndef __CC_PARTICLE_SYSTEM_QUAD_H__
#define __CC_PARTICLE_SYSTEM_QUAD_H__ #define __CC_PARTICLE_SYSTEM_QUAD_H__
#include "CCParticleSystem.h" #include "2d/CCParticleSystem.h"
#include "renderer/CCQuadCommand.h" #include "renderer/CCQuadCommand.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -27,17 +27,9 @@ THE SOFTWARE.
#include "base/ccMacros.h" #include "base/ccMacros.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "2d/CCDrawingPrimitives.h" #include "2d/CCSprite.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/ccGLStateCache.h" #include "renderer/ccGLStateCache.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "renderer/CCCustomCommand.h"
#include "math/TransformUtils.h"
// extern
#include <float.h>
NS_CC_BEGIN NS_CC_BEGIN
@ -512,22 +504,9 @@ void ProgressTimer::onDraw(const Mat4 &transform, uint32_t flags)
GL::bindTexture2D( _sprite->getTexture()->getName() ); GL::bindTexture2D( _sprite->getTexture()->getName() );
#ifdef EMSCRIPTEN
setGLBufferData((void*) _vertexData, (_vertexDataCount * sizeof(V2F_C4B_T2F)), 0);
int offset = 0;
glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid*)offset);
offset += sizeof(Vec2);
glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid*)offset);
offset += sizeof(Color4B);
glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid*)offset);
#else
glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(_vertexData[0]) , &_vertexData[0].vertices); glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(_vertexData[0]) , &_vertexData[0].vertices);
glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(_vertexData[0]), &_vertexData[0].texCoords); glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(_vertexData[0]), &_vertexData[0].texCoords);
glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(_vertexData[0]), &_vertexData[0].colors); glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(_vertexData[0]), &_vertexData[0].colors);
#endif // EMSCRIPTEN
if(_type == Type::RADIAL) if(_type == Type::RADIAL)
{ {

View File

@ -26,14 +26,13 @@ THE SOFTWARE.
#ifndef __MISC_NODE_CCPROGRESS_TIMER_H__ #ifndef __MISC_NODE_CCPROGRESS_TIMER_H__
#define __MISC_NODE_CCPROGRESS_TIMER_H__ #define __MISC_NODE_CCPROGRESS_TIMER_H__
#include "2d/CCSprite.h"
#include "renderer/CCCustomCommand.h" #include "renderer/CCCustomCommand.h"
#ifdef EMSCRIPTEN #include "2d/CCNode.h"
#include "CCGLBufferedNode.h"
#endif // EMSCRIPTEN
NS_CC_BEGIN NS_CC_BEGIN
class Sprite;
/** /**
* @addtogroup misc_nodes * @addtogroup misc_nodes
* @{ * @{
@ -46,9 +45,6 @@ NS_CC_BEGIN
@since v0.99.1 @since v0.99.1
*/ */
class CC_DLL ProgressTimer : public Node class CC_DLL ProgressTimer : public Node
#ifdef EMSCRIPTEN
, public GLBufferedNode
#endif // EMSCRIPTEN
{ {
public: public:
/** Types of progress /** Types of progress

View File

@ -27,23 +27,13 @@ THE SOFTWARE.
#include "2d/CCRenderTexture.h" #include "2d/CCRenderTexture.h"
#include "base/ccUtils.h" #include "base/ccUtils.h"
#include "platform/CCImage.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
#include "2d/CCGrid.h"
#include "base/CCEventType.h" #include "base/CCEventType.h"
#include "base/CCConfiguration.h" #include "base/CCConfiguration.h"
#include "base/CCConfiguration.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/CCEventListenerCustom.h" #include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h" #include "base/CCEventDispatcher.h"
#include "renderer/CCGLProgram.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "renderer/CCGroupCommand.h"
#include "renderer/CCCustomCommand.h"
#include "CCGL.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -356,7 +346,7 @@ void RenderTexture::beginWithClear(float r, float g, float b, float a, float dep
Director::getInstance()->getRenderer()->addCommand(&_beginWithClearCommand); Director::getInstance()->getRenderer()->addCommand(&_beginWithClearCommand);
} }
//TODO find a better way to clear the screen, there is no need to rebind render buffer there. //TODO: find a better way to clear the screen, there is no need to rebind render buffer there.
void RenderTexture::clear(float r, float g, float b, float a) void RenderTexture::clear(float r, float g, float b, float a)
{ {
this->beginWithClear(r, g, b, a); this->beginWithClear(r, g, b, a);
@ -504,7 +494,7 @@ Image* RenderTexture::newImage(bool fliimage)
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO);
glBindFramebuffer(GL_FRAMEBUFFER, _FBO); glBindFramebuffer(GL_FRAMEBUFFER, _FBO);
//TODO move this to configration, so we don't check it every time // TODO: move this to configration, so we don't check it every time
/* Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers. /* Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers.
*/ */
if (Configuration::getInstance()->checkForGLExtension("GL_QCOM")) if (Configuration::getInstance()->checkForGLExtension("GL_QCOM"))
@ -604,7 +594,7 @@ void RenderTexture::onBegin()
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO);
glBindFramebuffer(GL_FRAMEBUFFER, _FBO); glBindFramebuffer(GL_FRAMEBUFFER, _FBO);
//TODO move this to configration, so we don't check it every time // TODO: move this to configration, so we don't check it every time
/* Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers. /* Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers.
*/ */
if (Configuration::getInstance()->checkForGLExtension("GL_QCOM")) if (Configuration::getInstance()->checkForGLExtension("GL_QCOM"))

View File

@ -166,7 +166,7 @@ public:
void setVirtualViewport(const Vec2& rtBegin, const Rect& fullRect, const Rect& fullViewport); void setVirtualViewport(const Vec2& rtBegin, const Rect& fullRect, const Rect& fullViewport);
public: public:
// XXX should be procted. // FIXME: should be procted.
// but due to a bug in PowerVR + Android, // but due to a bug in PowerVR + Android,
// the constructor is public again // the constructor is public again
RenderTexture(); RenderTexture();

View File

@ -27,28 +27,14 @@ THE SOFTWARE.
#include "2d/CCSprite.h" #include "2d/CCSprite.h"
#include <string.h>
#include <algorithm>
#include "2d/CCSpriteBatchNode.h" #include "2d/CCSpriteBatchNode.h"
#include "2d/CCAnimation.h"
#include "2d/CCAnimationCache.h" #include "2d/CCAnimationCache.h"
#include "2d/CCSpriteFrame.h" #include "2d/CCSpriteFrame.h"
#include "2d/CCSpriteFrameCache.h" #include "2d/CCSpriteFrameCache.h"
#include "2d/CCDrawingPrimitives.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "renderer/CCTexture2D.h" #include "renderer/CCTexture2D.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "base/CCProfiling.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/CCDirector.h"
#include "base/ccConfig.h"
#include "math/CCGeometry.h"
#include "math/CCAffineTransform.h"
#include "math/TransformUtils.h"
#include "deprecated/CCString.h" #include "deprecated/CCString.h"
@ -61,6 +47,7 @@ NS_CC_BEGIN
#define RENDER_IN_SUBPIXEL(__ARGS__) (ceil(__ARGS__)) #define RENDER_IN_SUBPIXEL(__ARGS__) (ceil(__ARGS__))
#endif #endif
// MARK: create, init, dealloc
Sprite* Sprite::createWithTexture(Texture2D *texture) Sprite* Sprite::createWithTexture(Texture2D *texture)
{ {
Sprite *sprite = new (std::nothrow) Sprite(); Sprite *sprite = new (std::nothrow) Sprite();
@ -307,6 +294,7 @@ static unsigned char cc_2x2_white_image[] = {
#define CC_2x2_WHITE_IMAGE_KEY "/cc_2x2_white_image" #define CC_2x2_WHITE_IMAGE_KEY "/cc_2x2_white_image"
// MARK: texture
void Sprite::setTexture(const std::string &filename) void Sprite::setTexture(const std::string &filename)
{ {
Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(filename); Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(filename);
@ -497,6 +485,8 @@ void Sprite::setTextureCoords(Rect rect)
} }
} }
// MARK: visit, draw, transform
void Sprite::updateTransform(void) void Sprite::updateTransform(void)
{ {
CCASSERT(_batchNode, "updateTransform is only valid when Sprite is being rendered using an SpriteBatchNode"); CCASSERT(_batchNode, "updateTransform is only valid when Sprite is being rendered using an SpriteBatchNode");
@ -622,7 +612,8 @@ void Sprite::drawDebugData()
} }
#endif //CC_SPRITE_DEBUG_DRAW #endif //CC_SPRITE_DEBUG_DRAW
// Node overrides // MARK: visit, draw, transform
void Sprite::addChild(Node *child, int zOrder, int tag) void Sprite::addChild(Node *child, int zOrder, int tag)
{ {
CCASSERT(child != nullptr, "Argument must be non-nullptr"); CCASSERT(child != nullptr, "Argument must be non-nullptr");
@ -755,7 +746,7 @@ void Sprite::setDirtyRecursively(bool bValue)
} }
} }
// XXX HACK: optimization // FIXME: HACK: optimization
#define SET_DIRTY_RECURSIVELY() { \ #define SET_DIRTY_RECURSIVELY() { \
if (! _recursiveDirty) { \ if (! _recursiveDirty) { \
_recursiveDirty = true; \ _recursiveDirty = true; \
@ -885,7 +876,7 @@ bool Sprite::isFlippedY(void) const
} }
// //
// RGBA protocol // MARK: RGBA protocol
// //
void Sprite::updateColor(void) void Sprite::updateColor(void)
@ -938,7 +929,7 @@ bool Sprite::isOpacityModifyRGB(void) const
return _opacityModifyRGB; return _opacityModifyRGB;
} }
// Frames // MARK: Frames
void Sprite::setSpriteFrame(const std::string &spriteFrameName) void Sprite::setSpriteFrame(const std::string &spriteFrameName)
{ {
@ -1032,7 +1023,7 @@ void Sprite::setBatchNode(SpriteBatchNode *spriteBatchNode)
} }
} }
// Texture protocol // MARK: Texture protocol
void Sprite::updateBlendFunc(void) void Sprite::updateBlendFunc(void)
{ {

View File

@ -28,15 +28,10 @@ THE SOFTWARE.
#ifndef __SPRITE_NODE_CCSPRITE_H__ #ifndef __SPRITE_NODE_CCSPRITE_H__
#define __SPRITE_NODE_CCSPRITE_H__ #define __SPRITE_NODE_CCSPRITE_H__
#include <string>
#include "2d/CCNode.h" #include "2d/CCNode.h"
#include "base/CCProtocols.h" #include "base/CCProtocols.h"
#include "renderer/CCTextureAtlas.h" #include "renderer/CCTextureAtlas.h"
#include "base/ccTypes.h"
#include <string>
#ifdef EMSCRIPTEN
#include "CCGLBufferedNode.h"
#endif // EMSCRIPTEN
#include "physics/CCPhysicsBody.h"
#include "renderer/CCQuadCommand.h" #include "renderer/CCQuadCommand.h"
#include "renderer/CCCustomCommand.h" #include "renderer/CCCustomCommand.h"

View File

@ -27,24 +27,11 @@ THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "2d/CCSpriteBatchNode.h" #include "2d/CCSpriteBatchNode.h"
#include <algorithm>
#include "2d/CCSprite.h" #include "2d/CCSprite.h"
#include "2d/CCGrid.h"
#include "2d/CCDrawingPrimitives.h"
#include "2d/CCLayer.h"
#include "2d/CCScene.h"
#include "base/ccConfig.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/CCProfiling.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCGLProgram.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCRenderer.h" #include "renderer/CCRenderer.h"
#include "renderer/CCQuadCommand.h" #include "renderer/CCQuadCommand.h"
#include "math/TransformUtils.h"
#include "deprecated/CCString.h" // For StringUtils::format #include "deprecated/CCString.h" // For StringUtils::format
@ -638,8 +625,8 @@ void SpriteBatchNode::insertQuadFromSprite(Sprite *sprite, ssize_t index)
V3F_C4B_T2F_Quad quad = sprite->getQuad(); V3F_C4B_T2F_Quad quad = sprite->getQuad();
_textureAtlas->insertQuad(&quad, index); _textureAtlas->insertQuad(&quad, index);
// XXX: updateTransform will update the textureAtlas too, using updateQuad. // FIXME:: updateTransform will update the textureAtlas too, using updateQuad.
// XXX: so, it should be AFTER the insertQuad // FIXME:: so, it should be AFTER the insertQuad
sprite->setDirty(true); sprite->setDirty(true);
sprite->updateTransform(); sprite->updateTransform();
} }
@ -675,7 +662,7 @@ SpriteBatchNode * SpriteBatchNode::addSpriteWithoutQuad(Sprite*child, int z, int
// quad index is Z // quad index is Z
child->setAtlasIndex(z); child->setAtlasIndex(z);
// XXX: optimize with a binary search // FIXME:: optimize with a binary search
auto it = _descendants.begin(); auto it = _descendants.begin();
for (; it != _descendants.end(); ++it) for (; it != _descendants.end(); ++it)
{ {

View File

@ -33,7 +33,6 @@ THE SOFTWARE.
#include "2d/CCNode.h" #include "2d/CCNode.h"
#include "base/CCProtocols.h" #include "base/CCProtocols.h"
#include "base/ccMacros.h"
#include "renderer/CCTextureAtlas.h" #include "renderer/CCTextureAtlas.h"
#include "renderer/CCBatchCommand.h" #include "renderer/CCBatchCommand.h"

View File

@ -29,7 +29,6 @@ THE SOFTWARE.
#define __SPRITE_CCSPRITE_FRAME_H__ #define __SPRITE_CCSPRITE_FRAME_H__
#include "2d/CCNode.h" #include "2d/CCNode.h"
#include "base/CCProtocols.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "math/CCGeometry.h" #include "math/CCGeometry.h"

View File

@ -31,14 +31,15 @@ THE SOFTWARE.
#include <vector> #include <vector>
#include "2d/CCSpriteFrame.h"
#include "2d/CCSprite.h" #include "2d/CCSprite.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
#include "base/CCNS.h" #include "base/CCNS.h"
#include "base/ccMacros.h" #include "base/ccMacros.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "renderer/CCTexture2D.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "math/TransformUtils.h"
#include "deprecated/CCString.h" #include "deprecated/CCString.h"
@ -313,7 +314,7 @@ void SpriteFrameCache::removeUnusedSpriteFrames()
_spriteFrames.erase(toRemoveFrames); _spriteFrames.erase(toRemoveFrames);
// XXX. Since we don't know the .plist file that originated the frame, we must remove all .plist from the cache // FIXME:. Since we don't know the .plist file that originated the frame, we must remove all .plist from the cache
if( removed ) if( removed )
{ {
_loadedFileNames->clear(); _loadedFileNames->clear();
@ -340,7 +341,7 @@ void SpriteFrameCache::removeSpriteFrameByName(const std::string& name)
_spriteFrames.erase(name); _spriteFrames.erase(name);
} }
// XXX. Since we don't know the .plist file that originated the frame, we must remove all .plist from the cache // FIXME:. Since we don't know the .plist file that originated the frame, we must remove all .plist from the cache
_loadedFileNames->clear(); _loadedFileNames->clear();
} }

View File

@ -34,19 +34,17 @@ THE SOFTWARE.
* To create sprite frames and texture atlas, use this tool: * To create sprite frames and texture atlas, use this tool:
* http://zwoptex.zwopple.com/ * http://zwoptex.zwopple.com/
*/ */
#include <set>
#include <string>
#include "2d/CCSpriteFrame.h" #include "2d/CCSpriteFrame.h"
#include "renderer/CCTexture2D.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "base/CCValue.h" #include "base/CCValue.h"
#include "base/CCMap.h" #include "base/CCMap.h"
#include <set>
#include <string>
NS_CC_BEGIN NS_CC_BEGIN
class Sprite; class Sprite;
class Texture2D;
/** /**
* @addtogroup sprite_nodes * @addtogroup sprite_nodes

View File

@ -26,16 +26,11 @@ THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "2d/CCTMXLayer.h" #include "2d/CCTMXLayer.h"
#include "2d/CCTMXXMLParser.h"
#include "2d/CCTMXTiledMap.h" #include "2d/CCTMXTiledMap.h"
#include "2d/CCSprite.h" #include "2d/CCSprite.h"
#include "base/ccCArray.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCGLProgram.h" #include "renderer/CCGLProgram.h"
#include "deprecated/CCString.h" // For StringUtils::format #include "deprecated/CCString.h" // For StringUtils::format
NS_CC_BEGIN NS_CC_BEGIN
@ -55,7 +50,7 @@ TMXLayer * TMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo
} }
bool TMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo) bool TMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
{ {
// XXX: is 35% a good estimate ? // FIXME:: is 35% a good estimate ?
Size size = layerInfo->_layerSize; Size size = layerInfo->_layerSize;
float totalNumberOfTiles = size.width * size.height; float totalNumberOfTiles = size.width * size.height;
float capacity = totalNumberOfTiles * 0.35f + 1; // 35 percent is occupied ? float capacity = totalNumberOfTiles * 0.35f + 1; // 35 percent is occupied ?
@ -175,7 +170,7 @@ void TMXLayer::setupTiles()
// gid = CFSwapInt32( gid ); // gid = CFSwapInt32( gid );
/* We support little endian.*/ /* We support little endian.*/
// XXX: gid == 0 --> empty tile // FIXME:: gid == 0 --> empty tile
if (gid != 0) if (gid != 0)
{ {
this->appendTileForGID(gid, Vec2(x, y)); this->appendTileForGID(gid, Vec2(x, y));
@ -243,8 +238,8 @@ void TMXLayer::setupTileSprite(Sprite* sprite, Vec2 pos, int gid)
{ {
// put the anchor in the middle for ease of rotation. // put the anchor in the middle for ease of rotation.
sprite->setAnchorPoint(Vec2(0.5f,0.5f)); sprite->setAnchorPoint(Vec2(0.5f,0.5f));
sprite->setPosition(Vec2(getPositionAt(pos).x + sprite->getContentSize().height/2, sprite->setPosition(getPositionAt(pos).x + sprite->getContentSize().height/2,
getPositionAt(pos).y + sprite->getContentSize().width/2 ) ); getPositionAt(pos).y + sprite->getContentSize().width/2 );
int flag = gid & (kTMXTileHorizontalFlag | kTMXTileVerticalFlag ); int flag = gid & (kTMXTileHorizontalFlag | kTMXTileVerticalFlag );
@ -292,7 +287,7 @@ Sprite* TMXLayer::reusedTileWithRect(Rect rect)
} }
else else
{ {
// XXX HACK: Needed because if "batch node" is nil, // FIXME: HACK: Needed because if "batch node" is nil,
// then the Sprite'squad will be reset // then the Sprite'squad will be reset
_reusedTile->setBatchNode(nullptr); _reusedTile->setBatchNode(nullptr);
@ -472,7 +467,7 @@ ssize_t TMXLayer::atlasIndexForExistantZ(int z)
ssize_t TMXLayer::atlasIndexForNewZ(int z) ssize_t TMXLayer::atlasIndexForNewZ(int z)
{ {
// XXX: This can be improved with a sort of binary search // FIXME:: This can be improved with a sort of binary search
ssize_t i=0; ssize_t i=0;
for (i=0; i< _atlasIndexArray->num ; i++) for (i=0; i< _atlasIndexArray->num ; i++)
{ {

View File

@ -27,10 +27,8 @@ THE SOFTWARE.
#ifndef __CCTMX_LAYER_H__ #ifndef __CCTMX_LAYER_H__
#define __CCTMX_LAYER_H__ #define __CCTMX_LAYER_H__
#include "CCTMXObjectGroup.h"
#include "CCAtlasNode.h"
#include "2d/CCSpriteBatchNode.h" #include "2d/CCSpriteBatchNode.h"
#include "CCTMXXMLParser.h" #include "2d/CCTMXXMLParser.h"
#include "base/ccCArray.h" #include "base/ccCArray.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -25,7 +25,7 @@ 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "CCTMXObjectGroup.h" #include "2d/CCTMXObjectGroup.h"
#include "base/ccMacros.h" #include "base/ccMacros.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -24,14 +24,12 @@ 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "CCTMXTiledMap.h" #include "2d/CCTMXTiledMap.h"
#include "CCTMXXMLParser.h" #include "2d/CCTMXXMLParser.h"
#include "CCTMXLayer.h" #include "2d/CCTMXLayer.h"
#include "2d/CCSprite.h" #include "2d/CCSprite.h"
#include "deprecated/CCString.h" // For StringUtils::format #include "deprecated/CCString.h" // For StringUtils::format
#include <algorithm>
NS_CC_BEGIN NS_CC_BEGIN
// implementation TMXTiledMap // implementation TMXTiledMap
@ -138,7 +136,7 @@ TMXTilesetInfo * TMXTiledMap::tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInf
// gid = CFSwapInt32( gid ); // gid = CFSwapInt32( gid );
/* We support little endian.*/ /* We support little endian.*/
// XXX: gid == 0 --> empty tile // FIXME:: gid == 0 --> empty tile
if( gid != 0 ) if( gid != 0 )
{ {
// Optimization: quick return // Optimization: quick return

View File

@ -28,12 +28,11 @@ THE SOFTWARE.
#define __CCTMX_TILE_MAP_H__ #define __CCTMX_TILE_MAP_H__
#include "2d/CCNode.h" #include "2d/CCNode.h"
#include "CCTMXObjectGroup.h" #include "2d/CCTMXObjectGroup.h"
#include "base/CCValue.h" #include "base/CCValue.h"
NS_CC_BEGIN NS_CC_BEGIN
class TMXObjectGroup;
class TMXLayer; class TMXLayer;
class TMXLayerInfo; class TMXLayerInfo;
class TMXTilesetInfo; class TMXTilesetInfo;

View File

@ -26,15 +26,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "2d/CCTMXXMLParser.h"
#include <unordered_map> #include <unordered_map>
#include <sstream> #include <sstream>
#include "CCTMXXMLParser.h" #include "2d/CCTMXTiledMap.h"
#include "CCTMXTiledMap.h"
#include "base/ccMacros.h"
#include "platform/CCFileUtils.h"
#include "base/ZipUtils.h" #include "base/ZipUtils.h"
#include "base/base64.h" #include "base/base64.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "platform/CCFileUtils.h"
using namespace std; using namespace std;

View File

@ -33,13 +33,13 @@ THE SOFTWARE.
#include "platform/CCSAXParser.h" #include "platform/CCSAXParser.h"
#include "base/CCVector.h" #include "base/CCVector.h"
#include "base/CCValue.h" #include "base/CCValue.h"
#include "2d/CCTMXObjectGroup.h" // needed for Vector<TMXObjectGroup*> for binding
#include <string> #include <string>
NS_CC_BEGIN NS_CC_BEGIN
class TMXLayerInfo; class TMXLayerInfo;
class TMXObjectGroup;
class TMXTilesetInfo; class TMXTilesetInfo;
/** @file /** @file

View File

@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "CCTextFieldTTF.h" #include "2d/CCTextFieldTTF.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"

View File

@ -24,14 +24,13 @@ 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "CCTileMapAtlas.h" #include "2d/CCTileMapAtlas.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
#include "renderer/CCTextureAtlas.h" #include "renderer/CCTextureAtlas.h"
#include "base/TGAlib.h" #include "base/TGAlib.h"
#include "base/ccConfig.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "deprecated/CCString.h" #include "deprecated/CCString.h"
#include <sstream>
NS_CC_BEGIN NS_CC_BEGIN
@ -142,8 +141,8 @@ void TileMapAtlas::setTile(const Color3B& tile, const Vec2& position)
{ {
ptr[(unsigned int)(position.x + position.y * _TGAInfo->width)] = tile; ptr[(unsigned int)(position.x + position.y * _TGAInfo->width)] = tile;
// XXX: this method consumes a lot of memory // FIXME:: this method consumes a lot of memory
// XXX: a tree of something like that shall be implemented // FIXME:: a tree of something like that shall be implemented
std::string key = StringUtils::toString(position.x) + "," + StringUtils::toString(position.y); std::string key = StringUtils::toString(position.x) + "," + StringUtils::toString(position.y);
int num = _posToAtlasIndex[key].asInt(); int num = _posToAtlasIndex[key].asInt();

View File

@ -27,7 +27,7 @@ THE SOFTWARE.
#ifndef __CCTILE_MAP_ATLAS__ #ifndef __CCTILE_MAP_ATLAS__
#define __CCTILE_MAP_ATLAS__ #define __CCTILE_MAP_ATLAS__
#include "CCAtlasNode.h" #include "2d/CCAtlasNode.h"
#include "base/CCValue.h" #include "base/CCValue.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -121,13 +121,13 @@ void TransitionScene::finish()
{ {
// clean up // clean up
_inScene->setVisible(true); _inScene->setVisible(true);
_inScene->setPosition(Vec2(0,0)); _inScene->setPosition(0,0);
_inScene->setScale(1.0f); _inScene->setScale(1.0f);
_inScene->setRotation(0.0f); _inScene->setRotation(0.0f);
_inScene->setAdditionalTransform(nullptr); _inScene->setAdditionalTransform(nullptr);
_outScene->setVisible(false); _outScene->setVisible(false);
_outScene->setPosition(Vec2(0,0)); _outScene->setPosition(0,0);
_outScene->setScale(1.0f); _outScene->setScale(1.0f);
_outScene->setRotation(0.0f); _outScene->setRotation(0.0f);
_outScene->setAdditionalTransform(nullptr); _outScene->setAdditionalTransform(nullptr);
@ -311,7 +311,7 @@ void TransitionJumpZoom::onEnter()
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
_inScene->setScale(0.5f); _inScene->setScale(0.5f);
_inScene->setPosition(Vec2(s.width, 0)); _inScene->setPosition(s.width, 0);
_inScene->setAnchorPoint(Vec2(0.5f, 0.5f)); _inScene->setAnchorPoint(Vec2(0.5f, 0.5f));
_outScene->setAnchorPoint(Vec2(0.5f, 0.5f)); _outScene->setAnchorPoint(Vec2(0.5f, 0.5f));
@ -392,7 +392,7 @@ ActionInterval* TransitionMoveInL::easeActionWithAction(ActionInterval* action)
void TransitionMoveInL::initScenes() void TransitionMoveInL::initScenes()
{ {
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
_inScene->setPosition(Vec2(-s.width,0)); _inScene->setPosition(-s.width,0);
} }
// //
@ -420,7 +420,7 @@ TransitionMoveInR* TransitionMoveInR::create(float t, Scene* scene)
void TransitionMoveInR::initScenes() void TransitionMoveInR::initScenes()
{ {
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
_inScene->setPosition( Vec2(s.width,0) ); _inScene->setPosition(s.width,0);
} }
// //
@ -448,7 +448,7 @@ TransitionMoveInT* TransitionMoveInT::create(float t, Scene* scene)
void TransitionMoveInT::initScenes() void TransitionMoveInT::initScenes()
{ {
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
_inScene->setPosition( Vec2(0,s.height) ); _inScene->setPosition(0,s.height);
} }
// //
@ -476,7 +476,7 @@ TransitionMoveInB* TransitionMoveInB::create(float t, Scene* scene)
void TransitionMoveInB::initScenes() void TransitionMoveInB::initScenes()
{ {
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
_inScene->setPosition( Vec2(0,-s.height) ); _inScene->setPosition(0,-s.height);
} }
@ -524,7 +524,7 @@ void TransitionSlideInL::sceneOrder()
void TransitionSlideInL:: initScenes() void TransitionSlideInL:: initScenes()
{ {
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
_inScene->setPosition( Vec2(-(s.width-ADJUST_FACTOR),0) ); _inScene->setPosition(-(s.width-ADJUST_FACTOR),0);
} }
ActionInterval* TransitionSlideInL::action() ActionInterval* TransitionSlideInL::action()
@ -580,7 +580,7 @@ void TransitionSlideInR::sceneOrder()
void TransitionSlideInR::initScenes() void TransitionSlideInR::initScenes()
{ {
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
_inScene->setPosition( Vec2(s.width-ADJUST_FACTOR,0) ); _inScene->setPosition(s.width-ADJUST_FACTOR,0);
} }
@ -621,7 +621,7 @@ void TransitionSlideInT::sceneOrder()
void TransitionSlideInT::initScenes() void TransitionSlideInT::initScenes()
{ {
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
_inScene->setPosition( Vec2(0,s.height-ADJUST_FACTOR) ); _inScene->setPosition(0,s.height-ADJUST_FACTOR);
} }
@ -661,7 +661,7 @@ void TransitionSlideInB::sceneOrder()
void TransitionSlideInB:: initScenes() void TransitionSlideInB:: initScenes()
{ {
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
_inScene->setPosition( Vec2(0,-(s.height-ADJUST_FACTOR)) ); _inScene->setPosition(0,-(s.height-ADJUST_FACTOR));
} }
@ -1286,7 +1286,7 @@ void TransitionCrossFade::onEnter()
} }
inTexture->getSprite()->setAnchorPoint( Vec2(0.5f,0.5f) ); inTexture->getSprite()->setAnchorPoint( Vec2(0.5f,0.5f) );
inTexture->setPosition( Vec2(size.width/2, size.height/2) ); inTexture->setPosition(size.width/2, size.height/2);
inTexture->setAnchorPoint( Vec2(0.5f,0.5f) ); inTexture->setAnchorPoint( Vec2(0.5f,0.5f) );
// render inScene to its texturebuffer // render inScene to its texturebuffer
@ -1297,7 +1297,7 @@ void TransitionCrossFade::onEnter()
// create the second render texture for outScene // create the second render texture for outScene
RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height); RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height);
outTexture->getSprite()->setAnchorPoint( Vec2(0.5f,0.5f) ); outTexture->getSprite()->setAnchorPoint( Vec2(0.5f,0.5f) );
outTexture->setPosition( Vec2(size.width/2, size.height/2) ); outTexture->setPosition(size.width/2, size.height/2);
outTexture->setAnchorPoint( Vec2(0.5f,0.5f) ); outTexture->setAnchorPoint( Vec2(0.5f,0.5f) );
// render outScene to its texturebuffer // render outScene to its texturebuffer

View File

@ -62,7 +62,7 @@ TransitionPageTurn * TransitionPageTurn::create(float t, Scene *scene, bool back
/** initializes a transition with duration and incoming scene */ /** initializes a transition with duration and incoming scene */
bool TransitionPageTurn::initWithDuration(float t, Scene *scene, bool backwards) bool TransitionPageTurn::initWithDuration(float t, Scene *scene, bool backwards)
{ {
// XXX: needed before [super init] // FIXME:: needed before [super init]
_back = backwards; _back = backwards;
if (TransitionScene::initWithDuration(t, scene)) if (TransitionScene::initWithDuration(t, scene))

View File

@ -73,7 +73,7 @@ void TransitionProgress::onEnter()
// create the second render texture for outScene // create the second render texture for outScene
RenderTexture *texture = RenderTexture::create((int)size.width, (int)size.height); RenderTexture *texture = RenderTexture::create((int)size.width, (int)size.height);
texture->getSprite()->setAnchorPoint(Vec2(0.5f,0.5f)); texture->getSprite()->setAnchorPoint(Vec2(0.5f,0.5f));
texture->setPosition(Vec2(size.width/2, size.height/2)); texture->setPosition(size.width/2, size.height/2);
texture->setAnchorPoint(Vec2(0.5f,0.5f)); texture->setAnchorPoint(Vec2(0.5f,0.5f));
// render outScene to its texturebuffer // render outScene to its texturebuffer
@ -144,7 +144,7 @@ ProgressTimer* TransitionProgressRadialCCW::progressTimerNodeWithRenderTexture(R
// Return the radial type that we want to use // Return the radial type that we want to use
node->setReverseDirection(false); node->setReverseDirection(false);
node->setPercentage(100); node->setPercentage(100);
node->setPosition(Vec2(size.width/2, size.height/2)); node->setPosition(size.width/2, size.height/2);
node->setAnchorPoint(Vec2(0.5f,0.5f)); node->setAnchorPoint(Vec2(0.5f,0.5f));
return node; return node;
@ -188,7 +188,7 @@ ProgressTimer* TransitionProgressRadialCW::progressTimerNodeWithRenderTexture(Re
// Return the radial type that we want to use // Return the radial type that we want to use
node->setReverseDirection(true); node->setReverseDirection(true);
node->setPercentage(100); node->setPercentage(100);
node->setPosition(Vec2(size.width/2, size.height/2)); node->setPosition(size.width/2, size.height/2);
node->setAnchorPoint(Vec2(0.5f,0.5f)); node->setAnchorPoint(Vec2(0.5f,0.5f));
return node; return node;
@ -221,7 +221,7 @@ ProgressTimer* TransitionProgressHorizontal::progressTimerNodeWithRenderTexture(
node->setBarChangeRate(Vec2(1,0)); node->setBarChangeRate(Vec2(1,0));
node->setPercentage(100); node->setPercentage(100);
node->setPosition(Vec2(size.width/2, size.height/2)); node->setPosition(size.width/2, size.height/2);
node->setAnchorPoint(Vec2(0.5f,0.5f)); node->setAnchorPoint(Vec2(0.5f,0.5f));
return node; return node;
@ -254,7 +254,7 @@ ProgressTimer* TransitionProgressVertical::progressTimerNodeWithRenderTexture(Re
node->setBarChangeRate(Vec2(0,1)); node->setBarChangeRate(Vec2(0,1));
node->setPercentage(100); node->setPercentage(100);
node->setPosition(Vec2(size.width/2, size.height/2)); node->setPosition(size.width/2, size.height/2);
node->setAnchorPoint(Vec2(0.5f,0.5f)); node->setAnchorPoint(Vec2(0.5f,0.5f));
return node; return node;
@ -300,7 +300,7 @@ ProgressTimer* TransitionProgressInOut::progressTimerNodeWithRenderTexture(Rende
node->setBarChangeRate(Vec2(1, 1)); node->setBarChangeRate(Vec2(1, 1));
node->setPercentage(0); node->setPercentage(0);
node->setPosition(Vec2(size.width/2, size.height/2)); node->setPosition(size.width/2, size.height/2);
node->setAnchorPoint(Vec2(0.5f,0.5f)); node->setAnchorPoint(Vec2(0.5f,0.5f));
return node; return node;
@ -334,7 +334,7 @@ ProgressTimer* TransitionProgressOutIn::progressTimerNodeWithRenderTexture(Rende
node->setBarChangeRate(Vec2(1, 1)); node->setBarChangeRate(Vec2(1, 1));
node->setPercentage(100); node->setPercentage(100);
node->setPosition(Vec2(size.width/2, size.height/2)); node->setPosition(size.width/2, size.height/2);
node->setAnchorPoint(Vec2(0.5f,0.5f)); node->setAnchorPoint(Vec2(0.5f,0.5f));
return node; return node;

View File

@ -236,8 +236,6 @@
<ClCompile Include="..\3d\CCSkeleton3D.cpp" /> <ClCompile Include="..\3d\CCSkeleton3D.cpp" />
<ClCompile Include="..\3d\CCSprite3D.cpp" /> <ClCompile Include="..\3d\CCSprite3D.cpp" />
<ClCompile Include="..\3d\CCSprite3DMaterial.cpp" /> <ClCompile Include="..\3d\CCSprite3DMaterial.cpp" />
<ClCompile Include="..\3d\CCSubMesh.cpp" />
<ClCompile Include="..\3d\CCSubMeshState.cpp" />
<ClCompile Include="..\base\atitc.cpp" /> <ClCompile Include="..\base\atitc.cpp" />
<ClCompile Include="..\base\base64.cpp" /> <ClCompile Include="..\base\base64.cpp" />
<ClCompile Include="..\base\CCAutoreleasePool.cpp" /> <ClCompile Include="..\base\CCAutoreleasePool.cpp" />
@ -280,7 +278,6 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
</ClCompile> </ClCompile>
<ClCompile Include="..\base\CCIMEDispatcher.cpp" /> <ClCompile Include="..\base\CCIMEDispatcher.cpp" />
<ClCompile Include="..\base\CCModuleManager.cpp" />
<ClCompile Include="..\base\CCNS.cpp" /> <ClCompile Include="..\base\CCNS.cpp" />
<ClCompile Include="..\base\CCProfiling.cpp" /> <ClCompile Include="..\base\CCProfiling.cpp" />
<ClCompile Include="..\base\ccRandom.cpp" /> <ClCompile Include="..\base\ccRandom.cpp" />
@ -462,8 +459,6 @@
<ClInclude Include="..\3d\CCSkeleton3D.h" /> <ClInclude Include="..\3d\CCSkeleton3D.h" />
<ClInclude Include="..\3d\CCSprite3D.h" /> <ClInclude Include="..\3d\CCSprite3D.h" />
<ClInclude Include="..\3d\CCSprite3DMaterial.h" /> <ClInclude Include="..\3d\CCSprite3DMaterial.h" />
<ClInclude Include="..\3d\CCSubMesh.h" />
<ClInclude Include="..\3d\CCSubMeshState.h" />
<ClInclude Include="..\base\atitc.h" /> <ClInclude Include="..\base\atitc.h" />
<ClInclude Include="..\base\base64.h" /> <ClInclude Include="..\base\base64.h" />
<ClInclude Include="..\base\CCAutoreleasePool.h" /> <ClInclude Include="..\base\CCAutoreleasePool.h" />
@ -496,7 +491,6 @@
<ClInclude Include="..\base\CCIMEDispatcher.h" /> <ClInclude Include="..\base\CCIMEDispatcher.h" />
<ClInclude Include="..\base\ccMacros.h" /> <ClInclude Include="..\base\ccMacros.h" />
<ClInclude Include="..\base\CCMap.h" /> <ClInclude Include="..\base\CCMap.h" />
<ClInclude Include="..\base\CCModuleManager.h" />
<ClInclude Include="..\base\CCNS.h" /> <ClInclude Include="..\base\CCNS.h" />
<ClInclude Include="..\base\CCPlatformConfig.h" /> <ClInclude Include="..\base\CCPlatformConfig.h" />
<ClInclude Include="..\base\CCPlatformMacros.h" /> <ClInclude Include="..\base\CCPlatformMacros.h" />

View File

@ -623,12 +623,6 @@
<ClCompile Include="..\3d\CCSkeleton3D.cpp"> <ClCompile Include="..\3d\CCSkeleton3D.cpp">
<Filter>3d</Filter> <Filter>3d</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\3d\CCSubMeshState.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCSubMesh.cpp">
<Filter>3d</Filter>
</ClCompile>
<ClCompile Include="..\3d\CCAttachNode.cpp"> <ClCompile Include="..\3d\CCAttachNode.cpp">
<Filter>3d</Filter> <Filter>3d</Filter>
</ClCompile> </ClCompile>
@ -647,9 +641,6 @@
<ClCompile Include="..\renderer\CCVertexIndexData.cpp"> <ClCompile Include="..\renderer\CCVertexIndexData.cpp">
<Filter>renderer</Filter> <Filter>renderer</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\base\CCModuleManager.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\base\ccRandom.cpp"> <ClCompile Include="..\base\ccRandom.cpp">
<Filter>base</Filter> <Filter>base</Filter>
</ClCompile> </ClCompile>
@ -1313,12 +1304,6 @@
<ClInclude Include="..\3d\CCSkeleton3D.h"> <ClInclude Include="..\3d\CCSkeleton3D.h">
<Filter>3d</Filter> <Filter>3d</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\3d\CCSubMeshState.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCSubMesh.h">
<Filter>3d</Filter>
</ClInclude>
<ClInclude Include="..\3d\CCAttachNode.h"> <ClInclude Include="..\3d\CCAttachNode.h">
<Filter>3d</Filter> <Filter>3d</Filter>
</ClInclude> </ClInclude>
@ -1337,9 +1322,6 @@
<ClInclude Include="..\renderer\CCVertexIndexData.h"> <ClInclude Include="..\renderer\CCVertexIndexData.h">
<Filter>renderer</Filter> <Filter>renderer</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\base\CCModuleManager.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\ccRandom.h"> <ClInclude Include="..\base\ccRandom.h">
<Filter>base</Filter> <Filter>base</Filter>
</ClInclude> </ClInclude>

View File

@ -23,12 +23,9 @@
****************************************************************************/ ****************************************************************************/
#include "3d/CCAnimate3D.h" #include "3d/CCAnimate3D.h"
#include "3d/CCAnimation3D.h"
#include "3d/CCSprite3D.h" #include "3d/CCSprite3D.h"
#include "3d/CCSkeleton3D.h" #include "3d/CCSkeleton3D.h"
#include "3d/CCMeshSkin.h" #include "3d/CCMeshSkin.h"
#include "base/ccMacros.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -28,17 +28,13 @@
#include <map> #include <map>
#include "3d/CCAnimation3D.h" #include "3d/CCAnimation3D.h"
#include "3d/3dExport.h"
#include "base/ccMacros.h" #include "base/ccMacros.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "base/ccTypes.h"
#include "base/CCPlatformMacros.h"
#include "2d/CCActionInterval.h" #include "2d/CCActionInterval.h"
#include "3d/3dExport.h"
NS_CC_BEGIN NS_CC_BEGIN
class Animation3D;
class Bone3D; class Bone3D;
/** /**
* Animate3D, Animates a Sprite3D given with an Animation3D * Animate3D, Animates a Sprite3D given with an Animation3D

View File

@ -24,8 +24,6 @@
#include "3d/CCAnimation3D.h" #include "3d/CCAnimation3D.h"
#include "3d/CCBundle3D.h" #include "3d/CCBundle3D.h"
#include "base/ccMacros.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -31,8 +31,7 @@
#include "base/ccMacros.h" #include "base/ccMacros.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "base/ccTypes.h" #include "3d/CCBundle3DData.h"
#include "CCBundle3DData.h"
#include "3d/3dExport.h" #include "3d/3dExport.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -24,10 +24,8 @@
#ifndef __CCANIMATIONCURVE_H__ #ifndef __CCANIMATIONCURVE_H__
#define __CCANIMATIONCURVE_H__ #define __CCANIMATIONCURVE_H__
#include <unordered_map>
#include <functional> #include <functional>
#include "base/ccTypes.h"
#include "base/CCPlatformMacros.h" #include "base/CCPlatformMacros.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "math/CCMath.h" #include "math/CCMath.h"

View File

@ -25,12 +25,6 @@
#include "3d/CCAttachNode.h" #include "3d/CCAttachNode.h"
#include "3d/CCSkeleton3D.h" #include "3d/CCSkeleton3D.h"
#include "2d/CCNode.h"
#include "base/CCDirector.h"
#include "base/CCPlatformMacros.h"
#include "base/ccMacros.h"
NS_CC_BEGIN NS_CC_BEGIN
AttachNode* AttachNode::create(Bone3D* attachBone) AttachNode* AttachNode::create(Bone3D* attachBone)

View File

@ -25,14 +25,8 @@
#ifndef __CCATTACHNODE_H__ #ifndef __CCATTACHNODE_H__
#define __CCATTACHNODE_H__ #define __CCATTACHNODE_H__
#include <vector>
#include "base/CCVector.h"
#include "base/ccTypes.h"
#include "base/CCProtocols.h"
#include "math/CCMath.h" #include "math/CCMath.h"
#include "2d/CCNode.h" #include "2d/CCNode.h"
#include "renderer/CCMeshCommand.h"
#include "3d/3dExport.h" #include "3d/3dExport.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -25,18 +25,10 @@
#ifndef __CCBUNDLE3D_H__ #ifndef __CCBUNDLE3D_H__
#define __CCBUNDLE3D_H__ #define __CCBUNDLE3D_H__
#include <map>
#include <list>
#include "3d/CCBundle3DData.h" #include "3d/CCBundle3DData.h"
#include "base/ccMacros.h"
#include "base/CCRef.h"
#include "base/ccTypes.h"
#include "json/document.h"
#include "CCBundleReader.h"
#include "3d/3dExport.h" #include "3d/3dExport.h"
#include "3d/CCBundleReader.h"
#include "json/document.h"
NS_CC_BEGIN NS_CC_BEGIN
class Animation3D; class Animation3D;

View File

@ -22,26 +22,14 @@
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include <list>
#include <fstream>
#include <iostream>
#include <sstream>
#include "3d/CCMesh.h" #include "3d/CCMesh.h"
#include "3d/CCMeshSkin.h" #include "3d/CCMeshSkin.h"
#include "3d/CCSkeleton3D.h"
#include "3d/CCMeshVertexIndexData.h" #include "3d/CCMeshVertexIndexData.h"
#include "base/ccMacros.h"
#include "base/CCEventCustom.h"
#include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h" #include "base/CCEventDispatcher.h"
#include "base/CCEventType.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCTexture2D.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramCache.h" #include "renderer/CCGLProgramState.h"
using namespace std; using namespace std;

View File

@ -26,17 +26,13 @@
#define __CCMESH_H__ #define __CCMESH_H__
#include <string> #include <string>
#include <vector>
#include "3d/CCBundle3DData.h" #include "3d/CCBundle3DData.h"
#include "3d/CCAABB.h" #include "3d/CCAABB.h"
#include "3d/3dExport.h" #include "3d/3dExport.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "base/ccTypes.h"
#include "math/CCMath.h" #include "math/CCMath.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCMeshCommand.h" #include "renderer/CCMeshCommand.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -44,6 +40,8 @@ NS_CC_BEGIN
class Texture2D; class Texture2D;
class MeshSkin; class MeshSkin;
class MeshIndexData; class MeshIndexData;
class GLProgramState;
class GLProgram;
/** /**
* Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on * Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on
*/ */

View File

@ -25,10 +25,7 @@
#include "3d/CCMeshSkin.h" #include "3d/CCMeshSkin.h"
#include "3d/CCSkeleton3D.h" #include "3d/CCSkeleton3D.h"
#include "3d/CCBundle3D.h" #include "3d/CCBundle3D.h"
#include "3d/CCSkeleton3D.h"
#include "base/ccMacros.h"
#include "base/CCPlatformMacros.h"
#include "platform/CCFileUtils.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -25,17 +25,12 @@
#ifndef __CCMESHSKIN_H__ #ifndef __CCMESHSKIN_H__
#define __CCMESHSKIN_H__ #define __CCMESHSKIN_H__
#include <unordered_map>
#include "3d/CCBundle3DData.h" #include "3d/CCBundle3DData.h"
#include "3d/CCSkeleton3D.h" #include "3d/3dExport.h"
#include "base/ccMacros.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "base/CCVector.h" #include "base/CCVector.h"
#include "base/ccTypes.h"
#include "math/CCMath.h" #include "math/CCMath.h"
#include "3d/3dExport.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -30,14 +30,15 @@
#include "3d/CCBundle3DData.h" #include "3d/CCBundle3DData.h"
#include "3d/CCAABB.h" #include "3d/CCAABB.h"
#include "3d/3dExport.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "base/ccTypes.h" #include "base/CCVector.h"
#include "math/CCMath.h" #include "math/CCMath.h"
#include "renderer/CCGLProgram.h" #include "renderer/CCGLProgram.h"
#include "renderer/CCVertexIndexData.h" #include "renderer/CCVertexIndexData.h"
#include "renderer/CCVertexIndexBuffer.h" #include "renderer/CCVertexIndexBuffer.h"
#include "3d/3dExport.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -16,17 +16,11 @@
// version 0.9.0: Initial // version 0.9.0: Initial
// //
#include <cstdlib> #include "CCObjLoader.h"
#include <cstring>
#include <cassert>
#include <string>
#include <vector>
#include <map>
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include "CCObjLoader.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
#include "base/ccUtils.h" #include "base/ccUtils.h"

View File

@ -20,9 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "CCRay.h" #include "3d/CCRay.h"
#include "CCAABB.h"
#include "CCOBB.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -25,10 +25,9 @@
#ifndef __CC_RAY_H_ #ifndef __CC_RAY_H_
#define __CC_RAY_H_ #define __CC_RAY_H_
#include "base/ccMacros.h"
#include "math/CCMath.h" #include "math/CCMath.h"
#include "CCAABB.h" #include "3d/CCAABB.h"
#include "CCOBB.h" #include "3d/CCOBB.h"
#include "3d/3dExport.h" #include "3d/3dExport.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -23,11 +23,7 @@
****************************************************************************/ ****************************************************************************/
#include "3d/CCSkeleton3D.h" #include "3d/CCSkeleton3D.h"
#include "3d/CCBundle3D.h"
#include "base/ccMacros.h"
#include "base/CCPlatformMacros.h"
#include "platform/CCFileUtils.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -25,16 +25,11 @@
#ifndef __CCSKELETON3D_H__ #ifndef __CCSKELETON3D_H__
#define __CCSKELETON3D_H__ #define __CCSKELETON3D_H__
#include <unordered_map>
#include "3d/CCBundle3DData.h" #include "3d/CCBundle3DData.h"
#include "3d/3dExport.h"
#include "base/ccMacros.h"
#include "base/CCRef.h" #include "base/CCRef.h"
#include "base/CCVector.h" #include "base/CCVector.h"
#include "base/ccTypes.h"
#include "math/CCMath.h"
#include "3d/3dExport.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -28,7 +28,7 @@
#include "3d/CCBundle3D.h" #include "3d/CCBundle3D.h"
#include "3d/CCSprite3DMaterial.h" #include "3d/CCSprite3DMaterial.h"
#include "3d/CCAttachNode.h" #include "3d/CCAttachNode.h"
#include "3d/CCSkeleton3D.h" #include "3d/CCMesh.h"
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "base/CCPlatformMacros.h" #include "base/CCPlatformMacros.h"

View File

@ -25,7 +25,6 @@
#ifndef __CCSPRITE3D_H__ #ifndef __CCSPRITE3D_H__
#define __CCSPRITE3D_H__ #define __CCSPRITE3D_H__
#include <vector>
#include <unordered_map> #include <unordered_map>
#include "base/CCVector.h" #include "base/CCVector.h"
@ -33,9 +32,9 @@
#include "base/CCProtocols.h" #include "base/CCProtocols.h"
#include "2d/CCNode.h" #include "2d/CCNode.h"
#include "renderer/CCMeshCommand.h" #include "renderer/CCMeshCommand.h"
#include "3d/CCSkeleton3D.h" // need to include for lua-binding
#include "3d/CCAABB.h" #include "3d/CCAABB.h"
#include "3d/CCBundle3DData.h" #include "3d/CCBundle3DData.h"
#include "3d/CCMesh.h"
#include "3d/CCMeshVertexIndexData.h" #include "3d/CCMeshVertexIndexData.h"
#include "3d/3dExport.h" #include "3d/3dExport.h"
@ -47,10 +46,7 @@ class Mesh;
class Texture2D; class Texture2D;
class MeshSkin; class MeshSkin;
class AttachNode; class AttachNode;
class SubMeshState;
class Skeleton3D;
struct NodeData; struct NodeData;
class SubMesh;
/** Sprite3D: A sprite can be loaded from 3D model files, .obj, .c3t, .c3b, then can be drawed as sprite */ /** Sprite3D: A sprite can be loaded from 3D model files, .obj, .c3t, .c3b, then can be drawed as sprite */
class CC_3D_DLL Sprite3D : public Node, public BlendProtocol class CC_3D_DLL Sprite3D : public Node, public BlendProtocol
{ {

View File

@ -24,13 +24,7 @@
#include "3d/CCSprite3DMaterial.h" #include "3d/CCSprite3DMaterial.h"
#include "platform/CCFileUtils.h" #include "renderer/CCTexture2D.h"
#include "renderer/CCTextureCache.h"
#include "base/CCEventCustom.h"
#include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h"
#include "base/CCEventType.h"
#include "base/CCDirector.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -28,14 +28,9 @@
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include "base/ccTypes.h" #include "base/ccTypes.h"
#include "base/CCMap.h"
NS_CC_BEGIN NS_CC_BEGIN
class Sprite3D;
class Mesh;
class EventListenerCustom;
class EventCustom;
class Texture2D; class Texture2D;
/** /**

View File

@ -85,6 +85,8 @@ list(REMOVE_ITEM cocos2d_source_files
"${CMAKE_CURRENT_SOURCE_DIR}/base/CCController-android.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCController-android.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/base/CCUserDefaultAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCUserDefaultAndroid.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/ui/UIVideoPlayerAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIVideoPlayerAndroid.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebView.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebViewImpl_android.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/LocalStorageAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/LocalStorageAndroid.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventController.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventController.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventListenerController.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventListenerController.cpp"

View File

@ -27,11 +27,7 @@ THE SOFTWARE.
#ifndef _SIMPLE_AUDIO_ENGINE_H_ #ifndef _SIMPLE_AUDIO_ENGINE_H_
#define _SIMPLE_AUDIO_ENGINE_H_ #define _SIMPLE_AUDIO_ENGINE_H_
#include <stddef.h>
#include "Export.h" #include "Export.h"
#include <typeinfo>
#include <ctype.h>
#include <string.h>
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) #define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated))

View File

@ -338,7 +338,7 @@ typedef struct _sourceInfo {
#pragma mark CDAsynchBufferLoader #pragma mark CDAsynchBufferLoader
/** CDAsynchBufferLoader /** CDAsynchBufferLoader
TODO * TODO: ???
*/ */
@interface CDAsynchBufferLoader : NSOperation { @interface CDAsynchBufferLoader : NSOperation {
NSArray *_loadRequests; NSArray *_loadRequests;

View File

@ -25,7 +25,6 @@ THE SOFTWARE.
#ifndef __AUTORELEASEPOOL_H__ #ifndef __AUTORELEASEPOOL_H__
#define __AUTORELEASEPOOL_H__ #define __AUTORELEASEPOOL_H__
#include <stack>
#include <vector> #include <vector>
#include <string> #include <string>
#include "base/CCRef.h" #include "base/CCRef.h"

View File

@ -25,7 +25,6 @@
#include "base/CCDirector.h" #include "base/CCDirector.h"
#include "platform/CCGLView.h" #include "platform/CCGLView.h"
#include "2d/CCScene.h" #include "2d/CCScene.h"
#include "2d/CCNode.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -24,7 +24,6 @@ THE SOFTWARE.
#ifndef _CCCAMERA_H__ #ifndef _CCCAMERA_H__
#define _CCCAMERA_H__ #define _CCCAMERA_H__
#include "base/CCVector.h"
#include "2d/CCNode.h" #include "2d/CCNode.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -25,9 +25,6 @@ THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "base/CCConfiguration.h" #include "base/CCConfiguration.h"
#include <string.h>
#include "base/ccMacros.h"
#include "base/ccConfig.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -161,13 +158,13 @@ void Configuration::destroyInstance()
CC_SAFE_RELEASE_NULL(s_sharedConfiguration); CC_SAFE_RELEASE_NULL(s_sharedConfiguration);
} }
// XXX: deprecated // FIXME: deprecated
Configuration* Configuration::sharedConfiguration() Configuration* Configuration::sharedConfiguration()
{ {
return Configuration::getInstance(); return Configuration::getInstance();
} }
// XXX: deprecated // FIXME: deprecated
void Configuration::purgeConfiguration() void Configuration::purgeConfiguration()
{ {
Configuration::destroyInstance(); Configuration::destroyInstance();

View File

@ -237,7 +237,7 @@ static void _log(const char *format, va_list args)
} }
// XXX: Deprecated // FIXME: Deprecated
void CCLog(const char * format, ...) void CCLog(const char * format, ...)
{ {
va_list args; va_list args;

View File

@ -23,15 +23,13 @@
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "CCController.h" #include "base/CCController.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "ccMacros.h" #include "base/CCEventDispatcher.h"
#include "CCEventDispatcher.h" #include "base/CCEventController.h"
#include "CCEventController.h" #include "base/CCDirector.h"
#include "CCEventListenerController.h"
#include "CCDirector.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -24,10 +24,6 @@
****************************************************************************/ ****************************************************************************/
#include "base/CCData.h" #include "base/CCData.h"
#include "platform/CCCommon.h"
#include "base/ccMacros.h"
#include <string>
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -32,16 +32,16 @@ THE SOFTWARE.
#include <string> #include <string>
#include "2d/CCDrawingPrimitives.h" #include "2d/CCDrawingPrimitives.h"
#include "2d/CCScene.h"
#include "2d/CCSpriteFrameCache.h" #include "2d/CCSpriteFrameCache.h"
#include "platform/CCFileUtils.h" #include "platform/CCFileUtils.h"
#include "platform/CCImage.h"
#include "2d/CCActionManager.h" #include "2d/CCActionManager.h"
#include "2d/CCFontFNT.h" #include "2d/CCFontFNT.h"
#include "2d/CCFontAtlasCache.h" #include "2d/CCFontAtlasCache.h"
#include "2d/CCAnimationCache.h" #include "2d/CCAnimationCache.h"
#include "2d/CCTransition.h" #include "2d/CCTransition.h"
#include "2d/CCFontFreeType.h" #include "2d/CCFontFreeType.h"
#include "2d/CCLabelAtlas.h"
#include "renderer/CCGLProgramCache.h" #include "renderer/CCGLProgramCache.h"
#include "renderer/CCGLProgramStateCache.h" #include "renderer/CCGLProgramStateCache.h"
#include "renderer/CCTextureCache.h" #include "renderer/CCTextureCache.h"
@ -55,12 +55,9 @@ THE SOFTWARE.
#include "base/CCEventDispatcher.h" #include "base/CCEventDispatcher.h"
#include "base/CCEventCustom.h" #include "base/CCEventCustom.h"
#include "base/CCConsole.h" #include "base/CCConsole.h"
#include "base/CCTouch.h"
#include "base/CCAutoreleasePool.h" #include "base/CCAutoreleasePool.h"
#include "base/CCProfiling.h"
#include "base/CCConfiguration.h" #include "base/CCConfiguration.h"
#include "base/CCNS.h"
#include "math/CCMath.h"
#include "CCApplication.h" #include "CCApplication.h"
#include "CCGLViewImpl.h" #include "CCGLViewImpl.h"
@ -76,7 +73,7 @@ THE SOFTWARE.
using namespace std; using namespace std;
NS_CC_BEGIN NS_CC_BEGIN
// XXX it should be a Director ivar. Move it there once support for multiple directors is added // FIXME: it should be a Director ivar. Move it there once support for multiple directors is added
// singleton stuff // singleton stuff
static DisplayLinkDirector *s_SharedDirector = nullptr; static DisplayLinkDirector *s_SharedDirector = nullptr;
@ -241,7 +238,7 @@ void Director::setGLDefaultValues()
CCASSERT(_openGLView, "opengl view should not be null"); CCASSERT(_openGLView, "opengl view should not be null");
setAlphaBlending(true); setAlphaBlending(true);
// XXX: Fix me, should enable/disable depth test according the depth format as cocos2d-iphone did // FIXME: Fix me, should enable/disable depth test according the depth format as cocos2d-iphone did
// [self setDepthTest: view_.depthFormat]; // [self setDepthTest: view_.depthFormat];
setDepthTest(false); setDepthTest(false);
setProjection(_projection); setProjection(_projection);
@ -277,7 +274,8 @@ void Director::drawScene()
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
/* to avoid flickr, nextScene MUST be here: after tick and before draw. /* to avoid flickr, nextScene MUST be here: after tick and before draw.
XXX: Which bug is this one. It seems that it can't be reproduced with v0.9 */ * FIXME: Which bug is this one. It seems that it can't be reproduced with v0.9
*/
if (_nextScene) if (_nextScene)
{ {
setNextScene(); setNextScene();
@ -1158,7 +1156,7 @@ void Director::calculateMPF()
// returns the FPS image data pointer and len // returns the FPS image data pointer and len
void Director::getFPSImageData(unsigned char** datapointer, ssize_t* length) void Director::getFPSImageData(unsigned char** datapointer, ssize_t* length)
{ {
// XXX fixed me if it should be used // FIXME: fixed me if it should be used
*datapointer = cc_fps_images_png; *datapointer = cc_fps_images_png;
*length = cc_fps_images_len(); *length = cc_fps_images_len();
} }

Some files were not shown because too many files have changed in this diff Show More